svn commit: r299379 - head/sys/compat/linuxkpi/common/include/linux
Hans Petter Selasky
hselasky at FreeBSD.org
Tue May 10 17:51:19 UTC 2016
Author: hselasky
Date: Tue May 10 17:51:17 2016
New Revision: 299379
URL: https://svnweb.freebsd.org/changeset/base/299379
Log:
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
Modified:
head/sys/compat/linuxkpi/common/include/linux/io.h
Modified: head/sys/compat/linuxkpi/common/include/linux/io.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/io.h Tue May 10 17:34:35 2016 (r299378)
+++ head/sys/compat/linuxkpi/common/include/linux/io.h Tue May 10 17:51:17 2016 (r299379)
@@ -183,6 +183,8 @@ void *_ioremap_attr(vm_paddr_t phys_addr
_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
(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)
More information about the svn-src-head
mailing list