diff options
Diffstat (limited to 'sys/sparc64/include')
-rw-r--r-- | sys/sparc64/include/pmap.h | 14 | ||||
-rw-r--r-- | sys/sparc64/include/pv.h | 16 | ||||
-rw-r--r-- | sys/sparc64/include/tte.h | 8 |
3 files changed, 11 insertions, 27 deletions
diff --git a/sys/sparc64/include/pmap.h b/sys/sparc64/include/pmap.h index 8034d5d2e06a..7af32d6ce0b0 100644 --- a/sys/sparc64/include/pmap.h +++ b/sys/sparc64/include/pmap.h @@ -54,14 +54,10 @@ #define pmap_resident_count(pm) (pm->pm_stats.resident_count) -struct pv_entry; - typedef struct pmap *pmap_t; -typedef struct pv_entry *pv_entry_t; struct md_page { - TAILQ_HEAD(, pv_entry) pv_list; - int pv_list_count; + STAILQ_HEAD(, tte) tte_list; int colors[DCACHE_COLORS]; }; @@ -73,14 +69,6 @@ struct pmap { struct pmap_statistics pm_stats; }; -struct pv_entry { - TAILQ_ENTRY(pv_entry) pv_list; - TAILQ_ENTRY(pv_entry) pv_plist; - pmap_t pv_pmap; - vm_offset_t pv_va; - vm_page_t pv_m; -}; - void pmap_bootstrap(vm_offset_t ekva); void pmap_context_rollover(void); vm_offset_t pmap_kextract(vm_offset_t va); diff --git a/sys/sparc64/include/pv.h b/sys/sparc64/include/pv.h index 96b2b89939f3..5d977d794c0c 100644 --- a/sys/sparc64/include/pv.h +++ b/sys/sparc64/include/pv.h @@ -40,20 +40,10 @@ #ifndef _MACHINE_PV_H_ #define _MACHINE_PV_H_ -extern uma_zone_t pvzone; -extern struct vm_object pvzone_obj; -extern int pv_entry_count; -extern int pv_entry_max; -extern int pv_entry_high_water; -extern struct pv_entry *pvinit; +struct tte; -void *pv_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait); -pv_entry_t pv_alloc(void); -void pv_free(pv_entry_t pv); - -void pv_insert(pmap_t pm, vm_page_t m, vm_offset_t va); -pv_entry_t pv_lookup(pmap_t pm, vm_page_t m, vm_offset_t va); -void pv_remove(pmap_t pm, vm_page_t m, vm_offset_t va); +void pv_insert(pmap_t pm, vm_page_t m, struct tte *tp); +void pv_remove(pmap_t pm, vm_page_t m, struct tte *tp); int pv_page_exists(pmap_t pm, vm_page_t m); void pv_remove_all(vm_page_t m); diff --git a/sys/sparc64/include/tte.h b/sys/sparc64/include/tte.h index 39e85afde685..22f7c1061270 100644 --- a/sys/sparc64/include/tte.h +++ b/sys/sparc64/include/tte.h @@ -32,7 +32,7 @@ #ifndef _MACHINE_TTE_H_ #define _MACHINE_TTE_H_ -#define TTE_SHIFT (4) +#define TTE_SHIFT (5) #define TD_SIZE_SHIFT (61) #define TD_SOFT2_SHIFT (50) @@ -98,10 +98,16 @@ (((tp)->tte_data & TD_EXEC) ? (TLB_DTLB | TLB_ITLB) : TLB_DTLB) #define TTE_GET_VA(tp) \ ((tp)->tte_vpn << PAGE_SHIFT) +#define TTE_GET_PMAP(tp) \ + ((tp)->tte_pmap) +#define TTE_ZERO(tp) \ + bzero(tp, sizeof(*tp)) struct tte { u_long tte_vpn; u_long tte_data; + STAILQ_ENTRY(tte) tte_link; + struct pmap *tte_pmap; }; static __inline int |