summaryrefslogtreecommitdiff
path: root/sys/arch/arm
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-02-03 16:48:24 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-02-03 16:48:24 +0000
commit03be750656a93b86cb10dd6f837caa84ba6a9acd (patch)
treef9013b29fe2fe3e07e461272a9026d79c8574b8b /sys/arch/arm
parentd7cf6ffdf47ce2a23c432949e376688ca2eedfb8 (diff)
Remove unused functionality from lockmgr():
- LK_EXCLUPGRADE is never used. - LK_REENABLE is never used. - LK_SETRECURSE is never used. Because of this, the lk_recurselevel field is always zero, so it can be removed to. - the spinlock version (and LK_SPIN) is never used, since it was decided to use different locking structure for MP-safe protection. Tested by many
Diffstat (limited to 'sys/arch/arm')
-rw-r--r--sys/arch/arm/arm/pmap.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/sys/arch/arm/arm/pmap.c b/sys/arch/arm/arm/pmap.c
index 42aaa0a0dc7..6f234a8f70b 100644
--- a/sys/arch/arm/arm/pmap.c
+++ b/sys/arch/arm/arm/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.8 2006/05/26 17:11:40 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.9 2007/02/03 16:48:23 miod Exp $ */
/* $NetBSD: pmap.c,v 1.147 2004/01/18 13:03:50 scw Exp $ */
/*
@@ -311,23 +311,10 @@ boolean_t pmap_initialized;
* Misc. locking data structures
*/
-#if defined(MULTIPROCESSOR) || defined(LOCKDEBUG)
-static struct lock pmap_main_lock;
-
-#define PMAP_MAP_TO_HEAD_LOCK() \
- (void) spinlockmgr(&pmap_main_lock, LK_SHARED, NULL)
-#define PMAP_MAP_TO_HEAD_UNLOCK() \
- (void) spinlockmgr(&pmap_main_lock, LK_RELEASE, NULL)
-#define PMAP_HEAD_TO_MAP_LOCK() \
- (void) spinlockmgr(&pmap_main_lock, LK_EXCLUSIVE, NULL)
-#define PMAP_HEAD_TO_MAP_UNLOCK() \
- spinlockmgr(&pmap_main_lock, LK_RELEASE, (void *) 0)
-#else
#define PMAP_MAP_TO_HEAD_LOCK() /* null */
#define PMAP_MAP_TO_HEAD_UNLOCK() /* null */
#define PMAP_HEAD_TO_MAP_LOCK() /* null */
#define PMAP_HEAD_TO_MAP_UNLOCK() /* null */
-#endif
#define pmap_acquire_pmap_lock(pm) \
do { \
@@ -695,7 +682,6 @@ do { \
/*
* pmap_enter_pv: enter a mapping onto a vm_page lst
*
- * => caller should hold the proper lock on pmap_main_lock
* => caller should have pmap locked
* => we will gain the lock on the vm_page and allocate the new pv_entry
* => caller should adjust ptp's wire_count before calling
@@ -755,7 +741,6 @@ pmap_find_pv(struct vm_page *pg, pmap_t pm, vaddr_t va)
/*
* pmap_remove_pv: try to remove a mapping from a pv_list
*
- * => caller should hold proper lock on pmap_main_lock
* => pmap should be locked
* => caller should hold lock on vm_page [so that attrs can be adjusted]
* => caller should adjust ptp's wire_count and free PTP if needed
@@ -3966,13 +3951,6 @@ pmap_bootstrap(pd_entry_t *kernel_l1pt, vaddr_t vstart, vaddr_t vend)
&pmap_kernel_l2dtable_kva, NULL);
/*
- * init the static-global locks and global pmap list.
- */
-#if defined(MULTIPROCESSOR) || defined(LOCKDEBUG)
- spinlockinit(&pmap_main_lock, "pmaplk", 0);
-#endif
-
- /*
* We can now initialise the first L1's metadata.
*/
SLIST_INIT(&l1_list);