Date: Wed, 5 Apr 2006 01:35:04 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 94658 for review Message-ID: <200604050135.k351Z4kX014887@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=94658 Change 94658 by imp@imp_harmony on 2006/04/05 01:34:09 IFC Affected files ... .. //depot/projects/arm/src/sys/alpha/alpha/clock.c#7 integrate .. //depot/projects/arm/src/sys/alpha/alpha/pmap.c#5 integrate .. //depot/projects/arm/src/sys/alpha/include/cpu.h#3 integrate .. //depot/projects/arm/src/sys/alpha/include/kdb.h#2 integrate .. //depot/projects/arm/src/sys/amd64/acpica/madt.c#4 integrate .. //depot/projects/arm/src/sys/amd64/amd64/gdb_machdep.c#3 integrate .. //depot/projects/arm/src/sys/amd64/amd64/pmap.c#7 integrate .. //depot/projects/arm/src/sys/amd64/conf/GENERIC#8 integrate .. //depot/projects/arm/src/sys/amd64/include/gdb_machdep.h#2 integrate .. //depot/projects/arm/src/sys/amd64/include/kdb.h#2 integrate .. //depot/projects/arm/src/sys/amd64/include/pmap.h#5 integrate .. //depot/projects/arm/src/sys/arm/arm/pmap.c#14 integrate .. //depot/projects/arm/src/sys/arm/at91/files.at91#6 integrate .. //depot/projects/arm/src/sys/boot/forth/beastie.4th#3 integrate .. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_misc.c#9 integrate .. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_proto.h#9 integrate .. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_syscall.h#9 integrate .. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_syscalls.c#9 integrate .. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_sysent.c#9 integrate .. //depot/projects/arm/src/sys/compat/freebsd32/syscalls.master#9 integrate .. //depot/projects/arm/src/sys/compat/linux/linux_misc.c#6 integrate .. //depot/projects/arm/src/sys/compat/linux/linux_socket.c#7 integrate .. //depot/projects/arm/src/sys/compat/svr4/svr4_stream.c#3 integrate .. //depot/projects/arm/src/sys/conf/Makefile.arm#10 integrate .. //depot/projects/arm/src/sys/conf/NOTES#18 integrate .. //depot/projects/arm/src/sys/conf/files#23 integrate .. //depot/projects/arm/src/sys/conf/files.powerpc#6 integrate .. //depot/projects/arm/src/sys/conf/options#16 integrate .. //depot/projects/arm/src/sys/contrib/pf/net/pf_norm.c#6 integrate .. //depot/projects/arm/src/sys/dev/acpica/Osd/OsdHardware.c#3 integrate .. //depot/projects/arm/src/sys/dev/acpica/Osd/OsdSchedule.c#4 integrate .. //depot/projects/arm/src/sys/dev/acpica/acpi.c#5 integrate .. //depot/projects/arm/src/sys/dev/aha/aha_isa.c#3 integrate .. //depot/projects/arm/src/sys/dev/aha/aha_mca.c#2 integrate .. //depot/projects/arm/src/sys/dev/ata/ata-all.c#9 integrate .. //depot/projects/arm/src/sys/dev/ata/ata-all.h#12 integrate .. //depot/projects/arm/src/sys/dev/ata/ata-disk.c#7 integrate .. //depot/projects/arm/src/sys/dev/ata/ata-queue.c#11 integrate .. //depot/projects/arm/src/sys/dev/ata/ata-usb.c#3 integrate .. //depot/projects/arm/src/sys/dev/ata/atapi-cam.c#3 integrate .. //depot/projects/arm/src/sys/dev/ata/atapi-cd.c#5 integrate .. //depot/projects/arm/src/sys/dev/ata/atapi-fd.c#6 integrate .. //depot/projects/arm/src/sys/dev/ath/if_ath.c#9 integrate .. //depot/projects/arm/src/sys/dev/bfe/if_bfe.c#5 integrate .. //depot/projects/arm/src/sys/dev/hwpmc/hwpmc_logging.c#4 integrate .. //depot/projects/arm/src/sys/dev/hwpmc/hwpmc_mod.c#7 integrate .. //depot/projects/arm/src/sys/dev/hwpmc/hwpmc_piv.c#4 integrate .. //depot/projects/arm/src/sys/dev/hwpmc/hwpmc_x86.c#3 integrate .. //depot/projects/arm/src/sys/dev/iicbus/if_ic.c#3 integrate .. //depot/projects/arm/src/sys/dev/iicbus/iic.c#2 integrate .. //depot/projects/arm/src/sys/dev/iicbus/iicbb.c#2 integrate .. //depot/projects/arm/src/sys/dev/iicbus/iicsmb.c#2 integrate .. //depot/projects/arm/src/sys/dev/md/md.c#6 integrate .. //depot/projects/arm/src/sys/dev/mfi/mfi.c#1 branch .. //depot/projects/arm/src/sys/dev/mfi/mfi_disk.c#1 branch .. //depot/projects/arm/src/sys/dev/mfi/mfi_ioctl.h#1 branch .. //depot/projects/arm/src/sys/dev/mfi/mfi_pci.c#1 branch .. //depot/projects/arm/src/sys/dev/mfi/mfireg.h#1 branch .. //depot/projects/arm/src/sys/dev/mfi/mfivar.h#1 branch .. //depot/projects/arm/src/sys/dev/mpt/mpt.c#8 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt.h#7 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt_cam.c#9 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt_debug.c#7 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt_pci.c#6 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt_raid.c#3 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt_reg.h#3 integrate .. //depot/projects/arm/src/sys/dev/pccbb/pccbb.c#7 integrate .. //depot/projects/arm/src/sys/dev/pccbb/pccbbreg.h#4 integrate .. //depot/projects/arm/src/sys/dev/puc/puc_ebus.c#4 integrate .. //depot/projects/arm/src/sys/dev/puc/puc_sbus.c#4 integrate .. //depot/projects/arm/src/sys/dev/scc/scc_bfe.h#1 branch .. //depot/projects/arm/src/sys/dev/scc/scc_bfe_ebus.c#1 branch .. //depot/projects/arm/src/sys/dev/scc/scc_bfe_macio.c#1 branch .. //depot/projects/arm/src/sys/dev/scc/scc_bfe_sbus.c#1 branch .. //depot/projects/arm/src/sys/dev/scc/scc_bus.h#1 branch .. //depot/projects/arm/src/sys/dev/scc/scc_core.c#1 branch .. //depot/projects/arm/src/sys/dev/scc/scc_dev_sab82532.c#1 branch .. //depot/projects/arm/src/sys/dev/scc/scc_dev_z8530.c#1 branch .. //depot/projects/arm/src/sys/dev/scc/scc_if.m#1 branch .. //depot/projects/arm/src/sys/dev/sound/pci/ich.c#9 integrate .. //depot/projects/arm/src/sys/dev/sound/pcm/dsp.c#8 integrate .. //depot/projects/arm/src/sys/dev/sound/pcm/sound.c#6 integrate .. //depot/projects/arm/src/sys/dev/sound/pcm/vchan.c#5 integrate .. //depot/projects/arm/src/sys/dev/uart/uart_bus.h#4 integrate .. //depot/projects/arm/src/sys/dev/uart/uart_bus_ebus.c#5 integrate .. //depot/projects/arm/src/sys/dev/uart/uart_bus_scc.c#1 branch .. //depot/projects/arm/src/sys/dev/uart/uart_core.c#7 integrate .. //depot/projects/arm/src/sys/dev/uart/uart_cpu.h#3 integrate .. //depot/projects/arm/src/sys/dev/uart/uart_cpu_powerpc.c#1 branch .. //depot/projects/arm/src/sys/dev/uart/uart_dev_ns8250.c#3 integrate .. //depot/projects/arm/src/sys/dev/uart/uart_dev_sab82532.c#3 integrate .. //depot/projects/arm/src/sys/dev/uart/uart_dev_z8530.c#4 integrate .. //depot/projects/arm/src/sys/dev/uart/uart_tty.c#5 integrate .. //depot/projects/arm/src/sys/dev/usb/if_ural.c#8 integrate .. //depot/projects/arm/src/sys/fs/devfs/devfs_vnops.c#6 integrate .. //depot/projects/arm/src/sys/gdb/gdb_cons.c#1 branch .. //depot/projects/arm/src/sys/gdb/gdb_int.h#2 integrate .. //depot/projects/arm/src/sys/gdb/gdb_main.c#3 integrate .. //depot/projects/arm/src/sys/geom/eli/g_eli.h#3 integrate .. //depot/projects/arm/src/sys/geom/mirror/g_mirror.c#11 integrate .. //depot/projects/arm/src/sys/geom/raid3/g_raid3.c#13 integrate .. //depot/projects/arm/src/sys/geom/vinum/geom_vinum.c#6 integrate .. //depot/projects/arm/src/sys/geom/vinum/geom_vinum.h#3 integrate .. //depot/projects/arm/src/sys/geom/vinum/geom_vinum_rm.c#4 integrate .. //depot/projects/arm/src/sys/geom/vinum/geom_vinum_state.c#2 integrate .. //depot/projects/arm/src/sys/geom/vinum/geom_vinum_subr.c#3 integrate .. //depot/projects/arm/src/sys/i386/acpica/madt.c#4 integrate .. //depot/projects/arm/src/sys/i386/conf/GENERIC#7 integrate .. //depot/projects/arm/src/sys/i386/i386/exception.s#4 integrate .. //depot/projects/arm/src/sys/i386/i386/pmap.c#7 integrate .. //depot/projects/arm/src/sys/i386/include/atomic.h#4 integrate .. //depot/projects/arm/src/sys/i386/include/kdb.h#2 integrate .. //depot/projects/arm/src/sys/ia64/ia64/interrupt.c#4 integrate .. //depot/projects/arm/src/sys/ia64/ia64/pmap.c#4 integrate .. //depot/projects/arm/src/sys/ia64/include/kdb.h#2 integrate .. //depot/projects/arm/src/sys/kern/kern_acct.c#7 integrate .. //depot/projects/arm/src/sys/kern/kern_alq.c#4 integrate .. //depot/projects/arm/src/sys/kern/kern_descrip.c#9 integrate .. //depot/projects/arm/src/sys/kern/kern_event.c#4 integrate .. //depot/projects/arm/src/sys/kern/kern_exec.c#8 integrate .. //depot/projects/arm/src/sys/kern/kern_exit.c#14 integrate .. //depot/projects/arm/src/sys/kern/kern_ktrace.c#5 integrate .. //depot/projects/arm/src/sys/kern/kern_linker.c#3 integrate .. //depot/projects/arm/src/sys/kern/kern_sig.c#11 integrate .. //depot/projects/arm/src/sys/kern/md5c.c#3 integrate .. //depot/projects/arm/src/sys/kern/serdev_if.m#1 branch .. //depot/projects/arm/src/sys/kern/subr_kdb.c#3 integrate .. //depot/projects/arm/src/sys/kern/subr_taskqueue.c#5 integrate .. //depot/projects/arm/src/sys/kern/subr_turnstile.c#4 integrate .. //depot/projects/arm/src/sys/kern/syscalls.master#12 integrate .. //depot/projects/arm/src/sys/kern/sysv_shm.c#3 integrate .. //depot/projects/arm/src/sys/kern/uipc_socket.c#10 integrate .. //depot/projects/arm/src/sys/kern/uipc_socket2.c#8 integrate .. //depot/projects/arm/src/sys/kern/uipc_syscalls.c#7 integrate .. //depot/projects/arm/src/sys/kern/uipc_usrreq.c#8 integrate .. //depot/projects/arm/src/sys/kern/vfs_aio.c#7 integrate .. //depot/projects/arm/src/sys/kern/vfs_bio.c#9 integrate .. //depot/projects/arm/src/sys/kern/vfs_default.c#8 integrate .. //depot/projects/arm/src/sys/kern/vfs_lookup.c#7 integrate .. //depot/projects/arm/src/sys/kern/vfs_mount.c#13 integrate .. //depot/projects/arm/src/sys/kern/vfs_subr.c#15 integrate .. //depot/projects/arm/src/sys/kern/vfs_syscalls.c#13 integrate .. //depot/projects/arm/src/sys/kern/vfs_vnops.c#8 integrate .. //depot/projects/arm/src/sys/modules/Makefile#17 integrate .. //depot/projects/arm/src/sys/modules/ath/Makefile#3 integrate .. //depot/projects/arm/src/sys/modules/mfi/Makefile#1 branch .. //depot/projects/arm/src/sys/modules/scc/Makefile#1 branch .. //depot/projects/arm/src/sys/modules/uart/Makefile#3 integrate .. //depot/projects/arm/src/sys/net/if_bridge.c#11 integrate .. //depot/projects/arm/src/sys/net/if_media.h#5 integrate .. //depot/projects/arm/src/sys/net/if_ppp.c#5 integrate .. //depot/projects/arm/src/sys/net/raw_cb.c#2 integrate .. //depot/projects/arm/src/sys/net/raw_usrreq.c#2 integrate .. //depot/projects/arm/src/sys/net/rtsock.c#5 integrate .. //depot/projects/arm/src/sys/net80211/ieee80211_ioctl.c#8 integrate .. //depot/projects/arm/src/sys/netatalk/ddp_usrreq.c#3 integrate .. //depot/projects/arm/src/sys/netatm/atm_aal5.c#3 integrate .. //depot/projects/arm/src/sys/netatm/atm_proto.c#3 integrate .. //depot/projects/arm/src/sys/netatm/atm_socket.c#4 integrate .. //depot/projects/arm/src/sys/netatm/atm_usrreq.c#3 integrate .. //depot/projects/arm/src/sys/netatm/atm_var.h#4 integrate .. //depot/projects/arm/src/sys/netgraph/bluetooth/include/ng_btsocket_hci_raw.h#2 integrate .. //depot/projects/arm/src/sys/netgraph/bluetooth/include/ng_btsocket_l2cap.h#3 integrate .. //depot/projects/arm/src/sys/netgraph/bluetooth/include/ng_btsocket_rfcomm.h#3 integrate .. //depot/projects/arm/src/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c#3 integrate .. //depot/projects/arm/src/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c#4 integrate .. //depot/projects/arm/src/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c#3 integrate .. //depot/projects/arm/src/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c#4 integrate .. //depot/projects/arm/src/sys/netgraph/ng_socket.c#3 integrate .. //depot/projects/arm/src/sys/netinet/in_pcb.c#7 integrate .. //depot/projects/arm/src/sys/netinet/in_pcb.h#4 integrate .. //depot/projects/arm/src/sys/netinet/ip_divert.c#3 integrate .. //depot/projects/arm/src/sys/netinet/raw_ip.c#4 integrate .. //depot/projects/arm/src/sys/netinet/tcp_input.c#9 integrate .. //depot/projects/arm/src/sys/netinet/tcp_sack.c#7 integrate .. //depot/projects/arm/src/sys/netinet/tcp_subr.c#5 integrate .. //depot/projects/arm/src/sys/netinet/tcp_timer.c#4 integrate .. //depot/projects/arm/src/sys/netinet/tcp_usrreq.c#6 integrate .. //depot/projects/arm/src/sys/netinet/tcp_var.h#6 integrate .. //depot/projects/arm/src/sys/netinet/udp_usrreq.c#7 integrate .. //depot/projects/arm/src/sys/netinet6/in6.h#4 integrate .. //depot/projects/arm/src/sys/netinet6/in6_pcb.c#4 integrate .. //depot/projects/arm/src/sys/netinet6/in6_pcb.h#2 integrate .. //depot/projects/arm/src/sys/netinet6/ipsec.c#5 integrate .. //depot/projects/arm/src/sys/netinet6/nd6.c#5 integrate .. //depot/projects/arm/src/sys/netinet6/raw_ip6.c#3 integrate .. //depot/projects/arm/src/sys/netinet6/udp6_usrreq.c#4 integrate .. //depot/projects/arm/src/sys/netipsec/ipsec.c#4 integrate .. //depot/projects/arm/src/sys/netipsec/key.c#2 integrate .. //depot/projects/arm/src/sys/netipsec/key_var.h#2 integrate .. //depot/projects/arm/src/sys/netipsec/keydb.h#2 integrate .. //depot/projects/arm/src/sys/netipsec/keysock.c#4 integrate .. //depot/projects/arm/src/sys/netipsec/xform.h#2 integrate .. //depot/projects/arm/src/sys/netipsec/xform_ah.c#3 integrate .. //depot/projects/arm/src/sys/netipsec/xform_esp.c#4 integrate .. //depot/projects/arm/src/sys/netipsec/xform_ipcomp.c#3 integrate .. //depot/projects/arm/src/sys/netipsec/xform_ipip.c#2 integrate .. //depot/projects/arm/src/sys/netipsec/xform_tcp.c#2 integrate .. //depot/projects/arm/src/sys/netipx/README#4 integrate .. //depot/projects/arm/src/sys/netipx/ipx_input.c#4 integrate .. //depot/projects/arm/src/sys/netipx/ipx_ip.c#4 integrate .. //depot/projects/arm/src/sys/netipx/ipx_pcb.c#2 integrate .. //depot/projects/arm/src/sys/netipx/ipx_pcb.h#2 integrate .. //depot/projects/arm/src/sys/netipx/ipx_usrreq.c#2 integrate .. //depot/projects/arm/src/sys/netipx/spx_usrreq.c#5 integrate .. //depot/projects/arm/src/sys/netkey/keysock.c#4 integrate .. //depot/projects/arm/src/sys/netnatm/natm.c#4 integrate .. //depot/projects/arm/src/sys/nfsclient/nfs_socket.c#8 integrate .. //depot/projects/arm/src/sys/nfsclient/nfs_vfsops.c#4 integrate .. //depot/projects/arm/src/sys/nfsserver/nfs_serv.c#7 integrate .. //depot/projects/arm/src/sys/nfsserver/nfs_srvsubs.c#4 integrate .. //depot/projects/arm/src/sys/opencrypto/cryptosoft.c#3 integrate .. //depot/projects/arm/src/sys/powerpc/include/bus.h#4 integrate .. //depot/projects/arm/src/sys/powerpc/powerpc/mmu_if.m#3 integrate .. //depot/projects/arm/src/sys/powerpc/powerpc/pmap_dispatch.c#3 integrate .. //depot/projects/arm/src/sys/sparc64/conf/GENERIC#11 integrate .. //depot/projects/arm/src/sys/sparc64/fhc/clkbrd.c#3 integrate .. //depot/projects/arm/src/sys/sparc64/fhc/clkbrdreg.h#2 integrate .. //depot/projects/arm/src/sys/sparc64/include/asi.h#2 integrate .. //depot/projects/arm/src/sys/sparc64/include/bus.h#4 integrate .. //depot/projects/arm/src/sys/sparc64/include/kdb.h#2 integrate .. //depot/projects/arm/src/sys/sparc64/sparc64/machdep.c#5 integrate .. //depot/projects/arm/src/sys/sparc64/sparc64/mp_machdep.c#4 integrate .. //depot/projects/arm/src/sys/sparc64/sparc64/pmap.c#6 integrate .. //depot/projects/arm/src/sys/sparc64/sparc64/tick.c#6 integrate .. //depot/projects/arm/src/sys/sparc64/sparc64/trap.c#6 integrate .. //depot/projects/arm/src/sys/sys/ata.h#5 integrate .. //depot/projects/arm/src/sys/sys/buf.h#4 integrate .. //depot/projects/arm/src/sys/sys/clock.h#2 integrate .. //depot/projects/arm/src/sys/sys/gmon.h#2 integrate .. //depot/projects/arm/src/sys/sys/linker.h#3 integrate .. //depot/projects/arm/src/sys/sys/mount.h#10 integrate .. //depot/projects/arm/src/sys/sys/param.h#11 integrate .. //depot/projects/arm/src/sys/sys/pmc.h#3 integrate .. //depot/projects/arm/src/sys/sys/pmckern.h#2 integrate .. //depot/projects/arm/src/sys/sys/pmclog.h#2 integrate .. //depot/projects/arm/src/sys/sys/protosw.h#4 integrate .. //depot/projects/arm/src/sys/sys/serial.h#3 integrate .. //depot/projects/arm/src/sys/sys/socketvar.h#7 integrate .. //depot/projects/arm/src/sys/sys/sx.h#3 integrate .. //depot/projects/arm/src/sys/sys/sysctl.h#6 integrate .. //depot/projects/arm/src/sys/sys/sysproto.h#11 integrate .. //depot/projects/arm/src/sys/sys/umtx.h#4 integrate .. //depot/projects/arm/src/sys/ufs/ffs/ffs_snapshot.c#11 integrate .. //depot/projects/arm/src/sys/ufs/ffs/ffs_softdep.c#9 integrate .. //depot/projects/arm/src/sys/ufs/ffs/ffs_vfsops.c#11 integrate .. //depot/projects/arm/src/sys/ufs/ufs/ufsmount.h#4 integrate .. //depot/projects/arm/src/sys/vm/pmap.h#4 integrate .. //depot/projects/arm/src/sys/vm/vm_mmap.c#3 integrate Differences ... ==== //depot/projects/arm/src/sys/alpha/alpha/clock.c#7 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/alpha/clock.c,v 1.44 2006/03/07 22:12:09 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/clock.c,v 1.45 2006/03/28 21:20:11 jhb Exp $"); #include "opt_clock.h" @@ -137,7 +137,6 @@ static void calibrate_clocks(u_int32_t firmware_freq, u_int32_t *pcc, u_int32_t *timer); static void set_timer_freq(u_int freq, int intr_freq); -static uint64_t read_cycle_count(void); void clockattach(device_t dev) ==== //depot/projects/arm/src/sys/alpha/alpha/pmap.c#5 (text+ko) ==== @@ -148,7 +148,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.187 2005/12/02 18:02:54 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/pmap.c,v 1.188 2006/04/03 21:16:07 peter Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -2125,9 +2125,7 @@ * in the case of running down an entire address space. */ void -pmap_remove_pages(pmap, sva, eva) - pmap_t pmap; - vm_offset_t sva, eva; +pmap_remove_pages(pmap_t pmap) { pt_entry_t *pte, tpte; vm_page_t m; @@ -2146,11 +2144,6 @@ pv; pv = npv) { - if (pv->pv_va >= eva || pv->pv_va < sva) { - npv = TAILQ_NEXT(pv, pv_plist); - continue; - } - #ifdef PMAP_REMOVE_PAGES_CURPROC_ONLY pte = vtopte(pv->pv_va); #else ==== //depot/projects/arm/src/sys/alpha/include/cpu.h#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/alpha/include/cpu.h,v 1.43 2005/12/22 22:16:04 jhb Exp $ */ +/* $FreeBSD: src/sys/alpha/include/cpu.h,v 1.44 2006/03/28 21:20:12 jhb Exp $ */ /* From: NetBSD: cpu.h,v 1.18 1997/09/23 23:17:49 mjacob Exp */ /*- @@ -88,11 +88,12 @@ #define cpu_getstack(td) (alpha_pal_rdusp()) #define cpu_spinwait() /* nothing */ -#define get_cyclecount alpha_rpcc +#define get_cyclecount() read_cycle_count() void cpu_halt(void); void cpu_reset(void); void fork_trampoline(void); /* MAGIC */ +uint64_t read_cycle_count(void); void swi_vm(void *); #endif /* _KERNEL */ ==== //depot/projects/arm/src/sys/alpha/include/kdb.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/alpha/include/kdb.h,v 1.2 2005/01/05 20:05:50 imp Exp $ + * $FreeBSD: src/sys/alpha/include/kdb.h,v 1.3 2006/04/03 22:51:46 marcel Exp $ */ #ifndef _MACHINE_KDB_H_ @@ -31,6 +31,8 @@ #include <machine/frame.h> +#define KDB_STOPPEDPCB(pc) &stoppcbs[pc->pc_cpuid] + static __inline void kdb_cpu_clear_singlestep(void) { ==== //depot/projects/arm/src/sys/amd64/acpica/madt.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/acpica/madt.c,v 1.19 2005/11/01 22:44:06 jkim Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/acpica/madt.c,v 1.20 2006/03/27 15:59:48 jhb Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -219,11 +219,12 @@ } /* - * For ACPI < 2.0, use the RSDT. For ACPI >= 2.0, use the XSDT. - * We map the XSDT and RSDT at page 1 in the crashdump area. - * Page 0 is used to map in the headers of candidate ACPI tables. + * For ACPI >= 2.0, use the XSDT if it is available. + * Otherwise, use the RSDT. We map the XSDT or RSDT at page 1 + * in the crashdump area. Page 0 is used to map in the + * headers of candidate ACPI tables. */ - if (rsdp->Revision >= 2) { + if (rsdp->Revision >= 2 && rsdp->XsdtPhysicalAddress != 0) { /* * AcpiOsGetRootPointer only verifies the checksum for * the version 1.0 portion of the RSDP. Version 2.0 has ==== //depot/projects/arm/src/sys/amd64/amd64/gdb_machdep.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/gdb_machdep.c,v 1.5 2005/09/27 21:10:10 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/gdb_machdep.c,v 1.6 2006/04/04 03:00:20 marcel Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -91,3 +91,27 @@ kdb_frame->tf_rip = *(register_t *)val; } } + +int +gdb_cpu_signal(int type, int code) +{ + + switch (type & ~T_USER) { + case 0: return (SIGFPE); /* Divide by zero. */ + case 1: return (SIGTRAP); /* Debug exception. */ + case 3: return (SIGTRAP); /* Breakpoint. */ + case 4: return (SIGSEGV); /* into instr. (overflow). */ + case 5: return (SIGURG); /* bound instruction. */ + case 6: return (SIGILL); /* Invalid opcode. */ + case 7: return (SIGFPE); /* Coprocessor not present. */ + case 8: return (SIGEMT); /* Double fault. */ + case 9: return (SIGSEGV); /* Coprocessor segment overrun. */ + case 10: return (SIGTRAP); /* Invalid TSS (also single-step). */ + case 11: return (SIGSEGV); /* Segment not present. */ + case 12: return (SIGSEGV); /* Stack exception. */ + case 13: return (SIGSEGV); /* General protection. */ + case 14: return (SIGSEGV); /* Page fault. */ + case 16: return (SIGEMT); /* Coprocessor error. */ + } + return (SIGEMT); +} ==== //depot/projects/arm/src/sys/amd64/amd64/pmap.c#7 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.539 2006/03/21 18:07:41 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.543 2006/04/04 20:17:35 peter Exp $"); /* * Manages physical address maps. @@ -158,6 +158,13 @@ #define PMAP_INLINE #endif +#define PV_STATS +#ifdef PV_STATS +#define PV_STAT(x) do { x ; } while (0) +#else +#define PV_STAT(x) do { } while (0) +#endif + struct pmap kernel_pmap_store; vm_paddr_t avail_start; /* PA of first available physical page */ @@ -182,7 +189,6 @@ /* * Data for the pv entry allocation mechanism */ -static uma_zone_t pvzone; static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0; static int shpgperproc = PMAP_SHPGPERPROC; @@ -198,8 +204,8 @@ */ static caddr_t crashdumpmap; -static PMAP_INLINE void free_pv_entry(pv_entry_t pv); -static pv_entry_t get_pv_entry(pmap_t locked_pmap); +static void free_pv_entry(pmap_t pmap, pv_entry_t pv); +static pv_entry_t get_pv_entry(pmap_t locked_pmap, int try); static void pmap_clear_ptes(vm_page_t m, long bit); static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, @@ -208,6 +214,8 @@ static void pmap_remove_entry(struct pmap *pmap, vm_page_t m, vm_offset_t va); static void pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t m); +static boolean_t pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, + vm_page_t m); static vm_page_t pmap_allocpde(pmap_t pmap, vm_offset_t va, int flags); static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags); @@ -509,7 +517,7 @@ PMAP_LOCK_INIT(kernel_pmap); kernel_pmap->pm_pml4 = (pdp_entry_t *) (KERNBASE + KPML4phys); kernel_pmap->pm_active = -1; /* don't allow deactivation */ - TAILQ_INIT(&kernel_pmap->pm_pvlist); + TAILQ_INIT(&kernel_pmap->pm_pvchunk); nkpt = NKPT; /* @@ -569,8 +577,6 @@ * high water mark so that the system can recover from excessive * numbers of pv entries. */ - pvzone = uma_zcreate("PV ENTRY", sizeof(struct pv_entry), NULL, NULL, - NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM); TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); pv_entry_max = shpgperproc * maxproc + cnt.v_page_count; TUNABLE_INT_FETCH("vm.pmap.pv_entries", &pv_entry_max); @@ -1063,7 +1069,7 @@ PMAP_LOCK_INIT(pmap); pmap->pm_pml4 = (pml4_entry_t *)(KERNBASE + KPML4phys); pmap->pm_active = 0; - TAILQ_INIT(&pmap->pm_pvlist); + TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); } @@ -1100,7 +1106,7 @@ pmap->pm_pml4[PML4PML4I] = VM_PAGE_TO_PHYS(pml4pg) | PG_V | PG_RW | PG_A | PG_M; pmap->pm_active = 0; - TAILQ_INIT(&pmap->pm_pvlist); + TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); } @@ -1437,61 +1443,79 @@ * page management routines. ***************************************************/ -/* - * free the pv_entry back to the free list - */ -static PMAP_INLINE void -free_pv_entry(pv_entry_t pv) +CTASSERT(sizeof(struct pv_chunk) == PAGE_SIZE); +CTASSERT(_NPCM == 3); +CTASSERT(_NPCPV == 168); + +static __inline struct pv_chunk * +pv_to_chunk(pv_entry_t pv) { - pv_entry_count--; - uma_zfree(pvzone, pv); + + return (struct pv_chunk *)((uintptr_t)pv & ~(uintptr_t)PAGE_MASK); } +#define PV_PMAP(pv) (pv_to_chunk(pv)->pc_pmap) + +#define PC_FREE0 0xfffffffffffffffful +#define PC_FREE1 0xfffffffffffffffful +#define PC_FREE2 0x000000fffffffffful + +static uint64_t pc_freemask[3] = { PC_FREE0, PC_FREE1, PC_FREE2 }; + +#ifdef PV_STATS +static int pc_chunk_count, pc_chunk_allocs, pc_chunk_frees, pc_chunk_tryfail; + +SYSCTL_INT(_vm_pmap, OID_AUTO, pc_chunk_count, CTLFLAG_RD, &pc_chunk_count, 0, + "Current number of pv entry chunks"); +SYSCTL_INT(_vm_pmap, OID_AUTO, pc_chunk_allocs, CTLFLAG_RD, &pc_chunk_allocs, 0, + "Current number of pv entry chunks allocated"); +SYSCTL_INT(_vm_pmap, OID_AUTO, pc_chunk_frees, CTLFLAG_RD, &pc_chunk_frees, 0, + "Current number of pv entry chunks frees"); +SYSCTL_INT(_vm_pmap, OID_AUTO, pc_chunk_tryfail, CTLFLAG_RD, &pc_chunk_tryfail, 0, + "Number of times tried to get a chunk page but failed."); + +static long pv_entry_frees, pv_entry_allocs; +static int pv_entry_spare; + +SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_count, CTLFLAG_RD, &pv_entry_count, 0, + "Current number of pv entries"); +SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry_frees, CTLFLAG_RD, &pv_entry_frees, 0, + "Current number of pv entry frees"); +SYSCTL_LONG(_vm_pmap, OID_AUTO, pv_entry_allocs, CTLFLAG_RD, &pv_entry_allocs, 0, + "Current number of pv entry allocs"); +SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG_RD, &pv_entry_spare, 0, + "Current number of spare pv entries"); + +static int pmap_collect_inactive, pmap_collect_active; + +SYSCTL_INT(_vm_pmap, OID_AUTO, pmap_collect_inactive, CTLFLAG_RD, &pmap_collect_inactive, 0, + "Current number times pmap_collect called on inactive queue"); +SYSCTL_INT(_vm_pmap, OID_AUTO, pmap_collect_active, CTLFLAG_RD, &pmap_collect_active, 0, + "Current number times pmap_collect called on active queue"); +#endif + /* - * get a new pv_entry, allocating a block from the system - * when needed. + * We are in a serious low memory condition. Resort to + * drastic measures to free some pages so we can allocate + * another pv entry chunk. This is normally called to + * unmap inactive pages, and if necessary, active pages. */ -static pv_entry_t -get_pv_entry(pmap_t locked_pmap) +static void +pmap_collect(pmap_t locked_pmap, struct vpgqueues *vpq) { - static const struct timeval printinterval = { 60, 0 }; - static struct timeval lastprint; - struct vpgqueues *vpq; pd_entry_t ptepde; pmap_t pmap; pt_entry_t *pte, tpte; - pv_entry_t allocated_pv, next_pv, pv; + pv_entry_t next_pv, pv; vm_offset_t va; vm_page_t m; - PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - allocated_pv = uma_zalloc(pvzone, M_NOWAIT); - if (allocated_pv != NULL) { - pv_entry_count++; - if (pv_entry_count > pv_entry_high_water) - pagedaemon_wakeup(); - else - return (allocated_pv); - } - - /* - * Reclaim pv entries: At first, destroy mappings to inactive - * pages. After that, if a pv entry is still needed, destroy - * mappings to active pages. - */ - if (ratecheck(&lastprint, &printinterval)) - printf("Approaching the limit on PV entries, consider " - "increasing sysctl vm.pmap.shpgperproc or " - "vm.pmap.pv_entry_max\n"); - vpq = &vm_page_queues[PQ_INACTIVE]; -retry: TAILQ_FOREACH(m, &vpq->pl, pageq) { if (m->hold_count || m->busy || (m->flags & PG_BUSY)) continue; TAILQ_FOREACH_SAFE(pv, &m->md.pv_list, pv_list, next_pv) { va = pv->pv_va; - pmap = pv->pv_pmap; + pmap = PV_PMAP(pv); /* Avoid deadlock and lock recursion. */ if (pmap > locked_pmap) PMAP_LOCK(pmap); @@ -1501,18 +1525,17 @@ pte = pmap_pte_pde(pmap, va, &ptepde); tpte = pte_load_clear(pte); KASSERT((tpte & PG_W) == 0, - ("get_pv_entry: wired pte %#lx", tpte)); + ("pmap_collect: wired pte %#lx", tpte)); if (tpte & PG_A) vm_page_flag_set(m, PG_REFERENCED); if (tpte & PG_M) { KASSERT((tpte & PG_RW), - ("get_pv_entry: modified page not writable: va: %#lx, pte: %#lx", + ("pmap_collect: modified page not writable: va: %#lx, pte: %#lx", va, tpte)); if (pmap_track_modified(va)) vm_page_dirty(m); } pmap_invalidate_page(pmap, va); - TAILQ_REMOVE(&pmap->pm_pvlist, pv, pv_plist); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); if (TAILQ_EMPTY(&m->md.pv_list)) vm_page_flag_clear(m, PG_WRITEABLE); @@ -1520,20 +1543,130 @@ pmap_unuse_pt(pmap, va, ptepde); if (pmap != locked_pmap) PMAP_UNLOCK(pmap); - if (allocated_pv == NULL) - allocated_pv = pv; - else - free_pv_entry(pv); + free_pv_entry(locked_pmap, pv); + } + } +} + + +/* + * free the pv_entry back to the free list + */ +static void +free_pv_entry(pmap_t pmap, pv_entry_t pv) +{ + vm_page_t m; + struct pv_chunk *pc; + int idx, field, bit; + + PV_STAT(pv_entry_frees++); + PV_STAT(pv_entry_spare++); + PV_STAT(pv_entry_count--); + pc = pv_to_chunk(pv); + idx = pv - &pc->pc_pventry[0]; + field = idx / 64; + bit = idx % 64; + pc->pc_map[field] |= 1ul << bit; + /* move to head of list */ + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); + if (pc->pc_map[0] != PC_FREE0 || pc->pc_map[1] != PC_FREE1 || + pc->pc_map[2] != PC_FREE2) + return; + PV_STAT(pv_entry_spare -= _NPCPV); + PV_STAT(pc_chunk_count--); + PV_STAT(pc_chunk_frees++); + /* entire chunk is free, return it */ + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + m = PHYS_TO_VM_PAGE(DMAP_TO_PHYS((vm_offset_t)pc)); + vm_page_lock_queues(); + vm_page_free(m); + vm_page_unlock_queues(); +} + +/* + * get a new pv_entry, allocating a block from the system + * when needed. + */ +static pv_entry_t +get_pv_entry(pmap_t pmap, int try) +{ + static const struct timeval printinterval = { 60, 0 }; + static struct timeval lastprint; + static vm_pindex_t colour; + int bit, field; + pv_entry_t pv; + struct pv_chunk *pc; + vm_page_t m; + + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + PV_STAT(pv_entry_allocs++); + PV_STAT(pv_entry_count++); + if (pv_entry_count > pv_entry_high_water) + pagedaemon_wakeup(); + pc = TAILQ_FIRST(&pmap->pm_pvchunk); + if (pc != NULL) { + for (field = 0; field < _NPCM; field++) { + if (pc->pc_map[field]) { + bit = bsfq(pc->pc_map[field]); + break; + } + } + if (field < _NPCM) { + pv = &pc->pc_pventry[field * 64 + bit]; + pc->pc_map[field] &= ~(1ul << bit); + /* If this was the last item, move it to tail */ + if (pc->pc_map[0] == 0 && pc->pc_map[1] == 0 && + pc->pc_map[2] == 0) { + TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); + TAILQ_INSERT_TAIL(&pmap->pm_pvchunk, pc, pc_list); + } + PV_STAT(pv_entry_spare--); + return (pv); } } - if (allocated_pv == NULL) { - if (vpq == &vm_page_queues[PQ_INACTIVE]) { - vpq = &vm_page_queues[PQ_ACTIVE]; - goto retry; + /* No free items, allocate another chunk */ + m = vm_page_alloc(NULL, colour, VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ); + if (m == NULL) { + if (try) { + PV_STAT(pc_chunk_tryfail++); + return (NULL); + } + /* + * Reclaim pv entries: At first, destroy mappings to inactive + * pages. After that, if a pv chunk entry is still needed, + * destroy mappings to active pages. + */ + if (ratecheck(&lastprint, &printinterval)) + printf("Approaching the limit on PV entries, consider " + "increasing sysctl vm.pmap.shpgperproc or " + "vm.pmap.pv_entry_max\n"); + PV_STAT(pmap_collect_inactive++); + pmap_collect(pmap, &vm_page_queues[PQ_INACTIVE]); + m = vm_page_alloc(NULL, colour, + VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ); + if (m == NULL) { + PV_STAT(pmap_collect_active++); + pmap_collect(pmap, &vm_page_queues[PQ_ACTIVE]); + m = vm_page_alloc(NULL, colour, + VM_ALLOC_SYSTEM | VM_ALLOC_NOOBJ); + if (m == NULL) + panic("get_pv_entry: increase vm.pmap.shpgperproc"); } - panic("get_pv_entry: increase the vm.pmap.shpgperproc tunable"); } - return (allocated_pv); + PV_STAT(pc_chunk_count++); + PV_STAT(pc_chunk_allocs++); + colour++; + pc = (void *)PHYS_TO_DMAP(m->phys_addr); + pc->pc_pmap = pmap; + pc->pc_map[0] = PC_FREE0 & ~1ul; /* preallocated bit 0 */ + pc->pc_map[1] = PC_FREE1; + pc->pc_map[2] = PC_FREE2; + pv = &pc->pc_pventry[0]; + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); + PV_STAT(pv_entry_spare += _NPCPV - 1); + return (pv); } static void @@ -1543,24 +1676,16 @@ PMAP_LOCK_ASSERT(pmap, MA_OWNED); mtx_assert(&vm_page_queue_mtx, MA_OWNED); - if (m->md.pv_list_count < pmap->pm_stats.resident_count) { - TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - if (pmap == pv->pv_pmap && va == pv->pv_va) - break; - } - } else { - TAILQ_FOREACH(pv, &pmap->pm_pvlist, pv_plist) { - if (va == pv->pv_va) - break; - } + TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { + if (pmap == PV_PMAP(pv) && va == pv->pv_va) + break; } KASSERT(pv != NULL, ("pmap_remove_entry: pv not found")); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); m->md.pv_list_count--; if (TAILQ_EMPTY(&m->md.pv_list)) vm_page_flag_clear(m, PG_WRITEABLE); - TAILQ_REMOVE(&pmap->pm_pvlist, pv, pv_plist); - free_pv_entry(pv); + free_pv_entry(pmap, pv); } /* @@ -1572,15 +1697,32 @@ { pv_entry_t pv; - pv = get_pv_entry(pmap); + PMAP_LOCK_ASSERT(pmap, MA_OWNED); + mtx_assert(&vm_page_queue_mtx, MA_OWNED); + pv = get_pv_entry(pmap, FALSE); pv->pv_va = va; - pv->pv_pmap = pmap; + TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); + m->md.pv_list_count++; +} + +/* + * Conditionally create a pv entry. + */ +static boolean_t +pmap_try_insert_pv_entry(pmap_t pmap, vm_offset_t va, vm_page_t m) +{ + pv_entry_t pv; PMAP_LOCK_ASSERT(pmap, MA_OWNED); mtx_assert(&vm_page_queue_mtx, MA_OWNED); - TAILQ_INSERT_TAIL(&pmap->pm_pvlist, pv, pv_plist); - TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); - m->md.pv_list_count++; + if (pv_entry_count < pv_entry_high_water && + (pv = get_pv_entry(pmap, TRUE)) != NULL) { + pv->pv_va = va; + TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); + m->md.pv_list_count++; + return (TRUE); + } else + return (FALSE); } /* @@ -1766,6 +1908,7 @@ pmap_remove_all(vm_page_t m) { register pv_entry_t pv; + pmap_t pmap; pt_entry_t *pte, tpte; pd_entry_t ptepde; @@ -1780,12 +1923,13 @@ #endif mtx_assert(&vm_page_queue_mtx, MA_OWNED); while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { - PMAP_LOCK(pv->pv_pmap); - pv->pv_pmap->pm_stats.resident_count--; - pte = pmap_pte_pde(pv->pv_pmap, pv->pv_va, &ptepde); + pmap = PV_PMAP(pv); + PMAP_LOCK(pmap); + pmap->pm_stats.resident_count--; + pte = pmap_pte_pde(pmap, pv->pv_va, &ptepde); tpte = pte_load_clear(pte); if (tpte & PG_W) - pv->pv_pmap->pm_stats.wired_count--; + pmap->pm_stats.wired_count--; if (tpte & PG_A) vm_page_flag_set(m, PG_REFERENCED); @@ -1799,13 +1943,12 @@ if (pmap_track_modified(pv->pv_va)) vm_page_dirty(m); } - pmap_invalidate_page(pv->pv_pmap, pv->pv_va); - TAILQ_REMOVE(&pv->pv_pmap->pm_pvlist, pv, pv_plist); + pmap_invalidate_page(pmap, pv->pv_va); TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); m->md.pv_list_count--; - pmap_unuse_pt(pv->pv_pmap, pv->pv_va, ptepde); - PMAP_UNLOCK(pv->pv_pmap); - free_pv_entry(pv); + pmap_unuse_pt(pmap, pv->pv_va, ptepde); + PMAP_UNLOCK(pmap); + free_pv_entry(pmap, pv); } vm_page_flag_clear(m, PG_WRITEABLE); } @@ -2370,7 +2513,6 @@ vm_offset_t addr; vm_offset_t end_addr = src_addr + len; vm_offset_t va_next; - vm_page_t m; if (dst_addr != src_addr) return; @@ -2396,15 +2538,6 @@ if (addr >= UPT_MIN_ADDRESS) panic("pmap_copy: invalid to pmap_copy page tables"); - /* - * Don't let optional prefaulting of pages make us go - * way below the low water mark of free pages or way - * above high water mark of used pv entries. - */ - if (cnt.v_free_count < cnt.v_free_reserved || - pv_entry_count > pv_entry_high_water) - break; - pml4e = pmap_pml4e(src_pmap, addr); if ((*pml4e & PG_V) == 0) { va_next = (addr + NBPML4) & ~PML4MASK; @@ -2467,16 +2600,16 @@ dst_pte = (pt_entry_t *) PHYS_TO_DMAP(VM_PAGE_TO_PHYS(dstmpte)); dst_pte = &dst_pte[pmap_pte_index(addr)]; - if (*dst_pte == 0) { + if (*dst_pte == 0 && + pmap_try_insert_pv_entry(dst_pmap, addr, + PHYS_TO_VM_PAGE(ptetemp & PG_FRAME))) { /* * Clear the modified and * accessed (referenced) bits * during the copy. */ - m = PHYS_TO_VM_PAGE(ptetemp & PG_FRAME); *dst_pte = ptetemp & ~(PG_M | PG_A); dst_pmap->pm_stats.resident_count++; - pmap_insert_entry(dst_pmap, addr, m); } else pmap_unwire_pte_hold(dst_pmap, addr, dstmpte); if (dstmpte->wire_count >= srcmpte->wire_count) @@ -2569,7 +2702,7 @@ mtx_assert(&vm_page_queue_mtx, MA_OWNED); TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { - if (pv->pv_pmap == pmap) { + if (PV_PMAP(pv) == pmap) { return TRUE; } loops++; @@ -2579,7 +2712,6 @@ return (FALSE); } -#define PMAP_REMOVE_PAGES_CURPROC_ONLY /* * Remove all pages from specified address space * this aids process exit speeds. Also, this code @@ -2589,79 +2721,95 @@ * in the case of running down an entire address space. */ void -pmap_remove_pages(pmap, sva, eva) - pmap_t pmap; - vm_offset_t sva, eva; +pmap_remove_pages(pmap_t pmap) { pt_entry_t *pte, tpte; vm_page_t m; - pv_entry_t pv, npv; + pv_entry_t pv; + struct pv_chunk *pc, *npc; + int field, idx; + int64_t bit; + uint64_t inuse, bitmask; + int allfree; -#ifdef PMAP_REMOVE_PAGES_CURPROC_ONLY if (pmap != vmspace_pmap(curthread->td_proc->p_vmspace)) { printf("warning: pmap_remove_pages called with non-current pmap\n"); return; } -#endif vm_page_lock_queues(); PMAP_LOCK(pmap); - for (pv = TAILQ_FIRST(&pmap->pm_pvlist); pv; pv = npv) { + TAILQ_FOREACH_SAFE(pc, &pmap->pm_pvchunk, pc_list, npc) { + allfree = 1; + for (field = 0; field < _NPCM; field++) { + inuse = (~(pc->pc_map[field])) & pc_freemask[field]; + while (inuse != 0) { >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604050135.k351Z4kX014887>