MFC r204957:

Fall back to wbinvd when region for CLFLUSH is >= 2MB.

MFC r205334 (by avg):
Fix a typo in a comment.
This commit is contained in:
Konstantin Belousov 2010-03-24 09:45:17 +00:00
parent 3770189a65
commit 2dec7615c6
2 changed files with 8 additions and 4 deletions

View File

@ -941,7 +941,8 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva)
if (cpu_feature & CPUID_SS)
; /* If "Self Snoop" is supported, do nothing. */
else if (cpu_feature & CPUID_CLFSH) {
else if ((cpu_feature & CPUID_CLFSH) != 0 &&
eva - sva < 2 * 1024 * 1024) {
/*
* Otherwise, do per-cache line flush. Use the mfence
@ -958,7 +959,8 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva)
/*
* No targeted cache flush methods are supported by CPU,
* globally invalidate cache as a last resort.
* or the supplied range is bigger than 2MB.
* Globally invalidate cache.
*/
pmap_invalidate_cache();
}

View File

@ -982,7 +982,8 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva)
if (cpu_feature & CPUID_SS)
; /* If "Self Snoop" is supported, do nothing. */
else if (cpu_feature & CPUID_CLFSH) {
else if ((cpu_feature & CPUID_CLFSH) != 0 &&
eva - sva < 2 * 1024 * 1024) {
/*
* Otherwise, do per-cache line flush. Use the mfence
@ -999,7 +1000,8 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva)
/*
* No targeted cache flush methods are supported by CPU,
* globally invalidate cache as a last resort.
* or the supplied range is bigger than 2MB.
* Globally invalidate cache.
*/
pmap_invalidate_cache();
}