From owner-svn-src-all@FreeBSD.ORG Fri Jun 11 15:49:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C5A91065670; Fri, 11 Jun 2010 15:49:40 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 099E88FC0C; Fri, 11 Jun 2010 15:49:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o5BFndke019275; Fri, 11 Jun 2010 15:49:39 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5BFndXX019262; Fri, 11 Jun 2010 15:49:39 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201006111549.o5BFndXX019262@svn.freebsd.org> From: Alan Cox Date: Fri, 11 Jun 2010 15:49:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209048 - in head/sys: amd64/amd64 arm/arm i386/i386 i386/xen ia64/ia64 mips/mips powerpc/aim powerpc/booke sparc64/sparc64 sun4v/sun4v X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2010 15:49:40 -0000 Author: alc Date: Fri Jun 11 15:49:39 2010 New Revision: 209048 URL: http://svn.freebsd.org/changeset/base/209048 Log: Relax one of the new assertions in pmap_enter() a little. Specifically, allow pmap_enter() to be performed on an unmanaged page that doesn't have VPO_BUSY set. Having VPO_BUSY set really only matters for managed pages. (See, for example, pmap_remove_write().) Modified: head/sys/amd64/amd64/pmap.c head/sys/arm/arm/pmap.c head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c head/sys/ia64/ia64/pmap.c head/sys/mips/mips/pmap.c head/sys/powerpc/aim/mmu_oea.c head/sys/powerpc/aim/mmu_oea64.c head/sys/powerpc/booke/pmap.c head/sys/sparc64/sparc64/pmap.c head/sys/sun4v/sun4v/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Jun 11 15:26:15 2010 (r209047) +++ head/sys/amd64/amd64/pmap.c Fri Jun 11 15:49:39 2010 (r209048) @@ -3138,7 +3138,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, KASSERT(va < UPT_MIN_ADDRESS || va >= UPT_MAX_ADDRESS, ("pmap_enter: invalid to pmap_enter page table pages (va: 0x%lx)", va)); - KASSERT((m->oflags & VPO_BUSY) != 0, + KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 || + (m->oflags & VPO_BUSY) != 0, ("pmap_enter: page %p is not busy", m)); mpte = NULL; Modified: head/sys/arm/arm/pmap.c ============================================================================== --- head/sys/arm/arm/pmap.c Fri Jun 11 15:26:15 2010 (r209047) +++ head/sys/arm/arm/pmap.c Fri Jun 11 15:49:39 2010 (r209048) @@ -3326,7 +3326,8 @@ pmap_enter_locked(pmap_t pmap, vm_offset pa = systempage.pv_pa; m = NULL; } else { - KASSERT((m->oflags & VPO_BUSY) != 0 || (flags & M_NOWAIT) != 0, + KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 || + (m->oflags & VPO_BUSY) != 0 || (flags & M_NOWAIT) != 0, ("pmap_enter_locked: page %p is not busy", m)); pa = VM_PAGE_TO_PHYS(m); } Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Fri Jun 11 15:26:15 2010 (r209047) +++ head/sys/i386/i386/pmap.c Fri Jun 11 15:49:39 2010 (r209048) @@ -3267,7 +3267,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, KASSERT(va < UPT_MIN_ADDRESS || va >= UPT_MAX_ADDRESS, ("pmap_enter: invalid to pmap_enter page table pages (va: 0x%x)", va)); - KASSERT((m->oflags & VPO_BUSY) != 0, + KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 || + (m->oflags & VPO_BUSY) != 0, ("pmap_enter: page %p is not busy", m)); mpte = NULL; Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Fri Jun 11 15:26:15 2010 (r209047) +++ head/sys/i386/xen/pmap.c Fri Jun 11 15:49:39 2010 (r209048) @@ -2673,7 +2673,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, KASSERT(va < UPT_MIN_ADDRESS || va >= UPT_MAX_ADDRESS, ("pmap_enter: invalid to pmap_enter page table pages (va: 0x%x)", va)); - KASSERT((m->oflags & VPO_BUSY) != 0, + KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 || + (m->oflags & VPO_BUSY) != 0, ("pmap_enter: page %p is not busy", m)); mpte = NULL; Modified: head/sys/ia64/ia64/pmap.c ============================================================================== --- head/sys/ia64/ia64/pmap.c Fri Jun 11 15:26:15 2010 (r209047) +++ head/sys/ia64/ia64/pmap.c Fri Jun 11 15:49:39 2010 (r209048) @@ -1498,7 +1498,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, va &= ~PAGE_MASK; KASSERT(va <= VM_MAX_KERNEL_ADDRESS, ("pmap_enter: toobig")); - KASSERT((m->oflags & VPO_BUSY) != 0, + KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 || + (m->oflags & VPO_BUSY) != 0, ("pmap_enter: page %p is not busy", m)); /* Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Fri Jun 11 15:26:15 2010 (r209047) +++ head/sys/mips/mips/pmap.c Fri Jun 11 15:49:39 2010 (r209048) @@ -1748,7 +1748,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, va &= ~PAGE_MASK; KASSERT(va <= VM_MAX_KERNEL_ADDRESS, ("pmap_enter: toobig")); - KASSERT((m->oflags & VPO_BUSY) != 0, + KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 || + (m->oflags & VPO_BUSY) != 0, ("pmap_enter: page %p is not busy", m)); mpte = NULL; Modified: head/sys/powerpc/aim/mmu_oea.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea.c Fri Jun 11 15:26:15 2010 (r209047) +++ head/sys/powerpc/aim/mmu_oea.c Fri Jun 11 15:49:39 2010 (r209048) @@ -1102,7 +1102,8 @@ moea_enter_locked(pmap_t pmap, vm_offset if (pmap_bootstrapped) mtx_assert(&vm_page_queue_mtx, MA_OWNED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - KASSERT((m->oflags & VPO_BUSY) != 0 || VM_OBJECT_LOCKED(m->object), + KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 || + (m->oflags & VPO_BUSY) != 0 || VM_OBJECT_LOCKED(m->object), ("moea_enter_locked: page %p is not busy", m)); /* XXX change the pvo head for fake pages */ Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Fri Jun 11 15:26:15 2010 (r209047) +++ head/sys/powerpc/aim/mmu_oea64.c Fri Jun 11 15:49:39 2010 (r209048) @@ -1235,7 +1235,8 @@ moea64_enter_locked(pmap_t pmap, vm_offs if (pmap_bootstrapped) mtx_assert(&vm_page_queue_mtx, MA_OWNED); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - KASSERT((m->oflags & VPO_BUSY) != 0 || VM_OBJECT_LOCKED(m->object), + KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 || + (m->oflags & VPO_BUSY) != 0 || VM_OBJECT_LOCKED(m->object), ("moea64_enter_locked: page %p is not busy", m)); /* XXX change the pvo head for fake pages */ Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Fri Jun 11 15:26:15 2010 (r209047) +++ head/sys/powerpc/booke/pmap.c Fri Jun 11 15:49:39 2010 (r209048) @@ -1558,7 +1558,8 @@ mmu_booke_enter_locked(mmu_t mmu, pmap_t KASSERT((va <= VM_MAXUSER_ADDRESS), ("mmu_booke_enter_locked: user pmap, non user va")); } - KASSERT((m->oflags & VPO_BUSY) != 0 || VM_OBJECT_LOCKED(m->object), + KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 || + (m->oflags & VPO_BUSY) != 0 || VM_OBJECT_LOCKED(m->object), ("mmu_booke_enter_locked: page %p is not busy", m)); PMAP_LOCK_ASSERT(pmap, MA_OWNED); Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Fri Jun 11 15:26:15 2010 (r209047) +++ head/sys/sparc64/sparc64/pmap.c Fri Jun 11 15:49:39 2010 (r209048) @@ -1351,7 +1351,8 @@ pmap_enter_locked(pmap_t pm, vm_offset_t mtx_assert(&vm_page_queue_mtx, MA_OWNED); PMAP_LOCK_ASSERT(pm, MA_OWNED); - KASSERT((m->oflags & VPO_BUSY) != 0 || VM_OBJECT_LOCKED(m->object), + KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 || + (m->oflags & VPO_BUSY) != 0 || VM_OBJECT_LOCKED(m->object), ("pmap_enter_locked: page %p is not busy", m)); PMAP_STATS_INC(pmap_nenter); pa = VM_PAGE_TO_PHYS(m); Modified: head/sys/sun4v/sun4v/pmap.c ============================================================================== --- head/sys/sun4v/sun4v/pmap.c Fri Jun 11 15:26:15 2010 (r209047) +++ head/sys/sun4v/sun4v/pmap.c Fri Jun 11 15:49:39 2010 (r209048) @@ -1084,7 +1084,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t om; int invlva; - KASSERT((m->oflags & VPO_BUSY) != 0, + KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 || + (m->oflags & VPO_BUSY) != 0, ("pmap_enter: page %p is not busy", m)); if (pmap->pm_context) DPRINTF("pmap_enter(va=%lx, pa=0x%lx, prot=%x)\n", va,