From b3bdeb07d6c1c10ede5df379d4131cd009fb6e23 Mon Sep 17 00:00:00 2001 From: visa Date: Sat, 6 Jan 2018 06:30:11 +0000 Subject: [PATCH] Remove redundant zeroing and dead code. --- sys/arch/mips64/mips64/pmap.c | 30 +++--------------------------- 1 file 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); } -- 2.20.1