summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-05-26 17:11:42 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-05-26 17:11:42 +0000
commit1ea23f97b9a6fd2a55e649fe34b447a8e664227f (patch)
tree1d60cc08d439c7b588fa9175e311a4eae1f4cc50 /sys/arch
parentd7076213241a019fd302b8028dd1941a736f58bd (diff)
No need to have a struct uvm_object in each pmap when all you want is a
lock and a reference count. No functional change.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/arm/arm/pmap.c16
-rw-r--r--sys/arch/arm/include/pmap.h7
2 files changed, 8 insertions, 15 deletions
diff --git a/sys/arch/arm/arm/pmap.c b/sys/arch/arm/arm/pmap.c
index def0947639e..42aaa0a0dc7 100644
--- a/sys/arch/arm/arm/pmap.c
+++ b/sys/arch/arm/arm/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.7 2006/05/26 17:06:39 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.8 2006/05/26 17:11:40 miod Exp $ */
/* $NetBSD: pmap.c,v 1.147 2004/01/18 13:03:50 scw Exp $ */
/*
@@ -1905,10 +1905,7 @@ pmap_create(void)
pm = pool_cache_get(&pmap_pmap_cache, PR_WAITOK);
simple_lock_init(&pm->pm_lock);
- pm->pm_obj.pgops = NULL; /* currently not a mappable object */
- TAILQ_INIT(&pm->pm_obj.memq);
- pm->pm_obj.uo_npages = 0;
- pm->pm_obj.uo_refs = 1;
+ pm->pm_refs = 1;
pm->pm_stats.wired_count = 0;
pm->pm_stats.resident_count = 1;
pm->pm_cstate.cs_all = 0;
@@ -3191,7 +3188,7 @@ pmap_destroy(pmap_t pm)
* Drop reference count
*/
simple_lock(&pm->pm_lock);
- count = --pm->pm_obj.uo_refs;
+ count = --pm->pm_refs;
simple_unlock(&pm->pm_lock);
if (count > 0) {
if (pmap_is_current(pm)) {
@@ -3261,7 +3258,7 @@ pmap_reference(pmap_t pm)
pmap_use_l1(pm);
simple_lock(&pm->pm_lock);
- pm->pm_obj.uo_refs++;
+ pm->pm_refs++;
simple_unlock(&pm->pm_lock);
}
@@ -3846,10 +3843,7 @@ pmap_bootstrap(pd_entry_t *kernel_l1pt, vaddr_t vstart, vaddr_t vend)
pm->pm_domain = PMAP_DOMAIN_KERNEL;
pm->pm_cstate.cs_all = PMAP_CACHE_STATE_ALL;
simple_lock_init(&pm->pm_lock);
- pm->pm_obj.pgops = NULL;
- TAILQ_INIT(&pm->pm_obj.memq);
- pm->pm_obj.uo_npages = 0;
- pm->pm_obj.uo_refs = 1;
+ pm->pm_refs = 1;
/*
* Scan the L1 translation table created by initarm() and create
diff --git a/sys/arch/arm/include/pmap.h b/sys/arch/arm/include/pmap.h
index 2c979015165..bf8cff16d6b 100644
--- a/sys/arch/arm/include/pmap.h
+++ b/sys/arch/arm/include/pmap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.h,v 1.4 2005/11/09 18:08:37 martin Exp $ */
+/* $OpenBSD: pmap.h,v 1.5 2006/05/26 17:11:41 miod Exp $ */
/* $NetBSD: pmap.h,v 1.76 2003/09/06 09:10:46 rearnsha Exp $ */
/*
@@ -75,7 +75,6 @@
#include <arm/pte.h>
#ifndef _LOCORE
#include <arm/cpufunc.h>
-#include <uvm/uvm_object.h>
#endif
/*
@@ -174,8 +173,8 @@ struct pmap {
boolean_t pm_remove_all;
struct l1_ttable *pm_l1;
union pmap_cache_state pm_cstate;
- struct uvm_object pm_obj;
-#define pm_lock pm_obj.vmobjlock
+ u_int pm_refs;
+ simple_lock_data_t pm_lock;
struct l2_dtable *pm_l2[L2_SIZE];
struct pmap_statistics pm_stats;
LIST_ENTRY(pmap) pm_list;