Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/i386 Nothing calls pmap_pinit() except for pma...



details:   https://anonhg.NetBSD.org/src/rev/b87c66e8d562
branches:  trunk
changeset: 500182:b87c66e8d562
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Dec 07 17:09:26 2000 +0000

description:
Nothing calls pmap_pinit() except for pmap_create(), so merge the two.

diffstat:

 sys/arch/i386/i386/pmap.c |  22 ++++++----------------
 1 files changed, 6 insertions(+), 16 deletions(-)

diffs (64 lines):

diff -r 617694477acd -r b87c66e8d562 sys/arch/i386/i386/pmap.c
--- a/sys/arch/i386/i386/pmap.c Thu Dec 07 16:14:35 2000 +0000
+++ b/sys/arch/i386/i386/pmap.c Thu Dec 07 17:09:26 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.111 2000/11/24 03:59:08 chs Exp $   */
+/*     $NetBSD: pmap.c,v 1.112 2000/12/07 17:09:26 thorpej Exp $       */
 
 /*
  *
@@ -134,7 +134,7 @@
  *  - there are three data structures that we must dynamically allocate:
  *
  * [A] new process' page directory page (PDP)
- *     - plan 1: done at pmap_pinit() we use
+ *     - plan 1: done at pmap_create() we use
  *       uvm_km_alloc(kernel_map, PAGE_SIZE)  [fka kmem_alloc] to do this
  *       allocation.
  *
@@ -428,7 +428,6 @@
                                                struct pv_entry *));
 static void            pmap_unmap_ptes __P((struct pmap *));
 
-void                   pmap_pinit __P((pmap_t));
 void                   pmap_release __P((pmap_t));
 
 /*
@@ -1727,18 +1726,7 @@
        struct pmap *pmap;
 
        pmap = pool_get(&pmap_pmap_pool, PR_WAITOK);
-       pmap_pinit(pmap);
-       return(pmap);
-}
-
-/*
- * pmap_pinit: given a zero'd pmap structure, init it.
- */
-
-void
-pmap_pinit(pmap)
-       struct pmap *pmap;
-{
+
        /* init uvm_object */
        simple_lock_init(&pmap->pm_obj.vmobjlock);
        pmap->pm_obj.pgops = NULL;      /* currently not a mappable object */
@@ -1753,7 +1741,7 @@
        /* allocate PDP */
        pmap->pm_pdir = (pd_entry_t *) uvm_km_alloc(kernel_map, PAGE_SIZE);
        if (pmap->pm_pdir == NULL)
-               panic("pmap_pinit: kernel_map out of virtual space!");
+               panic("pmap_create: kernel_map out of virtual space!");
        (void) pmap_extract(pmap_kernel(), (vaddr_t)pmap->pm_pdir,
                            (paddr_t *)&pmap->pm_pdirpa);
 
@@ -1783,6 +1771,8 @@
               PAGE_SIZE - ((PDSLOT_KERN + nkpde) * sizeof(pd_entry_t)));
        LIST_INSERT_HEAD(&pmaps, pmap, pm_list);
        simple_unlock(&pmaps_lock);
+
+       return (pmap);
 }
 
 /*



Home | Main Index | Thread Index | Old Index