From 83e3f6ad3e2e5e962f2737a0061a57b5c8cecda5 Mon Sep 17 00:00:00 2001 From: Kip Macy Date: Sun, 24 Dec 2006 01:56:35 +0000 Subject: [PATCH] - resizing the tte_hash in pmap_copy is not likely to occur - the implementation also made the mistake of assuming the dst_pmap is the current pmap --- sys/sun4v/sun4v/pmap.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/sys/sun4v/sun4v/pmap.c b/sys/sun4v/sun4v/pmap.c index 20651ce7904..e277a089884 100644 --- a/sys/sun4v/sun4v/pmap.c +++ b/sys/sun4v/sun4v/pmap.c @@ -972,7 +972,6 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_offset_t addr, end_addr; end_addr = src_addr + len; - /* * Don't let optional prefaulting of pages make us go * way below the low water mark of free pages or way @@ -1008,14 +1007,14 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, } } } - PMAP_UNLOCK(src_pmap); - - if (tte_hash_needs_resize(dst_pmap->pm_hash)) - pmap_tte_hash_resize(dst_pmap); sched_unpin(); vm_page_unlock_queues(); + PMAP_UNLOCK(src_pmap); PMAP_UNLOCK(dst_pmap); + + + } void @@ -1584,6 +1583,7 @@ pmap_invalidate_all(pmap_t pmap) boolean_t pmap_is_modified(vm_page_t m) { + return (tte_get_phys_bit(m, VTD_W)); } @@ -1827,6 +1827,11 @@ pmap_qenter(vm_offset_t sva, vm_page_t *m, int count) va = sva; while (count-- > 0) { + /* + * If we make explicit calls to tte_hash_update + * we can determine if any of the pages have been mapped + * before - this can save us a pmap_invalidate_range + */ pmap_kenter(va, VM_PAGE_TO_PHYS(*m)); va += PAGE_SIZE; m++;