Author: alc Date: Wed Oct 3 05:42:15 2012 New Revision: 241156 URL: http://svn.freebsd.org/changeset/base/241156
Log: Reimplement pmap_qremove() using the new TLB invalidation function for efficiently invalidating address ranges. Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Wed Oct 3 05:06:45 2012 (r241155) +++ head/sys/mips/mips/pmap.c Wed Oct 3 05:42:15 2012 (r241156) @@ -930,15 +930,19 @@ pmap_qenter(vm_offset_t va, vm_page_t *m 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); } /*************************************************** _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"