diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/alpha/include/pmap.h | 1 | ||||
-rw-r--r-- | sys/amd64/include/pmap.h | 1 | ||||
-rw-r--r-- | sys/i386/include/pmap.h | 1 | ||||
-rw-r--r-- | sys/ia64/include/pmap.h | 1 | ||||
-rw-r--r-- | sys/powerpc/include/pmap.h | 1 | ||||
-rw-r--r-- | sys/sparc64/include/pmap.h | 1 | ||||
-rw-r--r-- | sys/vm/pmap.h | 4 | ||||
-rw-r--r-- | sys/vm/vm_map.c | 6 | ||||
-rw-r--r-- | sys/vm/vm_map.h | 1 |
9 files changed, 11 insertions, 6 deletions
diff --git a/sys/alpha/include/pmap.h b/sys/alpha/include/pmap.h index b64cee8..9a1a647 100644 --- a/sys/alpha/include/pmap.h +++ b/sys/alpha/include/pmap.h @@ -183,7 +183,6 @@ struct pmap { }; #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) -#define pmap_resident_count(pmap) (pmap)->pm_stats.resident_count #define PM_FLAG_LOCKED 0x1 #define PM_FLAG_WANTED 0x2 diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index 2224b94..cc4608b 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -226,7 +226,6 @@ struct pmap { }; #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) -#define pmap_resident_count(pmap) (pmap)->pm_stats.resident_count typedef struct pmap *pmap_t; diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h index 62afddb..ceec564 100644 --- a/sys/i386/include/pmap.h +++ b/sys/i386/include/pmap.h @@ -292,7 +292,6 @@ struct pmap { }; #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) -#define pmap_resident_count(pmap) (pmap)->pm_stats.resident_count typedef struct pmap *pmap_t; diff --git a/sys/ia64/include/pmap.h b/sys/ia64/include/pmap.h index d14e4b8..976faa8 100644 --- a/sys/ia64/include/pmap.h +++ b/sys/ia64/include/pmap.h @@ -83,7 +83,6 @@ struct pmap { }; #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) -#define pmap_resident_count(pmap) (pmap)->pm_stats.resident_count #define PM_FLAG_LOCKED 0x1 #define PM_FLAG_WANTED 0x2 diff --git a/sys/powerpc/include/pmap.h b/sys/powerpc/include/pmap.h index e737fad..98f354d 100644 --- a/sys/powerpc/include/pmap.h +++ b/sys/powerpc/include/pmap.h @@ -64,7 +64,6 @@ extern struct pmap kernel_pmap_store; #define kernel_pmap (&kernel_pmap_store) #define pmap_page_is_mapped(m) (!LIST_EMPTY(&(m)->md.mdpg_pvoh)) -#define pmap_resident_count(pm) (pm->pm_stats.resident_count) #ifdef _KERNEL diff --git a/sys/sparc64/include/pmap.h b/sys/sparc64/include/pmap.h index c0c20df..b6681e1 100644 --- a/sys/sparc64/include/pmap.h +++ b/sys/sparc64/include/pmap.h @@ -50,7 +50,6 @@ #define PMAP_CONTEXT_MAX 8192 #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.tte_list)) -#define pmap_resident_count(pm) (pm->pm_stats.resident_count) typedef struct pmap *pmap_t; diff --git a/sys/vm/pmap.h b/sys/vm/pmap.h index a6eff6ef..7adfa75 100644 --- a/sys/vm/pmap.h +++ b/sys/vm/pmap.h @@ -136,5 +136,9 @@ void pmap_activate(struct thread *td); vm_offset_t pmap_addr_hint(vm_object_t obj, vm_offset_t addr, vm_size_t size); void *pmap_kenter_temporary(vm_offset_t pa, int i); void pmap_init2(void); + +#define pmap_resident_count(pm) ((pm)->pm_stats.resident_count) +#define pmap_wired_count(pm) ((pm)->pm_stats.wired_count) + #endif /* _KERNEL */ #endif /* _PMAP_VM_ */ diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 4492f9b..6ae9edd 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -477,6 +477,12 @@ vmspace_resident_count(struct vmspace *vmspace) return pmap_resident_count(vmspace_pmap(vmspace)); } +long +vmspace_wired_count(struct vmspace *vmspace) +{ + return pmap_wired_count(vmspace_pmap(vmspace)); +} + /* * vm_map_create: * diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index d1aff1f..1a510d1 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -283,6 +283,7 @@ void vm_map_wakeup(vm_map_t map); _vm_map_lock_downgrade(map, LOCK_FILE, LOCK_LINE) long vmspace_resident_count(struct vmspace *vmspace); +long vmspace_wired_count(struct vmspace *vmspace); #endif /* _KERNEL */ |