svn commit: r208558 - in projects/altix/sys: amd64/amd64 amd64/ia32 amd64/include amd64/linux32 arm/arm arm/include boot boot/arm/uboot boot/common boot/fdt boot/forth boot/i386/zfsboot boot/powerp...

Marcel Moolenaar marcel at FreeBSD.org
Wed May 26 04:14:30 UTC 2010


Author: marcel
Date: Wed May 26 04:14:29 2010
New Revision: 208558
URL: http://svn.freebsd.org/changeset/base/208558

Log:
  Merge svn+ssh://svn.freebsd.org/base/head@208557

Added:
  projects/altix/sys/boot/fdt/
     - copied from r208557, head/sys/boot/fdt/
  projects/altix/sys/cddl/compat/opensolaris/sys/taskq.h
     - copied unchanged from r208557, head/sys/cddl/compat/opensolaris/sys/taskq.h
  projects/altix/sys/dev/usb/input/uep.c
     - copied unchanged from r208557, head/sys/dev/usb/input/uep.c
  projects/altix/sys/mips/rmi/mpwait.S
     - copied unchanged from r208557, head/sys/mips/rmi/mpwait.S
  projects/altix/sys/modules/usb/uep/
     - copied from r208557, head/sys/modules/usb/uep/
  projects/altix/sys/powerpc/powermac/uninorthpci.c
     - copied unchanged from r208557, head/sys/powerpc/powermac/uninorthpci.c
  projects/altix/sys/x86/x86/
     - copied from r208557, head/sys/x86/x86/
Deleted:
  projects/altix/sys/amd64/amd64/local_apic.c
  projects/altix/sys/i386/i386/local_apic.c
  projects/altix/sys/mips/rmi/ehcireg.h
  projects/altix/sys/mips/rmi/ehcivar.h
  projects/altix/sys/mips/rmi/pcibus.c
  projects/altix/sys/mips/rmi/perfmon.h
  projects/altix/sys/mips/rmi/perfmon_kern.c
  projects/altix/sys/mips/rmi/perfmon_percpu.c
  projects/altix/sys/mips/rmi/perfmon_utils.h
  projects/altix/sys/mips/rmi/perfmon_xlrconfig.h
  projects/altix/sys/mips/rmi/xlr_boot1_console.c
  projects/altix/sys/powerpc/powermac/cpchtvar.h
Modified:
  projects/altix/sys/amd64/amd64/apic_vector.S
  projects/altix/sys/amd64/amd64/db_interface.c
  projects/altix/sys/amd64/amd64/elf_machdep.c
  projects/altix/sys/amd64/amd64/exception.S
  projects/altix/sys/amd64/amd64/mca.c
  projects/altix/sys/amd64/amd64/mp_machdep.c
  projects/altix/sys/amd64/amd64/pmap.c
  projects/altix/sys/amd64/amd64/trap.c
  projects/altix/sys/amd64/ia32/ia32_syscall.c
  projects/altix/sys/amd64/include/apicreg.h
  projects/altix/sys/amd64/include/apicvar.h
  projects/altix/sys/amd64/include/atomic.h
  projects/altix/sys/amd64/include/clock.h
  projects/altix/sys/amd64/include/mca.h
  projects/altix/sys/amd64/include/pcpu.h
  projects/altix/sys/amd64/include/proc.h
  projects/altix/sys/amd64/include/specialreg.h
  projects/altix/sys/amd64/linux32/linux32_sysvec.c
  projects/altix/sys/arm/arm/elf_machdep.c
  projects/altix/sys/arm/arm/identcpu.c
  projects/altix/sys/arm/arm/pmap.c
  projects/altix/sys/arm/arm/trap.c
  projects/altix/sys/arm/include/disassem.h
  projects/altix/sys/arm/include/md_var.h
  projects/altix/sys/arm/include/metadata.h
  projects/altix/sys/boot/Makefile
  projects/altix/sys/boot/arm/uboot/Makefile
  projects/altix/sys/boot/arm/uboot/version
  projects/altix/sys/boot/common/module.c
  projects/altix/sys/boot/forth/loader.conf.5
  projects/altix/sys/boot/i386/zfsboot/zfsboot.c
  projects/altix/sys/boot/powerpc/uboot/Makefile
  projects/altix/sys/boot/powerpc/uboot/version
  projects/altix/sys/boot/uboot/common/main.c
  projects/altix/sys/boot/uboot/common/metadata.c
  projects/altix/sys/boot/uboot/lib/Makefile
  projects/altix/sys/boot/uboot/lib/disk.c
  projects/altix/sys/boot/uboot/lib/glue.c
  projects/altix/sys/cam/ata/ata_da.c
  projects/altix/sys/cam/ata/ata_xpt.c
  projects/altix/sys/cam/scsi/scsi_sg.c
  projects/altix/sys/cam/scsi/scsi_xpt.c
  projects/altix/sys/cddl/boot/zfs/zfsimpl.h
  projects/altix/sys/cddl/compat/opensolaris/kern/opensolaris_taskq.c
  projects/altix/sys/cddl/compat/opensolaris/sys/dnlc.h
  projects/altix/sys/cddl/compat/opensolaris/sys/sysmacros.h
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scrub.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_traverse.h
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_zfetch.h
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/txg_impl.h
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_dir.h
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
  projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
  projects/altix/sys/cddl/dev/systrace/systrace.c
  projects/altix/sys/compat/ia32/ia32_sysvec.c
  projects/altix/sys/compat/ia32/ia32_util.h
  projects/altix/sys/compat/linux/linux_ioctl.c
  projects/altix/sys/compat/linux/linux_ioctl.h
  projects/altix/sys/compat/svr4/svr4_sysvec.c
  projects/altix/sys/conf/NOTES
  projects/altix/sys/conf/files
  projects/altix/sys/conf/files.amd64
  projects/altix/sys/conf/files.i386
  projects/altix/sys/conf/files.pc98
  projects/altix/sys/conf/files.powerpc
  projects/altix/sys/conf/files.sparc64
  projects/altix/sys/conf/options
  projects/altix/sys/contrib/dev/run/rt2870.fw.uu
  projects/altix/sys/ddb/db_command.c
  projects/altix/sys/ddb/db_command.h
  projects/altix/sys/ddb/db_output.c
  projects/altix/sys/ddb/db_thread.c
  projects/altix/sys/ddb/ddb.h
  projects/altix/sys/dev/acpica/acpi.c
  projects/altix/sys/dev/acpica/acpi_hpet.c
  projects/altix/sys/dev/acpica/acpivar.h
  projects/altix/sys/dev/ahci/ahci.c
  projects/altix/sys/dev/ata/ata-all.c
  projects/altix/sys/dev/ata/ata-disk.c
  projects/altix/sys/dev/ata/ata-pci.c
  projects/altix/sys/dev/ata/ata-pci.h
  projects/altix/sys/dev/ata/chipsets/ata-serverworks.c
  projects/altix/sys/dev/bwn/if_bwn.c
  projects/altix/sys/dev/cxgb/cxgb_main.c
  projects/altix/sys/dev/e1000/if_em.c
  projects/altix/sys/dev/e1000/if_igb.c
  projects/altix/sys/dev/e1000/if_lem.c
  projects/altix/sys/dev/esp/esp_sbus.c
  projects/altix/sys/dev/fb/vesa.c
  projects/altix/sys/dev/fxp/if_fxp.c
  projects/altix/sys/dev/fxp/if_fxpreg.h
  projects/altix/sys/dev/fxp/if_fxpvar.h
  projects/altix/sys/dev/ipw/if_ipw.c
  projects/altix/sys/dev/isp/isp_freebsd.c
  projects/altix/sys/dev/isp/ispvar.h
  projects/altix/sys/dev/ixgbe/ixgbe.c
  projects/altix/sys/dev/ixgbe/ixgbe.h
  projects/altix/sys/dev/mmc/mmc.c
  projects/altix/sys/dev/mvs/mvs.c
  projects/altix/sys/dev/mvs/mvs_pci.c
  projects/altix/sys/dev/mvs/mvs_soc.c
  projects/altix/sys/dev/mxge/eth_z8e.h
  projects/altix/sys/dev/mxge/ethp_z8e.h
  projects/altix/sys/dev/mxge/if_mxge.c
  projects/altix/sys/dev/mxge/rss_eth_z8e.h
  projects/altix/sys/dev/mxge/rss_ethp_z8e.h
  projects/altix/sys/dev/pci/pci.c
  projects/altix/sys/dev/puc/pucdata.c
  projects/altix/sys/dev/sge/if_sge.c
  projects/altix/sys/dev/sge/if_sgereg.h
  projects/altix/sys/dev/siis/siis.c
  projects/altix/sys/dev/syscons/syscons.c
  projects/altix/sys/dev/syscons/syscons.h
  projects/altix/sys/dev/usb/controller/ehci.c
  projects/altix/sys/dev/usb/controller/usb_controller.c
  projects/altix/sys/dev/usb/input/ums.c
  projects/altix/sys/dev/usb/net/uhso.c
  projects/altix/sys/dev/usb/quirk/usb_quirk.c
  projects/altix/sys/dev/usb/serial/u3g.c
  projects/altix/sys/dev/usb/serial/uftdi.c
  projects/altix/sys/dev/usb/usb_dev.c
  projects/altix/sys/dev/usb/usb_device.c
  projects/altix/sys/dev/usb/usb_device.h
  projects/altix/sys/dev/usb/usb_generic.c
  projects/altix/sys/dev/usb/usb_hid.c
  projects/altix/sys/dev/usb/usb_hub.c
  projects/altix/sys/dev/usb/usb_request.c
  projects/altix/sys/dev/usb/usbdevs
  projects/altix/sys/dev/usb/usbhid.h
  projects/altix/sys/dev/usb/wlan/if_run.c
  projects/altix/sys/dev/usb/wlan/if_runreg.h
  projects/altix/sys/dev/usb/wlan/if_runvar.h
  projects/altix/sys/fs/nfsclient/nfs_clsubs.c
  projects/altix/sys/fs/nfsclient/nfs_clvfsops.c
  projects/altix/sys/fs/nullfs/null_vnops.c
  projects/altix/sys/fs/procfs/procfs_ctl.c
  projects/altix/sys/geom/multipath/g_multipath.c
  projects/altix/sys/geom/part/g_part_apm.c
  projects/altix/sys/geom/part/g_part_vtoc8.c
  projects/altix/sys/geom/vinum/geom_vinum.c
  projects/altix/sys/geom/vinum/geom_vinum.h
  projects/altix/sys/geom/vinum/geom_vinum_events.c
  projects/altix/sys/geom/vinum/geom_vinum_var.h
  projects/altix/sys/geom/zero/g_zero.c
  projects/altix/sys/i386/i386/apic_vector.s
  projects/altix/sys/i386/i386/elf_machdep.c
  projects/altix/sys/i386/i386/geode.c
  projects/altix/sys/i386/i386/mca.c
  projects/altix/sys/i386/i386/mp_machdep.c
  projects/altix/sys/i386/i386/pmap.c
  projects/altix/sys/i386/i386/trap.c
  projects/altix/sys/i386/ibcs2/ibcs2_sysvec.c
  projects/altix/sys/i386/include/apicreg.h
  projects/altix/sys/i386/include/apicvar.h
  projects/altix/sys/i386/include/atomic.h
  projects/altix/sys/i386/include/clock.h
  projects/altix/sys/i386/include/mca.h
  projects/altix/sys/i386/include/pcpu.h
  projects/altix/sys/i386/include/proc.h
  projects/altix/sys/i386/include/specialreg.h
  projects/altix/sys/i386/linux/linux_sysvec.c
  projects/altix/sys/i386/xen/pmap.c
  projects/altix/sys/ia64/ia32/ia32_trap.c
  projects/altix/sys/ia64/ia64/db_machdep.c
  projects/altix/sys/ia64/ia64/elf_machdep.c
  projects/altix/sys/ia64/ia64/pmap.c
  projects/altix/sys/ia64/ia64/trap.c
  projects/altix/sys/ia64/include/ia64_cpu.h
  projects/altix/sys/ia64/include/pmap.h
  projects/altix/sys/ia64/include/proc.h
  projects/altix/sys/ia64/include/runq.h
  projects/altix/sys/ia64/include/sal.h
  projects/altix/sys/ia64/include/vmparam.h
  projects/altix/sys/isa/syscons_isa.c
  projects/altix/sys/kern/imgact_aout.c
  projects/altix/sys/kern/init_main.c
  projects/altix/sys/kern/kern_clock.c
  projects/altix/sys/kern/kern_exec.c
  projects/altix/sys/kern/kern_kthread.c
  projects/altix/sys/kern/kern_mutex.c
  projects/altix/sys/kern/kern_resource.c
  projects/altix/sys/kern/kern_sig.c
  projects/altix/sys/kern/kern_thread.c
  projects/altix/sys/kern/sched_4bsd.c
  projects/altix/sys/kern/sched_ule.c
  projects/altix/sys/kern/subr_pcpu.c
  projects/altix/sys/kern/subr_smp.c
  projects/altix/sys/kern/subr_trap.c
  projects/altix/sys/kern/subr_uio.c
  projects/altix/sys/kern/subr_witness.c
  projects/altix/sys/kern/sys_generic.c
  projects/altix/sys/kern/sys_pipe.c
  projects/altix/sys/kern/sys_process.c
  projects/altix/sys/kern/vfs_bio.c
  projects/altix/sys/kern/vfs_default.c
  projects/altix/sys/kern/vfs_subr.c
  projects/altix/sys/kern/vnode_if.src
  projects/altix/sys/mips/adm5120/if_admsw.c
  projects/altix/sys/mips/conf/XLR
  projects/altix/sys/mips/include/asm.h
  projects/altix/sys/mips/include/hwfunc.h
  projects/altix/sys/mips/include/locore.h
  projects/altix/sys/mips/include/param.h
  projects/altix/sys/mips/include/smp.h
  projects/altix/sys/mips/mips/cpu.c
  projects/altix/sys/mips/mips/db_trace.c
  projects/altix/sys/mips/mips/elf64_machdep.c
  projects/altix/sys/mips/mips/elf_machdep.c
  projects/altix/sys/mips/mips/machdep.c
  projects/altix/sys/mips/mips/mp_machdep.c
  projects/altix/sys/mips/mips/mpboot.S
  projects/altix/sys/mips/mips/pmap.c
  projects/altix/sys/mips/mips/swtch.S
  projects/altix/sys/mips/mips/trap.c
  projects/altix/sys/mips/rmi/dev/xlr/rge.c
  projects/altix/sys/mips/rmi/files.xlr
  projects/altix/sys/mips/rmi/interrupt.h
  projects/altix/sys/mips/rmi/intr_machdep.c
  projects/altix/sys/mips/rmi/iodi.c
  projects/altix/sys/mips/rmi/on_chip.c
  projects/altix/sys/mips/rmi/pic.h
  projects/altix/sys/mips/rmi/xlr_machdep.c
  projects/altix/sys/mips/rmi/xlr_pci.c
  projects/altix/sys/mips/rmi/xlrconfig.h
  projects/altix/sys/mips/sibyte/sb_machdep.c
  projects/altix/sys/modules/Makefile
  projects/altix/sys/modules/ata/atadisk/Makefile
  projects/altix/sys/modules/cam/Makefile
  projects/altix/sys/modules/cas/Makefile
  projects/altix/sys/modules/linux/Makefile
  projects/altix/sys/modules/mvs/Makefile
  projects/altix/sys/modules/uart/Makefile
  projects/altix/sys/modules/zfs/Makefile
  projects/altix/sys/net/flowtable.c
  projects/altix/sys/net/flowtable.h
  projects/altix/sys/net/if.c
  projects/altix/sys/net/if_var.h
  projects/altix/sys/net/if_vlan.c
  projects/altix/sys/net/route.c
  projects/altix/sys/net/rtsock.c
  projects/altix/sys/net/vnet.c
  projects/altix/sys/netgraph/ng_base.c
  projects/altix/sys/netgraph/ng_socket.c
  projects/altix/sys/netinet/in.c
  projects/altix/sys/netinet/in_pcb.c
  projects/altix/sys/netinet/ip_options.c
  projects/altix/sys/netinet/ip_output.c
  projects/altix/sys/netinet/sctp_bsd_addr.c
  projects/altix/sys/netinet/sctp_bsd_addr.h
  projects/altix/sys/netinet/sctp_constants.h
  projects/altix/sys/netinet/sctp_indata.c
  projects/altix/sys/netinet/sctp_input.c
  projects/altix/sys/netinet/sctp_lock_bsd.h
  projects/altix/sys/netinet/sctp_output.c
  projects/altix/sys/netinet/sctp_pcb.c
  projects/altix/sys/netinet/sctp_pcb.h
  projects/altix/sys/netinet/sctp_structs.h
  projects/altix/sys/netinet/sctp_timer.c
  projects/altix/sys/netinet/sctp_usrreq.c
  projects/altix/sys/netinet/sctputil.c
  projects/altix/sys/netinet6/in6.c
  projects/altix/sys/netinet6/in6_proto.c
  projects/altix/sys/netinet6/ip6_input.c
  projects/altix/sys/netinet6/ip6_output.c
  projects/altix/sys/netinet6/udp6_usrreq.c
  projects/altix/sys/netipsec/ipsec_input.c
  projects/altix/sys/pc98/cbus/clock.c
  projects/altix/sys/pc98/include/md_var.h
  projects/altix/sys/pc98/pc98/pc98_machdep.c
  projects/altix/sys/powerpc/aim/mmu_oea.c
  projects/altix/sys/powerpc/aim/mmu_oea64.c
  projects/altix/sys/powerpc/aim/ofw_machdep.c
  projects/altix/sys/powerpc/aim/trap.c
  projects/altix/sys/powerpc/booke/pmap.c
  projects/altix/sys/powerpc/booke/trap.c
  projects/altix/sys/powerpc/cpufreq/pcr.c
  projects/altix/sys/powerpc/include/intr_machdep.h
  projects/altix/sys/powerpc/include/metadata.h
  projects/altix/sys/powerpc/include/pmap.h
  projects/altix/sys/powerpc/include/proc.h
  projects/altix/sys/powerpc/ofw/ofw_pcibus.c
  projects/altix/sys/powerpc/powermac/ata_kauai.c
  projects/altix/sys/powerpc/powermac/cpcht.c
  projects/altix/sys/powerpc/powermac/smu.c
  projects/altix/sys/powerpc/powermac/uninorth.c
  projects/altix/sys/powerpc/powermac/uninorthvar.h
  projects/altix/sys/powerpc/powerpc/elf_machdep.c
  projects/altix/sys/powerpc/powerpc/mmu_if.m
  projects/altix/sys/powerpc/powerpc/openpic.c
  projects/altix/sys/powerpc/powerpc/pmap_dispatch.c
  projects/altix/sys/sparc64/include/md_var.h
  projects/altix/sys/sparc64/include/proc.h
  projects/altix/sys/sparc64/pci/schizo.c
  projects/altix/sys/sparc64/pci/schizoreg.h
  projects/altix/sys/sparc64/pci/schizovar.h
  projects/altix/sys/sparc64/sparc64/ata_machdep.c
  projects/altix/sys/sparc64/sparc64/elf_machdep.c
  projects/altix/sys/sparc64/sparc64/pmap.c
  projects/altix/sys/sparc64/sparc64/trap.c
  projects/altix/sys/sun4v/include/proc.h
  projects/altix/sys/sun4v/sun4v/pmap.c
  projects/altix/sys/sun4v/sun4v/trap.c
  projects/altix/sys/sys/endian.h
  projects/altix/sys/sys/eventhandler.h
  projects/altix/sys/sys/kernel.h
  projects/altix/sys/sys/kthread.h
  projects/altix/sys/sys/lock.h
  projects/altix/sys/sys/param.h
  projects/altix/sys/sys/pcpu.h
  projects/altix/sys/sys/proc.h
  projects/altix/sys/sys/ptrace.h
  projects/altix/sys/sys/resourcevar.h
  projects/altix/sys/sys/sysent.h
  projects/altix/sys/sys/systm.h
  projects/altix/sys/sys/vmmeter.h
  projects/altix/sys/sys/vnode.h
  projects/altix/sys/ufs/ffs/ffs_softdep.c
  projects/altix/sys/ufs/ffs/ffs_vfsops.c
  projects/altix/sys/ufs/ffs/softdep.h
  projects/altix/sys/vm/pmap.h
  projects/altix/sys/vm/swap_pager.c
  projects/altix/sys/vm/vm_contig.c
  projects/altix/sys/vm/vm_fault.c
  projects/altix/sys/vm/vm_mmap.c
  projects/altix/sys/vm/vm_object.c
  projects/altix/sys/vm/vm_page.c
  projects/altix/sys/vm/vm_page.h
  projects/altix/sys/vm/vm_pageout.c
  projects/altix/sys/x86/isa/clock.c
Directory Properties:
  projects/altix/lib/libstand/   (props changed)
  projects/altix/sys/   (props changed)
  projects/altix/sys/amd64/include/xen/   (props changed)
  projects/altix/sys/cddl/contrib/opensolaris/   (props changed)
  projects/altix/sys/contrib/dev/acpica/   (props changed)
  projects/altix/sys/contrib/x86emu/   (props changed)
  projects/altix/sys/dev/xen/xenpci/   (props changed)

Modified: projects/altix/sys/amd64/amd64/apic_vector.S
==============================================================================
--- projects/altix/sys/amd64/amd64/apic_vector.S	Tue May 25 22:19:51 2010	(r208557)
+++ projects/altix/sys/amd64/amd64/apic_vector.S	Wed May 26 04:14:29 2010	(r208558)
@@ -81,7 +81,7 @@ IDTVEC(spuriousint)
 
 	/* No EOI cycle used here */
 
-	iretq
+	jmp	doreti_iret
 
 	ISR_VEC(1, apic_isr1)
 	ISR_VEC(2, apic_isr2)
@@ -105,6 +105,18 @@ IDTVEC(timerint)
 	jmp	doreti
 
 /*
+ * Local APIC CMCI handler.
+ */
+	.text
+	SUPERALIGN_TEXT
+IDTVEC(cmcint)
+	PUSH_FRAME
+	FAKE_MCOUNT(TF_RIP(%rsp))
+	call	lapic_handle_cmc
+	MEXITCOUNT
+	jmp	doreti
+
+/*
  * Local APIC error interrupt handler.
  */
 	.text
@@ -135,7 +147,7 @@ IDTVEC(invltlb)
 	incl	smp_tlb_wait
 
 	popq	%rax
-	iretq
+	jmp	doreti_iret
 
 /*
  * Single page TLB shootdown
@@ -155,7 +167,7 @@ IDTVEC(invlpg)
 	incl	smp_tlb_wait
 
 	popq	%rax
-	iretq
+	jmp	doreti_iret
 
 /*
  * Page range TLB shootdown.
@@ -181,7 +193,7 @@ IDTVEC(invlrng)
 
 	popq	%rdx
 	popq	%rax
-	iretq
+	jmp	doreti_iret
 
 /*
  * Invalidate cache.
@@ -200,7 +212,7 @@ IDTVEC(invlcache)
 	incl	smp_tlb_wait
 
 	popq	%rax
-	iretq
+	jmp	doreti_iret
 
 /*
  * Handler for IPIs sent via the per-cpu IPI bitmap.
@@ -247,7 +259,7 @@ IDTVEC(cpususpend)
 	call	cpususpend_handler
 
 	POP_FRAME
-	iretq
+	jmp	doreti_iret
 
 /*
  * Executed by a CPU when it receives a RENDEZVOUS IPI from another CPU.

Modified: projects/altix/sys/amd64/amd64/db_interface.c
==============================================================================
--- projects/altix/sys/amd64/amd64/db_interface.c	Tue May 25 22:19:51 2010	(r208557)
+++ projects/altix/sys/amd64/amd64/db_interface.c	Wed May 26 04:14:29 2010	(r208558)
@@ -139,11 +139,11 @@ void
 db_show_mdpcpu(struct pcpu *pc)
 {
 
-	db_printf("curpmap		= %p\n", pc->pc_curpmap);
-	db_printf("tssp		= %p\n", pc->pc_tssp);
-	db_printf("commontssp	= %p\n", pc->pc_commontssp);
-	db_printf("rsp0		= 0x%lx\n", pc->pc_rsp0);
-	db_printf("gs32p		= %p\n", pc->pc_gs32p);
-	db_printf("ldt		= %p\n", pc->pc_ldt);
-	db_printf("tss		= %p\n", pc->pc_tss);
+	db_printf("curpmap      = %p\n", pc->pc_curpmap);
+	db_printf("tssp         = %p\n", pc->pc_tssp);
+	db_printf("commontssp   = %p\n", pc->pc_commontssp);
+	db_printf("rsp0         = 0x%lx\n", pc->pc_rsp0);
+	db_printf("gs32p        = %p\n", pc->pc_gs32p);
+	db_printf("ldt          = %p\n", pc->pc_ldt);
+	db_printf("tss          = %p\n", pc->pc_tss);
 }

Modified: projects/altix/sys/amd64/amd64/elf_machdep.c
==============================================================================
--- projects/altix/sys/amd64/amd64/elf_machdep.c	Tue May 25 22:19:51 2010	(r208557)
+++ projects/altix/sys/amd64/amd64/elf_machdep.c	Wed May 26 04:14:29 2010	(r208558)
@@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/exec.h>
 #include <sys/imgact.h>
 #include <sys/linker.h>
+#include <sys/proc.h>
 #include <sys/sysent.h>
 #include <sys/imgact_elf.h>
 #include <sys/syscall.h>
@@ -74,7 +75,10 @@ struct sysentvec elf64_freebsd_sysvec = 
 	.sv_setregs	= exec_setregs,
 	.sv_fixlimit	= NULL,
 	.sv_maxssiz	= NULL,
-	.sv_flags	= SV_ABI_FREEBSD | SV_LP64
+	.sv_flags	= SV_ABI_FREEBSD | SV_LP64,
+	.sv_set_syscall_retval = cpu_set_syscall_retval,
+	.sv_fetch_syscall_args = cpu_fetch_syscall_args,
+	.sv_syscallnames = syscallnames,
 };
 
 static Elf64_Brandinfo freebsd_brand_info = {

Modified: projects/altix/sys/amd64/amd64/exception.S
==============================================================================
--- projects/altix/sys/amd64/amd64/exception.S	Tue May 25 22:19:51 2010	(r208557)
+++ projects/altix/sys/amd64/amd64/exception.S	Wed May 26 04:14:29 2010	(r208558)
@@ -553,7 +553,7 @@ nmi_restoreregs:
 	movq	TF_R14(%rsp),%r14
 	movq	TF_R15(%rsp),%r15
 	addq	$TF_RIP,%rsp
-	iretq
+	jmp	doreti_iret
 
 ENTRY(fork_trampoline)
 	movq	%r12,%rdi		/* function */

Modified: projects/altix/sys/amd64/amd64/mca.c
==============================================================================
--- projects/altix/sys/amd64/amd64/mca.c	Tue May 25 22:19:51 2010	(r208557)
+++ projects/altix/sys/amd64/amd64/mca.c	Wed May 26 04:14:29 2010	(r208558)
@@ -33,6 +33,8 @@
 __FBSDID("$FreeBSD$");
 
 #include <sys/param.h>
+#include <sys/bus.h>
+#include <sys/interrupt.h>
 #include <sys/kernel.h>
 #include <sys/lock.h>
 #include <sys/malloc.h>
@@ -43,11 +45,29 @@ __FBSDID("$FreeBSD$");
 #include <sys/sysctl.h>
 #include <sys/systm.h>
 #include <sys/taskqueue.h>
+#include <machine/intr_machdep.h>
+#include <machine/apicvar.h>
 #include <machine/cputypes.h>
 #include <machine/mca.h>
 #include <machine/md_var.h>
 #include <machine/specialreg.h>
 
+/* Modes for mca_scan() */
+enum scan_mode {
+	POLLED,
+	MCE,
+	CMCI,
+};
+
+/*
+ * State maintained for each monitored MCx bank to control the
+ * corrected machine check interrupt threshold.
+ */
+struct cmc_state {
+	int	max_threshold;
+	int	last_intr;
+};
+
 struct mca_internal {
 	struct mca_record rec;
 	int		logged;
@@ -79,19 +99,22 @@ static struct callout mca_timer;
 static int mca_ticks = 3600;	/* Check hourly by default. */
 static struct task mca_task;
 static struct mtx mca_lock;
+static struct cmc_state **cmc_state;	/* Indexed by cpuid, bank */
+static int cmc_banks;
+static int cmc_throttle = 60;	/* Time in seconds to throttle CMCI. */
 
 static int
-sysctl_mca_ticks(SYSCTL_HANDLER_ARGS)
+sysctl_positive_int(SYSCTL_HANDLER_ARGS)
 {
 	int error, value;
 
-	value = mca_ticks;
+	value = *(int *)arg1;
 	error = sysctl_handle_int(oidp, &value, 0, req);
 	if (error || req->newptr == NULL)
 		return (error);
 	if (value <= 0)
 		return (EINVAL);
-	mca_ticks = value;
+	*(int *)arg1 = value;
 	return (0);
 }
 
@@ -401,31 +424,112 @@ mca_record_entry(const struct mca_record
 }
 
 /*
+ * Update the interrupt threshold for a CMCI.  The strategy is to use
+ * a low trigger that interrupts as soon as the first event occurs.
+ * However, if a steady stream of events arrive, the threshold is
+ * increased until the interrupts are throttled to once every
+ * cmc_throttle seconds or the periodic scan.  If a periodic scan
+ * finds that the threshold is too high, it is lowered.
+ */
+static void
+cmci_update(enum scan_mode mode, int bank, int valid, struct mca_record *rec)
+{
+	struct cmc_state *cc;
+	uint64_t ctl;
+	u_int delta;
+	int count, limit;
+
+	/* Fetch the current limit for this bank. */
+	cc = &cmc_state[PCPU_GET(cpuid)][bank];
+	ctl = rdmsr(MSR_MC_CTL2(bank));
+	count = (rec->mr_status & MC_STATUS_COR_COUNT) >> 38;
+	delta = (u_int)(ticks - cc->last_intr);
+
+	/*
+	 * If an interrupt was received less than cmc_throttle seconds
+	 * since the previous interrupt and the count from the current
+	 * event is greater than or equal to the current threshold,
+	 * double the threshold up to the max.
+	 */
+	if (mode == CMCI && valid) {
+		limit = ctl & MC_CTL2_THRESHOLD;
+		if (delta < cmc_throttle && count >= limit &&
+		    limit < cc->max_threshold) {
+			limit = min(limit << 1, cc->max_threshold);
+			ctl &= ~MC_CTL2_THRESHOLD;
+			ctl |= limit;
+			wrmsr(MSR_MC_CTL2(bank), limit);
+		}
+		cc->last_intr = ticks;
+		return;
+	}
+
+	/*
+	 * When the banks are polled, check to see if the threshold
+	 * should be lowered.
+	 */
+	if (mode != POLLED)
+		return;
+
+	/* If a CMCI occured recently, do nothing for now. */
+	if (delta < cmc_throttle)
+		return;
+
+	/*
+	 * Compute a new limit based on the average rate of events per
+	 * cmc_throttle seconds since the last interrupt.
+	 */
+	if (valid) {
+		count = (rec->mr_status & MC_STATUS_COR_COUNT) >> 38;
+		limit = count * cmc_throttle / delta;
+		if (limit <= 0)
+			limit = 1;
+		else if (limit > cc->max_threshold)
+			limit = cc->max_threshold;
+	} else
+		limit = 1;
+	if ((ctl & MC_CTL2_THRESHOLD) != limit) {
+		ctl &= ~MC_CTL2_THRESHOLD;
+		ctl |= limit;
+		wrmsr(MSR_MC_CTL2(bank), limit);
+	}
+}
+
+/*
  * This scans all the machine check banks of the current CPU to see if
  * there are any machine checks.  Any non-recoverable errors are
  * reported immediately via mca_log().  The current thread must be
- * pinned when this is called.  The 'mcip' parameter indicates if we
- * are being called from the MC exception handler.  In that case this
- * function returns true if the system is restartable.  Otherwise, it
- * returns a count of the number of valid MC records found.
+ * pinned when this is called.  The 'mode' parameter indicates if we
+ * are being called from the MC exception handler, the CMCI handler,
+ * or the periodic poller.  In the MC exception case this function
+ * returns true if the system is restartable.  Otherwise, it returns a
+ * count of the number of valid MC records found.
  */
 static int
-mca_scan(int mcip)
+mca_scan(enum scan_mode mode)
 {
 	struct mca_record rec;
 	uint64_t mcg_cap, ucmask;
-	int count, i, recoverable;
+	int count, i, recoverable, valid;
 
 	count = 0;
 	recoverable = 1;
 	ucmask = MC_STATUS_UC | MC_STATUS_PCC;
 
 	/* When handling a MCE#, treat the OVER flag as non-restartable. */
-	if (mcip)
+	if (mode == MCE)
 		ucmask |= MC_STATUS_OVER;
 	mcg_cap = rdmsr(MSR_MCG_CAP);
 	for (i = 0; i < (mcg_cap & MCG_CAP_COUNT); i++) {
-		if (mca_check_status(i, &rec)) {
+		/*
+		 * For a CMCI, only check banks this CPU is
+		 * responsible for.
+		 */
+		if (mode == CMCI && !(PCPU_GET(cmci_mask) & 1 << i))
+			continue;
+
+		valid = mca_check_status(i, &rec);
+		if (valid) {
 			count++;
 			if (rec.mr_status & ucmask) {
 				recoverable = 0;
@@ -433,8 +537,15 @@ mca_scan(int mcip)
 			}
 			mca_record_entry(&rec);
 		}
+	
+		/*
+		 * If this is a bank this CPU monitors via CMCI,
+		 * update the threshold.
+		 */
+		if (PCPU_GET(cmci_mask) & (1 << i))
+			cmci_update(mode, i, valid, &rec);
 	}
-	return (mcip ? recoverable : count);
+	return (mode == MCE ? recoverable : count);
 }
 
 /*
@@ -457,7 +568,7 @@ mca_scan_cpus(void *context, int pending
 			continue;
 		sched_bind(td, cpu);
 		thread_unlock(td);
-		count += mca_scan(0);
+		count += mca_scan(POLLED);
 		thread_lock(td);
 		sched_unbind(td);
 	}
@@ -511,7 +622,24 @@ mca_startup(void *dummy)
 SYSINIT(mca_startup, SI_SUB_SMP, SI_ORDER_ANY, mca_startup, NULL);
 
 static void
-mca_setup(void)
+cmci_setup(uint64_t mcg_cap)
+{
+	int i;
+
+	cmc_state = malloc((mp_maxid + 1) * sizeof(struct cmc_state **),
+	    M_MCA, M_WAITOK);
+	cmc_banks = mcg_cap & MCG_CAP_COUNT;
+	for (i = 0; i <= mp_maxid; i++)
+		cmc_state[i] = malloc(sizeof(struct cmc_state) * cmc_banks,
+		    M_MCA, M_WAITOK | M_ZERO);
+	SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO,
+	    "cmc_throttle", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE,
+	    &cmc_throttle, 0, sysctl_positive_int, "I",
+	    "Interval in seconds to throttle corrected MC interrupts");
+}
+
+static void
+mca_setup(uint64_t mcg_cap)
 {
 
 	mtx_init(&mca_lock, "mca", NULL, MTX_SPIN);
@@ -522,13 +650,62 @@ mca_setup(void)
 	    "count", CTLFLAG_RD, &mca_count, 0, "Record count");
 	SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO,
 	    "interval", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, &mca_ticks,
-	    0, sysctl_mca_ticks, "I",
+	    0, sysctl_positive_int, "I",
 	    "Periodic interval in seconds to scan for machine checks");
 	SYSCTL_ADD_NODE(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO,
 	    "records", CTLFLAG_RD, sysctl_mca_records, "Machine check records");
 	SYSCTL_ADD_PROC(NULL, SYSCTL_STATIC_CHILDREN(_hw_mca), OID_AUTO,
 	    "force_scan", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, 0,
 	    sysctl_mca_scan, "I", "Force an immediate scan for machine checks");
+	if (mcg_cap & MCG_CAP_CMCI_P)
+		cmci_setup(mcg_cap);
+}
+
+/*
+ * See if we should monitor CMCI for this bank.  If CMCI_EN is already
+ * set in MC_CTL2, then another CPU is responsible for this bank, so
+ * ignore it.  If CMCI_EN returns zero after being set, then this bank
+ * does not support CMCI_EN.  If this CPU sets CMCI_EN, then it should
+ * now monitor this bank.
+ */
+static void
+cmci_monitor(int i)
+{
+	struct cmc_state *cc;
+	uint64_t ctl;
+
+	KASSERT(i < cmc_banks, ("CPU %d has more MC banks", PCPU_GET(cpuid)));
+
+	ctl = rdmsr(MSR_MC_CTL2(i));
+	if (ctl & MC_CTL2_CMCI_EN)
+		/* Already monitored by another CPU. */
+		return;
+
+	/* Set the threshold to one event for now. */
+	ctl &= ~MC_CTL2_THRESHOLD;
+	ctl |= MC_CTL2_CMCI_EN | 1;
+	wrmsr(MSR_MC_CTL2(i), ctl);
+	ctl = rdmsr(MSR_MC_CTL2(i));
+	if (!(ctl & MC_CTL2_CMCI_EN))
+		/* This bank does not support CMCI. */
+		return;
+
+	cc = &cmc_state[PCPU_GET(cpuid)][i];
+
+	/* Determine maximum threshold. */
+	ctl &= ~MC_CTL2_THRESHOLD;
+	ctl |= 0x7fff;
+	wrmsr(MSR_MC_CTL2(i), ctl);
+	ctl = rdmsr(MSR_MC_CTL2(i));
+	cc->max_threshold = ctl & MC_CTL2_THRESHOLD;
+
+	/* Start off with a threshold of 1. */
+	ctl &= ~MC_CTL2_THRESHOLD;
+	ctl |= 1;
+	wrmsr(MSR_MC_CTL2(i), ctl);
+
+	/* Mark this bank as monitored. */
+	PCPU_SET(cmci_mask, PCPU_GET(cmci_mask) | 1 << i);
 }
 
 /* Must be executed on each CPU. */
@@ -554,14 +731,14 @@ mca_init(void)
 		workaround_erratum383 = 1;
 
 	if (cpu_feature & CPUID_MCA) {
-		if (PCPU_GET(cpuid) == 0)
-			mca_setup();
+		PCPU_SET(cmci_mask, 0);
 
-		sched_pin();
 		mcg_cap = rdmsr(MSR_MCG_CAP);
 		if (mcg_cap & MCG_CAP_CTL_P)
 			/* Enable MCA features. */
 			wrmsr(MSR_MCG_CTL, MCG_CTL_ENABLE);
+		if (PCPU_GET(cpuid) == 0)
+			mca_setup(mcg_cap);
 
 		/*
 		 * Disable logging of level one TLB parity (L1TP) errors by
@@ -597,10 +774,16 @@ mca_init(void)
 
 			if (!skip)
 				wrmsr(MSR_MC_CTL(i), ctl);
+
+			if (mcg_cap & MCG_CAP_CMCI_P)
+				cmci_monitor(i);
+
 			/* Clear all errors. */
 			wrmsr(MSR_MC_STATUS(i), 0);
 		}
-		sched_unpin();
+
+		if (PCPU_GET(cmci_mask) != 0)
+			lapic_enable_cmc();
 	}
 
 	load_cr4(rcr4() | CR4_MCE);
@@ -624,7 +807,7 @@ mca_intr(void)
 	}
 
 	/* Scan the banks and check for any non-recoverable errors. */
-	recoverable = mca_scan(1);
+	recoverable = mca_scan(MCE);
 	mcg_status = rdmsr(MSR_MCG_STATUS);
 	if (!(mcg_status & MCG_STATUS_RIPV))
 		recoverable = 0;
@@ -633,3 +816,31 @@ mca_intr(void)
 	wrmsr(MSR_MCG_STATUS, mcg_status & ~MCG_STATUS_MCIP);
 	return (recoverable);
 }
+
+/* Called for a CMCI (correctable machine check interrupt). */
+void
+cmc_intr(void)
+{
+	struct mca_internal *mca;
+	int count;
+
+	/*
+	 * Serialize MCA bank scanning to prevent collisions from
+	 * sibling threads.
+	 */
+	count = mca_scan(CMCI);
+
+	/* If we found anything, log them to the console. */
+	if (count != 0) {
+		mtx_lock_spin(&mca_lock);
+		STAILQ_FOREACH(mca, &mca_records, link) {
+			if (!mca->logged) {
+				mca->logged = 1;
+				mtx_unlock_spin(&mca_lock);
+				mca_log(&mca->rec);
+				mtx_lock_spin(&mca_lock);
+			}
+		}
+		mtx_unlock_spin(&mca_lock);
+	}
+}

Modified: projects/altix/sys/amd64/amd64/mp_machdep.c
==============================================================================
--- projects/altix/sys/amd64/amd64/mp_machdep.c	Tue May 25 22:19:51 2010	(r208557)
+++ projects/altix/sys/amd64/amd64/mp_machdep.c	Wed May 26 04:14:29 2010	(r208558)
@@ -1112,9 +1112,6 @@ ipi_bitmap_handler(struct trapframe fram
 
 	if (ipi_bitmap & (1 << IPI_STATCLOCK))
 		statclockintr(&frame);
-
-	if (ipi_bitmap & (1 << IPI_PROFCLOCK))
-		profclockintr(&frame);
 }
 
 /*

Modified: projects/altix/sys/amd64/amd64/pmap.c
==============================================================================
--- projects/altix/sys/amd64/amd64/pmap.c	Tue May 25 22:19:51 2010	(r208557)
+++ projects/altix/sys/amd64/amd64/pmap.c	Wed May 26 04:14:29 2010	(r208558)
@@ -2796,7 +2796,7 @@ pmap_remove_all(vm_page_t m)
 
 	KASSERT((m->flags & PG_FICTITIOUS) == 0,
 	    ("pmap_remove_all: page %p is fictitious", m));
-	mtx_assert(&vm_page_queue_mtx, MA_OWNED);
+	vm_page_lock_queues();
 	pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m));
 	while ((pv = TAILQ_FIRST(&pvh->pv_list)) != NULL) {
 		pmap = PV_PMAP(pv);
@@ -2834,6 +2834,7 @@ pmap_remove_all(vm_page_t m)
 		PMAP_UNLOCK(pmap);
 	}
 	vm_page_flag_clear(m, PG_WRITEABLE);
+	vm_page_unlock_queues();
 }
 
 /*
@@ -3138,7 +3139,10 @@ pmap_enter(pmap_t pmap, vm_offset_t va, 
 	va = trunc_page(va);
 	KASSERT(va <= VM_MAX_KERNEL_ADDRESS, ("pmap_enter: toobig"));
 	KASSERT(va < UPT_MIN_ADDRESS || va >= UPT_MAX_ADDRESS,
-	    ("pmap_enter: invalid to pmap_enter page table pages (va: 0x%lx)", va));
+	    ("pmap_enter: invalid to pmap_enter page table pages (va: 0x%lx)",
+	    va));
+	KASSERT((m->oflags & VPO_BUSY) != 0,
+	    ("pmap_enter: page %p is not busy", m));
 
 	mpte = NULL;
 
@@ -3414,8 +3418,10 @@ void
 pmap_enter_quick(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot)
 {
 
+	vm_page_lock_queues();
 	PMAP_LOCK(pmap);
-	(void) pmap_enter_quick_locked(pmap, va, m, prot, NULL);
+	(void)pmap_enter_quick_locked(pmap, va, m, prot, NULL);
+	vm_page_unlock_queues();
 	PMAP_UNLOCK(pmap);
 }
 
@@ -3926,8 +3932,11 @@ pmap_page_wired_mappings(vm_page_t m)
 	count = 0;
 	if ((m->flags & PG_FICTITIOUS) != 0)
 		return (count);
+	vm_page_lock_queues();
 	count = pmap_pvh_wired_mappings(&m->md, count);
-	return (pmap_pvh_wired_mappings(pa_to_pvh(VM_PAGE_TO_PHYS(m)), count));
+	count = pmap_pvh_wired_mappings(pa_to_pvh(VM_PAGE_TO_PHYS(m)), count);
+	vm_page_unlock_queues();
+	return (count);
 }
 
 /*
@@ -4119,12 +4128,25 @@ pmap_remove_pages(pmap_t pmap)
 boolean_t
 pmap_is_modified(vm_page_t m)
 {
+	boolean_t rv;
 
-	if (m->flags & PG_FICTITIOUS)
+	KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0,
+	    ("pmap_is_modified: page %p is not managed", m));
+
+	/*
+	 * If the page is not VPO_BUSY, then PG_WRITEABLE cannot be
+	 * concurrently set while the object is locked.  Thus, if PG_WRITEABLE
+	 * is clear, no PTEs can have PG_M set.
+	 */
+	VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED);
+	if ((m->oflags & VPO_BUSY) == 0 &&
+	    (m->flags & PG_WRITEABLE) == 0)
 		return (FALSE);
-	if (pmap_is_modified_pvh(&m->md))
-		return (TRUE);
-	return (pmap_is_modified_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m))));
+	vm_page_lock_queues();
+	rv = pmap_is_modified_pvh(&m->md) ||
+	    pmap_is_modified_pvh(pa_to_pvh(VM_PAGE_TO_PHYS(m)));
+	vm_page_unlock_queues();
+	return (rv);
 }
 
 /*
@@ -4234,10 +4256,19 @@ pmap_remove_write(vm_page_t m)
 	pt_entry_t oldpte, *pte;
 	vm_offset_t va;
 
-	if ((m->flags & PG_FICTITIOUS) != 0 ||
+	KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0,
+	    ("pmap_remove_write: page %p is not managed", m));
+
+	/*
+	 * If the page is not VPO_BUSY, then PG_WRITEABLE cannot be set by
+	 * another thread while the object is locked.  Thus, if PG_WRITEABLE
+	 * is clear, no page table entries need updating.
+	 */
+	VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED);
+	if ((m->oflags & VPO_BUSY) == 0 &&
 	    (m->flags & PG_WRITEABLE) == 0)
 		return;
-	mtx_assert(&vm_page_queue_mtx, MA_OWNED);
+	vm_page_lock_queues();
 	pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m));
 	TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_list, next_pv) {
 		pmap = PV_PMAP(pv);
@@ -4268,6 +4299,7 @@ retry:
 		PMAP_UNLOCK(pmap);
 	}
 	vm_page_flag_clear(m, PG_WRITEABLE);
+	vm_page_unlock_queues();
 }
 
 /*
@@ -4365,9 +4397,20 @@ pmap_clear_modify(vm_page_t m)
 	pt_entry_t oldpte, *pte;
 	vm_offset_t va;
 
-	if ((m->flags & PG_FICTITIOUS) != 0)
+	KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0,
+	    ("pmap_clear_modify: page %p is not managed", m));
+	VM_OBJECT_LOCK_ASSERT(m->object, MA_OWNED);
+	KASSERT((m->oflags & VPO_BUSY) == 0,
+	    ("pmap_clear_modify: page %p is busy", m));
+
+	/*
+	 * If the page is not PG_WRITEABLE, then no PTEs can have PG_M set.
+	 * If the object containing the page is locked and the page is not
+	 * VPO_BUSY, then PG_WRITEABLE cannot be concurrently set.
+	 */
+	if ((m->flags & PG_WRITEABLE) == 0)
 		return;
-	mtx_assert(&vm_page_queue_mtx, MA_OWNED);
+	vm_page_lock_queues();
 	pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m));
 	TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_list, next_pv) {
 		pmap = PV_PMAP(pv);
@@ -4413,6 +4456,7 @@ pmap_clear_modify(vm_page_t m)
 		}
 		PMAP_UNLOCK(pmap);
 	}
+	vm_page_unlock_queues();
 }
 
 /*
@@ -4430,9 +4474,9 @@ pmap_clear_reference(vm_page_t m)
 	pt_entry_t *pte;
 	vm_offset_t va;
 
-	if ((m->flags & PG_FICTITIOUS) != 0)
-		return;
-	mtx_assert(&vm_page_queue_mtx, MA_OWNED);
+	KASSERT((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0,
+	    ("pmap_clear_reference: page %p is not managed", m));
+	vm_page_lock_queues();
 	pvh = pa_to_pvh(VM_PAGE_TO_PHYS(m));
 	TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_list, next_pv) {
 		pmap = PV_PMAP(pv);
@@ -4469,6 +4513,7 @@ pmap_clear_reference(vm_page_t m)
 		}
 		PMAP_UNLOCK(pmap);
 	}
+	vm_page_unlock_queues();
 }
 
 /*
@@ -4878,70 +4923,49 @@ pmap_change_attr_locked(vm_offset_t va, 
  * perform the pmap work for mincore
  */
 int
-pmap_mincore(pmap_t pmap, vm_offset_t addr)
+pmap_mincore(pmap_t pmap, vm_offset_t addr, vm_paddr_t *locked_pa)
 {
 	pd_entry_t *pdep;
 	pt_entry_t pte;
 	vm_paddr_t pa;
-	vm_page_t m;
-	int val = 0;
-	
+	int val;
+
 	PMAP_LOCK(pmap);
+retry:
 	pdep = pmap_pde(pmap, addr);
 	if (pdep != NULL && (*pdep & PG_V)) {
 		if (*pdep & PG_PS) {
 			pte = *pdep;
-			val = MINCORE_SUPER;
 			/* Compute the physical address of the 4KB page. */
 			pa = ((*pdep & PG_PS_FRAME) | (addr & PDRMASK)) &
 			    PG_FRAME;
+			val = MINCORE_SUPER;
 		} else {
 			pte = *pmap_pde_to_pte(pdep, addr);
 			pa = pte & PG_FRAME;
+			val = 0;
 		}
 	} else {
 		pte = 0;
 		pa = 0;
+		val = 0;
 	}
-	PMAP_UNLOCK(pmap);
-
-	if (pte != 0) {
+	if ((pte & PG_V) != 0) {
 		val |= MINCORE_INCORE;
-		if ((pte & PG_MANAGED) == 0)
-			return (val);
-
-		m = PHYS_TO_VM_PAGE(pa);
-
-		/*
-		 * Modified by us
-		 */
 		if ((pte & (PG_M | PG_RW)) == (PG_M | PG_RW))
-			val |= MINCORE_MODIFIED|MINCORE_MODIFIED_OTHER;
-		else {
-			/*
-			 * Modified by someone else
-			 */
-			vm_page_lock_queues();
-			if (m->dirty || pmap_is_modified(m))
-				val |= MINCORE_MODIFIED_OTHER;
-			vm_page_unlock_queues();
-		}
-		/*
-		 * Referenced by us
-		 */
-		if (pte & PG_A)
-			val |= MINCORE_REFERENCED|MINCORE_REFERENCED_OTHER;
-		else {
-			/*
-			 * Referenced by someone else
-			 */
-			vm_page_lock_queues();
-			if ((m->flags & PG_REFERENCED) ||
-			    pmap_is_referenced(m))
-				val |= MINCORE_REFERENCED_OTHER;
-			vm_page_unlock_queues();
-		}
-	} 
+			val |= MINCORE_MODIFIED | MINCORE_MODIFIED_OTHER;
+		if ((pte & PG_A) != 0)
+			val |= MINCORE_REFERENCED | MINCORE_REFERENCED_OTHER;
+	}
+	if ((val & (MINCORE_MODIFIED_OTHER | MINCORE_REFERENCED_OTHER)) !=
+	    (MINCORE_MODIFIED_OTHER | MINCORE_REFERENCED_OTHER) &&
+	    (pte & (PG_MANAGED | PG_V)) == (PG_MANAGED | PG_V)) {
+		/* Ensure that "PHYS_TO_VM_PAGE(pa)->object" doesn't change. */
+		if (vm_page_pa_tryrelock(pmap, pa, locked_pa))
+			goto retry;
+	} else
+		PA_UNLOCK_COND(*locked_pa);
+	PMAP_UNLOCK(pmap);
 	return (val);
 }
 

Modified: projects/altix/sys/amd64/amd64/trap.c
==============================================================================
--- projects/altix/sys/amd64/amd64/trap.c	Tue May 25 22:19:51 2010	(r208557)
+++ projects/altix/sys/amd64/amd64/trap.c	Wed May 26 04:14:29 2010	(r208558)
@@ -76,7 +76,6 @@ __FBSDID("$FreeBSD$");
 #ifdef HWPMC_HOOKS
 #include <sys/pmckern.h>
 #endif
-#include <security/audit/audit.h>
 
 #include <vm/vm.h>
 #include <vm/vm_param.h>
@@ -170,8 +169,6 @@ static int prot_fault_translation = 0;
 SYSCTL_INT(_machdep, OID_AUTO, prot_fault_translation, CTLFLAG_RW,
 	&prot_fault_translation, 0, "Select signal to deliver on protection fault");
 
-extern char *syscallnames[];
-
 /*
  * Exception, fault, and trap interface to the FreeBSD kernel.
  * This common code is called from assembly language IDT gate entry
@@ -488,22 +485,18 @@ trap(struct trapframe *frame)
 			}
 			if (frame->tf_rip == (long)ld_ds) {
 				frame->tf_rip = (long)ds_load_fault;
-				frame->tf_ds = _udatasel;
 				goto out;
 			}
 			if (frame->tf_rip == (long)ld_es) {
 				frame->tf_rip = (long)es_load_fault;
-				frame->tf_es = _udatasel;
 				goto out;
 			}
 			if (frame->tf_rip == (long)ld_fs) {
 				frame->tf_rip = (long)fs_load_fault;
-				frame->tf_fs = _ufssel;
 				goto out;
 			}
 			if (frame->tf_rip == (long)ld_gs) {
 				frame->tf_rip = (long)gs_load_fault;
-				frame->tf_gs = _ugssel;
 				goto out;
 			}
 			if (frame->tf_rip == (long)ld_gsbase) {
@@ -809,19 +802,12 @@ dblfault_handler(struct trapframe *frame
 	panic("double fault");
 }
 
-struct syscall_args {
-	u_int code;
-	struct sysent *callp;
-	register_t args[8];
-	register_t *argp;
-	int narg;
-};
-
-static int
-fetch_syscall_args(struct thread *td, struct syscall_args *sa)
+int
+cpu_fetch_syscall_args(struct thread *td, struct syscall_args *sa)
 {
 	struct proc *p;
 	struct trapframe *frame;
+	register_t *argp;
 	caddr_t params;
 	int reg, regcnt, error;
 
@@ -833,15 +819,10 @@ fetch_syscall_args(struct thread *td, st
 	params = (caddr_t)frame->tf_rsp + sizeof(register_t);
 	sa->code = frame->tf_rax;
 
-	if (p->p_sysent->sv_prepsyscall) {
-		(*p->p_sysent->sv_prepsyscall)(frame, (int *)sa->args,
-		    &sa->code, &params);
-	} else {
-		if (sa->code == SYS_syscall || sa->code == SYS___syscall) {
-			sa->code = frame->tf_rdi;
-			reg++;
-			regcnt--;
-		}
+	if (sa->code == SYS_syscall || sa->code == SYS___syscall) {
+		sa->code = frame->tf_rdi;
+		reg++;
+		regcnt--;
 	}
  	if (p->p_sysent->sv_mask)
  		sa->code &= p->p_sysent->sv_mask;
@@ -855,24 +836,20 @@ fetch_syscall_args(struct thread *td, st
 	KASSERT(sa->narg <= sizeof(sa->args) / sizeof(sa->args[0]),
 	    ("Too many syscall arguments!"));
 	error = 0;
-	sa->argp = &frame->tf_rdi;
-	sa->argp += reg;
-	bcopy(sa->argp, sa->args, sizeof(sa->args[0]) * regcnt);
+	argp = &frame->tf_rdi;
+	argp += reg;
+	bcopy(argp, sa->args, sizeof(sa->args[0]) * regcnt);
 	if (sa->narg > regcnt) {
 		KASSERT(params != NULL, ("copyin args with no params!"));
 		error = copyin(params, &sa->args[regcnt],
 	    	    (sa->narg - regcnt) * sizeof(sa->args[0]));
 	}
-	sa->argp = &sa->args[0];
 
-	/*
-	 * This may result in two records if debugger modified
-	 * registers or memory during sleep at stop/ptrace point.
-	 */
-#ifdef KTRACE
-	if (KTRPOINT(td, KTR_SYSCALL))
-		ktrsyscall(sa->code, sa->narg, sa->argp);
-#endif
+	if (error == 0) {
+		td->td_retval[0] = 0;
+		td->td_retval[1] = frame->tf_rdx;
+	}
+
 	return (error);
 }
 
@@ -885,87 +862,22 @@ void
 syscall(struct trapframe *frame)
 {
 	struct thread *td;
-	struct proc *p;
 	struct syscall_args sa;
 	register_t orig_tf_rflags;
 	int error;
 	ksiginfo_t ksi;
 
-	PCPU_INC(cnt.v_syscall);
-	td = curthread;
-	p = td->td_proc;
-	td->td_syscalls++;
-
 #ifdef DIAGNOSTIC
 	if (ISPL(frame->tf_cs) != SEL_UPL) {
 		panic("syscall");
 		/* NOT REACHED */
 	}
 #endif
-
-	td->td_pticks = 0;
-	td->td_frame = frame;
-	if (td->td_ucred != p->p_ucred) 
-		cred_update_thread(td);
 	orig_tf_rflags = frame->tf_rflags;
-	if (p->p_flag & P_TRACED) {
-		PROC_LOCK(p);
-		td->td_dbgflags &= ~TDB_USERWR;
-		PROC_UNLOCK(p);
-	}
-	error = fetch_syscall_args(td, &sa);
-
-	CTR4(KTR_SYSC, "syscall enter thread %p pid %d proc %s code %d", td,
-	    td->td_proc->p_pid, td->td_name, sa.code);
-
-	if (error == 0) {
-		td->td_retval[0] = 0;
-		td->td_retval[1] = frame->tf_rdx;
-
-		STOPEVENT(p, S_SCE, sa.narg);
-		PTRACESTOP_SC(p, td, S_PT_SCE);
-		if (td->td_dbgflags & TDB_USERWR) {
-			/*
-			 * Reread syscall number and arguments if
-			 * debugger modified registers or memory.
-			 */
-			error = fetch_syscall_args(td, &sa);
-			if (error != 0)
-				goto retval;
-			td->td_retval[1] = frame->tf_rdx;
-		}
-
-#ifdef KDTRACE_HOOKS
-		/*
-		 * If the systrace module has registered it's probe
-		 * callback and if there is a probe active for the
-		 * syscall 'entry', process the probe.
-		 */
-		if (systrace_probe_func != NULL && sa.callp->sy_entry != 0)
-			(*systrace_probe_func)(sa.callp->sy_entry, sa.code,
-			    sa.callp, sa.args);
-#endif
-
-		AUDIT_SYSCALL_ENTER(sa.code, td);
-		error = (*sa.callp->sy_call)(td, sa.argp);
-		AUDIT_SYSCALL_EXIT(error, td);
-
-		/* Save the latest error return value. */
-		td->td_errno = error;
+	td = curthread;
+	td->td_frame = frame;
 
-#ifdef KDTRACE_HOOKS
-		/*
-		 * If the systrace module has registered it's probe
-		 * callback and if there is a probe active for the
-		 * syscall 'return', process the probe.
-		 */
-		if (systrace_probe_func != NULL && sa.callp->sy_return != 0)
-			(*systrace_probe_func)(sa.callp->sy_return, sa.code,
-			    sa.callp, sa.args);
-#endif
-	}
- retval:
-	cpu_set_syscall_retval(td, error);
+	error = syscallenter(td, &sa);
 
 	/*
 	 * Traced syscall.
@@ -979,40 +891,5 @@ syscall(struct trapframe *frame)
 		trapsignal(td, &ksi);
 	}
 
-	/*
-	 * Check for misbehavior.
-	 */
-	WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning",
-	    (sa.code >= 0 && sa.code < SYS_MAXSYSCALL) ?

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-projects mailing list