From 460f9521fcbc95986f355c8759d802c1bb100fe1 Mon Sep 17 00:00:00 2001 From: deraadt Date: Wed, 17 Dec 2014 15:05:52 +0000 Subject: [PATCH] pretty easy removal of simplelocks ok miod (a while back) --- sys/arch/mips64/include/pmap.h | 3 +-- sys/arch/mips64/mips64/pmap.c | 11 ++--------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/sys/arch/mips64/include/pmap.h b/sys/arch/mips64/include/pmap.h index b46018bf17c..88f7f3d3ae0 100644 --- a/sys/arch/mips64/include/pmap.h +++ b/sys/arch/mips64/include/pmap.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.h,v 1.36 2014/04/03 18:29:37 miod Exp $ */ +/* $OpenBSD: pmap.h,v 1.37 2014/12/17 15:05:52 deraadt Exp $ */ /* * Copyright (c) 1987 Carnegie-Mellon University @@ -111,7 +111,6 @@ struct pmap_asid_info { */ typedef struct pmap { int pm_count; /* pmap reference count */ - simple_lock_data_t pm_lock; /* lock on pmap */ struct pmap_statistics pm_stats; /* pmap statistics */ struct segtab *pm_segtab; /* pointers to pages of PTEs */ struct pmap_asid_info pm_asid[1]; /* ASID information */ diff --git a/sys/arch/mips64/mips64/pmap.c b/sys/arch/mips64/mips64/pmap.c index 97ee57ac8c8..d109ce4896d 100644 --- a/sys/arch/mips64/mips64/pmap.c +++ b/sys/arch/mips64/mips64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.77 2014/11/16 12:30:58 deraadt Exp $ */ +/* $OpenBSD: pmap.c,v 1.78 2014/12/17 15:05:54 deraadt Exp $ */ /* * Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -377,7 +377,6 @@ pmap_bootstrap(void) pool_init(&pmap_pg_pool, PMAP_L2SIZE, PMAP_L2SIZE, 0, 0, "pmappgpl", &pmap_pg_allocator); - simple_lock_init(&pmap_kernel()->pm_lock); pmap_kernel()->pm_count = 1; #ifndef CPU_R8000 @@ -511,7 +510,6 @@ extern struct user *proc0paddr; pmap = pool_get(&pmap_pmap_pool, PR_WAITOK | PR_ZERO); splx(s); - simple_lock_init(&pmap->pm_lock); pmap->pm_count = 1; pmap->pm_segtab = (struct segtab *)pool_get(&pmap_pg_pool, @@ -550,9 +548,7 @@ pmap_destroy(pmap_t pmap) DPRINTF(PDB_FOLLOW|PDB_CREATE, ("pmap_destroy(%p)\n", pmap)); - simple_lock(&pmap->pm_lock); count = --pmap->pm_count; - simple_unlock(&pmap->pm_lock); if (count > 0) return; @@ -599,11 +595,8 @@ pmap_reference(pmap_t pmap) DPRINTF(PDB_FOLLOW, ("pmap_reference(%p)\n", pmap)); - if (pmap) { - simple_lock(&pmap->pm_lock); + if (pmap) pmap->pm_count++; - simple_unlock(&pmap->pm_lock); - } } /* -- 2.20.1