Date: Wed, 14 Apr 2010 06:56:48 +0000 (UTC) From: Juli Mallett <jmallett@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r206594 - user/jmallett/octeon/sys/mips/mips Message-ID: <201004140656.o3E6umOD096463@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jmallett Date: Wed Apr 14 06:56:48 2010 New Revision: 206594 URL: http://svn.freebsd.org/changeset/base/206594 Log: o) Add an invariant to pmap_kenter that the previous mapping is invalid or identical to the new mapping. Something is leaving a mapping valid or doing a double pmap_kenter (well, pmap_qenter) but I don't know what, but it's identical to the previous one, so I assume it's the latter (like was in the sfbuf code that I just removed.) o) Given that invariant, neither invalidate nor update the TLB in pmap_kenter, since it should have been invalidated in pmap_kremove. Modified: user/jmallett/octeon/sys/mips/mips/pmap.c Modified: user/jmallett/octeon/sys/mips/mips/pmap.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/pmap.c Wed Apr 14 06:47:34 2010 (r206593) +++ user/jmallett/octeon/sys/mips/mips/pmap.c Wed Apr 14 06:56:48 2010 (r206594) @@ -750,19 +750,9 @@ pmap_kenter(vm_offset_t va, vm_paddr_t p npte |= PG_C_UC; pte = pmap_pte(kernel_pmap, va); + KASSERT(!pte_test(pte, PG_V) || *pte == npte, + ("pmap_kenter for %p with different valid entry", (void *)va)); *pte = npte; - -#if 0 - /* - * The original code did an update_page() here, but - * we often do a lot of pmap_kenter() calls and then - * start using the addresses later, at which point - * the TLB has overflown many times. - */ - pmap_invalidate_page(kernel_pmap, va); -#else - pmap_update_page(kernel_pmap, va, npte); -#endif } /* @@ -2741,6 +2731,10 @@ pmap_mapdev(vm_offset_t pa, vm_size_t si if (!va) panic("pmap_mapdev: Couldn't alloc kernel virtual memory"); pa = trunc_page(pa); + /* + * XXX + * Shouldn't we make these pages uncached? + */ for (tmpva = va; size > 0;) { pmap_kenter(tmpva, pa); size -= PAGE_SIZE;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004140656.o3E6umOD096463>