From a695d9b25b9356d606ca739446616b250f8e267b Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 3 Aug 2014 20:40:51 +0000 Subject: Retire pmap_change_wiring(). We have never used it to wire virtual pages. We continue to use pmap_enter() for that. For unwiring virtual pages, we now use pmap_unwire(), which unwires a range of virtual addresses instead of a single virtual page. Sponsored by: EMC / Isilon Storage Division --- sys/i386/xen/pmap.c | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'sys/i386/xen') diff --git a/sys/i386/xen/pmap.c b/sys/i386/xen/pmap.c index 54ee3a6793bb..fbfdcf7a5cce 100644 --- a/sys/i386/xen/pmap.c +++ b/sys/i386/xen/pmap.c @@ -3166,39 +3166,6 @@ pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, vm_object_t object, } } -/* - * Routine: pmap_change_wiring - * Function: Change the wiring attribute for a map/virtual-address - * pair. - * In/out conditions: - * The mapping must already exist in the pmap. - */ -void -pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) -{ - pt_entry_t *pte; - - rw_wlock(&pvh_global_lock); - PMAP_LOCK(pmap); - pte = pmap_pte(pmap, va); - - if (wired && !pmap_pte_w(pte)) { - PT_SET_VA_MA((pte), *(pte) | PG_W, TRUE); - pmap->pm_stats.wired_count++; - } else if (!wired && pmap_pte_w(pte)) { - PT_SET_VA_MA((pte), *(pte) & ~PG_W, TRUE); - pmap->pm_stats.wired_count--; - } - - /* - * Wiring is not a hardware characteristic so there is no need to - * invalidate TLB. - */ - pmap_pte_release(pte); - PMAP_UNLOCK(pmap); - rw_wunlock(&pvh_global_lock); -} - /* * Clear the wired attribute from the mappings for the specified range of * addresses in the given pmap. Every valid mapping within that range -- cgit v1.2.3