diff options
Diffstat (limited to 'sys/ia64/ia64/pmap.c')
-rw-r--r-- | sys/ia64/ia64/pmap.c | 56 |
1 files changed, 4 insertions, 52 deletions
diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c index 78a1767..22e457f 100644 --- a/sys/ia64/ia64/pmap.c +++ b/sys/ia64/ia64/pmap.c @@ -166,7 +166,7 @@ MALLOC_DEFINE(M_PMAP, "PMAP", "PMAP Structures"); * Given a map and a machine independent protection code, * convert to an ia64 protection code. */ -#define pte_prot(m, p) (protection_codes[m == pmap_kernel() ? 0 : 1][p]) +#define pte_prot(m, p) (protection_codes[m == kernel_pmap ? 0 : 1][p]) #define pte_prot_pl(m, p) (pte_prot(m, p) & 3) #define pte_prot_ar(m, p) (pte_prot(m, p) >> 2) int protection_codes[2][8]; @@ -179,8 +179,7 @@ int protection_codes[2][8]; /* * Statically allocated kernel pmap */ -static struct pmap kernel_pmap_store; -pmap_t kernel_pmap; +struct pmap kernel_pmap_store; vm_offset_t avail_start; /* PA of first available physical page */ vm_offset_t avail_end; /* PA of last available physical page */ @@ -435,14 +434,10 @@ pmap_bootstrap() ia64_protection_init(); /* - * The kernel's pmap is statically allocated so we don't have to use - * pmap_create, which is unlikely to work correctly at this part of - * the boot sequence (XXX and which no longer exists). + * Initialize the kernel pmap (which is statically allocated). */ - kernel_pmap = &kernel_pmap_store; for (i = 0; i < 5; i++) kernel_pmap->pm_rid[i] = 0; - kernel_pmap->pm_count = 1; kernel_pmap->pm_active = 1; TAILQ_INIT(&kernel_pmap->pm_pvlist); PCPU_SET(current_pmap, kernel_pmap); @@ -824,7 +819,6 @@ pmap_pinit0(struct pmap *pmap) pmap->pm_flags = 0; for (i = 0; i < 5; i++) pmap->pm_rid[i] = 0; - pmap->pm_count = 1; pmap->pm_ptphint = NULL; pmap->pm_active = 0; TAILQ_INIT(&pmap->pm_pvlist); @@ -843,7 +837,6 @@ pmap_pinit(struct pmap *pmap) pmap->pm_flags = 0; for (i = 0; i < 5; i++) pmap->pm_rid[i] = 0; - pmap->pm_count = 1; pmap->pm_ptphint = NULL; pmap->pm_active = 0; TAILQ_INIT(&pmap->pm_pvlist); @@ -926,39 +919,8 @@ pmap_growkernel(vm_offset_t addr) } } -/* - * Retire the given physical map from service. - * Should only be called if the map contains - * no valid mappings. - */ -void -pmap_destroy(pmap_t pmap) -{ - int count; - - if (pmap == NULL) - return; - - count = --pmap->pm_count; - if (count == 0) { - pmap_release(pmap); - panic("destroying a pmap is not yet implemented"); - } -} - -/* - * Add a reference to the specified pmap. - */ -void -pmap_reference(pmap_t pmap) -{ - if (pmap != NULL) { - pmap->pm_count++; - } -} - /*************************************************** -* page management routines. + * page management routines. ***************************************************/ /* @@ -2095,16 +2057,6 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, { } -/* - * Routine: pmap_kernel - * Function: - * Returns the physical map handle for the kernel. - */ -pmap_t -pmap_kernel() -{ - return (kernel_pmap); -} /* * pmap_zero_page zeros the specified hardware page by |