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 {
 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to