Reimplement pmap_qremove() using the new TLB invalidation function for

efficiently invalidating address ranges.
This commit is contained in:
Alan Cox 2012-10-03 05:42:15 +00:00
parent 4db2c4b8c7
commit 54f3305cca
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=241156

View File

@ -930,15 +930,19 @@ pmap_qenter(vm_offset_t va, vm_page_t *m, int count)
void
pmap_qremove(vm_offset_t va, int count)
{
/*
* No need to wb/inv caches here,
* pmap_kremove will do it for us
*/
pt_entry_t *pte;
vm_offset_t origva;
while (count-- > 0) {
pmap_kremove(va);
if (count < 1)
return;
mips_dcache_wbinv_range_index(va, PAGE_SIZE * count);
origva = va;
do {
pte = pmap_pte(kernel_pmap, va);
*pte = PTE_G;
va += PAGE_SIZE;
}
} while (--count > 0);
pmap_invalidate_range(kernel_pmap, origva, va);
}
/***************************************************