summaryrefslogtreecommitdiff
path: root/sys/arch/mips64
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2018-01-06 06:30:12 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2018-01-06 06:30:12 +0000
commit545bc7394a38e41f37c8b10f24c9c387d4454835 (patch)
tree76f6bf3c5e5dad925a510a753caa995a3054803d /sys/arch/mips64
parent7b7696d6b5ec5f075ed3e0194354f22c3a042a22 (diff)
Remove redundant zeroing and dead code.
Diffstat (limited to 'sys/arch/mips64')
-rw-r--r--sys/arch/mips64/mips64/pmap.c30
1 files changed, 3 insertions, 27 deletions
diff --git a/sys/arch/mips64/mips64/pmap.c b/sys/arch/mips64/mips64/pmap.c
index aed2136d223..7ff4988bd27 100644
--- a/sys/arch/mips64/mips64/pmap.c
+++ b/sys/arch/mips64/mips64/pmap.c
@@ -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);
}