From 38f612e0531a72240dda92f87214350fe2c7e949 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 10 Aug 2002 18:01:39 +0000 Subject: [PATCH] o Remove the setting and clearing of the PG_MAPPED flag from the alpha and ia64 pmap. o Remove the PG_MAPPED flag's declaration. --- sys/alpha/alpha/pmap.c | 12 ++++-------- sys/ia64/ia64/pmap.c | 7 ++----- sys/vm/vm_page.h | 1 - 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/sys/alpha/alpha/pmap.c b/sys/alpha/alpha/pmap.c index 5f7c85e1058d..bcfe2c0b4c63 100644 --- a/sys/alpha/alpha/pmap.c +++ b/sys/alpha/alpha/pmap.c @@ -1227,7 +1227,7 @@ pmap_pinit(pmap) lev1pg->wire_count = 1; ++cnt.v_wire_count; - vm_page_flag_clear(lev1pg, PG_MAPPED | PG_BUSY); /* not mapped normally */ + vm_page_flag_clear(lev1pg, PG_BUSY); lev1pg->valid = VM_PAGE_BITS_ALL; pmap->pm_lev1 = (pt_entry_t*) ALPHA_PHYS_TO_K0SEG(VM_PAGE_TO_PHYS(lev1pg)); @@ -1402,7 +1402,6 @@ _pmap_allocpte(pmap, ptepindex) m->valid = VM_PAGE_BITS_ALL; vm_page_flag_clear(m, PG_ZERO); - vm_page_flag_set(m, PG_MAPPED); vm_page_wakeup(m); return m; @@ -1702,7 +1701,7 @@ pmap_remove_entry(pmap_t pmap, vm_page_t m, vm_offset_t va) TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); m->md.pv_list_count--; if (TAILQ_FIRST(&m->md.pv_list) == NULL) - vm_page_flag_clear(m, PG_MAPPED | PG_WRITEABLE); + vm_page_flag_clear(m, PG_WRITEABLE); TAILQ_REMOVE(&pmap->pm_pvlist, pv, pv_plist); free_pv_entry(pv); @@ -1901,7 +1900,7 @@ pmap_remove_all(vm_page_t m) free_pv_entry(pv); } - vm_page_flag_clear(m, PG_MAPPED | PG_WRITEABLE); + vm_page_flag_clear(m, PG_WRITEABLE); splx(s); } @@ -2316,7 +2315,6 @@ pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, mpte = pmap_enter_quick(pmap, addr + alpha_ptob(tmpidx), p, mpte); vm_page_lock_queues(); - vm_page_flag_set(p, PG_MAPPED); vm_page_wakeup(p); } vm_page_unlock_queues(); @@ -2349,7 +2347,6 @@ pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, mpte = pmap_enter_quick(pmap, addr + alpha_ptob(tmpidx), p, mpte); vm_page_lock_queues(); - vm_page_flag_set(p, PG_MAPPED); vm_page_wakeup(p); } vm_page_unlock_queues(); @@ -2448,7 +2445,6 @@ pmap_prefault(pmap, addra, entry) vm_page_unlock_queues(); mpte = pmap_enter_quick(pmap, addr, m, mpte); vm_page_lock_queues(); - vm_page_flag_set(m, PG_MAPPED); vm_page_wakeup(m); } vm_page_unlock_queues(); @@ -2687,7 +2683,7 @@ pmap_remove_pages(pmap, sva, eva) m->md.pv_list_count--; TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); if (TAILQ_FIRST(&m->md.pv_list) == NULL) { - vm_page_flag_clear(m, PG_MAPPED | PG_WRITEABLE); + vm_page_flag_clear(m, PG_WRITEABLE); } pmap_unuse_pt(pv->pv_pmap, pv->pv_va, pv->pv_ptem); diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c index 1107e1c16ede..202a9b3785bc 100644 --- a/sys/ia64/ia64/pmap.c +++ b/sys/ia64/ia64/pmap.c @@ -1061,7 +1061,7 @@ pmap_remove_entry(pmap_t pmap, vm_page_t m, vm_offset_t va, pv_entry_t pv) TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); m->md.pv_list_count--; if (TAILQ_FIRST(&m->md.pv_list) == NULL) - vm_page_flag_clear(m, PG_MAPPED | PG_WRITEABLE); + vm_page_flag_clear(m, PG_WRITEABLE); TAILQ_REMOVE(&pmap->pm_pvlist, pv, pv_plist); free_pv_entry(pv); @@ -1503,7 +1503,7 @@ pmap_remove_all(vm_page_t m) pmap_install(oldpmap); } - vm_page_flag_clear(m, PG_MAPPED | PG_WRITEABLE); + vm_page_flag_clear(m, PG_WRITEABLE); splx(s); return; @@ -1830,7 +1830,6 @@ pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, pmap_enter_quick(pmap, addr + ia64_ptob(tmpidx), p); vm_page_lock_queues(); - vm_page_flag_set(p, PG_MAPPED); vm_page_wakeup(p); } vm_page_unlock_queues(); @@ -1863,7 +1862,6 @@ pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, pmap_enter_quick(pmap, addr + ia64_ptob(tmpidx), p); vm_page_lock_queues(); - vm_page_flag_set(p, PG_MAPPED); vm_page_wakeup(p); } vm_page_unlock_queues(); @@ -1959,7 +1957,6 @@ pmap_prefault(pmap, addra, entry) vm_page_unlock_queues(); pmap_enter_quick(pmap, addr, m); vm_page_lock_queues(); - vm_page_flag_set(m, PG_MAPPED); vm_page_wakeup(m); } vm_page_unlock_queues(); diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index bd44012e5b61..46de831ce633 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -237,7 +237,6 @@ extern struct mtx vm_page_queue_free_mtx; #define PG_WINATCFLS 0x0004 /* flush dirty page on inactive q */ #define PG_FICTITIOUS 0x0008 /* physical page doesn't exist (O) */ #define PG_WRITEABLE 0x0010 /* page is mapped writeable */ -#define PG_MAPPED 0x0020 /* page is mapped */ #define PG_ZERO 0x0040 /* page is zeroed */ #define PG_REFERENCED 0x0080 /* page has been referenced */ #define PG_CLEANCHK 0x0100 /* page will be checked for cleaning */