pmap-v4.c (157156) | pmap-v4.c (157443) |
---|---|
1/* From: $NetBSD: pmap.c,v 1.148 2004/04/03 04:35:48 bsh Exp $ */ 2/*- 3 * Copyright 2004 Olivier Houchard. 4 * Copyright 2003 Wasabi Systems, Inc. 5 * All rights reserved. 6 * 7 * Written by Steve C. Woodford for Wasabi Systems, Inc. 8 * --- 133 unchanged lines hidden (view full) --- 142 * Special compilation symbols 143 * PMAP_DEBUG - Build in pmap_debug_level code 144 */ 145/* Include header files */ 146 147#include "opt_vm.h" 148 149#include <sys/cdefs.h> | 1/* From: $NetBSD: pmap.c,v 1.148 2004/04/03 04:35:48 bsh Exp $ */ 2/*- 3 * Copyright 2004 Olivier Houchard. 4 * Copyright 2003 Wasabi Systems, Inc. 5 * All rights reserved. 6 * 7 * Written by Steve C. Woodford for Wasabi Systems, Inc. 8 * --- 133 unchanged lines hidden (view full) --- 142 * Special compilation symbols 143 * PMAP_DEBUG - Build in pmap_debug_level code 144 */ 145/* Include header files */ 146 147#include "opt_vm.h" 148 149#include <sys/cdefs.h> |
150__FBSDID("$FreeBSD: head/sys/arm/arm/pmap.c 157156 2006-03-26 22:03:43Z cognet $"); | 150__FBSDID("$FreeBSD: head/sys/arm/arm/pmap.c 157443 2006-04-03 21:16:10Z peter $"); |
151#include <sys/param.h> 152#include <sys/systm.h> 153#include <sys/kernel.h> 154#include <sys/proc.h> 155#include <sys/malloc.h> 156#include <sys/msgbuf.h> 157#include <sys/vmmeter.h> 158#include <sys/mman.h> --- 2647 unchanged lines hidden (view full) --- 2806 * Remove all pages from specified address space 2807 * this aids process exit speeds. Also, this code 2808 * is special cased for current process only, but 2809 * can have the more generic (and slightly slower) 2810 * mode enabled. This is much faster than pmap_remove 2811 * in the case of running down an entire address space. 2812 */ 2813void | 151#include <sys/param.h> 152#include <sys/systm.h> 153#include <sys/kernel.h> 154#include <sys/proc.h> 155#include <sys/malloc.h> 156#include <sys/msgbuf.h> 157#include <sys/vmmeter.h> 158#include <sys/mman.h> --- 2647 unchanged lines hidden (view full) --- 2806 * Remove all pages from specified address space 2807 * this aids process exit speeds. Also, this code 2808 * is special cased for current process only, but 2809 * can have the more generic (and slightly slower) 2810 * mode enabled. This is much faster than pmap_remove 2811 * in the case of running down an entire address space. 2812 */ 2813void |
2814pmap_remove_pages(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) | 2814pmap_remove_pages(pmap_t pmap) |
2815{ 2816 struct pv_entry *pv, *npv; 2817 struct l2_bucket *l2b = NULL; 2818 vm_page_t m; 2819 pt_entry_t *pt; 2820 2821 vm_page_lock_queues(); 2822 for (pv = TAILQ_FIRST(&pmap->pm_pvlist); pv; pv = npv) { | 2815{ 2816 struct pv_entry *pv, *npv; 2817 struct l2_bucket *l2b = NULL; 2818 vm_page_t m; 2819 pt_entry_t *pt; 2820 2821 vm_page_lock_queues(); 2822 for (pv = TAILQ_FIRST(&pmap->pm_pvlist); pv; pv = npv) { |
2823 if (pv->pv_va >= eva || pv->pv_va < sva) { 2824 npv = TAILQ_NEXT(pv, pv_plist); 2825 continue; 2826 } | |
2827 if (pv->pv_flags & PVF_WIRED) { 2828 /* The page is wired, cannot remove it now. */ 2829 npv = TAILQ_NEXT(pv, pv_plist); 2830 continue; 2831 } 2832 pmap->pm_stats.resident_count--; 2833 l2b = pmap_get_l2_bucket(pmap, pv->pv_va); 2834 KASSERT(l2b != NULL, ("No L2 bucket in pmap_remove_pages")); --- 1999 unchanged lines hidden --- | 2823 if (pv->pv_flags & PVF_WIRED) { 2824 /* The page is wired, cannot remove it now. */ 2825 npv = TAILQ_NEXT(pv, pv_plist); 2826 continue; 2827 } 2828 pmap->pm_stats.resident_count--; 2829 l2b = pmap_get_l2_bucket(pmap, pv->pv_va); 2830 KASSERT(l2b != NULL, ("No L2 bucket in pmap_remove_pages")); --- 1999 unchanged lines hidden --- |