aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2016-05-10 17:51:17 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2016-05-10 17:51:17 +0000
commitf2dbb750f41b6dc70f6693157c726d0b5e534be2 (patch)
treed872c43aa48fefdfb89533c6d3183d691061c376
parent6351d60947cae8866ee958b2d42f7c588dd50f64 (diff)
downloadsrc-f2dbb750f41b6dc70f6693157c726d0b5e534be2.tar.gz
src-f2dbb750f41b6dc70f6693157c726d0b5e534be2.zip
Implement ioremap_wt() and use that in the MEMREMAP_WT case for i386
and amd64. Suggested by: cem @ Discussed with: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies
Notes
Notes: svn path=/head/; revision=299379
-rw-r--r--sys/compat/linuxkpi/common/include/linux/io.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/io.h b/sys/compat/linuxkpi/common/include/linux/io.h
index aad6b73724ea..d4376efee78d 100644
--- a/sys/compat/linuxkpi/common/include/linux/io.h
+++ b/sys/compat/linuxkpi/common/include/linux/io.h
@@ -183,6 +183,8 @@ void *_ioremap_attr(vm_paddr_t phys_addr, unsigned long size, int attr);
_ioremap_attr((addr), (size), VM_MEMATTR_WRITE_COMBINING)
#define ioremap_wb(addr, size) \
_ioremap_attr((addr), (size), VM_MEMATTR_WRITE_BACK)
+#define ioremap_wt(addr, size) \
+ _ioremap_attr((addr), (size), VM_MEMATTR_WRITE_THROUGH)
#define ioremap(addr, size) \
_ioremap_attr((addr), (size), VM_MEMATTR_UNCACHEABLE)
void iounmap(void *addr);
@@ -227,7 +229,7 @@ memremap(resource_size_t offset, size_t size, unsigned long flags)
(addr = ioremap_wb(offset, size)) != NULL)
goto done;
if ((flags & MEMREMAP_WT) &&
- (addr = ioremap_nocache(offset, size)) != NULL)
+ (addr = ioremap_wt(offset, size)) != NULL)
goto done;
if ((flags & MEMREMAP_WC) &&
(addr = ioremap_wc(offset, size)) != NULL)