From 5a2349cebd85f174e437b2021916d04ff7d0f4ef Mon Sep 17 00:00:00 2001 From: hselasky Date: Tue, 10 May 2016 17:51:17 +0000 Subject: [PATCH] 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 --- sys/compat/linuxkpi/common/include/linux/io.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)