From owner-p4-projects@FreeBSD.ORG Thu Mar 29 11:12:07 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B503016A403; Thu, 29 Mar 2007 11:12:07 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 583BD16A401 for ; Thu, 29 Mar 2007 11:12:07 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 498C513C457 for ; Thu, 29 Mar 2007 11:12:07 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l2TBC2Ix062514 for ; Thu, 29 Mar 2007 11:12:02 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l2TBC29m062507 for perforce@freebsd.org; Thu, 29 Mar 2007 11:12:02 GMT (envelope-from gonzo@FreeBSD.org) Date: Thu, 29 Mar 2007 11:12:02 GMT Message-Id: <200703291112.l2TBC29m062507@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 116824 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2007 11:12:08 -0000 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();