Move pmap_resident_count() from the MD pmap.h to the MI pmap.h.

Add a definition of pmap_wired_count().
Add a definition of vmspace_wired_count().

Reviewed by:	truckman
Discussed with:	peter
This commit is contained in:
bms 2003-10-06 01:47:12 +00:00
parent 1ac708bd28
commit d8d01a1fa7
9 changed files with 11 additions and 6 deletions

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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_ */

View File

@ -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:
*

View File

@ -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 */