Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Aug 2009 16:01:21 +0000 (UTC)
From:      Robert Noland <rnoland@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r196643 - in head/sys: amd64/amd64 i386/i386
Message-ID:  <200908291601.n7TG1Mmx068644@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rnoland
Date: Sat Aug 29 16:01:21 2009
New Revision: 196643
URL: http://svn.freebsd.org/changeset/base/196643

Log:
  Swap the start/end virtual addresses in pmap_invalidate_cache_range().
  
  This fixes the functionality on non SelfSnoop hardware.
  
  Found by:	rnoland
  Submitted by:	alc
  Reviewed by:	kib
  MFC after:	3 days

Modified:
  head/sys/amd64/amd64/pmap.c
  head/sys/i386/i386/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c	Sat Aug 29 15:42:06 2009	(r196642)
+++ head/sys/amd64/amd64/pmap.c	Sat Aug 29 16:01:21 2009	(r196643)
@@ -943,8 +943,8 @@ pmap_invalidate_cache_range(vm_offset_t 
 		 * coherence domain.
 		 */
 		mfence();
-		for (; eva < sva; eva += cpu_clflush_line_size)
-			clflush(eva);
+		for (; sva < eva; sva += cpu_clflush_line_size)
+			clflush(sva);
 		mfence();
 	} else {
 

Modified: head/sys/i386/i386/pmap.c
==============================================================================
--- head/sys/i386/i386/pmap.c	Sat Aug 29 15:42:06 2009	(r196642)
+++ head/sys/i386/i386/pmap.c	Sat Aug 29 16:01:21 2009	(r196643)
@@ -967,8 +967,8 @@ pmap_invalidate_cache_range(vm_offset_t 
 		 * coherence domain.
 		 */
 		mfence();
-		for (; eva < sva; eva += cpu_clflush_line_size)
-			clflush(eva);
+		for (; sva < eva; sva += cpu_clflush_line_size)
+			clflush(sva);
 		mfence();
 	} else {
 



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