PERFORCE change 132377 for review
Warner Losh
imp at FreeBSD.org
Wed Jan 2 23:05:08 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=132377
Change 132377 by imp at imp_paco-paco on 2008/01/03 07:04:33
Remove sva, eva parameters from pmap_remove_pages. Remove unused
rouine. Make decl for pmap_init_fpage() dependent on
VM_ALLOC_WIRED_TLB_PG_POOL.
Affected files ...
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#11 edit
Differences ...
==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#11 (text+ko) ====
@@ -181,7 +181,9 @@
static int init_pte_prot(vm_offset_t va, vm_page_t m, vm_prot_t prot);
static void pmap_TLB_invalidate_kernel(vm_offset_t);
static void pmap_TLB_update_kernel(vm_offset_t, pt_entry_t);
+#ifdef VM_ALLOC_WIRED_TLB_PG_POOL
static void pmap_init_fpage(void);
+#endif
#ifdef SMP
static void pmap_invalidate_page_action(void *arg);
static void pmap_invalidate_all_action(void *arg);
@@ -2121,31 +2123,6 @@
}
}
-/*
- * this routine returns true if a physical page resides
- * in the given pmap.
- */
-static boolean_t
-pmap_page_exists(pmap_t pmap, vm_page_t m)
-{
- register pv_entry_t pv;
-
- if (m->flags & PG_FICTITIOUS)
- return FALSE;
-
- mtx_assert(&vm_page_queue_mtx, MA_OWNED);
- /*
- * Not found, check current mappings returning immediately if found.
- */
- TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) {
- if (pv->pv_pmap == pmap) {
- return TRUE;
- }
- }
- return (FALSE);
-}
-/* N/C */
-
#define PMAP_REMOVE_PAGES_CURPROC_ONLY
/*
* Remove all pages from specified address space
@@ -2156,7 +2133,7 @@
* in the case of running down an entire address space.
*/
void
-pmap_remove_pages(pmap_t pmap, vm_offset_t sva, vm_offset_t eva)
+pmap_remove_pages(pmap_t pmap)
{
pt_entry_t *pte, tpte;
pv_entry_t pv, npv;
@@ -2171,16 +2148,12 @@
vm_page_lock_queues();
PMAP_LOCK(pmap);
-
+ sched_pin();
+ //XXX need to be TAILQ_FOREACH_SAFE?
for(pv = TAILQ_FIRST(&pmap->pm_pvlist);
pv;
pv = npv) {
- if (pv->pv_va >= eva || pv->pv_va < sva) {
- npv = TAILQ_NEXT(pv, pv_plist);
- continue;
- }
-
pte = pmap_pte(pv->pv_pmap, pv->pv_va);
if (!pmap_pte_v(pte))
panic("pmap_remove_pages: page on pm_pvlist has no pte\n");
@@ -2221,6 +2194,7 @@
pmap_unuse_pt(pv->pv_pmap, pv->pv_va, pv->pv_ptem);
free_pv_entry(pv);
}
+ sched_unpin();
pmap_invalidate_all(pmap);
PMAP_UNLOCK(pmap);
vm_page_unlock_queues();
More information about the p4-projects
mailing list