Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Aug 2012 05:00:51 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r239170 - head/sys/mips/mips
Message-ID:  <201208100500.q7A50pQq094260@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: alc
Date: Fri Aug 10 05:00:50 2012
New Revision: 239170
URL: http://svn.freebsd.org/changeset/base/239170

Log:
  Merge r134393 from amd64/i386:
    The machine-independent parts of the virtual memory system always pass a
    valid pmap to the pmap functions that require one.  Remove the checks for
    NULL.  (These checks have their origins in the Mach pmap.c that was
    integrated into BSD.  None of the new code written specifically for
    FreeBSD included them.)

Modified:
  head/sys/mips/mips/pmap.c

Modified: head/sys/mips/mips/pmap.c
==============================================================================
--- head/sys/mips/mips/pmap.c	Fri Aug 10 04:48:58 2012	(r239169)
+++ head/sys/mips/mips/pmap.c	Fri Aug 10 05:00:50 2012	(r239170)
@@ -1588,9 +1588,6 @@ pmap_remove(struct pmap *pmap, vm_offset
 	pd_entry_t *pde, *pdpe;
 	pt_entry_t *pte;
 
-	if (pmap == NULL)
-		return;
-
 	if (pmap->pm_stats.resident_count == 0)
 		return;
 
@@ -1721,9 +1718,6 @@ pmap_protect(pmap_t pmap, vm_offset_t sv
 	pd_entry_t *pde, *pdpe;
 	vm_offset_t va_next;
 
-	if (pmap == NULL)
-		return;
-
 	if ((prot & VM_PROT_READ) == VM_PROT_NONE) {
 		pmap_remove(pmap, sva, eva);
 		return;
@@ -1806,9 +1800,6 @@ pmap_enter(pmap_t pmap, vm_offset_t va, 
 	vm_page_t mpte, om;
 	pt_entry_t rw = 0;
 
-	if (pmap == NULL)
-		return;
-
 	va &= ~PAGE_MASK;
  	KASSERT(va <= VM_MAX_KERNEL_ADDRESS, ("pmap_enter: toobig"));
 	KASSERT((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) != 0,
@@ -2251,9 +2242,6 @@ pmap_change_wiring(pmap_t pmap, vm_offse
 {
 	pt_entry_t *pte;
 
-	if (pmap == NULL)
-		return;
-
 	PMAP_LOCK(pmap);
 	pte = pmap_pte(pmap, va);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208100500.q7A50pQq094260>