-/* $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
*/
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 */
-/* $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)
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
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,
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;
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);
- }
}
/*