diff options
author | rnoland <rnoland@FreeBSD.org> | 2009-08-29 16:01:21 +0000 |
---|---|---|
committer | rnoland <rnoland@FreeBSD.org> | 2009-08-29 16:01:21 +0000 |
commit | acf2898b52f30400050f7206f0842f1c9c7cff1d (patch) | |
tree | 660aa601a6a5a81806a6dbb98868f37cfda762d4 /sys | |
parent | 9e8ade6852ffba4a3acbce8ed04b15b86e41c732 (diff) | |
download | FreeBSD-src-acf2898b52f30400050f7206f0842f1c9c7cff1d.zip FreeBSD-src-acf2898b52f30400050f7206f0842f1c9c7cff1d.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 4 | ||||
-rw-r--r-- | sys/i386/i386/pmap.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index b9eee49..f0da536 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -943,8 +943,8 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva) * 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 { diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index c6f1d5f..405cbd3 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -967,8 +967,8 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva) * 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 { |