From owner-svn-src-projects@FreeBSD.ORG Sun Aug 15 22:09:44 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96DA6106564A; Sun, 15 Aug 2010 22:09:44 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80F598FC18; Sun, 15 Aug 2010 22:09:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7FM9ira073726; Sun, 15 Aug 2010 22:09:44 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7FM9irD073712; Sun, 15 Aug 2010 22:09:44 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201008152209.o7FM9irD073712@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 15 Aug 2010 22:09:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211363 - in projects/altix: lib/libstand sys/amd64/acpica sys/amd64/amd64 sys/amd64/conf sys/amd64/ia32 sys/amd64/include sys/amd64/linux32 sys/arm/at91 sys/arm/conf sys/arm/include sy... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Aug 2010 22:09:44 -0000 Author: marcel Date: Sun Aug 15 22:09:43 2010 New Revision: 211363 URL: http://svn.freebsd.org/changeset/base/211363 Log: Merge svn+ssh://svn.freebsd.org/base/head@211344 Added: projects/altix/sys/arm/at91/at91_aicreg.h - copied unchanged from r211344, head/sys/arm/at91/at91_aicreg.h projects/altix/sys/arm/at91/at91_pio_sam9.h - copied unchanged from r211344, head/sys/arm/at91/at91_pio_sam9.h projects/altix/sys/arm/at91/at91_pit.c - copied unchanged from r211344, head/sys/arm/at91/at91_pit.c projects/altix/sys/arm/at91/at91_pitreg.h - copied unchanged from r211344, head/sys/arm/at91/at91_pitreg.h projects/altix/sys/arm/at91/at91sam9.c - copied unchanged from r211344, head/sys/arm/at91/at91sam9.c projects/altix/sys/arm/at91/at91sam9_machdep.c - copied unchanged from r211344, head/sys/arm/at91/at91sam9_machdep.c projects/altix/sys/arm/at91/at91sam9g20reg.h - copied unchanged from r211344, head/sys/arm/at91/at91sam9g20reg.h projects/altix/sys/arm/at91/board_hl201.c - copied unchanged from r211344, head/sys/arm/at91/board_hl201.c projects/altix/sys/arm/at91/files.at91sam9 - copied unchanged from r211344, head/sys/arm/at91/files.at91sam9 projects/altix/sys/arm/at91/if_macb.c - copied unchanged from r211344, head/sys/arm/at91/if_macb.c projects/altix/sys/arm/at91/if_macbreg.h - copied unchanged from r211344, head/sys/arm/at91/if_macbreg.h projects/altix/sys/arm/at91/if_macbvar.h - copied unchanged from r211344, head/sys/arm/at91/if_macbvar.h projects/altix/sys/arm/at91/std.at91sam9 - copied unchanged from r211344, head/sys/arm/at91/std.at91sam9 projects/altix/sys/arm/at91/std.hl201 - copied unchanged from r211344, head/sys/arm/at91/std.hl201 projects/altix/sys/arm/conf/HL201 - copied unchanged from r211344, head/sys/arm/conf/HL201 projects/altix/sys/arm/conf/HL201.hints - copied unchanged from r211344, head/sys/arm/conf/HL201.hints projects/altix/sys/arm/s3c2xx0/s3c24x0_rtc.c - copied unchanged from r211344, head/sys/arm/s3c2xx0/s3c24x0_rtc.c projects/altix/sys/boot/ofw/libofw/ppc64_elf_freebsd.c - copied unchanged from r211344, head/sys/boot/ofw/libofw/ppc64_elf_freebsd.c projects/altix/sys/boot/zfs/zfstest.c - copied unchanged from r211344, head/sys/boot/zfs/zfstest.c projects/altix/sys/cddl/compat/opensolaris/kern/opensolaris_uio.c - copied unchanged from r211344, head/sys/cddl/compat/opensolaris/kern/opensolaris_uio.c projects/altix/sys/cddl/contrib/opensolaris/common/atomic/powerpc64/ - copied from r211344, head/sys/cddl/contrib/opensolaris/common/atomic/powerpc64/ projects/altix/sys/conf/ldscript.mips.64 - copied unchanged from r211344, head/sys/conf/ldscript.mips.64 projects/altix/sys/conf/ldscript.powerpc64 - copied unchanged from r211344, head/sys/conf/ldscript.powerpc64 projects/altix/sys/contrib/dev/acpica/utilities/utosi.c - copied unchanged from r211344, head/sys/contrib/dev/acpica/utilities/utosi.c projects/altix/sys/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu - copied unchanged from r211344, head/sys/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu projects/altix/sys/contrib/dev/iwn/iwlwifi-6050-9.201.4.1.fw.uu - copied unchanged from r211344, head/sys/contrib/dev/iwn/iwlwifi-6050-9.201.4.1.fw.uu projects/altix/sys/contrib/octeon-sdk/ - copied from r211344, head/sys/contrib/octeon-sdk/ projects/altix/sys/crypto/aesni/ - copied from r211344, head/sys/crypto/aesni/ projects/altix/sys/dev/cfi/cfi_bus_fdt.c - copied unchanged from r211344, head/sys/dev/cfi/cfi_bus_fdt.c projects/altix/sys/dev/fdt/fdt_powerpc.c - copied unchanged from r211344, head/sys/dev/fdt/fdt_powerpc.c projects/altix/sys/dev/quicc/quicc_bfe_fdt.c - copied unchanged from r211344, head/sys/dev/quicc/quicc_bfe_fdt.c projects/altix/sys/dev/tpm/ - copied from r211344, head/sys/dev/tpm/ projects/altix/sys/dev/tsec/if_tsec_fdt.c - copied unchanged from r211344, head/sys/dev/tsec/if_tsec_fdt.c projects/altix/sys/kern/kern_clocksource.c - copied unchanged from r211344, head/sys/kern/kern_clocksource.c projects/altix/sys/mips/cavium/ciu.c - copied unchanged from r211344, head/sys/mips/cavium/ciu.c projects/altix/sys/mips/cavium/cryptocteon/ - copied from r211344, head/sys/mips/cavium/cryptocteon/ projects/altix/sys/mips/cavium/cvmx_config.h - copied unchanged from r211344, head/sys/mips/cavium/cvmx_config.h projects/altix/sys/mips/cavium/octe/ - copied from r211344, head/sys/mips/cavium/octe/ projects/altix/sys/mips/cavium/octeon_ds1337.c - copied unchanged from r211344, head/sys/mips/cavium/octeon_ds1337.c projects/altix/sys/mips/cavium/octeon_rnd.c - copied unchanged from r211344, head/sys/mips/cavium/octeon_rnd.c projects/altix/sys/mips/cavium/octeon_rtc.c - copied unchanged from r211344, head/sys/mips/cavium/octeon_rtc.c projects/altix/sys/mips/cavium/octopci.c - copied unchanged from r211344, head/sys/mips/cavium/octopci.c projects/altix/sys/mips/cavium/octopci_bus_space.c - copied unchanged from r211344, head/sys/mips/cavium/octopci_bus_space.c projects/altix/sys/mips/cavium/octopcireg.h - copied unchanged from r211344, head/sys/mips/cavium/octopcireg.h projects/altix/sys/mips/cavium/octopcivar.h - copied unchanged from r211344, head/sys/mips/cavium/octopcivar.h projects/altix/sys/mips/cavium/usb/ - copied from r211344, head/sys/mips/cavium/usb/ projects/altix/sys/mips/conf/XLR64 - copied unchanged from r211344, head/sys/mips/conf/XLR64 projects/altix/sys/modules/aesni/ - copied from r211344, head/sys/modules/aesni/ projects/altix/sys/modules/if_carp/ - copied from r211344, head/sys/modules/if_carp/ projects/altix/sys/modules/iwnfw/iwn6050/ - copied from r211344, head/sys/modules/iwnfw/iwn6050/ projects/altix/sys/modules/nfslock/ - copied from r211344, head/sys/modules/nfslock/ projects/altix/sys/modules/tpm/ - copied from r211344, head/sys/modules/tpm/ projects/altix/sys/nfs/nfs_lock.c - copied unchanged from r211344, head/sys/nfs/nfs_lock.c projects/altix/sys/nfs/nfs_lock.h - copied unchanged from r211344, head/sys/nfs/nfs_lock.h projects/altix/sys/powerpc/aim/locore32.S - copied unchanged from r211344, head/sys/powerpc/aim/locore32.S projects/altix/sys/powerpc/aim/locore64.S - copied unchanged from r211344, head/sys/powerpc/aim/locore64.S projects/altix/sys/powerpc/aim/slb.c - copied unchanged from r211344, head/sys/powerpc/aim/slb.c projects/altix/sys/powerpc/aim/swtch32.S - copied unchanged from r211344, head/sys/powerpc/aim/swtch32.S projects/altix/sys/powerpc/aim/swtch64.S - copied unchanged from r211344, head/sys/powerpc/aim/swtch64.S projects/altix/sys/powerpc/aim/trap_subr32.S - copied unchanged from r211344, head/sys/powerpc/aim/trap_subr32.S projects/altix/sys/powerpc/aim/trap_subr64.S - copied unchanged from r211344, head/sys/powerpc/aim/trap_subr64.S projects/altix/sys/powerpc/conf/GENERIC64 - copied unchanged from r211344, head/sys/powerpc/conf/GENERIC64 projects/altix/sys/powerpc/include/fdt.h - copied unchanged from r211344, head/sys/powerpc/include/fdt.h projects/altix/sys/powerpc/include/slb.h - copied unchanged from r211344, head/sys/powerpc/include/slb.h projects/altix/sys/powerpc/mambo/ - copied from r211344, head/sys/powerpc/mambo/ projects/altix/sys/powerpc/mpc85xx/ds1553_bus_fdt.c - copied unchanged from r211344, head/sys/powerpc/mpc85xx/ds1553_bus_fdt.c projects/altix/sys/powerpc/mpc85xx/openpic_fdt.c - copied unchanged from r211344, head/sys/powerpc/mpc85xx/openpic_fdt.c projects/altix/sys/powerpc/mpc85xx/pci_fdt.c - copied unchanged from r211344, head/sys/powerpc/mpc85xx/pci_fdt.c projects/altix/sys/powerpc/powerpc/elf32_machdep.c - copied unchanged from r211344, head/sys/powerpc/powerpc/elf32_machdep.c projects/altix/sys/powerpc/powerpc/elf64_machdep.c - copied unchanged from r211344, head/sys/powerpc/powerpc/elf64_machdep.c projects/altix/sys/powerpc/powerpc/exec_machdep.c - copied unchanged from r211344, head/sys/powerpc/powerpc/exec_machdep.c projects/altix/sys/powerpc/powerpc/sigcode32.S - copied unchanged from r211344, head/sys/powerpc/powerpc/sigcode32.S projects/altix/sys/powerpc/powerpc/sigcode64.S - copied unchanged from r211344, head/sys/powerpc/powerpc/sigcode64.S projects/altix/sys/x86/acpica/ - copied from r211344, head/sys/x86/acpica/ Deleted: projects/altix/sys/amd64/acpica/Makefile projects/altix/sys/amd64/acpica/genwakecode.sh projects/altix/sys/amd64/acpica/genwakedata.sh projects/altix/sys/arm/include/bootinfo.h projects/altix/sys/contrib/dev/iwn/iwlwifi-6000-9.193.4.1.fw.uu projects/altix/sys/dev/acpi_support/acpi_aiboost.c projects/altix/sys/dev/cfi/cfi_bus_lbc.c projects/altix/sys/dev/fdt/fdt_arm.c projects/altix/sys/dev/quicc/quicc_bfe_ocp.c projects/altix/sys/dev/tsec/if_tsec_ocp.c projects/altix/sys/dev/uart/uart_bus_ocp.c projects/altix/sys/fs/nfsclient/nfs_cllock.c projects/altix/sys/fs/nfsclient/nfs_lock.h projects/altix/sys/mips/cavium/dev/ projects/altix/sys/mips/cavium/driveid.h projects/altix/sys/mips/cavium/octeon_ebt3000_cf.h projects/altix/sys/mips/include/_bus_octeon.h projects/altix/sys/mips/include/asmacros.h projects/altix/sys/mips/mips/tlb.S projects/altix/sys/modules/acpi/acpi_aiboost/ projects/altix/sys/nfsclient/nfs_lock.c projects/altix/sys/nfsclient/nfs_lock.h projects/altix/sys/pc98/cbus/clock.c projects/altix/sys/powerpc/aim/swtch.S projects/altix/sys/powerpc/include/bootinfo.h projects/altix/sys/powerpc/include/ocpbus.h projects/altix/sys/powerpc/mpc85xx/ds1553_bus_lbc.c projects/altix/sys/powerpc/mpc85xx/ocpbus.c projects/altix/sys/powerpc/mpc85xx/ocpbus.h projects/altix/sys/powerpc/mpc85xx/opic.c projects/altix/sys/powerpc/mpc85xx/pci_ocp.c projects/altix/sys/powerpc/powerpc/elf_machdep.c projects/altix/sys/powerpc/powerpc/sigcode.S projects/altix/sys/x86/x86/timeevents.c Modified: projects/altix/lib/libstand/Makefile projects/altix/lib/libstand/printf.c projects/altix/sys/amd64/acpica/acpi_switch.S projects/altix/sys/amd64/acpica/acpi_wakecode.S projects/altix/sys/amd64/acpica/acpi_wakeup.c projects/altix/sys/amd64/amd64/cpu_switch.S projects/altix/sys/amd64/amd64/fpu.c projects/altix/sys/amd64/amd64/genassym.c projects/altix/sys/amd64/amd64/identcpu.c projects/altix/sys/amd64/amd64/initcpu.c projects/altix/sys/amd64/amd64/mp_machdep.c projects/altix/sys/amd64/amd64/mptable_pci.c projects/altix/sys/amd64/amd64/pmap.c projects/altix/sys/amd64/amd64/support.S projects/altix/sys/amd64/amd64/trap.c projects/altix/sys/amd64/amd64/tsc.c projects/altix/sys/amd64/amd64/vm_machdep.c projects/altix/sys/amd64/conf/GENERIC projects/altix/sys/amd64/conf/GENERIC.hints projects/altix/sys/amd64/conf/NOTES projects/altix/sys/amd64/ia32/ia32_signal.c projects/altix/sys/amd64/include/clock.h projects/altix/sys/amd64/include/cpu.h projects/altix/sys/amd64/include/param.h projects/altix/sys/amd64/include/pcb.h projects/altix/sys/amd64/include/pcpu.h projects/altix/sys/amd64/include/pmap.h projects/altix/sys/amd64/include/smp.h projects/altix/sys/amd64/include/specialreg.h projects/altix/sys/amd64/include/vmparam.h projects/altix/sys/amd64/linux32/linux32_machdep.c projects/altix/sys/amd64/linux32/linux32_proto.h projects/altix/sys/amd64/linux32/linux32_syscall.h projects/altix/sys/amd64/linux32/linux32_sysent.c projects/altix/sys/amd64/linux32/linux32_sysvec.c projects/altix/sys/amd64/linux32/syscalls.master projects/altix/sys/arm/at91/at91_pmc.c projects/altix/sys/arm/at91/at91_pmcreg.h projects/altix/sys/arm/include/fdt.h projects/altix/sys/arm/include/metadata.h projects/altix/sys/arm/include/pmap.h projects/altix/sys/arm/include/vmparam.h projects/altix/sys/arm/mv/common.c projects/altix/sys/arm/mv/discovery/std.db78xxx projects/altix/sys/arm/mv/files.mv projects/altix/sys/arm/mv/kirkwood/std.db88f6xxx projects/altix/sys/arm/mv/kirkwood/std.sheevaplug projects/altix/sys/arm/mv/mv_machdep.c projects/altix/sys/arm/mv/orion/std.db88f5xxx projects/altix/sys/arm/mv/timer.c projects/altix/sys/arm/s3c2xx0/files.s3c2xx0 projects/altix/sys/arm/s3c2xx0/s3c24x0.c projects/altix/sys/arm/s3c2xx0/s3c24x0_machdep.c projects/altix/sys/arm/s3c2xx0/s3c24x0reg.h projects/altix/sys/arm/s3c2xx0/s3c2xx0_space.c projects/altix/sys/arm/s3c2xx0/s3c2xx0var.h projects/altix/sys/boot/Makefile projects/altix/sys/boot/common/Makefile.inc projects/altix/sys/boot/common/load_elf_obj.c projects/altix/sys/boot/common/loader.8 projects/altix/sys/boot/fdt/Makefile projects/altix/sys/boot/fdt/dts/mpc8555cds.dts projects/altix/sys/boot/ficl/Makefile projects/altix/sys/boot/i386/loader/Makefile projects/altix/sys/boot/ofw/Makefile.inc projects/altix/sys/boot/ofw/libofw/Makefile projects/altix/sys/boot/ofw/libofw/libofw.h projects/altix/sys/boot/pc98/loader/Makefile projects/altix/sys/boot/powerpc/Makefile.inc projects/altix/sys/boot/powerpc/boot1.chrp/Makefile projects/altix/sys/boot/powerpc/ofw/Makefile projects/altix/sys/boot/powerpc/ofw/conf.c projects/altix/sys/boot/powerpc/ofw/ldscript.powerpc projects/altix/sys/boot/powerpc/ofw/metadata.c projects/altix/sys/boot/powerpc/uboot/Makefile projects/altix/sys/boot/powerpc/uboot/ldscript.powerpc projects/altix/sys/boot/uboot/Makefile.inc projects/altix/sys/boot/uboot/common/metadata.c projects/altix/sys/boot/zfs/zfsimpl.c projects/altix/sys/cam/ata/ata_da.c projects/altix/sys/cam/cam.c projects/altix/sys/cam/cam_ccb.h projects/altix/sys/cam/scsi/scsi_cd.c projects/altix/sys/cam/scsi/scsi_da.c projects/altix/sys/cam/scsi/scsi_target.c projects/altix/sys/cddl/boot/zfs/zfsimpl.h projects/altix/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c projects/altix/sys/cddl/compat/opensolaris/sys/misc.h projects/altix/sys/cddl/compat/opensolaris/sys/policy.h projects/altix/sys/cddl/compat/opensolaris/sys/sid.h projects/altix/sys/cddl/compat/opensolaris/sys/uio.h projects/altix/sys/cddl/compat/opensolaris/sys/vnode.h projects/altix/sys/cddl/contrib/opensolaris/common/zfs/zfs_deleg.c projects/altix/sys/cddl/contrib/opensolaris/common/zfs/zfs_deleg.h projects/altix/sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c projects/altix/sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.h projects/altix/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c projects/altix/sys/cddl/contrib/opensolaris/common/zfs/zprop_common.c 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_objset.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_tx.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.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_deleg.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.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_prop.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_config.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.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/dbuf.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_deleg.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.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/dsl_prop.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab_impl.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/space_map.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock_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/vdev_impl.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_acl.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.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_fuid.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.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/zil.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.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_disk.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.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_fm.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fuid.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_log.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_rlock.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.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/contrib/opensolaris/uts/common/sys/acl.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/sys/debug.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/sys/fm/fs/zfs.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/sys/sysevent/eventdefs.h projects/altix/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h projects/altix/sys/compat/freebsd32/freebsd32.h projects/altix/sys/compat/freebsd32/freebsd32_misc.c projects/altix/sys/compat/freebsd32/freebsd32_util.h projects/altix/sys/compat/svr4/svr4_filio.c projects/altix/sys/compat/x86bios/x86bios.c projects/altix/sys/compat/x86bios/x86bios.h projects/altix/sys/conf/Makefile.powerpc projects/altix/sys/conf/NOTES projects/altix/sys/conf/files projects/altix/sys/conf/files.amd64 projects/altix/sys/conf/files.arm projects/altix/sys/conf/files.i386 projects/altix/sys/conf/files.mips projects/altix/sys/conf/files.pc98 projects/altix/sys/conf/files.powerpc projects/altix/sys/conf/files.sparc64 projects/altix/sys/conf/files.sun4v projects/altix/sys/conf/kern.mk projects/altix/sys/conf/kern.post.mk projects/altix/sys/conf/kern.pre.mk projects/altix/sys/conf/kmod.mk projects/altix/sys/conf/options projects/altix/sys/conf/options.arm projects/altix/sys/conf/options.mips projects/altix/sys/conf/options.powerpc projects/altix/sys/contrib/dev/acpica/changes.txt projects/altix/sys/contrib/dev/acpica/common/adisasm.c projects/altix/sys/contrib/dev/acpica/common/dmextern.c projects/altix/sys/contrib/dev/acpica/compiler/aslcompiler.h projects/altix/sys/contrib/dev/acpica/compiler/aslglobal.h projects/altix/sys/contrib/dev/acpica/compiler/aslmain.c projects/altix/sys/contrib/dev/acpica/compiler/aslstartup.c projects/altix/sys/contrib/dev/acpica/debugger/dbcmds.c projects/altix/sys/contrib/dev/acpica/debugger/dbinput.c projects/altix/sys/contrib/dev/acpica/events/evxfevnt.c projects/altix/sys/contrib/dev/acpica/executer/exfldio.c projects/altix/sys/contrib/dev/acpica/executer/exprep.c projects/altix/sys/contrib/dev/acpica/include/acdebug.h projects/altix/sys/contrib/dev/acpica/include/acdisasm.h projects/altix/sys/contrib/dev/acpica/include/acglobal.h projects/altix/sys/contrib/dev/acpica/include/aclocal.h projects/altix/sys/contrib/dev/acpica/include/acobject.h projects/altix/sys/contrib/dev/acpica/include/acpiosxf.h projects/altix/sys/contrib/dev/acpica/include/acpixf.h projects/altix/sys/contrib/dev/acpica/include/actypes.h projects/altix/sys/contrib/dev/acpica/include/acutils.h projects/altix/sys/contrib/dev/acpica/osunixxf.c projects/altix/sys/contrib/dev/acpica/utilities/uteval.c projects/altix/sys/contrib/dev/acpica/utilities/utglobal.c projects/altix/sys/contrib/dev/acpica/utilities/utinit.c projects/altix/sys/contrib/dev/acpica/utilities/utmutex.c projects/altix/sys/contrib/dev/acpica/utilities/utxface.c projects/altix/sys/ddb/db_command.c projects/altix/sys/dev/acpica/Osd/OsdHardware.c projects/altix/sys/dev/acpica/Osd/OsdMemory.c projects/altix/sys/dev/acpica/acpi.c projects/altix/sys/dev/acpica/acpi_ec.c projects/altix/sys/dev/acpica/acpi_hpet.c projects/altix/sys/dev/acpica/acpi_pcib.c projects/altix/sys/dev/acpica/acpi_pcib_acpi.c projects/altix/sys/dev/acpica/acpi_pcib_pci.c projects/altix/sys/dev/acpica/acpi_pcibvar.h projects/altix/sys/dev/agp/agp.c projects/altix/sys/dev/ahci/ahci.c projects/altix/sys/dev/aic7xxx/aic79xx.reg projects/altix/sys/dev/aic7xxx/aic7xxx.reg projects/altix/sys/dev/aic7xxx/aicasm/aicasm_gram.y projects/altix/sys/dev/alc/if_alc.c projects/altix/sys/dev/alc/if_alcreg.h projects/altix/sys/dev/alc/if_alcvar.h projects/altix/sys/dev/amr/amrvar.h projects/altix/sys/dev/arcmsr/arcmsr.c projects/altix/sys/dev/arcmsr/arcmsr.h 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/chipsets/ata-acerlabs.c projects/altix/sys/dev/ata/chipsets/ata-amd.c projects/altix/sys/dev/ata/chipsets/ata-highpoint.c projects/altix/sys/dev/ata/chipsets/ata-intel.c projects/altix/sys/dev/ata/chipsets/ata-ite.c projects/altix/sys/dev/ata/chipsets/ata-jmicron.c projects/altix/sys/dev/ata/chipsets/ata-marvell.c projects/altix/sys/dev/ata/chipsets/ata-nvidia.c projects/altix/sys/dev/ata/chipsets/ata-promise.c projects/altix/sys/dev/ata/chipsets/ata-siliconimage.c projects/altix/sys/dev/ata/chipsets/ata-sis.c projects/altix/sys/dev/ata/chipsets/ata-via.c projects/altix/sys/dev/ath/ath_hal/ar5212/ar5212.h projects/altix/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c projects/altix/sys/dev/ath/ath_hal/ar5416/ar5416.ini projects/altix/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c projects/altix/sys/dev/ath/ath_hal/ar5416/ar5416_cal_iq.c projects/altix/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c projects/altix/sys/dev/ath/ath_hal/ar5416/ar9160.ini projects/altix/sys/dev/ath/ath_hal/ar5416/ar9285_reset.c projects/altix/sys/dev/ath/if_ath.c projects/altix/sys/dev/ath/if_athioctl.h projects/altix/sys/dev/bce/if_bce.c projects/altix/sys/dev/bce/if_bcereg.h projects/altix/sys/dev/bge/if_bge.c projects/altix/sys/dev/bge/if_bgereg.h projects/altix/sys/dev/bktr/bktr_core.c projects/altix/sys/dev/bwi/if_bwi.c projects/altix/sys/dev/bwi/if_bwi_pci.c projects/altix/sys/dev/bwn/if_bwn.c projects/altix/sys/dev/cas/if_cas.c projects/altix/sys/dev/cfe/cfe_env.c projects/altix/sys/dev/coretemp/coretemp.c projects/altix/sys/dev/cxgb/common/cxgb_ael1002.c projects/altix/sys/dev/cxgb/common/cxgb_common.h projects/altix/sys/dev/cxgb/common/cxgb_t3_hw.c projects/altix/sys/dev/cxgb/cxgb_adapter.h projects/altix/sys/dev/cxgb/cxgb_main.c projects/altix/sys/dev/cxgb/cxgb_sge.c projects/altix/sys/dev/drm/drm_pciids.h projects/altix/sys/dev/e1000/e1000_osdep.h 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/et/if_et.c projects/altix/sys/dev/et/if_etreg.h projects/altix/sys/dev/et/if_etvar.h projects/altix/sys/dev/fb/vesa.c projects/altix/sys/dev/fdt/fdt_common.c projects/altix/sys/dev/fdt/fdt_common.h projects/altix/sys/dev/fdt/fdt_pci.c projects/altix/sys/dev/fdt/simplebus.c projects/altix/sys/dev/flash/mx25l.c (contents, props changed) projects/altix/sys/dev/flash/mx25lreg.h (contents, props changed) projects/altix/sys/dev/gem/if_gem.c projects/altix/sys/dev/hme/if_hme.c projects/altix/sys/dev/hwpmc/hwpmc_core.c projects/altix/sys/dev/hwpmc/hwpmc_core.h projects/altix/sys/dev/ichwd/ichwd.c projects/altix/sys/dev/iicbus/iic.h projects/altix/sys/dev/iicbus/iicbus.c projects/altix/sys/dev/ipmi/ipmi_smbios.c projects/altix/sys/dev/iscsi/initiator/isc_cam.c projects/altix/sys/dev/iscsi/initiator/isc_sm.c projects/altix/sys/dev/iscsi/initiator/isc_soc.c projects/altix/sys/dev/iscsi/initiator/isc_subr.c projects/altix/sys/dev/iscsi/initiator/iscsi.c projects/altix/sys/dev/iscsi/initiator/iscsi.h projects/altix/sys/dev/iscsi/initiator/iscsi_subr.c projects/altix/sys/dev/iscsi/initiator/iscsivar.h projects/altix/sys/dev/iwn/if_iwn.c projects/altix/sys/dev/iwn/if_iwnreg.h projects/altix/sys/dev/iwn/if_iwnvar.h projects/altix/sys/dev/md/md.c projects/altix/sys/dev/mii/atphy.c projects/altix/sys/dev/mii/e1000phy.c projects/altix/sys/dev/mii/miidevs projects/altix/sys/dev/mpt/mpt.c projects/altix/sys/dev/mpt/mpt.h projects/altix/sys/dev/mpt/mpt_pci.c projects/altix/sys/dev/mvs/mvs.c projects/altix/sys/dev/null/null.c projects/altix/sys/dev/ofw/ofw_if.m projects/altix/sys/dev/ofw/ofw_standard.c projects/altix/sys/dev/ofw/openfirm.c projects/altix/sys/dev/ofw/openfirm.h projects/altix/sys/dev/pci/pci.c projects/altix/sys/dev/pci/pci_user.c projects/altix/sys/dev/pci/pcib_private.h projects/altix/sys/dev/pci/pcireg.h projects/altix/sys/dev/ral/rt2560.c projects/altix/sys/dev/ral/rt2661.c projects/altix/sys/dev/sec/sec.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/sk/if_sk.c projects/altix/sys/dev/sound/pci/hda/hdac.c projects/altix/sys/dev/ste/if_ste.c projects/altix/sys/dev/syscons/scvgarndr.c projects/altix/sys/dev/tsec/if_tsec.c projects/altix/sys/dev/tsec/if_tsec.h projects/altix/sys/dev/twa/tw_cl.h projects/altix/sys/dev/twa/tw_cl_share.h projects/altix/sys/dev/uart/uart_bus_fdt.c projects/altix/sys/dev/uart/uart_cpu_powerpc.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/serial/uipaq.c projects/altix/sys/dev/usb/serial/uplcom.c projects/altix/sys/dev/usb/serial/uslcom.c projects/altix/sys/dev/usb/usbdevs projects/altix/sys/dev/usb/wlan/if_rum.c projects/altix/sys/dev/usb/wlan/if_run.c projects/altix/sys/dev/usb/wlan/if_ural.c projects/altix/sys/dev/usb/wlan/if_zyd.c projects/altix/sys/dev/wpi/if_wpi.c projects/altix/sys/fs/coda/coda.h projects/altix/sys/fs/coda/coda_venus.c projects/altix/sys/fs/coda/coda_vnops.c projects/altix/sys/fs/devfs/devfs.h projects/altix/sys/fs/devfs/devfs_devs.c projects/altix/sys/fs/devfs/devfs_rule.c projects/altix/sys/fs/devfs/devfs_vfsops.c projects/altix/sys/fs/devfs/devfs_vnops.c projects/altix/sys/fs/nfs/nfs_commonport.c projects/altix/sys/fs/nfsclient/nfs_clnfsiod.c projects/altix/sys/fs/nfsclient/nfs_clport.c projects/altix/sys/fs/nfsclient/nfs_clrpcops.c projects/altix/sys/fs/nfsclient/nfs_clsubs.c projects/altix/sys/fs/nfsclient/nfs_clvnops.c projects/altix/sys/fs/nfsclient/nfsnode.h projects/altix/sys/fs/nfsserver/nfs_nfsdstate.c projects/altix/sys/fs/unionfs/union_subr.c projects/altix/sys/geom/cache/g_cache.h projects/altix/sys/geom/geom_disk.c projects/altix/sys/geom/geom_disk.h projects/altix/sys/geom/part/g_part.c projects/altix/sys/geom/sched/g_sched.c projects/altix/sys/i386/conf/GENERIC projects/altix/sys/i386/conf/GENERIC.hints projects/altix/sys/i386/conf/NOTES projects/altix/sys/i386/i386/genassym.c projects/altix/sys/i386/i386/initcpu.c projects/altix/sys/i386/i386/machdep.c projects/altix/sys/i386/i386/mp_machdep.c projects/altix/sys/i386/i386/mptable_pci.c projects/altix/sys/i386/i386/pmap.c projects/altix/sys/i386/i386/swtch.s projects/altix/sys/i386/i386/tsc.c projects/altix/sys/i386/i386/vm_machdep.c projects/altix/sys/i386/include/clock.h projects/altix/sys/i386/include/cpu.h projects/altix/sys/i386/include/pcpu.h projects/altix/sys/i386/include/pmap.h projects/altix/sys/i386/include/segments.h projects/altix/sys/i386/include/smp.h projects/altix/sys/i386/include/specialreg.h projects/altix/sys/i386/include/vm86.h projects/altix/sys/i386/include/vmparam.h projects/altix/sys/i386/isa/npx.c projects/altix/sys/i386/linux/linux_sysvec.c projects/altix/sys/i386/pci/pci_bus.c projects/altix/sys/i386/xen/mp_machdep.c projects/altix/sys/i386/xen/pmap.c projects/altix/sys/ia64/conf/GENERIC projects/altix/sys/ia64/ia32/ia32_signal.c projects/altix/sys/ia64/ia64/mp_machdep.c projects/altix/sys/ia64/include/param.h projects/altix/sys/ia64/include/pcpu.h projects/altix/sys/ia64/include/smp.h projects/altix/sys/ia64/include/vmparam.h projects/altix/sys/isa/syscons_isa.c projects/altix/sys/kern/imgact_shell.c projects/altix/sys/kern/init_main.c projects/altix/sys/kern/kern_conf.c projects/altix/sys/kern/kern_cons.c projects/altix/sys/kern/kern_cpu.c projects/altix/sys/kern/kern_et.c projects/altix/sys/kern/kern_exec.c projects/altix/sys/kern/kern_ktr.c projects/altix/sys/kern/kern_ktrace.c projects/altix/sys/kern/kern_malloc.c projects/altix/sys/kern/kern_mib.c projects/altix/sys/kern/kern_resource.c projects/altix/sys/kern/kern_sig.c projects/altix/sys/kern/kern_tc.c projects/altix/sys/kern/kern_thread.c projects/altix/sys/kern/link_elf_obj.c projects/altix/sys/kern/sched_4bsd.c projects/altix/sys/kern/sched_ule.c projects/altix/sys/kern/subr_autoconf.c projects/altix/sys/kern/subr_bus.c projects/altix/sys/kern/subr_param.c projects/altix/sys/kern/subr_prf.c projects/altix/sys/kern/subr_rtc.c projects/altix/sys/kern/subr_smp.c projects/altix/sys/kern/subr_taskqueue.c projects/altix/sys/kern/subr_trap.c projects/altix/sys/kern/subr_unit.c projects/altix/sys/kern/subr_witness.c projects/altix/sys/kern/tty.c projects/altix/sys/kern/uipc_mbuf.c projects/altix/sys/kern/uipc_socket.c projects/altix/sys/kern/uipc_usrreq.c projects/altix/sys/kern/vfs_bio.c projects/altix/sys/kern/vfs_cluster.c projects/altix/sys/kern/vfs_subr.c projects/altix/sys/mips/atheros/ar71xx_pci.c projects/altix/sys/mips/atheros/if_arge.c projects/altix/sys/mips/atheros/if_argevar.h projects/altix/sys/mips/cavium/files.octeon1 projects/altix/sys/mips/cavium/obio.c projects/altix/sys/mips/cavium/octeon_ebt3000_cf.c projects/altix/sys/mips/cavium/octeon_machdep.c projects/altix/sys/mips/cavium/octeon_mp.c projects/altix/sys/mips/cavium/octeon_pcmap_regs.h projects/altix/sys/mips/cavium/std.octeon1 projects/altix/sys/mips/cavium/uart_bus_octeonusart.c projects/altix/sys/mips/cavium/uart_cpu_octeonusart.c projects/altix/sys/mips/cavium/uart_dev_oct16550.c projects/altix/sys/mips/conf/OCTEON1 projects/altix/sys/mips/conf/OCTEON1-32 projects/altix/sys/mips/conf/OCTEON1.hints projects/altix/sys/mips/conf/XLR projects/altix/sys/mips/conf/XLRN32 projects/altix/sys/mips/include/_bus.h projects/altix/sys/mips/include/_stdint.h projects/altix/sys/mips/include/asm.h projects/altix/sys/mips/include/bus.h projects/altix/sys/mips/include/cache_mipsNN.h projects/altix/sys/mips/include/clock.h projects/altix/sys/mips/include/cpu.h projects/altix/sys/mips/include/cpufunc.h projects/altix/sys/mips/include/cpuregs.h projects/altix/sys/mips/include/db_machdep.h projects/altix/sys/mips/include/endian.h projects/altix/sys/mips/include/intr_machdep.h projects/altix/sys/mips/include/md_var.h projects/altix/sys/mips/include/param.h projects/altix/sys/mips/include/pmap.h projects/altix/sys/mips/include/profile.h projects/altix/sys/mips/include/pte.h projects/altix/sys/mips/include/runq.h projects/altix/sys/mips/include/smp.h projects/altix/sys/mips/include/tlb.h projects/altix/sys/mips/include/vmparam.h projects/altix/sys/mips/mips/bus_space_generic.c projects/altix/sys/mips/mips/cache.c projects/altix/sys/mips/mips/cache_mipsNN.c projects/altix/sys/mips/mips/cpu.c projects/altix/sys/mips/mips/db_interface.c projects/altix/sys/mips/mips/db_trace.c projects/altix/sys/mips/mips/exception.S projects/altix/sys/mips/mips/fp.S projects/altix/sys/mips/mips/genassym.c projects/altix/sys/mips/mips/locore.S projects/altix/sys/mips/mips/machdep.c projects/altix/sys/mips/mips/mainbus.c projects/altix/sys/mips/mips/mp_machdep.c projects/altix/sys/mips/mips/mpboot.S projects/altix/sys/mips/mips/pm_machdep.c projects/altix/sys/mips/mips/pmap.c projects/altix/sys/mips/mips/psraccess.S projects/altix/sys/mips/mips/support.S projects/altix/sys/mips/mips/swtch.S projects/altix/sys/mips/mips/tick.c projects/altix/sys/mips/mips/trap.c projects/altix/sys/mips/mips/vm_machdep.c projects/altix/sys/mips/rmi/dev/xlr/rge.c projects/altix/sys/mips/rmi/files.xlr 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/std.xlr projects/altix/sys/mips/rmi/tick.c projects/altix/sys/mips/rmi/xlr_machdep.c projects/altix/sys/mips/rmi/xlr_pci.c projects/altix/sys/mips/sibyte/sb_machdep.c projects/altix/sys/mips/sibyte/sb_scd.c projects/altix/sys/mips/sibyte/sb_zbpci.c projects/altix/sys/modules/Makefile projects/altix/sys/modules/acpi/Makefile projects/altix/sys/modules/acpi/acpi/Makefile projects/altix/sys/modules/ata/atacore/Makefile projects/altix/sys/modules/cas/Makefile projects/altix/sys/modules/hwpmc/Makefile projects/altix/sys/modules/iwnfw/Makefile projects/altix/sys/modules/iwnfw/iwn6000/Makefile projects/altix/sys/modules/nfscl/Makefile projects/altix/sys/modules/nfsclient/Makefile projects/altix/sys/modules/opensolaris/Makefile projects/altix/sys/modules/sem/Makefile projects/altix/sys/modules/sound/driver/Makefile projects/altix/sys/modules/x86bios/Makefile projects/altix/sys/modules/zfs/Makefile projects/altix/sys/net/if.c projects/altix/sys/net/if_bridge.c projects/altix/sys/net/if_ethersubr.c projects/altix/sys/net/if_llatbl.c projects/altix/sys/net/if_vlan.c projects/altix/sys/net/pfil.h projects/altix/sys/net/radix.c projects/altix/sys/net/rtsock.c projects/altix/sys/net80211/ieee80211.c projects/altix/sys/net80211/ieee80211_node.c projects/altix/sys/net80211/ieee80211_sta.c projects/altix/sys/net80211/ieee80211_var.h projects/altix/sys/netgraph/bluetooth/l2cap/ng_l2cap_cmds.h projects/altix/sys/netgraph/netflow/netflow.c projects/altix/sys/netgraph/ng_ipfw.c projects/altix/sys/netinet/if_ether.c projects/altix/sys/netinet/in.c projects/altix/sys/netinet/in_proto.c projects/altix/sys/netinet/in_rmx.c projects/altix/sys/netinet/ip_carp.c projects/altix/sys/netinet/ip_carp.h projects/altix/sys/netinet/ip_icmp.c projects/altix/sys/netinet/ip_input.c projects/altix/sys/netinet/ipfw/dn_heap.c projects/altix/sys/netinet/ipfw/ip_fw2.c projects/altix/sys/netinet/ipfw/ip_fw_dynamic.c projects/altix/sys/netinet/ipfw/ip_fw_log.c projects/altix/sys/netinet/libalias/alias_db.c projects/altix/sys/netinet/libalias/alias_sctp.h projects/altix/sys/netinet/sctp_indata.c projects/altix/sys/netinet/sctp_output.c projects/altix/sys/netinet/sctp_pcb.c projects/altix/sys/netinet/sctp_structs.h projects/altix/sys/netinet/sctp_timer.c projects/altix/sys/netinet/siftr.c projects/altix/sys/netinet/tcp_output.c projects/altix/sys/netinet/tcp_subr.c projects/altix/sys/netinet/tcp_syncache.c projects/altix/sys/netinet6/in6_proto.c projects/altix/sys/netinet6/ip6_input.c projects/altix/sys/netinet6/nd6.c projects/altix/sys/netinet6/nd6_nbr.c projects/altix/sys/netinet6/raw_ip6.c projects/altix/sys/nfsclient/nfs_nfsiod.c projects/altix/sys/nfsclient/nfs_node.c projects/altix/sys/nfsclient/nfs_subs.c projects/altix/sys/nfsclient/nfs_vfsops.c projects/altix/sys/nfsclient/nfs_vnops.c projects/altix/sys/nfsclient/nfsnode.h projects/altix/sys/opencrypto/cryptodev.c projects/altix/sys/pc98/conf/GENERIC projects/altix/sys/pc98/conf/GENERIC.hints projects/altix/sys/pc98/pc98/machdep.c projects/altix/sys/pci/if_rl.c projects/altix/sys/powerpc/aim/copyinout.c projects/altix/sys/powerpc/aim/locore.S projects/altix/sys/powerpc/aim/machdep.c projects/altix/sys/powerpc/aim/mmu_oea.c projects/altix/sys/powerpc/aim/mmu_oea64.c projects/altix/sys/powerpc/aim/mp_cpudep.c projects/altix/sys/powerpc/aim/nexus.c projects/altix/sys/powerpc/aim/ofw_machdep.c projects/altix/sys/powerpc/aim/platform_chrp.c projects/altix/sys/powerpc/aim/trap.c projects/altix/sys/powerpc/aim/vm_machdep.c projects/altix/sys/powerpc/booke/locore.S projects/altix/sys/powerpc/booke/machdep.c projects/altix/sys/powerpc/booke/platform_bare.c projects/altix/sys/powerpc/booke/pmap.c projects/altix/sys/powerpc/booke/swtch.S projects/altix/sys/powerpc/booke/vm_machdep.c projects/altix/sys/powerpc/conf/DEFAULTS projects/altix/sys/powerpc/conf/GENERIC projects/altix/sys/powerpc/conf/MPC85XX projects/altix/sys/powerpc/conf/NOTES projects/altix/sys/powerpc/cpufreq/pcr.c projects/altix/sys/powerpc/include/_align.h projects/altix/sys/powerpc/include/_bus.h projects/altix/sys/powerpc/include/_inttypes.h projects/altix/sys/powerpc/include/_limits.h projects/altix/sys/powerpc/include/_stdint.h projects/altix/sys/powerpc/include/_types.h projects/altix/sys/powerpc/include/asm.h projects/altix/sys/powerpc/include/atomic.h projects/altix/sys/powerpc/include/bus.h projects/altix/sys/powerpc/include/cpufunc.h projects/altix/sys/powerpc/include/db_machdep.h projects/altix/sys/powerpc/include/elf.h projects/altix/sys/powerpc/include/frame.h projects/altix/sys/powerpc/include/hid.h projects/altix/sys/powerpc/include/md_var.h projects/altix/sys/powerpc/include/metadata.h projects/altix/sys/powerpc/include/param.h projects/altix/sys/powerpc/include/pcb.h projects/altix/sys/powerpc/include/pcpu.h projects/altix/sys/powerpc/include/pmap.h projects/altix/sys/powerpc/include/proc.h projects/altix/sys/powerpc/include/profile.h projects/altix/sys/powerpc/include/psl.h projects/altix/sys/powerpc/include/pte.h projects/altix/sys/powerpc/include/reg.h projects/altix/sys/powerpc/include/runq.h projects/altix/sys/powerpc/include/smp.h projects/altix/sys/powerpc/include/spr.h projects/altix/sys/powerpc/include/sr.h projects/altix/sys/powerpc/include/trap_aim.h projects/altix/sys/powerpc/include/ucontext.h projects/altix/sys/powerpc/include/vmparam.h projects/altix/sys/powerpc/mpc85xx/atpic.c projects/altix/sys/powerpc/mpc85xx/i2c.c projects/altix/sys/powerpc/mpc85xx/lbc.c projects/altix/sys/powerpc/mpc85xx/lbc.h projects/altix/sys/powerpc/mpc85xx/mpc85xx.c projects/altix/sys/powerpc/mpc85xx/mpc85xx.h projects/altix/sys/powerpc/mpc85xx/nexus.c projects/altix/sys/powerpc/ofw/ofw_real.c projects/altix/sys/powerpc/ofw/ofw_syscons.c projects/altix/sys/powerpc/powermac/grackle.c projects/altix/sys/powerpc/powerpc/bcopy.c projects/altix/sys/powerpc/powerpc/bus_machdep.c projects/altix/sys/powerpc/powerpc/busdma_machdep.c projects/altix/sys/powerpc/powerpc/cpu.c projects/altix/sys/powerpc/powerpc/db_interface.c projects/altix/sys/powerpc/powerpc/db_trace.c projects/altix/sys/powerpc/powerpc/genassym.c projects/altix/sys/powerpc/powerpc/in_cksum.c projects/altix/sys/powerpc/powerpc/intr_machdep.c projects/altix/sys/powerpc/powerpc/mp_machdep.c projects/altix/sys/powerpc/powerpc/setjmp.S projects/altix/sys/powerpc/powerpc/stack_machdep.c projects/altix/sys/powerpc/powerpc/syncicache.c projects/altix/sys/powerpc/powerpc/sys_machdep.c projects/altix/sys/sparc64/conf/GENERIC projects/altix/sys/sparc64/include/bus.h projects/altix/sys/sparc64/include/cache.h projects/altix/sys/sparc64/include/intr_machdep.h projects/altix/sys/sparc64/include/pcpu.h projects/altix/sys/sparc64/include/pmap.h projects/altix/sys/sparc64/include/smp.h projects/altix/sys/sparc64/include/tick.h projects/altix/sys/sparc64/include/vmparam.h projects/altix/sys/sparc64/sparc64/cache.c projects/altix/sys/sparc64/sparc64/clock.c projects/altix/sys/sparc64/sparc64/exception.S projects/altix/sys/sparc64/sparc64/genassym.c projects/altix/sys/sparc64/sparc64/intr_machdep.c projects/altix/sys/sparc64/sparc64/mem.c projects/altix/sys/sparc64/sparc64/mp_exception.S projects/altix/sys/sparc64/sparc64/mp_machdep.c projects/altix/sys/sparc64/sparc64/pmap.c projects/altix/sys/sparc64/sparc64/tick.c projects/altix/sys/sparc64/sparc64/tsb.c projects/altix/sys/sparc64/sparc64/uio_machdep.c projects/altix/sys/sparc64/sparc64/vm_machdep.c projects/altix/sys/sun4v/conf/DEFAULTS projects/altix/sys/sun4v/conf/GENERIC projects/altix/sys/sun4v/include/bus.h projects/altix/sys/sun4v/include/clock.h projects/altix/sys/sun4v/include/intr_machdep.h projects/altix/sys/sun4v/include/pcpu.h projects/altix/sys/sun4v/include/smp.h projects/altix/sys/sun4v/include/tick.h projects/altix/sys/sun4v/include/vmparam.h projects/altix/sys/sun4v/sun4v/clock.c projects/altix/sys/sun4v/sun4v/exception.S projects/altix/sys/sun4v/sun4v/intr_machdep.c projects/altix/sys/sun4v/sun4v/mp_machdep.c projects/altix/sys/sun4v/sun4v/pmap.c projects/altix/sys/sun4v/sun4v/tick.c projects/altix/sys/sys/_task.h projects/altix/sys/sys/cdefs.h projects/altix/sys/sys/conf.h projects/altix/sys/sys/disk.h projects/altix/sys/sys/elf_common.h projects/altix/sys/sys/imgact.h projects/altix/sys/sys/imgact_elf.h projects/altix/sys/sys/kthread.h projects/altix/sys/sys/ktr.h projects/altix/sys/sys/ktrace.h projects/altix/sys/sys/malloc.h projects/altix/sys/sys/param.h projects/altix/sys/sys/pcpu.h projects/altix/sys/sys/priv.h projects/altix/sys/sys/proc.h projects/altix/sys/sys/resource.h projects/altix/sys/sys/resourcevar.h projects/altix/sys/sys/signal.h projects/altix/sys/sys/signalvar.h projects/altix/sys/sys/sysctl.h projects/altix/sys/sys/systm.h projects/altix/sys/sys/taskqueue.h projects/altix/sys/sys/timeet.h projects/altix/sys/sys/types.h projects/altix/sys/sys/vnode.h projects/altix/sys/teken/teken_subr.h projects/altix/sys/ufs/ffs/ffs_softdep.c projects/altix/sys/vm/device_pager.c projects/altix/sys/vm/memguard.c projects/altix/sys/vm/memguard.h projects/altix/sys/vm/vm_extern.h projects/altix/sys/vm/vm_init.c projects/altix/sys/vm/vm_kern.c projects/altix/sys/vm/vm_mmap.c projects/altix/sys/vm/vm_page.c projects/altix/sys/vm/vm_page.h projects/altix/sys/vm/vm_phys.c projects/altix/sys/vm/vm_phys.h projects/altix/sys/x86/isa/atrtc.c projects/altix/sys/x86/isa/clock.c projects/altix/sys/x86/x86/local_apic.c projects/altix/sys/x86/x86/mca.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/lib/libstand/Makefile ============================================================================== --- projects/altix/lib/libstand/Makefile Sun Aug 15 21:58:05 2010 (r211362) +++ projects/altix/lib/libstand/Makefile Sun Aug 15 22:09:43 2010 (r211363) @@ -30,10 +30,10 @@ CFLAGS+= -mno-sse3 .if ${MACHINE} == "pc98" CFLAGS+= -Os .endif -.if ${MACHINE_ARCH} == "powerpc" -CFLAGS+= -msoft-float -D_STANDALONE +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" +CFLAGS+= -msoft-float -D_STANDALONE -DNETIF_DEBUG .endif -.if ${MACHINE_ARCH} == "amd64" +.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -m32 -I. .endif .if ${MACHINE_ARCH} == "arm" @@ -55,8 +55,8 @@ SRCS+= ntoh.c # string functions from libc .PATH: ${.CURDIR}/../libc/string .if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "powerpc" || \ - ${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "amd64" || \ - ${MACHINE_ARCH} == "arm" + ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "sparc64" || \ + ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "arm" SRCS+= bcmp.c bcopy.c bzero.c ffs.c index.c memccpy.c memchr.c memcmp.c \ memcpy.c memmove.c memset.c qdivrem.c rindex.c strcat.c strchr.c \ strcmp.c strcpy.c strcspn.c strlen.c strncat.c strncmp.c strncpy.c \ @@ -78,7 +78,7 @@ SRCS+= bcmp.c bcopy.S bzero.S ffs.S inde SRCS+= __divdi3.S __divsi3.S __moddi3.S __modsi3.S SRCS+= __udivdi3.S __udivsi3.S __umoddi3.S __umodsi3.S .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" .PATH: ${.CURDIR}/../libc/quad SRCS+= ashldi3.c ashrdi3.c .PATH: ${.CURDIR}/../libc/powerpc/gen @@ -92,6 +92,8 @@ SRCS+= uuid_equal.c uuid_is_nil.c # _setjmp/_longjmp .if ${MACHINE_ARCH} == "amd64" .PATH: ${.CURDIR}/i386 +.elif ${MACHINE_ARCH} == "powerpc64" +.PATH: ${.CURDIR}/powerpc .else .PATH: ${.CURDIR}/${MACHINE_ARCH} .endif Modified: projects/altix/lib/libstand/printf.c ============================================================================== --- projects/altix/lib/libstand/printf.c Sun Aug 15 21:58:05 2010 (r211362) +++ projects/altix/lib/libstand/printf.c Sun Aug 15 22:09:43 2010 (r211363) @@ -159,10 +159,10 @@ kvprintf(char const *fmt, void (*func)(i int ch, n; uintmax_t num; int base, lflag, qflag, tmp, width, ladjust, sharpflag, neg, sign, dot; - int jflag, tflag, zflag; + int cflag, hflag, jflag, tflag, zflag; int dwidth, upper; char padc; - int retval = 0; + int stop = 0, retval = 0; num = 0; if (!func) @@ -179,7 +179,7 @@ kvprintf(char const *fmt, void (*func)(i for (;;) { padc = ' '; width = 0; - while ((ch = (u_char)*fmt++) != '%') { + while ((ch = (u_char)*fmt++) != '%' || stop) { if (ch == '\0') return (retval); PCHAR(ch); @@ -187,7 +187,7 @@ kvprintf(char const *fmt, void (*func)(i percent = fmt - 1; qflag = 0; lflag = 0; ladjust = 0; sharpflag = 0; neg = 0; sign = 0; dot = 0; dwidth = 0; upper = 0; - jflag = 0; tflag = 0; zflag = 0; + cflag = 0; hflag = 0; jflag = 0; tflag = 0; zflag = 0; reswitch: switch (ch = (u_char)*fmt++) { case '.': dot = 1; @@ -234,7 +234,7 @@ reswitch: switch (ch = (u_char)*fmt++) { width = n; goto reswitch; case 'b': - num = va_arg(ap, int); + num = (u_int)va_arg(ap, int); p = va_arg(ap, char *); for (q = ksprintn(nbuf, num, *p++, NULL, 0); *q;) PCHAR(*q--); @@ -278,6 +278,13 @@ reswitch: switch (ch = (u_char)*fmt++) { base = 10; sign = 1; goto handle_sign; + case 'h': + if (hflag) { + hflag = 0; + cflag = 1; + } else + hflag = 1; + goto reswitch; case 'j': jflag = 1; goto reswitch; @@ -297,6 +304,10 @@ reswitch: switch (ch = (u_char)*fmt++) { *(va_arg(ap, long *)) = retval; else if (zflag) *(va_arg(ap, size_t *)) = retval; + else if (hflag) + *(va_arg(ap, short *)) = retval; + else if (cflag) + *(va_arg(ap, char *)) = retval; else *(va_arg(ap, int *)) = retval; break; @@ -368,6 +379,10 @@ handle_nosign: num = va_arg(ap, u_long); else if (zflag) num = va_arg(ap, size_t); + else if (hflag) + num = (u_short)va_arg(ap, int); + else if (cflag) + num = (u_char)va_arg(ap, int); else num = va_arg(ap, u_int); goto number; @@ -382,6 +397,10 @@ handle_sign: num = va_arg(ap, long); else if (zflag) num = va_arg(ap, ssize_t); + else if (hflag) + num = (short)va_arg(ap, int); + else if (cflag) + num = (char)va_arg(ap, int); else num = va_arg(ap, int); number: @@ -389,7 +408,8 @@ number: neg = 1; num = -(intmax_t)num; } - p = ksprintn(nbuf, num, base, &tmp, upper); + p = ksprintn(nbuf, num, base, &n, upper); + tmp = 0; if (sharpflag && num != 0) { if (base == 8) tmp++; @@ -399,9 +419,13 @@ number: if (neg) tmp++; - if (!ladjust && width && (width -= tmp) > 0) - while (width--) - PCHAR(padc); + if (!ladjust && padc == '0') + dwidth = width - tmp; + width -= tmp + imax(dwidth, n); + dwidth -= n; + if (!ladjust) + while (width-- > 0) + PCHAR(' '); if (neg) PCHAR('-'); if (sharpflag && num != 0) { @@ -412,18 +436,27 @@ number: PCHAR('x'); } } + while (dwidth-- > 0) + PCHAR('0'); while (*p) PCHAR(*p--); - if (ladjust && width && (width -= tmp) > 0) - while (width--) - PCHAR(padc); + if (ladjust) + while (width-- > 0) + PCHAR(' '); break; default: while (percent < fmt) PCHAR(*percent++); + /* + * Since we ignore an formatting argument it is no + * longer safe to obey the remaining formatting + * arguments as the arguments will no longer match + * the format specs. + */ + stop = 1; break; } } Modified: projects/altix/sys/amd64/acpica/acpi_switch.S ============================================================================== --- projects/altix/sys/amd64/acpica/acpi_switch.S Sun Aug 15 21:58:05 2010 (r211362) +++ projects/altix/sys/amd64/acpica/acpi_switch.S Sun Aug 15 22:09:43 2010 (r211363) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001 Takanori Watanabe * Copyright (c) 2001 Mitsuru IWASAKI - * Copyright (c) 2008-2009 Jung-uk Kim + * Copyright (c) 2008-2010 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -34,14 +34,11 @@ #include "acpi_wakedata.h" #include "assym.s" -#define WAKEUP_CTX(member) wakeup_ ## member - wakeup_ctx(%rdi) -#define WAKEUP_PCB(member) PCB_ ## member(%r11) -#define WAKEUP_XPCB(member) XPCB_ ## member(%r11) +#define WAKEUP_CTX(member) wakeup_ ## member - wakeup_ctx(%rsi) ENTRY(acpi_restorecpu) /* Switch to KPML4phys. */ - movq %rsi, %rax - movq %rax, %cr3 + movq %rdi, %cr3 /* Restore GDT. */ lgdt WAKEUP_CTX(gdt) @@ -49,7 +46,7 @@ ENTRY(acpi_restorecpu) 1: /* Fetch PCB. */ - movq WAKEUP_CTX(xpcb), %r11 + movq WAKEUP_CTX(pcb), %rdi /* Force kernel segment registers. */ movl $KDSEL, %eax @@ -62,16 +59,16 @@ ENTRY(acpi_restorecpu) movw %ax, %gs movl $MSR_FSBASE, %ecx - movl WAKEUP_PCB(FSBASE), %eax - movl 4 + WAKEUP_PCB(FSBASE), %edx + movl PCB_FSBASE(%rdi), %eax + movl 4 + PCB_FSBASE(%rdi), %edx wrmsr movl $MSR_GSBASE, %ecx - movl WAKEUP_PCB(GSBASE), %eax - movl 4 + WAKEUP_PCB(GSBASE), %edx + movl PCB_GSBASE(%rdi), %eax + movl 4 + PCB_GSBASE(%rdi), %edx wrmsr movl $MSR_KGSBASE, %ecx - movl WAKEUP_XPCB(KGSBASE), %eax - movl 4 + WAKEUP_XPCB(KGSBASE), %edx + movl PCB_KGSBASE(%rdi), %eax + movl 4 + PCB_KGSBASE(%rdi), %edx wrmsr /* Restore EFER. */ @@ -102,17 +99,21 @@ ENTRY(acpi_restorecpu) movl WAKEUP_CTX(sfmask), %eax wrmsr - /* Restore CR0, CR2 and CR4. */ - movq WAKEUP_XPCB(CR0), %rax + /* Restore CR0 except for FPU mode. */ + movq PCB_CR0(%rdi), %rax + movq %rax, %rcx + andq $~(CR0_EM | CR0_TS), %rax movq %rax, %cr0 - movq WAKEUP_XPCB(CR2), %rax + + /* Restore CR2 and CR4. */ + movq PCB_CR2(%rdi), %rax movq %rax, %cr2 - movq WAKEUP_XPCB(CR4), %rax + movq PCB_CR4(%rdi), %rax movq %rax, %cr4 /* Restore descriptor tables. */ - lidt WAKEUP_XPCB(IDT) - lldt WAKEUP_XPCB(LDT) + lidt PCB_IDT(%rdi) + lldt PCB_LDT(%rdi) #define SDT_SYSTSS 9 #define SDT_SYSBSY 11 @@ -120,37 +121,44 @@ ENTRY(acpi_restorecpu) /* Clear "task busy" bit and reload TR. */ movq PCPU(TSS), %rax andb $(~SDT_SYSBSY | SDT_SYSTSS), 5(%rax) - movw WAKEUP_XPCB(TR), %ax + movw PCB_TR(%rdi), %ax ltr %ax #undef SDT_SYSTSS #undef SDT_SYSBSY /* Restore other callee saved registers. */ - movq WAKEUP_PCB(R15), %r15 - movq WAKEUP_PCB(R14), %r14 - movq WAKEUP_PCB(R13), %r13 - movq WAKEUP_PCB(R12), %r12 - movq WAKEUP_PCB(RBP), %rbp - movq WAKEUP_PCB(RSP), %rsp - movq WAKEUP_PCB(RBX), %rbx + movq PCB_R15(%rdi), %r15 + movq PCB_R14(%rdi), %r14 + movq PCB_R13(%rdi), %r13 + movq PCB_R12(%rdi), %r12 + movq PCB_RBP(%rdi), %rbp + movq PCB_RSP(%rdi), %rsp + movq PCB_RBX(%rdi), %rbx /* Restore debug registers. */ - movq WAKEUP_PCB(DR0), %rax + movq PCB_DR0(%rdi), %rax movq %rax, %dr0 - movq WAKEUP_PCB(DR1), %rax + movq PCB_DR1(%rdi), %rax movq %rax, %dr1 - movq WAKEUP_PCB(DR2), %rax + movq PCB_DR2(%rdi), %rax movq %rax, %dr2 - movq WAKEUP_PCB(DR3), %rax + movq PCB_DR3(%rdi), %rax movq %rax, %dr3 - movq WAKEUP_PCB(DR6), %rax + movq PCB_DR6(%rdi), %rax movq %rax, %dr6 - movq WAKEUP_PCB(DR7), %rax + movq PCB_DR7(%rdi), %rax movq %rax, %dr7 + /* Restore FPU state. */ + fninit + fxrstor PCB_USERFPU(%rdi) + + /* Reload CR0. */ + movq %rcx, %cr0 + /* Restore return address. */ - movq WAKEUP_PCB(RIP), %rax + movq PCB_RIP(%rdi), %rax movq %rax, (%rsp) /* Indicate the CPU is resumed. */ @@ -159,19 +167,3 @@ ENTRY(acpi_restorecpu) ret END(acpi_restorecpu) - -ENTRY(acpi_savecpu) - /* Fetch XPCB and save CPU context. */ - movq %rdi, %r10 - call savectx2 - movq %r10, %r11 - - /* Patch caller's return address and stack pointer. */ - movq (%rsp), %rax - movq %rax, WAKEUP_PCB(RIP) - movq %rsp, %rax - movq %rax, WAKEUP_PCB(RSP) - - movl $1, %eax - ret -END(acpi_savecpu) Modified: projects/altix/sys/amd64/acpica/acpi_wakecode.S ============================================================================== --- projects/altix/sys/amd64/acpica/acpi_wakecode.S Sun Aug 15 21:58:05 2010 (r211362) +++ projects/altix/sys/amd64/acpica/acpi_wakecode.S Sun Aug 15 22:09:43 2010 (r211363) @@ -2,7 +2,7 @@ * Copyright (c) 2001 Takanori Watanabe * Copyright (c) 2001 Mitsuru IWASAKI * Copyright (c) 2003 Peter Wemm - * Copyright (c) 2008-2009 Jung-uk Kim + * Copyright (c) 2008-2010 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,8 +29,6 @@ * $FreeBSD$ */ -#define LOCORE - #include #include @@ -212,8 +210,8 @@ wakeup_64: mov %ax, %ds /* Restore arguments and return. */ - movq wakeup_ctx - wakeup_start(%rbx), %rdi - movq wakeup_kpml4 - wakeup_start(%rbx), %rsi + movq wakeup_kpml4 - wakeup_start(%rbx), %rdi + movq wakeup_ctx - wakeup_start(%rbx), %rsi movq wakeup_retaddr - wakeup_start(%rbx), %rax jmp *%rax @@ -267,7 +265,7 @@ wakeup_kpml4: wakeup_ctx: .quad 0 -wakeup_xpcb: +wakeup_pcb: .quad 0 wakeup_gdt: .word 0 Modified: projects/altix/sys/amd64/acpica/acpi_wakeup.c ============================================================================== --- projects/altix/sys/amd64/acpica/acpi_wakeup.c Sun Aug 15 21:58:05 2010 (r211362) +++ projects/altix/sys/amd64/acpica/acpi_wakeup.c Sun Aug 15 22:09:43 2010 (r211363) @@ -2,7 +2,7 @@ * Copyright (c) 2001 Takanori Watanabe * Copyright (c) 2001 Mitsuru IWASAKI * Copyright (c) 2003 Peter Wemm - * Copyright (c) 2008-2009 Jung-uk Kim + * Copyright (c) 2008-2010 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -66,13 +66,12 @@ extern int acpi_resume_beep; extern int acpi_reset_video; #ifdef SMP -extern struct xpcb **stopxpcbs; +extern struct pcb **susppcbs; #else -static struct xpcb **stopxpcbs; +static struct pcb **susppcbs; #endif -int acpi_restorecpu(struct xpcb *, vm_offset_t); -int acpi_savecpu(struct xpcb *); +int acpi_restorecpu(vm_offset_t, struct pcb *); static void *acpi_alloc_wakeup_handler(void); static void acpi_stop_beep(void *); @@ -105,10 +104,10 @@ acpi_wakeup_ap(struct acpi_softc *sc, in int apic_id = cpu_apic_ids[cpu]; int ms; - WAKECODE_FIXUP(wakeup_xpcb, struct xpcb *, stopxpcbs[cpu]); - WAKECODE_FIXUP(wakeup_gdt, uint16_t, stopxpcbs[cpu]->xpcb_gdt.rd_limit); + WAKECODE_FIXUP(wakeup_pcb, struct pcb *, susppcbs[cpu]); + WAKECODE_FIXUP(wakeup_gdt, uint16_t, susppcbs[cpu]->pcb_gdt.rd_limit); WAKECODE_FIXUP(wakeup_gdt + 2, uint64_t, - stopxpcbs[cpu]->xpcb_gdt.rd_base); + susppcbs[cpu]->pcb_gdt.rd_base); WAKECODE_FIXUP(wakeup_cpu, int, cpu); /* do an INIT IPI: assert RESET */ @@ -177,7 +176,6 @@ static void acpi_wakeup_cpus(struct acpi_softc *sc, cpumask_t wakeup_cpus) { uint32_t mpbioswarmvec; - cpumask_t map; int cpu; u_char mpbiosreason; @@ -194,8 +192,7 @@ acpi_wakeup_cpus(struct acpi_softc *sc, /* Wake up each AP. */ for (cpu = 1; cpu < mp_ncpus; cpu++) { - map = 1ul << cpu; - if ((wakeup_cpus & map) != map) + if ((wakeup_cpus & (1 << cpu)) == 0) continue; if (acpi_wakeup_ap(sc, cpu) == 0) { /* restore the warmstart vector */ @@ -216,7 +213,6 @@ acpi_wakeup_cpus(struct acpi_softc *sc, int acpi_sleep_machdep(struct acpi_softc *sc, int state) { - struct savefpu *stopfpu; #ifdef SMP cpumask_t wakeup_cpus; #endif @@ -246,10 +242,7 @@ acpi_sleep_machdep(struct acpi_softc *sc cr3 = rcr3(); load_cr3(KPML4phys); - stopfpu = &stopxpcbs[0]->xpcb_pcb.pcb_user_save; - if (acpi_savecpu(stopxpcbs[0])) { - fpugetregs(curthread, stopfpu); - + if (savectx(susppcbs[0])) { #ifdef SMP if (wakeup_cpus != 0 && suspend_cpus(wakeup_cpus) == 0) { device_printf(sc->acpi_dev, @@ -262,11 +255,11 @@ acpi_sleep_machdep(struct acpi_softc *sc WAKECODE_FIXUP(resume_beep, uint8_t, (acpi_resume_beep != 0)); WAKECODE_FIXUP(reset_video, uint8_t, (acpi_reset_video != 0)); - WAKECODE_FIXUP(wakeup_xpcb, struct xpcb *, stopxpcbs[0]); + WAKECODE_FIXUP(wakeup_pcb, struct pcb *, susppcbs[0]); WAKECODE_FIXUP(wakeup_gdt, uint16_t, - stopxpcbs[0]->xpcb_gdt.rd_limit); + susppcbs[0]->pcb_gdt.rd_limit); WAKECODE_FIXUP(wakeup_gdt + 2, uint64_t, - stopxpcbs[0]->xpcb_gdt.rd_base); + susppcbs[0]->pcb_gdt.rd_base); WAKECODE_FIXUP(wakeup_cpu, int, 0); /* Call ACPICA to enter the desired sleep state */ @@ -285,7 +278,8 @@ acpi_sleep_machdep(struct acpi_softc *sc for (;;) ia32_pause(); } else { - fpusetregs(curthread, stopfpu); + PCPU_SET(switchtime, 0); + PCPU_SET(switchticks, ticks); #ifdef SMP if (wakeup_cpus != 0) acpi_wakeup_cpus(sc, wakeup_cpus); @@ -337,9 +331,9 @@ acpi_alloc_wakeup_handler(void) printf("%s: can't alloc wake memory\n", __func__); return (NULL); } - stopxpcbs = malloc(mp_ncpus * sizeof(*stopxpcbs), M_DEVBUF, M_WAITOK); + susppcbs = malloc(mp_ncpus * sizeof(*susppcbs), M_DEVBUF, M_WAITOK); for (i = 0; i < mp_ncpus; i++) - stopxpcbs[i] = malloc(sizeof(**stopxpcbs), M_DEVBUF, M_WAITOK); + susppcbs[i] = malloc(sizeof(**susppcbs), M_DEVBUF, M_WAITOK); return (wakeaddr); } Modified: projects/altix/sys/amd64/amd64/cpu_switch.S ============================================================================== --- projects/altix/sys/amd64/amd64/cpu_switch.S Sun Aug 15 21:58:05 2010 (r211362) +++ projects/altix/sys/amd64/amd64/cpu_switch.S Sun Aug 15 22:09:43 2010 (r211363) @@ -69,16 +69,13 @@ * %rsi = newtd */ ENTRY(cpu_throw) + movl PCPU(CPUID),%eax testq %rdi,%rdi - jnz 1f - movq PCPU(IDLETHREAD),%rdi -1: - movq TD_PCB(%rdi),%r8 /* Old pcb */ - movl PCPU(CPUID), %eax + jz 1f /* release bit from old pm_active */ - movq TD_PROC(%rdi), %rdx /* oldtd->td_proc */ - movq P_VMSPACE(%rdx), %rdx /* proc->p_vmspace */ - LK btrl %eax, VM_PMAP+PM_ACTIVE(%rdx) /* clear old */ + movq PCPU(CURPMAP),%rdx + LK btrl %eax,PM_ACTIVE(%rdx) /* clear old */ +1: movq TD_PCB(%rsi),%r8 /* newtd->td_proc */ movq PCB_CR3(%r8),%rdx movq %rdx,%cr3 /* new address space */ @@ -140,15 +137,16 @@ swinact: movq %rcx,%cr3 /* new address space */ movl PCPU(CPUID), %eax /* Release bit from old pmap->pm_active */ - movq TD_PROC(%rdi), %rcx /* oldproc */ - movq P_VMSPACE(%rcx), %rcx - LK btrl %eax, VM_PMAP+PM_ACTIVE(%rcx) /* clear old */ + movq PCPU(CURPMAP),%rcx + LK btrl %eax,PM_ACTIVE(%rcx) /* clear old */ SETLK %rdx, TD_LOCK(%rdi) /* Release the old thread */ swact: /* Set bit in new pmap->pm_active */ movq TD_PROC(%rsi),%rdx /* newproc */ movq P_VMSPACE(%rdx), %rdx - LK btsl %eax, VM_PMAP+PM_ACTIVE(%rdx) /* set new */ + addq $VM_PMAP,%rdx + LK btsl %eax,PM_ACTIVE(%rdx) /* set new */ + movq %rdx,PCPU(CURPMAP) sw1: #if defined(SCHED_ULE) && defined(SMP) @@ -245,13 +243,13 @@ store_dr: movq %dr2,%r13 movq %dr3,%r12 movq %dr6,%r11 - andq $0x0000fc00, %rax /* disable all watchpoints */ movq %r15,PCB_DR0(%r8) movq %r14,PCB_DR1(%r8) movq %r13,PCB_DR2(%r8) movq %r12,PCB_DR3(%r8) movq %r11,PCB_DR6(%r8) movq %rax,PCB_DR7(%r8) + andq $0x0000fc00, %rax /* disable all watchpoints */ movq %rax,%dr7 jmp done_store_dr @@ -304,121 +302,65 @@ END(cpu_switch) * Update pcb, saving current processor state. */ ENTRY(savectx) - /* Fetch PCB. */ - movq %rdi,%rcx - /* Save caller's return address. */ movq (%rsp),%rax - movq %rax,PCB_RIP(%rcx) - - movq %cr3,%rax - movq %rax,PCB_CR3(%rcx) - - movq %rbx,PCB_RBX(%rcx) - movq %rsp,PCB_RSP(%rcx) - movq %rbp,PCB_RBP(%rcx) - movq %r12,PCB_R12(%rcx) - movq %r13,PCB_R13(%rcx) - movq %r14,PCB_R14(%rcx) - movq %r15,PCB_R15(%rcx) - - /* - * If fpcurthread == NULL, then the fpu h/w state is irrelevant and the - * state had better already be in the pcb. This is true for forks - * but not for dumps (the old book-keeping with FP flags in the pcb - * always lost for dumps because the dump pcb has 0 flags). - * - * If fpcurthread != NULL, then we have to save the fpu h/w state to - * fpcurthread's pcb and copy it to the requested pcb, or save to the - * requested pcb and reload. Copying is easier because we would - * have to handle h/w bugs for reloading. We used to lose the - * parent's fpu state for forks by forgetting to reload. - */ - pushfq - cli - movq PCPU(FPCURTHREAD),%rax - testq %rax,%rax - je 1f + movq %rax,PCB_RIP(%rdi) - movq TD_PCB(%rax),%rdi - movq PCB_SAVEFPU(%rdi),%rdi - clts - fxsave (%rdi) - smsw %ax - orb $CR0_TS,%al - lmsw %ax + movq %rbx,PCB_RBX(%rdi) + movq %rsp,PCB_RSP(%rdi) + movq %rbp,PCB_RBP(%rdi) + movq %r12,PCB_R12(%rdi) + movq %r13,PCB_R13(%rdi) + movq %r14,PCB_R14(%rdi) + movq %r15,PCB_R15(%rdi) - movq $PCB_SAVEFPU_SIZE,%rdx /* arg 3 */ - movq PCB_SAVEFPU(%rcx),%rsi /* arg 2 */ - /* arg 1 (%rdi) already loaded */ - call bcopy -1: - popfq - - ret -END(savectx) - -/* - * savectx2(xpcb) - * Update xpcb, saving current processor state. - */ -ENTRY(savectx2) - /* Fetch XPCB. */ - movq %rdi,%r8 - - /* Save caller's return address. */ - movq (%rsp),%rax - movq %rax,PCB_RIP(%r8) - - movq %rbx,PCB_RBX(%r8) - movq %rsp,PCB_RSP(%r8) - movq %rbp,PCB_RBP(%r8) - movq %r12,PCB_R12(%r8) - movq %r13,PCB_R13(%r8) - movq %r14,PCB_R14(%r8) - movq %r15,PCB_R15(%r8) - - movq %cr0,%rax - movq %rax,XPCB_CR0(%r8) + movq %cr0,%rsi + movq %rsi,PCB_CR0(%rdi) movq %cr2,%rax - movq %rax,XPCB_CR2(%r8) + movq %rax,PCB_CR2(%rdi) + movq %cr3,%rax + movq %rax,PCB_CR3(%rdi) movq %cr4,%rax - movq %rax,XPCB_CR4(%r8) + movq %rax,PCB_CR4(%rdi) movq %dr0,%rax - movq %rax,PCB_DR0(%r8) + movq %rax,PCB_DR0(%rdi) movq %dr1,%rax - movq %rax,PCB_DR1(%r8) + movq %rax,PCB_DR1(%rdi) movq %dr2,%rax - movq %rax,PCB_DR2(%r8) + movq %rax,PCB_DR2(%rdi) movq %dr3,%rax - movq %rax,PCB_DR3(%r8) + movq %rax,PCB_DR3(%rdi) movq %dr6,%rax - movq %rax,PCB_DR6(%r8) + movq %rax,PCB_DR6(%rdi) movq %dr7,%rax - movq %rax,PCB_DR7(%r8) - - sgdt XPCB_GDT(%r8) - sidt XPCB_IDT(%r8) - sldt XPCB_LDT(%r8) - str XPCB_TR(%r8) + movq %rax,PCB_DR7(%rdi) movl $MSR_FSBASE,%ecx rdmsr shlq $32,%rdx leaq (%rax,%rdx),%rax - movq %rax,PCB_FSBASE(%r8) + movq %rax,PCB_FSBASE(%rdi) movl $MSR_GSBASE,%ecx rdmsr shlq $32,%rdx leaq (%rax,%rdx),%rax - movq %rax,PCB_GSBASE(%r8) + movq %rax,PCB_GSBASE(%rdi) movl $MSR_KGSBASE,%ecx rdmsr shlq $32,%rdx leaq (%rax,%rdx),%rax - movq %rax,XPCB_KGSBASE(%r8) + movq %rax,PCB_KGSBASE(%rdi) + + sgdt PCB_GDT(%rdi) + sidt PCB_IDT(%rdi) + sldt PCB_LDT(%rdi) + str PCB_TR(%rdi) - movl $1, %eax + clts + fxsave PCB_USERFPU(%rdi) + movq %rsi,%cr0 /* The previous %cr0 is saved in %rsi. */ + + movl $1,%eax ret -END(savectx2) +END(savectx) Modified: projects/altix/sys/amd64/amd64/fpu.c ============================================================================== --- projects/altix/sys/amd64/amd64/fpu.c Sun Aug 15 21:58:05 2010 (r211362) +++ projects/altix/sys/amd64/amd64/fpu.c Sun Aug 15 22:09:43 2010 (r211363) @@ -65,27 +65,29 @@ __FBSDID("$FreeBSD$"); #if defined(__GNUCLIKE_ASM) && !defined(lint) -#define fldcw(addr) __asm("fldcw %0" : : "m" (*(addr))) -#define fnclex() __asm("fnclex") -#define fninit() __asm("fninit") +#define fldcw(cw) __asm __volatile("fldcw %0" : : "m" (cw)) +#define fnclex() __asm __volatile("fnclex") +#define fninit() __asm __volatile("fninit") #define fnstcw(addr) __asm __volatile("fnstcw %0" : "=m" (*(addr))) -#define fnstsw(addr) __asm __volatile("fnstsw %0" : "=m" (*(addr))) -#define fxrstor(addr) __asm("fxrstor %0" : : "m" (*(addr))) +#define fnstsw(addr) __asm __volatile("fnstsw %0" : "=am" (*(addr))) +#define fxrstor(addr) __asm __volatile("fxrstor %0" : : "m" (*(addr))) #define fxsave(addr) __asm __volatile("fxsave %0" : "=m" (*(addr))) -#define ldmxcsr(r) __asm __volatile("ldmxcsr %0" : : "m" (r)) -#define start_emulating() __asm("smsw %%ax; orb %0,%%al; lmsw %%ax" \ - : : "n" (CR0_TS) : "ax") -#define stop_emulating() __asm("clts") +#define ldmxcsr(csr) __asm __volatile("ldmxcsr %0" : : "m" (csr)) +#define start_emulating() __asm __volatile( \ + "smsw %%ax; orb %0,%%al; lmsw %%ax" \ + : : "n" (CR0_TS) : "ax") +#define stop_emulating() __asm __volatile("clts") #else /* !(__GNUCLIKE_ASM && !lint) */ -void fldcw(caddr_t addr); +void fldcw(u_short cw); void fnclex(void); void fninit(void); void fnstcw(caddr_t addr); void fnstsw(caddr_t addr); void fxsave(caddr_t addr); void fxrstor(caddr_t addr); +void ldmxcsr(u_int csr); void start_emulating(void); void stop_emulating(void); @@ -122,7 +124,7 @@ fpuinit(void) stop_emulating(); fninit(); control = __INITIAL_FPUCW__; - fldcw(&control); + fldcw(control); mxcsr = __INITIAL_MXCSR__; ldmxcsr(mxcsr); if (PCPU_GET(cpuid) == 0) { @@ -423,7 +425,7 @@ fpudna(void) */ fxrstor(&fpu_initialstate); if (pcb->pcb_initial_fpucw != __INITIAL_FPUCW__) - fldcw(&pcb->pcb_initial_fpucw); + fldcw(pcb->pcb_initial_fpucw); pcb->pcb_flags |= PCB_FPUINITDONE; if (PCB_USER_FPU(pcb)) pcb->pcb_flags |= PCB_USERFPUINITDONE; Modified: projects/altix/sys/amd64/amd64/genassym.c ============================================================================== --- projects/altix/sys/amd64/amd64/genassym.c Sun Aug 15 21:58:05 2010 (r211362) +++ projects/altix/sys/amd64/amd64/genassym.c Sun Aug 15 22:09:43 2010 (r211363) @@ -123,7 +123,7 @@ ASSYM(KERNBASE, KERNBASE); ASSYM(DMAP_MIN_ADDRESS, DMAP_MIN_ADDRESS); ASSYM(DMAP_MAX_ADDRESS, DMAP_MAX_ADDRESS); ASSYM(MCLBYTES, MCLBYTES); -ASSYM(PCB_CR3, offsetof(struct pcb, pcb_cr3)); + ASSYM(PCB_R15, offsetof(struct pcb, pcb_r15)); ASSYM(PCB_R14, offsetof(struct pcb, pcb_r14)); ASSYM(PCB_R13, offsetof(struct pcb, pcb_r13)); @@ -134,39 +134,35 @@ ASSYM(PCB_RBX, offsetof(struct pcb, pcb_ ASSYM(PCB_RIP, offsetof(struct pcb, pcb_rip)); ASSYM(PCB_FSBASE, offsetof(struct pcb, pcb_fsbase)); ASSYM(PCB_GSBASE, offsetof(struct pcb, pcb_gsbase)); +ASSYM(PCB_KGSBASE, offsetof(struct pcb, pcb_kgsbase)); +ASSYM(PCB_CR0, offsetof(struct pcb, pcb_cr0)); +ASSYM(PCB_CR2, offsetof(struct pcb, pcb_cr2)); +ASSYM(PCB_CR3, offsetof(struct pcb, pcb_cr3)); +ASSYM(PCB_CR4, offsetof(struct pcb, pcb_cr4)); ASSYM(PCB_DR0, offsetof(struct pcb, pcb_dr0)); ASSYM(PCB_DR1, offsetof(struct pcb, pcb_dr1)); ASSYM(PCB_DR2, offsetof(struct pcb, pcb_dr2)); ASSYM(PCB_DR3, offsetof(struct pcb, pcb_dr3)); ASSYM(PCB_DR6, offsetof(struct pcb, pcb_dr6)); ASSYM(PCB_DR7, offsetof(struct pcb, pcb_dr7)); +ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); +ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault)); +ASSYM(PCB_GS32SD, offsetof(struct pcb, pcb_gs32sd)); ASSYM(PCB_TSSP, offsetof(struct pcb, pcb_tssp)); +ASSYM(PCB_SAVEFPU, offsetof(struct pcb, pcb_save)); +ASSYM(PCB_SAVEFPU_SIZE, sizeof(struct savefpu)); ASSYM(PCB_FULL_IRET, offsetof(struct pcb, pcb_full_iret)); +ASSYM(PCB_GDT, offsetof(struct pcb, pcb_gdt)); +ASSYM(PCB_IDT, offsetof(struct pcb, pcb_idt)); +ASSYM(PCB_LDT, offsetof(struct pcb, pcb_ldt)); +ASSYM(PCB_TR, offsetof(struct pcb, pcb_tr)); +ASSYM(PCB_USERFPU, offsetof(struct pcb, pcb_user_save)); +ASSYM(PCB_SIZE, sizeof(struct pcb)); ASSYM(PCB_DBREGS, PCB_DBREGS); ASSYM(PCB_32BIT, PCB_32BIT); ASSYM(PCB_GS32BIT, PCB_GS32BIT); ASSYM(PCB_FULLCTX, PCB_FULLCTX); -ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); -ASSYM(PCB_SAVEFPU, offsetof(struct pcb, pcb_save)); -ASSYM(PCB_SAVEFPU_SIZE, sizeof(struct savefpu)); -ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault)); -ASSYM(PCB_GS32SD, offsetof(struct pcb, pcb_gs32sd)); - -ASSYM(PCB_SIZE, sizeof(struct pcb)); - -ASSYM(XPCB_PCB, offsetof(struct xpcb, xpcb_pcb)); -ASSYM(XPCB_CR0, offsetof(struct xpcb, xpcb_cr0)); -ASSYM(XPCB_CR2, offsetof(struct xpcb, xpcb_cr2)); -ASSYM(XPCB_CR4, offsetof(struct xpcb, xpcb_cr4)); -ASSYM(XPCB_KGSBASE, offsetof(struct xpcb, xpcb_kgsbase)); -ASSYM(XPCB_GDT, offsetof(struct xpcb, xpcb_gdt)); -ASSYM(XPCB_IDT, offsetof(struct xpcb, xpcb_idt)); -ASSYM(XPCB_LDT, offsetof(struct xpcb, xpcb_ldt)); -ASSYM(XPCB_TR, offsetof(struct xpcb, xpcb_tr)); - -ASSYM(XPCB_SIZE, sizeof(struct xpcb)); - ASSYM(COMMON_TSS_RSP0, offsetof(struct amd64tss, tss_rsp0)); ASSYM(TF_R15, offsetof(struct trapframe, tf_r15)); Modified: projects/altix/sys/amd64/amd64/identcpu.c ============================================================================== --- projects/altix/sys/amd64/amd64/identcpu.c Sun Aug 15 21:58:05 2010 (r211362) +++ projects/altix/sys/amd64/amd64/identcpu.c Sun Aug 15 22:09:43 2010 (r211363) @@ -76,8 +76,30 @@ static void print_via_padlock_info(void) int cpu_class; char machine[] = "amd64"; -SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, - machine, 0, "Machine class"); + +#ifdef SCTL_MASK32 +extern int adaptive_machine_arch; +#endif + +static int +sysctl_hw_machine(SYSCTL_HANDLER_ARGS) +{ +#ifdef SCTL_MASK32 + static const char machine32[] = "i386"; +#endif + int error; + +#ifdef SCTL_MASK32 + if ((req->flags & SCTL_MASK32) != 0 && adaptive_machine_arch) + error = SYSCTL_OUT(req, machine32, sizeof(machine32)); + else +#endif + error = SYSCTL_OUT(req, machine, sizeof(machine)); + return (error); + +} +SYSCTL_PROC(_hw, HW_MACHINE, machine, CTLTYPE_STRING | CTLFLAG_RD, + NULL, 0, sysctl_hw_machine, "A", "Machine class"); static char cpu_model[128]; SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, Modified: projects/altix/sys/amd64/amd64/initcpu.c ============================================================================== --- projects/altix/sys/amd64/amd64/initcpu.c Sun Aug 15 21:58:05 2010 (r211362) +++ projects/altix/sys/amd64/amd64/initcpu.c Sun Aug 15 22:09:43 2010 (r211363) @@ -177,17 +177,17 @@ initializecpucache() if ((cpu_feature & CPUID_CLFSH) != 0) cpu_clflush_line_size = ((cpu_procinfo >> 8) & 0xff) * 8; /* - * XXXKIB: (temporary) hack to work around traps generated when - * CLFLUSHing APIC registers window. + * XXXKIB: (temporary) hack to work around traps generated + * when CLFLUSHing APIC register window under virtualization + * environments. These environments tend to disable the + * CPUID_SS feature even though the native CPU supports it. */ TUNABLE_INT_FETCH("hw.clflush_disable", &hw_clflush_disable); - if (cpu_vendor_id == CPU_VENDOR_INTEL && !(cpu_feature & CPUID_SS) && - hw_clflush_disable == -1) + if (vm_guest != VM_GUEST_NO && hw_clflush_disable == -1) cpu_feature &= ~CPUID_CLFSH; /* * Allow to disable CLFLUSH feature manually by - * hw.clflush_disable tunable. This may help Xen guest on some AMD - * CPUs. + * hw.clflush_disable tunable. */ if (hw_clflush_disable == 1) cpu_feature &= ~CPUID_CLFSH; Modified: projects/altix/sys/amd64/amd64/mp_machdep.c ============================================================================== --- projects/altix/sys/amd64/amd64/mp_machdep.c Sun Aug 15 21:58:05 2010 (r211362) +++ projects/altix/sys/amd64/amd64/mp_machdep.c Sun Aug 15 22:09:43 2010 (r211363) @@ -100,7 +100,7 @@ char *nmi_stack; void *dpcpu; struct pcb stoppcbs[MAXCPU]; -struct xpcb **stopxpcbs = NULL; +struct pcb **susppcbs = NULL; /* Variables needed for SMP tlb shootdown. */ vm_offset_t smp_tlb_addr1; @@ -127,7 +127,7 @@ extern inthand_t IDTVEC(fast_syscall), I * Local data and functions. */ -static u_int logical_cpus; +static cpumask_t logical_cpus; static volatile cpumask_t ipi_nmi_pending; /* used to hold the AP's until we are ready to release them */ @@ -162,8 +162,8 @@ static int start_all_aps(void); static int start_ap(int apic_id); static void release_aps(void *dummy); -static int hlt_logical_cpus; -static u_int hyperthreading_cpus; +static cpumask_t hlt_logical_cpus; +static cpumask_t hyperthreading_cpus; static cpumask_t hyperthreading_cpus_mask; static int hyperthreading_allowed = 1; static struct sysctl_ctx_list logical_cpu_clist; @@ -1053,7 +1053,7 @@ smp_targeted_tlb_shootdown(cpumask_t mas int ncpu, othercpus; othercpus = mp_ncpus - 1; - if (mask == (u_int)-1) { + if (mask == (cpumask_t)-1) { ncpu = othercpus; if (ncpu < 1) return; @@ -1078,7 +1078,7 @@ smp_targeted_tlb_shootdown(cpumask_t mas smp_tlb_addr1 = addr1; smp_tlb_addr2 = addr2; atomic_store_rel_int(&smp_tlb_wait, 0); - if (mask == (u_int)-1) + if (mask == (cpumask_t)-1) ipi_all_but_self(vector); else ipi_selected(mask, vector); @@ -1087,6 +1087,30 @@ smp_targeted_tlb_shootdown(cpumask_t mas mtx_unlock_spin(&smp_ipi_mtx); } +/* + * Send an IPI to specified CPU handling the bitmap logic. + */ +static void +ipi_send_cpu(int cpu, u_int ipi) +{ + u_int bitmap, old_pending, new_pending; + + KASSERT(cpu_apic_ids[cpu] != -1, ("IPI to non-existent CPU %d", cpu)); + + if (IPI_IS_BITMAPED(ipi)) { + bitmap = 1 << ipi; + ipi = IPI_BITMAP_VECTOR; + do { + old_pending = cpu_ipi_pending[cpu]; + new_pending = old_pending | bitmap; + } while (!atomic_cmpset_int(&cpu_ipi_pending[cpu], + old_pending, new_pending)); + if (old_pending) + return; + } + lapic_ipi_vectored(ipi, cpu_apic_ids[cpu]); +} + void smp_cache_flush(void) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Mon Aug 16 15:51:41 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4DF91065695; Mon, 16 Aug 2010 15:51:41 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3DBF8FC0C; Mon, 16 Aug 2010 15:51:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7GFpf35002852; Mon, 16 Aug 2010 15:51:41 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7GFpfOl002850; Mon, 16 Aug 2010 15:51:41 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201008161551.o7GFpfOl002850@svn.freebsd.org> From: Attilio Rao Date: Mon, 16 Aug 2010 15:51:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211398 - projects/sv/usr.sbin/netdumpsrv X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Aug 2010 15:51:42 -0000 Author: attilio Date: Mon Aug 16 15:51:41 2010 New Revision: 211398 URL: http://svn.freebsd.org/changeset/base/211398 Log: Add some assertions in order to verify arguments passings. Modified: projects/sv/usr.sbin/netdumpsrv/netdump_server.c Modified: projects/sv/usr.sbin/netdumpsrv/netdump_server.c ============================================================================== --- projects/sv/usr.sbin/netdumpsrv/netdump_server.c Mon Aug 16 15:18:30 2010 (r211397) +++ projects/sv/usr.sbin/netdumpsrv/netdump_server.c Mon Aug 16 15:51:41 2010 (r211398) @@ -23,6 +23,7 @@ * SUCH DAMAGE. */ +#include #include #include #include @@ -112,6 +113,8 @@ static struct netdump_client *alloc_clie struct hostent *hp; int i, fd, bufsz; + assert(ip != NULL); + client = calloc(1, sizeof(*client)); if (!client) { @@ -269,6 +272,9 @@ static struct netdump_client *alloc_clie static void free_client(struct netdump_client *client) { + + assert(client != NULL); + /* Remove from the list */ SLIST_REMOVE(&clients, client, netdump_client, iter); fclose(client->infofile); @@ -279,8 +285,11 @@ static void free_client(struct netdump_c static void exec_handler(struct netdump_client *client, const char *reason) { - int pid=fork(); + int pid; + + assert(client != NULL); + pid=fork(); if (pid == -1) { perror("fork"); @@ -304,6 +313,9 @@ static void exec_handler(struct netdump_ static void handle_timeout(struct netdump_client *client) { + + assert(client != NULL); + printf("Client %s timed out\n", client_ntoa(client)); fputs("Dump incomplete: client timed out\n", client->infofile); exec_handler(client, "timeout"); @@ -337,6 +349,8 @@ static void send_ack(struct netdump_clie struct netdump_ack ack; int tryagain; + assert(client != NULL && msg != NULL); + bzero(&ack, sizeof(ack)); ack.seqno = htonl(msg->hdr.seqno); @@ -366,6 +380,8 @@ static int handle_herald(struct sockaddr { int freed_client=0; + assert(from != NULL && msg != NULL); + if (client) { if (!client->any_data_rcvd) @@ -401,19 +417,21 @@ static int handle_herald(struct sockaddr static int handle_kdh(struct netdump_client *client, struct netdump_msg *msg) { - struct kerneldumpheader *h=(void *)msg->data; + struct kerneldumpheader *h; uint64_t dumplen; FILE *f; time_t t; int parity_check; + assert(msg != NULL); + if (!client) { return 0; } client->any_data_rcvd = 1; - + h=(struct kerneldumpheader *)msg->data; f = client->infofile; if (msg->hdr.len < sizeof(struct kerneldumpheader)) @@ -460,6 +478,9 @@ static int handle_kdh(struct netdump_cli static int handle_vmcore(struct netdump_client *client, struct netdump_msg *msg) { + + assert(msg != NULL); + if (!client) { return 0; @@ -492,6 +513,9 @@ static int handle_vmcore(struct netdump_ static int handle_finish(struct netdump_client *client, struct netdump_msg *msg) { + + assert(msg != NULL); + if (!client) { return 0; @@ -519,6 +543,8 @@ static int receive_message(int sock, str socklen_t fromlen; ssize_t len; + assert(from != NULL && fromstr != NULL && msg != NULL); + bzero(from, sizeof(*from)); from->sin_family = AF_INET; from->sin_len = fromlen = sizeof(*from); @@ -563,6 +589,8 @@ static int handle_packet(struct netdump_ { int freed_client; + assert(from != NULL && fromstr != NULL && msg != NULL); + if (client) { client->last_msg = time(NULL); From owner-svn-src-projects@FreeBSD.ORG Wed Aug 18 07:31:29 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03A3D106566B; Wed, 18 Aug 2010 07:31:29 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E76468FC08; Wed, 18 Aug 2010 07:31:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7I7VSfI058261; Wed, 18 Aug 2010 07:31:28 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7I7VSr8058259; Wed, 18 Aug 2010 07:31:28 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201008180731.o7I7VSr8058259@svn.freebsd.org> From: Jeff Roberson Date: Wed, 18 Aug 2010 07:31:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211441 - projects/ofed/head/sys/ofed/drivers/infiniband/core X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2010 07:31:29 -0000 Author: jeff Date: Wed Aug 18 07:31:28 2010 New Revision: 211441 URL: http://svn.freebsd.org/changeset/base/211441 Log: - Correct the byte order of gids in sysctl. Sponsored by: Isilon Systems, iX Systems, and Panasas. Modified: projects/ofed/head/sys/ofed/drivers/infiniband/core/sysfs.c Modified: projects/ofed/head/sys/ofed/drivers/infiniband/core/sysfs.c ============================================================================== --- projects/ofed/head/sys/ofed/drivers/infiniband/core/sysfs.c Wed Aug 18 00:26:14 2010 (r211440) +++ projects/ofed/head/sys/ofed/drivers/infiniband/core/sysfs.c Wed Aug 18 07:31:28 2010 (r211441) @@ -273,7 +273,8 @@ static ssize_t show_port_gid(struct ib_p raw = (u16 *)gid.raw; return sprintf(buf, "%.4x:%.4x:%.4x:%.4x:%.4x:%.4x:%.4x:%.4x\n", - raw[0], raw[1], raw[2], raw[3], raw[4], raw[5], raw[6], raw[7]); + htons(raw[0]), htons(raw[1]), htons(raw[2]), htons(raw[3]), + htons(raw[4]), htons(raw[5]), htons(raw[6]), htons(raw[7])); } static ssize_t show_port_pkey(struct ib_port *p, struct port_attribute *attr, From owner-svn-src-projects@FreeBSD.ORG Wed Aug 18 07:32:24 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF9EB1065673; Wed, 18 Aug 2010 07:32:24 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF6438FC16; Wed, 18 Aug 2010 07:32:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7I7WOau058312; Wed, 18 Aug 2010 07:32:24 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7I7WO4g058310; Wed, 18 Aug 2010 07:32:24 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201008180732.o7I7WO4g058310@svn.freebsd.org> From: Jeff Roberson Date: Wed, 18 Aug 2010 07:32:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211442 - projects/ofed/head/sys/ofed/include/linux X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2010 07:32:24 -0000 Author: jeff Date: Wed Aug 18 07:32:24 2010 New Revision: 211442 URL: http://svn.freebsd.org/changeset/base/211442 Log: - Properly initialize the free dr bitmap. - Reset the leaf bitmap when freeing an idr item. - Add a lookup and assert after add to catch any other bugs early. Sponsored by: Isilon Systems, iX Systems, and Panasas. Modified: projects/ofed/head/sys/ofed/include/linux/linux_idr.c Modified: projects/ofed/head/sys/ofed/include/linux/linux_idr.c ============================================================================== --- projects/ofed/head/sys/ofed/include/linux/linux_idr.c Wed Aug 18 07:31:28 2010 (r211441) +++ projects/ofed/head/sys/ofed/include/linux/linux_idr.c Wed Aug 18 07:32:24 2010 (r211442) @@ -146,6 +146,7 @@ idr_remove(struct idr *idr, int id) panic("idr_remove: Item %d not allocated (%p, %p)\n", id, idr, il); il->ary[idx] = NULL; + il->bitmap |= 1 << idx; mtx_unlock(&idr->lock); return; } @@ -226,7 +227,7 @@ idr_pre_get(struct idr *idr, gfp_t gfp_m iln = malloc(sizeof(*il), M_IDR, M_ZERO | gfp_mask); if (iln == NULL) break; - iln->bitmap = IDR_MASK; + bitmap_fill(&iln->bitmap, IDR_SIZE); if (head != NULL) { il->ary[0] = iln; il = iln; @@ -327,6 +328,10 @@ idr_get_new(struct idr *idr, void *ptr, error = 0; out: mtx_unlock(&idr->lock); + if (error == 0 && idr_find(idr, id) != ptr) { + panic("idr_get_new: Failed for idr %p, id %d, ptr %p\n", + idr, id, ptr); + } return (error); } From owner-svn-src-projects@FreeBSD.ORG Wed Aug 18 07:34:58 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF8C61065697; Wed, 18 Aug 2010 07:34:58 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF36D8FC1B; Wed, 18 Aug 2010 07:34:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7I7YwLs058408; Wed, 18 Aug 2010 07:34:58 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7I7YwYe058406; Wed, 18 Aug 2010 07:34:58 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201008180734.o7I7YwYe058406@svn.freebsd.org> From: Jeff Roberson Date: Wed, 18 Aug 2010 07:34:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211443 - projects/ofed/head/sys/ofed/drivers/infiniband/core X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2010 07:34:59 -0000 Author: jeff Date: Wed Aug 18 07:34:58 2010 New Revision: 211443 URL: http://svn.freebsd.org/changeset/base/211443 Log: - selwakeup() when we wakeup the recv_wait waiters as bsd select can not use the linux waitqueue. Sponsored by: Isilon Systems, iX Systems, and Panasas. Modified: projects/ofed/head/sys/ofed/drivers/infiniband/core/user_mad.c Modified: projects/ofed/head/sys/ofed/drivers/infiniband/core/user_mad.c ============================================================================== --- projects/ofed/head/sys/ofed/drivers/infiniband/core/user_mad.c Wed Aug 18 07:32:24 2010 (r211442) +++ projects/ofed/head/sys/ofed/drivers/infiniband/core/user_mad.c Wed Aug 18 07:34:58 2010 (r211443) @@ -111,6 +111,7 @@ struct ib_umad_device { struct ib_umad_file { struct mutex mutex; struct ib_umad_port *port; + struct file *filp; struct list_head recv_list; struct list_head send_list; struct list_head port_list; @@ -174,6 +175,7 @@ static int queue_packet(struct ib_umad_f packet->mad.hdr.id++) if (agent == __get_agent(file, packet->mad.hdr.id)) { list_add_tail(&packet->list, &file->recv_list); + selwakeup(&file->filp->f_selinfo); wake_up_interruptible(&file->recv_wait); ret = 0; break; @@ -824,6 +826,7 @@ static int ib_umad_open(struct inode *in init_waitqueue_head(&file->recv_wait); file->port = port; + file->filp = filp; filp->private_data = file; list_add_tail(&file->port_list, &port->file_list); From owner-svn-src-projects@FreeBSD.ORG Wed Aug 18 07:37:17 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 035DA1065675; Wed, 18 Aug 2010 07:37:17 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E476F8FC13; Wed, 18 Aug 2010 07:37:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7I7bGgq058493; Wed, 18 Aug 2010 07:37:16 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7I7bG9P058485; Wed, 18 Aug 2010 07:37:16 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201008180737.o7I7bG9P058485@svn.freebsd.org> From: Jeff Roberson Date: Wed, 18 Aug 2010 07:37:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211444 - in projects/ofed/head/contrib/ofed: management/libibmad/src management/libibumad/src management/opensm/include/complib usr.bin/opensm usr.lib/libibcommon usr.lib/libibmad usr.... X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2010 07:37:17 -0000 Author: jeff Date: Wed Aug 18 07:37:16 2010 New Revision: 211444 URL: http://svn.freebsd.org/changeset/base/211444 Log: - Simplify makefiles now that /usr/include/infiniband exists. - Don't duplicate byteswap functionality contained elsewhere. - Disable umad debugging, it seems to work well now. Sponsored by: Isilon Systems, iX Systems, and Panasas. Modified: projects/ofed/head/contrib/ofed/management/libibmad/src/rpc.c projects/ofed/head/contrib/ofed/management/libibumad/src/umad.c projects/ofed/head/contrib/ofed/management/opensm/include/complib/cl_byteswap.h projects/ofed/head/contrib/ofed/usr.bin/opensm/Makefile projects/ofed/head/contrib/ofed/usr.lib/libibcommon/Makefile projects/ofed/head/contrib/ofed/usr.lib/libibmad/Makefile projects/ofed/head/contrib/ofed/usr.lib/libibumad/Makefile Modified: projects/ofed/head/contrib/ofed/management/libibmad/src/rpc.c ============================================================================== --- projects/ofed/head/contrib/ofed/management/libibmad/src/rpc.c Wed Aug 18 07:34:58 2010 (r211443) +++ projects/ofed/head/contrib/ofed/management/libibmad/src/rpc.c Wed Aug 18 07:37:16 2010 (r211444) @@ -140,7 +140,7 @@ _do_madrpc(int port_id, void *sndbuf, vo length = len; if (umad_send(port_id, agentid, sndbuf, length, timeout, 0) < 0) { - IBWARN("send failed; %m"); + IBWARN("send failed; %s", strerror(errno)); return -1; } @@ -148,7 +148,7 @@ _do_madrpc(int port_id, void *sndbuf, vo /* send packet is lost somewhere. */ do { if (umad_recv(port_id, rcvbuf, &length, timeout) < 0) { - IBWARN("recv failed: %m"); + IBWARN("recv failed: %s", strerror(errno)); return -1; } Modified: projects/ofed/head/contrib/ofed/management/libibumad/src/umad.c ============================================================================== --- projects/ofed/head/contrib/ofed/management/libibumad/src/umad.c Wed Aug 18 07:34:58 2010 (r211443) +++ projects/ofed/head/contrib/ofed/management/libibumad/src/umad.c Wed Aug 18 07:37:16 2010 (r211444) @@ -79,7 +79,7 @@ typedef struct ib_user_mad_reg_req { #define TRACE if (umaddebug) IBWARN #define DEBUG if (umaddebug) IBWARN -int umaddebug = 1; +int umaddebug = 0; #define UMAD_DEV_FILE_SZ 256 Modified: projects/ofed/head/contrib/ofed/management/opensm/include/complib/cl_byteswap.h ============================================================================== --- projects/ofed/head/contrib/ofed/management/opensm/include/complib/cl_byteswap.h Wed Aug 18 07:34:58 2010 (r211443) +++ projects/ofed/head/contrib/ofed/management/opensm/include/complib/cl_byteswap.h Wed Aug 18 07:37:16 2010 (r211444) @@ -86,11 +86,6 @@ BEGIN_C_DECLS * ntoh32, hton32 * ntoh64, hton64 */ -#include -#define __BYTE_ORDER _BYTE_ORDER -#define bswap_16 bswap16 -#define bswap_32 bswap32 -#define bswap_64 bswap64 #ifndef __BYTE_ORDER #error "__BYTE_ORDER macro undefined. Missing in endian.h?" Modified: projects/ofed/head/contrib/ofed/usr.bin/opensm/Makefile ============================================================================== --- projects/ofed/head/contrib/ofed/usr.bin/opensm/Makefile Wed Aug 18 07:34:58 2010 (r211443) +++ projects/ofed/head/contrib/ofed/usr.bin/opensm/Makefile Wed Aug 18 07:37:16 2010 (r211444) @@ -30,8 +30,10 @@ SRCS+= osm_dump.c osm_ucast_cache.c osm_ SRCS+= osm_qos_policy.c LDADD= -lopensm -losmvendor -losmcomp -libmad -libumad -libcommon -CFLAGS+= -I${DIAGPATH}/include -I${OFEDSYS}/include -I/usr/include/infiniband +CFLAGS+= -I${OFEDSYS}/include -I/usr/include/infiniband CFLAGS+= -pthread +CFLAGS+= -DVENDOR_RMPP_SUPPORT -DDUAL_SIDED_RMPP + MAN= opensm.8 WARNS?= 1 Modified: projects/ofed/head/contrib/ofed/usr.lib/libibcommon/Makefile ============================================================================== --- projects/ofed/head/contrib/ofed/usr.lib/libibcommon/Makefile Wed Aug 18 07:34:58 2010 (r211443) +++ projects/ofed/head/contrib/ofed/usr.lib/libibcommon/Makefile Wed Aug 18 07:37:16 2010 (r211444) @@ -16,8 +16,7 @@ NO_PROFILE= SRCS= sysfs.c util.c hash.c stack.c time.c -CFLAGS+= -I${.CURDIR} -I${IBSRCDIR} -I${IBCOMMONDIR}/include -CFLAGS+= -I${OFEDSYS}/include -I${IBCOMMONDIR}/include/infiniband +CFLAGS+= -I${.CURDIR} -I${IBSRCDIR} -I${OFEDSYS}/include -I/usr/include/infiniband VERSION_MAP= ${IBSRCDIR}/libibcommon.map Modified: projects/ofed/head/contrib/ofed/usr.lib/libibmad/Makefile ============================================================================== --- projects/ofed/head/contrib/ofed/usr.lib/libibmad/Makefile Wed Aug 18 07:34:58 2010 (r211443) +++ projects/ofed/head/contrib/ofed/usr.lib/libibmad/Makefile Wed Aug 18 07:37:16 2010 (r211444) @@ -5,7 +5,6 @@ SHLIBDIR?= /usr/lib .include IBMADDIR= ../../management/libibmad -COMMONDIR= ../../management/libibcommon/include UMADDIR= ../../management/libibumad/include IBSRCDIR= ${IBMADDIR}/src OFEDSYS= ../../../../sys/ofed @@ -20,8 +19,8 @@ SRCS= dump.c fields.c gs.c mad.c portid. serv.c smp.c vendor.c CFLAGS+= -DHAVE_CONFIG_H -CFLAGS+= -I${.CURDIR} -I${IBSRCDIR} -I${IBMADDIR}/include -I${COMMONDIR} -CFLAGS+= -I${OFEDSYS}/include -I${IBMADDIR}/include/infiniband -I${UMADDIR} +CFLAGS+= -I${.CURDIR} -I${IBSRCDIR} -I${IBMADDIR}/include +CFLAGS+= -I/usr/include/infiniband -I${OFEDSYS}/include VERSION_MAP= ${IBSRCDIR}/libibmad.map Modified: projects/ofed/head/contrib/ofed/usr.lib/libibumad/Makefile ============================================================================== --- projects/ofed/head/contrib/ofed/usr.lib/libibumad/Makefile Wed Aug 18 07:34:58 2010 (r211443) +++ projects/ofed/head/contrib/ofed/usr.lib/libibumad/Makefile Wed Aug 18 07:37:16 2010 (r211444) @@ -4,8 +4,6 @@ SHLIBDIR?= /usr/lib .include -IBMADDIR= ../../management/libibmad -COMMONDIR= ../../management/libibcommon/include UMADDIR= ../../management/libibumad IBSRCDIR= ${UMADDIR}/src OFEDSYS= ../../../../sys/ofed @@ -19,8 +17,7 @@ NO_PROFILE= SRCS= umad.c CFLAGS+= -DHAVE_CONFIG_H -CFLAGS+= -I${.CURDIR} -I${IBSRCDIR} -I${IBMADDIR}/include -I${COMMONDIR} -CFLAGS+= -I${OFEDSYS}/include -I${UMADDIR}/include/infiniband +CFLAGS+= -I${.CURDIR} -I/usr/include/infiniband -I${OFEDSYS}/include VERSION_MAP= ${IBSRCDIR}/libibumad.map From owner-svn-src-projects@FreeBSD.ORG Wed Aug 18 07:39:19 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E51C106564A; Wed, 18 Aug 2010 07:39:19 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F286F8FC0C; Wed, 18 Aug 2010 07:39:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7I7dIfA058605; Wed, 18 Aug 2010 07:39:18 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7I7dI3h058602; Wed, 18 Aug 2010 07:39:18 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201008180739.o7I7dI3h058602@svn.freebsd.org> From: Jeff Roberson Date: Wed, 18 Aug 2010 07:39:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211446 - projects/ofed/head/sys/ofed/include X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2010 07:39:19 -0000 Author: jeff Date: Wed Aug 18 07:39:18 2010 New Revision: 211446 URL: http://svn.freebsd.org/changeset/base/211446 Log: - Linux uses __BYTE_ORDER and __*_ENDIAN. Define these from the single-underscore bsd versions. Sponsored by: Isilon Systems, iX Systems, and Panasas. Modified: projects/ofed/head/sys/ofed/include/byteswap.h projects/ofed/head/sys/ofed/include/endian.h Modified: projects/ofed/head/sys/ofed/include/byteswap.h ============================================================================== --- projects/ofed/head/sys/ofed/include/byteswap.h Wed Aug 18 07:38:13 2010 (r211445) +++ projects/ofed/head/sys/ofed/include/byteswap.h Wed Aug 18 07:39:18 2010 (r211446) @@ -34,6 +34,9 @@ */ #include #include -#define bswap_64 bswap64 + +#define bswap_16 bswap16 +#define bswap_32 bswap32 +#define bswap_64 bswap64 #endif /* _OFED_INCLUDE_BYTESWAP_H_ */ Modified: projects/ofed/head/sys/ofed/include/endian.h ============================================================================== --- projects/ofed/head/sys/ofed/include/endian.h Wed Aug 18 07:38:13 2010 (r211445) +++ projects/ofed/head/sys/ofed/include/endian.h Wed Aug 18 07:39:18 2010 (r211446) @@ -29,5 +29,14 @@ * This file is included for compatibility with the userland libraries * accompanying the infiniband stack. */ + +#ifndef _OFED_INCLUDE_ENDIAN_H_ +#define _OFED_INCLUDE_ENDIAN_H_ + #include #include +#define __LITTLE_ENDIAN _LITTLE_ENDIAN +#define __BIG_ENDIAN _BIG_ENDIAN +#define __BYTE_ORDER _BYTE_ORDER + +#endif /* _OFED_INCLUDE_ENDIAN_H_ */ From owner-svn-src-projects@FreeBSD.ORG Fri Aug 20 16:00:37 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBB3A10656A7; Fri, 20 Aug 2010 16:00:36 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CAA738FC0A; Fri, 20 Aug 2010 16:00:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7KG0arf041855; Fri, 20 Aug 2010 16:00:36 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7KG0afn041853; Fri, 20 Aug 2010 16:00:36 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201008201600.o7KG0afn041853@svn.freebsd.org> From: Attilio Rao Date: Fri, 20 Aug 2010 16:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211528 - projects/sv/usr.sbin/netdumpsrv X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2010 16:00:37 -0000 Author: attilio Date: Fri Aug 20 16:00:36 2010 New Revision: 211528 URL: http://svn.freebsd.org/changeset/base/211528 Log: - Daemonize the server after the initial setup. - Use syslog(3) interface in order to store the errors, warnings and normal output after the daemonization. TODO (in this area): - Fix eventual unhandled/mishandled error conditions - Fix message ordering/printout of error conditions and make them uniform - Offer structured API for dealing with prints on infofile and corefile Modified: projects/sv/usr.sbin/netdumpsrv/netdump_server.c Modified: projects/sv/usr.sbin/netdumpsrv/netdump_server.c ============================================================================== --- projects/sv/usr.sbin/netdumpsrv/netdump_server.c Fri Aug 20 15:26:09 2010 (r211527) +++ projects/sv/usr.sbin/netdumpsrv/netdump_server.c Fri Aug 20 16:00:36 2010 (r211528) @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -54,6 +55,15 @@ /* Host name length (keep at least as big as INET_ADDRSTRLEN) */ #define MAXHOSTNAMELEN 256 +#define LOGERR(m, ...) \ + syslog(LOG_ERR | LOG_DAEMON, (m), ## __VA_ARGS__) +#define LOGERR_PERROR(m) \ + syslog(LOG_ERR | LOG_DAEMON, "%s: %s\n", m, strerror(errno)) +#define LOGINFO(m, ...) \ + syslog(LOG_INFO | LOG_DAEMON, (m), ## __VA_ARGS__) +#define LOGWARN(m, ...) \ + syslog(LOG_WARNING | LOG_DAEMON, (m), ## __VA_ARGS__) + #define client_ntoa(cl) inet_ntoa((cl)->ip) struct netdump_client @@ -118,7 +128,7 @@ static struct netdump_client *alloc_clie client = calloc(1, sizeof(*client)); if (!client) { - perror("calloc"); + LOGERR_PERROR("calloc()"); return NULL; } bcopy(ip, &client->ip, sizeof(*ip)); @@ -154,12 +164,12 @@ static struct netdump_client *alloc_clie /* Set up the client socket */ if ((client->sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) { - perror("socket"); + LOGERR_PERROR("socket()"); free(client); return NULL; } if (fcntl(client->sock, F_SETFL, O_NONBLOCK) == -1) { - perror("fcntl(client->sock, F_SETFL, O_NONBLOCK)"); + LOGERR_PERROR("fcntl()"); close(client->sock); free(client); return NULL; @@ -170,7 +180,7 @@ static struct netdump_client *alloc_clie saddr.sin_addr.s_addr = bindip.s_addr; saddr.sin_port = htons(0); if (bind(client->sock, (struct sockaddr *)&saddr, sizeof(saddr))) { - perror("bind"); + LOGERR_PERROR("bind()"); close(client->sock); free(client); return NULL; @@ -181,7 +191,7 @@ static struct netdump_client *alloc_clie saddr.sin_addr.s_addr = ip->s_addr; saddr.sin_port = htons(NETDUMP_ACKPORT); if (connect(client->sock, (struct sockaddr *)&saddr, sizeof(saddr))) { - perror("connect"); + LOGERR_PERROR("connect()"); close(client->sock); free(client); return NULL; @@ -190,9 +200,9 @@ static struct netdump_client *alloc_clie * plenty for any 1 client. */ if (setsockopt(client->sock, SOL_SOCKET, SO_RCVBUF, &bufsz, sizeof(bufsz))) { - perror("setsockopt(SOL_SOCKET, SO_RCVBUF)"); - fprintf(stderr, "Warning: May drop packets from %s due to small receive" - " buffer\n", client->hostname); + LOGERR_PERROR("setsockopt()"); + LOGWARN("May drop packets from %s due to small receive buffer\n", + client->hostname); } /* Try info.host.0 through info.host.255 in sequence */ @@ -211,14 +221,12 @@ static struct netdump_client *alloc_clie { continue; } - - fprintf(stderr, "open(\"%s\"): %s\n", client->infofilename, - strerror(errno)); + LOGERR("open(\"%s\"): %s\n", client->infofilename, strerror(errno)); continue; } if (!(client->infofile = fdopen(fd, "w"))) { - perror("fdopen"); + LOGERR_PERROR("fdopen()"); close(fd); /* XXX */ unlink(client->infofilename); @@ -238,9 +246,7 @@ static struct netdump_client *alloc_clie { continue; } - - fprintf(stderr, "open(\"%s\"): %s\n", client->corefilename, - strerror(errno)); + LOGERR("open(\"%s\"): %s\n", client->corefilename, strerror(errno)); continue; } client->corefd = fd; @@ -249,8 +255,8 @@ static struct netdump_client *alloc_clie if (!client->infofile || client->corefd == -1) { - fprintf(stderr, "Can't create output files for new client %s [%s]\n", - client->hostname, client_ntoa(client)); + LOGERR("Can't create output files for new client %s [%s]\n", + client->hostname, client_ntoa(client)); if (client->infofile) { fclose(client->infofile); @@ -292,7 +298,7 @@ static void exec_handler(struct netdump_ pid=fork(); if (pid == -1) { - perror("fork"); + LOGERR_PERROR("fork()"); return; } else if (pid) @@ -303,11 +309,12 @@ static void exec_handler(struct netdump_ { close(sock); pidfile_close(pfh); - execl(handler_script, handler_script, reason, client_ntoa(client), + if (execl(handler_script, handler_script, reason, client_ntoa(client), client->hostname, client->infofilename, client->corefilename, - NULL); - perror("execl"); - _exit(1); + NULL) == -1) { + LOGERR_PERROR("fork()"); + _exit(1); + } } } @@ -316,7 +323,7 @@ static void handle_timeout(struct netdum assert(client != NULL); - printf("Client %s timed out\n", client_ntoa(client)); + LOGINFO("Client %s timed out\n", client_ntoa(client)); fputs("Dump incomplete: client timed out\n", client->infofile); exec_handler(client, "timeout"); free_client(client); @@ -369,7 +376,7 @@ static void send_ack(struct netdump_clie /* XXX: On EAGAIN, we should probably queue the packet to be sent * when the socket is writable... but that's too much effort, since * it's mostly harmless to wait for the client to retransmit. */ - perror("sendto"); + LOGERR_PERROR("send()"); } } while (tryagain); @@ -407,8 +414,8 @@ static int handle_herald(struct sockaddr fprintf(client->infofile, "Dump from %s [%s]\n", client->hostname, client_ntoa(client)); - printf("New dump from client %s [%s] (to %s)\n", client->hostname, - client_ntoa(client), client->corefilename); + LOGINFO("New dump from client %s [%s] (to %s)\n", client->hostname, + client_ntoa(client), client->corefilename); send_ack(client, msg); @@ -436,8 +443,8 @@ static int handle_kdh(struct netdump_cli if (msg->hdr.len < sizeof(struct kerneldumpheader)) { - fprintf(stderr, "Bad KDH from %s [%s]: packet too small\n", - client->hostname, client_ntoa(client)); + LOGERR("Bad KDH from %s [%s]: packet too small\n", client->hostname, + client_ntoa(client)); fputs("Bad KDH: packet too small\n", f); fflush(f); send_ack(client, msg); @@ -467,9 +474,7 @@ static int handle_kdh(struct netdump_cli fprintf(f, " Header parity check: %s\n", parity_check ? "Fail" : "Pass"); fflush(f); - fprintf(stdout, "(KDH from %s [%s])", client->hostname, - client_ntoa(client)); - fflush(stdout); + LOGINFO("(KDH from %s [%s])", client->hostname, client_ntoa(client)); send_ack(client, msg); @@ -491,14 +496,13 @@ static int handle_vmcore(struct netdump_ if (msg->hdr.seqno % 11523 == 0) { /* Approximately every 16MB with MTU of 1500 */ - putc('.', stdout); - fflush(stdout); + LOGINFO("."); } if (pwrite(client->corefd, msg->data, msg->hdr.len, msg->hdr.offset) == -1) { - fprintf(stderr, "pwrite (for client %s [%s]): %s\n", client->hostname, - client_ntoa(client), strerror(errno)); + LOGERR("pwrite (for client %s [%s]): %s\n", client->hostname, + client_ntoa(client), strerror(errno)); fprintf(client->infofile, "Dump unsuccessful: write error at offset %08"PRIx64": %s\n", msg->hdr.offset, strerror(errno)); exec_handler(client, "error"); @@ -522,9 +526,8 @@ static int handle_finish(struct netdump_ } - printf("\nCompleted dump from client %s [%s]\n", client->hostname, - client_ntoa(client)); - fflush(stdout); + LOGINFO("\nCompleted dump from client %s [%s]\n", client->hostname, + client_ntoa(client)); fputs("Dump complete\n", client->infofile); /* Do this before we free the client */ @@ -563,8 +566,8 @@ static int receive_message(int sock, str if ((size_t)len < sizeof(struct netdump_msg_hdr)) { - fprintf(stderr, "Ignoring runt packet from %s (got %zu)\n", fromstr, - (size_t)len); + LOGERR("Ignoring runt packet from %s (got %zu)\n", fromstr, + (size_t)len); return 0; } @@ -576,8 +579,9 @@ static int receive_message(int sock, str if ((size_t)len < sizeof(struct netdump_msg_hdr) + msg->hdr.len) { - fprintf(stderr, "Packet too small from %s (got %zu, expected %zu)\n", - fromstr, (size_t)len, sizeof(struct netdump_msg_hdr) + msg->hdr.len); + LOGERR("Packet too small from %s (got %zu, expected %zu)\n", + fromstr, (size_t)len, + sizeof(struct netdump_msg_hdr) + msg->hdr.len); return 0; } @@ -612,8 +616,8 @@ static int handle_packet(struct netdump_ break; default: freed_client=0; - fprintf(stderr, "Received unknown message type %d from %s\n", - msg->hdr.type, fromstr); + LOGERR("Received unknown message type %d from %s\n", + msg->hdr.type, fromstr); } return freed_client; @@ -653,7 +657,7 @@ static void eventloop() continue; } - perror("select"); + LOGERR_PERROR("select()"); /* Errors with select() probably won't go away if we just try to * select() again */ exit(1); @@ -675,8 +679,7 @@ static void eventloop() if (errno != EAGAIN) { - /* Server socket is broken for some reason */ - perror("recvfrom"); + LOGERR_PERROR("recvfrom()"); exit(1); } } @@ -707,8 +710,8 @@ static void eventloop() if (client && msg.hdr.type != NETDUMP_HERALD && !client->printed_port_warning) { - printf("Warning: Client %s responding on server port\n", - client->hostname); + LOGWARN("Client %s responding on server port\n", + client->hostname); client->printed_port_warning = 1; } @@ -728,7 +731,7 @@ static void eventloop() continue; } - perror("recvfrom"); + LOGERR_PERROR("recvfrom()"); /* Client socket is broken for some reason */ handle_timeout(client); /* The client pointer is now invalid */ @@ -762,7 +765,7 @@ static void eventloop() timeout_clients(); } - puts("Shutting down..."); + LOGINFO("Shutting down..."); /* Clients is the head of the list, so clients != NULL iff the list isn't * empty. Call it a timeout so that the scripts get run. */ while (!SLIST_EMPTY(&clients)) @@ -790,7 +793,6 @@ int main(int argc, char **argv) printf("Impossible to open the pid file\n"); exit(1); } - pidfile_write(pfh); /* Check argc and set the bindaddr and handler_script */ switch (argc) @@ -847,11 +849,18 @@ int main(int argc, char **argv) strncpy(dumpdir, argv[1], sizeof(dumpdir)-1); dumpdir[sizeof(dumpdir)-1]='\0'; + if (daemon(0, 0) == -1) { + pidfile_remove(pfh); + perror("daemon()"); + return 1; + } + pidfile_write(pfh); + /* Set up the server socket */ if ((sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) { pidfile_remove(pfh); - perror("socket"); + LOGERR_PERROR("socket()"); return 1; } bzero(&bindaddr, sizeof(bindaddr)); @@ -862,13 +871,13 @@ int main(int argc, char **argv) if (bind(sock, (struct sockaddr *)&bindaddr, sizeof(bindaddr))) { pidfile_remove(pfh); - perror("bind"); + LOGERR_PERROR("bind()"); close(sock); return 1; } if (fcntl(sock, F_SETFL, O_NONBLOCK) == -1) { pidfile_remove(pfh); - perror("fcntl(sock, F_SETFL, O_NONBLOCK)"); + LOGERR_PERROR("fcntl()"); close(sock); return 1; } @@ -879,7 +888,7 @@ int main(int argc, char **argv) if (sigaction(SIGINT, &sa, NULL) || sigaction(SIGTERM, &sa, NULL)) { pidfile_remove(pfh); - perror("sigaction"); + LOGERR_PERROR("sigaction(SIGINT | SIGTERM)"); close(sock); return 1; } @@ -889,13 +898,12 @@ int main(int argc, char **argv) if (sigaction(SIGCHLD, &sa, NULL)) { pidfile_remove(pfh); - perror("sigaction"); + LOGERR_PERROR("sigaction(SIGCHLD)"); close(sock); return 1; } - printf("Waiting for clients.\n"); - fflush(stdout); + LOGINFO("Waiting for clients.\n"); do_shutdown=0; eventloop(); From owner-svn-src-projects@FreeBSD.ORG Sat Aug 21 13:23:54 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBB741065670; Sat, 21 Aug 2010 13:23:54 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC4A38FC12; Sat, 21 Aug 2010 13:23:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7LDNsup070332; Sat, 21 Aug 2010 13:23:54 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7LDNsbU070330; Sat, 21 Aug 2010 13:23:54 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201008211323.o7LDNsbU070330@svn.freebsd.org> From: Attilio Rao Date: Sat, 21 Aug 2010 13:23:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211559 - projects/sv/usr.sbin/netdumpsrv X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Aug 2010 13:23:54 -0000 Author: attilio Date: Sat Aug 21 13:23:54 2010 New Revision: 211559 URL: http://svn.freebsd.org/changeset/base/211559 Log: - Introduce the client_pinfo() KPI in order to print informations in the infofile. - Adjust/Modify comments about error handling in the specific functions. TODO: Better handle the free_client() callings, specify a correct semantic, auditing the callers and verify nothing breaks. Modified: projects/sv/usr.sbin/netdumpsrv/netdump_server.c Modified: projects/sv/usr.sbin/netdumpsrv/netdump_server.c ============================================================================== --- projects/sv/usr.sbin/netdumpsrv/netdump_server.c Sat Aug 21 13:21:05 2010 (r211558) +++ projects/sv/usr.sbin/netdumpsrv/netdump_server.c Sat Aug 21 13:23:54 2010 (r211559) @@ -64,7 +64,10 @@ #define LOGWARN(m, ...) \ syslog(LOG_WARNING | LOG_DAEMON, (m), ## __VA_ARGS__) -#define client_ntoa(cl) inet_ntoa((cl)->ip) +#define client_ntoa(cl) \ + inet_ntoa((cl)->ip) +#define client_pinfo(cl, f, ...) \ + fprintf((cl)->infofile, (f), ## __VA_ARGS__) struct netdump_client { @@ -228,7 +231,6 @@ static struct netdump_client *alloc_clie { LOGERR_PERROR("fdopen()"); close(fd); - /* XXX */ unlink(client->infofilename); continue; } @@ -281,7 +283,7 @@ static void free_client(struct netdump_c assert(client != NULL); - /* Remove from the list */ + /* Remove from the list. Ignore errors from close() routines. */ SLIST_REMOVE(&clients, client, netdump_client, iter); fclose(client->infofile); close(client->corefd); @@ -296,6 +298,11 @@ static void exec_handler(struct netdump_ assert(client != NULL); pid=fork(); + + /* + * The function is invoked in critical conditions, thus just exiting + * without reporting errors is fine. + */ if (pid == -1) { LOGERR_PERROR("fork()"); @@ -324,7 +331,7 @@ static void handle_timeout(struct netdum assert(client != NULL); LOGINFO("Client %s timed out\n", client_ntoa(client)); - fputs("Dump incomplete: client timed out\n", client->infofile); + client_pinfo(client, "Dump incomplete: client timed out\n"); exec_handler(client, "timeout"); free_client(client); } @@ -407,12 +414,12 @@ static int handle_herald(struct sockaddr if (!client) { - /* alloc_client would have printed an error message already */ + LOGERR("handle_herald(): new client allocation failure\n"); return freed_client; } - fprintf(client->infofile, "Dump from %s [%s]\n", client->hostname, - client_ntoa(client)); + client_pinfo(client, "Dump from %s [%s]\n", client->hostname, + client_ntoa(client)); LOGINFO("New dump from client %s [%s] (to %s)\n", client->hostname, client_ntoa(client), client->corefilename); @@ -426,7 +433,6 @@ static int handle_kdh(struct netdump_cli { struct kerneldumpheader *h; uint64_t dumplen; - FILE *f; time_t t; int parity_check; @@ -439,14 +445,13 @@ static int handle_kdh(struct netdump_cli client->any_data_rcvd = 1; h=(struct kerneldumpheader *)msg->data; - f = client->infofile; if (msg->hdr.len < sizeof(struct kerneldumpheader)) { LOGERR("Bad KDH from %s [%s]: packet too small\n", client->hostname, client_ntoa(client)); - fputs("Bad KDH: packet too small\n", f); - fflush(f); + client_pinfo(client, "Bad KDH: packet too small\n"); + fflush(client->infofile); send_ack(client, msg); return 0; @@ -460,19 +465,21 @@ static int handle_kdh(struct netdump_cli h->versionstring[sizeof(h->versionstring)-1] = '\0'; h->panicstring[sizeof(h->panicstring)-1] = '\0'; - fprintf(f, " Architecture: %s\n", h->architecture); - fprintf(f, " Architecture version: %d\n", dtoh32(h->architectureversion)); + client_pinfo(client, " Architecture: %s\n", h->architecture); + client_pinfo(client, " Architecture version: %d\n", + dtoh32(h->architectureversion)); dumplen = dtoh64(h->dumplength); - fprintf(f, " Dump length: %lldB (%lld MB)\n", (long long)dumplen, - (long long)(dumplen >> 20)); - fprintf(f, " Blocksize: %d\n", dtoh32(h->blocksize)); + client_pinfo(client, " Dump length: %lldB (%lld MB)\n", + (long long)dumplen, (long long)(dumplen >> 20)); + client_pinfo(client, " blocksize: %d\n", dtoh32(h->blocksize)); t = dtoh64(h->dumptime); - fprintf(f, " Dumptime: %s", ctime(&t)); - fprintf(f, " Hostname: %s\n", h->hostname); - fprintf(f, " Versionstring: %s", h->versionstring); - fprintf(f, " Panicstring: %s\n", h->panicstring); - fprintf(f, " Header parity check: %s\n", parity_check ? "Fail" : "Pass"); - fflush(f); + client_pinfo(client, " Dumptime: %s", ctime(&t)); + client_pinfo(client, " Hostname: %s\n", h->hostname); + client_pinfo(client, " Versionstring: %s", h->versionstring); + client_pinfo(client, " Panicstring: %s\n", h->panicstring); + client_pinfo(client, " Header parity check: %s\n", + parity_check ? "Fail" : "Pass"); + fflush(client->infofile); LOGINFO("(KDH from %s [%s])", client->hostname, client_ntoa(client)); @@ -503,7 +510,7 @@ static int handle_vmcore(struct netdump_ { LOGERR("pwrite (for client %s [%s]): %s\n", client->hostname, client_ntoa(client), strerror(errno)); - fprintf(client->infofile, "Dump unsuccessful: write error at offset %08"PRIx64": %s\n", + client_pinfo(client, "Dump unsuccessful: write error at offset %08"PRIx64": %s\n", msg->hdr.offset, strerror(errno)); exec_handler(client, "error"); free_client(client); @@ -528,7 +535,7 @@ static int handle_finish(struct netdump_ LOGINFO("\nCompleted dump from client %s [%s]\n", client->hostname, client_ntoa(client)); - fputs("Dump complete\n", client->infofile); + client_pinfo(client, "Dump complete\n"); /* Do this before we free the client */ send_ack(client, msg); From owner-svn-src-projects@FreeBSD.ORG Sat Aug 21 14:50:17 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E42E1065675; Sat, 21 Aug 2010 14:50:17 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0EA2C8FC14; Sat, 21 Aug 2010 14:50:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7LEoGFA072631; Sat, 21 Aug 2010 14:50:16 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7LEoGt6072629; Sat, 21 Aug 2010 14:50:16 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201008211450.o7LEoGt6072629@svn.freebsd.org> From: Attilio Rao Date: Sat, 21 Aug 2010 14:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211569 - projects/sv/usr.sbin/netdumpsrv X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Aug 2010 14:50:17 -0000 Author: attilio Date: Sat Aug 21 14:50:16 2010 New Revision: 211569 URL: http://svn.freebsd.org/changeset/base/211569 Log: handle_packet() and handle_timeout() can free the client. In order to cope with it, rather than switching the iterator by hand, just use SLIST_FOREACH_SAFE() where there is the necessity to do that. Successively, when a further style cleanup happens, the comments on the top of 'freeing' functions must be put, tagging them. Modified: projects/sv/usr.sbin/netdumpsrv/netdump_server.c Modified: projects/sv/usr.sbin/netdumpsrv/netdump_server.c ============================================================================== --- projects/sv/usr.sbin/netdumpsrv/netdump_server.c Sat Aug 21 14:28:48 2010 (r211568) +++ projects/sv/usr.sbin/netdumpsrv/netdump_server.c Sat Aug 21 14:50:16 2010 (r211569) @@ -98,18 +98,18 @@ static void eventloop(void); static void exec_handler(struct netdump_client *client, const char *reason); static void free_client(struct netdump_client *client); -static int handle_finish(struct netdump_client *client, +static void handle_finish(struct netdump_client *client, struct netdump_msg *msg); -static int handle_herald(struct sockaddr_in *from, +static void handle_herald(struct sockaddr_in *from, struct netdump_client *client, struct netdump_msg *msg); -static int handle_kdh(struct netdump_client *client, +static void handle_kdh(struct netdump_client *client, struct netdump_msg *msg); -static int handle_packet(struct netdump_client *client, +static void handle_packet(struct netdump_client *client, struct sockaddr_in *from, const char *fromstr, struct netdump_msg *msg); static void handle_timeout(struct netdump_client *client); -static int handle_vmcore(struct netdump_client *client, +static void handle_vmcore(struct netdump_client *client, struct netdump_msg *msg); static int receive_message(int sock, struct sockaddr_in *from, char *fromstr, size_t fromstrlen, @@ -389,10 +389,9 @@ static void send_ack(struct netdump_clie while (tryagain); } -static int handle_herald(struct sockaddr_in *from, +static void handle_herald(struct sockaddr_in *from, struct netdump_client *client, struct netdump_msg *msg) { - int freed_client=0; assert(from != NULL && msg != NULL); @@ -402,12 +401,11 @@ static int handle_herald(struct sockaddr { /* Must be a retransmit of the herald packet. */ send_ack(client, msg); - return 0; + return; } /* An old connection must have timed out. Clean it up first */ handle_timeout(client); - freed_client=1; } client = alloc_client(&from->sin_addr); @@ -415,7 +413,7 @@ static int handle_herald(struct sockaddr if (!client) { LOGERR("handle_herald(): new client allocation failure\n"); - return freed_client; + return; } client_pinfo(client, "Dump from %s [%s]\n", client->hostname, @@ -425,11 +423,9 @@ static int handle_herald(struct sockaddr client_ntoa(client), client->corefilename); send_ack(client, msg); - - return freed_client; } -static int handle_kdh(struct netdump_client *client, struct netdump_msg *msg) +static void handle_kdh(struct netdump_client *client, struct netdump_msg *msg) { struct kerneldumpheader *h; uint64_t dumplen; @@ -440,7 +436,7 @@ static int handle_kdh(struct netdump_cli if (!client) { - return 0; + return; } client->any_data_rcvd = 1; @@ -453,8 +449,7 @@ static int handle_kdh(struct netdump_cli client_pinfo(client, "Bad KDH: packet too small\n"); fflush(client->infofile); send_ack(client, msg); - - return 0; + return; } parity_check = kerneldump_parity(h); @@ -484,18 +479,17 @@ static int handle_kdh(struct netdump_cli LOGINFO("(KDH from %s [%s])", client->hostname, client_ntoa(client)); send_ack(client, msg); - - return 0; } -static int handle_vmcore(struct netdump_client *client, struct netdump_msg *msg) +static void handle_vmcore(struct netdump_client *client, + struct netdump_msg *msg) { assert(msg != NULL); if (!client) { - return 0; + return; } client->any_data_rcvd = 1; @@ -514,22 +508,21 @@ static int handle_vmcore(struct netdump_ msg->hdr.offset, strerror(errno)); exec_handler(client, "error"); free_client(client); - return 1; + return; } send_ack(client, msg); - - return 0; } -static int handle_finish(struct netdump_client *client, struct netdump_msg *msg) +static void handle_finish(struct netdump_client *client, + struct netdump_msg *msg) { assert(msg != NULL); if (!client) { - return 0; + return; } @@ -542,8 +535,6 @@ static int handle_finish(struct netdump_ exec_handler(client, "success"); free_client(client); - - return 1; } @@ -595,10 +586,9 @@ static int receive_message(int sock, str return len; } -static int handle_packet(struct netdump_client *client, +static void handle_packet(struct netdump_client *client, struct sockaddr_in *from, const char *fromstr, struct netdump_msg *msg) { - int freed_client; assert(from != NULL && fromstr != NULL && msg != NULL); @@ -610,24 +600,21 @@ static int handle_packet(struct netdump_ switch (msg->hdr.type) { case NETDUMP_HERALD: - freed_client = handle_herald(from, client, msg); + handle_herald(from, client, msg); break; case NETDUMP_KDH: - freed_client = handle_kdh(client, msg); + handle_kdh(client, msg); break; case NETDUMP_VMCORE: - freed_client = handle_vmcore(client, msg); + handle_vmcore(client, msg); break; case NETDUMP_FINISHED: - freed_client = handle_finish(client, msg); + handle_finish(client, msg); break; default: - freed_client=0; LOGERR("Received unknown message type %d from %s\n", msg->hdr.type, fromstr); } - - return freed_client; } static void eventloop() @@ -638,7 +625,7 @@ static void eventloop() { fd_set readfds; int maxfd=sock+1; - struct netdump_client *client; + struct netdump_client *client, *tmp; struct timeval tv; struct sockaddr_in from; char fromstr[INET_ADDRSTRLEN+6]; /* Long enough for IP+':'+port+'\0' */ @@ -726,7 +713,11 @@ static void eventloop() } } - SLIST_FOREACH(client, &clients, iter) { + /* + * handle_packet() and handle_timeout() may free the client, + * handle stale pointers. + */ + SLIST_FOREACH_SAFE(client, &clients, iter, tmp) { if (FD_ISSET(client->sock, &readfds)) { int len = receive_message(client->sock, &from, fromstr, @@ -741,12 +732,6 @@ static void eventloop() LOGERR_PERROR("recvfrom()"); /* Client socket is broken for some reason */ handle_timeout(client); - /* The client pointer is now invalid */ - client = SLIST_FIRST(&clients); - if (!client) - { - break; - } } else if (len == 0) { @@ -756,15 +741,7 @@ static void eventloop() else { FD_CLR(client->sock, &readfds); - if (handle_packet(client, &from, fromstr, &msg)) - { - /* Client was freed; we have a stale pointer */ - client = SLIST_FIRST(&clients); - if (!client) - { - break; - } - } + handle_packet(client, &from, fromstr, &msg); } } } From owner-svn-src-projects@FreeBSD.ORG Sat Aug 21 17:15:37 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF98E10656A5; Sat, 21 Aug 2010 17:15:37 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B4A258FC1F; Sat, 21 Aug 2010 17:15:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7LHFbJK075896; Sat, 21 Aug 2010 17:15:37 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7LHFb8b075894; Sat, 21 Aug 2010 17:15:37 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201008211715.o7LHFb8b075894@svn.freebsd.org> From: Attilio Rao Date: Sat, 21 Aug 2010 17:15:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211576 - projects/sv/usr.sbin/netdumpsrv X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Aug 2010 17:15:37 -0000 Author: attilio Date: Sat Aug 21 17:15:37 2010 New Revision: 211576 URL: http://svn.freebsd.org/changeset/base/211576 Log: Replace the use of the old gethostbyname() with getnameinfo(). Modified: projects/sv/usr.sbin/netdumpsrv/netdump_server.c Modified: projects/sv/usr.sbin/netdumpsrv/netdump_server.c ============================================================================== --- projects/sv/usr.sbin/netdumpsrv/netdump_server.c Sat Aug 21 16:47:41 2010 (r211575) +++ projects/sv/usr.sbin/netdumpsrv/netdump_server.c Sat Aug 21 17:15:37 2010 (r211576) @@ -74,7 +74,7 @@ struct netdump_client SLIST_ENTRY(netdump_client) iter; char infofilename[MAXPATHLEN]; char corefilename[MAXPATHLEN]; - char hostname[MAXHOSTNAMELEN]; + char hostname[NI_MAXHOST]; struct in_addr ip; FILE *infofile; int corefd; @@ -93,7 +93,7 @@ struct in_addr bindip; struct pidfh *pfh; int sock; -static struct netdump_client *alloc_client(struct in_addr *ip); +static struct netdump_client *alloc_client(struct sockaddr_in *sip); static void eventloop(void); static void exec_handler(struct netdump_client *client, const char *reason); @@ -119,14 +119,15 @@ static void send_ack(struct netdump_cl static void signal_shutdown(int sig); static void timeout_clients(void); -static struct netdump_client *alloc_client(struct in_addr *ip) +static struct netdump_client *alloc_client(struct sockaddr_in *sip) { struct sockaddr_in saddr; struct netdump_client *client; - struct hostent *hp; - int i, fd, bufsz; + struct in_addr *ip; + char *firstdot; + int i, ecode, fd, bufsz; - assert(ip != NULL); + assert(sip != NULL); client = calloc(1, sizeof(*client)); if (!client) @@ -134,27 +135,25 @@ static struct netdump_client *alloc_clie LOGERR_PERROR("calloc()"); return NULL; } + ip = &sip->sin_addr; bcopy(ip, &client->ip, sizeof(*ip)); client->corefd = -1; client->sock = -1; client->last_msg = now; - /* XXX: To be replaced by getnameinfo(). Get the hostname */ - if ((hp = gethostbyaddr((const char *)ip, sizeof(*ip), AF_INET)) == NULL || - !hp->h_name || strlen(hp->h_name) == 0) - { -#if 0 - /* Can't resolve; use IP */ - addr2ascii(AF_INET, ip, sizeof(*ip), client->hostname); -#endif - } - else - { - char *firstdot; - - /* Grab the hostname */ - strncpy(client->hostname, hp->h_name, MAXHOSTNAMELEN); - hp->h_name[MAXHOSTNAMELEN-1]='\0'; + ecode = getnameinfo((struct sockaddr *)sip, sip->sin_len, client->hostname, + sizeof(client->hostname), NULL, 0, NI_NAMEREQD); + if (ecode != 0) { + + /* Can't resolve, try with a numeric IP. */ + ecode = getnameinfo((struct sockaddr *)sip, sip->sin_len, + client->hostname, sizeof(client->hostname), NULL, 0, 0); + if (ecode != 0) { + LOGERR("getnameinfo(): %s\n", gai_strerror(ecode)); + free(client); + return NULL; + } + } else { /* Strip off the domain name */ firstdot = strchr(client->hostname, '.'); @@ -408,7 +407,7 @@ static void handle_herald(struct sockadd handle_timeout(client); } - client = alloc_client(&from->sin_addr); + client = alloc_client(from); if (!client) {