Date: Thu, 29 Mar 2007 11:12:02 GMT From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 116824 for review Message-ID: <200703291112.l2TBC29m062507@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=116824 Change 116824 by gonzo@gonzo_jeeves on 2007/03/29 11:11:01 o Ensure presence of global bit in TLB entry for KVA with KASSERT. Affected files ... .. //depot/projects/mips2/src/sys/mips/mips/tlb.c#13 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/mips/tlb.c#13 (text+ko) ==== @@ -140,6 +140,7 @@ panic("pmap %p entering invalid mapping for va %lx to pa %lx [%lx]", pmap, (u_long)va, (u_long)pa, (u_long)bits); + *pte &= PG_G; *pte |= (MIPS_PA_TO_PFN(pa) << MIPS_PFN_SHIFT) | bits; *pte |= PG_C_UNCACHED; @@ -184,6 +185,15 @@ register_t ehi, old_ehi; int i; + /* + * Bailout if we're trying to add TLB entry for KVA without + * PG_G bit set. + */ + KASSERT(!((va > VM_MAXUSER_ADDRESS) && (((pte0) & PG_G) == 0)), + ("tlb_enter for KVA without global bit set")); + KASSERT(!((va > VM_MAXUSER_ADDRESS) && (((pte1) & PG_G) == 0)), + ("tlb_enter for KVA without global bit set")); + va &= ~PAGE_MASK; ehi = MIPS_HI_ENTRY(va, asid); old_ehi = mips_rd_entryhi();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703291112.l2TBC29m062507>