Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 May 2016 17:51:18 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r299379 - head/sys/compat/linuxkpi/common/include/linux
Message-ID:  <201605101751.u4AHpIrk013651@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605101751.u4AHpIrk013651>