From owner-p4-projects@FreeBSD.ORG Sun Mar 7 16:39:13 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CDCC116A4D0; Sun, 7 Mar 2004 16:39:12 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9FFD816A4CE for ; Sun, 7 Mar 2004 16:39:12 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7AA1443D1F for ; Sun, 7 Mar 2004 16:39:12 -0800 (PST) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i280dCGe043705 for ; Sun, 7 Mar 2004 16:39:12 -0800 (PST) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i280dCMD043702 for perforce@freebsd.org; Sun, 7 Mar 2004 16:39:12 -0800 (PST) (envelope-from jmallett@freebsd.org) Date: Sun, 7 Mar 2004 16:39:12 -0800 (PST) Message-Id: <200403080039.i280dCMD043702@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 48386 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2004 00:39:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=48386 Change 48386 by jmallett@jmallett_oingo on 2004/03/07 16:39:06 Catching up with boneheaded resolves. Affected files ... .. //depot/projects/mips/sys/mips/mips/pmap.c#30 edit Differences ... ==== //depot/projects/mips/sys/mips/mips/pmap.c#30 (text+ko) ==== @@ -298,45 +298,6 @@ LIST_INSERT_HEAD(&allpmaps, kernel_pmap, pm_list); } -/* - * Perform a small allocation for UMA, used early in the boot process - * and possibly at other times. - */ -void * -uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) -{ - static vm_pindex_t color; - vm_page_t m; - int pflags; - void *va; - - *flags = UMA_SLAB_PRIV; - - if ((wait & (M_NOWAIT|M_USE_RESERVE)) == M_NOWAIT) - pflags = VM_ALLOC_INTERRUPT; - else - pflags = VM_ALLOC_SYSTEM; - - if (wait & M_ZERO) - pflags |= VM_ALLOC_ZERO; - - for (;;) { - m = vm_page_alloc(NULL, color++, pflags | VM_ALLOC_NOOBJ); - if (m == NULL) { - if (wait & M_NOWAIT) - return (NULL); - else - VM_WAIT; - } else - break; - } - - va = (void *)MIPS_PHYS_TO_KSEG0(m->phys_addr); - if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0) - bzero(va, PAGE_SIZE); - return (va); -} - void * uma_small_alloc(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) { @@ -1202,37 +1163,8 @@ if (wired) pmap->pm_stats.wired_count++; -validate: - /* - * Now validate mapping with desired protection/wiring. - */ - newpte = pmap_phys_to_pte(pa) | pte_prot(pmap, prot) | PG_V | managed; - - if (managed) { - /* - * Set up referenced/modified emulation for the new - * mapping. Any old referenced/modified emulation - * results for the old mapping will have been recorded - * either in pmap_remove_pte() or above in the code - * which handles protection and/or wiring changes. - */ - newpte |= (PG_FOR | PG_FOW | PG_FOE); - } - - if (wired) - newpte |= PG_W; - - /* - * if the mapping or permission bits are different, we need - * to update the pte. - */ - if (origpte != newpte) { - *pte = newpte; - if (origpte) - pmap_invalidate_page(pmap, va); - if (prot & VM_PROT_EXECUTE) - alpha_pal_imb(); - } + wired = wired ? PG_W : 0; + tlb_enter(pmap, va, pa, PG_V | wired); } /*