diff options
author | Alan Cox <alc@FreeBSD.org> | 2012-10-03 05:42:15 +0000 |
---|---|---|
committer | Alan Cox <alc@FreeBSD.org> | 2012-10-03 05:42:15 +0000 |
commit | 54f3305ccaf6f7eb62856fb2ec5fb743584ae151 (patch) | |
tree | d3795cb702a5e3c9d020835b10457fdd672c1144 /sys/mips | |
parent | 4db2c4b8c7ddff048151190ad8fc9df43a513727 (diff) | |
download | src-54f3305ccaf6f7eb62856fb2ec5fb743584ae151.tar.gz src-54f3305ccaf6f7eb62856fb2ec5fb743584ae151.zip |
Reimplement pmap_qremove() using the new TLB invalidation function for
efficiently invalidating address ranges.
Notes
Notes:
svn path=/head/; revision=241156
Diffstat (limited to 'sys/mips')
-rw-r--r-- | sys/mips/mips/pmap.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/sys/mips/mips/pmap.c b/sys/mips/mips/pmap.c index c41b8623223f..bd77bae9fb70 100644 --- a/sys/mips/mips/pmap.c +++ b/sys/mips/mips/pmap.c @@ -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); } /*************************************************** |