When "force" is specified to pmap_invalidate_cache_range(), the given
start address is not required to be page aligned. However, the loop within pmap_invalidate_cache_range() that performs the actual cache line invalidations requires that the starting address be truncated to a multiple of the cache line size. This change corrects an error in that truncation. Submitted by: Brett Gutstein <bgutstein@rice.edu> Reviewed by: kib MFC after: 1 week
This commit is contained in:
parent
76aa4645a3
commit
bf2a2bba1b
@ -1868,7 +1868,7 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva, boolean_t force)
|
||||
{
|
||||
|
||||
if (force) {
|
||||
sva &= ~(vm_offset_t)cpu_clflush_line_size;
|
||||
sva &= ~(vm_offset_t)(cpu_clflush_line_size - 1);
|
||||
} else {
|
||||
KASSERT((sva & PAGE_MASK) == 0,
|
||||
("pmap_invalidate_cache_range: sva not page-aligned"));
|
||||
|
@ -1289,7 +1289,7 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva, boolean_t force)
|
||||
{
|
||||
|
||||
if (force) {
|
||||
sva &= ~(vm_offset_t)cpu_clflush_line_size;
|
||||
sva &= ~(vm_offset_t)(cpu_clflush_line_size - 1);
|
||||
} else {
|
||||
KASSERT((sva & PAGE_MASK) == 0,
|
||||
("pmap_invalidate_cache_range: sva not page-aligned"));
|
||||
|
Loading…
Reference in New Issue
Block a user