Remove redundant zeroing and dead code.
authorvisa <visa@openbsd.org>
Sat, 6 Jan 2018 06:30:11 +0000 (06:30 +0000)
committervisa <visa@openbsd.org>
Sat, 6 Jan 2018 06:30:11 +0000 (06:30 +0000)
sys/arch/mips64/mips64/pmap.c

index aed2136..7ff4988 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: pmap.c,v 1.107 2017/08/25 13:28:31 visa Exp $ */
+/*     $OpenBSD: pmap.c,v 1.108 2018/01/06 06:30:11 visa Exp $ */
 
 /*
  * Copyright (c) 2001-2004 Opsycon AB  (www.opsycon.se / www.opsycon.com)
@@ -502,37 +502,13 @@ pmap_t
 pmap_create()
 {
        pmap_t pmap;
-       int i;
-
-extern struct vmspace vmspace0;
-extern struct user *proc0paddr;
 
        DPRINTF(PDB_FOLLOW|PDB_CREATE, ("pmap_create()\n"));
 
        pmap = pool_get(&pmap_pmap_pool, PR_WAITOK | PR_ZERO);
-
-       mtx_init(&pmap->pm_mtx, IPL_VM);
-       pmap->pm_count = 1;
-
        pmap->pm_segtab = pool_get(&pmap_pg_pool, PR_WAITOK | PR_ZERO);
-
-       if (pmap == vmspace0.vm_map.pmap) {
-               /*
-                * The initial process has already been allocated a TLBPID
-                * in mips_init().
-                */
-               for (i = 0; i < ncpusfound; i++) {
-                       pmap->pm_asid[i].pma_asid = MIN_USER_ASID;
-                       pmap->pm_asid[i].pma_asidgen =
-                               pmap_asid_info[i].pma_asidgen;
-               }
-               proc0paddr->u_pcb.pcb_segtab = pmap->pm_segtab;
-       } else {
-               for (i = 0; i < ncpusfound; i++) {
-                       pmap->pm_asid[i].pma_asid = 0;
-                       pmap->pm_asid[i].pma_asidgen = 0;
-               }
-       }
+       pmap->pm_count = 1;
+       mtx_init(&pmap->pm_mtx, IPL_VM);
 
        return (pmap);
 }