From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 04:34:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD40D843; Sun, 31 Aug 2014 04:34:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C47961399; Sun, 31 Aug 2014 04:34:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7V4YJct088261; Sun, 31 Aug 2014 04:34:19 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7V4YEWC088225; Sun, 31 Aug 2014 04:34:14 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408310434.s7V4YEWC088225@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 31 Aug 2014 04:34:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r270864 - in vendor/device-tree/dist: Bindings Bindings/arm Bindings/arm/exynos Bindings/arm/hisilicon Bindings/arm/keystone Bindings/arm/omap Bindings/arm/samsung Bindings/ata Bindings... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 04:34:20 -0000 Author: imp Date: Sun Aug 31 04:34:12 2014 New Revision: 270864 URL: http://svnweb.freebsd.org/changeset/base/270864 Log: Import from rebasing repo at b78b6b80 Modified: vendor/device-tree/dist/Bindings/arm/arch_timer.txt vendor/device-tree/dist/Bindings/arm/arm-boards vendor/device-tree/dist/Bindings/arm/armada-370-xp-pmsu.txt vendor/device-tree/dist/Bindings/arm/atmel-pmc.txt vendor/device-tree/dist/Bindings/arm/coherency-fabric.txt vendor/device-tree/dist/Bindings/arm/cpus.txt vendor/device-tree/dist/Bindings/arm/exynos/power_domain.txt vendor/device-tree/dist/Bindings/arm/gic.txt vendor/device-tree/dist/Bindings/arm/global_timer.txt vendor/device-tree/dist/Bindings/arm/hisilicon/hisilicon.txt vendor/device-tree/dist/Bindings/arm/keystone/keystone.txt vendor/device-tree/dist/Bindings/arm/l2cc.txt vendor/device-tree/dist/Bindings/arm/marvell,berlin.txt vendor/device-tree/dist/Bindings/arm/mvebu-system-controller.txt vendor/device-tree/dist/Bindings/arm/omap/l3-noc.txt vendor/device-tree/dist/Bindings/arm/omap/omap.txt vendor/device-tree/dist/Bindings/arm/pmu.txt vendor/device-tree/dist/Bindings/arm/psci.txt vendor/device-tree/dist/Bindings/arm/samsung/exynos-adc.txt vendor/device-tree/dist/Bindings/arm/samsung/sysreg.txt vendor/device-tree/dist/Bindings/arm/tegra.txt vendor/device-tree/dist/Bindings/arm/topology.txt vendor/device-tree/dist/Bindings/arm/vexpress-sysreg.txt vendor/device-tree/dist/Bindings/arm/vexpress.txt vendor/device-tree/dist/Bindings/arm/xilinx.txt vendor/device-tree/dist/Bindings/ata/ahci-platform.txt vendor/device-tree/dist/Bindings/ata/exynos-sata.txt vendor/device-tree/dist/Bindings/bus/imx-weim.txt vendor/device-tree/dist/Bindings/bus/mvebu-mbus.txt vendor/device-tree/dist/Bindings/clock/altr_socfpga.txt vendor/device-tree/dist/Bindings/clock/at91-clock.txt vendor/device-tree/dist/Bindings/clock/axi-clkgen.txt vendor/device-tree/dist/Bindings/clock/bcm-kona-clock.txt vendor/device-tree/dist/Bindings/clock/clock-bindings.txt vendor/device-tree/dist/Bindings/clock/exynos4-clock.txt vendor/device-tree/dist/Bindings/clock/exynos5250-clock.txt vendor/device-tree/dist/Bindings/clock/exynos5420-clock.txt vendor/device-tree/dist/Bindings/clock/exynos5440-clock.txt vendor/device-tree/dist/Bindings/clock/fixed-clock.txt vendor/device-tree/dist/Bindings/clock/hi3620-clock.txt vendor/device-tree/dist/Bindings/clock/imx25-clock.txt vendor/device-tree/dist/Bindings/clock/imx27-clock.txt vendor/device-tree/dist/Bindings/clock/imx6q-clock.txt vendor/device-tree/dist/Bindings/clock/mvebu-core-clock.txt vendor/device-tree/dist/Bindings/clock/mvebu-corediv-clock.txt vendor/device-tree/dist/Bindings/clock/mvebu-cpu-clock.txt vendor/device-tree/dist/Bindings/clock/mvebu-gated-clock.txt vendor/device-tree/dist/Bindings/clock/qcom,gcc.txt vendor/device-tree/dist/Bindings/clock/qcom,mmcc.txt vendor/device-tree/dist/Bindings/clock/renesas,cpg-mstp-clocks.txt vendor/device-tree/dist/Bindings/clock/rockchip.txt vendor/device-tree/dist/Bindings/clock/sunxi.txt vendor/device-tree/dist/Bindings/clock/ti/apll.txt vendor/device-tree/dist/Bindings/clock/ti/dpll.txt vendor/device-tree/dist/Bindings/clock/ti/gate.txt vendor/device-tree/dist/Bindings/clock/ti/interface.txt vendor/device-tree/dist/Bindings/clock/zynq-7000.txt vendor/device-tree/dist/Bindings/cpufreq/cpufreq-cpu0.txt vendor/device-tree/dist/Bindings/dma/dma.txt vendor/device-tree/dist/Bindings/dma/fsl-imx-sdma.txt vendor/device-tree/dist/Bindings/dma/mmp-dma.txt vendor/device-tree/dist/Bindings/dma/ste-dma40.txt vendor/device-tree/dist/Bindings/dma/ti-edma.txt vendor/device-tree/dist/Bindings/gpio/gpio-davinci.txt vendor/device-tree/dist/Bindings/gpio/gpio-mcp23s08.txt vendor/device-tree/dist/Bindings/gpio/gpio.txt vendor/device-tree/dist/Bindings/gpio/renesas,gpio-rcar.txt vendor/device-tree/dist/Bindings/gpu/nvidia,tegra20-host1x.txt vendor/device-tree/dist/Bindings/hwmon/ntc_thermistor.txt vendor/device-tree/dist/Bindings/i2c/i2c-arb-gpio-challenge.txt vendor/device-tree/dist/Bindings/i2c/i2c-at91.txt vendor/device-tree/dist/Bindings/i2c/i2c-designware.txt vendor/device-tree/dist/Bindings/i2c/i2c-exynos5.txt vendor/device-tree/dist/Bindings/i2c/i2c-mv64xxx.txt vendor/device-tree/dist/Bindings/i2c/i2c-rcar.txt vendor/device-tree/dist/Bindings/i2c/trivial-devices.txt vendor/device-tree/dist/Bindings/iio/magnetometer/hmc5843.txt vendor/device-tree/dist/Bindings/interrupt-controller/allwinner,sun4i-ic.txt vendor/device-tree/dist/Bindings/interrupt-controller/interrupts.txt vendor/device-tree/dist/Bindings/iommu/arm,smmu.txt vendor/device-tree/dist/Bindings/leds/leds-gpio.txt vendor/device-tree/dist/Bindings/leds/leds-lp55xx.txt vendor/device-tree/dist/Bindings/leds/leds-pwm.txt vendor/device-tree/dist/Bindings/leds/pca963x.txt vendor/device-tree/dist/Bindings/leds/tca6507.txt vendor/device-tree/dist/Bindings/media/exynos-jpeg-codec.txt vendor/device-tree/dist/Bindings/media/s5p-mfc.txt vendor/device-tree/dist/Bindings/media/samsung-fimc.txt vendor/device-tree/dist/Bindings/memory-controllers/mvebu-devbus.txt vendor/device-tree/dist/Bindings/mfd/arizona.txt vendor/device-tree/dist/Bindings/mfd/as3722.txt vendor/device-tree/dist/Bindings/mfd/mc13xxx.txt vendor/device-tree/dist/Bindings/mfd/omap-usb-host.txt vendor/device-tree/dist/Bindings/mfd/omap-usb-tll.txt vendor/device-tree/dist/Bindings/mfd/palmas.txt vendor/device-tree/dist/Bindings/mfd/s2mps11.txt vendor/device-tree/dist/Bindings/mfd/tps65910.txt vendor/device-tree/dist/Bindings/mfd/twl4030-power.txt vendor/device-tree/dist/Bindings/mfd/twl6040.txt vendor/device-tree/dist/Bindings/misc/allwinner,sunxi-sid.txt vendor/device-tree/dist/Bindings/misc/atmel-ssc.txt vendor/device-tree/dist/Bindings/misc/sram.txt vendor/device-tree/dist/Bindings/mmc/exynos-dw-mshc.txt vendor/device-tree/dist/Bindings/mmc/k3-dw-mshc.txt vendor/device-tree/dist/Bindings/mmc/mmc.txt vendor/device-tree/dist/Bindings/mmc/mmci.txt vendor/device-tree/dist/Bindings/mmc/samsung-sdhci.txt vendor/device-tree/dist/Bindings/mmc/sdhci-pxa.txt vendor/device-tree/dist/Bindings/mmc/synopsys-dw-mshc.txt vendor/device-tree/dist/Bindings/mmc/ti-omap-hsmmc.txt vendor/device-tree/dist/Bindings/mmc/tmio_mmc.txt vendor/device-tree/dist/Bindings/mtd/gpmc-nand.txt vendor/device-tree/dist/Bindings/mtd/gpmc-nor.txt vendor/device-tree/dist/Bindings/mtd/gpmc-onenand.txt vendor/device-tree/dist/Bindings/mtd/gpmi-nand.txt vendor/device-tree/dist/Bindings/mtd/m25p80.txt vendor/device-tree/dist/Bindings/mtd/nand.txt vendor/device-tree/dist/Bindings/mtd/pxa3xx-nand.txt vendor/device-tree/dist/Bindings/net/allwinner,sun4i-emac.txt vendor/device-tree/dist/Bindings/net/arc_emac.txt vendor/device-tree/dist/Bindings/net/can/sja1000.txt vendor/device-tree/dist/Bindings/net/cavium-mix.txt vendor/device-tree/dist/Bindings/net/cavium-pip.txt vendor/device-tree/dist/Bindings/net/cdns-emac.txt vendor/device-tree/dist/Bindings/net/cpsw-phy-sel.txt vendor/device-tree/dist/Bindings/net/cpsw.txt vendor/device-tree/dist/Bindings/net/davicom-dm9000.txt vendor/device-tree/dist/Bindings/net/davinci-mdio.txt vendor/device-tree/dist/Bindings/net/davinci_emac.txt vendor/device-tree/dist/Bindings/net/fsl-fec.txt vendor/device-tree/dist/Bindings/net/fsl-tsec-phy.txt vendor/device-tree/dist/Bindings/net/lpc-eth.txt vendor/device-tree/dist/Bindings/net/macb.txt vendor/device-tree/dist/Bindings/net/marvell-armada-370-neta.txt vendor/device-tree/dist/Bindings/net/marvell-orion-net.txt vendor/device-tree/dist/Bindings/net/mdio-gpio.txt vendor/device-tree/dist/Bindings/net/micrel-ks8851.txt vendor/device-tree/dist/Bindings/net/phy.txt vendor/device-tree/dist/Bindings/net/smsc-lan91c111.txt vendor/device-tree/dist/Bindings/net/smsc911x.txt vendor/device-tree/dist/Bindings/net/stmmac.txt vendor/device-tree/dist/Bindings/pci/designware-pcie.txt vendor/device-tree/dist/Bindings/pci/nvidia,tegra20-pcie.txt vendor/device-tree/dist/Bindings/phy/phy-bindings.txt vendor/device-tree/dist/Bindings/phy/samsung-phy.txt vendor/device-tree/dist/Bindings/pinctrl/allwinner,sunxi-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/marvell,armada-370-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/marvell,armada-xp-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/marvell,dove-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/marvell,kirkwood-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/marvell,mvebu-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/pinctrl-bindings.txt vendor/device-tree/dist/Bindings/pinctrl/pinctrl-single.txt vendor/device-tree/dist/Bindings/pinctrl/pinctrl-st.txt vendor/device-tree/dist/Bindings/pinctrl/qcom,msm8974-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/renesas,pfc-pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/rockchip,pinctrl.txt vendor/device-tree/dist/Bindings/pinctrl/samsung-pinctrl.txt vendor/device-tree/dist/Bindings/power_supply/qnap-poweroff.txt vendor/device-tree/dist/Bindings/powerpc/4xx/reboot.txt vendor/device-tree/dist/Bindings/powerpc/fsl/board.txt vendor/device-tree/dist/Bindings/powerpc/fsl/cpus.txt vendor/device-tree/dist/Bindings/powerpc/fsl/dcsr.txt vendor/device-tree/dist/Bindings/powerpc/fsl/pamu.txt vendor/device-tree/dist/Bindings/regulator/act8865-regulator.txt vendor/device-tree/dist/Bindings/regulator/gpio-regulator.txt vendor/device-tree/dist/Bindings/regulator/palmas-pmic.txt vendor/device-tree/dist/Bindings/regulator/pfuze100.txt vendor/device-tree/dist/Bindings/regulator/regulator.txt vendor/device-tree/dist/Bindings/regulator/s5m8767-regulator.txt vendor/device-tree/dist/Bindings/regulator/ti-abb-regulator.txt vendor/device-tree/dist/Bindings/regulator/tps65090.txt vendor/device-tree/dist/Bindings/rtc/haoyu,hym8563.txt vendor/device-tree/dist/Bindings/rtc/sunxi-rtc.txt vendor/device-tree/dist/Bindings/serial/atmel-usart.txt vendor/device-tree/dist/Bindings/serial/efm32-uart.txt vendor/device-tree/dist/Bindings/serial/fsl-lpuart.txt vendor/device-tree/dist/Bindings/serial/of-serial.txt vendor/device-tree/dist/Bindings/serial/renesas,sci-serial.txt vendor/device-tree/dist/Bindings/serial/samsung_uart.txt vendor/device-tree/dist/Bindings/serial/snps-dw-apb-uart.txt vendor/device-tree/dist/Bindings/sound/ak4104.txt vendor/device-tree/dist/Bindings/sound/ak5386.txt vendor/device-tree/dist/Bindings/sound/davinci-evm-audio.txt vendor/device-tree/dist/Bindings/sound/davinci-mcasp-audio.txt vendor/device-tree/dist/Bindings/sound/fsl,esai.txt vendor/device-tree/dist/Bindings/sound/fsl,spdif.txt vendor/device-tree/dist/Bindings/sound/fsl,ssi.txt vendor/device-tree/dist/Bindings/sound/fsl-sai.txt vendor/device-tree/dist/Bindings/sound/max98090.txt vendor/device-tree/dist/Bindings/sound/mvebu-audio.txt vendor/device-tree/dist/Bindings/sound/rt5640.txt vendor/device-tree/dist/Bindings/sound/simple-card.txt vendor/device-tree/dist/Bindings/sound/ti,tas5086.txt vendor/device-tree/dist/Bindings/sound/tlv320aic3x.txt vendor/device-tree/dist/Bindings/spi/efm32-spi.txt vendor/device-tree/dist/Bindings/spi/fsl-spi.txt vendor/device-tree/dist/Bindings/spi/sh-hspi.txt vendor/device-tree/dist/Bindings/spi/sh-msiof.txt vendor/device-tree/dist/Bindings/spi/spi-bus.txt vendor/device-tree/dist/Bindings/spi/spi-davinci.txt vendor/device-tree/dist/Bindings/spi/spi-fsl-dspi.txt vendor/device-tree/dist/Bindings/spi/spi-samsung.txt vendor/device-tree/dist/Bindings/staging/imx-drm/fsl-imx-drm.txt vendor/device-tree/dist/Bindings/staging/imx-drm/ldb.txt vendor/device-tree/dist/Bindings/thermal/armada-thermal.txt vendor/device-tree/dist/Bindings/thermal/exynos-thermal.txt vendor/device-tree/dist/Bindings/thermal/rcar-thermal.txt vendor/device-tree/dist/Bindings/timer/allwinner,sun4i-timer.txt vendor/device-tree/dist/Bindings/timer/allwinner,sun5i-a13-hstimer.txt vendor/device-tree/dist/Bindings/usb/atmel-usb.txt vendor/device-tree/dist/Bindings/usb/ci-hdrc-imx.txt vendor/device-tree/dist/Bindings/usb/dwc2.txt vendor/device-tree/dist/Bindings/usb/dwc3.txt vendor/device-tree/dist/Bindings/usb/ehci-omap.txt vendor/device-tree/dist/Bindings/usb/ehci-orion.txt vendor/device-tree/dist/Bindings/usb/exynos-usb.txt vendor/device-tree/dist/Bindings/usb/fsl-usb.txt vendor/device-tree/dist/Bindings/usb/gr-udc.txt vendor/device-tree/dist/Bindings/usb/msm-hsusb.txt vendor/device-tree/dist/Bindings/usb/mxs-phy.txt vendor/device-tree/dist/Bindings/usb/nvidia,tegra20-usb-phy.txt vendor/device-tree/dist/Bindings/usb/ohci-omap3.txt vendor/device-tree/dist/Bindings/usb/omap-usb.txt vendor/device-tree/dist/Bindings/usb/usb-ehci.txt vendor/device-tree/dist/Bindings/usb/usb-xhci.txt vendor/device-tree/dist/Bindings/usb/usb3503.txt vendor/device-tree/dist/Bindings/vendor-prefixes.txt vendor/device-tree/dist/Bindings/video/atmel,lcdc.txt vendor/device-tree/dist/Bindings/video/exynos_dp.txt vendor/device-tree/dist/Bindings/video/exynos_hdmi.txt vendor/device-tree/dist/Bindings/video/exynos_mixer.txt vendor/device-tree/dist/Bindings/video/fsl,imx-fb.txt vendor/device-tree/dist/Bindings/video/samsung-fimd.txt vendor/device-tree/dist/Bindings/watchdog/fsl-imx-wdt.txt vendor/device-tree/dist/Bindings/watchdog/marvel.txt vendor/device-tree/dist/Bindings/watchdog/sunxi-wdt.txt vendor/device-tree/dist/include/dt-bindings/clock/exynos4.h vendor/device-tree/dist/include/dt-bindings/clock/exynos5250.h vendor/device-tree/dist/include/dt-bindings/clock/exynos5420.h vendor/device-tree/dist/include/dt-bindings/clock/exynos5440.h vendor/device-tree/dist/include/dt-bindings/clock/hi3620-clock.h vendor/device-tree/dist/include/dt-bindings/clock/imx6sl-clock.h vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-msm8960.h vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-msm8974.h vendor/device-tree/dist/include/dt-bindings/clock/qcom,mmcc-msm8960.h vendor/device-tree/dist/include/dt-bindings/clock/r8a7790-clock.h vendor/device-tree/dist/include/dt-bindings/clock/r8a7791-clock.h vendor/device-tree/dist/include/dt-bindings/clock/tegra114-car.h vendor/device-tree/dist/include/dt-bindings/clock/tegra124-car.h vendor/device-tree/dist/include/dt-bindings/clock/vf610-clock.h vendor/device-tree/dist/include/dt-bindings/mfd/as3722.h vendor/device-tree/dist/include/dt-bindings/pinctrl/am43xx.h vendor/device-tree/dist/include/dt-bindings/pinctrl/dra.h vendor/device-tree/dist/include/dt-bindings/pinctrl/omap.h vendor/device-tree/dist/include/dt-bindings/reset/qcom,gcc-msm8960.h vendor/device-tree/dist/include/dt-bindings/reset/qcom,mmcc-msm8960.h vendor/device-tree/dist/src/arc/angel4.dts vendor/device-tree/dist/src/arc/nsimosci.dts vendor/device-tree/dist/src/arm/aks-cdu.dts vendor/device-tree/dist/src/arm/am335x-bone-common.dtsi vendor/device-tree/dist/src/arm/am335x-boneblack.dts vendor/device-tree/dist/src/arm/am335x-evm.dts vendor/device-tree/dist/src/arm/am335x-evmsk.dts vendor/device-tree/dist/src/arm/am335x-igep0033.dtsi vendor/device-tree/dist/src/arm/am335x-nano.dts vendor/device-tree/dist/src/arm/am33xx-clocks.dtsi vendor/device-tree/dist/src/arm/am33xx.dtsi vendor/device-tree/dist/src/arm/am3517.dtsi vendor/device-tree/dist/src/arm/am4372.dtsi vendor/device-tree/dist/src/arm/am43x-epos-evm.dts vendor/device-tree/dist/src/arm/am43xx-clocks.dtsi vendor/device-tree/dist/src/arm/animeo_ip.dts vendor/device-tree/dist/src/arm/armada-370-db.dts vendor/device-tree/dist/src/arm/armada-370-mirabox.dts vendor/device-tree/dist/src/arm/armada-370-netgear-rn102.dts vendor/device-tree/dist/src/arm/armada-370-netgear-rn104.dts vendor/device-tree/dist/src/arm/armada-370-rd.dts vendor/device-tree/dist/src/arm/armada-370-xp.dtsi vendor/device-tree/dist/src/arm/armada-370.dtsi vendor/device-tree/dist/src/arm/armada-xp-axpwifiap.dts vendor/device-tree/dist/src/arm/armada-xp-db.dts vendor/device-tree/dist/src/arm/armada-xp-gp.dts vendor/device-tree/dist/src/arm/armada-xp-matrix.dts vendor/device-tree/dist/src/arm/armada-xp-mv78230.dtsi vendor/device-tree/dist/src/arm/armada-xp-mv78260.dtsi vendor/device-tree/dist/src/arm/armada-xp-mv78460.dtsi vendor/device-tree/dist/src/arm/armada-xp-netgear-rn2120.dts vendor/device-tree/dist/src/arm/armada-xp-openblocks-ax3-4.dts vendor/device-tree/dist/src/arm/armada-xp.dtsi vendor/device-tree/dist/src/arm/at91-ariag25.dts vendor/device-tree/dist/src/arm/at91-cosino.dtsi vendor/device-tree/dist/src/arm/at91-cosino_mega2560.dts vendor/device-tree/dist/src/arm/at91-foxg20.dts vendor/device-tree/dist/src/arm/at91-qil_a9260.dts vendor/device-tree/dist/src/arm/at91-sama5d3_xplained.dts vendor/device-tree/dist/src/arm/at91rm9200.dtsi vendor/device-tree/dist/src/arm/at91rm9200ek.dts vendor/device-tree/dist/src/arm/at91sam9260.dtsi vendor/device-tree/dist/src/arm/at91sam9263.dtsi vendor/device-tree/dist/src/arm/at91sam9263ek.dts vendor/device-tree/dist/src/arm/at91sam9g20.dtsi vendor/device-tree/dist/src/arm/at91sam9g20ek_common.dtsi vendor/device-tree/dist/src/arm/at91sam9g45.dtsi vendor/device-tree/dist/src/arm/at91sam9m10g45ek.dts vendor/device-tree/dist/src/arm/at91sam9n12.dtsi vendor/device-tree/dist/src/arm/at91sam9n12ek.dts vendor/device-tree/dist/src/arm/at91sam9x5.dtsi vendor/device-tree/dist/src/arm/at91sam9x5_macb0.dtsi vendor/device-tree/dist/src/arm/at91sam9x5_macb1.dtsi vendor/device-tree/dist/src/arm/at91sam9x5_usart3.dtsi vendor/device-tree/dist/src/arm/at91sam9x5cm.dtsi vendor/device-tree/dist/src/arm/atlas6.dtsi vendor/device-tree/dist/src/arm/bcm11351.dtsi vendor/device-tree/dist/src/arm/bcm28155-ap.dts vendor/device-tree/dist/src/arm/bcm2835.dtsi vendor/device-tree/dist/src/arm/berlin2.dtsi vendor/device-tree/dist/src/arm/berlin2cd.dtsi vendor/device-tree/dist/src/arm/dove-cubox.dts vendor/device-tree/dist/src/arm/dove.dtsi vendor/device-tree/dist/src/arm/dra7-evm.dts vendor/device-tree/dist/src/arm/dra7.dtsi vendor/device-tree/dist/src/arm/dra7xx-clocks.dtsi vendor/device-tree/dist/src/arm/efm32gg-dk3750.dts vendor/device-tree/dist/src/arm/efm32gg.dtsi vendor/device-tree/dist/src/arm/emev2.dtsi vendor/device-tree/dist/src/arm/ethernut5.dts vendor/device-tree/dist/src/arm/evk-pro3.dts vendor/device-tree/dist/src/arm/exynos4.dtsi vendor/device-tree/dist/src/arm/exynos4210-origen.dts vendor/device-tree/dist/src/arm/exynos4210-smdkv310.dts vendor/device-tree/dist/src/arm/exynos4210-trats.dts vendor/device-tree/dist/src/arm/exynos4210-universal_c210.dts vendor/device-tree/dist/src/arm/exynos4210.dtsi vendor/device-tree/dist/src/arm/exynos4212.dtsi vendor/device-tree/dist/src/arm/exynos4412-odroidx.dts vendor/device-tree/dist/src/arm/exynos4412-origen.dts vendor/device-tree/dist/src/arm/exynos4412-smdk4412.dts vendor/device-tree/dist/src/arm/exynos4412-tiny4412.dts vendor/device-tree/dist/src/arm/exynos4412-trats2.dts vendor/device-tree/dist/src/arm/exynos4412.dtsi vendor/device-tree/dist/src/arm/exynos4x12.dtsi vendor/device-tree/dist/src/arm/exynos5.dtsi vendor/device-tree/dist/src/arm/exynos5250-arndale.dts vendor/device-tree/dist/src/arm/exynos5250-cros-common.dtsi vendor/device-tree/dist/src/arm/exynos5250-pinctrl.dtsi vendor/device-tree/dist/src/arm/exynos5250-smdk5250.dts vendor/device-tree/dist/src/arm/exynos5250-snow.dts vendor/device-tree/dist/src/arm/exynos5250.dtsi vendor/device-tree/dist/src/arm/exynos5420-arndale-octa.dts vendor/device-tree/dist/src/arm/exynos5420-pinctrl.dtsi vendor/device-tree/dist/src/arm/exynos5420-smdk5420.dts vendor/device-tree/dist/src/arm/exynos5420.dtsi vendor/device-tree/dist/src/arm/exynos5440-sd5v1.dts vendor/device-tree/dist/src/arm/exynos5440-ssdk5440.dts vendor/device-tree/dist/src/arm/exynos5440.dtsi vendor/device-tree/dist/src/arm/ge863-pro3.dtsi vendor/device-tree/dist/src/arm/hi3620.dtsi vendor/device-tree/dist/src/arm/imx23-evk.dts vendor/device-tree/dist/src/arm/imx23-olinuxino.dts vendor/device-tree/dist/src/arm/imx23-stmp378x_devb.dts vendor/device-tree/dist/src/arm/imx23.dtsi vendor/device-tree/dist/src/arm/imx25-karo-tx25.dts vendor/device-tree/dist/src/arm/imx25-pdk.dts vendor/device-tree/dist/src/arm/imx25.dtsi vendor/device-tree/dist/src/arm/imx27-apf27.dts vendor/device-tree/dist/src/arm/imx27-apf27dev.dts vendor/device-tree/dist/src/arm/imx27-pdk.dts vendor/device-tree/dist/src/arm/imx27-phytec-phycard-s-rdk.dts vendor/device-tree/dist/src/arm/imx27-phytec-phycore-rdk.dts vendor/device-tree/dist/src/arm/imx27.dtsi vendor/device-tree/dist/src/arm/imx28-apf28dev.dts vendor/device-tree/dist/src/arm/imx28-apx4devkit.dts vendor/device-tree/dist/src/arm/imx28-cfa10036.dts vendor/device-tree/dist/src/arm/imx28-cfa10037.dts vendor/device-tree/dist/src/arm/imx28-cfa10049.dts vendor/device-tree/dist/src/arm/imx28-cfa10057.dts vendor/device-tree/dist/src/arm/imx28-cfa10058.dts vendor/device-tree/dist/src/arm/imx28-evk.dts vendor/device-tree/dist/src/arm/imx28-m28cu3.dts vendor/device-tree/dist/src/arm/imx28-m28evk.dts vendor/device-tree/dist/src/arm/imx28-sps1.dts vendor/device-tree/dist/src/arm/imx28-tx28.dts vendor/device-tree/dist/src/arm/imx28.dtsi vendor/device-tree/dist/src/arm/imx51-apf51.dts vendor/device-tree/dist/src/arm/imx51-apf51dev.dts vendor/device-tree/dist/src/arm/imx51-babbage.dts vendor/device-tree/dist/src/arm/imx51.dtsi vendor/device-tree/dist/src/arm/imx53-ard.dts vendor/device-tree/dist/src/arm/imx53-m53evk.dts vendor/device-tree/dist/src/arm/imx53-mba53.dts vendor/device-tree/dist/src/arm/imx53-qsb.dts vendor/device-tree/dist/src/arm/imx53-smd.dts vendor/device-tree/dist/src/arm/imx53-tqma53.dtsi vendor/device-tree/dist/src/arm/imx53-tx53.dtsi vendor/device-tree/dist/src/arm/imx53.dtsi vendor/device-tree/dist/src/arm/imx6dl-hummingboard.dts vendor/device-tree/dist/src/arm/imx6dl-pinfunc.h vendor/device-tree/dist/src/arm/imx6dl-wandboard.dts vendor/device-tree/dist/src/arm/imx6dl.dtsi vendor/device-tree/dist/src/arm/imx6q-arm2.dts vendor/device-tree/dist/src/arm/imx6q-cubox-i.dts vendor/device-tree/dist/src/arm/imx6q-phytec-pbab01.dts vendor/device-tree/dist/src/arm/imx6q-phytec-pfla02.dtsi vendor/device-tree/dist/src/arm/imx6q-pinfunc.h vendor/device-tree/dist/src/arm/imx6q-sabrelite.dts vendor/device-tree/dist/src/arm/imx6q-sbc6x.dts vendor/device-tree/dist/src/arm/imx6q-udoo.dts vendor/device-tree/dist/src/arm/imx6q-wandboard.dts vendor/device-tree/dist/src/arm/imx6q.dtsi vendor/device-tree/dist/src/arm/imx6qdl-cubox-i.dtsi vendor/device-tree/dist/src/arm/imx6qdl-microsom-ar8035.dtsi vendor/device-tree/dist/src/arm/imx6qdl-microsom.dtsi vendor/device-tree/dist/src/arm/imx6qdl-sabreauto.dtsi vendor/device-tree/dist/src/arm/imx6qdl-sabresd.dtsi vendor/device-tree/dist/src/arm/imx6qdl-wandboard.dtsi vendor/device-tree/dist/src/arm/imx6qdl.dtsi vendor/device-tree/dist/src/arm/imx6sl-evk.dts vendor/device-tree/dist/src/arm/imx6sl.dtsi vendor/device-tree/dist/src/arm/integratorap.dts vendor/device-tree/dist/src/arm/integratorcp.dts vendor/device-tree/dist/src/arm/k2hk-evm.dts vendor/device-tree/dist/src/arm/keystone-clocks.dtsi vendor/device-tree/dist/src/arm/keystone.dtsi vendor/device-tree/dist/src/arm/kirkwood-6192.dtsi vendor/device-tree/dist/src/arm/kirkwood-6281.dtsi vendor/device-tree/dist/src/arm/kirkwood-6282.dtsi vendor/device-tree/dist/src/arm/kirkwood-98dx4122.dtsi vendor/device-tree/dist/src/arm/kirkwood-cloudbox.dts vendor/device-tree/dist/src/arm/kirkwood-db.dtsi vendor/device-tree/dist/src/arm/kirkwood-dns320.dts vendor/device-tree/dist/src/arm/kirkwood-dns325.dts vendor/device-tree/dist/src/arm/kirkwood-dnskw.dtsi vendor/device-tree/dist/src/arm/kirkwood-dockstar.dts vendor/device-tree/dist/src/arm/kirkwood-dreamplug.dts vendor/device-tree/dist/src/arm/kirkwood-goflexnet.dts vendor/device-tree/dist/src/arm/kirkwood-guruplug-server-plus.dts vendor/device-tree/dist/src/arm/kirkwood-ib62x0.dts vendor/device-tree/dist/src/arm/kirkwood-iconnect.dts vendor/device-tree/dist/src/arm/kirkwood-iomega_ix2_200.dts vendor/device-tree/dist/src/arm/kirkwood-km_kirkwood.dts vendor/device-tree/dist/src/arm/kirkwood-laplug.dts vendor/device-tree/dist/src/arm/kirkwood-lsxl.dtsi vendor/device-tree/dist/src/arm/kirkwood-mplcec4.dts vendor/device-tree/dist/src/arm/kirkwood-mv88f6281gtw-ge.dts vendor/device-tree/dist/src/arm/kirkwood-netgear_readynas_duo_v2.dts vendor/device-tree/dist/src/arm/kirkwood-netgear_readynas_nv+_v2.dts vendor/device-tree/dist/src/arm/kirkwood-ns2-common.dtsi vendor/device-tree/dist/src/arm/kirkwood-nsa310.dts vendor/device-tree/dist/src/arm/kirkwood-nsa310a.dts vendor/device-tree/dist/src/arm/kirkwood-openblocks_a6.dts vendor/device-tree/dist/src/arm/kirkwood-openblocks_a7.dts vendor/device-tree/dist/src/arm/kirkwood-sheevaplug-common.dtsi vendor/device-tree/dist/src/arm/kirkwood-topkick.dts vendor/device-tree/dist/src/arm/kirkwood-ts219-6281.dts vendor/device-tree/dist/src/arm/kirkwood-ts219-6282.dts vendor/device-tree/dist/src/arm/kirkwood-ts219.dtsi vendor/device-tree/dist/src/arm/kirkwood.dtsi vendor/device-tree/dist/src/arm/kizbox.dts vendor/device-tree/dist/src/arm/marco.dtsi vendor/device-tree/dist/src/arm/mpa1600.dts vendor/device-tree/dist/src/arm/omap-gpmc-smsc911x.dtsi vendor/device-tree/dist/src/arm/omap2.dtsi vendor/device-tree/dist/src/arm/omap2420.dtsi vendor/device-tree/dist/src/arm/omap2430.dtsi vendor/device-tree/dist/src/arm/omap3-beagle-xm.dts vendor/device-tree/dist/src/arm/omap3-beagle.dts vendor/device-tree/dist/src/arm/omap3-cm-t3730.dts vendor/device-tree/dist/src/arm/omap3-cm-t3x30.dtsi vendor/device-tree/dist/src/arm/omap3-devkit8000.dts vendor/device-tree/dist/src/arm/omap3-evm-37xx.dts vendor/device-tree/dist/src/arm/omap3-evm-common.dtsi vendor/device-tree/dist/src/arm/omap3-gta04.dts vendor/device-tree/dist/src/arm/omap3-igep.dtsi vendor/device-tree/dist/src/arm/omap3-igep0020.dts vendor/device-tree/dist/src/arm/omap3-igep0030.dts vendor/device-tree/dist/src/arm/omap3-ldp.dts vendor/device-tree/dist/src/arm/omap3-n900.dts vendor/device-tree/dist/src/arm/omap3-n950-n9.dtsi vendor/device-tree/dist/src/arm/omap3-overo-storm-tobi.dts vendor/device-tree/dist/src/arm/omap3-overo-tobi-common.dtsi vendor/device-tree/dist/src/arm/omap3-overo-tobi.dts vendor/device-tree/dist/src/arm/omap3-overo.dtsi vendor/device-tree/dist/src/arm/omap3-sb-t35.dtsi vendor/device-tree/dist/src/arm/omap3-sbc-t3730.dts vendor/device-tree/dist/src/arm/omap3.dtsi vendor/device-tree/dist/src/arm/omap3430-sdp.dts vendor/device-tree/dist/src/arm/omap3430es1-clocks.dtsi vendor/device-tree/dist/src/arm/omap34xx.dtsi vendor/device-tree/dist/src/arm/omap36xx-am35xx-omap3430es2plus-clocks.dtsi vendor/device-tree/dist/src/arm/omap36xx-clocks.dtsi vendor/device-tree/dist/src/arm/omap36xx-omap3430es2plus-clocks.dtsi vendor/device-tree/dist/src/arm/omap36xx.dtsi vendor/device-tree/dist/src/arm/omap3xxx-clocks.dtsi vendor/device-tree/dist/src/arm/omap4-panda-common.dtsi vendor/device-tree/dist/src/arm/omap4-sdp.dts vendor/device-tree/dist/src/arm/omap4.dtsi vendor/device-tree/dist/src/arm/omap443x.dtsi vendor/device-tree/dist/src/arm/omap4460.dtsi vendor/device-tree/dist/src/arm/omap5-uevm.dts vendor/device-tree/dist/src/arm/omap5.dtsi vendor/device-tree/dist/src/arm/omap54xx-clocks.dtsi vendor/device-tree/dist/src/arm/orion5x-lacie-ethernet-disk-mini-v2.dts vendor/device-tree/dist/src/arm/orion5x.dtsi vendor/device-tree/dist/src/arm/pm9g45.dts vendor/device-tree/dist/src/arm/prima2.dtsi vendor/device-tree/dist/src/arm/qcom-apq8074-dragonboard.dts vendor/device-tree/dist/src/arm/qcom-msm8660-surf.dts vendor/device-tree/dist/src/arm/qcom-msm8960-cdp.dts vendor/device-tree/dist/src/arm/qcom-msm8974.dtsi vendor/device-tree/dist/src/arm/r7s72100-genmai.dts vendor/device-tree/dist/src/arm/r7s72100.dtsi vendor/device-tree/dist/src/arm/r8a73a4-ape6evm-reference.dts vendor/device-tree/dist/src/arm/r8a73a4.dtsi vendor/device-tree/dist/src/arm/r8a7740-armadillo800eva-reference.dts vendor/device-tree/dist/src/arm/r8a7740.dtsi vendor/device-tree/dist/src/arm/r8a7778-bockw-reference.dts vendor/device-tree/dist/src/arm/r8a7778.dtsi vendor/device-tree/dist/src/arm/r8a7779-marzen.dts vendor/device-tree/dist/src/arm/r8a7779.dtsi vendor/device-tree/dist/src/arm/r8a7790-lager.dts vendor/device-tree/dist/src/arm/r8a7790.dtsi vendor/device-tree/dist/src/arm/r8a7791-koelsch.dts vendor/device-tree/dist/src/arm/r8a7791.dtsi vendor/device-tree/dist/src/arm/rk3066a-bqcurie2.dts vendor/device-tree/dist/src/arm/rk3066a.dtsi vendor/device-tree/dist/src/arm/rk3188-radxarock.dts vendor/device-tree/dist/src/arm/rk3188.dtsi vendor/device-tree/dist/src/arm/rk3xxx.dtsi vendor/device-tree/dist/src/arm/s3c2416-smdk2416.dts vendor/device-tree/dist/src/arm/s3c2416.dtsi vendor/device-tree/dist/src/arm/s3c24xx.dtsi vendor/device-tree/dist/src/arm/s3c64xx.dtsi vendor/device-tree/dist/src/arm/sama5d3.dtsi vendor/device-tree/dist/src/arm/sama5d36.dtsi vendor/device-tree/dist/src/arm/sama5d3_gmac.dtsi vendor/device-tree/dist/src/arm/sama5d3_mci2.dtsi vendor/device-tree/dist/src/arm/sama5d3_tcb1.dtsi vendor/device-tree/dist/src/arm/sama5d3_uart.dtsi vendor/device-tree/dist/src/arm/sama5d3xcm.dtsi vendor/device-tree/dist/src/arm/sama5d3xdm.dtsi vendor/device-tree/dist/src/arm/sama5d3xmb.dtsi vendor/device-tree/dist/src/arm/sh73a0-kzm9g-reference.dts vendor/device-tree/dist/src/arm/sh73a0.dtsi vendor/device-tree/dist/src/arm/socfpga.dtsi vendor/device-tree/dist/src/arm/socfpga_arria5.dtsi vendor/device-tree/dist/src/arm/socfpga_arria5_socdk.dts vendor/device-tree/dist/src/arm/socfpga_cyclone5.dtsi vendor/device-tree/dist/src/arm/socfpga_cyclone5_socdk.dts vendor/device-tree/dist/src/arm/socfpga_cyclone5_sockit.dts vendor/device-tree/dist/src/arm/socfpga_vt.dts vendor/device-tree/dist/src/arm/spear1310-evb.dts vendor/device-tree/dist/src/arm/spear1310.dtsi vendor/device-tree/dist/src/arm/spear1340-evb.dts vendor/device-tree/dist/src/arm/spear1340.dtsi vendor/device-tree/dist/src/arm/spear13xx.dtsi vendor/device-tree/dist/src/arm/spear320-hmi.dts vendor/device-tree/dist/src/arm/ste-ccu8540.dts vendor/device-tree/dist/src/arm/ste-ccu9540.dts vendor/device-tree/dist/src/arm/ste-dbx5x0.dtsi vendor/device-tree/dist/src/arm/ste-href-stuib.dtsi vendor/device-tree/dist/src/arm/ste-href-tvk1281618.dtsi vendor/device-tree/dist/src/arm/ste-href.dtsi vendor/device-tree/dist/src/arm/ste-hrefprev60.dtsi vendor/device-tree/dist/src/arm/ste-hrefv60plus.dtsi vendor/device-tree/dist/src/arm/ste-nomadik-s8815.dts vendor/device-tree/dist/src/arm/ste-nomadik-stn8815.dtsi vendor/device-tree/dist/src/arm/ste-snowball.dts vendor/device-tree/dist/src/arm/ste-u300.dts vendor/device-tree/dist/src/arm/stih415-b2000.dts vendor/device-tree/dist/src/arm/stih415-b2020.dts vendor/device-tree/dist/src/arm/stih415-clock.dtsi vendor/device-tree/dist/src/arm/stih415-pinctrl.dtsi vendor/device-tree/dist/src/arm/stih415.dtsi vendor/device-tree/dist/src/arm/stih416-b2000.dts vendor/device-tree/dist/src/arm/stih416-b2020.dts vendor/device-tree/dist/src/arm/stih416-clock.dtsi vendor/device-tree/dist/src/arm/stih416-pinctrl.dtsi vendor/device-tree/dist/src/arm/stih416.dtsi vendor/device-tree/dist/src/arm/stih41x-b2000.dtsi vendor/device-tree/dist/src/arm/stih41x-b2020.dtsi vendor/device-tree/dist/src/arm/stih41x.dtsi vendor/device-tree/dist/src/arm/sun4i-a10-a1000.dts vendor/device-tree/dist/src/arm/sun4i-a10-cubieboard.dts vendor/device-tree/dist/src/arm/sun4i-a10-hackberry.dts vendor/device-tree/dist/src/arm/sun4i-a10-mini-xplus.dts vendor/device-tree/dist/src/arm/sun4i-a10.dtsi vendor/device-tree/dist/src/arm/sun5i-a10s-olinuxino-micro.dts vendor/device-tree/dist/src/arm/sun5i-a10s.dtsi vendor/device-tree/dist/src/arm/sun5i-a13-olinuxino-micro.dts vendor/device-tree/dist/src/arm/sun5i-a13-olinuxino.dts vendor/device-tree/dist/src/arm/sun5i-a13.dtsi vendor/device-tree/dist/src/arm/sun6i-a31-colombus.dts vendor/device-tree/dist/src/arm/sun6i-a31.dtsi vendor/device-tree/dist/src/arm/sun7i-a20-cubieboard2.dts vendor/device-tree/dist/src/arm/sun7i-a20-cubietruck.dts vendor/device-tree/dist/src/arm/sun7i-a20-olinuxino-micro.dts vendor/device-tree/dist/src/arm/sun7i-a20.dtsi vendor/device-tree/dist/src/arm/tegra114-dalmore.dts vendor/device-tree/dist/src/arm/tegra114.dtsi vendor/device-tree/dist/src/arm/tegra124-venice2.dts vendor/device-tree/dist/src/arm/tegra124.dtsi vendor/device-tree/dist/src/arm/tegra20-harmony.dts vendor/device-tree/dist/src/arm/tegra20-medcom-wide.dts vendor/device-tree/dist/src/arm/tegra20-paz00.dts vendor/device-tree/dist/src/arm/tegra20-plutux.dts vendor/device-tree/dist/src/arm/tegra20-seaboard.dts vendor/device-tree/dist/src/arm/tegra20-tamonten.dtsi vendor/device-tree/dist/src/arm/tegra20-tec.dts vendor/device-tree/dist/src/arm/tegra20-trimslice.dts vendor/device-tree/dist/src/arm/tegra20-ventana.dts vendor/device-tree/dist/src/arm/tegra20.dtsi vendor/device-tree/dist/src/arm/tegra30-beaver.dts vendor/device-tree/dist/src/arm/tegra30-cardhu.dtsi vendor/device-tree/dist/src/arm/tegra30.dtsi vendor/device-tree/dist/src/arm/tny_a9260_common.dtsi vendor/device-tree/dist/src/arm/tny_a9263.dts vendor/device-tree/dist/src/arm/tps65910.dtsi vendor/device-tree/dist/src/arm/twl4030.dtsi vendor/device-tree/dist/src/arm/twl4030_omap3.dtsi vendor/device-tree/dist/src/arm/usb_a9260_common.dtsi vendor/device-tree/dist/src/arm/usb_a9263.dts vendor/device-tree/dist/src/arm/versatile-ab.dts vendor/device-tree/dist/src/arm/versatile-pb.dts vendor/device-tree/dist/src/arm/vexpress-v2m-rs1.dtsi vendor/device-tree/dist/src/arm/vexpress-v2m.dtsi vendor/device-tree/dist/src/arm/vexpress-v2p-ca15_a7.dts vendor/device-tree/dist/src/arm/vexpress-v2p-ca5s.dts vendor/device-tree/dist/src/arm/vf610-cosmic.dts vendor/device-tree/dist/src/arm/vf610-twr.dts vendor/device-tree/dist/src/arm/vf610.dtsi vendor/device-tree/dist/src/arm/vt8500.dtsi vendor/device-tree/dist/src/arm/wm8650.dtsi vendor/device-tree/dist/src/arm/wm8850.dtsi vendor/device-tree/dist/src/arm/zynq-7000.dtsi vendor/device-tree/dist/src/arm/zynq-zc702.dts vendor/device-tree/dist/src/arm/zynq-zc706.dts vendor/device-tree/dist/src/arm64/apm-mustang.dts vendor/device-tree/dist/src/arm64/apm-storm.dtsi vendor/device-tree/dist/src/arm64/rtsm_ve-motherboard.dtsi vendor/device-tree/dist/src/mips/easy50712.dts vendor/device-tree/dist/src/mips/mt7620a_eval.dts vendor/device-tree/dist/src/mips/rt2880_eval.dts vendor/device-tree/dist/src/mips/rt3052_eval.dts vendor/device-tree/dist/src/mips/rt3883_eval.dts vendor/device-tree/dist/src/mips/xlp_gvp.dts vendor/device-tree/dist/src/powerpc/b4860emu.dts vendor/device-tree/dist/src/powerpc/fsl/b4420si-post.dtsi vendor/device-tree/dist/src/powerpc/fsl/b4420si-pre.dtsi vendor/device-tree/dist/src/powerpc/fsl/b4860si-post.dtsi vendor/device-tree/dist/src/powerpc/fsl/b4860si-pre.dtsi vendor/device-tree/dist/src/powerpc/fsl/b4si-post.dtsi vendor/device-tree/dist/src/powerpc/fsl/p2041si-post.dtsi vendor/device-tree/dist/src/powerpc/fsl/p2041si-pre.dtsi vendor/device-tree/dist/src/powerpc/fsl/p3041si-post.dtsi vendor/device-tree/dist/src/powerpc/fsl/p3041si-pre.dtsi vendor/device-tree/dist/src/powerpc/fsl/p4080si-post.dtsi vendor/device-tree/dist/src/powerpc/fsl/p4080si-pre.dtsi vendor/device-tree/dist/src/powerpc/fsl/p5020si-post.dtsi vendor/device-tree/dist/src/powerpc/fsl/p5020si-pre.dtsi vendor/device-tree/dist/src/powerpc/fsl/p5040si-post.dtsi vendor/device-tree/dist/src/powerpc/fsl/p5040si-pre.dtsi vendor/device-tree/dist/src/powerpc/fsl/qoriq-sec6.0-0.dtsi vendor/device-tree/dist/src/powerpc/fsl/t4240si-post.dtsi vendor/device-tree/dist/src/powerpc/fsl/t4240si-pre.dtsi vendor/device-tree/dist/src/powerpc/mpc5121.dtsi vendor/device-tree/dist/src/powerpc/mpc8308_p1m.dts vendor/device-tree/dist/src/powerpc/mpc8308rdb.dts vendor/device-tree/dist/src/powerpc/t4240emu.dts vendor/device-tree/dist/src/powerpc/t4240qds.dts vendor/device-tree/dist/src/xtensa/xtfpga-flash-16m.dtsi vendor/device-tree/dist/src/xtensa/xtfpga-flash-4m.dtsi vendor/device-tree/dist/src/xtensa/xtfpga.dtsi vendor/device-tree/dist/testcase-data/tests-interrupts.dtsi vendor/device-tree/dist/testcase-data/tests-phandle.dtsi Modified: vendor/device-tree/dist/Bindings/arm/arch_timer.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/arch_timer.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/arch_timer.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -19,6 +19,9 @@ to deliver its interrupts via SPIs. - clock-frequency : The frequency of the main counter, in Hz. Optional. +- always-on : a boolean property. If present, the timer is powered through an + always-on power domain, therefore it never loses context. + Example: timer { Modified: vendor/device-tree/dist/Bindings/arm/arm-boards ============================================================================== --- vendor/device-tree/dist/Bindings/arm/arm-boards Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/arm-boards Sun Aug 31 04:34:12 2014 (r270864) @@ -86,3 +86,9 @@ Interrupt controllers: compatible = "arm,versatile-sic"; interrupt-controller; #interrupt-cells = <1>; + +Required nodes: + +- core-module: the root node to the Versatile platforms must have + a core-module with regs and the compatible strings + "arm,core-module-versatile", "syscon" Modified: vendor/device-tree/dist/Bindings/arm/armada-370-xp-pmsu.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/armada-370-xp-pmsu.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/armada-370-xp-pmsu.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -1,20 +1,21 @@ Power Management Service Unit(PMSU) ----------------------------------- -Available on Marvell SOCs: Armada 370 and Armada XP +Available on Marvell SOCs: Armada 370, Armada 38x and Armada XP Required properties: -- compatible: "marvell,armada-370-xp-pmsu" +- compatible: should be one of: + - "marvell,armada-370-pmsu" for Armada 370 or Armada XP + - "marvell,armada-380-pmsu" for Armada 38x + - "marvell,armada-370-xp-pmsu" was used for Armada 370/XP but is now + deprecated and will be removed -- reg: Should contain PMSU registers location and length. First pair - for the per-CPU SW Reset Control registers, second pair for the - Power Management Service Unit. +- reg: Should contain PMSU registers location and length. Example: -armada-370-xp-pmsu@d0022000 { - compatible = "marvell,armada-370-xp-pmsu"; - reg = <0xd0022100 0x430>, - <0xd0020800 0x20>; +armada-370-xp-pmsu@22000 { + compatible = "marvell,armada-370-pmsu"; + reg = <0x22000 0x1000>; }; Modified: vendor/device-tree/dist/Bindings/arm/atmel-pmc.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/atmel-pmc.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/atmel-pmc.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -1,7 +1,10 @@ * Power Management Controller (PMC) Required properties: -- compatible: Should be "atmel,at91rm9200-pmc" +- compatible: Should be "atmel,-pmc". + can be: at91rm9200, at91sam9260, at91sam9g45, at91sam9n12, + at91sam9x5, sama5d3 + - reg: Should contain PMC registers location and length Examples: Modified: vendor/device-tree/dist/Bindings/arm/coherency-fabric.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/coherency-fabric.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/coherency-fabric.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -1,16 +1,33 @@ Coherency fabric ---------------- -Available on Marvell SOCs: Armada 370 and Armada XP +Available on Marvell SOCs: Armada 370, Armada 375, Armada 38x and Armada XP Required properties: -- compatible: "marvell,coherency-fabric" +- compatible: the possible values are: + + * "marvell,coherency-fabric", to be used for the coherency fabric of + the Armada 370 and Armada XP. + + * "marvell,armada-375-coherency-fabric", for the Armada 375 coherency + fabric. + + * "marvell,armada-380-coherency-fabric", for the Armada 38x coherency + fabric. - reg: Should contain coherency fabric registers location and - length. First pair for the coherency fabric registers, second pair - for the per-CPU fabric registers registers. + length. + + * For "marvell,coherency-fabric", the first pair for the coherency + fabric registers, second pair for the per-CPU fabric registers. -Example: + * For "marvell,armada-375-coherency-fabric", only one pair is needed + for the per-CPU fabric registers. + + * For "marvell,armada-380-coherency-fabric", only one pair is needed + for the per-CPU fabric registers. + +Examples: coherency-fabric@d0020200 { compatible = "marvell,coherency-fabric"; @@ -19,3 +36,8 @@ coherency-fabric@d0020200 { }; +coherency-fabric@21810 { + compatible = "marvell,armada-375-coherency-fabric"; + reg = <0x21810 0x1c>; +}; + Modified: vendor/device-tree/dist/Bindings/arm/cpus.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/cpus.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/cpus.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -152,7 +152,9 @@ nodes to be present and contain the prop "arm,cortex-a7" "arm,cortex-a8" "arm,cortex-a9" + "arm,cortex-a12" "arm,cortex-a15" + "arm,cortex-a17" "arm,cortex-a53" "arm,cortex-a57" "arm,cortex-m0" @@ -163,6 +165,7 @@ nodes to be present and contain the prop "arm,cortex-r4" "arm,cortex-r5" "arm,cortex-r7" + "brcm,brahma-b15" "faraday,fa526" "intel,sa110" "intel,sa1100" @@ -178,9 +181,20 @@ nodes to be present and contain the prop Usage and definition depend on ARM architecture version. # On ARM v8 64-bit this property is required and must be one of: - "spin-table" "psci" - # On ARM 32-bit systems this property is optional. + "spin-table" + # On ARM 32-bit systems this property is optional and + can be one of: + "allwinner,sun6i-a31" + "arm,psci" + "brcm,brahma-b15" + "marvell,armada-375-smp" + "marvell,armada-380-smp" + "marvell,armada-xp-smp" + "qcom,gcc-msm8660" + "qcom,kpss-acc-v1" + "qcom,kpss-acc-v2" + "rockchip,rk3066-smp" - cpu-release-addr Usage: required for systems that have an "enable-method" @@ -191,6 +205,21 @@ nodes to be present and contain the prop property identifying a 64-bit zero-initialised memory location. + - qcom,saw + Usage: required for systems that have an "enable-method" + property value of "qcom,kpss-acc-v1" or + "qcom,kpss-acc-v2" + Value type: + Definition: Specifies the SAW[1] node associated with this CPU. + + - qcom,acc + Usage: required for systems that have an "enable-method" + property value of "qcom,kpss-acc-v1" or + "qcom,kpss-acc-v2" + Value type: + Definition: Specifies the ACC[2] node associated with this CPU. + + Example 1 (dual-cluster big.LITTLE system 32-bit): cpus { @@ -382,3 +411,7 @@ cpus { cpu-release-addr = <0 0x20000000>; }; }; + +-- +[1] arm/msm/qcom,saw2.txt +[2] arm/msm/qcom,kpss-acc.txt Modified: vendor/device-tree/dist/Bindings/arm/exynos/power_domain.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/exynos/power_domain.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/exynos/power_domain.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -9,6 +9,18 @@ Required Properties: - reg: physical base address of the controller and length of memory mapped region. +Optional Properties: +- clocks: List of clock handles. The parent clocks of the input clocks to the + devices in this power domain are set to oscclk before power gating + and restored back after powering on a domain. This is required for + all domains which are powered on and off and not required for unused + domains. +- clock-names: The following clocks can be specified: + - oscclk: Oscillator clock. + - pclkN, clkN: Pairs of parent of input clock and input clock to the + devices in this power domain. Maximum of 4 pairs (N = 0 to 3) + are supported currently. + Node of a device using power domains must have a samsung,power-domain property defined with a phandle to respective power domain. @@ -19,6 +31,14 @@ Example: reg = <0x10023C00 0x10>; }; + mfc_pd: power-domain@10044060 { + compatible = "samsung,exynos4210-pd"; + reg = <0x10044060 0x20>; + clocks = <&clock CLK_FIN_PLL>, <&clock CLK_MOUT_SW_ACLK333>, + <&clock CLK_MOUT_USER_ACLK333>; + clock-names = "oscclk", "pclk0", "clk0"; + }; + Example of the node using power domain: node { Modified: vendor/device-tree/dist/Bindings/arm/gic.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/gic.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/gic.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -16,6 +16,7 @@ Main node required properties: "arm,cortex-a9-gic" "arm,cortex-a7-gic" "arm,arm11mp-gic" + "brcm,brahma-b15-gic" - interrupt-controller : Identifies the node as an interrupt controller - #interrupt-cells : Specifies the number of cells needed to encode an interrupt source. The type shall be a and the value shall be 3. @@ -50,6 +51,11 @@ Optional regions, used when the GIC doesn't have banked registers. The offset is cpu-offset * cpu-nr. +- arm,routable-irqs : Total number of gic irq inputs which are not directly + connected from the peripherals, but are routed dynamically + by a crossbar/multiplexer preceding the GIC. The GIC irq + input line is assigned dynamically when the corresponding + peripheral's crossbar line is mapped. Example: intc: interrupt-controller@fff11000 { @@ -57,6 +63,7 @@ Example: #interrupt-cells = <3>; #address-cells = <1>; interrupt-controller; + arm,routable-irqs = <160>; reg = <0xfff11000 0x1000>, <0xfff10100 0x100>; }; Modified: vendor/device-tree/dist/Bindings/arm/global_timer.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/global_timer.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/global_timer.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -4,8 +4,11 @@ ** Timer node required properties: -- compatible : Should be "arm,cortex-a9-global-timer" - Driver supports versions r2p0 and above. +- compatible : should contain + * "arm,cortex-a5-global-timer" for Cortex-A5 global timers. + * "arm,cortex-a9-global-timer" for Cortex-A9 global + timers or any compatible implementation. Note: driver + supports versions r2p0 and above. - interrupts : One interrupt to each core Modified: vendor/device-tree/dist/Bindings/arm/hisilicon/hisilicon.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/hisilicon/hisilicon.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/hisilicon/hisilicon.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -30,3 +30,28 @@ Example: resume-offset = <0x308>; reboot-offset = <0x4>; }; + +----------------------------------------------------------------------- +Hisilicon CPU controller + +Required properties: +- compatible : "hisilicon,cpuctrl" +- reg : Register address and size + +The clock registers and power registers of secondary cores are defined +in CPU controller, especially in HIX5HD2 SoC. + +----------------------------------------------------------------------- +PCTRL: Peripheral misc control register + +Required Properties: +- compatible: "hisilicon,pctrl" +- reg: Address and size of pctrl. + +Example: + + /* for Hi3620 */ + pctrl: pctrl@fca09000 { + compatible = "hisilicon,pctrl"; + reg = <0xfca09000 0x1000>; + }; Modified: vendor/device-tree/dist/Bindings/arm/keystone/keystone.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/keystone/keystone.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/keystone/keystone.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -8,3 +8,13 @@ Required properties: - compatible: All TI specific devices present in Keystone SOC should be in the form "ti,keystone-*". Generic devices like gic, arch_timers, ns16550 type UART should use the specified compatible for those devices. + +Boards: +- Keystone 2 Hawking/Kepler EVM + compatible = "ti,k2hk-evm","ti,keystone" + +- Keystone 2 Lamarr EVM + compatible = "ti,k2l-evm","ti,keystone" + +- Keystone 2 Edison EVM + compatible = "ti,k2e-evm","ti,keystone" Modified: vendor/device-tree/dist/Bindings/arm/l2cc.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/l2cc.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/l2cc.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -40,6 +40,9 @@ Optional properties: - arm,filter-ranges : Starting address and length of window to filter. Addresses in the filter window are directed to the M1 port. Other addresses will go to the M0 port. +- arm,io-coherent : indicates that the system is operating in an hardware + I/O coherent mode. Valid only when the arm,pl310-cache compatible + string is used. - interrupts : 1 combined interrupt. - cache-id-part: cache id part number to be used if it is not present on hardware Modified: vendor/device-tree/dist/Bindings/arm/marvell,berlin.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/marvell,berlin.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/marvell,berlin.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -12,6 +12,7 @@ SoC and board used. Currently known SoC "marvell,berlin2" for Marvell Armada 1500 (BG2, 88DE3100), "marvell,berlin2cd" for Marvell Armada 1500-mini (BG2CD, 88DE3005) "marvell,berlin2ct" for Marvell Armada ? (BG2CT, 88DE????) + "marvell,berlin2q" for Marvell Armada 1500-pro (BG2Q, 88DE3114) "marvell,berlin3" for Marvell Armada ? (BG3, 88DE????) * Example: @@ -22,3 +23,120 @@ SoC and board used. Currently known SoC ... } + +* Marvell Berlin CPU control bindings + +CPU control register allows various operations on CPUs, like resetting them +independently. + +Required properties: +- compatible: should be "marvell,berlin-cpu-ctrl" +- reg: address and length of the register set + +Example: + +cpu-ctrl@f7dd0000 { + compatible = "marvell,berlin-cpu-ctrl"; + reg = <0xf7dd0000 0x10000>; +}; + +* Marvell Berlin2 chip control binding + +Marvell Berlin SoCs have a chip control register set providing several +individual registers dealing with pinmux, padmux, clock, reset, and secondary +CPU boot address. Unfortunately, the individual registers are spread among the +chip control registers, so there should be a single DT node only providing the +different functions which are described below. + +Required properties: +- compatible: shall be one of + "marvell,berlin2-chip-ctrl" for BG2 + "marvell,berlin2cd-chip-ctrl" for BG2CD + "marvell,berlin2q-chip-ctrl" for BG2Q +- reg: address and length of following register sets for + BG2/BG2CD: chip control register set + BG2Q: chip control register set and cpu pll registers + +* Marvell Berlin2 system control binding + +Marvell Berlin SoCs have a system control register set providing several +individual registers dealing with pinmux, padmux, and reset. + +Required properties: +- compatible: should be one of + "marvell,berlin2-system-ctrl" for BG2 + "marvell,berlin2cd-system-ctrl" for BG2CD + "marvell,berlin2q-system-ctrl" for BG2Q +- reg: address and length of the system control register set + +* Clock provider binding + +As clock related registers are spread among the chip control registers, the +chip control node also provides the clocks. Marvell Berlin2 (BG2, BG2CD, BG2Q) +SoCs share the same IP for PLLs and clocks, with some minor differences in +features and register layout. + +Required properties: +- #clock-cells: shall be set to 1 +- clocks: clock specifiers referencing the core clock input clocks +- clock-names: array of strings describing the input clock specifiers above. + Allowed clock-names for the reference clocks are + "refclk" for the SoCs osciallator input on all SoCs, + and SoC-specific input clocks for + BG2/BG2CD: "video_ext0" for the external video clock input + +Clocks provided by core clocks shall be referenced by a clock specifier +indexing one of the provided clocks. Refer to dt-bindings/clock/berlin.h +for the corresponding index mapping. + +* Pin controller binding + +Pin control registers are part of both register sets, chip control and system +control. The pins controlled are organized in groups, so no actual pin +information is needed. + +A pin-controller node should contain subnodes representing the pin group +configurations, one per function. Each subnode has the group name and the muxing +function used. + +Be aware the Marvell Berlin datasheets use the keyword 'mode' for what is called +a 'function' in the pin-controller subsystem. + +Required subnode-properties: +- groups: a list of strings describing the group names. +- function: a string describing the function used to mux the groups. + +Example: + +chip: chip-control@ea0000 { + compatible = "marvell,berlin2-chip-ctrl"; + #clock-cells = <1>; + reg = <0xea0000 0x400>; + clocks = <&refclk>, <&externaldev 0>; + clock-names = "refclk", "video_ext0"; + + spi1_pmux: spi1-pmux { + groups = "G0"; + function = "spi1"; + }; +}; + +sysctrl: system-controller@d000 { + compatible = "marvell,berlin2-system-ctrl"; + reg = <0xd000 0x100>; + + uart0_pmux: uart0-pmux { + groups = "GSM4"; + function = "uart0"; + }; + + uart1_pmux: uart1-pmux { + groups = "GSM5"; + function = "uart1"; + }; + + uart2_pmux: uart2-pmux { + groups = "GSM3"; + function = "uart2"; + }; +}; Modified: vendor/device-tree/dist/Bindings/arm/mvebu-system-controller.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/mvebu-system-controller.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/mvebu-system-controller.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -1,12 +1,13 @@ MVEBU System Controller ----------------------- -MVEBU (Marvell SOCs: Armada 370/XP, Dove, mv78xx0, Kirkwood, Orion5x) +MVEBU (Marvell SOCs: Armada 370/375/XP, Dove, mv78xx0, Kirkwood, Orion5x) Required properties: - compatible: one of: - "marvell,orion-system-controller" - "marvell,armada-370-xp-system-controller" + - "marvell,armada-375-system-controller" - reg: Should contain system controller registers location and length. Example: Modified: vendor/device-tree/dist/Bindings/arm/omap/l3-noc.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/omap/l3-noc.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/omap/l3-noc.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -6,6 +6,8 @@ provided by Arteris. Required properties: - compatible : Should be "ti,omap3-l3-smx" for OMAP3 family Should be "ti,omap4-l3-noc" for OMAP4 family + Should be "ti,dra7-l3-noc" for DRA7 family + Should be "ti,am4372-l3-noc" for AM43 family - reg: Contains L3 register address range for each noc domain. - ti,hwmods: "l3_main_1", ... One hwmod for each noc domain. Modified: vendor/device-tree/dist/Bindings/arm/omap/omap.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/omap/omap.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/omap/omap.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -80,7 +80,10 @@ SoCs: compatible = "ti,omap5432", "ti,omap5" - DRA742 - compatible = "ti,dra7xx", "ti,dra7" + compatible = "ti,dra742", "ti,dra74", "ti,dra7" + +- DRA722 + compatible = "ti,dra722", "ti,dra72", "ti,dra7" - AM4372 compatible = "ti,am4372", "ti,am43" @@ -99,6 +102,15 @@ Boards: - OMAP4 PandaBoard : Low cost community board compatible = "ti,omap4-panda", "ti,omap4430" +- OMAP4 DuoVero with Parlor : Commercial expansion board with daughter board + compatible = "gumstix,omap4-duovero-parlor", "gumstix,omap4-duovero", "ti,omap4430", "ti,omap4"; + +- OMAP4 VAR-STK-OM44 : Commercial dev kit with VAR-OM44CustomBoard and VAR-SOM-OM44 w/WLAN + compatible = "variscite,var-stk-om44", "variscite,var-som-om44", "ti,omap4460", "ti,omap4"; + +- OMAP4 VAR-DVK-OM44 : Commercial dev kit with VAR-OM44CustomBoard, VAR-SOM-OM44 w/WLAN and LCD touchscreen + compatible = "variscite,var-dvk-om44", "variscite,var-som-om44", "ti,omap4460", "ti,omap4"; + - OMAP3 EVM : Software Development Board for OMAP35x, AM/DM37x compatible = "ti,omap3-evm", "ti,omap3" @@ -114,5 +126,14 @@ Boards: - AM43x EPOS EVM compatible = "ti,am43x-epos-evm", "ti,am4372", "ti,am43" -- DRA7 EVM: Software Developement Board for DRA7XX - compatible = "ti,dra7-evm", "ti,dra7" +- AM437x GP EVM + compatible = "ti,am437x-gp-evm", "ti,am4372", "ti,am43" + +- AM437x SK EVM: AM437x StarterKit Evaluation Module + compatible = "ti,am437x-sk-evm", "ti,am4372", "ti,am43" + +- DRA742 EVM: Software Development Board for DRA742 + compatible = "ti,dra7-evm", "ti,dra742", "ti,dra74", "ti,dra7" + +- DRA722 EVM: Software Development Board for DRA722 + compatible = "ti,dra72-evm", "ti,dra722", "ti,dra72", "ti,dra7" Modified: vendor/device-tree/dist/Bindings/arm/pmu.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/pmu.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/pmu.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -8,7 +8,9 @@ Required properties: - compatible : should be one of "arm,armv8-pmuv3" + "arm,cortex-a17-pmu" "arm,cortex-a15-pmu" + "arm,cortex-a12-pmu" "arm,cortex-a9-pmu" "arm,cortex-a8-pmu" "arm,cortex-a7-pmu" @@ -16,7 +18,14 @@ Required properties: "arm,arm11mpcore-pmu" "arm,arm1176-pmu" "arm,arm1136-pmu" -- interrupts : 1 combined interrupt or 1 per core. + "qcom,krait-pmu" +- interrupts : 1 combined interrupt or 1 per core. If the interrupt is a per-cpu + interrupt (PPI) then 1 interrupt should be specified. + +Optional properties: + +- qcom,no-pc-write : Indicates that this PMU doesn't support the 0xc and 0xd + events. Example: Modified: vendor/device-tree/dist/Bindings/arm/psci.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/psci.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/psci.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -21,7 +21,15 @@ to #0. Main node required properties: - - compatible : Must be "arm,psci" + - compatible : should contain at least one of: + + * "arm,psci" : for implementations complying to PSCI versions prior to + 0.2. For these cases function IDs must be provided. + + * "arm,psci-0.2" : for implementations complying to PSCI 0.2. Function + IDs are not required and should be ignored by an OS with PSCI 0.2 + support, but are permitted to be present for compatibility with + existing software when "arm,psci" is later in the compatible list. - method : The method of calling the PSCI firmware. Permitted values are: @@ -45,6 +53,8 @@ Main node optional properties: Example: +Case 1: PSCI v0.1 only. + psci { compatible = "arm,psci"; method = "smc"; @@ -53,3 +63,28 @@ Example: cpu_on = <0x95c10002>; migrate = <0x95c10003>; }; + + +Case 2: PSCI v0.2 only + + psci { + compatible = "arm,psci-0.2"; + method = "smc"; + }; + +Case 3: PSCI v0.2 and PSCI v0.1. + + A DTB may provide IDs for use by kernels without PSCI 0.2 support, + enabling firmware and hypervisors to support existing and new kernels. + These IDs will be ignored by kernels with PSCI 0.2 support, which will + use the standard PSCI 0.2 IDs exclusively. + + psci { + compatible = "arm,psci-0.2", "arm,psci"; + method = "hvc"; + + cpu_on = < arbitrary value >; + cpu_off = < arbitrary value >; + + ... + }; Modified: vendor/device-tree/dist/Bindings/arm/samsung/exynos-adc.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/samsung/exynos-adc.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/samsung/exynos-adc.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -14,14 +14,21 @@ Required properties: for exynos4412/5250 controllers. Must be "samsung,exynos-adc-v2" for future controllers. + Must be "samsung,exynos3250-adc" for + controllers compatible with ADC of Exynos3250. - reg: Contains ADC register address range (base address and length) and the address of the phy enable register. - interrupts: Contains the interrupt information for the timer. The format is being dependent on which interrupt controller the Samsung device uses. - #io-channel-cells = <1>; As ADC has multiple outputs -- clocks From common clock binding: handle to adc clock. -- clock-names From common clock binding: Shall be "adc". +- clocks From common clock bindings: handles to clocks specified + in "clock-names" property, in the same order. +- clock-names From common clock bindings: list of clock input names + used by ADC block: + - "adc" : ADC bus clock + - "sclk" : ADC special clock (only for Exynos3250 and + compatible ADC block) - vdd-supply VDD input supply. Note: child nodes can be added for auto probing from device tree. @@ -41,6 +48,20 @@ adc: adc@12D10000 { vdd-supply = <&buck5_reg>; }; +Example: adding device info in dtsi file for Exynos3250 with additional sclk + +adc: adc@126C0000 { + compatible = "samsung,exynos3250-adc", "samsung,exynos-adc-v2; + reg = <0x126C0000 0x100>, <0x10020718 0x4>; + interrupts = <0 137 0>; + #io-channel-cells = <1>; + io-channel-ranges; + + clocks = <&cmu CLK_TSADC>, <&cmu CLK_SCLK_TSADC>; + clock-names = "adc", "sclk"; + + vdd-supply = <&buck5_reg>; +}; Example: Adding child nodes in dts file @@ -48,7 +69,7 @@ adc@12D10000 { /* NTC thermistor is a hwmon device */ ncp15wb473@0 { - compatible = "ntc,ncp15wb473"; + compatible = "murata,ncp15wb473"; pullup-uv = <1800000>; pullup-ohm = <47000>; pulldown-ohm = <0>; Modified: vendor/device-tree/dist/Bindings/arm/samsung/sysreg.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/samsung/sysreg.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/samsung/sysreg.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -1,8 +1,10 @@ SAMSUNG S5P/Exynos SoC series System Registers (SYSREG) Properties: - - compatible : should contain "samsung,-sysreg", "syscon"; - For Exynos4 SoC series it should be "samsung,exynos4-sysreg", "syscon"; + - compatible : should contain two values. First value must be one from following list: + - "samsung,exynos4-sysreg" - for Exynos4 based SoCs, + - "samsung,exynos5-sysreg" - for Exynos5 based SoCs. + second value must be always "syscon". - reg : offset and length of the register set. Example: @@ -10,3 +12,8 @@ Example: compatible = "samsung,exynos4-sysreg", "syscon"; reg = <0x10010000 0x400>; }; + + syscon@10050000 { + compatible = "samsung,exynos5-sysreg", "syscon"; + reg = <0x10050000 0x5000>; + }; Modified: vendor/device-tree/dist/Bindings/arm/tegra.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/tegra.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/tegra.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -30,6 +30,8 @@ board-specific compatible values: nvidia,seaboard nvidia,ventana nvidia,whistler + toradex,apalis_t30 + toradex,apalis_t30-eval toradex,colibri_t20-512 toradex,iris Modified: vendor/device-tree/dist/Bindings/arm/topology.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/topology.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/topology.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -75,9 +75,10 @@ The cpu-map node can only contain three whose bindings are described in paragraph 3. -The nodes describing the CPU topology (cluster/core/thread) can only be -defined within the cpu-map node. -Any other configuration is consider invalid and therefore must be ignored. +The nodes describing the CPU topology (cluster/core/thread) can only +be defined within the cpu-map node and every core/thread in the system +must be defined within the topology. Any other configuration is +invalid and therefore must be ignored. =========================================== 2.1 - cpu-map child nodes naming convention Modified: vendor/device-tree/dist/Bindings/arm/vexpress-sysreg.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/vexpress-sysreg.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/vexpress-sysreg.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -8,6 +8,8 @@ interrupt generation, MMC and NOR Flash Required node properties: - compatible value : = "arm,vexpress,sysreg"; - reg : physical base address and the size of the registers window + +Deprecated properties, replaced by GPIO subnodes (see below): - gpio-controller : specifies that the node is a GPIO controller - #gpio-cells : size of the GPIO specifier, should be 2: - first cell is the pseudo-GPIO line number: @@ -16,35 +18,86 @@ Required node properties: 2 - NOR FLASH WPn - second cell can take standard GPIO flags (currently ignored). +Control registers providing pseudo-GPIO lines must be represented +by subnodes, each of them requiring the following properties: +- compatible value : one of + "arm,vexpress-sysreg,sys_led" + "arm,vexpress-sysreg,sys_mci" + "arm,vexpress-sysreg,sys_flash" +- gpio-controller : makes the node a GPIO controller +- #gpio-cells : size of the GPIO specifier, must be 2: + - first cell is the function number: + - for sys_led : 0..7 = LED 0..7 + - for sys_mci : 0 = MMC CARDIN, 1 = MMC WPROT + - for sys_flash : 0 = NOR FLASH WPn + - second cell can take standard GPIO flags (currently ignored). + Example: v2m_sysreg: sysreg@10000000 { compatible = "arm,vexpress-sysreg"; reg = <0x10000000 0x1000>; - gpio-controller; - #gpio-cells = <2>; + + v2m_led_gpios: sys_led@08 { + compatible = "arm,vexpress-sysreg,sys_led"; + gpio-controller; + #gpio-cells = <2>; + }; + + v2m_mmc_gpios: sys_mci@48 { + compatible = "arm,vexpress-sysreg,sys_mci"; + gpio-controller; + #gpio-cells = <2>; + }; + + v2m_flash_gpios: sys_flash@4c { + compatible = "arm,vexpress-sysreg,sys_flash"; + gpio-controller; + #gpio-cells = <2>; + }; }; This block also can also act a bridge to the platform's configuration bus via "system control" interface, addressing devices with site number, position in the board stack, config controller, function and device -numbers - see motherboard's TRM for more details. - -The node describing a config device must refer to the sysreg node via -"arm,vexpress,config-bridge" phandle (can be also defined in the node's -parent) and relies on the board topology properties - see main vexpress -node documentation for more details. It must also define the following -property: -- arm,vexpress-sysreg,func : must contain two cells: - - first cell defines function number (eg. 1 for clock generator, - 2 for voltage regulators etc.) - - device number (eg. osc 0, osc 1 etc.) +numbers - see motherboard's TRM for more details. All configuration +controller accessible via this interface must reference the sysreg +node via "arm,vexpress,config-bridge" phandle and define appropriate +topology properties - see main vexpress node documentation for more +details. Each child of such node describes one function and must +define the following properties: +- compatible value : must be one of (corresponding to the TRM): + "arm,vexpress-amp" + "arm,vexpress-dvimode" + "arm,vexpress-energy" + "arm,vexpress-muxfpga" + "arm,vexpress-osc" + "arm,vexpress-power" + "arm,vexpress-reboot" + "arm,vexpress-reset" + "arm,vexpress-scc" + "arm,vexpress-shutdown" + "arm,vexpress-temp" + "arm,vexpress-volt" +- arm,vexpress-sysreg,func : must contain a set of two cells long groups: + - first cell of each group defines the function number + (eg. 1 for clock generator, 2 for voltage regulators etc.) + - second cell of each group defines device number (eg. osc 0, + osc 1 etc.) + - some functions (eg. energy meter, with its 64 bit long counter) + are using more than one function/device number pair Example: mcc { + compatible = "arm,vexpress,config-bus"; arm,vexpress,config-bridge = <&v2m_sysreg>; osc@0 { compatible = "arm,vexpress-osc"; arm,vexpress-sysreg,func = <1 0>; }; + + energy@0 { + compatible = "arm,vexpress-energy"; + arm,vexpress-sysreg,func = <13 0>, <13 1>; + }; }; Modified: vendor/device-tree/dist/Bindings/arm/vexpress.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/vexpress.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/vexpress.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -80,12 +80,17 @@ but also control clock generators, volta environmental data like temperature, power consumption etc. Even the video output switch (FPGA) is controlled that way. -Nodes describing devices controlled by this infrastructure should -point at the bridge device node: +The controllers are not mapped into normal memory address space +and must be accessed through bridges - other devices capable +of generating transactions on the configuration bus. + +The nodes describing configuration controllers must define +the following properties: +- compatible value: + compatible = "arm,vexpress,config-bus"; - bridge phandle: arm,vexpress,config-bridge = ; -This property can be also defined in a parent node (eg. for a DCC) -and is effective for all children. +and children describing available functions. Platform topology @@ -197,7 +202,7 @@ Example of a VE tile description (simpli }; dcc { - compatible = "simple-bus"; + compatible = "arm,vexpress,config-bus"; arm,vexpress,config-bridge = <&v2m_sysreg>; osc@0 { Modified: vendor/device-tree/dist/Bindings/arm/xilinx.txt ============================================================================== --- vendor/device-tree/dist/Bindings/arm/xilinx.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/arm/xilinx.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -1,7 +1,7 @@ -Xilinx Zynq EP107 Emulation Platform board +Xilinx Zynq Platforms Device Tree Bindings -This board is an emulation platform for the Zynq product which is -based on an ARM Cortex A9 processor. +Boards with Zynq-7000 SOC based on an ARM Cortex A9 processor +shall have the following properties. Required root node properties: - - compatible = "xlnx,zynq-ep107"; + - compatible = "xlnx,zynq-7000"; Modified: vendor/device-tree/dist/Bindings/ata/ahci-platform.txt ============================================================================== --- vendor/device-tree/dist/Bindings/ata/ahci-platform.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/ata/ahci-platform.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -3,18 +3,75 @@ SATA nodes are defined to describe on-chip Serial ATA controllers. Each SATA controller should have its own node. +It is possible, but not required, to represent each port as a sub-node. +It allows to enable each port independently when dealing with multiple +PHYs. + Required properties: -- compatible : compatible list, contains "snps,spear-ahci" +- compatible : compatible string, one of: + - "allwinner,sun4i-a10-ahci" + - "hisilicon,hisi-ahci" + - "ibm,476gtr-ahci" + - "marvell,armada-380-ahci" + - "snps,dwc-ahci" + - "snps,exynos5440-ahci" + - "snps,spear-ahci" + - "generic-ahci" - interrupts : - reg : +Please note that when using "generic-ahci" you must also specify a SoC specific +compatible: + compatible = "manufacturer,soc-model-ahci", "generic-ahci"; + Optional properties: - dma-coherent : Present if dma operations are coherent +- clocks : a list of phandle + clock specifier pairs +- target-supply : regulator for SATA target power +- phys : reference to the SATA PHY node +- phy-names : must be "sata-phy" + +Required properties when using sub-nodes: +- #address-cells : number of cells to encode an address +- #size-cells : number of cells representing the size of an address + + +Sub-nodes required properties: +- reg : the port number +- phys : reference to the SATA PHY node + -Example: +Examples: sata@ffe08000 { compatible = "snps,spear-ahci"; reg = <0xffe08000 0x1000>; interrupts = <115>; - }; + + ahci: sata@01c18000 { + compatible = "allwinner,sun4i-a10-ahci"; + reg = <0x01c18000 0x1000>; + interrupts = <56>; + clocks = <&pll6 0>, <&ahb_gates 25>; + target-supply = <®_ahci_5v>; + }; + +With sub-nodes: + sata@f7e90000 { + compatible = "marvell,berlin2q-achi", "generic-ahci"; + reg = <0xe90000 0x1000>; + interrupts = ; + clocks = <&chip CLKID_SATA>; + #address-cells = <1>; + #size-cells = <0>; + + sata0: sata-port@0 { + reg = <0>; + phys = <&sata_phy 0>; + }; + + sata1: sata-port@1 { + reg = <1>; + phys = <&sata_phy 1>; + }; + }; Modified: vendor/device-tree/dist/Bindings/ata/exynos-sata.txt ============================================================================== --- vendor/device-tree/dist/Bindings/ata/exynos-sata.txt Sat Aug 30 22:39:15 2014 (r270863) +++ vendor/device-tree/dist/Bindings/ata/exynos-sata.txt Sun Aug 31 04:34:12 2014 (r270864) @@ -4,14 +4,27 @@ SATA nodes are defined to describe on-ch Each SATA controller should have its own node. Required properties: -- compatible : compatible list, contains "samsung,exynos5-sata" -- interrupts : -- reg : -- samsung,sata-freq : +- compatible : compatible list, contains "samsung,exynos5-sata" +- interrupts : +- reg : +- samsung,sata-freq : +- phys : Must contain exactly one entry as specified + in phy-bindings.txt +- phy-names : Must be "sata-phy" + +Optional properties: +- clocks : Must contain an entry for each entry in clock-names. +- clock-names : Shall be "sata" for the external SATA bus clock, + and "sclk_sata" for the internal controller clock. Example: - sata@ffe08000 { - compatible = "samsung,exynos5-sata"; - reg = <0xffe08000 0x1000>; - interrupts = <115>; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 04:37:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB473A9C; Sun, 31 Aug 2014 04:37:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8DBEC13B4; Sun, 31 Aug 2014 04:37:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7V4bZee088992; Sun, 31 Aug 2014 04:37:35 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7V4bZkT088991; Sun, 31 Aug 2014 04:37:35 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408310437.s7V4bZkT088991@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 31 Aug 2014 04:37:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r270865 - vendor/device-tree/ianc-b78b6b80 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 04:37:35 -0000 Author: imp Date: Sun Aug 31 04:37:35 2014 New Revision: 270865 URL: http://svnweb.freebsd.org/changeset/base/270865 Log: Copy after import of b78b6b80 from git repo Added: vendor/device-tree/ianc-b78b6b80/ - copied from r270864, vendor/device-tree/dist/ From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 04:55:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42175CC6; Sun, 31 Aug 2014 04:55:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2895715A0; Sun, 31 Aug 2014 04:55:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7V4tebf097960; Sun, 31 Aug 2014 04:55:40 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7V4tXKb097920; Sun, 31 Aug 2014 04:55:33 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408310455.s7V4tXKb097920@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 31 Aug 2014 04:55:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r270866 - in vendor/device-tree/dist: . Bindings Bindings/arm Bindings/arm/bcm Bindings/arm/cpu-enable-method Bindings/arm/exynos Bindings/arm/mrvl Bindings/arm/msm Bindings/arm/omap Bi... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 04:55:40 -0000 Author: imp Date: Sun Aug 31 04:55:32 2014 New Revision: 270866 URL: http://svnweb.freebsd.org/changeset/base/270866 Log: Import from rebasing repo at b78b6b80 (new files) Added: vendor/device-tree/dist/.gitignore (contents, props changed) vendor/device-tree/dist/Bindings/arm/adapteva.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/armada-375.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/armada-380-mpcore-soc-ctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/armada-38x.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/armada-cpu-reset.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/axxia.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/bcm/bcm21664.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/bcm/brcm,bcm11351-cpu-method (contents, props changed) vendor/device-tree/dist/Bindings/arm/bcm/kona-resetmgr.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/bcm4708.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/brcm-brcmstb.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/ccn.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/cpu-enable-method/ vendor/device-tree/dist/Bindings/arm/cpu-enable-method/marvell,berlin-smp (contents, props changed) vendor/device-tree/dist/Bindings/arm/exynos/smp-sysram.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/gic-v3.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell,dove.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/marvell,kirkwood.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/mediatek.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/mrvl/feroceon.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/msm/qcom,kpss-acc.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/msm/qcom,saw2.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/omap/crossbar.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/omap/dmm.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/omap/prcm.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/rockchip/ vendor/device-tree/dist/Bindings/arm/rockchip.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/rockchip/pmu.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/rockchip/smp-sram.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/samsung/pmu.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/spear-misc.txt (contents, props changed) vendor/device-tree/dist/Bindings/arm/sti.txt (contents, props changed) vendor/device-tree/dist/Bindings/ata/ahci-st.txt (contents, props changed) vendor/device-tree/dist/Bindings/ata/apm-xgene.txt (contents, props changed) vendor/device-tree/dist/Bindings/ata/imx-sata.txt (contents, props changed) vendor/device-tree/dist/Bindings/ata/tegra-sata.txt (contents, props changed) vendor/device-tree/dist/Bindings/bus/brcm,gisb-arb.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/arm-integrator.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/clk-palmas-clk32kg-clocks.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/clk-s5pv210-audss.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/clps711x-clock.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/exynos3250-clock.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/exynos5260-clock.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/exynos5410-clock.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/hix5hd2-clock.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/imx1-clock.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/imx21-clock.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/imx6sx-clock.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/lsi,axm5516-clks.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/moxa,moxart-clock.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/qoriq-clock.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/renesas,r8a7740-cpg-clocks.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/renesas,r8a7779-cpg-clocks.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/renesas,rz-cpg-clocks.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/rockchip,rk3188-cru.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/rockchip,rk3288-cru.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/samsung,s3c2410-clock.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/samsung,s3c2412-clock.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/samsung,s3c2443-clock.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/samsung,s5pv210-clock.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/st/ vendor/device-tree/dist/Bindings/clock/st/st,clkgen-divmux.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/st/st,clkgen-mux.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/st/st,clkgen-pll.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/st/st,clkgen-prediv.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/st/st,clkgen-vcc.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/st/st,clkgen.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/st/st,flexgen.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/st/st,quadfs.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/ti-keystone-pllctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/clock/ti/dra7-atl.txt (contents, props changed) vendor/device-tree/dist/Bindings/crypto/amd-ccp.txt (contents, props changed) vendor/device-tree/dist/Bindings/crypto/qcom-qce.txt (contents, props changed) vendor/device-tree/dist/Bindings/crypto/samsung-sss.txt (contents, props changed) vendor/device-tree/dist/Bindings/dma/fsl-edma.txt (contents, props changed) vendor/device-tree/dist/Bindings/dma/mpc512x-dma.txt (contents, props changed) vendor/device-tree/dist/Bindings/dma/nbpfaxi.txt (contents, props changed) vendor/device-tree/dist/Bindings/dma/qcom_bam_dma.txt (contents, props changed) vendor/device-tree/dist/Bindings/dma/rcar-audmapp.txt (contents, props changed) vendor/device-tree/dist/Bindings/dma/renesas,rcar-dmac.txt (contents, props changed) vendor/device-tree/dist/Bindings/dma/sirfsoc-dma.txt (contents, props changed) vendor/device-tree/dist/Bindings/dma/sun6i-dma.txt (contents, props changed) vendor/device-tree/dist/Bindings/dma/xilinx/ vendor/device-tree/dist/Bindings/dma/xilinx/xilinx_vdma.txt (contents, props changed) vendor/device-tree/dist/Bindings/drm/armada/ vendor/device-tree/dist/Bindings/drm/armada/marvell,dove-lcd.txt (contents, props changed) vendor/device-tree/dist/Bindings/drm/bridge/ vendor/device-tree/dist/Bindings/drm/bridge/ptn3460.txt (contents, props changed) vendor/device-tree/dist/Bindings/drm/i2c/ vendor/device-tree/dist/Bindings/drm/i2c/tda998x.txt (contents, props changed) vendor/device-tree/dist/Bindings/drm/msm/ vendor/device-tree/dist/Bindings/drm/msm/gpu.txt (contents, props changed) vendor/device-tree/dist/Bindings/drm/msm/hdmi.txt (contents, props changed) vendor/device-tree/dist/Bindings/drm/msm/mdp.txt (contents, props changed) vendor/device-tree/dist/Bindings/extcon/extcon-sm5502.txt (contents, props changed) vendor/device-tree/dist/Bindings/fuse/ vendor/device-tree/dist/Bindings/fuse/nvidia,tegra20-fuse.txt (contents, props changed) vendor/device-tree/dist/Bindings/gpio/cirrus,clps711x-mctrl-gpio.txt (contents, props changed) vendor/device-tree/dist/Bindings/gpio/gpio-zevio.txt (contents, props changed) vendor/device-tree/dist/Bindings/gpio/gpio-zynq.txt (contents, props changed) vendor/device-tree/dist/Bindings/gpio/snps-dwapb-gpio.txt (contents, props changed) vendor/device-tree/dist/Bindings/gpu/nvidia,gk20a.txt (contents, props changed) vendor/device-tree/dist/Bindings/gpu/st,stih4xx.txt (contents, props changed) vendor/device-tree/dist/Bindings/graph.txt (contents, props changed) vendor/device-tree/dist/Bindings/hsi/ vendor/device-tree/dist/Bindings/hsi/client-devices.txt (contents, props changed) vendor/device-tree/dist/Bindings/hsi/nokia-modem.txt (contents, props changed) vendor/device-tree/dist/Bindings/hsi/omap-ssi.txt (contents, props changed) vendor/device-tree/dist/Bindings/hwmon/ibmpowernv.txt (contents, props changed) vendor/device-tree/dist/Bindings/hwmon/pwm-fan.txt (contents, props changed) vendor/device-tree/dist/Bindings/i2c/i2c-cadence.txt (contents, props changed) vendor/device-tree/dist/Bindings/i2c/i2c-cros-ec-tunnel.txt (contents, props changed) vendor/device-tree/dist/Bindings/i2c/i2c-efm32.txt (contents, props changed) vendor/device-tree/dist/Bindings/i2c/i2c-rk3x.txt (contents, props changed) vendor/device-tree/dist/Bindings/i2c/i2c-sh_mobile.txt (contents, props changed) vendor/device-tree/dist/Bindings/i2c/i2c-sunxi-p2wi.txt (contents, props changed) vendor/device-tree/dist/Bindings/i2c/qcom,i2c-qup.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/at91_adc.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/max1027-adc.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/twl4030-madc.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/vf610-adc.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/adc/xilinx-xadc.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/proximity/ vendor/device-tree/dist/Bindings/iio/proximity/as3935.txt (contents, props changed) vendor/device-tree/dist/Bindings/iio/st-sensors.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/atmel,maxtouch.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/cap1106.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/clps711x-keypad.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/gpio-keys.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/qcom,pm8xxx-keypad.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/qcom,pm8xxx-pwrkey.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/qcom,pm8xxx-vib.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/st-keyscan.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/touchscreen/edt-ft5x06.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/touchscreen/pixcir_i2c_ts.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/touchscreen/sun4i.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/touchscreen/touchscreen.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/touchscreen/tsc2005.txt (contents, props changed) vendor/device-tree/dist/Bindings/input/touchscreen/zforce_ts.txt (contents, props changed) vendor/device-tree/dist/Bindings/interrupt-controller/allwinner,sun67i-sc-nmi.txt (contents, props changed) vendor/device-tree/dist/Bindings/interrupt-controller/atmel,aic.txt (contents, props changed) vendor/device-tree/dist/Bindings/interrupt-controller/brcm,l2-intc.txt (contents, props changed) vendor/device-tree/dist/Bindings/interrupt-controller/cirrus,clps711x-intc.txt (contents, props changed) vendor/device-tree/dist/Bindings/interrupt-controller/marvell,armada-370-xp-mpic.txt (contents, props changed) vendor/device-tree/dist/Bindings/interrupt-controller/opencores,or1k-pic.txt (contents, props changed) vendor/device-tree/dist/Bindings/iommu/iommu.txt (contents, props changed) vendor/device-tree/dist/Bindings/iommu/samsung,sysmmu.txt (contents, props changed) vendor/device-tree/dist/Bindings/iommu/ti,omap-iommu.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/atmel-isi.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/i2c/adv7604.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/i2c/mt9m111.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/img-ir-rev1.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/pxa-camera.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/rcar_vin.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/renesas,vsp1.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/samsung-s5c73m3.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/samsung-s5k6a3.txt (contents, props changed) vendor/device-tree/dist/Bindings/media/sunxi-ir.txt (contents, props changed) vendor/device-tree/dist/Bindings/memory-controllers/fsl/ vendor/device-tree/dist/Bindings/memory-controllers/fsl/ifc.txt (contents, props changed) vendor/device-tree/dist/Bindings/memory-controllers/ti-aemif.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/bcm590xx.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/bfticu.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/da9055.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/qcom,pm8xxx.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/qriox.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/s2mpa01.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/sun6i-prcm.txt (contents, props changed) vendor/device-tree/dist/Bindings/mfd/ti-keystone-devctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/misc/arm-charlcd.txt (contents, props changed) vendor/device-tree/dist/Bindings/misc/nvidia,tegra20-apbmisc.txt (contents, props changed) vendor/device-tree/dist/Bindings/mmc/moxa,moxart-mmc.txt (contents, props changed) vendor/device-tree/dist/Bindings/mmc/renesas,mmcif.txt (contents, props changed) vendor/device-tree/dist/Bindings/mmc/sdhci-msm.txt (contents, props changed) vendor/device-tree/dist/Bindings/mmc/sdhci-st.txt (contents, props changed) vendor/device-tree/dist/Bindings/mmc/socfpga-dw-mshc.txt (contents, props changed) vendor/device-tree/dist/Bindings/mmc/sunxi-mmc.txt (contents, props changed) vendor/device-tree/dist/Bindings/mmc/usdhi6rol0.txt (contents, props changed) vendor/device-tree/dist/Bindings/mtd/fsl-quadspi.txt (contents, props changed) vendor/device-tree/dist/Bindings/mtd/st-fsm.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/altera_tse.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/amd-xgbe-phy.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/amd-xgbe.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/apm-xgene-enet.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/broadcom-bcmgenet.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/broadcom-systemport.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/can/xilinx_can.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/ethernet.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/fixed-link.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/hisilicon-hix5hd2-gmac.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/ieee802154/ vendor/device-tree/dist/Bindings/net/ieee802154/at86rf230.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/ieee802154/cc2520.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/marvell-pp2.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/micrel-ksz90x1.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/micrel.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/nfc/ vendor/device-tree/dist/Bindings/net/nfc/pn544.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/nfc/st21nfca.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/nfc/st21nfcb.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/nfc/trf7970a.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/opencores-ethoc.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/samsung-sxgbe.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/sh_eth.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/socfpga-dwmac.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/via-rhine.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/wireless/ vendor/device-tree/dist/Bindings/net/wireless/brcm,bcm43xx-fmac.txt (contents, props changed) vendor/device-tree/dist/Bindings/net/wireless/ti,wl1251.txt (contents, props changed) vendor/device-tree/dist/Bindings/panel/auo,b133htn01.txt (contents, props changed) vendor/device-tree/dist/Bindings/panel/auo,b133xtn01.txt (contents, props changed) vendor/device-tree/dist/Bindings/panel/edt,et057090dhu.txt (contents, props changed) vendor/device-tree/dist/Bindings/panel/edt,et070080dh6.txt (contents, props changed) vendor/device-tree/dist/Bindings/panel/edt,etm0700g0dh6.txt (contents, props changed) vendor/device-tree/dist/Bindings/panel/foxlink,fl500wvr00-a0t.txt (contents, props changed) vendor/device-tree/dist/Bindings/panel/innolux,n116bge.txt (contents, props changed) vendor/device-tree/dist/Bindings/panel/innolux,n156bge-l21.txt (contents, props changed) vendor/device-tree/dist/Bindings/panel/lg,ld070wx3-sl01.txt (contents, props changed) vendor/device-tree/dist/Bindings/panel/lg,lh500wx1-sd03.txt (contents, props changed) vendor/device-tree/dist/Bindings/panel/lg,lp129qe.txt (contents, props changed) vendor/device-tree/dist/Bindings/panel/samsung,ld9040.txt (contents, props changed) vendor/device-tree/dist/Bindings/panel/samsung,s6e8aa0.txt (contents, props changed) vendor/device-tree/dist/Bindings/pci/fsl,imx6q-pcie.txt (contents, props changed) vendor/device-tree/dist/Bindings/pci/host-generic-pci.txt (contents, props changed) vendor/device-tree/dist/Bindings/pci/pci-rcar-gen2.txt (contents, props changed) vendor/device-tree/dist/Bindings/pci/rcar-pci.txt (contents, props changed) vendor/device-tree/dist/Bindings/pci/samsung,exynos5440-pcie.txt (contents, props changed) vendor/device-tree/dist/Bindings/pci/spear13xx-pcie.txt (contents, props changed) vendor/device-tree/dist/Bindings/pci/ti-pci.txt (contents, props changed) vendor/device-tree/dist/Bindings/phy/apm-xgene-phy.txt (contents, props changed) vendor/device-tree/dist/Bindings/phy/berlin-sata-phy.txt (contents, props changed) vendor/device-tree/dist/Bindings/phy/hix5hd2-phy.txt (contents, props changed) vendor/device-tree/dist/Bindings/phy/phy-miphy365x.txt (contents, props changed) vendor/device-tree/dist/Bindings/phy/qcom-apq8064-sata-phy.txt (contents, props changed) vendor/device-tree/dist/Bindings/phy/qcom-ipq806x-sata-phy.txt (contents, props changed) vendor/device-tree/dist/Bindings/phy/st-spear-miphy.txt (contents, props changed) vendor/device-tree/dist/Bindings/phy/sun4i-usb-phy.txt (contents, props changed) vendor/device-tree/dist/Bindings/phy/ti-phy.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/brcm,bcm11351-pinctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/fsl,imx6sx-pinctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/marvell,armada-375-pinctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/marvell,armada-38x-pinctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/marvell,orion-pinctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/nvidia,tegra124-xusb-padctl.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/qcom,apq8064-pinctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/qcom,ipq8064-pinctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/pinctrl/qcom,msm8960-pinctrl.txt (contents, props changed) vendor/device-tree/dist/Bindings/power/reset/ vendor/device-tree/dist/Bindings/power/reset/keystone-reset.txt (contents, props changed) vendor/device-tree/dist/Bindings/power/rx51-battery.txt (contents, props changed) vendor/device-tree/dist/Bindings/power_supply/axxia-reset.txt (contents, props changed) vendor/device-tree/dist/Bindings/powerpc/4xx/akebono.txt (contents, props changed) vendor/device-tree/dist/Bindings/powerpc/4xx/hsta.txt (contents, props changed) vendor/device-tree/dist/Bindings/powerpc/fsl/ccf.txt (contents, props changed) vendor/device-tree/dist/Bindings/powerpc/fsl/l2cache.txt (contents, props changed) vendor/device-tree/dist/Bindings/powerpc/fsl/mem-ctrlr.txt (contents, props changed) vendor/device-tree/dist/Bindings/pwm/bcm-kona-pwm.txt (contents, props changed) vendor/device-tree/dist/Bindings/pwm/cirrus,clps711x-pwm.txt (contents, props changed) vendor/device-tree/dist/Bindings/pwm/pwm-fsl-ftm.txt (contents, props changed) vendor/device-tree/dist/Bindings/pwm/pwm-rockchip.txt (contents, props changed) vendor/device-tree/dist/Bindings/pwm/pwm-st.txt (contents, props changed) vendor/device-tree/dist/Bindings/regulator/ltc3589.txt (contents, props changed) vendor/device-tree/dist/Bindings/regulator/pbias-regulator.txt (contents, props changed) vendor/device-tree/dist/Bindings/regulator/tps65218.txt (contents, props changed) vendor/device-tree/dist/Bindings/reserved-memory/ vendor/device-tree/dist/Bindings/reserved-memory/reserved-memory.txt (contents, props changed) vendor/device-tree/dist/Bindings/reset/allwinner,sunxi-clock-reset.txt (contents, props changed) vendor/device-tree/dist/Bindings/reset/sirf,rstc.txt (contents, props changed) vendor/device-tree/dist/Bindings/reset/socfpga-reset.txt (contents, props changed) vendor/device-tree/dist/Bindings/reset/st,sti-powerdown.txt (contents, props changed) vendor/device-tree/dist/Bindings/reset/st,sti-softreset.txt (contents, props changed) vendor/device-tree/dist/Bindings/rtc/xgene-rtc.txt (contents, props changed) vendor/device-tree/dist/Bindings/serial/cdns,uart.txt (contents, props changed) vendor/device-tree/dist/Bindings/serial/maxim,max310x.txt (contents, props changed) vendor/device-tree/dist/Bindings/serial/nxp,sc16is7xx.txt (contents, props changed) vendor/device-tree/dist/Bindings/soc/ vendor/device-tree/dist/Bindings/soc/qcom/ vendor/device-tree/dist/Bindings/soc/qcom/qcom,gsbi.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/alc5623.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/armada-370db-audio.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/cs4265.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/cs42l56.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/cs42xx8.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/da9055.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/eukrea-tlv320.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/fsl,asrc.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/max98095.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/nokia,rx51.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/nvidia,tegra30-hda.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/pcm512x.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/renesas,rsnd.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/rockchip-i2s.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/samsung,odroidx2-max98090.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/sirf-audio-codec.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/sirf-audio-port.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/sirf-audio.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/sirf-usp.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/snow.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/st,sta350.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/tas2552.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/tdm-slot.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/tlv320aic31xx.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/tlv320aic32x4.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/widgets.txt (contents, props changed) vendor/device-tree/dist/Bindings/sound/wm8904.txt (contents, props changed) vendor/device-tree/dist/Bindings/spi/qcom,spi-qup.txt (contents, props changed) vendor/device-tree/dist/Bindings/spi/snps,dw-apb-ssi.txt (contents, props changed) vendor/device-tree/dist/Bindings/spi/spi-cadence.txt (contents, props changed) vendor/device-tree/dist/Bindings/spi/spi-dw.txt (contents, props changed) vendor/device-tree/dist/Bindings/spi/spi-rockchip.txt (contents, props changed) vendor/device-tree/dist/Bindings/spi/spi-rspi.txt (contents, props changed) vendor/device-tree/dist/Bindings/spi/spi-sun4i.txt (contents, props changed) vendor/device-tree/dist/Bindings/spi/spi-sun6i.txt (contents, props changed) vendor/device-tree/dist/Bindings/spi/spi-xtensa-xtfpga.txt (contents, props changed) vendor/device-tree/dist/Bindings/spmi/ vendor/device-tree/dist/Bindings/spmi/qcom,spmi-pmic-arb.txt (contents, props changed) vendor/device-tree/dist/Bindings/spmi/spmi.txt (contents, props changed) vendor/device-tree/dist/Bindings/staging/imx-drm/hdmi.txt (contents, props changed) vendor/device-tree/dist/Bindings/thermal/st-thermal.txt (contents, props changed) vendor/device-tree/dist/Bindings/timer/cirrus,clps711x-timer.txt (contents, props changed) vendor/device-tree/dist/Bindings/timer/energymicro,efm32-timer.txt (contents, props changed) vendor/device-tree/dist/Bindings/timer/fsl,ftm-timer.txt (contents, props changed) vendor/device-tree/dist/Bindings/timer/mediatek,mtk-timer.txt (contents, props changed) vendor/device-tree/dist/Bindings/timer/renesas,cmt.txt (contents, props changed) vendor/device-tree/dist/Bindings/timer/renesas,mtu2.txt (contents, props changed) vendor/device-tree/dist/Bindings/timer/renesas,tmu.txt (contents, props changed) vendor/device-tree/dist/Bindings/timer/ti,keystone-timer.txt (contents, props changed) vendor/device-tree/dist/Bindings/usb/ci-hdrc-qcom.txt (contents, props changed) vendor/device-tree/dist/Bindings/usb/ci-hdrc-zevio.txt (contents, props changed) vendor/device-tree/dist/Bindings/usb/usb-ohci.txt (contents, props changed) vendor/device-tree/dist/Bindings/usb/usb-uhci.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/analog-tv-connector.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/arm,pl11x.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/backlight/gpio-backlight.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/cirrus,clps711x-fb.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/dvi-connector.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/exynos_dsim.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/hdmi-connector.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/lgphilips,lb035q02.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/panel-dpi.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/panel-dsi-cm.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/sharp,ls037v7dw01.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/sony,acx565akm.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/ti,omap-dss.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/ti,omap2-dss.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/ti,omap3-dss.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/ti,omap4-dss.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/ti,omap5-dss.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/ti,tfp410.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/ti,tpd12s015.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/toppoly,td028ttec1.txt (contents, props changed) vendor/device-tree/dist/Bindings/video/tpo,td043mtea1.txt (contents, props changed) vendor/device-tree/dist/Bindings/watchdog/of-xilinx-wdt.txt (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clk/ti-dra7-atl.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/at91.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/bcm21664.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/bcm281xx.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/berlin2.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/berlin2q.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/clps711x-clock.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/exynos-audss-clk.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/exynos3250.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/exynos5260-clk.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/exynos5410.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/hip04-clock.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/hix5hd2-clock.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/imx1-clock.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/imx21-clock.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/imx27-clock.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/imx6qdl-clock.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/imx6sx-clock.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/lsi,axm5516-clks.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-apq8084.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-ipq806x.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/qcom,mmcc-apq8084.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/r7s72100-clock.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/r8a7779-clock.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/rk3066a-cru.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/rk3188-cru-common.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/rk3188-cru.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/rk3288-cru.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/s3c2410.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/s3c2412.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/s3c2443.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/s5pv210-audss.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/s5pv210.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/stih415-clks.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/clock/stih416-clks.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/dma/nbpfaxi.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/mfd/palmas.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/phy/ vendor/device-tree/dist/include/dt-bindings/phy/phy-miphy365x.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/pinctrl/pinctrl-tegra-xusb.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/reset-controller/ vendor/device-tree/dist/include/dt-bindings/reset-controller/stih415-resets.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/reset-controller/stih416-resets.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/reset/altr,rst-mgr.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/reset/qcom,gcc-apq8084.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/reset/qcom,gcc-ipq806x.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/reset/qcom,mmcc-apq8084.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/soc/ vendor/device-tree/dist/include/dt-bindings/soc/qcom,gsbi.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/sound/tlv320aic31xx-micbias.h (contents, props changed) vendor/device-tree/dist/include/dt-bindings/spmi/ vendor/device-tree/dist/include/dt-bindings/spmi/spmi.h (contents, props changed) vendor/device-tree/dist/src/arm/am335x-pepper.dts (contents, props changed) vendor/device-tree/dist/src/arm/am3517-craneboard.dts (contents, props changed) vendor/device-tree/dist/src/arm/am437x-gp-evm.dts (contents, props changed) vendor/device-tree/dist/src/arm/am437x-sk-evm.dts (contents, props changed) vendor/device-tree/dist/src/arm/armada-375-db.dts (contents, props changed) vendor/device-tree/dist/src/arm/armada-375.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/armada-380.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/armada-385-db.dts (contents, props changed) vendor/device-tree/dist/src/arm/armada-385-rd.dts (contents, props changed) vendor/device-tree/dist/src/arm/armada-385.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/armada-38x.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/armada-xp-lenovo-ix4-300d.dts (contents, props changed) vendor/device-tree/dist/src/arm/at91sam9261.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/at91sam9261ek.dts (contents, props changed) vendor/device-tree/dist/src/arm/at91sam9rl.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/at91sam9rlek.dts (contents, props changed) vendor/device-tree/dist/src/arm/at91sam9x5_can.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/at91sam9x5_isi.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/at91sam9x5_lcd.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/axm5516-amarillo.dts (contents, props changed) vendor/device-tree/dist/src/arm/axm5516-cpus.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/axm55xx.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/bcm21664-garnet.dts (contents, props changed) vendor/device-tree/dist/src/arm/bcm21664.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/bcm4708-netgear-r6250.dts (contents, props changed) vendor/device-tree/dist/src/arm/bcm4708.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/bcm5301x.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/bcm59056.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/bcm7445-bcm97445svmb.dts (contents, props changed) vendor/device-tree/dist/src/arm/bcm7445.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/berlin2q-marvell-dmp.dts (contents, props changed) vendor/device-tree/dist/src/arm/berlin2q.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/cros-ec-keyboard.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/dove-cubox-es.dts (contents, props changed) vendor/device-tree/dist/src/arm/dra72-evm.dts (contents, props changed) vendor/device-tree/dist/src/arm/dra72x.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/dra74x.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/exynos3250-pinctrl.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/exynos3250.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/exynos4412-odroid-common.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/exynos4412-odroidu3.dts (contents, props changed) vendor/device-tree/dist/src/arm/exynos4412-odroidx2.dts (contents, props changed) vendor/device-tree/dist/src/arm/exynos5260-pinctrl.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/exynos5260-xyref5260.dts (contents, props changed) vendor/device-tree/dist/src/arm/exynos5260.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/exynos5410-smdk5410.dts (contents, props changed) vendor/device-tree/dist/src/arm/exynos5410.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/exynos5420-peach-pit.dts (contents, props changed) vendor/device-tree/dist/src/arm/exynos5800-peach-pi.dts (contents, props changed) vendor/device-tree/dist/src/arm/exynos5800.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/hisi-x5hd2-dkb.dts (contents, props changed) vendor/device-tree/dist/src/arm/hisi-x5hd2.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx25-eukrea-cpuimx25.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx25-eukrea-mbimxsd25-baseboard.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx25-pinfunc.h (contents, props changed) vendor/device-tree/dist/src/arm/imx27-eukrea-cpuimx27.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx27-eukrea-mbimxsd27-baseboard.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx27-phytec-phycard-s-som.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx27-phytec-phycore-som.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx27-pinfunc.h (contents, props changed) vendor/device-tree/dist/src/arm/imx28-duckbill.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx28-eukrea-mbmx283lc.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx28-eukrea-mbmx287lc.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx28-eukrea-mbmx28lc.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx28-m28.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx35-eukrea-cpuimx35.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx35-eukrea-mbimxsd35-baseboard.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx35-pdk.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx35.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx50-evk.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx50-pinfunc.h (contents, props changed) vendor/device-tree/dist/src/arm/imx50.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx51-digi-connectcore-jsk.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx51-digi-connectcore-som.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx51-eukrea-cpuimx51.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx51-eukrea-mbimxsd51-baseboard.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx53-m53.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx53-qsb-common.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx53-qsrb.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx53-tx53-x03x.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx53-tx53-x13x.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx53-voipac-bsb.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx53-voipac-dmm-668.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-aristainetos_4.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-aristainetos_7.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-dfi-fs700-m60.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-gw51xx.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-gw52xx.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-gw53xx.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-gw54xx.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-nitrogen6x.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-phytec-pbab01.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-phytec-pfla02.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-rex-basic.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-riotboard.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-sabrelite.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-tx6dl-comtft.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-tx6u-801x.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-tx6u-811x.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6dl-wandboard-revb1.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-cm-fx6.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-dfi-fs700-m60.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-dmo-edmqmx6.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-gk802.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-gw51xx.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-gw52xx.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-gw53xx.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-gw5400-a.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-gw54xx.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-nitrogen6x.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-rex-pro.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-tx6q-1010-comtft.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-tx6q-1010.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-tx6q-1020-comtft.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-tx6q-1020.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-tx6q-1110.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6q-wandboard-revb1.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-aristainetos.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-dfi-fs700-m60.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-gw51xx.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-gw52xx.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-gw53xx.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-gw54xx.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-nitrogen6x.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-phytec-pbab01.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-phytec-pfla02.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-rex.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-sabrelite.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-tx6.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-wandboard-revb1.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6qdl-wandboard-revc1.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/imx6sx-pinfunc.h (contents, props changed) vendor/device-tree/dist/src/arm/imx6sx-sdb.dts (contents, props changed) vendor/device-tree/dist/src/arm/imx6sx.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/k2e-clocks.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/k2e-evm.dts (contents, props changed) vendor/device-tree/dist/src/arm/k2e.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/k2hk-clocks.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/k2hk.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/k2l-clocks.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/k2l-evm.dts (contents, props changed) vendor/device-tree/dist/src/arm/k2l.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-b3.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-d2net.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-ds109.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-ds110jv10.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-ds111.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-ds112.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-ds209.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-ds210.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-ds212.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-ds212j.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-ds409.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-ds409slim.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-ds411.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-ds411j.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-ds411slim.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-km_common.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-km_fixedeth.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-net2big.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-net5big.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-netxbig.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-nsa320.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-nsa3x0-common.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-openrd-base.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-openrd-client.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-openrd-ultimate.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-openrd.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-rd88f6192.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-rd88f6281-a0.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-rd88f6281-a1.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-rd88f6281.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-rs212.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-rs409.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-rs411.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-synology.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-t5325.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-ts419-6281.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-ts419-6282.dts (contents, props changed) vendor/device-tree/dist/src/arm/kirkwood-ts419.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/mt6589-aquaris5.dts (contents, props changed) vendor/device-tree/dist/src/arm/mt6589.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap-gpmc-smsc9221.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap2420-clocks.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap2430-clocks.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap24xx-clocks.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap3-beagle-xm-ab.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap3-cm-t3517.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap3-cm-t3530.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap3-cm-t3x.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap3-lilly-a83x.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap3-lilly-dbb056.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-alto35-common.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-alto35.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-base.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-chestnut43-common.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-chestnut43.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-common-dvi.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-common-lcd35.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-common-lcd43.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-common-peripherals.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-gallop43-common.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-gallop43.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-palo43-common.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-palo43.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-storm-alto35.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-storm-chestnut43.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-storm-gallop43.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-storm-palo43.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-storm-summit.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-storm.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-summit-common.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap3-overo-summit.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap3-panel-sharp-ls037v7dw01.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap3-sbc-t3517.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap3-sbc-t3530.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap4-duovero-parlor.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap4-duovero.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap4-var-dvk-om44.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap4-var-om44customboard.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap4-var-som-om44-wlan.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap4-var-som-om44.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/omap4-var-stk-om44.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap5-cm-t54.dts (contents, props changed) vendor/device-tree/dist/src/arm/omap5-sbc-t54.dts (contents, props changed) vendor/device-tree/dist/src/arm/orion5x-lacie-d2-network.dts (contents, props changed) vendor/device-tree/dist/src/arm/orion5x-maxtor-shared-storage-2.dts (contents, props changed) vendor/device-tree/dist/src/arm/orion5x-mv88f5182.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/orion5x-rd88f5182-nas.dts (contents, props changed) vendor/device-tree/dist/src/arm/qcom-apq8064-ifc6410.dts (contents, props changed) vendor/device-tree/dist/src/arm/qcom-apq8064-v2.0.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/qcom-apq8064.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/qcom-apq8084-mtp.dts (contents, props changed) vendor/device-tree/dist/src/arm/qcom-apq8084.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/qcom-msm8660.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/qcom-msm8960.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/r8a7791-henninger.dts (contents, props changed) vendor/device-tree/dist/src/arm/rk3288-evb-act8846.dts (contents, props changed) vendor/device-tree/dist/src/arm/rk3288-evb-rk808.dts (contents, props changed) vendor/device-tree/dist/src/arm/rk3288-evb.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/rk3288.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/s5pv210-aquila.dts (contents, props changed) vendor/device-tree/dist/src/arm/s5pv210-goni.dts (contents, props changed) vendor/device-tree/dist/src/arm/s5pv210-pinctrl.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/s5pv210-smdkc110.dts (contents, props changed) vendor/device-tree/dist/src/arm/s5pv210-smdkv210.dts (contents, props changed) vendor/device-tree/dist/src/arm/s5pv210-torbreck.dts (contents, props changed) vendor/device-tree/dist/src/arm/s5pv210.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/socfpga_cyclone5_socrates.dts (contents, props changed) vendor/device-tree/dist/src/arm/ste-href-ab8500.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/ste-href-ab8505.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/stih407-b2120.dts (contents, props changed) vendor/device-tree/dist/src/arm/stih407-clock.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/stih407-pinctrl.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/stih407.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/stih416-b2020e.dts (contents, props changed) vendor/device-tree/dist/src/arm/stih41x-b2020x.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/sun4i-a10-ba10-tvbox.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun4i-a10-inet97fv2.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun4i-a10-olinuxino-lime.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun4i-a10-pcduino.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun5i-a10s-r7-tv-dongle.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun6i-a31-app4-evb1.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun6i-a31-hummingbird.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun6i-a31-m9.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun7i-a20-i12-tvbox.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun7i-a20-pcduino3.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun8i-a23-ippo-q8h-v5.dts (contents, props changed) vendor/device-tree/dist/src/arm/sun8i-a23.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/sunxi-common-regulators.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/tegra114-roth.dts (contents, props changed) vendor/device-tree/dist/src/arm/tegra114-tn7.dts (contents, props changed) vendor/device-tree/dist/src/arm/tegra124-jetson-tk1.dts (contents, props changed) vendor/device-tree/dist/src/arm/tegra30-apalis-eval.dts (contents, props changed) vendor/device-tree/dist/src/arm/tegra30-apalis.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/tegra30-colibri-eval-v3.dts (contents, props changed) vendor/device-tree/dist/src/arm/tegra30-colibri.dtsi (contents, props changed) vendor/device-tree/dist/src/arm/vf610-colibri.dts (contents, props changed) vendor/device-tree/dist/src/arm/zynq-parallella.dts (contents, props changed) vendor/device-tree/dist/src/powerpc/akebono.dts (contents, props changed) vendor/device-tree/dist/src/powerpc/bsc9132qds.dts (contents, props changed) vendor/device-tree/dist/src/powerpc/bsc9132qds.dtsi (contents, props changed) vendor/device-tree/dist/src/powerpc/fsl/bsc9132si-post.dtsi (contents, props changed) vendor/device-tree/dist/src/powerpc/fsl/bsc9132si-pre.dtsi (contents, props changed) vendor/device-tree/dist/src/powerpc/fsl/t1040si-post.dtsi (contents, props changed) vendor/device-tree/dist/src/powerpc/fsl/t1042si-post.dtsi (contents, props changed) vendor/device-tree/dist/src/powerpc/fsl/t104xsi-pre.dtsi (contents, props changed) vendor/device-tree/dist/src/powerpc/fsl/t2080si-post.dtsi (contents, props changed) vendor/device-tree/dist/src/powerpc/fsl/t2081si-post.dtsi (contents, props changed) vendor/device-tree/dist/src/powerpc/fsl/t208xsi-pre.dtsi (contents, props changed) vendor/device-tree/dist/src/powerpc/kmcoge4.dts (contents, props changed) vendor/device-tree/dist/src/powerpc/oca4080.dts (contents, props changed) vendor/device-tree/dist/src/powerpc/t1040qds.dts (contents, props changed) vendor/device-tree/dist/src/powerpc/t1042qds.dts (contents, props changed) vendor/device-tree/dist/src/powerpc/t104xqds.dtsi (contents, props changed) vendor/device-tree/dist/src/powerpc/t2080qds.dts (contents, props changed) vendor/device-tree/dist/src/powerpc/t2080rdb.dts (contents, props changed) vendor/device-tree/dist/src/powerpc/t2081qds.dts (contents, props changed) vendor/device-tree/dist/src/powerpc/t208xqds.dtsi (contents, props changed) vendor/device-tree/dist/src/powerpc/t208xrdb.dtsi (contents, props changed) vendor/device-tree/dist/src/powerpc/t4240rdb.dts (contents, props changed) vendor/device-tree/dist/src/xtensa/kc705.dts (contents, props changed) vendor/device-tree/dist/src/xtensa/xtfpga-flash-128m.dtsi (contents, props changed) vendor/device-tree/dist/testcase-data/testcases.dts (contents, props changed) vendor/device-tree/dist/testcase-data/tests-platform.dtsi (contents, props changed) Added: vendor/device-tree/dist/.gitignore ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/.gitignore Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,4 @@ +.* +!.gitignore +*.dtb + Added: vendor/device-tree/dist/Bindings/arm/adapteva.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/adapteva.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,7 @@ +Adapteva Platforms Device Tree Bindings +--------------------------------------- + +Parallella board + +Required root node properties: + - compatible = "adapteva,parallella"; Added: vendor/device-tree/dist/Bindings/arm/armada-375.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/armada-375.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,9 @@ +Marvell Armada 375 Platforms Device Tree Bindings +------------------------------------------------- + +Boards with a SoC of the Marvell Armada 375 family shall have the +following property: + +Required root node property: + +compatible: must contain "marvell,armada375" Added: vendor/device-tree/dist/Bindings/arm/armada-380-mpcore-soc-ctrl.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/armada-380-mpcore-soc-ctrl.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,14 @@ +Marvell Armada 38x CA9 MPcore SoC Controller +============================================ + +Required properties: + +- compatible: Should be "marvell,armada-380-mpcore-soc-ctrl". + +- reg: should be the register base and length as documented in the + datasheet for the CA9 MPcore SoC Control registers + +mpcore-soc-ctrl@20d20 { + compatible = "marvell,armada-380-mpcore-soc-ctrl"; + reg = <0x20d20 0x6c>; +}; Added: vendor/device-tree/dist/Bindings/arm/armada-38x.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/armada-38x.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,20 @@ +Marvell Armada 38x Platforms Device Tree Bindings +------------------------------------------------- + +Boards with a SoC of the Marvell Armada 38x family shall have the +following property: + +Required root node property: + + - compatible: must contain "marvell,armada380" + +In addition, boards using the Marvell Armada 385 SoC shall have the +following property before the previous one: + +Required root node property: + +compatible: must contain "marvell,armada385" + +Example: + +compatible = "marvell,a385-rd", "marvell,armada385", "marvell,armada380"; Added: vendor/device-tree/dist/Bindings/arm/armada-cpu-reset.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/armada-cpu-reset.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,14 @@ +Marvell Armada CPU reset controller +=================================== + +Required properties: + +- compatible: Should be "marvell,armada-370-cpu-reset". + +- reg: should be register base and length as documented in the + datasheet for the CPU reset registers + +cpurst: cpurst@20800 { + compatible = "marvell,armada-370-cpu-reset"; + reg = <0x20800 0x20>; +}; Added: vendor/device-tree/dist/Bindings/arm/axxia.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/axxia.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,12 @@ +Axxia AXM55xx device tree bindings + +Boards using the AXM55xx SoC need to have the following properties: + +Required root node property: + + - compatible = "lsi,axm5516" + +Boards: + + LSI AXM5516 Validation board (Amarillo) + compatible = "lsi,axm5516-amarillo", "lsi,axm5516" Added: vendor/device-tree/dist/Bindings/arm/bcm/bcm21664.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/bcm/bcm21664.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,15 @@ +Broadcom BCM21664 device tree bindings +-------------------------------------- + +This document describes the device tree bindings for boards with the BCM21664 +SoC. + +Required root node property: + - compatible: brcm,bcm21664 + +Example: + / { + model = "BCM21664 SoC"; + compatible = "brcm,bcm21664"; + [...] + } Added: vendor/device-tree/dist/Bindings/arm/bcm/brcm,bcm11351-cpu-method ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/bcm/brcm,bcm11351-cpu-method Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,36 @@ +Broadcom Kona Family CPU Enable Method +-------------------------------------- +This binding defines the enable method used for starting secondary +CPUs in the following Broadcom SoCs: + BCM11130, BCM11140, BCM11351, BCM28145, BCM28155, BCM21664 + +The enable method is specified by defining the following required +properties in the "cpus" device tree node: + - enable-method = "brcm,bcm11351-cpu-method"; + - secondary-boot-reg = <...>; + +The secondary-boot-reg property is a u32 value that specifies the +physical address of the register used to request the ROM holding pen +code release a secondary CPU. The value written to the register is +formed by encoding the target CPU id into the low bits of the +physical start address it should jump to. + +Example: + cpus { + #address-cells = <1>; + #size-cells = <0>; + enable-method = "brcm,bcm11351-cpu-method"; + secondary-boot-reg = <0x3500417c>; + + cpu0: cpu@0 { + device_type = "cpu"; + compatible = "arm,cortex-a9"; + reg = <0>; + }; + + cpu1: cpu@1 { + device_type = "cpu"; + compatible = "arm,cortex-a9"; + reg = <1>; + }; + }; Added: vendor/device-tree/dist/Bindings/arm/bcm/kona-resetmgr.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/bcm/kona-resetmgr.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,14 @@ +Broadcom Kona Family Reset Manager +---------------------------------- + +The reset manager is used on the Broadcom BCM21664 SoC. + +Required properties: + - compatible: brcm,bcm21664-resetmgr + - reg: memory address & range + +Example: + brcm,resetmgr@35001f00 { + compatible = "brcm,bcm21664-resetmgr"; + reg = <0x35001f00 0x24>; + }; Added: vendor/device-tree/dist/Bindings/arm/bcm4708.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/bcm4708.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,8 @@ +Broadcom BCM4708 device tree bindings +------------------------------------------- + +Boards with the BCM4708 SoC shall have the following properties: + +Required root node property: + +compatible = "brcm,bcm4708"; Added: vendor/device-tree/dist/Bindings/arm/brcm-brcmstb.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/brcm-brcmstb.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,95 @@ +ARM Broadcom STB platforms Device Tree Bindings +----------------------------------------------- +Boards with Broadcom Brahma15 ARM-based BCMxxxx (generally BCM7xxx variants) +SoC shall have the following DT organization: + +Required root node properties: + - compatible: "brcm,bcm", "brcm,brcmstb" + +example: +/ { + #address-cells = <2>; + #size-cells = <2>; + model = "Broadcom STB (bcm7445)"; + compatible = "brcm,bcm7445", "brcm,brcmstb"; + +Further, syscon nodes that map platform-specific registers used for general +system control is required: + + - compatible: "brcm,bcm-sun-top-ctrl", "syscon" + - compatible: "brcm,bcm-hif-cpubiuctrl", "syscon" + - compatible: "brcm,bcm-hif-continuation", "syscon" + +example: + rdb { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges = <0 0x00 0xf0000000 0x1000000>; + + sun_top_ctrl: syscon@404000 { + compatible = "brcm,bcm7445-sun-top-ctrl", "syscon"; + reg = <0x404000 0x51c>; + }; + + hif_cpubiuctrl: syscon@3e2400 { + compatible = "brcm,bcm7445-hif-cpubiuctrl", "syscon"; + reg = <0x3e2400 0x5b4>; + }; + + hif_continuation: syscon@452000 { + compatible = "brcm,bcm7445-hif-continuation", "syscon"; + reg = <0x452000 0x100>; + }; + }; + +Lastly, nodes that allow for support of SMP initialization and reboot are +required: + +smpboot +------- +Required properties: + + - compatible + The string "brcm,brcmstb-smpboot". + + - syscon-cpu + A phandle / integer array property which lets the BSP know the location + of certain CPU power-on registers. + + The layout of the property is as follows: + o a phandle to the "hif_cpubiuctrl" syscon node + o offset to the base CPU power zone register + o offset to the base CPU reset register + + - syscon-cont + A phandle pointing to the syscon node which describes the CPU boot + continuation registers. + o a phandle to the "hif_continuation" syscon node + +example: + smpboot { + compatible = "brcm,brcmstb-smpboot"; + syscon-cpu = <&hif_cpubiuctrl 0x88 0x178>; + syscon-cont = <&hif_continuation>; + }; + +reboot +------- +Required properties + + - compatible + The string property "brcm,brcmstb-reboot". + + - syscon + A phandle / integer array that points to the syscon node which describes + the general system reset registers. + o a phandle to "sun_top_ctrl" + o offset to the "reset source enable" register + o offset to the "software master reset" register + +example: + reboot { + compatible = "brcm,brcmstb-reboot"; + syscon = <&sun_top_ctrl 0x304 0x308>; + }; Added: vendor/device-tree/dist/Bindings/arm/ccn.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/ccn.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,21 @@ +* ARM CCN (Cache Coherent Network) + +Required properties: + +- compatible: (standard compatible string) should be one of: + "arm,ccn-504" + "arm,ccn-508" + +- reg: (standard registers property) physical address and size + (16MB) of the configuration registers block + +- interrupts: (standard interrupt property) single interrupt + generated by the control block + +Example: + + ccn@0x2000000000 { + compatible = "arm,ccn-504"; + reg = <0x20 0x00000000 0 0x1000000>; + interrupts = <0 181 4>; + }; Added: vendor/device-tree/dist/Bindings/arm/cpu-enable-method/marvell,berlin-smp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/cpu-enable-method/marvell,berlin-smp Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,41 @@ +======================================================== +Secondary CPU enable-method "marvell,berlin-smp" binding +======================================================== + +This document describes the "marvell,berlin-smp" method for enabling secondary +CPUs. To apply to all CPUs, a single "marvell,berlin-smp" enable method should +be defined in the "cpus" node. + +Enable method name: "marvell,berlin-smp" +Compatible machines: "marvell,berlin2" and "marvell,berlin2q" +Compatible CPUs: "marvell,pj4b" and "arm,cortex-a9" +Related properties: (none) + +Note: +This enable method needs valid nodes compatible with "arm,cortex-a9-scu" and +"marvell,berlin-cpu-ctrl"[1]. + +Example: + + cpus { + #address-cells = <1>; + #size-cells = <0>; + enable-method = "marvell,berlin-smp"; + + cpu@0 { + compatible = "marvell,pj4b"; + device_type = "cpu"; + next-level-cache = <&l2>; + reg = <0>; + }; + + cpu@1 { + compatible = "marvell,pj4b"; + device_type = "cpu"; + next-level-cache = <&l2>; + reg = <1>; + }; + }; + +-- +[1] arm/marvell,berlin.txt Added: vendor/device-tree/dist/Bindings/arm/exynos/smp-sysram.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/exynos/smp-sysram.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,38 @@ +Samsung Exynos SYSRAM for SMP bringup: +------------------------------------ + +Samsung SMP-capable Exynos SoCs use part of the SYSRAM for the bringup +of the secondary cores. Once the core gets powered up it executes the +code that is residing at some specific location of the SYSRAM. + +Therefore reserved section sub-nodes have to be added to the mmio-sram +declaration. These nodes are of two types depending upon secure or +non-secure execution environment. + +Required sub-node properties: +- compatible : depending upon boot mode, should be + "samsung,exynos4210-sysram" : for Secure SYSRAM + "samsung,exynos4210-sysram-ns" : for Non-secure SYSRAM + +The rest of the properties should follow the generic mmio-sram discription +found in ../../misc/sysram.txt + +Example: + + sysram@02020000 { + compatible = "mmio-sram"; + reg = <0x02020000 0x54000>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0x02020000 0x54000>; + + smp-sysram@0 { + compatible = "samsung,exynos4210-sysram"; + reg = <0x0 0x1000>; + }; + + smp-sysram@53000 { + compatible = "samsung,exynos4210-sysram-ns"; + reg = <0x53000 0x1000>; + }; + }; Added: vendor/device-tree/dist/Bindings/arm/gic-v3.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/gic-v3.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,79 @@ +* ARM Generic Interrupt Controller, version 3 + +AArch64 SMP cores are often associated with a GICv3, providing Private +Peripheral Interrupts (PPI), Shared Peripheral Interrupts (SPI), +Software Generated Interrupts (SGI), and Locality-specific Peripheral +Interrupts (LPI). + +Main node required properties: + +- compatible : should at least contain "arm,gic-v3". +- interrupt-controller : Identifies the node as an interrupt controller +- #interrupt-cells : Specifies the number of cells needed to encode an + interrupt source. Must be a single cell with a value of at least 3. + + The 1st cell is the interrupt type; 0 for SPI interrupts, 1 for PPI + interrupts. Other values are reserved for future use. + + The 2nd cell contains the interrupt number for the interrupt type. + SPI interrupts are in the range [0-987]. PPI interrupts are in the + range [0-15]. + + The 3rd cell is the flags, encoded as follows: + bits[3:0] trigger type and level flags. + 1 = edge triggered + 4 = level triggered + + Cells 4 and beyond are reserved for future use. When the 1st cell + has a value of 0 or 1, cells 4 and beyond act as padding, and may be + ignored. It is recommended that padding cells have a value of 0. + +- reg : Specifies base physical address(s) and size of the GIC + registers, in the following order: + - GIC Distributor interface (GICD) + - GIC Redistributors (GICR), one range per redistributor region + - GIC CPU interface (GICC) + - GIC Hypervisor interface (GICH) + - GIC Virtual CPU interface (GICV) + + GICC, GICH and GICV are optional. + +- interrupts : Interrupt source of the VGIC maintenance interrupt. + +Optional + +- redistributor-stride : If using padding pages, specifies the stride + of consecutive redistributors. Must be a multiple of 64kB. + +- #redistributor-regions: The number of independent contiguous regions + occupied by the redistributors. Required if more than one such + region is present. + +Examples: + + gic: interrupt-controller@2cf00000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <3>; + interrupt-controller; + reg = <0x0 0x2f000000 0 0x10000>, // GICD + <0x0 0x2f100000 0 0x200000>, // GICR + <0x0 0x2c000000 0 0x2000>, // GICC + <0x0 0x2c010000 0 0x2000>, // GICH + <0x0 0x2c020000 0 0x2000>; // GICV + interrupts = <1 9 4>; + }; + + gic: interrupt-controller@2c010000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <3>; + interrupt-controller; + redistributor-stride = <0x0 0x40000>; // 256kB stride + #redistributor-regions = <2>; + reg = <0x0 0x2c010000 0 0x10000>, // GICD + <0x0 0x2d000000 0 0x800000>, // GICR 1: CPUs 0-31 + <0x0 0x2e000000 0 0x800000>; // GICR 2: CPUs 32-63 + <0x0 0x2c040000 0 0x2000>, // GICC + <0x0 0x2c060000 0 0x2000>, // GICH + <0x0 0x2c080000 0 0x2000>; // GICV + interrupts = <1 9 4>; + }; Added: vendor/device-tree/dist/Bindings/arm/marvell,dove.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/marvell,dove.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,22 @@ +Marvell Dove Platforms Device Tree Bindings +----------------------------------------------- + +Boards with a Marvell Dove SoC shall have the following properties: + +Required root node property: +- compatible: must contain "marvell,dove"; + +* Global Configuration registers + +Global Configuration registers of Dove SoC are shared by a syscon node. + +Required properties: +- compatible: must contain "marvell,dove-global-config" and "syscon". +- reg: base address and size of the Global Configuration registers. + +Example: + +gconf: global-config@e802c { + compatible = "marvell,dove-global-config", "syscon"; + reg = <0xe802c 0x14>; +}; Added: vendor/device-tree/dist/Bindings/arm/marvell,kirkwood.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/marvell,kirkwood.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,97 @@ +Marvell Kirkwood SoC Family Device Tree Bindings +------------------------------------------------ + +Boards with a SoC of the Marvell Kirkwook family, eg 88f6281 + +* Required root node properties: +compatible: must contain "marvell,kirkwood" + +In addition, the above compatible shall be extended with the specific +SoC. Currently known SoC compatibles are: + +"marvell,kirkwood-88f6192" +"marvell,kirkwood-88f6281" +"marvell,kirkwood-88f6282" +"marvell,kirkwood-88f6283" +"marvell,kirkwood-88f6702" +"marvell,kirkwood-98DX4122" + +And in addition, the compatible shall be extended with the specific +board. Currently known boards are: + +"buffalo,lschlv2" +"buffalo,lsxhl" +"buffalo,lsxl" +"dlink,dns-320" +"dlink,dns-320-a1" +"dlink,dns-325" +"dlink,dns-325-a1" +"dlink,dns-kirkwood" +"excito,b3" +"globalscale,dreamplug-003-ds2001" +"globalscale,guruplug" +"globalscale,guruplug-server-plus" +"globalscale,sheevaplug" +"globalscale,sheevaplug" +"globalscale,sheevaplug-esata" +"globalscale,sheevaplug-esata-rev13" +"iom,iconnect" +"iom,iconnect-1.1" +"iom,ix2-200" +"keymile,km_kirkwood" +"lacie,cloudbox" +"lacie,inetspace_v2" +"lacie,laplug" +"lacie,netspace_lite_v2" +"lacie,netspace_max_v2" +"lacie,netspace_mini_v2" +"lacie,netspace_v2" +"marvell,db-88f6281-bp" +"marvell,db-88f6282-bp" +"marvell,mv88f6281gtw-ge" +"marvell,rd88f6281" +"marvell,rd88f6281" +"marvell,rd88f6281-a0" +"marvell,rd88f6281-a1" +"mpl,cec4" +"mpl,cec4-10" +"netgear,readynas" +"netgear,readynas" +"netgear,readynas-duo-v2" +"netgear,readynas-nv+-v2" +"plathome,openblocks-a6" +"plathome,openblocks-a7" +"raidsonic,ib-nas6210" +"raidsonic,ib-nas6210-b" +"raidsonic,ib-nas6220" +"raidsonic,ib-nas6220-b" +"raidsonic,ib-nas62x0" +"seagate,dockstar" +"seagate,goflexnet" +"synology,ds109" +"synology,ds110jv10" +"synology,ds110jv20" +"synology,ds110jv30" +"synology,ds111" +"synology,ds209" +"synology,ds210jv10" +"synology,ds210jv20" +"synology,ds212" +"synology,ds212jv10" +"synology,ds212jv20" +"synology,ds212pv10" +"synology,ds409" +"synology,ds409slim" +"synology,ds410j" +"synology,ds411" +"synology,ds411j" +"synology,ds411slim" +"synology,ds413jv10" +"synology,rs212" +"synology,rs409" +"synology,rs411" +"synology,rs812" +"usi,topkick" +"usi,topkick-1281P2" +"zyxel,nsa310" +"zyxel,nsa310a" Added: vendor/device-tree/dist/Bindings/arm/mediatek.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/mediatek.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,8 @@ +Mediatek MT6589 Platforms Device Tree Bindings + +Boards with a SoC of the Mediatek MT6589 shall have the following property: + +Required root node property: + +compatible: must contain "mediatek,mt6589" + Added: vendor/device-tree/dist/Bindings/arm/mrvl/feroceon.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/mrvl/feroceon.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,16 @@ +* Marvell Feroceon Cache + +Required properties: +- compatible : Should be either "marvell,feroceon-cache" or + "marvell,kirkwood-cache". + +Optional properties: +- reg : Address of the L2 cache control register. Mandatory for + "marvell,kirkwood-cache", not used by "marvell,feroceon-cache" + + +Example: + l2: l2-cache@20128 { + compatible = "marvell,kirkwood-cache"; + reg = <0x20128 0x4>; + }; Added: vendor/device-tree/dist/Bindings/arm/msm/qcom,kpss-acc.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/msm/qcom,kpss-acc.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,30 @@ +Krait Processor Sub-system (KPSS) Application Clock Controller (ACC) + +The KPSS ACC provides clock, power domain, and reset control to a Krait CPU. +There is one ACC register region per CPU within the KPSS remapped region as +well as an alias register region that remaps accesses to the ACC associated +with the CPU accessing the region. + +PROPERTIES + +- compatible: + Usage: required + Value type: + Definition: should be one of: + "qcom,kpss-acc-v1" + "qcom,kpss-acc-v2" + +- reg: + Usage: required + Value type: + Definition: the first element specifies the base address and size of + the register region. An optional second element specifies + the base address and size of the alias register region. + +Example: + + clock-controller@2088000 { + compatible = "qcom,kpss-acc-v2"; + reg = <0x02088000 0x1000>, + <0x02008000 0x1000>; + }; Added: vendor/device-tree/dist/Bindings/arm/msm/qcom,saw2.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/msm/qcom,saw2.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,35 @@ +SPM AVS Wrapper 2 (SAW2) + +The SAW2 is a wrapper around the Subsystem Power Manager (SPM) and the +Adaptive Voltage Scaling (AVS) hardware. The SPM is a programmable +micro-controller that transitions a piece of hardware (like a processor or +subsystem) into and out of low power modes via a direct connection to +the PMIC. It can also be wired up to interact with other processors in the +system, notifying them when a low power state is entered or exited. + +PROPERTIES + +- compatible: + Usage: required + Value type: + Definition: shall contain "qcom,saw2". A more specific value should be + one of: + "qcom,saw2-v1" + "qcom,saw2-v1.1" + "qcom,saw2-v2" + "qcom,saw2-v2.1" + +- reg: + Usage: required + Value type: + Definition: the first element specifies the base address and size of + the register region. An optional second element specifies + the base address and size of the alias register region. + + +Example: + + regulator@2099000 { + compatible = "qcom,saw2"; + reg = <0x02099000 0x1000>, <0x02009000 0x1000>; + }; Added: vendor/device-tree/dist/Bindings/arm/omap/crossbar.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/omap/crossbar.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,63 @@ +Some socs have a large number of interrupts requests to service +the needs of its many peripherals and subsystems. All of the +interrupt lines from the subsystems are not needed at the same +time, so they have to be muxed to the irq-controller appropriately. +In such places a interrupt controllers are preceded by an CROSSBAR +that provides flexibility in muxing the device requests to the controller +inputs. + +Required properties: +- compatible : Should be "ti,irq-crossbar" +- reg: Base address and the size of the crossbar registers. +- ti,max-irqs: Total number of irqs available at the interrupt controller. +- ti,max-crossbar-sources: Maximum number of crossbar sources that can be routed. +- ti,reg-size: Size of a individual register in bytes. Every individual + register is assumed to be of same size. Valid sizes are 1, 2, 4. +- ti,irqs-reserved: List of the reserved irq lines that are not muxed using + crossbar. These interrupt lines are reserved in the soc, + so crossbar bar driver should not consider them as free + lines. + +Optional properties: +- ti,irqs-skip: This is similar to "ti,irqs-reserved", but these are for + SOC-specific hard-wiring of those irqs which unexpectedly bypasses the + crossbar. These irqs have a crossbar register, but still cannot be used. + +- ti,irqs-safe-map: integer which maps to a safe configuration to use + when the interrupt controller irq is unused (when not provided, default is 0) + +Examples: + crossbar_mpu: @4a020000 { + compatible = "ti,irq-crossbar"; + reg = <0x4a002a48 0x130>; + ti,max-irqs = <160>; + ti,max-crossbar-sources = <400>; + ti,reg-size = <2>; + ti,irqs-reserved = <0 1 2 3 5 6 131 132 139 140>; + ti,irqs-skip = <10 133 139 140>; + }; + +Consumer: +======== +See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt and +Documentation/devicetree/bindings/arm/gic.txt for further details. + +An interrupt consumer on an SoC using crossbar will use: + interrupts = +When the request number is between 0 to that described by +"ti,max-crossbar-sources", it is assumed to be a crossbar mapping. If the +request_number is greater than "ti,max-crossbar-sources", then it is mapped as a +quirky hardware mapping direct to GIC. + +Example: + device_x@0x4a023000 { + /* Crossbar 8 used */ + interrupts = ; + ... + }; + + device_y@0x4a033000 { + /* Direct mapped GIC SPI 1 used */ + interrupts = ; + ... + }; Added: vendor/device-tree/dist/Bindings/arm/omap/dmm.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/omap/dmm.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,22 @@ +OMAP Dynamic Memory Manager (DMM) bindings + +The dynamic memory manager (DMM) is a module located immediately in front of the +SDRAM controllers (called EMIFs on OMAP). DMM manages various aspects of memory +accesses such as priority generation amongst initiators, configuration of SDRAM +interleaving, optimizing transfer of 2D block objects, and provide MMU-like page +translation for initiators which need contiguous dma bus addresses. + +Required properties: +- compatible: Should contain "ti,omap4-dmm" for OMAP4 family + Should contain "ti,omap5-dmm" for OMAP5 and DRA7x family +- reg: Contains DMM register address range (base address and length) +- interrupts: Should contain an interrupt-specifier for DMM_IRQ. +- ti,hwmods: Name of the hwmod associated to DMM, which is typically "dmm" + +Example: + +dmm@4e000000 { + compatible = "ti,omap4-dmm"; + reg = <0x4e000000 0x800>; + ti,hwmods = "dmm"; +}; Added: vendor/device-tree/dist/Bindings/arm/omap/prcm.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/omap/prcm.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,65 @@ +OMAP PRCM bindings + +Power Reset and Clock Manager lists the device clocks and clockdomains under +a DT hierarchy. Each TI SoC can have multiple PRCM entities listed for it, +each describing one module and the clock hierarchy under it. see [1] for +documentation about the individual clock/clockdomain nodes. + +[1] Documentation/devicetree/bindings/clock/ti/* + +Required properties: +- compatible: Must be one of: + "ti,am3-prcm" + "ti,am3-scrm" + "ti,am4-prcm" + "ti,am4-scrm" + "ti,omap2-prcm" + "ti,omap2-scrm" + "ti,omap3-prm" + "ti,omap3-cm" + "ti,omap3-scrm" + "ti,omap4-cm1" + "ti,omap4-prm" + "ti,omap4-cm2" + "ti,omap4-scrm" + "ti,omap5-prm" + "ti,omap5-cm-core-aon" + "ti,omap5-scrm" + "ti,omap5-cm-core" + "ti,dra7-prm" + "ti,dra7-cm-core-aon" + "ti,dra7-cm-core" +- reg: Contains PRCM module register address range + (base address and length) +- clocks: clocks for this module +- clockdomains: clockdomains for this module + +Example: + +cm: cm@48004000 { + compatible = "ti,omap3-cm"; + reg = <0x48004000 0x4000>; + + cm_clocks: clocks { + #address-cells = <1>; + #size-cells = <0>; + }; + + cm_clockdomains: clockdomains { + }; +} + +&cm_clocks { + omap2_32k_fck: omap_32k_fck { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <32768>; + }; +}; + +&cm_clockdomains { + core_l3_clkdm: core_l3_clkdm { + compatible = "ti,clockdomain"; + clocks = <&sdrc_ick>; + }; +}; Added: vendor/device-tree/dist/Bindings/arm/rockchip.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/rockchip.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,10 @@ +Rockchip platforms device tree bindings +--------------------------------------- + +- bq Curie 2 tablet: + Required root node properties: + - compatible = "mundoreader,bq-curie2", "rockchip,rk3066a"; + +- Radxa Rock board: + Required root node properties: + - compatible = "radxa,rock", "rockchip,rk3188"; Added: vendor/device-tree/dist/Bindings/arm/rockchip/pmu.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/rockchip/pmu.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,16 @@ +Rockchip power-management-unit: +------------------------------- + +The pmu is used to turn off and on different power domains of the SoCs +This includes the power to the CPU cores. + +Required node properties: +- compatible value : = "rockchip,rk3066-pmu"; +- reg : physical base address and the size of the registers window + +Example: + + pmu@20004000 { + compatible = "rockchip,rk3066-pmu"; + reg = <0x20004000 0x100>; + }; Added: vendor/device-tree/dist/Bindings/arm/rockchip/smp-sram.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/rockchip/smp-sram.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,30 @@ +Rockchip SRAM for smp bringup: +------------------------------ + +Rockchip's smp-capable SoCs use the first part of the sram for the bringup +of the cores. Once the core gets powered up it executes the code that is +residing at the very beginning of the sram. + +Therefore a reserved section sub-node has to be added to the mmio-sram +declaration. + +Required sub-node properties: +- compatible : should be "rockchip,rk3066-smp-sram" + +The rest of the properties should follow the generic mmio-sram discription +found in ../../misc/sram.txt + +Example: + + sram: sram@10080000 { + compatible = "mmio-sram"; + reg = <0x10080000 0x10000>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + smp-sram@10080000 { + compatible = "rockchip,rk3066-smp-sram"; + reg = <0x10080000 0x50>; + }; + }; Added: vendor/device-tree/dist/Bindings/arm/samsung/pmu.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/samsung/pmu.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,51 @@ +SAMSUNG Exynos SoC series PMU Registers + +Properties: + - compatible : should contain two values. First value must be one from following list: + - "samsung,exynos3250-pmu" - for Exynos3250 SoC, + - "samsung,exynos4210-pmu" - for Exynos4210 SoC, + - "samsung,exynos4212-pmu" - for Exynos4212 SoC, + - "samsung,exynos4412-pmu" - for Exynos4412 SoC, + - "samsung,exynos5250-pmu" - for Exynos5250 SoC, + - "samsung,exynos5260-pmu" - for Exynos5260 SoC. + - "samsung,exynos5410-pmu" - for Exynos5410 SoC, + - "samsung,exynos5420-pmu" - for Exynos5420 SoC. + second value must be always "syscon". + + - reg : offset and length of the register set. + + - #clock-cells : must be <1>, since PMU requires once cell as clock specifier. + The single specifier cell is used as index to list of clocks + provided by PMU, which is currently: + 0 : SoC clock output (CLKOUT pin) + + - clock-names : list of clock names for particular CLKOUT mux inputs in + following format: + "clkoutN", where N is a decimal number corresponding to + CLKOUT mux control bits value for given input, e.g. + "clkout0", "clkout7", "clkout15". + + - clocks : list of phandles and specifiers to all input clocks listed in + clock-names property. + +Example : +pmu_system_controller: system-controller@10040000 { + compatible = "samsung,exynos5250-pmu", "syscon"; + reg = <0x10040000 0x5000>; + #clock-cells = <1>; + clock-names = "clkout0", "clkout1", "clkout2", "clkout3", + "clkout4", "clkout8", "clkout9"; + clocks = <&clock CLK_OUT_DMC>, <&clock CLK_OUT_TOP>, + <&clock CLK_OUT_LEFTBUS>, <&clock CLK_OUT_RIGHTBUS>, + <&clock CLK_OUT_CPU>, <&clock CLK_XXTI>, + <&clock CLK_XUSBXTI>; +}; + +Example of clock consumer : + +usb3503: usb3503@08 { + /* ... */ + clock-names = "refclk"; + clocks = <&pmu_system_controller 0>; + /* ... */ +}; Added: vendor/device-tree/dist/Bindings/arm/spear-misc.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/spear-misc.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,9 @@ +SPEAr Misc configuration +=========================== +SPEAr SOCs have some miscellaneous registers which are used to configure +few properties of different peripheral controllers. + +misc node required properties: + +- compatible Should be "st,spear1340-misc", "syscon". +- reg: Address range of misc space upto 8K Added: vendor/device-tree/dist/Bindings/arm/sti.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/Bindings/arm/sti.txt Sun Aug 31 04:55:32 2014 (r270866) @@ -0,0 +1,15 @@ +ST STi Platforms Device Tree Bindings +--------------------------------------- + +Boards with the ST STiH415 SoC shall have the following properties: +Required root node property: +compatible = "st,stih415"; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 04:56:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 615ADDEC; Sun, 31 Aug 2014 04:56:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 340FC15A9; Sun, 31 Aug 2014 04:56:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7V4uZ5N098220; Sun, 31 Aug 2014 04:56:35 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7V4uZTB098219; Sun, 31 Aug 2014 04:56:35 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201408310456.s7V4uZTB098219@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 31 Aug 2014 04:56:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r270867 - vendor/device-tree/ianc-b78b6b80/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 04:56:35 -0000 Author: imp Date: Sun Aug 31 04:56:34 2014 New Revision: 270867 URL: http://svnweb.freebsd.org/changeset/base/270867 Log: Copy after import of b78b6b80 from git repo after adding new files Added: vendor/device-tree/ianc-b78b6b80/dist/ - copied from r270866, vendor/device-tree/dist/ From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 06:23:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD856C79; Sun, 31 Aug 2014 06:23:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8F8B1D52; Sun, 31 Aug 2014 06:23:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7V6Nsle041045; Sun, 31 Aug 2014 06:23:54 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7V6NsT3041044; Sun, 31 Aug 2014 06:23:54 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201408310623.s7V6NsT3041044@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 31 Aug 2014 06:23:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270868 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 06:23:55 -0000 Author: glebius Date: Sun Aug 31 06:23:54 2014 New Revision: 270868 URL: http://svnweb.freebsd.org/changeset/base/270868 Log: Remove ability to write to struct if_data residing in struct ifnet via net.link.generic.IFMIB_IFDATA.*.IFDATA_GENERAL sysctl. Reasons for removal are: - No code in tree uses this possibility. - The documentation ifmib(4) doesn't say that such possibility exist. The example provided in manual page only reads data. - On many interfaces the feature simply doesn't work, since they do accounting in hardware, and overwrite if_data on tick. Sponsored by: Nginx, Inc. Modified: head/sys/net/if_mib.c Modified: head/sys/net/if_mib.c ============================================================================== --- head/sys/net/if_mib.c Sun Aug 31 04:56:34 2014 (r270867) +++ head/sys/net/if_mib.c Sun Aug 31 06:23:54 2014 (r270868) @@ -109,27 +109,8 @@ sysctl_ifdata(SYSCTL_HANDLER_ARGS) /* XX ifmd.ifmd_snd_drops = ifp->if_snd.ifq_drops; error = SYSCTL_OUT(req, &ifmd, sizeof ifmd); - if (error || !req->newptr) - goto out; - - error = SYSCTL_IN(req, &ifmd, sizeof ifmd); if (error) goto out; - -#define DONTCOPY(fld) ifmd.ifmd_data.ifi_##fld = ifp->if_data.ifi_##fld - DONTCOPY(type); - DONTCOPY(physical); - DONTCOPY(addrlen); - DONTCOPY(hdrlen); - DONTCOPY(mtu); - DONTCOPY(metric); - DONTCOPY(baudrate); -#undef DONTCOPY -#define COPY(fld) ifp->if_##fld = ifmd.ifmd_##fld - COPY(data); - ifp->if_snd.ifq_maxlen = ifmd.ifmd_snd_maxlen; - ifp->if_snd.ifq_drops = ifmd.ifmd_snd_drops; -#undef COPY break; case IFDATA_LINKSPECIFIC: From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 06:30:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1AF4E15; Sun, 31 Aug 2014 06:30:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD9811D76; Sun, 31 Aug 2014 06:30:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7V6Uooq044295; Sun, 31 Aug 2014 06:30:50 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7V6UoK2044294; Sun, 31 Aug 2014 06:30:50 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201408310630.s7V6UoK2044294@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 31 Aug 2014 06:30:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270869 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 06:30:51 -0000 Author: glebius Date: Sun Aug 31 06:30:50 2014 New Revision: 270869 URL: http://svnweb.freebsd.org/changeset/base/270869 Log: Use macros instead of referencing struct if_data that resides in ifnet. Sponsored by: Nginx, Inc. Modified: head/sys/netinet/if_ether.c Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Sun Aug 31 06:23:54 2014 (r270868) +++ head/sys/netinet/if_ether.c Sun Aug 31 06:30:50 2014 (r270869) @@ -258,8 +258,8 @@ arprequest(struct ifnet *ifp, const stru if ((m = m_gethdr(M_NOWAIT, MT_DATA)) == NULL) return; - m->m_len = sizeof(*ah) + 2*sizeof(struct in_addr) + - 2*ifp->if_data.ifi_addrlen; + m->m_len = sizeof(*ah) + 2 * sizeof(struct in_addr) + + 2 * ifp->if_addrlen; m->m_pkthdr.len = m->m_len; MH_ALIGN(m, m->m_len); ah = mtod(m, struct arphdr *); From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 06:46:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2397D103; Sun, 31 Aug 2014 06:46:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0EBEC1ED6; Sun, 31 Aug 2014 06:46:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7V6kMZm050683; Sun, 31 Aug 2014 06:46:22 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7V6kM1X050678; Sun, 31 Aug 2014 06:46:22 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201408310646.s7V6kM1X050678@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 31 Aug 2014 06:46:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270870 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 06:46:23 -0000 Author: glebius Date: Sun Aug 31 06:46:21 2014 New Revision: 270870 URL: http://svnweb.freebsd.org/changeset/base/270870 Log: o Remove struct if_data from struct ifnet. Now it is merely API structure for route(4) socket and ifmib(4) sysctl. o Move fields from if_data to ifnet, but keep all statistic counters separate, since they should disappear later. o Provide function if_data_copy() to fill if_data, utilize it in routing socket and ifmib handler. o Provide overridable ifnet(9) method to fetch counters. If no provided, if_get_counters_compat() would be used, that returns old counters. Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/net/if.c head/sys/net/if_mib.c head/sys/net/if_var.h head/sys/net/rtsock.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Sun Aug 31 06:30:50 2014 (r270869) +++ head/sys/net/if.c Sun Aug 31 06:46:21 2014 (r270870) @@ -605,8 +605,7 @@ if_attach_internal(struct ifnet *ifp, in if_addgroup(ifp, IFG_ALL); getmicrotime(&ifp->if_lastchange); - ifp->if_data.ifi_epoch = time_uptime; - ifp->if_data.ifi_datalen = sizeof(struct if_data); + ifp->if_epoch = time_uptime; KASSERT((ifp->if_transmit == NULL && ifp->if_qflush == NULL) || (ifp->if_transmit != NULL && ifp->if_qflush != NULL), @@ -615,7 +614,10 @@ if_attach_internal(struct ifnet *ifp, in ifp->if_transmit = if_transmit; ifp->if_qflush = if_qflush; } - + + if (ifp->if_get_counter == NULL) + ifp->if_get_counter = if_get_counter_compat; + if (!vmove) { #ifdef MAC mac_ifnet_create(ifp); @@ -1384,6 +1386,77 @@ if_rtdel(struct radix_node *rn, void *ar } /* + * Return counter values from old racy non-pcpu counters. + */ +uint64_t +if_get_counter_compat(struct ifnet *ifp, ifnet_counter cnt) +{ + + switch (cnt) { + case IFCOUNTER_IPACKETS: + return (ifp->if_ipackets); + case IFCOUNTER_IERRORS: + return (ifp->if_ierrors); + case IFCOUNTER_OPACKETS: + return (ifp->if_opackets); + case IFCOUNTER_OERRORS: + return (ifp->if_oerrors); + case IFCOUNTER_COLLISIONS: + return (ifp->if_collisions); + case IFCOUNTER_IBYTES: + return (ifp->if_ibytes); + case IFCOUNTER_OBYTES: + return (ifp->if_obytes); + case IFCOUNTER_IMCASTS: + return (ifp->if_imcasts); + case IFCOUNTER_OMCASTS: + return (ifp->if_omcasts); + case IFCOUNTER_IQDROPS: + return (ifp->if_iqdrops); + case IFCOUNTER_OQDROPS: + return (ifp->if_oqdrops); + case IFCOUNTER_NOPROTO: + return (ifp->if_noproto); + } + panic("%s: unknown counter %d", __func__, cnt); +} + +/* + * Copy data from ifnet to userland API structure if_data. + */ +void +if_data_copy(struct ifnet *ifp, struct if_data *ifd) +{ + + ifd->ifi_type = ifp->if_type; + ifd->ifi_physical = 0; + ifd->ifi_addrlen = ifp->if_addrlen; + ifd->ifi_hdrlen = ifp->if_hdrlen; + ifd->ifi_link_state = ifp->if_link_state; + ifd->ifi_vhid = 0; + ifd->ifi_datalen = sizeof(struct if_data); + ifd->ifi_mtu = ifp->if_mtu; + ifd->ifi_metric = ifp->if_metric; + ifd->ifi_baudrate = ifp->if_baudrate; + ifd->ifi_hwassist = ifp->if_hwassist; + ifd->ifi_epoch = ifp->if_epoch; + ifd->ifi_lastchange = ifp->if_lastchange; + + ifd->ifi_ipackets = ifp->if_get_counter(ifp, IFCOUNTER_IPACKETS); + ifd->ifi_ierrors = ifp->if_get_counter(ifp, IFCOUNTER_IERRORS); + ifd->ifi_opackets = ifp->if_get_counter(ifp, IFCOUNTER_OPACKETS); + ifd->ifi_oerrors = ifp->if_get_counter(ifp, IFCOUNTER_OERRORS); + ifd->ifi_collisions = ifp->if_get_counter(ifp, IFCOUNTER_COLLISIONS); + ifd->ifi_ibytes = ifp->if_get_counter(ifp, IFCOUNTER_IBYTES); + ifd->ifi_obytes = ifp->if_get_counter(ifp, IFCOUNTER_OBYTES); + ifd->ifi_imcasts = ifp->if_get_counter(ifp, IFCOUNTER_IMCASTS); + ifd->ifi_omcasts = ifp->if_get_counter(ifp, IFCOUNTER_OMCASTS); + ifd->ifi_iqdrops = ifp->if_get_counter(ifp, IFCOUNTER_IQDROPS); + ifd->ifi_oqdrops = ifp->if_get_counter(ifp, IFCOUNTER_OQDROPS); + ifd->ifi_noproto = ifp->if_get_counter(ifp, IFCOUNTER_NOPROTO); +} + +/* * Wrapper functions for struct ifnet address list locking macros. These are * used by kernel modules to avoid encoding programming interface or binary * interface assumptions that may be violated when kernel-internal locking @@ -2167,7 +2240,8 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, break; case SIOCGIFPHYS: - ifr->ifr_phys = ifp->if_physical; + /* XXXGL: did this ever worked? */ + ifr->ifr_phys = 0; break; case SIOCGIFDESCR: @@ -3915,7 +3989,7 @@ if_sendq_prepend(if_t ifp, struct mbuf * int if_setifheaderlen(if_t ifp, int len) { - ((struct ifnet *)ifp)->if_data.ifi_hdrlen = len; + ((struct ifnet *)ifp)->if_hdrlen = len; return (0); } Modified: head/sys/net/if_mib.c ============================================================================== --- head/sys/net/if_mib.c Sun Aug 31 06:30:50 2014 (r270869) +++ head/sys/net/if_mib.c Sun Aug 31 06:46:21 2014 (r270870) @@ -99,10 +99,9 @@ sysctl_ifdata(SYSCTL_HANDLER_ARGS) /* XX bzero(&ifmd, sizeof(ifmd)); strlcpy(ifmd.ifmd_name, ifp->if_xname, sizeof(ifmd.ifmd_name)); -#define COPY(fld) ifmd.ifmd_##fld = ifp->if_##fld - COPY(pcount); - COPY(data); -#undef COPY + ifmd.ifmd_pcount = ifp->if_pcount; + if_data_copy(ifp, &ifmd.ifmd_data); + ifmd.ifmd_flags = ifp->if_flags | ifp->if_drv_flags; ifmd.ifmd_snd_len = ifp->if_snd.ifq_len; ifmd.ifmd_snd_maxlen = ifp->if_snd.ifq_maxlen; Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Sun Aug 31 06:30:50 2014 (r270869) +++ head/sys/net/if_var.h Sun Aug 31 06:46:21 2014 (r270870) @@ -94,11 +94,27 @@ VNET_DECLARE(struct pfil_head, link_pfil #define V_link_pfil_hook VNET(link_pfil_hook) #endif /* _KERNEL */ +typedef enum { + IFCOUNTER_IPACKETS = 1, + IFCOUNTER_IERRORS, + IFCOUNTER_OPACKETS, + IFCOUNTER_OERRORS, + IFCOUNTER_COLLISIONS, + IFCOUNTER_IBYTES, + IFCOUNTER_OBYTES, + IFCOUNTER_IMCASTS, + IFCOUNTER_OMCASTS, + IFCOUNTER_IQDROPS, + IFCOUNTER_OQDROPS, + IFCOUNTER_NOPROTO, +} ifnet_counter; + typedef void (*if_start_fn_t)(struct ifnet *); typedef int (*if_ioctl_fn_t)(struct ifnet *, u_long, caddr_t); typedef void (*if_init_fn_t)(void *); typedef void (*if_qflush_fn_t)(struct ifnet *); typedef int (*if_transmit_fn_t)(struct ifnet *, struct mbuf *); +typedef uint64_t (*if_get_counter_t)(struct ifnet *, ifnet_counter); /* Opaque object pointing to interface structure (ifnet) */ typedef void *if_t; @@ -136,8 +152,21 @@ struct ifnet { size_t if_linkmiblen; /* length of above data */ int if_drv_flags; /* driver-managed status flags */ u_int if_refcount; /* reference count */ + + /* These fields are shared with struct if_data. */ + uint8_t if_type; /* ethernet, tokenring, etc */ + uint8_t if_addrlen; /* media address length */ + uint8_t if_hdrlen; /* media header length */ + uint8_t if_link_state; /* current link state */ + uint32_t if_spare32; + uint32_t if_mtu; /* maximum transmission unit */ + uint32_t if_metric; /* routing metric (external only) */ + uint64_t if_baudrate; /* linespeed */ + uint64_t if_hwassist; /* HW offload capabilities, see IFCAP */ + time_t if_epoch; /* uptime at attach or stat reset */ + struct timeval if_lastchange; /* time of last administrative change */ + struct ifaltq if_snd; /* output queue (includes altq) */ - struct if_data if_data; /* type information and statistics */ struct task if_linktask; /* task for link change events */ /* Addresses of different protocol families assigned to this if. */ @@ -190,6 +219,7 @@ struct ifnet { void (*if_reassign) /* reassign to vnet routine */ (struct ifnet *, struct vnet *, char *); + if_get_counter_t if_get_counter; /* get counter values */ /* Stuff that's only temporary and doesn't belong here. */ u_int if_hw_tsomax; /* tso burst length limit, the minimum @@ -197,45 +227,31 @@ struct ifnet { * XXXAO: Have to find a better place * for it eventually. */ /* - * Spare fields are added so that we can modify sensitive data - * structures without changing the kernel binary interface, and must - * be used with care where binary compatibility is required. + * Old, racy and expensive statistics, should not be used in + * new drivers. + */ + uint64_t if_ipackets; /* packets received on interface */ + uint64_t if_ierrors; /* input errors on interface */ + uint64_t if_opackets; /* packets sent on interface */ + uint64_t if_oerrors; /* output errors on interface */ + uint64_t if_collisions; /* collisions on csma interfaces */ + uint64_t if_ibytes; /* total number of octets received */ + uint64_t if_obytes; /* total number of octets sent */ + uint64_t if_imcasts; /* packets received via multicast */ + uint64_t if_omcasts; /* packets sent via multicast */ + uint64_t if_iqdrops; /* dropped on input */ + uint64_t if_oqdrops; /* dropped on output */ + uint64_t if_noproto; /* destined for unsupported protocol */ + + /* + * Spare fields to be added before branching a stable branch, so + * that structure can be enhanced without changing the kernel + * binary interface. */ - char if_cspare[3]; - int if_ispare[4]; - void *if_unused[2]; - void *if_pspare[8]; /* 1 netmap, 7 TDB */ }; #include /* XXXAO: temporary unconditional include */ -/* - * XXX These aliases are terribly dangerous because they could apply - * to anything. - */ -#define if_mtu if_data.ifi_mtu -#define if_type if_data.ifi_type -#define if_physical if_data.ifi_physical -#define if_addrlen if_data.ifi_addrlen -#define if_hdrlen if_data.ifi_hdrlen -#define if_metric if_data.ifi_metric -#define if_link_state if_data.ifi_link_state -#define if_baudrate if_data.ifi_baudrate -#define if_hwassist if_data.ifi_hwassist -#define if_ipackets if_data.ifi_ipackets -#define if_ierrors if_data.ifi_ierrors -#define if_opackets if_data.ifi_opackets -#define if_oerrors if_data.ifi_oerrors -#define if_collisions if_data.ifi_collisions -#define if_ibytes if_data.ifi_ibytes -#define if_obytes if_data.ifi_obytes -#define if_imcasts if_data.ifi_imcasts -#define if_omcasts if_data.ifi_omcasts -#define if_iqdrops if_data.ifi_iqdrops -#define if_oqdrops if_data.ifi_oqdrops -#define if_noproto if_data.ifi_noproto -#define if_lastchange if_data.ifi_lastchange - /* for compatibility with other BSDs */ #define if_addrlist if_addrhead #define if_list if_link @@ -513,6 +529,8 @@ typedef void *if_com_alloc_t(u_char type typedef void if_com_free_t(void *com, u_char type); void if_register_com_alloc(u_char type, if_com_alloc_t *a, if_com_free_t *f); void if_deregister_com_alloc(u_char type); +void if_data_copy(struct ifnet *, struct if_data *); +uint64_t if_get_counter_compat(struct ifnet *, ifnet_counter); #define IF_LLADDR(ifp) \ LLADDR((struct sockaddr_dl *)((ifp)->if_addr->ifa_addr)) Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Sun Aug 31 06:30:50 2014 (r270869) +++ head/sys/net/rtsock.c Sun Aug 31 06:46:21 2014 (r270870) @@ -1252,7 +1252,7 @@ rt_ifmsg(struct ifnet *ifp) ifm = mtod(m, struct if_msghdr *); ifm->ifm_index = ifp->if_index; ifm->ifm_flags = ifp->if_flags | ifp->if_drv_flags; - ifm->ifm_data = ifp->if_data; + if_data_copy(ifp, &ifm->ifm_data); ifm->ifm_addrs = 0; rt_dispatch(m, AF_UNSPEC); } @@ -1574,7 +1574,7 @@ sysctl_iflist_ifml(struct ifnet *ifp, st ifd = &ifm->ifm_data; } - *ifd = ifp->if_data; + if_data_copy(ifp, ifd); /* Some drivers still use ifqueue(9), add its stats. */ ifd->ifi_oqdrops += ifp->if_snd.ifq_drops; @@ -1609,7 +1609,7 @@ sysctl_iflist_ifm(struct ifnet *ifp, str ifd = &ifm->ifm_data; } - *ifd = ifp->if_data; + if_data_copy(ifp, ifd); /* Some drivers still use ifqueue(9), add its stats. */ ifd->ifi_oqdrops += ifp->if_snd.ifq_drops; From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 08:20:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D261E444; Sun, 31 Aug 2014 08:20:22 +0000 (UTC) Received: from mail.ipfw.ru (mail.ipfw.ru [IPv6:2a01:4f8:120:6141::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54ED71870; Sun, 31 Aug 2014 08:20:22 +0000 (UTC) Received: from [2a02:6b8:0:401:222:4dff:fe50:cd2f] (helo=ptichko.yndx.net) by mail.ipfw.ru with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.82 (FreeBSD)) (envelope-from ) id 1XNwOv-000NN1-VE; Sun, 31 Aug 2014 08:06:02 +0400 Message-ID: <5402DAB7.2040806@FreeBSD.org> Date: Sun, 31 Aug 2014 12:20:07 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r270870 - head/sys/net References: <201408310646.s7V6kM1X050678@svn.freebsd.org> In-Reply-To: <201408310646.s7V6kM1X050678@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 08:20:22 -0000 On 31.08.2014 10:46, Gleb Smirnoff wrote: > Author: glebius > Date: Sun Aug 31 06:46:21 2014 > New Revision: 270870 > URL: http://svnweb.freebsd.org/changeset/base/270870 > > Log: > o Remove struct if_data from struct ifnet. Now it is merely API structure > for route(4) socket and ifmib(4) sysctl. > o Move fields from if_data to ifnet, but keep all statistic counters > separate, since they should disappear later. > o Provide function if_data_copy() to fill if_data, utilize it in routing > socket and ifmib handler. > o Provide overridable ifnet(9) method to fetch counters. If no provided, > if_get_counters_compat() would be used, that returns old counters. Thanks! > > Sponsored by: Netflix > Sponsored by: Nginx, Inc. > > Modified: > head/sys/net/if.c > head/sys/net/if_mib.c > head/sys/net/if_var.h > head/sys/net/rtsock.c > > Modified: head/sys/net/if.c > ============================================================================== > --- head/sys/net/if.c Sun Aug 31 06:30:50 2014 (r270869) > +++ head/sys/net/if.c Sun Aug 31 06:46:21 2014 (r270870) > @@ -605,8 +605,7 @@ if_attach_internal(struct ifnet *ifp, in > if_addgroup(ifp, IFG_ALL); > > getmicrotime(&ifp->if_lastchange); > - ifp->if_data.ifi_epoch = time_uptime; > - ifp->if_data.ifi_datalen = sizeof(struct if_data); > + ifp->if_epoch = time_uptime; > > KASSERT((ifp->if_transmit == NULL && ifp->if_qflush == NULL) || > (ifp->if_transmit != NULL && ifp->if_qflush != NULL), > @@ -615,7 +614,10 @@ if_attach_internal(struct ifnet *ifp, in > ifp->if_transmit = if_transmit; > ifp->if_qflush = if_qflush; > } > - > + > + if (ifp->if_get_counter == NULL) > + ifp->if_get_counter = if_get_counter_compat; > + > if (!vmove) { > #ifdef MAC > mac_ifnet_create(ifp); > @@ -1384,6 +1386,77 @@ if_rtdel(struct radix_node *rn, void *ar > } > > /* > + * Return counter values from old racy non-pcpu counters. > + */ > +uint64_t > +if_get_counter_compat(struct ifnet *ifp, ifnet_counter cnt) > +{ > + > + switch (cnt) { > + case IFCOUNTER_IPACKETS: > + return (ifp->if_ipackets); > + case IFCOUNTER_IERRORS: > + return (ifp->if_ierrors); > + case IFCOUNTER_OPACKETS: > + return (ifp->if_opackets); > + case IFCOUNTER_OERRORS: > + return (ifp->if_oerrors); > + case IFCOUNTER_COLLISIONS: > + return (ifp->if_collisions); > + case IFCOUNTER_IBYTES: > + return (ifp->if_ibytes); > + case IFCOUNTER_OBYTES: > + return (ifp->if_obytes); > + case IFCOUNTER_IMCASTS: > + return (ifp->if_imcasts); > + case IFCOUNTER_OMCASTS: > + return (ifp->if_omcasts); > + case IFCOUNTER_IQDROPS: > + return (ifp->if_iqdrops); > + case IFCOUNTER_OQDROPS: > + return (ifp->if_oqdrops); > + case IFCOUNTER_NOPROTO: > + return (ifp->if_noproto); > + } > + panic("%s: unknown counter %d", __func__, cnt); > +} > + > +/* > + * Copy data from ifnet to userland API structure if_data. > + */ > +void > +if_data_copy(struct ifnet *ifp, struct if_data *ifd) > +{ > + > + ifd->ifi_type = ifp->if_type; > + ifd->ifi_physical = 0; > + ifd->ifi_addrlen = ifp->if_addrlen; > + ifd->ifi_hdrlen = ifp->if_hdrlen; > + ifd->ifi_link_state = ifp->if_link_state; > + ifd->ifi_vhid = 0; > + ifd->ifi_datalen = sizeof(struct if_data); > + ifd->ifi_mtu = ifp->if_mtu; > + ifd->ifi_metric = ifp->if_metric; > + ifd->ifi_baudrate = ifp->if_baudrate; > + ifd->ifi_hwassist = ifp->if_hwassist; > + ifd->ifi_epoch = ifp->if_epoch; > + ifd->ifi_lastchange = ifp->if_lastchange; > + > + ifd->ifi_ipackets = ifp->if_get_counter(ifp, IFCOUNTER_IPACKETS); > + ifd->ifi_ierrors = ifp->if_get_counter(ifp, IFCOUNTER_IERRORS); > + ifd->ifi_opackets = ifp->if_get_counter(ifp, IFCOUNTER_OPACKETS); > + ifd->ifi_oerrors = ifp->if_get_counter(ifp, IFCOUNTER_OERRORS); > + ifd->ifi_collisions = ifp->if_get_counter(ifp, IFCOUNTER_COLLISIONS); > + ifd->ifi_ibytes = ifp->if_get_counter(ifp, IFCOUNTER_IBYTES); > + ifd->ifi_obytes = ifp->if_get_counter(ifp, IFCOUNTER_OBYTES); > + ifd->ifi_imcasts = ifp->if_get_counter(ifp, IFCOUNTER_IMCASTS); > + ifd->ifi_omcasts = ifp->if_get_counter(ifp, IFCOUNTER_OMCASTS); > + ifd->ifi_iqdrops = ifp->if_get_counter(ifp, IFCOUNTER_IQDROPS); > + ifd->ifi_oqdrops = ifp->if_get_counter(ifp, IFCOUNTER_OQDROPS); > + ifd->ifi_noproto = ifp->if_get_counter(ifp, IFCOUNTER_NOPROTO); > +} > + > +/* > * Wrapper functions for struct ifnet address list locking macros. These are > * used by kernel modules to avoid encoding programming interface or binary > * interface assumptions that may be violated when kernel-internal locking > @@ -2167,7 +2240,8 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, > break; > > case SIOCGIFPHYS: > - ifr->ifr_phys = ifp->if_physical; > + /* XXXGL: did this ever worked? */ > + ifr->ifr_phys = 0; > break; > > case SIOCGIFDESCR: > @@ -3915,7 +3989,7 @@ if_sendq_prepend(if_t ifp, struct mbuf * > int > if_setifheaderlen(if_t ifp, int len) > { > - ((struct ifnet *)ifp)->if_data.ifi_hdrlen = len; > + ((struct ifnet *)ifp)->if_hdrlen = len; > return (0); > } > > > Modified: head/sys/net/if_mib.c > ============================================================================== > --- head/sys/net/if_mib.c Sun Aug 31 06:30:50 2014 (r270869) > +++ head/sys/net/if_mib.c Sun Aug 31 06:46:21 2014 (r270870) > @@ -99,10 +99,9 @@ sysctl_ifdata(SYSCTL_HANDLER_ARGS) /* XX > bzero(&ifmd, sizeof(ifmd)); > strlcpy(ifmd.ifmd_name, ifp->if_xname, sizeof(ifmd.ifmd_name)); > > -#define COPY(fld) ifmd.ifmd_##fld = ifp->if_##fld > - COPY(pcount); > - COPY(data); > -#undef COPY > + ifmd.ifmd_pcount = ifp->if_pcount; > + if_data_copy(ifp, &ifmd.ifmd_data); > + > ifmd.ifmd_flags = ifp->if_flags | ifp->if_drv_flags; > ifmd.ifmd_snd_len = ifp->if_snd.ifq_len; > ifmd.ifmd_snd_maxlen = ifp->if_snd.ifq_maxlen; > > Modified: head/sys/net/if_var.h > ============================================================================== > --- head/sys/net/if_var.h Sun Aug 31 06:30:50 2014 (r270869) > +++ head/sys/net/if_var.h Sun Aug 31 06:46:21 2014 (r270870) > @@ -94,11 +94,27 @@ VNET_DECLARE(struct pfil_head, link_pfil > #define V_link_pfil_hook VNET(link_pfil_hook) > #endif /* _KERNEL */ > > +typedef enum { > + IFCOUNTER_IPACKETS = 1, > + IFCOUNTER_IERRORS, > + IFCOUNTER_OPACKETS, > + IFCOUNTER_OERRORS, > + IFCOUNTER_COLLISIONS, > + IFCOUNTER_IBYTES, > + IFCOUNTER_OBYTES, > + IFCOUNTER_IMCASTS, > + IFCOUNTER_OMCASTS, > + IFCOUNTER_IQDROPS, > + IFCOUNTER_OQDROPS, > + IFCOUNTER_NOPROTO, > +} ifnet_counter; > + > typedef void (*if_start_fn_t)(struct ifnet *); > typedef int (*if_ioctl_fn_t)(struct ifnet *, u_long, caddr_t); > typedef void (*if_init_fn_t)(void *); > typedef void (*if_qflush_fn_t)(struct ifnet *); > typedef int (*if_transmit_fn_t)(struct ifnet *, struct mbuf *); > +typedef uint64_t (*if_get_counter_t)(struct ifnet *, ifnet_counter); > > /* Opaque object pointing to interface structure (ifnet) */ > typedef void *if_t; > @@ -136,8 +152,21 @@ struct ifnet { > size_t if_linkmiblen; /* length of above data */ > int if_drv_flags; /* driver-managed status flags */ > u_int if_refcount; /* reference count */ > + > + /* These fields are shared with struct if_data. */ > + uint8_t if_type; /* ethernet, tokenring, etc */ > + uint8_t if_addrlen; /* media address length */ > + uint8_t if_hdrlen; /* media header length */ > + uint8_t if_link_state; /* current link state */ > + uint32_t if_spare32; > + uint32_t if_mtu; /* maximum transmission unit */ > + uint32_t if_metric; /* routing metric (external only) */ > + uint64_t if_baudrate; /* linespeed */ > + uint64_t if_hwassist; /* HW offload capabilities, see IFCAP */ > + time_t if_epoch; /* uptime at attach or stat reset */ > + struct timeval if_lastchange; /* time of last administrative change */ > + > struct ifaltq if_snd; /* output queue (includes altq) */ > - struct if_data if_data; /* type information and statistics */ > struct task if_linktask; /* task for link change events */ > > /* Addresses of different protocol families assigned to this if. */ > @@ -190,6 +219,7 @@ struct ifnet { > > void (*if_reassign) /* reassign to vnet routine */ > (struct ifnet *, struct vnet *, char *); > + if_get_counter_t if_get_counter; /* get counter values */ > > /* Stuff that's only temporary and doesn't belong here. */ > u_int if_hw_tsomax; /* tso burst length limit, the minimum > @@ -197,45 +227,31 @@ struct ifnet { > * XXXAO: Have to find a better place > * for it eventually. */ > /* > - * Spare fields are added so that we can modify sensitive data > - * structures without changing the kernel binary interface, and must > - * be used with care where binary compatibility is required. > + * Old, racy and expensive statistics, should not be used in > + * new drivers. > + */ > + uint64_t if_ipackets; /* packets received on interface */ > + uint64_t if_ierrors; /* input errors on interface */ > + uint64_t if_opackets; /* packets sent on interface */ > + uint64_t if_oerrors; /* output errors on interface */ > + uint64_t if_collisions; /* collisions on csma interfaces */ > + uint64_t if_ibytes; /* total number of octets received */ > + uint64_t if_obytes; /* total number of octets sent */ > + uint64_t if_imcasts; /* packets received via multicast */ > + uint64_t if_omcasts; /* packets sent via multicast */ > + uint64_t if_iqdrops; /* dropped on input */ > + uint64_t if_oqdrops; /* dropped on output */ > + uint64_t if_noproto; /* destined for unsupported protocol */ > + > + /* > + * Spare fields to be added before branching a stable branch, so > + * that structure can be enhanced without changing the kernel > + * binary interface. > */ > - char if_cspare[3]; > - int if_ispare[4]; > - void *if_unused[2]; > - void *if_pspare[8]; /* 1 netmap, 7 TDB */ > }; > > #include /* XXXAO: temporary unconditional include */ > > -/* > - * XXX These aliases are terribly dangerous because they could apply > - * to anything. > - */ > -#define if_mtu if_data.ifi_mtu > -#define if_type if_data.ifi_type > -#define if_physical if_data.ifi_physical > -#define if_addrlen if_data.ifi_addrlen > -#define if_hdrlen if_data.ifi_hdrlen > -#define if_metric if_data.ifi_metric > -#define if_link_state if_data.ifi_link_state > -#define if_baudrate if_data.ifi_baudrate > -#define if_hwassist if_data.ifi_hwassist > -#define if_ipackets if_data.ifi_ipackets > -#define if_ierrors if_data.ifi_ierrors > -#define if_opackets if_data.ifi_opackets > -#define if_oerrors if_data.ifi_oerrors > -#define if_collisions if_data.ifi_collisions > -#define if_ibytes if_data.ifi_ibytes > -#define if_obytes if_data.ifi_obytes > -#define if_imcasts if_data.ifi_imcasts > -#define if_omcasts if_data.ifi_omcasts > -#define if_iqdrops if_data.ifi_iqdrops > -#define if_oqdrops if_data.ifi_oqdrops > -#define if_noproto if_data.ifi_noproto > -#define if_lastchange if_data.ifi_lastchange > - > /* for compatibility with other BSDs */ > #define if_addrlist if_addrhead > #define if_list if_link > @@ -513,6 +529,8 @@ typedef void *if_com_alloc_t(u_char type > typedef void if_com_free_t(void *com, u_char type); > void if_register_com_alloc(u_char type, if_com_alloc_t *a, if_com_free_t *f); > void if_deregister_com_alloc(u_char type); > +void if_data_copy(struct ifnet *, struct if_data *); > +uint64_t if_get_counter_compat(struct ifnet *, ifnet_counter); > > #define IF_LLADDR(ifp) \ > LLADDR((struct sockaddr_dl *)((ifp)->if_addr->ifa_addr)) > > Modified: head/sys/net/rtsock.c > ============================================================================== > --- head/sys/net/rtsock.c Sun Aug 31 06:30:50 2014 (r270869) > +++ head/sys/net/rtsock.c Sun Aug 31 06:46:21 2014 (r270870) > @@ -1252,7 +1252,7 @@ rt_ifmsg(struct ifnet *ifp) > ifm = mtod(m, struct if_msghdr *); > ifm->ifm_index = ifp->if_index; > ifm->ifm_flags = ifp->if_flags | ifp->if_drv_flags; > - ifm->ifm_data = ifp->if_data; > + if_data_copy(ifp, &ifm->ifm_data); > ifm->ifm_addrs = 0; > rt_dispatch(m, AF_UNSPEC); > } > @@ -1574,7 +1574,7 @@ sysctl_iflist_ifml(struct ifnet *ifp, st > ifd = &ifm->ifm_data; > } > > - *ifd = ifp->if_data; > + if_data_copy(ifp, ifd); > > /* Some drivers still use ifqueue(9), add its stats. */ > ifd->ifi_oqdrops += ifp->if_snd.ifq_drops; > @@ -1609,7 +1609,7 @@ sysctl_iflist_ifm(struct ifnet *ifp, str > ifd = &ifm->ifm_data; > } > > - *ifd = ifp->if_data; > + if_data_copy(ifp, ifd); > > /* Some drivers still use ifqueue(9), add its stats. */ > ifd->ifi_oqdrops += ifp->if_snd.ifq_drops; > > From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 08:57:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B06779EB; Sun, 31 Aug 2014 08:57:42 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 59A0D1BAE; Sun, 31 Aug 2014 08:57:42 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id AF4E725D3A81; Sun, 31 Aug 2014 08:57:39 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 93BCCC770B1; Sun, 31 Aug 2014 08:57:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id jVcNHggtntel; Sun, 31 Aug 2014 08:57:36 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:f973:5b8d:9a90:cf0f] (unknown [IPv6:fde9:577b:c1a9:4410:f973:5b8d:9a90:cf0f]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 1ABA8C770B0; Sun, 31 Aug 2014 08:57:34 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r270861 - in head/sys/cddl: compat/opensolaris/kern compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs From: "Bjoern A. Zeeb" In-Reply-To: <201408302144.s7ULiWsX028875@svn.freebsd.org> Date: Sun, 31 Aug 2014 08:57:17 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201408302144.s7ULiWsX028875@svn.freebsd.org> To: Steven Hartland X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 08:57:42 -0000 On 30 Aug 2014, at 21:44 , Steven Hartland wrote: > Author: smh > Date: Sat Aug 30 21:44:32 2014 > New Revision: 270861 > URL: http://svnweb.freebsd.org/changeset/base/270861 >=20 > Log: > Ensure that ZFS ARC free memory checks include cached pages >=20 > Also restore kmem_used() check for i386 as it has KVA limits that the = raw > page counts above don=92t consider I see this on pc98 and i386 buildworld: =3D=3D=3D> cddl/usr.bin/zinject (all) = /storage/head/obj//pc98.i386/scratch/tmp/bz/head.svn/tmp/usr/lib/libzpool.= so: undefined reference to `kmem_used' cc: error: linker command failed with exit code 1 (use -v to see = invocation) --- zinject --- *** [zinject] Error code 1 >=20 > PR: 187594 > Reviewed by: peter > X-MFC-With: r270759 > Review: D700 > Sponsored by: Multiplay >=20 > Modified: > head/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c > head/sys/cddl/compat/opensolaris/sys/kmem.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c >=20 > Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Sat Aug = 30 20:26:30 2014 (r270860) > +++ head/sys/cddl/compat/opensolaris/kern/opensolaris_kmem.c Sat Aug = 30 21:44:32 2014 (r270861) > @@ -152,7 +152,7 @@ u_int > kmem_free_count(void) > { >=20 > - return (vm_cnt.v_free_count); > + return (vm_cnt.v_free_count + vm_cnt.v_cache_count); > } >=20 > u_int > @@ -169,6 +169,13 @@ kmem_size(void) > return (kmem_size_val); > } >=20 > +uint64_t > +kmem_used(void) > +{ > + > + return (vmem_size(kmem_arena, VMEM_ALLOC)); > +} > + > static int > kmem_std_constructor(void *mem, int size __unused, void *private, int = flags) > { >=20 > Modified: head/sys/cddl/compat/opensolaris/sys/kmem.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/cddl/compat/opensolaris/sys/kmem.h Sat Aug 30 = 20:26:30 2014 (r270860) > +++ head/sys/cddl/compat/opensolaris/sys/kmem.h Sat Aug 30 = 21:44:32 2014 (r270861) > @@ -66,6 +66,7 @@ typedef struct kmem_cache { > void *zfs_kmem_alloc(size_t size, int kmflags); > void zfs_kmem_free(void *buf, size_t size); > uint64_t kmem_size(void); > +uint64_t kmem_used(void); > u_int kmem_page_count(void); >=20 > /* >=20 > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Aug = 30 20:26:30 2014 (r270860) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Aug = 30 21:44:32 2014 (r270861) > @@ -2563,6 +2563,14 @@ arc_reclaim_needed(void) > #endif /* sun */ >=20 > #else > +#ifdef __i386__ > + /* i386 has KVA limits that the raw page counts above don't = consider */ > + if (kmem_used() > (kmem_size() * 3) / 4) { > + DTRACE_PROBE2(arc__reclaim_used, uint64_t, > + kmem_used(), uint64_t, (kmem_size() * 3) / 4); > + return (1); > + } > +#endif > if (spa_get_random(100) =3D=3D 0) > return (1); > #endif >=20 =97=20 Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983 From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 08:58:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A04FB38; Sun, 31 Aug 2014 08:58:55 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C55D51BB6; Sun, 31 Aug 2014 08:58:54 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id B6CDE25D3A81; Sun, 31 Aug 2014 08:58:52 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 31A87C770B2; Sun, 31 Aug 2014 08:58:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id ZuaHPaBPiFbI; Sun, 31 Aug 2014 08:58:50 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:f973:5b8d:9a90:cf0f] (unknown [IPv6:fde9:577b:c1a9:4410:f973:5b8d:9a90:cf0f]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 47950C770B1; Sun, 31 Aug 2014 08:58:48 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r270862 - head/sys/arm/arm From: "Bjoern A. Zeeb" In-Reply-To: <201408302221.s7UMLvMS003791@svn.freebsd.org> Date: Sun, 31 Aug 2014 08:58:38 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201408302221.s7UMLvMS003791@svn.freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 08:58:55 -0000 On 30 Aug 2014, at 22:21 , Ian Lepore wrote: > Author: ian > Date: Sat Aug 30 22:21:57 2014 > New Revision: 270862 > URL: http://svnweb.freebsd.org/changeset/base/270862 >=20 > Log: > Fix the handling of MMU type in the AP entry code. The ARM_MMU_V6/V7 > symbols are always #defined to 0 or 1, so use #if SYM not #if = defined(SYM). > Also, it helps if you include the header file that defines the = symbols. I can only assume it=92s been due to this commit: 22 warnings generated. linking kernel.debug locore.o: In function `mpentry': (.text+0x1ec): undefined reference to `armv6_idcache_inv_all' --- kernel.debug --- *** [kernel.debug] Error code 1 bmake: stopped in = /storage/head/obj/arm.armv6/scratch/tmp/bz/head.svn/sys/ARMADAXP >=20 > Modified: > head/sys/arm/arm/locore.S >=20 > Modified: head/sys/arm/arm/locore.S > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/arm/locore.S Sat Aug 30 21:44:32 2014 = (r270861) > +++ head/sys/arm/arm/locore.S Sat Aug 30 22:21:57 2014 = (r270862) > @@ -37,6 +37,7 @@ > #include > #include > #include > +#include > #include >=20 > __FBSDID("$FreeBSD$"); > @@ -389,9 +390,9 @@ ASENTRY_NP(mpentry) > nop > CPWAIT(r0) >=20 > -#if defined(ARM_MMU_V6) > +#if ARM_MMU_V6 > bl armv6_idcache_inv_all /* Modifies r0 only */ > -#elif defined(ARM_MMU_V7) > +#elif ARM_MMU_V7 > bl armv7_idcache_inv_all /* Modifies r0-r3, ip */ > #endif >=20 >=20 =97=20 Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983 From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 09:05:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED62BEBB; Sun, 31 Aug 2014 09:05:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8B7D1C6E; Sun, 31 Aug 2014 09:05:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7V952DK014874; Sun, 31 Aug 2014 09:05:02 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7V952t6014873; Sun, 31 Aug 2014 09:05:02 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201408310905.s7V952t6014873@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Sun, 31 Aug 2014 09:05:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270871 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 09:05:03 -0000 Author: peter Date: Sun Aug 31 09:05:02 2014 New Revision: 270871 URL: http://svnweb.freebsd.org/changeset/base/270871 Log: Move the restored #ifdef i386 test back inside the #ifdef _KERNEL block where it originally was. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Aug 31 06:46:21 2014 (r270870) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Aug 31 09:05:02 2014 (r270871) @@ -2560,9 +2560,7 @@ arc_reclaim_needed(void) (btop(vmem_size(heap_arena, VMEM_FREE | VMEM_ALLOC)) >> 2)) return (1); #endif -#endif /* sun */ - -#else +#else /* sun */ #ifdef __i386__ /* i386 has KVA limits that the raw page counts above don't consider */ if (kmem_used() > (kmem_size() * 3) / 4) { @@ -2571,6 +2569,9 @@ arc_reclaim_needed(void) return (1); } #endif +#endif /* sun */ + +#else if (spa_get_random(100) == 0) return (1); #endif From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 09:07:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FFEDD6; Sun, 31 Aug 2014 09:07:16 +0000 (UTC) Received: from smtp2.wemm.org (smtp2.wemm.org [IPv6:2001:470:67:39d::78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp2.wemm.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id EB73D1C93; Sun, 31 Aug 2014 09:07:15 +0000 (UTC) Received: from overcee.wemm.org (canning.wemm.org [192.203.228.65]) by smtp2.wemm.org (Postfix) with ESMTP id 4E619521; Sun, 31 Aug 2014 02:07:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=m20140428; t=1409476034; bh=vcddLm3N1xLXn92AxxTzB0emzPKYsTBtI4AsPmD0Z0U=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Y0IjcXMpyAQXB84HGH77/WVC1fcgrhVk5OegURy/77YZZP8WeE9I2isYx+qK5wWxF bA15rtq6qoWzCJRSEJVA5BIhH4plQvtxE2LTPQAj/sC8x5WYC9tcXycKehyi3U65Z6 wLgw7cKpZwJUxHNePfP41uRqnsq8xiSYZJYOoxWE= From: Peter Wemm To: "Bjoern A. Zeeb" Subject: Re: svn commit: r270861 - in head/sys/cddl: compat/opensolaris/kern compat/opensolaris/sys contrib/opensolaris/uts/common/fs/zfs Date: Sun, 31 Aug 2014 02:07:04 -0700 Message-ID: <4971681.t0HSrHEhdJ@overcee.wemm.org> User-Agent: KMail/4.12.5 (FreeBSD/11.0-CURRENT; KDE/4.12.5; amd64; ; ) In-Reply-To: References: <201408302144.s7ULiWsX028875@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart11904951.nD4llmVSAe"; micalg="pgp-sha1"; protocol="application/pgp-signature" Cc: svn-src-head@freebsd.org, Steven Hartland , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 09:07:16 -0000 --nextPart11904951.nD4llmVSAe Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" On Sunday 31 August 2014 08:57:17 Bjoern A. Zeeb wrote: > On 30 Aug 2014, at 21:44 , Steven Hartland wrote: > > Author: smh > > Date: Sat Aug 30 21:44:32 2014 > > New Revision: 270861 > > URL: http://svnweb.freebsd.org/changeset/base/270861 > >=20 > > Log: > > Ensure that ZFS ARC free memory checks include cached pages > > =20 > > Also restore kmem_used() check for i386 as it has KVA limits that = the raw > > page counts above don=E2=80=99t consider >=20 > I see this on pc98 and i386 buildworld: >=20 > =3D=3D=3D> cddl/usr.bin/zinject (all) > /storage/head/obj//pc98.i386/scratch/tmp/bz/head.svn/tmp/usr/lib/libz= pool.so > : undefined reference to `kmem_used' cc: error: linker command failed= with > exit code 1 (use -v to see invocation) --- zinject --- > *** [zinject] Error code 1 Argh. The #ifdef was placed into the userland section of the file. I = just=20 moved it. =2D-=20 Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI= 6FJV UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246 --nextPart11904951.nD4llmVSAe Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABAgAGBQJUAuXBAAoJEDXWlwnsgJ4E93kH+QEJBxGj8KUg4KRlDMLYv5tL TX9i7JIYIT7QKNsUzaYnJ1dutAn5iX+CJYlHcqeULWGREwheqAjiet7m549HiD+D DyzlBqaPv9/eTlVIgiPYfUk53WDIualawDNqJcskwNnZB3GTGq+zo61tdaj9zain EE2GQc+Exm1yITXwOnUUbwlZqSyoE//z1uQwlauqO+AOs7HoX1JDa7Vxzqv94lby 8Q7Jex1Y+4U8vkIcXVB8tBEEouUfcs1TL1CUv7HKKtPmcAAzAlAQcDH/3Nn0Ycbo 8n5+SjHVgSFSM1ESmk7uIOTiQBZT36lmvRXNlaOZNYlZ9X3FH03h8vixmnymFZw= =83jU -----END PGP SIGNATURE----- --nextPart11904951.nD4llmVSAe-- From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 10:28:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B75794D1; Sun, 31 Aug 2014 10:28:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A34281472; Sun, 31 Aug 2014 10:28:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VASVPU052386; Sun, 31 Aug 2014 10:28:31 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VASVsX052385; Sun, 31 Aug 2014 10:28:31 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201408311028.s7VASVsX052385@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Sun, 31 Aug 2014 10:28:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270872 - head/sbin/camcontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 10:28:31 -0000 Author: gavin Date: Sun Aug 31 10:28:31 2014 New Revision: 270872 URL: http://svnweb.freebsd.org/changeset/base/270872 Log: Fix character case in examples for "camcontrol security" - should be "-U user" not "-u user". PR: 193179 Submitted by: milios ccsys com MFC after: 3 days Modified: head/sbin/camcontrol/camcontrol.8 Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Sun Aug 31 09:05:02 2014 (r270871) +++ head/sbin/camcontrol/camcontrol.8 Sun Aug 31 10:28:31 2014 (r270872) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2013 +.Dd August 31, 2014 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -1884,12 +1884,12 @@ camcontrol security ada0 .Pp Report security support and settings for ada0 .Bd -literal -offset indent -camcontrol security ada0 -u user -s MyPass +camcontrol security ada0 -U user -s MyPass .Ed .Pp Enable security on device ada0 with the password MyPass .Bd -literal -offset indent -camcontrol security ada0 -u user -e MyPass +camcontrol security ada0 -U user -e MyPass .Ed .Pp Secure erase ada0 which has had security enabled with user password MyPass From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 10:42:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B63289E5; Sun, 31 Aug 2014 10:42:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8433C1771; Sun, 31 Aug 2014 10:42:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VAgqV5061333; Sun, 31 Aug 2014 10:42:52 GMT (envelope-from akiyama@FreeBSD.org) Received: (from akiyama@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VAgqcv061332; Sun, 31 Aug 2014 10:42:52 GMT (envelope-from akiyama@FreeBSD.org) Message-Id: <201408311042.s7VAgqcv061332@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: akiyama set sender to akiyama@FreeBSD.org using -f From: Shunsuke Akiyama Date: Sun, 31 Aug 2014 10:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270873 - stable/10/sys/x86/acpica X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 10:42:52 -0000 Author: akiyama Date: Sun Aug 31 10:42:52 2014 New Revision: 270873 URL: http://svnweb.freebsd.org/changeset/base/270873 Log: MFC r263859: Change default logic to CONFORM because this routine is shared with SCI polarity setting. Reviewed by: jhb MFC r269184: Add missing newline to output dmesg properly. Modified: stable/10/sys/x86/acpica/madt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/acpica/madt.c ============================================================================== --- stable/10/sys/x86/acpica/madt.c Sun Aug 31 10:28:31 2014 (r270872) +++ stable/10/sys/x86/acpica/madt.c Sun Aug 31 10:42:52 2014 (r270873) @@ -298,6 +298,9 @@ interrupt_polarity(UINT16 IntiFlags, UIN { switch (IntiFlags & ACPI_MADT_POLARITY_MASK) { + default: + printf("WARNING: Bogus Interrupt Polarity. Assume CONFORMS\n"); + /* FALLTHROUGH*/ case ACPI_MADT_POLARITY_CONFORMS: if (Source == AcpiGbl_FADT.SciInterrupt) return (INTR_POLARITY_LOW); @@ -306,11 +309,8 @@ interrupt_polarity(UINT16 IntiFlags, UIN case ACPI_MADT_POLARITY_ACTIVE_HIGH: return (INTR_POLARITY_HIGH); case ACPI_MADT_POLARITY_ACTIVE_LOW: - break; - default: - printf("WARNING: Bogus Interrupt Polarity. Assume POLALITY LOW"); + return (INTR_POLARITY_LOW); } - return (INTR_POLARITY_LOW); } static enum intr_trigger @@ -318,6 +318,9 @@ interrupt_trigger(UINT16 IntiFlags, UINT { switch (IntiFlags & ACPI_MADT_TRIGGER_MASK) { + default: + printf("WARNING: Bogus Interrupt Trigger Mode. Assume CONFORMS.\n"); + /*FALLTHROUGH*/ case ACPI_MADT_TRIGGER_CONFORMS: if (Source == AcpiGbl_FADT.SciInterrupt) return (INTR_TRIGGER_LEVEL); @@ -326,13 +329,8 @@ interrupt_trigger(UINT16 IntiFlags, UINT case ACPI_MADT_TRIGGER_EDGE: return (INTR_TRIGGER_EDGE); case ACPI_MADT_TRIGGER_LEVEL: - break; - default: - printf("WARNING: Bogus Interrupt Trigger Mode. Assume Level trigger."); - - break; + return (INTR_TRIGGER_LEVEL); } - return (INTR_TRIGGER_LEVEL); } /* From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 11:07:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A067690; Sun, 31 Aug 2014 11:07:17 +0000 (UTC) Received: from nibbler.fubar.geek.nz (nibbler.fubar.geek.nz [199.48.134.198]) by mx1.freebsd.org (Postfix) with ESMTP id 817351955; Sun, 31 Aug 2014 11:07:17 +0000 (UTC) Received: from bender.lan (97e07ab1.skybroadband.com [151.224.122.177]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id 6DF235DEBC; Sun, 31 Aug 2014 11:07:15 +0000 (UTC) Date: Sun, 31 Aug 2014 12:07:07 +0100 From: Andrew Turner To: Michael Tuexen Subject: Re: svn commit: r270858 - head/sys/arm/conf Message-ID: <20140831120707.0b049e07@bender.lan> In-Reply-To: <201408302000.s7UK0IhC024462@svn.freebsd.org> References: <201408302000.s7UK0IhC024462@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 11:07:17 -0000 On Sat, 30 Aug 2014 20:00:18 +0000 (UTC) Michael Tuexen wrote: > Author: tuexen > Date: Sat Aug 30 20:00:18 2014 > New Revision: 270858 > URL: http://svnweb.freebsd.org/changeset/base/270858 > > Log: > Remove FDT option, since it is in every file, which includes this > one. > It should be the other way around, i.e. in this file and removed from all that include it. FDT is required for armv6 and this is still a valid kernel config. Andrew From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 11:33:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5336344E; Sun, 31 Aug 2014 11:33:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C72F1BAD; Sun, 31 Aug 2014 11:33:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VBXKmw084885; Sun, 31 Aug 2014 11:33:20 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VBXJlv084881; Sun, 31 Aug 2014 11:33:19 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201408311133.s7VBXJlv084881@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 31 Aug 2014 11:33:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270874 - in head/sys: dev/netmap net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 11:33:20 -0000 Author: glebius Date: Sun Aug 31 11:33:19 2014 New Revision: 270874 URL: http://svnweb.freebsd.org/changeset/base/270874 Log: Provide pointer from struct ifnet to struct netmap_adapter, instead of abusing spare field. Modified: head/sys/dev/netmap/netmap_kern.h head/sys/net/if_var.h Modified: head/sys/dev/netmap/netmap_kern.h ============================================================================== --- head/sys/dev/netmap/netmap_kern.h Sun Aug 31 10:42:52 2014 (r270873) +++ head/sys/dev/netmap/netmap_kern.h Sun Aug 31 11:33:19 2014 (r270874) @@ -1187,7 +1187,7 @@ extern int netmap_generic_rings; * WNA is used to write it. */ #ifndef WNA -#define WNA(_ifp) (_ifp)->if_pspare[0] +#define WNA(_ifp) (_ifp)->if_netmap #endif #define NA(_ifp) ((struct netmap_adapter *)WNA(_ifp)) Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Sun Aug 31 10:42:52 2014 (r270873) +++ head/sys/net/if_var.h Sun Aug 31 11:33:19 2014 (r270874) @@ -67,6 +67,7 @@ struct ifvlantrunk; struct route; /* if_output */ struct vnet; struct ifmedia; +struct netmap_adapter; #ifdef _KERNEL #include /* ifqueue only? */ @@ -202,6 +203,7 @@ struct ifnet { void *if_pf_kif; /* pf glue */ struct carp_if *if_carp; /* carp interface structure */ struct label *if_label; /* interface MAC label */ + struct netmap_adapter *if_netmap; /* netmap(4) softc */ /* Various procedures of the layer2 encapsulation and drivers. */ int (*if_output) /* output routine (enqueue) */ From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 12:21:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8331CE42; Sun, 31 Aug 2014 12:21:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53A641F85; Sun, 31 Aug 2014 12:21:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VCLfhP006626; Sun, 31 Aug 2014 12:21:41 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VCLfpJ006625; Sun, 31 Aug 2014 12:21:41 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201408311221.s7VCLfpJ006625@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sun, 31 Aug 2014 12:21:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270875 - stable/9/usr.sbin/mountd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 12:21:41 -0000 Author: rmacklem Date: Sun Aug 31 12:21:40 2014 New Revision: 270875 URL: http://svnweb.freebsd.org/changeset/base/270875 Log: MFC: r270005 Try to clarify how file systems are exported for NFSv4. This is a content change. Modified: stable/9/usr.sbin/mountd/exports.5 Directory Properties: stable/9/usr.sbin/mountd/ (props changed) Modified: stable/9/usr.sbin/mountd/exports.5 ============================================================================== --- stable/9/usr.sbin/mountd/exports.5 Sun Aug 31 11:33:19 2014 (r270874) +++ stable/9/usr.sbin/mountd/exports.5 Sun Aug 31 12:21:40 2014 (r270875) @@ -28,7 +28,7 @@ .\" @(#)exports.5 8.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd December 23, 2012 +.Dd August 14, 2014 .Dt EXPORTS 5 .Os .Sh NAME @@ -91,10 +91,10 @@ option is used on Because NFSv4 does not use the mount protocol, the .Dq administrative controls -are not applied. -Thus, all the above export line(s) should be considered to have the +are not applied and all directories within this server +file system are mountable via NFSv4 even if the .Fl alldirs -flag, even if the line is specified without it. +flag has not been specified. The third form has the string ``V4:'' followed by a single absolute path name, to specify the NFSv4 tree root. This line does not export any file system, but simply marks where the root @@ -310,7 +310,8 @@ interface. For the third form which specifies the NFSv4 tree root, the directory path specifies the location within the server's file system tree which is the root of the NFSv4 tree. -All entries of this form must specify the same directory path. +There can only be one NFSv4 root directory per server. +As such, all entries of this form must specify the same directory path. For file systems other than ZFS, this location can be any directory and does not need to be within an exported file system. If it is not in an exported From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 12:48:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 442593B0; Sun, 31 Aug 2014 12:48:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DBD7123E; Sun, 31 Aug 2014 12:48:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VCmFXF018776; Sun, 31 Aug 2014 12:48:15 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VCmEw6018764; Sun, 31 Aug 2014 12:48:14 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201408311248.s7VCmEw6018764@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 31 Aug 2014 12:48:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270876 - in head/sys: dev/bge dev/bxe dev/e1000 dev/fxp dev/mii dev/nfe net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 12:48:16 -0000 Author: glebius Date: Sun Aug 31 12:48:13 2014 New Revision: 270876 URL: http://svnweb.freebsd.org/changeset/base/270876 Log: It is actually possible to have if_t a typedef to non-void type, and keep both converted to drvapi and non-converted drivers compilable. o Make if_t typedef to struct ifnet *. o Remove shim functions. Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/dev/bge/if_bge.c head/sys/dev/bxe/bxe.c head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_lem.c head/sys/dev/fxp/if_fxp.c head/sys/dev/mii/mii.c head/sys/dev/nfe/if_nfe.c head/sys/net/if.c head/sys/net/if_var.h Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Sun Aug 31 12:21:40 2014 (r270875) +++ head/sys/dev/bge/if_bge.c Sun Aug 31 12:48:13 2014 (r270876) @@ -3837,7 +3837,7 @@ bge_attach(device_t dev) sc->bge_phy_flags |= BGE_PHY_NO_WIRESPEED; if (sc->bge_flags & BGE_FLAG_TBI) { - ifmedia_init_drv(&sc->bge_ifmedia, IFM_IMASK, bge_ifmedia_upd, + ifmedia_init(&sc->bge_ifmedia, IFM_IMASK, bge_ifmedia_upd, bge_ifmedia_sts); ifmedia_add(&sc->bge_ifmedia, IFM_ETHER | IFM_1000_SX, 0, NULL); ifmedia_add(&sc->bge_ifmedia, IFM_ETHER | IFM_1000_SX | IFM_FDX, Modified: head/sys/dev/bxe/bxe.c ============================================================================== --- head/sys/dev/bxe/bxe.c Sun Aug 31 12:21:40 2014 (r270875) +++ head/sys/dev/bxe/bxe.c Sun Aug 31 12:48:13 2014 (r270876) @@ -4934,7 +4934,7 @@ bxe_ioctl(if_t ifp, BLOGD(sc, DBG_IOCTL, "Received SIOCSIFMEDIA/SIOCGIFMEDIA ioctl (cmd=%lu)\n", (command & 0xff)); - error = ifmedia_ioctl_drv(ifp, ifr, &sc->ifmedia, command); + error = ifmedia_ioctl(ifp, ifr, &sc->ifmedia, command); break; case SIOCGPRIVATE_0: @@ -4970,7 +4970,7 @@ bxe_ioctl(if_t ifp, default: BLOGD(sc, DBG_IOCTL, "Received Unknown Ioctl (cmd=%lu)\n", (command & 0xff)); - error = ether_ioctl_drv(ifp, command, data); + error = ether_ioctl(ifp, command, data); break; } @@ -6095,7 +6095,7 @@ bxe_mq_flush(struct ifnet *ifp) } } - if_qflush_drv(ifp); + if_qflush(ifp); } #endif /* FreeBSD_version >= 800000 */ @@ -12254,7 +12254,7 @@ bxe_link_report_locked(struct bxe_softc if (bxe_test_bit(BXE_LINK_REPORT_LINK_DOWN, &cur_data.link_report_flags)) { - if_linkstate_change_drv(sc->ifp, LINK_STATE_DOWN); + if_link_state_change(sc->ifp, LINK_STATE_DOWN); BLOGI(sc, "NIC Link is Down\n"); } else { const char *duplex; @@ -12295,7 +12295,7 @@ bxe_link_report_locked(struct bxe_softc flow = "none"; } - if_linkstate_change_drv(sc->ifp, LINK_STATE_UP); + if_link_state_change(sc->ifp, LINK_STATE_UP); BLOGI(sc, "NIC Link is Up, %d Mbps %s duplex, Flow control: %s\n", cur_data.line_speed, duplex, flow); } @@ -12581,7 +12581,7 @@ bxe_set_uc_list(struct bxe_softc *sc) #if __FreeBSD_version < 800000 IF_ADDR_LOCK(ifp); #else - if_addr_rlock_drv(ifp); + if_addr_rlock(ifp); #endif /* first schedule a cleanup up of old configuration */ @@ -12591,7 +12591,7 @@ bxe_set_uc_list(struct bxe_softc *sc) #if __FreeBSD_version < 800000 IF_ADDR_UNLOCK(ifp); #else - if_addr_runlock_drv(ifp); + if_addr_runlock(ifp); #endif return (rc); } @@ -12614,7 +12614,7 @@ bxe_set_uc_list(struct bxe_softc *sc) #if __FreeBSD_version < 800000 IF_ADDR_UNLOCK(ifp); #else - if_addr_runlock_drv(ifp); + if_addr_runlock(ifp); #endif return (rc); } @@ -12625,7 +12625,7 @@ bxe_set_uc_list(struct bxe_softc *sc) #if __FreeBSD_version < 800000 IF_ADDR_UNLOCK(ifp); #else - if_addr_runlock_drv(ifp); + if_addr_runlock(ifp); #endif /* Execute the pending commands */ @@ -13275,7 +13275,7 @@ bxe_init_ifnet(struct bxe_softc *sc) } if_setsoftc(ifp, sc); - if_initname_drv(ifp, device_get_name(sc->dev), device_get_unit(sc->dev)); + if_initname(ifp, device_get_name(sc->dev), device_get_unit(sc->dev)); if_setflags(ifp, (IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST)); if_setioctlfn(ifp, bxe_ioctl); if_setstartfn(ifp, bxe_tx_start); @@ -13325,7 +13325,7 @@ bxe_init_ifnet(struct bxe_softc *sc) sc->ifp = ifp; /* attach to the Ethernet interface list */ - ether_ifattach_drv(ifp, sc->link_params.mac_addr); + ether_ifattach(ifp, sc->link_params.mac_addr); return (0); } @@ -16391,7 +16391,7 @@ bxe_attach(device_t dev) /* allocate device interrupts */ if (bxe_interrupt_alloc(sc) != 0) { if (sc->ifp != NULL) { - ether_ifdetach_drv(sc->ifp); + ether_ifdetach(sc->ifp); } ifmedia_removeall(&sc->ifmedia); bxe_release_mutexes(sc); @@ -16404,7 +16404,7 @@ bxe_attach(device_t dev) if (bxe_alloc_ilt_mem(sc) != 0) { bxe_interrupt_free(sc); if (sc->ifp != NULL) { - ether_ifdetach_drv(sc->ifp); + ether_ifdetach(sc->ifp); } ifmedia_removeall(&sc->ifmedia); bxe_release_mutexes(sc); @@ -16418,7 +16418,7 @@ bxe_attach(device_t dev) bxe_free_ilt_mem(sc); bxe_interrupt_free(sc); if (sc->ifp != NULL) { - ether_ifdetach_drv(sc->ifp); + ether_ifdetach(sc->ifp); } ifmedia_removeall(&sc->ifmedia); bxe_release_mutexes(sc); @@ -16508,7 +16508,7 @@ bxe_detach(device_t dev) /* release the network interface */ if (ifp != NULL) { - ether_ifdetach_drv(ifp); + ether_ifdetach(ifp); } ifmedia_removeall(&sc->ifmedia); @@ -16531,7 +16531,7 @@ bxe_detach(device_t dev) /* Release the FreeBSD interface. */ if (sc->ifp != NULL) { - if_free_drv(sc->ifp); + if_free(sc->ifp); } pci_disable_busmaster(dev); Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Sun Aug 31 12:21:40 2014 (r270875) +++ head/sys/dev/e1000/if_em.c Sun Aug 31 12:48:13 2014 (r270876) @@ -751,7 +751,7 @@ err_late: em_free_receive_structures(adapter); em_release_hw_control(adapter); if (adapter->ifp != (void *)NULL) - if_free_drv(adapter->ifp); + if_free(adapter->ifp); err_pci: em_free_pci_resources(adapter); free(adapter->mta, M_DEVBUF); @@ -809,7 +809,7 @@ em_detach(device_t dev) if (adapter->vlan_detach != NULL) EVENTHANDLER_DEREGISTER(vlan_unconfig, adapter->vlan_detach); - ether_ifdetach_drv(adapter->ifp); + ether_ifdetach(adapter->ifp); callout_drain(&adapter->timer); #ifdef DEV_NETMAP @@ -818,7 +818,7 @@ em_detach(device_t dev) em_free_pci_resources(adapter); bus_generic_detach(dev); - if_free_drv(ifp); + if_free(ifp); em_free_transmit_structures(adapter); em_free_receive_structures(adapter); @@ -1100,10 +1100,10 @@ em_ioctl(if_t ifp, u_long command, caddr em_init(adapter); #ifdef INET if (!(if_getflags(ifp) & IFF_NOARP)) - arp_ifinit_drv(ifp, ifa); + arp_ifinit(ifp, ifa); #endif } else - error = ether_ioctl_drv(ifp, command, data); + error = ether_ioctl(ifp, command, data); break; case SIOCSIFMTU: { @@ -1195,7 +1195,7 @@ em_ioctl(if_t ifp, u_long command, caddr case SIOCGIFMEDIA: IOCTL_DEBUGOUT("ioctl rcv'd: \ SIOCxIFMEDIA (Get/Set Interface Media)"); - error = ifmedia_ioctl_drv(ifp, ifr, &adapter->media, command); + error = ifmedia_ioctl(ifp, ifr, &adapter->media, command); break; case SIOCSIFCAP: { @@ -1258,7 +1258,7 @@ em_ioctl(if_t ifp, u_long command, caddr } default: - error = ether_ioctl_drv(ifp, command, data); + error = ether_ioctl(ifp, command, data); break; } @@ -2331,7 +2331,7 @@ em_update_link_status(struct adapter *ad adapter->link_active = 1; adapter->smartspeed = 0; if_setbaudrate(ifp, adapter->link_speed * 1000000); - if_linkstate_change_drv(ifp, LINK_STATE_UP); + if_link_state_change(ifp, LINK_STATE_UP); } else if (!link_check && (adapter->link_active == 1)) { if_setbaudrate(ifp, 0); adapter->link_speed = 0; @@ -2342,7 +2342,7 @@ em_update_link_status(struct adapter *ad /* Link down, disable watchdog */ for (int i = 0; i < adapter->num_queues; i++, txr++) txr->queue_status = EM_QUEUE_IDLE; - if_linkstate_change_drv(ifp, LINK_STATE_DOWN); + if_link_state_change(ifp, LINK_STATE_DOWN); } } @@ -2934,7 +2934,7 @@ em_setup_interface(device_t dev, struct device_printf(dev, "can not allocate ifnet structure\n"); return (-1); } - if_initname_drv(ifp, device_get_name(dev), device_get_unit(dev)); + if_initname(ifp, device_get_name(dev), device_get_unit(dev)); if_setdev(ifp, dev); if_setinitfn(ifp, em_init); if_setsoftc(ifp, adapter); @@ -2950,7 +2950,7 @@ em_setup_interface(device_t dev, struct if_setsendqready(ifp); #endif - ether_ifattach_drv(ifp, adapter->hw.mac.addr); + ether_ifattach(ifp, adapter->hw.mac.addr); if_setcapabilities(ifp, 0); if_setcapenable(ifp, 0); @@ -2991,7 +2991,7 @@ em_setup_interface(device_t dev, struct * Specify the media types supported by this adapter and register * callbacks to update media and link information */ - ifmedia_init_drv(&adapter->media, IFM_IMASK, + ifmedia_init(&adapter->media, IFM_IMASK, em_media_change, em_media_status); if ((adapter->hw.phy.media_type == e1000_media_type_fiber) || (adapter->hw.phy.media_type == e1000_media_type_internal_serdes)) { Modified: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Sun Aug 31 12:21:40 2014 (r270875) +++ head/sys/dev/e1000/if_lem.c Sun Aug 31 12:48:13 2014 (r270876) @@ -752,7 +752,7 @@ err_csb: err_pci: if (adapter->ifp != (void *)NULL) - if_free_drv(adapter->ifp); + if_free(adapter->ifp); lem_free_pci_resources(adapter); free(adapter->mta, M_DEVBUF); EM_TX_LOCK_DESTROY(adapter); @@ -811,7 +811,7 @@ lem_detach(device_t dev) if (adapter->vlan_detach != NULL) EVENTHANDLER_DEREGISTER(vlan_unconfig, adapter->vlan_detach); - ether_ifdetach_drv(adapter->ifp); + ether_ifdetach(adapter->ifp); callout_drain(&adapter->timer); callout_drain(&adapter->tx_fifo_timer); @@ -820,7 +820,7 @@ lem_detach(device_t dev) #endif /* DEV_NETMAP */ lem_free_pci_resources(adapter); bus_generic_detach(dev); - if_free_drv(ifp); + if_free(ifp); lem_free_transmit_structures(adapter); lem_free_receive_structures(adapter); @@ -1020,10 +1020,10 @@ lem_ioctl(if_t ifp, u_long command, cadd lem_init(adapter); #ifdef INET if (!(if_getflags(ifp) & IFF_NOARP)) - arp_ifinit_drv(ifp, ifa); + arp_ifinit(ifp, ifa); #endif } else - error = ether_ioctl_drv(ifp, command, data); + error = ether_ioctl(ifp, command, data); break; case SIOCSIFMTU: { @@ -1106,7 +1106,7 @@ lem_ioctl(if_t ifp, u_long command, cadd case SIOCGIFMEDIA: IOCTL_DEBUGOUT("ioctl rcv'd: \ SIOCxIFMEDIA (Get/Set Interface Media)"); - error = ifmedia_ioctl_drv(ifp, ifr, &adapter->media, command); + error = ifmedia_ioctl(ifp, ifr, &adapter->media, command); break; case SIOCSIFCAP: { @@ -1157,7 +1157,7 @@ lem_ioctl(if_t ifp, u_long command, cadd } default: - error = ether_ioctl_drv(ifp, command, data); + error = ether_ioctl(ifp, command, data); break; } @@ -2159,7 +2159,7 @@ lem_update_link_status(struct adapter *a adapter->link_active = 1; adapter->smartspeed = 0; if_setbaudrate(ifp, adapter->link_speed * 1000000); - if_linkstate_change_drv(ifp, LINK_STATE_UP); + if_link_state_change(ifp, LINK_STATE_UP); } else if (!link_check && (adapter->link_active == 1)) { if_setbaudrate(ifp, 0); adapter->link_speed = 0; @@ -2169,7 +2169,7 @@ lem_update_link_status(struct adapter *a adapter->link_active = 0; /* Link down, disable watchdog */ adapter->watchdog_check = FALSE; - if_linkstate_change_drv(ifp, LINK_STATE_DOWN); + if_link_state_change(ifp, LINK_STATE_DOWN); } } @@ -2458,7 +2458,7 @@ lem_setup_interface(device_t dev, struct device_printf(dev, "can not allocate ifnet structure\n"); return (-1); } - if_initname_drv(ifp, device_get_name(dev), device_get_unit(dev)); + if_initname(ifp, device_get_name(dev), device_get_unit(dev)); if_setinitfn(ifp, lem_init); if_setsoftc(ifp, adapter); if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); @@ -2467,7 +2467,7 @@ lem_setup_interface(device_t dev, struct if_setsendqlen(ifp, adapter->num_tx_desc - 1); if_setsendqready(ifp); - ether_ifattach_drv(ifp, adapter->hw.mac.addr); + ether_ifattach(ifp, adapter->hw.mac.addr); if_setcapabilities(ifp, 0); @@ -2507,7 +2507,7 @@ lem_setup_interface(device_t dev, struct * Specify the media types supported by this adapter and register * callbacks to update media and link information */ - ifmedia_init_drv(&adapter->media, IFM_IMASK, + ifmedia_init(&adapter->media, IFM_IMASK, lem_media_change, lem_media_status); if ((adapter->hw.phy.media_type == e1000_media_type_fiber) || (adapter->hw.phy.media_type == e1000_media_type_internal_serdes)) { Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Sun Aug 31 12:21:40 2014 (r270875) +++ head/sys/dev/fxp/if_fxp.c Sun Aug 31 12:48:13 2014 (r270876) @@ -439,7 +439,7 @@ fxp_attach(device_t dev) mtx_init(&sc->sc_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, MTX_DEF); callout_init_mtx(&sc->stat_ch, &sc->sc_mtx, 0); - ifmedia_init_drv(&sc->sc_media, 0, fxp_serial_ifmedia_upd, + ifmedia_init(&sc->sc_media, 0, fxp_serial_ifmedia_upd, fxp_serial_ifmedia_sts); ifp = sc->ifp = if_gethandle(IFT_ETHER); @@ -837,7 +837,7 @@ fxp_attach(device_t dev) } } - if_initname_drv(ifp, device_get_name(dev), device_get_unit(dev)); + if_initname(ifp, device_get_name(dev), device_get_unit(dev)); if_setdev(ifp, dev); if_setinitfn(ifp, fxp_init); if_setsoftc(ifp, sc); @@ -873,7 +873,7 @@ fxp_attach(device_t dev) /* * Attach the interface. */ - ether_ifattach_drv(ifp, eaddr); + ether_ifattach(ifp, eaddr); /* * Tell the upper layer(s) we support long frames. @@ -904,7 +904,7 @@ fxp_attach(device_t dev) NULL, fxp_intr, sc, &sc->ih); if (error) { device_printf(dev, "could not setup irq\n"); - ether_ifdetach_drv(sc->ifp); + ether_ifdetach(sc->ifp); goto fail; } @@ -993,7 +993,7 @@ fxp_release(struct fxp_softc *sc) if (sc->mcs_tag) bus_dma_tag_destroy(sc->mcs_tag); if (sc->ifp) - if_free_drv(sc->ifp); + if_free(sc->ifp); mtx_destroy(&sc->sc_mtx); } @@ -1023,7 +1023,7 @@ fxp_detach(device_t dev) /* * Close down routes etc. */ - ether_ifdetach_drv(sc->ifp); + ether_ifdetach(sc->ifp); /* * Unhook interrupt before dropping lock. This is to prevent @@ -2874,10 +2874,10 @@ fxp_ioctl(if_t ifp, u_long command, cadd case SIOCGIFMEDIA: if (sc->miibus != NULL) { mii = device_get_softc(sc->miibus); - error = ifmedia_ioctl_drv(ifp, ifr, + error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command); } else { - error = ifmedia_ioctl_drv(ifp, ifr, &sc->sc_media, command); + error = ifmedia_ioctl(ifp, ifr, &sc->sc_media, command); } break; @@ -2966,7 +2966,7 @@ fxp_ioctl(if_t ifp, u_long command, cadd break; default: - error = ether_ioctl_drv(ifp, command, data); + error = ether_ioctl(ifp, command, data); } return (error); } Modified: head/sys/dev/mii/mii.c ============================================================================== --- head/sys/dev/mii/mii.c Sun Aug 31 12:21:40 2014 (r270875) +++ head/sys/dev/mii/mii.c Sun Aug 31 12:48:13 2014 (r270876) @@ -330,7 +330,7 @@ miibus_linkchg(device_t dev) link_state = LINK_STATE_DOWN; } else link_state = LINK_STATE_UNKNOWN; - if_linkstate_change_drv(mii->mii_ifp, link_state); + if_link_state_change(mii->mii_ifp, link_state); } static void @@ -358,7 +358,7 @@ miibus_mediainit(device_t dev) * the PHYs to the network interface driver parent. */ int -mii_attach(device_t dev, device_t *miibus, void *ifp, +mii_attach(device_t dev, device_t *miibus, if_t ifp, ifm_change_cb_t ifmedia_upd, ifm_stat_cb_t ifmedia_sts, int capmask, int phyloc, int offloc, int flags) { Modified: head/sys/dev/nfe/if_nfe.c ============================================================================== --- head/sys/dev/nfe/if_nfe.c Sun Aug 31 12:21:40 2014 (r270875) +++ head/sys/dev/nfe/if_nfe.c Sun Aug 31 12:48:13 2014 (r270876) @@ -591,7 +591,7 @@ nfe_attach(device_t dev) nfe_sysctl_node(sc); if_setsoftc(ifp, sc); - if_initname_drv(ifp, device_get_name(dev), device_get_unit(dev)); + if_initname(ifp, device_get_name(dev), device_get_unit(dev)); if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); if_setioctlfn(ifp, nfe_ioctl); if_setstartfn(ifp, nfe_start); @@ -624,8 +624,8 @@ nfe_attach(device_t dev) /* * Tell the upper layer(s) we support long frames. - * Must appear after the call to ether_ifattach_drv() because - * ether_ifattach_drv() sets ifi_hdrlen to the default value. + * Must appear after the call to ether_ifattach() because + * ether_ifattach() sets ifi_hdrlen to the default value. */ if_setifheaderlen(ifp, sizeof(struct ether_vlan_header)); @@ -649,7 +649,7 @@ nfe_attach(device_t dev) device_printf(dev, "attaching PHYs failed\n"); goto fail; } - ether_ifattach_drv(ifp, sc->eaddr); + ether_ifattach(ifp, sc->eaddr); TASK_INIT(&sc->nfe_int_task, 0, nfe_int_task, sc); sc->nfe_tq = taskqueue_create_fast("nfe_taskq", M_WAITOK, @@ -674,7 +674,7 @@ nfe_attach(device_t dev) device_printf(dev, "couldn't set up irq\n"); taskqueue_free(sc->nfe_tq); sc->nfe_tq = NULL; - ether_ifdetach_drv(ifp); + ether_ifdetach(ifp); goto fail; } @@ -708,7 +708,7 @@ nfe_detach(device_t dev) if_setflagbits(ifp, 0, IFF_UP); NFE_UNLOCK(sc); callout_drain(&sc->nfe_stat_ch); - ether_ifdetach_drv(ifp); + ether_ifdetach(ifp); } if (ifp) { @@ -720,7 +720,7 @@ nfe_detach(device_t dev) } else bcopy(sc->eaddr, eaddr, ETHER_ADDR_LEN); nfe_set_macaddr(sc, eaddr); - if_free_drv(ifp); + if_free(ifp); } if (sc->nfe_miibus) device_delete_child(dev, sc->nfe_miibus); @@ -1775,7 +1775,7 @@ nfe_ioctl(if_t ifp, u_long cmd, caddr_t case SIOCSIFMEDIA: case SIOCGIFMEDIA: mii = device_get_softc(sc->nfe_miibus); - error = ifmedia_ioctl_drv(ifp, ifr, &mii->mii_media, cmd); + error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, cmd); break; case SIOCSIFCAP: mask = ifr->ifr_reqcap ^ if_getcapenable(ifp); @@ -1853,7 +1853,7 @@ nfe_ioctl(if_t ifp, u_long cmd, caddr_t if_vlancap(ifp); break; default: - error = ether_ioctl_drv(ifp, cmd, data); + error = ether_ioctl(ifp, cmd, data); break; } Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Sun Aug 31 12:21:40 2014 (r270875) +++ head/sys/net/if.c Sun Aug 31 12:48:13 2014 (r270876) @@ -3529,9 +3529,8 @@ if_deregister_com_alloc(u_char type) /* API for driver access to network stack owned ifnet.*/ uint64_t -if_setbaudrate(void *arg, uint64_t baudrate) +if_setbaudrate(struct ifnet *ifp, uint64_t baudrate) { - struct ifnet *ifp = arg; uint64_t oldbrate; oldbrate = ifp->if_baudrate; @@ -4035,13 +4034,13 @@ if_setinitfn(if_t ifp, void (*init_fn)(v } void -if_setioctlfn(if_t ifp, int (*ioctl_fn)(void *, u_long, caddr_t)) +if_setioctlfn(if_t ifp, int (*ioctl_fn)(if_t, u_long, caddr_t)) { ((struct ifnet *)ifp)->if_ioctl = (void *)ioctl_fn; } void -if_setstartfn(if_t ifp, void (*start_fn)(void *)) +if_setstartfn(if_t ifp, void (*start_fn)(if_t)) { ((struct ifnet *)ifp)->if_start = (void *)start_fn; } @@ -4058,90 +4057,6 @@ void if_setqflushfn(if_t ifp, if_qflush_ } -/* These wrappers are hopefully temporary, till all drivers use drvapi */ -#ifdef INET -void -arp_ifinit_drv(if_t ifh, struct ifaddr *ifa) -{ - arp_ifinit((struct ifnet *)ifh, ifa); -} -#endif - -void -ether_ifattach_drv(if_t ifh, const u_int8_t *lla) -{ - ether_ifattach((struct ifnet *)ifh, lla); -} - -void -ether_ifdetach_drv(if_t ifh) -{ - ether_ifdetach((struct ifnet *)ifh); -} - -int -ether_ioctl_drv(if_t ifh, u_long cmd, caddr_t data) -{ - struct ifnet *ifp = (struct ifnet *)ifh; - - return (ether_ioctl(ifp, cmd, data)); -} - -int -ifmedia_ioctl_drv(if_t ifh, struct ifreq *ifr, struct ifmedia *ifm, - u_long cmd) -{ - struct ifnet *ifp = (struct ifnet *)ifh; - - return (ifmedia_ioctl(ifp, ifr, ifm, cmd)); -} - -void -if_free_drv(if_t ifh) -{ - if_free((struct ifnet *)ifh); -} - -void -if_initname_drv(if_t ifh, const char *name, int unit) -{ - if_initname((struct ifnet *)ifh, name, unit); -} - -void -if_linkstate_change_drv(if_t ifh, int link_state) -{ - if_link_state_change((struct ifnet *)ifh, link_state); -} - -void -ifmedia_init_drv(struct ifmedia *ifm, int ncmask, int (*chg_cb)(void *), - void (*sts_cb)(void *, struct ifmediareq *)) -{ - ifmedia_init(ifm, ncmask, (ifm_change_cb_t)chg_cb, - (ifm_stat_cb_t)sts_cb); -} - -void -if_addr_rlock_drv(if_t ifh) -{ - - if_addr_runlock((struct ifnet *)ifh); -} - -void -if_addr_runlock_drv(if_t ifh) -{ - if_addr_runlock((struct ifnet *)ifh); -} - -void -if_qflush_drv(if_t ifh) -{ - if_qflush((struct ifnet *)ifh); - -} - /* Revisit these - These are inline functions originally. */ int drbr_inuse_drv(if_t ifh, struct buf_ring *br) Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Sun Aug 31 12:21:40 2014 (r270875) +++ head/sys/net/if_var.h Sun Aug 31 12:48:13 2014 (r270876) @@ -110,15 +110,14 @@ typedef enum { IFCOUNTER_NOPROTO, } ifnet_counter; -typedef void (*if_start_fn_t)(struct ifnet *); -typedef int (*if_ioctl_fn_t)(struct ifnet *, u_long, caddr_t); -typedef void (*if_init_fn_t)(void *); -typedef void (*if_qflush_fn_t)(struct ifnet *); -typedef int (*if_transmit_fn_t)(struct ifnet *, struct mbuf *); -typedef uint64_t (*if_get_counter_t)(struct ifnet *, ifnet_counter); +typedef struct ifnet * if_t; -/* Opaque object pointing to interface structure (ifnet) */ -typedef void *if_t; +typedef void (*if_start_fn_t)(if_t); +typedef int (*if_ioctl_fn_t)(if_t, u_long, caddr_t); +typedef void (*if_init_fn_t)(void *); +typedef void (*if_qflush_fn_t)(if_t); +typedef int (*if_transmit_fn_t)(if_t, struct mbuf *); +typedef uint64_t (*if_get_counter_t)(if_t, ifnet_counter); /* * Structure defining a network interface. @@ -585,9 +584,6 @@ int if_multiaddr_count(if_t ifp, int max int if_getamcount(if_t ifp); struct ifaddr * if_getifaddr(if_t ifp); -/* Shim for drivers using drvapi */ -int ifmedia_ioctl_drv(if_t ifp, struct ifreq *ifr, struct ifmedia *ifm, - u_long cmd); /* Statistics */ @@ -612,29 +608,11 @@ int if_setimcasts(if_t ifp, int pkts); /* Functions */ void if_setinitfn(if_t ifp, void (*)(void *)); -void if_setioctlfn(if_t ifp, int (*)(void *, u_long, caddr_t)); -void if_setstartfn(if_t ifp, void (*)(void *)); +void if_setioctlfn(if_t ifp, int (*)(if_t, u_long, caddr_t)); +void if_setstartfn(if_t ifp, void (*)(if_t)); void if_settransmitfn(if_t ifp, if_transmit_fn_t); void if_setqflushfn(if_t ifp, if_qflush_fn_t); - -/* Shim functions till all drivers use drvapi */ -void arp_ifinit_drv(if_t ifp, struct ifaddr *ifa); -void ether_ifattach_drv(if_t ifp, const u_int8_t *lla); -void ether_ifdetach_drv(if_t ifp); -int ether_ioctl_drv(if_t ifp, u_long cmd, caddr_t data); -void if_free_drv(if_t ifp); -void if_initname_drv(if_t ifp, const char *name, int unit); -void if_linkstate_change_drv(if_t ifp, int link_state); - -struct ifmedia; -void ifmedia_init_drv(struct ifmedia *, int, int (*)(void *), - void (*)(void *, struct ifmediareq *)); - -void if_addr_rlock_drv(if_t ifp); -void if_addr_runlock_drv(if_t ifp); -void if_qflush_drv(if_t ifp); - /* Revisit the below. These are inline functions originally */ int drbr_inuse_drv(if_t ifp, struct buf_ring *br); struct mbuf* drbr_dequeue_drv(if_t ifp, struct buf_ring *br); From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 13:30:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 870872C5; Sun, 31 Aug 2014 13:30:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7270F17FE; Sun, 31 Aug 2014 13:30:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VDUtOP040606; Sun, 31 Aug 2014 13:30:55 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VDUtLH040605; Sun, 31 Aug 2014 13:30:55 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201408311330.s7VDUtLH040605@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sun, 31 Aug 2014 13:30:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270877 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 13:30:55 -0000 Author: glebius Date: Sun Aug 31 13:30:54 2014 New Revision: 270877 URL: http://svnweb.freebsd.org/changeset/base/270877 Log: Toss fields so that no padding field is required to achieve alignment. Modified: head/sys/net/if_var.h Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Sun Aug 31 12:48:13 2014 (r270876) +++ head/sys/net/if_var.h Sun Aug 31 13:30:54 2014 (r270877) @@ -146,11 +146,11 @@ struct ifnet { /* Variable fields that are touched by the stack and drivers. */ int if_flags; /* up/down, broadcast, etc. */ + int if_drv_flags; /* driver-managed status flags */ int if_capabilities; /* interface features & capabilities */ int if_capenable; /* enabled features & capabilities */ void *if_linkmib; /* link-type-specific MIB data */ size_t if_linkmiblen; /* length of above data */ - int if_drv_flags; /* driver-managed status flags */ u_int if_refcount; /* reference count */ /* These fields are shared with struct if_data. */ @@ -158,7 +158,6 @@ struct ifnet { uint8_t if_addrlen; /* media address length */ uint8_t if_hdrlen; /* media header length */ uint8_t if_link_state; /* current link state */ - uint32_t if_spare32; uint32_t if_mtu; /* maximum transmission unit */ uint32_t if_metric; /* routing metric (external only) */ uint64_t if_baudrate; /* linespeed */ From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 13:59:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38BA3E25; Sun, 31 Aug 2014 13:59:19 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DF8CF1A36; Sun, 31 Aug 2014 13:59:18 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id C3D7D25D37C3; Sun, 31 Aug 2014 13:59:15 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 88032C770B1; Sun, 31 Aug 2014 13:59:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id yB2HQoJly743; Sun, 31 Aug 2014 13:59:12 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:f973:5b8d:9a90:cf0f] (unknown [IPv6:fde9:577b:c1a9:4410:f973:5b8d:9a90:cf0f]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 1843BC770B0; Sun, 31 Aug 2014 13:59:10 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r270877 - head/sys/net From: "Bjoern A. Zeeb" In-Reply-To: <201408311330.s7VDUtLH040605@svn.freebsd.org> Date: Sun, 31 Aug 2014 13:58:39 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <1EC00F70-7E6E-448F-AE85-BE87A3C753A1@FreeBSD.org> References: <201408311330.s7VDUtLH040605@svn.freebsd.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 13:59:19 -0000 On 31 Aug 2014, at 13:30 , Gleb Smirnoff wrote: > Author: glebius > Date: Sun Aug 31 13:30:54 2014 > New Revision: 270877 > URL: http://svnweb.freebsd.org/changeset/base/270877 >=20 > Log: > Toss fields so that no padding field is required to achieve = alignment. >=20 > Modified: > head/sys/net/if_var.h >=20 > Modified: head/sys/net/if_var.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/net/if_var.h Sun Aug 31 12:48:13 2014 = (r270876) > +++ head/sys/net/if_var.h Sun Aug 31 13:30:54 2014 = (r270877) > @@ -146,11 +146,11 @@ struct ifnet { >=20 > /* Variable fields that are touched by the stack and drivers. */ > int if_flags; /* up/down, broadcast, etc. */ > + int if_drv_flags; /* driver-managed status flags = */ > int if_capabilities; /* interface features & = capabilities */ > int if_capenable; /* enabled features & = capabilities */ > void *if_linkmib; /* link-type-specific MIB data = */ > size_t if_linkmiblen; /* length of above data */ > - int if_drv_flags; /* driver-managed status flags = */ > u_int if_refcount; /* reference count */ >=20 > /* These fields are shared with struct if_data. */ > @@ -158,7 +158,6 @@ struct ifnet { > uint8_t if_addrlen; /* media address length */ > uint8_t if_hdrlen; /* media header length */ > uint8_t if_link_state; /* current link state */ > - uint32_t if_spare32; Doesn=92t this leave a gap on 64bit alignment now again? > uint32_t if_mtu; /* maximum transmission unit */ > uint32_t if_metric; /* routing metric (external = only) */ > uint64_t if_baudrate; /* linespeed */ >=20 =97=20 Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983 From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 14:04:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E880DFED; Sun, 31 Aug 2014 14:04:30 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9A4DB1AEC; Sun, 31 Aug 2014 14:04:30 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 138A325D388C; Sun, 31 Aug 2014 14:04:27 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 2871BC770B1; Sun, 31 Aug 2014 14:04:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id vQ6LRbUSBBIO; Sun, 31 Aug 2014 14:04:25 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:f973:5b8d:9a90:cf0f] (unknown [IPv6:fde9:577b:c1a9:4410:f973:5b8d:9a90:cf0f]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id C1068C770B0; Sun, 31 Aug 2014 14:04:23 +0000 (UTC) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r270877 - head/sys/net From: "Bjoern A. Zeeb" In-Reply-To: <1EC00F70-7E6E-448F-AE85-BE87A3C753A1@FreeBSD.org> Date: Sun, 31 Aug 2014 14:03:59 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201408311330.s7VDUtLH040605@svn.freebsd.org> <1EC00F70-7E6E-448F-AE85-BE87A3C753A1@FreeBSD.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 14:04:31 -0000 On 31 Aug 2014, at 13:58 , Bjoern A. Zeeb wrote: >=20 > On 31 Aug 2014, at 13:30 , Gleb Smirnoff wrote: >=20 >> Author: glebius >> Date: Sun Aug 31 13:30:54 2014 >> New Revision: 270877 >> URL: http://svnweb.freebsd.org/changeset/base/270877 >>=20 >> Log: >> Toss fields so that no padding field is required to achieve = alignment. >>=20 >> Modified: >> head/sys/net/if_var.h >>=20 >> Modified: head/sys/net/if_var.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/net/if_var.h Sun Aug 31 12:48:13 2014 = (r270876) >> +++ head/sys/net/if_var.h Sun Aug 31 13:30:54 2014 = (r270877) >> @@ -146,11 +146,11 @@ struct ifnet { >>=20 >> /* Variable fields that are touched by the stack and drivers. */ >> int if_flags; /* up/down, broadcast, etc. */ >> + int if_drv_flags; /* driver-managed status flags = */ >> int if_capabilities; /* interface features & = capabilities */ >> int if_capenable; /* enabled features & = capabilities */ >> void *if_linkmib; /* link-type-specific MIB data = */ >> size_t if_linkmiblen; /* length of above data */ >> - int if_drv_flags; /* driver-managed status flags = */ >> u_int if_refcount; /* reference count */ >>=20 >> /* These fields are shared with struct if_data. */ >> @@ -158,7 +158,6 @@ struct ifnet { >> uint8_t if_addrlen; /* media address length */ >> uint8_t if_hdrlen; /* media header length */ >> uint8_t if_link_state; /* current link state */ >> - uint32_t if_spare32; >=20 > Doesn=92t this leave a gap on 64bit alignment now again? Disregard. It=92s fine. >=20 >> uint32_t if_mtu; /* maximum transmission unit */ >> uint32_t if_metric; /* routing metric (external = only) */ >> uint64_t if_baudrate; /* linespeed */ >>=20 >=20 > =97=20 > Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, = 1983 >=20 >=20 =97=20 Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983 From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 15:23:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 454F38F7; Sun, 31 Aug 2014 15:23:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3108D12BC; Sun, 31 Aug 2014 15:23:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VFNo7B098149; Sun, 31 Aug 2014 15:23:50 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VFNoto098148; Sun, 31 Aug 2014 15:23:50 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201408311523.s7VFNoto098148@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 31 Aug 2014 15:23:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270878 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 15:23:50 -0000 Author: ian Date: Sun Aug 31 15:23:49 2014 New Revision: 270878 URL: http://svnweb.freebsd.org/changeset/base/270878 Log: The Marvell PJ4B cpu family is armv7, not armv6. Modified: head/sys/arm/include/cpuconf.h Modified: head/sys/arm/include/cpuconf.h ============================================================================== --- head/sys/arm/include/cpuconf.h Sun Aug 31 13:30:54 2014 (r270877) +++ head/sys/arm/include/cpuconf.h Sun Aug 31 15:23:49 2014 (r270878) @@ -135,13 +135,13 @@ #define ARM_MMU_GENERIC 0 #endif -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_MV_PJ4B) +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) #define ARM_MMU_V6 1 #else #define ARM_MMU_V6 0 #endif -#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) +#if defined(CPU_CORTEXA) || defined(CPU_KRAIT) || defined(CPU_MV_PJ4B) #define ARM_MMU_V7 1 #else #define ARM_MMU_V7 0 From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 15:24:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF03FA38; Sun, 31 Aug 2014 15:24:38 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF65E12C5; Sun, 31 Aug 2014 15:24:38 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XO6zc-000Mlj-I1; Sun, 31 Aug 2014 15:24:36 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s7VFOZ45001199; Sun, 31 Aug 2014 09:24:35 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18fxq4b5wUTHL28QmdioKwk X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: svn commit: r270862 - head/sys/arm/arm From: Ian Lepore To: "Bjoern A. Zeeb" In-Reply-To: References: <201408302221.s7UMLvMS003791@svn.freebsd.org> Content-Type: text/plain; charset="windows-1251" Date: Sun, 31 Aug 2014 09:24:35 -0600 Message-ID: <1409498675.1150.198.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by ilsoft.org id s7VFOZ45001199 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 15:24:39 -0000 On Sun, 2014-08-31 at 08:58 +0000, Bjoern A. Zeeb wrote: > On 30 Aug 2014, at 22:21 , Ian Lepore wrote: >=20 > > Author: ian > > Date: Sat Aug 30 22:21:57 2014 > > New Revision: 270862 > > URL: http://svnweb.freebsd.org/changeset/base/270862 > >=20 > > Log: > > Fix the handling of MMU type in the AP entry code. The ARM_MMU_V6/V= 7 > > symbols are always #defined to 0 or 1, so use #if SYM not #if define= d(SYM). > > Also, it helps if you include the header file that defines the symbo= ls. >=20 >=20 > I can only assume it=92s been due to this commit: >=20 > 22 warnings generated. > linking kernel.debug > locore.o: In function `mpentry': > (.text+0x1ec): undefined reference to `armv6_idcache_inv_all' > --- kernel.debug --- > *** [kernel.debug] Error code 1 >=20 > bmake: stopped in /storage/head/obj/arm.armv6/scratch/tmp/bz/head.svn/s= ys/ARMADAXP >=20 >=20 Yes, apparently this change exposed a long-standing bug in another header file. Fixed in r270878. -- Ian >=20 > >=20 > > Modified: > > head/sys/arm/arm/locore.S > >=20 > > Modified: head/sys/arm/arm/locore.S > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sys/arm/arm/locore.S Sat Aug 30 21:44:32 2014 (r270861) > > +++ head/sys/arm/arm/locore.S Sat Aug 30 22:21:57 2014 (r270862) > > @@ -37,6 +37,7 @@ > > #include > > #include > > #include > > +#include > > #include > >=20 > > __FBSDID("$FreeBSD$"); > > @@ -389,9 +390,9 @@ ASENTRY_NP(mpentry) > > nop > > CPWAIT(r0) > >=20 > > -#if defined(ARM_MMU_V6) > > +#if ARM_MMU_V6 > > bl armv6_idcache_inv_all /* Modifies r0 only */ > > -#elif defined(ARM_MMU_V7) > > +#elif ARM_MMU_V7 > > bl armv7_idcache_inv_all /* Modifies r0-r3, ip */ > > #endif > >=20 > >=20 >=20 > =97=20 > Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 198= 3 >=20 >=20 From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 15:25:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C6D0C60; Sun, 31 Aug 2014 15:25:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E48712D3; Sun, 31 Aug 2014 15:25:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VFPfMS098566; Sun, 31 Aug 2014 15:25:41 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VFPeut098561; Sun, 31 Aug 2014 15:25:40 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201408311525.s7VFPeut098561@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 31 Aug 2014 15:25:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270879 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 15:25:41 -0000 Author: ian Date: Sun Aug 31 15:25:40 2014 New Revision: 270879 URL: http://svnweb.freebsd.org/changeset/base/270879 Log: Put option FDT into the base IMX6 config and remove it from the config of boards based on IMX6. Modified: head/sys/arm/conf/IMX6 head/sys/arm/conf/WANDBOARD-DUAL head/sys/arm/conf/WANDBOARD-QUAD head/sys/arm/conf/WANDBOARD-SOLO Modified: head/sys/arm/conf/IMX6 ============================================================================== --- head/sys/arm/conf/IMX6 Sun Aug 31 15:23:49 2014 (r270878) +++ head/sys/arm/conf/IMX6 Sun Aug 31 15:25:40 2014 (r270879) @@ -147,6 +147,7 @@ device u3g # USB modems options ROOTDEVNAME=\"ufs:mmcsd0s2a\" # ARM and SoC-specific options +options FDT # Configure using FDT/DTB data. options SMP # Enable multiple cores options VFP # Enable floating point hardware support options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) Modified: head/sys/arm/conf/WANDBOARD-DUAL ============================================================================== --- head/sys/arm/conf/WANDBOARD-DUAL Sun Aug 31 15:23:49 2014 (r270878) +++ head/sys/arm/conf/WANDBOARD-DUAL Sun Aug 31 15:25:40 2014 (r270879) @@ -23,7 +23,6 @@ include "IMX6" ident WANDBOARD-DUAL # Flattened Device Tree -options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=wandboard-dual.dts Modified: head/sys/arm/conf/WANDBOARD-QUAD ============================================================================== --- head/sys/arm/conf/WANDBOARD-QUAD Sun Aug 31 15:23:49 2014 (r270878) +++ head/sys/arm/conf/WANDBOARD-QUAD Sun Aug 31 15:25:40 2014 (r270879) @@ -23,7 +23,6 @@ include "IMX6" ident WANDBOARD-QUAD # Flattened Device Tree -options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=wandboard-quad.dts Modified: head/sys/arm/conf/WANDBOARD-SOLO ============================================================================== --- head/sys/arm/conf/WANDBOARD-SOLO Sun Aug 31 15:23:49 2014 (r270878) +++ head/sys/arm/conf/WANDBOARD-SOLO Sun Aug 31 15:25:40 2014 (r270879) @@ -23,7 +23,6 @@ include "IMX6" ident WANDBOARD-SOLO # Flattened Device Tree -options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=wandboard-solo.dts From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 15:26:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63518DA4; Sun, 31 Aug 2014 15:26:34 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3583212E1; Sun, 31 Aug 2014 15:26:33 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XO71P-000N7r-1F; Sun, 31 Aug 2014 15:26:27 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s7VFQOcD001210; Sun, 31 Aug 2014 09:26:24 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX197uowft74HNv7QPOpXqVvV X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: svn commit: r270858 - head/sys/arm/conf From: Ian Lepore To: Andrew Turner In-Reply-To: <20140831120707.0b049e07@bender.lan> References: <201408302000.s7UK0IhC024462@svn.freebsd.org> <20140831120707.0b049e07@bender.lan> Content-Type: text/plain; charset="us-ascii" Date: Sun, 31 Aug 2014 09:26:24 -0600 Message-ID: <1409498784.1150.200.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Michael Tuexen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 15:26:34 -0000 On Sun, 2014-08-31 at 12:07 +0100, Andrew Turner wrote: > On Sat, 30 Aug 2014 20:00:18 +0000 (UTC) > Michael Tuexen wrote: > > > Author: tuexen > > Date: Sat Aug 30 20:00:18 2014 > > New Revision: 270858 > > URL: http://svnweb.freebsd.org/changeset/base/270858 > > > > Log: > > Remove FDT option, since it is in every file, which includes this > > one. > > > It should be the other way around, i.e. in this file and removed from > all that include it. FDT is required for armv6 and this is still a > valid kernel config. > > Andrew > I agree, we're going to have more configs soon I think based on IMX6. I changed it in r270879. -- Ian From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 16:08:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 969B7AE7; Sun, 31 Aug 2014 16:08:03 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 199511823; Sun, 31 Aug 2014 16:08:02 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s7VG80ix087180 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 31 Aug 2014 20:08:00 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s7VG80ww087179; Sun, 31 Aug 2014 20:08:00 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 31 Aug 2014 20:08:00 +0400 From: Gleb Smirnoff To: "Alexander V. Chernikov" Subject: Re: svn commit: r270870 - head/sys/net Message-ID: <20140831160800.GC7693@FreeBSD.org> References: <201408310646.s7V6kM1X050678@svn.freebsd.org> <5402DAB7.2040806@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5402DAB7.2040806@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 16:08:03 -0000 On Sun, Aug 31, 2014 at 12:20:07PM +0400, Alexander V. Chernikov wrote: A> On 31.08.2014 10:46, Gleb Smirnoff wrote: A> > Author: glebius A> > Date: Sun Aug 31 06:46:21 2014 A> > New Revision: 270870 A> > URL: http://svnweb.freebsd.org/changeset/base/270870 A> > A> > Log: A> > o Remove struct if_data from struct ifnet. Now it is merely API structure A> > for route(4) socket and ifmib(4) sysctl. A> > o Move fields from if_data to ifnet, but keep all statistic counters A> > separate, since they should disappear later. A> > o Provide function if_data_copy() to fill if_data, utilize it in routing A> > socket and ifmib handler. A> > o Provide overridable ifnet(9) method to fetch counters. If no provided, A> > if_get_counters_compat() would be used, that returns old counters. A> Thanks! This isn't yet finished, but you see the direction. :) -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 17:21:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E2F869B; Sun, 31 Aug 2014 17:21:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D8B71F60; Sun, 31 Aug 2014 17:21:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VHLuFB058896; Sun, 31 Aug 2014 17:21:56 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VHLpTu058657; Sun, 31 Aug 2014 17:21:51 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201408311721.s7VHLpTu058657@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 31 Aug 2014 17:21:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270882 - in head/lib/libc/arm: gen string sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 17:21:56 -0000 Author: ian Date: Sun Aug 31 17:21:51 2014 New Revision: 270882 URL: http://svnweb.freebsd.org/changeset/base/270882 Log: In ARM asm code, ensure that every ENTRY(foo) has a matching END(foo). The EABI unwind info requires a .fnend for every .fnstart, and newer binutils will complain about seeing two .fnstart in a row. This change allows newer tools to compile our code. Reported by: bapt Reviewed by: imp Modified: head/lib/libc/arm/gen/__aeabi_read_tp.S head/lib/libc/arm/gen/_ctx_start.S head/lib/libc/arm/gen/_setjmp.S head/lib/libc/arm/gen/alloca.S head/lib/libc/arm/gen/divsi3.S head/lib/libc/arm/gen/setjmp.S head/lib/libc/arm/gen/sigsetjmp.S head/lib/libc/arm/string/ffs.S head/lib/libc/arm/string/memcmp.S head/lib/libc/arm/string/memcpy_arm.S head/lib/libc/arm/string/memcpy_xscale.S head/lib/libc/arm/string/memmove.S head/lib/libc/arm/string/memset.S head/lib/libc/arm/string/strcmp.S head/lib/libc/arm/string/strlen.S head/lib/libc/arm/string/strncmp.S head/lib/libc/arm/sys/Ovfork.S head/lib/libc/arm/sys/brk.S head/lib/libc/arm/sys/cerror.S head/lib/libc/arm/sys/pipe.S head/lib/libc/arm/sys/ptrace.S head/lib/libc/arm/sys/sbrk.S Modified: head/lib/libc/arm/gen/__aeabi_read_tp.S ============================================================================== --- head/lib/libc/arm/gen/__aeabi_read_tp.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/gen/__aeabi_read_tp.S Sun Aug 31 17:21:51 2014 (r270882) @@ -38,6 +38,7 @@ ENTRY(__aeabi_read_tp) mrc p15, 0, r0, c13, c0, 3 #endif RET +END(__aeabi_read_tp) #ifdef ARM_TP_ADDRESS .Larm_tp_address: Modified: head/lib/libc/arm/gen/_ctx_start.S ============================================================================== --- head/lib/libc/arm/gen/_ctx_start.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/gen/_ctx_start.S Sun Aug 31 17:21:51 2014 (r270882) @@ -7,3 +7,4 @@ ENTRY(_ctx_start) mov r0, r5 bl _C_LABEL(ctx_done) bl _C_LABEL(abort) +END(_ctx_start) Modified: head/lib/libc/arm/gen/_setjmp.S ============================================================================== --- head/lib/libc/arm/gen/_setjmp.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/gen/_setjmp.S Sun Aug 31 17:21:51 2014 (r270882) @@ -89,6 +89,7 @@ ENTRY(_setjmp) mov r0, #0x00000000 RET +END(_setjmp) .L_setjmp_magic: .word _JB_MAGIC__SETJMP @@ -140,3 +141,4 @@ botch: #else b . #endif +END(_longjmp) Modified: head/lib/libc/arm/gen/alloca.S ============================================================================== --- head/lib/libc/arm/gen/alloca.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/gen/alloca.S Sun Aug 31 17:21:51 2014 (r270882) @@ -43,3 +43,4 @@ ENTRY(alloca) sub sp, sp, r0 /* Adjust the stack pointer */ mov r0, sp /* r0 = base of new space */ RET +END(alloca) Modified: head/lib/libc/arm/gen/divsi3.S ============================================================================== --- head/lib/libc/arm/gen/divsi3.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/gen/divsi3.S Sun Aug 31 17:21:51 2014 (r270882) @@ -29,6 +29,7 @@ ENTRY(__umodsi3) add sp, sp, #4 /* unalign stack */ mov r0, r1 ldmfd sp!, {pc} +END(__umodsi3) ENTRY(__modsi3) stmfd sp!, {lr} @@ -48,6 +49,7 @@ ENTRY(__modsi3) mvn r0, #0 #endif RET +END(__modsi3) ENTRY(__udivsi3) .L_udivide: /* r0 = r0 / r1; r1 = r0 % r1 */ @@ -70,6 +72,7 @@ ENTRY(__udivsi3) mov r0, r1 mov r1, #0 RET +END(__udivsi3) ENTRY(__divsi3) .L_divide: /* r0 = r0 / r1; r1 = r0 % r1 */ @@ -385,3 +388,4 @@ ENTRY(__divsi3) addhs r3, r3, r2 mov r0, r3 RET +END(__divsi3) Modified: head/lib/libc/arm/gen/setjmp.S ============================================================================== --- head/lib/libc/arm/gen/setjmp.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/gen/setjmp.S Sun Aug 31 17:21:51 2014 (r270882) @@ -101,7 +101,7 @@ ENTRY(setjmp) .Lfpu_present: .word PIC_SYM(_libc_arm_fpu_present, GOTOFF) #endif /* __ARM_EABI__ */ - +END(setjmp) .weak _C_LABEL(longjmp) .set _C_LABEL(longjmp), _C_LABEL(__longjmp) @@ -150,3 +150,4 @@ ENTRY(__longjmp) bl PIC_SYM(_C_LABEL(longjmperror), PLT) bl PIC_SYM(_C_LABEL(abort), PLT) b . - 8 /* Cannot get here */ +END(__longjmp) Modified: head/lib/libc/arm/gen/sigsetjmp.S ============================================================================== --- head/lib/libc/arm/gen/sigsetjmp.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/gen/sigsetjmp.S Sun Aug 31 17:21:51 2014 (r270882) @@ -51,6 +51,7 @@ ENTRY(sigsetjmp) teq r1, #0 beq PIC_SYM(_C_LABEL(_setjmp), PLT) b PIC_SYM(_C_LABEL(setjmp), PLT) +END(sigsetjmp) .L_setjmp_magic: .word _JB_MAGIC__SETJMP @@ -64,3 +65,4 @@ ENTRY(siglongjmp) teq r2, r3 /* magic correct? */ beq PIC_SYM(_C_LABEL(_longjmp), PLT) b PIC_SYM(_C_LABEL(longjmp), PLT) +END(siglongjmp) Modified: head/lib/libc/arm/string/ffs.S ============================================================================== --- head/lib/libc/arm/string/ffs.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/string/ffs.S Sun Aug 31 17:21:51 2014 (r270882) @@ -80,3 +80,4 @@ ENTRY(ffs) rsbne r0, r0, #32 RET #endif +END(ffs) Modified: head/lib/libc/arm/string/memcmp.S ============================================================================== --- head/lib/libc/arm/string/memcmp.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/string/memcmp.S Sun Aug 31 17:21:51 2014 (r270882) @@ -178,3 +178,4 @@ ENTRY(memcmp) sub r0, r3, r2 /* r0 = b1#5 - b2#5 */ RET #endif +END(memcmp) Modified: head/lib/libc/arm/string/memcpy_arm.S ============================================================================== --- head/lib/libc/arm/string/memcpy_arm.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/string/memcpy_arm.S Sun Aug 31 17:21:51 2014 (r270882) @@ -330,3 +330,4 @@ ENTRY(memcpy) .Lmemcpy_srcul3l4: sub r1, r1, #1 b .Lmemcpy_l4 +END(memcpy) Modified: head/lib/libc/arm/string/memcpy_xscale.S ============================================================================== --- head/lib/libc/arm/string/memcpy_xscale.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/string/memcpy_xscale.S Sun Aug 31 17:21:51 2014 (r270882) @@ -1781,3 +1781,4 @@ ENTRY(memcpy) strb r1, [r0, #0x0b] bx lr #endif /* !_STANDALONE */ +END(memcpy) Modified: head/lib/libc/arm/string/memmove.S ============================================================================== --- head/lib/libc/arm/string/memmove.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/string/memmove.S Sun Aug 31 17:21:51 2014 (r270882) @@ -580,3 +580,8 @@ ENTRY(bcopy) .Lmemmove_bsrcul1l4: add r1, r1, #1 b .Lmemmove_bl4 +#ifndef _BCOPY +END(memmove) +#else +END(bcopy) +#endif Modified: head/lib/libc/arm/string/memset.S ============================================================================== --- head/lib/libc/arm/string/memset.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/string/memset.S Sun Aug 31 17:21:51 2014 (r270882) @@ -234,3 +234,8 @@ ENTRY(memset) strgeb r3, [ip], #0x01 /* Set another byte */ strgtb r3, [ip] /* and a third */ RET /* Exit */ +#ifdef _BZERO +END(bzero) +#else +END(memset) +#endif Modified: head/lib/libc/arm/string/strcmp.S ============================================================================== --- head/lib/libc/arm/string/strcmp.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/string/strcmp.S Sun Aug 31 17:21:51 2014 (r270882) @@ -41,3 +41,4 @@ ENTRY(strcmp) beq 1b sub r0, r2, r3 RET +END(strcmp) Modified: head/lib/libc/arm/string/strlen.S ============================================================================== --- head/lib/libc/arm/string/strlen.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/string/strlen.S Sun Aug 31 17:21:51 2014 (r270882) @@ -76,3 +76,4 @@ ENTRY(strlen) .Lexit: mov r0, r1 RET +END(strlen) Modified: head/lib/libc/arm/string/strncmp.S ============================================================================== --- head/lib/libc/arm/string/strncmp.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/string/strncmp.S Sun Aug 31 17:21:51 2014 (r270882) @@ -52,3 +52,4 @@ ENTRY(strncmp) beq 1b sub r0, r2, r3 RET +END(strncmp) Modified: head/lib/libc/arm/sys/Ovfork.S ============================================================================== --- head/lib/libc/arm/sys/Ovfork.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/sys/Ovfork.S Sun Aug 31 17:21:51 2014 (r270882) @@ -52,3 +52,4 @@ ENTRY(vfork) sub r1, r1, #1 /* r1 == 0xffffffff if parent, 0 if child */ and r0, r0, r1 /* r0 == 0 if child, else unchanged */ mov r15, r2 +END(vfork) Modified: head/lib/libc/arm/sys/brk.S ============================================================================== --- head/lib/libc/arm/sys/brk.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/sys/brk.S Sun Aug 31 17:21:51 2014 (r270882) @@ -98,3 +98,4 @@ ENTRY(_brk) .word PIC_SYM(_C_LABEL(minbrk), GOT) .Lcurbrk: .word PIC_SYM(CURBRK, GOT) +END(_brk) Modified: head/lib/libc/arm/sys/cerror.S ============================================================================== --- head/lib/libc/arm/sys/cerror.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/sys/cerror.S Sun Aug 31 17:21:51 2014 (r270882) @@ -46,3 +46,4 @@ ASENTRY(CERROR) mvn r0, #0x00000000 mvn r1, #0x00000000 ldmfd sp!, {r4, pc} +END(CERROR) Modified: head/lib/libc/arm/sys/pipe.S ============================================================================== --- head/lib/libc/arm/sys/pipe.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/sys/pipe.S Sun Aug 31 17:21:51 2014 (r270882) @@ -48,3 +48,4 @@ ENTRY(_pipe) str r1, [r2, #0x0004] mov r0, #0x00000000 RET +END(_pipe) Modified: head/lib/libc/arm/sys/ptrace.S ============================================================================== --- head/lib/libc/arm/sys/ptrace.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/sys/ptrace.S Sun Aug 31 17:21:51 2014 (r270882) @@ -46,3 +46,4 @@ ENTRY(ptrace) SYSTRAP(ptrace) bcs PIC_SYM(CERROR, PLT) RET +END(ptrace) Modified: head/lib/libc/arm/sys/sbrk.S ============================================================================== --- head/lib/libc/arm/sys/sbrk.S Sun Aug 31 16:37:41 2014 (r270881) +++ head/lib/libc/arm/sys/sbrk.S Sun Aug 31 17:21:51 2014 (r270882) @@ -86,3 +86,4 @@ ENTRY(_sbrk) #endif .Lcurbrk: .word PIC_SYM(CURBRK, GOT) +END(_sbrk) From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 17:38:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11F4233F; Sun, 31 Aug 2014 17:38:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1EDE120B; Sun, 31 Aug 2014 17:38:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VHcfII065611; Sun, 31 Aug 2014 17:38:41 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VHcfvn065610; Sun, 31 Aug 2014 17:38:41 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201408311738.s7VHcfvn065610@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sun, 31 Aug 2014 17:38:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270883 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 17:38:42 -0000 Author: alc Date: Sun Aug 31 17:38:41 2014 New Revision: 270883 URL: http://svnweb.freebsd.org/changeset/base/270883 Log: Automatically prefault a limited number of mappings to resident pages in shmat(2), just like mmap(2). MFC after: 5 days Sponsored by: EMC / Isilon Storage Division Modified: head/sys/kern/sysv_shm.c Modified: head/sys/kern/sysv_shm.c ============================================================================== --- head/sys/kern/sysv_shm.c Sun Aug 31 17:21:51 2014 (r270882) +++ head/sys/kern/sysv_shm.c Sun Aug 31 17:38:41 2014 (r270883) @@ -410,9 +410,9 @@ kern_shmat(td, shmid, shmaddr, shmflg) } vm_object_reference(shmseg->object); - rv = vm_map_find(&p->p_vmspace->vm_map, shmseg->object, - 0, &attach_va, size, 0, shmaddr != NULL ? VMFS_NO_SPACE : - VMFS_OPTIMAL_SPACE, prot, prot, MAP_INHERIT_SHARE); + rv = vm_map_find(&p->p_vmspace->vm_map, shmseg->object, 0, &attach_va, + size, 0, shmaddr != NULL ? VMFS_NO_SPACE : VMFS_OPTIMAL_SPACE, + prot, prot, MAP_INHERIT_SHARE | MAP_PREFAULT_PARTIAL); if (rv != KERN_SUCCESS) { vm_object_deallocate(shmseg->object); error = ENOMEM; From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 17:40:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 921C6490; Sun, 31 Aug 2014 17:40:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E2331226; Sun, 31 Aug 2014 17:40:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VHeJEN065941; Sun, 31 Aug 2014 17:40:19 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VHeJBL065940; Sun, 31 Aug 2014 17:40:19 GMT (envelope-from br@FreeBSD.org) Message-Id: <201408311740.s7VHeJBL065940@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Sun, 31 Aug 2014 17:40:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270884 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 17:40:19 -0000 Author: br Date: Sun Aug 31 17:40:19 2014 New Revision: 270884 URL: http://svnweb.freebsd.org/changeset/base/270884 Log: GIC (Cortex A's interrupt controller) supports up to 1020 IRQs. Modified: head/sys/arm/include/intr.h Modified: head/sys/arm/include/intr.h ============================================================================== --- head/sys/arm/include/intr.h Sun Aug 31 17:38:41 2014 (r270883) +++ head/sys/arm/include/intr.h Sun Aug 31 17:40:19 2014 (r270884) @@ -51,7 +51,7 @@ defined(CPU_XSCALE_IXP435) #define NIRQ 64 #elif defined(CPU_CORTEXA) -#define NIRQ 160 +#define NIRQ 1020 #elif defined(CPU_KRAIT) #define NIRQ 288 #elif defined(CPU_ARM1136) || defined(CPU_ARM1176) From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 17:56:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22B059DC; Sun, 31 Aug 2014 17:56:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 026C91447; Sun, 31 Aug 2014 17:56:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VHutab075171; Sun, 31 Aug 2014 17:56:55 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VHutRE075166; Sun, 31 Aug 2014 17:56:55 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201408311756.s7VHutRE075166@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 31 Aug 2014 17:56:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270885 - head/sys/dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 17:56:56 -0000 Author: marius Date: Sun Aug 31 17:56:54 2014 New Revision: 270885 URL: http://svnweb.freebsd.org/changeset/base/270885 Log: - Nuke unused sdhci_softc. - Static'ize sdhci_debug local to sdhci.c. - Const'ify PCI device description strings. - Nuke redundant resource ID members from sdhci_pci_softc. - Nuke unused hw.sdhci_pci.debug tunable. - Add support for using MSI instead of INTx, controllable via the tunable hw.sdhci.enable_msi (defaulting to on) and tested with a RICOH R5CE823 SD controller. - Use NULL instead of 0 for pointers. MFC after: 3 days Modified: head/sys/dev/sdhci/sdhci.c head/sys/dev/sdhci/sdhci.h head/sys/dev/sdhci/sdhci_fdt.c head/sys/dev/sdhci/sdhci_if.m head/sys/dev/sdhci/sdhci_pci.c Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Sun Aug 31 17:40:19 2014 (r270884) +++ head/sys/dev/sdhci/sdhci.c Sun Aug 31 17:56:54 2014 (r270885) @@ -52,21 +52,9 @@ __FBSDID("$FreeBSD$"); #include "sdhci.h" #include "sdhci_if.h" -struct sdhci_softc; +SYSCTL_NODE(_hw, OID_AUTO, sdhci, CTLFLAG_RD, 0, "sdhci driver"); -struct sdhci_softc { - device_t dev; /* Controller device */ - struct resource *irq_res; /* IRQ resource */ - int irq_rid; - void *intrhand; /* Interrupt handle */ - - int num_slots; /* Number of slots on this controller */ - struct sdhci_slot slots[6]; -}; - -static SYSCTL_NODE(_hw, OID_AUTO, sdhci, CTLFLAG_RD, 0, "sdhci driver"); - -int sdhci_debug = 0; +static int sdhci_debug; SYSCTL_INT(_hw_sdhci, OID_AUTO, debug, CTLFLAG_RWTUN, &sdhci_debug, 0, "Debug level"); #define RD1(slot, off) SDHCI_READ_1((slot)->bus, (slot), (off)) Modified: head/sys/dev/sdhci/sdhci.h ============================================================================== --- head/sys/dev/sdhci/sdhci.h Sun Aug 31 17:40:19 2014 (r270884) +++ head/sys/dev/sdhci/sdhci.h Sun Aug 31 17:56:54 2014 (r270885) @@ -223,6 +223,8 @@ #define SDHCI_SPEC_200 1 #define SDHCI_SPEC_300 2 +SYSCTL_DECL(_hw_sdhci); + struct sdhci_slot { u_int quirks; /* Chip specific quirks */ u_int caps; /* Override SDHCI_CAPABILITIES */ Modified: head/sys/dev/sdhci/sdhci_fdt.c ============================================================================== --- head/sys/dev/sdhci/sdhci_fdt.c Sun Aug 31 17:40:19 2014 (r270884) +++ head/sys/dev/sdhci/sdhci_fdt.c Sun Aug 31 17:56:54 2014 (r270885) @@ -180,7 +180,6 @@ sdhci_fdt_probe(device_t dev) if ((OF_getencprop(node, "max-frequency", &cid, sizeof(cid))) > 0) sc->max_clk = cid; - return (0); } @@ -189,7 +188,7 @@ sdhci_fdt_attach(device_t dev) { struct sdhci_fdt_softc *sc = device_get_softc(dev); int err, slots, rid, i; - + sc->dev = dev; /* Allocate IRQ. */ @@ -241,7 +240,7 @@ sdhci_fdt_attach(device_t dev) struct sdhci_slot *slot = &sc->slots[i]; sdhci_start_slot(slot); } - + return (0); } @@ -305,5 +304,6 @@ static driver_t sdhci_fdt_driver = { }; static devclass_t sdhci_fdt_devclass; -DRIVER_MODULE(sdhci_fdt, simplebus, sdhci_fdt_driver, sdhci_fdt_devclass, 0,0); +DRIVER_MODULE(sdhci_fdt, simplebus, sdhci_fdt_driver, sdhci_fdt_devclass, + NULL, NULL); MODULE_DEPEND(sdhci_fdt, sdhci, 1, 1, 1); Modified: head/sys/dev/sdhci/sdhci_if.m ============================================================================== --- head/sys/dev/sdhci/sdhci_if.m Sun Aug 31 17:40:19 2014 (r270884) +++ head/sys/dev/sdhci/sdhci_if.m Sun Aug 31 17:56:54 2014 (r270885) @@ -62,6 +62,7 @@ #include #include #include +#include #include #include Modified: head/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- head/sys/dev/sdhci/sdhci_pci.c Sun Aug 31 17:40:19 2014 (r270884) +++ head/sys/dev/sdhci/sdhci_pci.c Sun Aug 31 17:56:54 2014 (r270885) @@ -78,7 +78,7 @@ __FBSDID("$FreeBSD$"); static const struct sdhci_device { uint32_t model; uint16_t subvendor; - char *desc; + const char *desc; u_int quirks; } sdhci_devices[] = { { 0x08221180, 0xffff, "RICOH R5C822 SD", @@ -112,19 +112,16 @@ struct sdhci_pci_softc { device_t dev; /* Controller device */ u_int quirks; /* Chip specific quirks */ struct resource *irq_res; /* IRQ resource */ - int irq_rid; void *intrhand; /* Interrupt handle */ int num_slots; /* Number of slots on this controller */ struct sdhci_slot slots[6]; struct resource *mem_res[6]; /* Memory resource */ - int mem_rid[6]; }; -static SYSCTL_NODE(_hw, OID_AUTO, sdhci_pci, CTLFLAG_RD, 0, "sdhci PCI driver"); - -int sdhci_pci_debug; -SYSCTL_INT(_hw_sdhci_pci, OID_AUTO, debug, CTLFLAG_RWTUN, &sdhci_pci_debug, 0, "Debug level"); +static int sdhci_enable_msi = 1; +SYSCTL_INT(_hw_sdhci, OID_AUTO, enable_msi, CTLFLAG_RDTUN, &sdhci_enable_msi, + 0, "Enable MSI interrupts"); static uint8_t sdhci_pci_read_1(device_t dev, struct sdhci_slot *slot, bus_size_t off) @@ -231,13 +228,13 @@ sdhci_pci_probe(device_t dev) uint16_t subvendor; uint8_t class, subclass; int i, result; - + model = (uint32_t)pci_get_device(dev) << 16; model |= (uint32_t)pci_get_vendor(dev) & 0x0000ffff; subvendor = pci_get_subvendor(dev); class = pci_get_class(dev); subclass = pci_get_subclass(dev); - + result = ENXIO; for (i = 0; sdhci_devices[i].model != 0; i++) { if (sdhci_devices[i].model == model && @@ -253,7 +250,7 @@ sdhci_pci_probe(device_t dev) device_set_desc(dev, "Generic SD HCI"); result = BUS_PROBE_GENERIC; } - + return (result); } @@ -264,7 +261,7 @@ sdhci_pci_attach(device_t dev) uint32_t model; uint16_t subvendor; uint8_t class, subclass, progif; - int err, slots, bar, i; + int bar, err, rid, slots, i; sc->dev = dev; model = (uint32_t)pci_get_device(dev) << 16; @@ -295,11 +292,15 @@ sdhci_pci_attach(device_t dev) return (EINVAL); } /* Allocate IRQ. */ - sc->irq_rid = 0; - sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid, - RF_SHAREABLE | RF_ACTIVE); + i = 1; + rid = 0; + if (sdhci_enable_msi != 0 && pci_alloc_msi(dev, &i) == 0) + rid = 1; + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_ACTIVE | (rid != 0 ? 0 : RF_SHAREABLE)); if (sc->irq_res == NULL) { device_printf(dev, "Can't allocate IRQ\n"); + pci_release_msi(dev); return (ENOMEM); } /* Scan all slots. */ @@ -307,9 +308,9 @@ sdhci_pci_attach(device_t dev) struct sdhci_slot *slot = &sc->slots[sc->num_slots]; /* Allocate memory. */ - sc->mem_rid[i] = PCIR_BAR(bar + i); - sc->mem_res[i] = bus_alloc_resource(dev, - SYS_RES_MEMORY, &(sc->mem_rid[i]), 0ul, ~0ul, 0x100, RF_ACTIVE); + rid = PCIR_BAR(bar + i); + sc->mem_res[i] = bus_alloc_resource(dev, SYS_RES_MEMORY, + &rid, 0ul, ~0ul, 0x100, RF_ACTIVE); if (sc->mem_res[i] == NULL) { device_printf(dev, "Can't allocate memory for slot %d\n", i); continue; @@ -318,7 +319,6 @@ sdhci_pci_attach(device_t dev) if (sdhci_init_slot(dev, slot, i) != 0) continue; - sc->num_slots++; } device_printf(dev, "%d slot(s) allocated\n", sc->num_slots); @@ -334,7 +334,7 @@ sdhci_pci_attach(device_t dev) sdhci_start_slot(slot); } - + return (0); } @@ -346,14 +346,15 @@ sdhci_pci_detach(device_t dev) bus_teardown_intr(dev, sc->irq_res, sc->intrhand); bus_release_resource(dev, SYS_RES_IRQ, - sc->irq_rid, sc->irq_res); + rman_get_rid(sc->irq_res), sc->irq_res); + pci_release_msi(dev); for (i = 0; i < sc->num_slots; i++) { struct sdhci_slot *slot = &sc->slots[i]; sdhci_cleanup_slot(slot); bus_release_resource(dev, SYS_RES_MEMORY, - sc->mem_rid[i], sc->mem_res[i]); + rman_get_rid(sc->mem_res[i]), sc->mem_res[i]); } return (0); } @@ -368,7 +369,7 @@ sdhci_pci_suspend(device_t dev) if (err) return (err); for (i = 0; i < sc->num_slots; i++) - sdhci_generic_suspend(&sc->slots[i]); + sdhci_generic_suspend(&sc->slots[i]); return (0); } @@ -383,7 +384,6 @@ sdhci_pci_resume(device_t dev) return (bus_generic_resume(dev)); } - static void sdhci_pci_intr(void *arg) { @@ -435,5 +435,6 @@ static driver_t sdhci_pci_driver = { }; static devclass_t sdhci_pci_devclass; -DRIVER_MODULE(sdhci_pci, pci, sdhci_pci_driver, sdhci_pci_devclass, 0, 0); +DRIVER_MODULE(sdhci_pci, pci, sdhci_pci_driver, sdhci_pci_devclass, NULL, + NULL); MODULE_DEPEND(sdhci_pci, sdhci, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 20:11:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 700525FF; Sun, 31 Aug 2014 20:11:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A63713BB; Sun, 31 Aug 2014 20:11:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VKBRci042564; Sun, 31 Aug 2014 20:11:27 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VKBR97042562; Sun, 31 Aug 2014 20:11:27 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201408312011.s7VKBR97042562@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Sun, 31 Aug 2014 20:11:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270886 - in stable/9: tools/build/mk usr.sbin X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 20:11:27 -0000 Author: peter Date: Sun Aug 31 20:11:26 2014 New Revision: 270886 URL: http://svnweb.freebsd.org/changeset/base/270886 Log: WITH/WITHOUT_PKGBOOTSTRAP were MFC'ed, but were never connected to the build. As a result, the knob for disabling pkg_install also disabled the pkg bootstrap tool Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc stable/9/usr.sbin/Makefile Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Sun Aug 31 17:56:54 2014 (r270885) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Sun Aug 31 20:11:26 2014 (r270886) @@ -3249,6 +3249,11 @@ OLD_FILES+=usr/share/man/man8/pflogd.8.g OLD_FILES+=usr/share/man/man8/tftp-proxy.8.gz .endif +.if ${MK_PKGBOOTSTRAP} == no +OLD_FILES+=usr/sbin/pkg +OLD_FILES+=usr/share/man/man7/pkg.7.gz +.endif + .if ${MK_PKGTOOLS} == no OLD_FILES+=etc/periodic/daily/490.status-pkg-changes OLD_FILES+=etc/periodic/security/460.chkportsum Modified: stable/9/usr.sbin/Makefile ============================================================================== --- stable/9/usr.sbin/Makefile Sun Aug 31 17:56:54 2014 (r270885) +++ stable/9/usr.sbin/Makefile Sun Aug 31 20:11:26 2014 (r270886) @@ -265,9 +265,12 @@ _pc_sysinstall= pc-sysinstall SUBDIR+= ftp-proxy .endif +.if ${MK_PKGBOOTSTRAP} != "no" +SUBDIR+= pkg +.endif + .if ${MK_PKGTOOLS} != "no" SUBDIR+= pkg_install -SUBDIR+= pkg .endif # XXX MK_TOOLCHAIN? From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 20:14:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC979752; Sun, 31 Aug 2014 20:14:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE42613CF; Sun, 31 Aug 2014 20:14:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VKENvi043467; Sun, 31 Aug 2014 20:14:23 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VKEMXE043461; Sun, 31 Aug 2014 20:14:22 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201408312014.s7VKEMXE043461@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Sun, 31 Aug 2014 20:14:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r270887 - in stable/8: share/mk tools/build/mk tools/build/options usr.sbin X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 20:14:24 -0000 Author: peter Date: Sun Aug 31 20:14:22 2014 New Revision: 270887 URL: http://svnweb.freebsd.org/changeset/base/270887 Log: Backport the separation of the knob that controls the legacy pkg_install tools (ie: WITH/WITHOUT_PKGTOOLS) and the pkg bootstrap tool. Added: stable/8/tools/build/options/WITHOUT_PKGBOOTSTRAP - copied unchanged from r270885, head/tools/build/options/WITHOUT_PKGBOOTSTRAP Modified: stable/8/share/mk/bsd.own.mk stable/8/tools/build/mk/OptionalObsoleteFiles.inc stable/8/usr.sbin/Makefile Modified: stable/8/share/mk/bsd.own.mk ============================================================================== --- stable/8/share/mk/bsd.own.mk Sun Aug 31 20:11:26 2014 (r270886) +++ stable/8/share/mk/bsd.own.mk Sun Aug 31 20:14:22 2014 (r270887) @@ -383,6 +383,7 @@ WITH_IDEA= OPENSSL \ PAM \ PF \ + PKGBOOTSTRAP \ PKGTOOLS \ PMC \ PORTSNAP \ Modified: stable/8/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/8/tools/build/mk/OptionalObsoleteFiles.inc Sun Aug 31 20:11:26 2014 (r270886) +++ stable/8/tools/build/mk/OptionalObsoleteFiles.inc Sun Aug 31 20:14:22 2014 (r270887) @@ -1216,6 +1216,11 @@ OLD_FILES+=usr/share/man/man1/nc.1.gz # to be filled in #.endif +.if ${MK_PKGBOOTSTRAP} == no +OLD_FILES+=usr/sbin/pkg +OLD_FILES+=usr/share/man/man7/pkg.7.gz +.endif + .if ${MK_PKGTOOLS} == no OLD_FILES+=etc/periodic/security/460.chkportsum OLD_FILES+=etc/periodic/weekly/400.status-pkg Copied: stable/8/tools/build/options/WITHOUT_PKGBOOTSTRAP (from r270885, head/tools/build/options/WITHOUT_PKGBOOTSTRAP) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/tools/build/options/WITHOUT_PKGBOOTSTRAP Sun Aug 31 20:14:22 2014 (r270887, copy of r270885, head/tools/build/options/WITHOUT_PKGBOOTSTRAP) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr pkg 7 +bootstrap tool. Modified: stable/8/usr.sbin/Makefile ============================================================================== --- stable/8/usr.sbin/Makefile Sun Aug 31 20:11:26 2014 (r270886) +++ stable/8/usr.sbin/Makefile Sun Aug 31 20:14:22 2014 (r270887) @@ -361,9 +361,12 @@ _keyserv= keyserv _ftp-proxy= ftp-proxy .endif +.if ${MK_PKGBOOTSTRAP} != "no" +SUBDIR+= pkg +.endif + .if ${MK_PKGTOOLS} != "no" _pkg_install= pkg_install -SUBDIR+= pkg .endif # XXX MK_TOOLCHAIN? From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 20:21:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 04799BBA; Sun, 31 Aug 2014 20:21:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E104B1511; Sun, 31 Aug 2014 20:21:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VKLC5b047790; Sun, 31 Aug 2014 20:21:12 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VKL9ZF047771; Sun, 31 Aug 2014 20:21:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312021.s7VKL9ZF047771@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 20:21:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270888 - in stable/10: sys/dev/iscsi usr.bin/iscsictl usr.sbin/ctld usr.sbin/iscsid X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 20:21:13 -0000 Author: trasz Date: Sun Aug 31 20:21:08 2014 New Revision: 270888 URL: http://svnweb.freebsd.org/changeset/base/270888 Log: MFC r270279: Make the iSCSI stack use __FBSDID() properly. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/iscsi/icl.c stable/10/sys/dev/iscsi/icl_proxy.c stable/10/sys/dev/iscsi/iscsi.c stable/10/usr.bin/iscsictl/iscsictl.c stable/10/usr.sbin/ctld/ctld.c stable/10/usr.sbin/ctld/discovery.c stable/10/usr.sbin/ctld/kernel.c stable/10/usr.sbin/ctld/keys.c stable/10/usr.sbin/ctld/log.c stable/10/usr.sbin/ctld/login.c stable/10/usr.sbin/ctld/pdu.c stable/10/usr.sbin/iscsid/discovery.c stable/10/usr.sbin/iscsid/iscsid.c stable/10/usr.sbin/iscsid/keys.c stable/10/usr.sbin/iscsid/log.c stable/10/usr.sbin/iscsid/login.c stable/10/usr.sbin/iscsid/pdu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/sys/dev/iscsi/icl.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ /* @@ -34,6 +33,9 @@ * and receive iSCSI PDUs. */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/sys/dev/iscsi/icl_proxy.c ============================================================================== --- stable/10/sys/dev/iscsi/icl_proxy.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/sys/dev/iscsi/icl_proxy.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ /*- * Copyright (c) 1982, 1986, 1989, 1990, 1993 @@ -68,6 +67,9 @@ #ifdef ICL_KERNEL_PROXY +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/sys/dev/iscsi/iscsi.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.bin/iscsictl/iscsictl.c ============================================================================== --- stable/10/usr.bin/iscsictl/iscsictl.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.bin/iscsictl/iscsictl.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/ctld/ctld.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/ctld/discovery.c ============================================================================== --- stable/10/usr.sbin/ctld/discovery.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/ctld/discovery.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/ctld/kernel.c ============================================================================== --- stable/10/usr.sbin/ctld/kernel.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/ctld/kernel.c Sun Aug 31 20:21:08 2014 (r270888) @@ -32,9 +32,11 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGES. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/ctld/keys.c ============================================================================== --- stable/10/usr.sbin/ctld/keys.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/ctld/keys.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/ctld/log.c ============================================================================== --- stable/10/usr.sbin/ctld/log.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/ctld/log.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/ctld/login.c ============================================================================== --- stable/10/usr.sbin/ctld/login.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/ctld/login.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/ctld/pdu.c ============================================================================== --- stable/10/usr.sbin/ctld/pdu.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/ctld/pdu.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/iscsid/discovery.c ============================================================================== --- stable/10/usr.sbin/iscsid/discovery.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/iscsid/discovery.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/iscsid/iscsid.c ============================================================================== --- stable/10/usr.sbin/iscsid/iscsid.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/iscsid/iscsid.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/iscsid/keys.c ============================================================================== --- stable/10/usr.sbin/iscsid/keys.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/iscsid/keys.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/iscsid/log.c ============================================================================== --- stable/10/usr.sbin/iscsid/log.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/iscsid/log.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/iscsid/login.c ============================================================================== --- stable/10/usr.sbin/iscsid/login.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/iscsid/login.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/iscsid/pdu.c ============================================================================== --- stable/10/usr.sbin/iscsid/pdu.c Sun Aug 31 20:14:22 2014 (r270887) +++ stable/10/usr.sbin/iscsid/pdu.c Sun Aug 31 20:21:08 2014 (r270888) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 20:23:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00FBBEBE; Sun, 31 Aug 2014 20:23:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFEF6153E; Sun, 31 Aug 2014 20:23:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VKNuFO048715; Sun, 31 Aug 2014 20:23:56 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VKNu8x048714; Sun, 31 Aug 2014 20:23:56 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201408312023.s7VKNu8x048714@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Sun, 31 Aug 2014 20:23:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r270889 - stable/8/share/man/man5 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 20:23:57 -0000 Author: peter Date: Sun Aug 31 20:23:56 2014 New Revision: 270889 URL: http://svnweb.freebsd.org/changeset/base/270889 Log: Regenerate Modified: stable/8/share/man/man5/src.conf.5 Modified: stable/8/share/man/man5/src.conf.5 ============================================================================== --- stable/8/share/man/man5/src.conf.5 Sun Aug 31 20:21:08 2014 (r270888) +++ stable/8/share/man/man5/src.conf.5 Sun Aug 31 20:23:56 2014 (r270889) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: stable/8/tools/build/options/makeman 236431 2012-06-02 02:26:49Z gjb .\" $FreeBSD$ -.Dd March 1, 2013 +.Dd August 31, 2014 .Dt SRC.CONF 5 .Os .Sh NAME @@ -668,7 +668,7 @@ Set to not build Objective C support. .\" from FreeBSD: stable/8/tools/build/options/WITHOUT_OPENSSH 156932 2006-03-21 07:50:50Z ru Set to not build OpenSSH. .It Va WITH_OPENSSH_NONE_CIPHER -.\" $FreeBSD$ +.\" from FreeBSD: stable/8/tools/build/options/WITH_OPENSSH_NONE_CIPHER 247521 2013-03-01 02:06:04Z des Set to include the "None" cipher support in OpenSSH and its libraries. Additional adjustments may need to be done to system configuration files, such as @@ -721,6 +721,11 @@ When set, it also enforces the following .It .Va WITHOUT_AUTHPF .El +.It Va WITHOUT_PKGBOOTSTRAP +.\" from FreeBSD: stable/8/tools/build/options/WITHOUT_PKGBOOTSTRAP 270887 2014-08-31 20:14:22Z peter +Set to not build +.Xr pkg 7 +bootstrap tool. .It Va WITHOUT_PKGTOOLS .\" from FreeBSD: stable/8/tools/build/options/WITHOUT_PKGTOOLS 183242 2008-09-21 22:02:26Z sam Set to not build From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 20:34:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EDE6306; Sun, 31 Aug 2014 20:34:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2990B1788; Sun, 31 Aug 2014 20:34:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VKY7aj053864; Sun, 31 Aug 2014 20:34:07 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VKY7PG053863; Sun, 31 Aug 2014 20:34:07 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201408312034.s7VKY7PG053863@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 31 Aug 2014 20:34:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270890 - stable/10/usr.bin/pathchk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 20:34:07 -0000 Author: jilles Date: Sun Aug 31 20:34:06 2014 New Revision: 270890 URL: http://svnweb.freebsd.org/changeset/base/270890 Log: MFC r256800: pathchk: Ensure bytes >= 128 are considered non-portable characters. This was not broken on architectures such as ARM where char is unsigned. Also, remove the first non-portable character from the output. POSIX does not require this, and printing the first byte may yield an invalid byte sequence with UTF-8. PR: 165988 Reported by: Nicolas Rachinsky Relnotes: yes Modified: stable/10/usr.bin/pathchk/pathchk.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/pathchk/pathchk.c ============================================================================== --- stable/10/usr.bin/pathchk/pathchk.c Sun Aug 31 20:23:56 2014 (r270889) +++ stable/10/usr.bin/pathchk/pathchk.c Sun Aug 31 20:34:06 2014 (r270890) @@ -98,7 +98,7 @@ check(const char *path) { struct stat sb; long complen, namemax, pathmax, svnamemax; - int badch, last; + int last; char *end, *p, *pathd; if ((pathd = strdup(path)) == NULL) @@ -142,9 +142,9 @@ check(const char *path) goto bad; } - if (pflag && (badch = portable(p)) >= 0) { + if (pflag && !portable(p)) { warnx("%s: %s: component contains non-portable " - "character `%c'", path, p, badch); + "character", path, p); goto bad; } @@ -183,8 +183,7 @@ bad: free(pathd); } /* - * Check whether a path component contains only portable characters. Return - * the first non-portable character found. + * Check whether a path component contains only portable characters. */ static int portable(const char *path) @@ -197,7 +196,7 @@ portable(const char *path) s = strspn(path, charset); if (path[s] != '\0') - return (path[s]); + return (0); - return (-1); + return (1); } From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 20:47:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E065670; Sun, 31 Aug 2014 20:47:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F25681888; Sun, 31 Aug 2014 20:47:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VKlBN0058979; Sun, 31 Aug 2014 20:47:11 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VKlBkX058974; Sun, 31 Aug 2014 20:47:11 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312047.s7VKlBkX058974@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 20:47:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270891 - in stable/10/sys: cam/ctl dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 20:47:12 -0000 Author: trasz Date: Sun Aug 31 20:47:10 2014 New Revision: 270891 URL: http://svnweb.freebsd.org/changeset/base/270891 Log: MFC r270282: Use proper include paths in kernel iSCSI code. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c stable/10/sys/dev/iscsi/icl.c stable/10/sys/dev/iscsi/icl_proxy.c stable/10/sys/dev/iscsi/iscsi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl_frontend_iscsi.c ============================================================================== --- stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Sun Aug 31 20:34:06 2014 (r270890) +++ stable/10/sys/cam/ctl/ctl_frontend_iscsi.c Sun Aug 31 20:47:10 2014 (r270891) @@ -67,9 +67,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include "../../dev/iscsi/icl.h" -#include "../../dev/iscsi/iscsi_proto.h" -#include "ctl_frontend_iscsi.h" +#include +#include +#include #ifdef ICL_KERNEL_PROXY #include Modified: stable/10/sys/dev/iscsi/icl.c ============================================================================== --- stable/10/sys/dev/iscsi/icl.c Sun Aug 31 20:34:06 2014 (r270890) +++ stable/10/sys/dev/iscsi/icl.c Sun Aug 31 20:47:10 2014 (r270891) @@ -58,8 +58,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include "icl.h" -#include "iscsi_proto.h" +#include +#include SYSCTL_NODE(_kern, OID_AUTO, icl, CTLFLAG_RD, 0, "iSCSI Common Layer"); static int debug = 1; Modified: stable/10/sys/dev/iscsi/icl_proxy.c ============================================================================== --- stable/10/sys/dev/iscsi/icl_proxy.c Sun Aug 31 20:34:06 2014 (r270890) +++ stable/10/sys/dev/iscsi/icl_proxy.c Sun Aug 31 20:47:10 2014 (r270891) @@ -87,7 +87,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "icl.h" +#include static int debug = 1; Modified: stable/10/sys/dev/iscsi/iscsi.c ============================================================================== --- stable/10/sys/dev/iscsi/iscsi.c Sun Aug 31 20:34:06 2014 (r270890) +++ stable/10/sys/dev/iscsi/iscsi.c Sun Aug 31 20:47:10 2014 (r270891) @@ -58,10 +58,10 @@ __FBSDID("$FreeBSD$"); #include #include -#include "iscsi_ioctl.h" -#include "iscsi.h" -#include "icl.h" -#include "iscsi_proto.h" +#include +#include +#include +#include #ifdef ICL_KERNEL_PROXY #include From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 21:18:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78D3CDBB; Sun, 31 Aug 2014 21:18:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 580B71AFD; Sun, 31 Aug 2014 21:18:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLISvK073299; Sun, 31 Aug 2014 21:18:28 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLINnW073272; Sun, 31 Aug 2014 21:18:23 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312118.s7VLINnW073272@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:18:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270892 - in stable/10: etc etc/autofs etc/defaults etc/mtree etc/rc.d sbin/mount share/man/man5 sys/conf sys/fs/autofs sys/kern sys/libkern sys/modules sys/modules/autofs sys/sys usr.s... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:18:28 -0000 Author: trasz Date: Sun Aug 31 21:18:23 2014 New Revision: 270892 URL: http://svnweb.freebsd.org/changeset/base/270892 Log: MFC r270096: Bring in the new automounter, similar to what's provided in most other UNIX systems, eg. MacOS X and Solaris. It uses Sun-compatible map format, has proper kernel support, and LDAP integration. There are still a few outstanding problems; they will be fixed shortly. Reviewed by: allanjude@, emaste@, kib@, wblock@ (earlier versions) Phabric: D523 Relnotes: yes Sponsored by: The FreeBSD Foundation Added: stable/10/etc/auto_master - copied unchanged from r270096, head/etc/auto_master stable/10/etc/autofs/ - copied from r270096, head/etc/autofs/ stable/10/etc/rc.d/automount - copied unchanged from r270096, head/etc/rc.d/automount stable/10/etc/rc.d/automountd - copied unchanged from r270096, head/etc/rc.d/automountd stable/10/etc/rc.d/autounmountd - copied unchanged from r270096, head/etc/rc.d/autounmountd stable/10/share/man/man5/autofs.5 - copied unchanged from r270096, head/share/man/man5/autofs.5 stable/10/sys/fs/autofs/ - copied from r270096, head/sys/fs/autofs/ stable/10/sys/libkern/strndup.c - copied unchanged from r270096, head/sys/libkern/strndup.c stable/10/sys/modules/autofs/ - copied from r270096, head/sys/modules/autofs/ stable/10/usr.sbin/autofs/ - copied from r270096, head/usr.sbin/autofs/ Modified: stable/10/etc/Makefile stable/10/etc/defaults/rc.conf stable/10/etc/mtree/BSD.root.dist stable/10/etc/rc.d/Makefile stable/10/sbin/mount/mntopts.h stable/10/sbin/mount/mount.c stable/10/share/man/man5/Makefile stable/10/sys/conf/NOTES stable/10/sys/conf/files stable/10/sys/conf/options stable/10/sys/kern/vfs_mount.c stable/10/sys/modules/Makefile stable/10/sys/sys/libkern.h stable/10/sys/sys/mount.h stable/10/usr.sbin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/etc/Makefile Sun Aug 31 21:18:23 2014 (r270892) @@ -11,7 +11,8 @@ SUBDIR= sendmail SUBDIR+=tests .endif -BIN1= crontab \ +BIN1= auto_master \ + crontab \ devd.conf \ devfs.conf \ ddb.conf \ @@ -225,6 +226,7 @@ distribution: echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \ ) | ${METALOG.add} .endif + ${_+_}cd ${.CURDIR}/autofs; ${MAKE} install .if ${MK_BLUETOOTH} != "no" ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif Copied: stable/10/etc/auto_master (from r270096, head/etc/auto_master) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/auto_master Sun Aug 31 21:18:23 2014 (r270892, copy of r270096, head/etc/auto_master) @@ -0,0 +1,5 @@ +# $FreeBSD$ +# +# Automounter master map, see auto_master(5) for details. +# +/net -hosts -nosuid Modified: stable/10/etc/defaults/rc.conf ============================================================================== --- stable/10/etc/defaults/rc.conf Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/etc/defaults/rc.conf Sun Aug 31 21:18:23 2014 (r270892) @@ -311,6 +311,7 @@ amd_enable="NO" # Run amd service with amd_program="/usr/sbin/amd" # path to amd, if you want a different one. amd_flags="-a /.amd_mnt -l syslog /host /etc/amd.map /net /etc/amd.map" amd_map_program="NO" # Can be set to "ypcat -k amd.master" +autofs_enable="NO" # Run automountd(8) nfs_client_enable="NO" # This host is an NFS client (or NO). nfs_access_cache="60" # Client cache timeout in seconds nfs_server_enable="NO" # This host is an NFS server (or NO). Modified: stable/10/etc/mtree/BSD.root.dist ============================================================================== --- stable/10/etc/mtree/BSD.root.dist Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/etc/mtree/BSD.root.dist Sun Aug 31 21:18:23 2014 (r270892) @@ -24,6 +24,8 @@ etc X11 .. + autofs + .. bluetooth .. defaults Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/etc/rc.d/Makefile Sun Aug 31 21:18:23 2014 (r270892) @@ -20,6 +20,9 @@ FILES= DAEMON \ atm3 \ auditd \ auditdistd \ + automount \ + automountd \ + autounmountd \ bgfsck \ ${_bluetooth} \ bootparams \ Copied: stable/10/etc/rc.d/automount (from r270096, head/etc/rc.d/automount) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/rc.d/automount Sun Aug 31 21:18:23 2014 (r270892, copy of r270096, head/etc/rc.d/automount) @@ -0,0 +1,31 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: automount +# REQUIRE: nfsclient +# KEYWORD: nojail shutdown + +. /etc/rc.subr + +name="automount" +rcvar="autofs_enable" +start_cmd="automount_start" +stop_cmd="automount_stop" +required_modules="autofs" + +automount_start() +{ + + /usr/sbin/automount +} + +automount_stop() +{ + + /sbin/umount -At autofs +} + +load_rc_config $name +run_rc_command "$1" Copied: stable/10/etc/rc.d/automountd (from r270096, head/etc/rc.d/automountd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/rc.d/automountd Sun Aug 31 21:18:23 2014 (r270892, copy of r270096, head/etc/rc.d/automountd) @@ -0,0 +1,19 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: automountd +# REQUIRE: automount +# KEYWORD: nojail + +. /etc/rc.subr + +name="automountd" +rcvar="autofs_enable" +pidfile="/var/run/${name}.pid" +command="/usr/sbin/${name}" +required_modules="autofs" + +load_rc_config $name +run_rc_command "$1" Copied: stable/10/etc/rc.d/autounmountd (from r270096, head/etc/rc.d/autounmountd) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/rc.d/autounmountd Sun Aug 31 21:18:23 2014 (r270892, copy of r270096, head/etc/rc.d/autounmountd) @@ -0,0 +1,18 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: autounmountd +# REQUIRE: nfsclient +# KEYWORD: nojail + +. /etc/rc.subr + +name="autounmountd" +rcvar="autofs_enable" +pidfile="/var/run/${name}.pid" +command="/usr/sbin/${name}" + +load_rc_config $name +run_rc_command "$1" Modified: stable/10/sbin/mount/mntopts.h ============================================================================== --- stable/10/sbin/mount/mntopts.h Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/sbin/mount/mntopts.h Sun Aug 31 21:18:23 2014 (r270892) @@ -33,7 +33,7 @@ struct mntopt { const char *m_option; /* option name */ int m_inverse; /* if a negative option, e.g. "atime" */ - int m_flag; /* bit to set, e.g. MNT_RDONLY */ + long long m_flag; /* bit to set, e.g. MNT_RDONLY */ int m_altloc; /* 1 => set bit in altflags */ }; @@ -55,6 +55,7 @@ struct mntopt { #define MOPT_MULTILABEL { "multilabel", 0, MNT_MULTILABEL, 0 } #define MOPT_ACLS { "acls", 0, MNT_ACLS, 0 } #define MOPT_NFS4ACLS { "nfsv4acls", 0, MNT_NFS4ACLS, 0 } +#define MOPT_AUTOMOUNTED { "automounted",0, MNT_AUTOMOUNTED, 0 } /* Control flags. */ #define MOPT_FORCE { "force", 0, MNT_FORCE, 0 } @@ -89,7 +90,8 @@ struct mntopt { MOPT_NOCLUSTERW, \ MOPT_MULTILABEL, \ MOPT_ACLS, \ - MOPT_NFS4ACLS + MOPT_NFS4ACLS, \ + MOPT_AUTOMOUNTED void getmntopts(const char *, const struct mntopt *, int *, int *); void rmslashes(char *, char *); Modified: stable/10/sbin/mount/mount.c ============================================================================== --- stable/10/sbin/mount/mount.c Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/sbin/mount/mount.c Sun Aug 31 21:18:23 2014 (r270892) @@ -114,6 +114,7 @@ static struct opt { { MNT_ACLS, "acls" }, { MNT_NFS4ACLS, "nfsv4acls" }, { MNT_GJOURNAL, "gjournal" }, + { MNT_AUTOMOUNTED, "automounted" }, { 0, NULL } }; Modified: stable/10/share/man/man5/Makefile ============================================================================== --- stable/10/share/man/man5/Makefile Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/share/man/man5/Makefile Sun Aug 31 21:18:23 2014 (r270892) @@ -7,6 +7,7 @@ MAN= acct.5 \ ar.5 \ a.out.5 \ + autofs.5 \ bluetooth.device.conf.5 \ bluetooth.hosts.5 \ bluetooth.protocols.5 \ Copied: stable/10/share/man/man5/autofs.5 (from r270096, head/share/man/man5/autofs.5) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man5/autofs.5 Sun Aug 31 21:18:23 2014 (r270892, copy of r270096, head/share/man/man5/autofs.5) @@ -0,0 +1,99 @@ +.\" Copyright (c) 2014 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This software was developed by Edward Tomasz Napierala under sponsorship +.\" from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd July 14, 2014 +.Dt AUTOFS 5 +.Os +.Sh NAME +.Nm autofs +.Nd "automounter filesystem" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in the +kernel configuration file: +.Bd -ragged -offset indent +.Cd "options AUTOFS" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +autofs_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver is the kernel component of the automounter infrastructure. +Its job is to pass mount requests to the +.Xr automountd 8 +daemon, and pause the processes trying to access the automounted filesystem +until the mount is completed. +It is mounted by the +.Xr automount 8 . +.Sh OPTIONS +These options are available when +mounting +.Nm +file systems: +.Bl -tag -width indent +.It Cm master_options +Mount options for all filesystems specified in the map entry. +.It Cm master_prefix +Filesystem mountpoint prefix. +.El +.Sh EXAMPLES +To unmount all mounted +.Nm +filesystems: +.Pp +.Dl "umount -At autofs" +.Pp +To mount +.Nm +filesystems specified in +.Xr auto_master 5 : +.Pp +.Dl "automount" +.Sh SEE ALSO +.Xr auto_master 5 , +.Xr automount 8 , +.Xr automountd 8 , +.Xr autounmountd 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 10.2 . +.Sh AUTHORS +The +.Nm +was developed by +.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org +under sponsorship from the FreeBSD Foundation. Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/sys/conf/NOTES Sun Aug 31 21:18:23 2014 (r270892) @@ -1017,6 +1017,7 @@ options FFS #Fast filesystem options NFSCLIENT #Network File System client # The rest are optional: +options AUTOFS #Automounter filesystem options CD9660 #ISO 9660 filesystem options FDESCFS #File descriptor filesystem options FUSE #FUSE support module Modified: stable/10/sys/conf/files ============================================================================== --- stable/10/sys/conf/files Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/sys/conf/files Sun Aug 31 21:18:23 2014 (r270892) @@ -2589,6 +2589,9 @@ dev/xen/xenpci/xenpci.c optional xenpci dev/xen/timer/timer.c optional xen | xenhvm dev/xl/if_xl.c optional xl pci dev/xl/xlphy.c optional xl pci +fs/autofs/autofs.c optional autofs +fs/autofs/autofs_vfsops.c optional autofs +fs/autofs/autofs_vnops.c optional autofs fs/deadfs/dead_vnops.c standard fs/devfs/devfs_devs.c standard fs/devfs/devfs_dir.c standard @@ -3125,6 +3128,7 @@ libkern/strcmp.c standard libkern/strcpy.c standard libkern/strcspn.c standard libkern/strdup.c standard +libkern/strndup.c standard libkern/strlcat.c standard libkern/strlcpy.c standard libkern/strlen.c standard Modified: stable/10/sys/conf/options ============================================================================== --- stable/10/sys/conf/options Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/sys/conf/options Sun Aug 31 21:18:23 2014 (r270892) @@ -218,6 +218,7 @@ INCLUDE_CONFIG_FILE opt_config.h # time, since the corresponding lkms cannot work if there are any static # dependencies. Unusability is enforced by hiding the defines for the # options in a never-included header. +AUTOFS opt_dontuse.h CD9660 opt_dontuse.h EXT2FS opt_dontuse.h FDESCFS opt_dontuse.h Modified: stable/10/sys/kern/vfs_mount.c ============================================================================== --- stable/10/sys/kern/vfs_mount.c Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/sys/kern/vfs_mount.c Sun Aug 31 21:18:23 2014 (r270892) @@ -649,6 +649,10 @@ vfs_donmount(struct thread *td, uint64_t fsflags |= MNT_SYNCHRONOUS; else if (strcmp(opt->name, "union") == 0) fsflags |= MNT_UNION; + else if (strcmp(opt->name, "automounted") == 0) { + fsflags |= MNT_AUTOMOUNTED; + vfs_freeopt(optlist, opt); + } } /* Copied: stable/10/sys/libkern/strndup.c (from r270096, head/sys/libkern/strndup.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/libkern/strndup.c Sun Aug 31 21:18:23 2014 (r270892, copy of r270096, head/sys/libkern/strndup.c) @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2003 Networks Associates Technology, Inc. + * All rights reserved. + * + * This software was developed for the FreeBSD Project by Network + * Associates Laboratories, the Security Research Division of Network + * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 + * ("CBOSS"), as part of the DARPA CHATS research program. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +char * +strndup(const char *string, size_t maxlen, struct malloc_type *type) +{ + size_t len; + char *copy; + + len = strnlen(string, maxlen) + 1; + copy = malloc(len, type, M_WAITOK); + bcopy(string, copy, len); + copy[len - 1] = '\0'; + return (copy); +} Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/sys/modules/Makefile Sun Aug 31 21:18:23 2014 (r270892) @@ -44,6 +44,7 @@ SUBDIR= \ ata \ ath \ ath_pci \ + autofs \ ${_auxio} \ ${_bce} \ bfe \ Modified: stable/10/sys/sys/libkern.h ============================================================================== --- stable/10/sys/sys/libkern.h Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/sys/sys/libkern.h Sun Aug 31 21:18:23 2014 (r270892) @@ -117,6 +117,7 @@ int strcmp(const char *, const char *); char *strcpy(char * __restrict, const char * __restrict); size_t strcspn(const char * __restrict, const char * __restrict) __pure; char *strdup(const char *__restrict, struct malloc_type *); +char *strndup(const char *__restrict, size_t, struct malloc_type *); size_t strlcat(char *, const char *, size_t); size_t strlcpy(char *, const char *, size_t); size_t strlen(const char *); Modified: stable/10/sys/sys/mount.h ============================================================================== --- stable/10/sys/sys/mount.h Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/sys/sys/mount.h Sun Aug 31 21:18:23 2014 (r270892) @@ -260,6 +260,7 @@ void __mnt_vnode_markerfree_act #define MNT_NOCLUSTERR 0x0000000040000000ULL /* disable cluster read */ #define MNT_NOCLUSTERW 0x0000000080000000ULL /* disable cluster write */ #define MNT_SUJ 0x0000000100000000ULL /* using journaled soft updates */ +#define MNT_AUTOMOUNTED 0x0000000200000000ULL /* mounted by automountd(8) */ /* * NFS export related mount flags. @@ -296,7 +297,7 @@ void __mnt_vnode_markerfree_act MNT_NOCLUSTERW | MNT_SUIDDIR | MNT_SOFTDEP | \ MNT_IGNORE | MNT_EXPUBLIC | MNT_NOSYMFOLLOW | \ MNT_GJOURNAL | MNT_MULTILABEL | MNT_ACLS | \ - MNT_NFS4ACLS) + MNT_NFS4ACLS | MNT_AUTOMOUNTED) /* Mask of flags that can be updated. */ #define MNT_UPDATEMASK (MNT_NOSUID | MNT_NOEXEC | \ @@ -304,7 +305,8 @@ void __mnt_vnode_markerfree_act MNT_NOATIME | \ MNT_NOSYMFOLLOW | MNT_IGNORE | \ MNT_NOCLUSTERR | MNT_NOCLUSTERW | MNT_SUIDDIR | \ - MNT_ACLS | MNT_USER | MNT_NFS4ACLS) + MNT_ACLS | MNT_USER | MNT_NFS4ACLS | \ + MNT_AUTOMOUNTED) /* * External filesystem command modifier flags. Modified: stable/10/usr.sbin/Makefile ============================================================================== --- stable/10/usr.sbin/Makefile Sun Aug 31 20:47:10 2014 (r270891) +++ stable/10/usr.sbin/Makefile Sun Aug 31 21:18:23 2014 (r270892) @@ -5,6 +5,7 @@ SUBDIR= adduser \ arp \ + autofs \ binmiscctl \ bootparamd \ bsdconfig \ From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 21:38:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9821322; Sun, 31 Aug 2014 21:38:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88EDA1CCE; Sun, 31 Aug 2014 21:38:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLc4GB082704; Sun, 31 Aug 2014 21:38:04 GMT (envelope-from kargl@FreeBSD.org) Received: (from kargl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLc4MA082700; Sun, 31 Aug 2014 21:38:04 GMT (envelope-from kargl@FreeBSD.org) Message-Id: <201408312138.s7VLc4MA082700@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kargl set sender to kargl@FreeBSD.org using -f From: Steve Kargl Date: Sun, 31 Aug 2014 21:38:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270893 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:38:04 -0000 Author: kargl Date: Sun Aug 31 21:38:03 2014 New Revision: 270893 URL: http://svnweb.freebsd.org/changeset/base/270893 Log: Compute sin(pi*x) without actually doing the pi*x multiplication. sin_pi(x) is only called for x < 0 and |x| < 2**(p-1) where p is the precision of x. The new argument reduction is an optimization compared to the old code, and it removes a chunk of dead code. Accuracy tests in the intervals (-21,-20), (-20,-19), ... (-1,0) show no differences between the old and new code. Obtained from: bde Modified: head/lib/msun/src/e_lgamma_r.c head/lib/msun/src/e_lgammaf_r.c Modified: head/lib/msun/src/e_lgamma_r.c ============================================================================== --- head/lib/msun/src/e_lgamma_r.c Sun Aug 31 21:18:23 2014 (r270892) +++ head/lib/msun/src/e_lgamma_r.c Sun Aug 31 21:38:03 2014 (r270893) @@ -156,37 +156,35 @@ w6 = -1.63092934096575273989e-03; /* 0x static const double zero= 0.00000000000000000000e+00; - static double sin_pi(double x) +/* + * Compute sin(pi*x) without actually doing the pi*x multiplication. + * sin_pi(x) is only called for x < 0 and |x| < 2**(p-1) where p is + * the precision of x. + */ +static double +sin_pi(double x) { + volatile double vz; double y,z; - int n,ix; + int n; - GET_HIGH_WORD(ix,x); - ix &= 0x7fffffff; + y = -x; - if(ix<0x3fd00000) return __kernel_sin(pi*x,zero,0); - y = -x; /* x is assume negative */ + vz = y+0x1p52; /* depend on 0 <= y < 0x1p52 */ + z = vz-0x1p52; /* rint(y) for the above range */ + if (z == y) + return (zero); + + vz = y+0x1p50; + GET_LOW_WORD(n,vz); /* bits for rounded y (units 0.25) */ + z = vz-0x1p50; /* y rounded to a multiple of 0.25 */ + if (z > y) { + z -= 0.25; /* adjust to round down */ + n--; + } + n &= 7; /* octant of y mod 2 */ + y = y - z + n * 0.25; /* y mod 2 */ - /* - * argument reduction, make sure inexact flag not raised if input - * is an integer - */ - z = floor(y); - if(z!=y) { /* inexact anyway */ - y *= 0.5; - y = 2.0*(y - floor(y)); /* y = |x| mod 2.0 */ - n = (int) (y*4.0); - } else { - if(ix>=0x43400000) { - y = zero; n = 0; /* y must be even */ - } else { - if(ix<0x43300000) z = y+two52; /* exact */ - GET_LOW_WORD(n,z); - n &= 1; - y = n; - n<<= 2; - } - } switch (n) { case 0: y = __kernel_sin(pi*y,zero,0); break; case 1: Modified: head/lib/msun/src/e_lgammaf_r.c ============================================================================== --- head/lib/msun/src/e_lgammaf_r.c Sun Aug 31 21:18:23 2014 (r270892) +++ head/lib/msun/src/e_lgammaf_r.c Sun Aug 31 21:38:03 2014 (r270893) @@ -89,37 +89,35 @@ w6 = -1.6309292987e-03; /* 0xbad5c4e8 * static const float zero= 0.0000000000e+00; - static float sin_pif(float x) +/* + * Compute sin(pi*x) without actually doing the pi*x multiplication. + * sin_pi(x) is only called for x < 0 and |x| < 2**(p-1) where p is + * the precision of x. + */ +static float +sin_pi(float x) { + volatile float vz; float y,z; - int n,ix; + int n; - GET_FLOAT_WORD(ix,x); - ix &= 0x7fffffff; + y = -x; - if(ix<0x3e800000) return __kernel_sindf(pi*x); - y = -x; /* x is assume negative */ + vz = y+0x1p23F; /* depend on 0 <= y < 0x1p23 */ + z = vz-0x1p23F; /* rintf(y) for the above range */ + if (z == y) + return (zero); + + vz = y+0x1p21F; + GET_FLOAT_WORD(n,vz); /* bits for rounded y (units 0.25) */ + z = vz-0x1p21F; /* y rounded to a multiple of 0.25 */ + if (z > y) { + z -= 0.25F; /* adjust to round down */ + n--; + } + n &= 7; /* octant of y mod 2 */ + y = y - z + n * 0.25F; /* y mod 2 */ - /* - * argument reduction, make sure inexact flag not raised if input - * is an integer - */ - z = floorf(y); - if(z!=y) { /* inexact anyway */ - y *= (float)0.5; - y = (float)2.0*(y - floorf(y)); /* y = |x| mod 2.0 */ - n = (int) (y*(float)4.0); - } else { - if(ix>=0x4b800000) { - y = zero; n = 0; /* y must be even */ - } else { - if(ix<0x4b000000) z = y+two23; /* exact */ - GET_FLOAT_WORD(n,z); - n &= 1; - y = n; - n<<= 2; - } - } switch (n) { case 0: y = __kernel_sindf(pi*y); break; case 1: @@ -157,7 +155,7 @@ __ieee754_lgammaf_r(float x, int *signga if(hx<0) { if(ix>=0x4b000000) /* |x|>=2**23, must be -integer */ return one/zero; - t = sin_pif(x); + t = sin_pi(x); if(t==zero) return one/zero; /* -integer */ nadj = __ieee754_logf(pi/fabsf(t*x)); if(t Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0647C561; Sun, 31 Aug 2014 21:43:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCB8A1D8C; Sun, 31 Aug 2014 21:43:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLhSiU086755; Sun, 31 Aug 2014 21:43:28 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLhSFV086754; Sun, 31 Aug 2014 21:43:28 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312143.s7VLhSFV086754@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:43:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270894 - stable/10/sys/fs/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:43:29 -0000 Author: trasz Date: Sun Aug 31 21:43:28 2014 New Revision: 270894 URL: http://svnweb.freebsd.org/changeset/base/270894 Log: MFC r270207: Rework ".." lookup; previous one failed to properly busy the mountpoint. Reviewed by: kib@ Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/autofs/autofs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/autofs/autofs_vnops.c ============================================================================== --- stable/10/sys/fs/autofs/autofs_vnops.c Sun Aug 31 21:38:03 2014 (r270893) +++ stable/10/sys/fs/autofs/autofs_vnops.c Sun Aug 31 21:43:28 2014 (r270894) @@ -198,6 +198,15 @@ mounted: } static int +autofs_vget_callback(struct mount *mp, void *arg, int lkflags __unused, + struct vnode **vpp) +{ + + + return (autofs_node_vn(arg, mp, vpp)); +} + +static int autofs_lookup(struct vop_lookup_args *ap) { struct vnode *dvp, *newvp, **vpp; @@ -217,24 +226,19 @@ autofs_lookup(struct vop_lookup_args *ap if (cnp->cn_flags & ISDOTDOT) { KASSERT(anp->an_parent != NULL, ("NULL parent")); /* - * Note that in this case, dvp is the child vnode, and we are - * looking up the parent vnode - exactly reverse from normal - * operation. To preserve lock order, we unlock the child - * (dvp), obtain the lock on parent (*vpp) in autofs_node_vn(), - * then relock the child. We use vhold()/vdrop() to prevent - * dvp from being freed in the meantime. + * Note that in this case, dvp is the child vnode, and we + * are looking up the parent vnode - exactly reverse from + * normal operation. Unlocking dvp requires some rather + * tricky unlock/relock dance to prevent mp from being freed; + * use vn_vget_ino_gen() which takes care of all that. */ - lock_flags = VOP_ISLOCKED(dvp); - vhold(dvp); - VOP_UNLOCK(dvp, 0); - error = autofs_node_vn(anp->an_parent, mp, vpp); + error = vn_vget_ino_gen(dvp, autofs_vget_callback, + anp->an_parent, 0, vpp); if (error != 0) { - AUTOFS_WARN("autofs_node_vn() failed with error %d", + AUTOFS_WARN("vn_vget_ino_gen() failed with error %d", error); + return (error); } - vn_lock(dvp, lock_flags | LK_RETRY); - vdrop(dvp); - return (error); } From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 21:45:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B1B7694; Sun, 31 Aug 2014 21:45:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 346191D94; Sun, 31 Aug 2014 21:45:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLj7S6087097; Sun, 31 Aug 2014 21:45:07 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLj77F087096; Sun, 31 Aug 2014 21:45:07 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312145.s7VLj77F087096@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:45:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270895 - stable/10/sbin/mount X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:45:08 -0000 Author: trasz Date: Sun Aug 31 21:45:07 2014 New Revision: 270895 URL: http://svnweb.freebsd.org/changeset/base/270895 Log: MFC r270209: Add description for the "automounted" mount flag. Reviewed by: emaste@ Sponsored by: The FreeBSD Foundation Modified: stable/10/sbin/mount/mount.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mount/mount.8 ============================================================================== --- stable/10/sbin/mount/mount.8 Sun Aug 31 21:43:28 2014 (r270894) +++ stable/10/sbin/mount/mount.8 Sun Aug 31 21:45:07 2014 (r270895) @@ -28,7 +28,7 @@ .\" @(#)mount.8 8.8 (Berkeley) 6/16/94 .\" $FreeBSD$ .\" -.Dd June 6, 2011 +.Dd August 20, 2014 .Dt MOUNT 8 .Os .Sh NAME @@ -150,6 +150,11 @@ For this reason, the .Cm async flag should be used sparingly, and only when some data recovery mechanism is present. +.It Cm automounted +This flag indicates that the file system was mounted by +.Xr automountd 8 . +Automounted file systems are automatically unmounted by +.Xr autounmountd 8 . .It Cm current When used with the .Fl u From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 21:46:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 853F67D0; Sun, 31 Aug 2014 21:46:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 701F61DA0; Sun, 31 Aug 2014 21:46:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLkX2f087330; Sun, 31 Aug 2014 21:46:33 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLkXTD087329; Sun, 31 Aug 2014 21:46:33 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312146.s7VLkXTD087329@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:46:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270896 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:46:33 -0000 Author: trasz Date: Sun Aug 31 21:46:32 2014 New Revision: 270896 URL: http://svnweb.freebsd.org/changeset/base/270896 Log: MFC r270210: Remove useless - and buggy, it resulted in spurious warnings in logs - code. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/autounmountd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/autounmountd.c ============================================================================== --- stable/10/usr.sbin/autofs/autounmountd.c Sun Aug 31 21:45:07 2014 (r270895) +++ stable/10/usr.sbin/autofs/autounmountd.c Sun Aug 31 21:46:32 2014 (r270896) @@ -182,7 +182,6 @@ expire_automounted(double expiration_tim time_t now; double mounted_for, mounted_max = 0; int error; - bool unmounted = false; now = time(NULL); @@ -211,20 +210,9 @@ expire_automounted(double expiration_tim if (error != 0) { if (mounted_for > mounted_max) mounted_max = mounted_for; - } else { - unmounted = true; } } - if (unmounted) { - /* - * Successful unmount of a filesystem could unbusy its parent - * filesystem that can now be unmounted. - */ - log_debugx("filesystem got unmounted; go around"); - return (expire_automounted(expiration_time)); - } - return (mounted_max); } From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 21:48:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9422F926; Sun, 31 Aug 2014 21:48:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E0CA1DAC; Sun, 31 Aug 2014 21:48:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLmFNC087620; Sun, 31 Aug 2014 21:48:15 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLmDCb087604; Sun, 31 Aug 2014 21:48:13 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312148.s7VLmDCb087604@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:48:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270897 - in stable/10: sys/fs/autofs usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:48:15 -0000 Author: trasz Date: Sun Aug 31 21:48:12 2014 New Revision: 270897 URL: http://svnweb.freebsd.org/changeset/base/270897 Log: MFC r270276: Use __FBSDID() properly. Suggested by: pluknet@ Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/autofs/autofs.c stable/10/sys/fs/autofs/autofs.h stable/10/sys/fs/autofs/autofs_vfsops.c stable/10/sys/fs/autofs/autofs_vnops.c stable/10/usr.sbin/autofs/automount.c stable/10/usr.sbin/autofs/automountd.c stable/10/usr.sbin/autofs/autounmountd.c stable/10/usr.sbin/autofs/common.c stable/10/usr.sbin/autofs/defined.c stable/10/usr.sbin/autofs/log.c stable/10/usr.sbin/autofs/popen.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/autofs/autofs.c ============================================================================== --- stable/10/sys/fs/autofs/autofs.c Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/sys/fs/autofs/autofs.c Sun Aug 31 21:48:12 2014 (r270897) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ /*- * Copyright (c) 1989, 1991, 1993, 1995 @@ -61,6 +60,9 @@ * */ +#include + __FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/sys/fs/autofs/autofs.h ============================================================================== --- stable/10/sys/fs/autofs/autofs.h Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/sys/fs/autofs/autofs.h Sun Aug 31 21:48:12 2014 (r270897) @@ -32,9 +32,6 @@ #ifndef AUTOFS_H #define AUTOFS_H -#include -__FBSDID("$FreeBSD$"); - #define VFSTOAUTOFS(mp) ((struct autofs_mount *)((mp)->mnt_data)) MALLOC_DECLARE(M_AUTOFS); Modified: stable/10/sys/fs/autofs/autofs_vfsops.c ============================================================================== --- stable/10/sys/fs/autofs/autofs_vfsops.c Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/sys/fs/autofs/autofs_vfsops.c Sun Aug 31 21:48:12 2014 (r270897) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include + __FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/sys/fs/autofs/autofs_vnops.c ============================================================================== --- stable/10/sys/fs/autofs/autofs_vnops.c Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/sys/fs/autofs/autofs_vnops.c Sun Aug 31 21:48:12 2014 (r270897) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ #include Modified: stable/10/usr.sbin/autofs/automount.c ============================================================================== --- stable/10/usr.sbin/autofs/automount.c Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/usr.sbin/autofs/automount.c Sun Aug 31 21:48:12 2014 (r270897) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/autofs/automountd.c ============================================================================== --- stable/10/usr.sbin/autofs/automountd.c Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/usr.sbin/autofs/automountd.c Sun Aug 31 21:48:12 2014 (r270897) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/autofs/autounmountd.c ============================================================================== --- stable/10/usr.sbin/autofs/autounmountd.c Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/usr.sbin/autofs/autounmountd.c Sun Aug 31 21:48:12 2014 (r270897) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/usr.sbin/autofs/common.c Sun Aug 31 21:48:12 2014 (r270897) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/autofs/defined.c ============================================================================== --- stable/10/usr.sbin/autofs/defined.c Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/usr.sbin/autofs/defined.c Sun Aug 31 21:48:12 2014 (r270897) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ /* @@ -34,6 +33,9 @@ * such as ${OSNAME}, in maps. */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/autofs/log.c ============================================================================== --- stable/10/usr.sbin/autofs/log.c Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/usr.sbin/autofs/log.c Sun Aug 31 21:48:12 2014 (r270897) @@ -26,9 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include Modified: stable/10/usr.sbin/autofs/popen.c ============================================================================== --- stable/10/usr.sbin/autofs/popen.c Sun Aug 31 21:46:32 2014 (r270896) +++ stable/10/usr.sbin/autofs/popen.c Sun Aug 31 21:48:12 2014 (r270897) @@ -34,9 +34,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 21:49:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 483C2B37; Sun, 31 Aug 2014 21:49:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 191EF1DB9; Sun, 31 Aug 2014 21:49:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLnjUV088001; Sun, 31 Aug 2014 21:49:45 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLnjab087998; Sun, 31 Aug 2014 21:49:45 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312149.s7VLnjab087998@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:49:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270898 - stable/10/sys/fs/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:49:46 -0000 Author: trasz Date: Sun Aug 31 21:49:45 2014 New Revision: 270898 URL: http://svnweb.freebsd.org/changeset/base/270898 Log: MFC r270281: Fix includes. Suggested by: pluknet@ Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/autofs/autofs.c stable/10/sys/fs/autofs/autofs_vfsops.c stable/10/sys/fs/autofs/autofs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/autofs/autofs.c ============================================================================== --- stable/10/sys/fs/autofs/autofs.c Sun Aug 31 21:48:12 2014 (r270897) +++ stable/10/sys/fs/autofs/autofs.c Sun Aug 31 21:49:45 2014 (r270898) @@ -80,8 +80,8 @@ #include #include -#include "autofs.h" -#include "autofs_ioctl.h" +#include +#include MALLOC_DEFINE(M_AUTOFS, "autofs", "Automounter filesystem"); Modified: stable/10/sys/fs/autofs/autofs_vfsops.c ============================================================================== --- stable/10/sys/fs/autofs/autofs_vfsops.c Sun Aug 31 21:48:12 2014 (r270897) +++ stable/10/sys/fs/autofs/autofs_vfsops.c Sun Aug 31 21:49:45 2014 (r270898) @@ -42,7 +42,7 @@ #include #include -#include "autofs.h" +#include static const char *autofs_opts[] = { "from", "master_options", "master_prefix", NULL Modified: stable/10/sys/fs/autofs/autofs_vnops.c ============================================================================== --- stable/10/sys/fs/autofs/autofs_vnops.c Sun Aug 31 21:48:12 2014 (r270897) +++ stable/10/sys/fs/autofs/autofs_vnops.c Sun Aug 31 21:49:45 2014 (r270898) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "autofs.h" +#include static int autofs_trigger_vn(struct vnode *vp, const char *path, int pathlen, struct vnode **newvp); From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 21:51:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3362CC65; Sun, 31 Aug 2014 21:51:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E7971DC1; Sun, 31 Aug 2014 21:51:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLp1H4088740; Sun, 31 Aug 2014 21:51:01 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLp1Ka088739; Sun, 31 Aug 2014 21:51:01 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312151.s7VLp1Ka088739@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:51:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270899 - stable/10/sys/fs/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:51:02 -0000 Author: trasz Date: Sun Aug 31 21:51:01 2014 New Revision: 270899 URL: http://svnweb.freebsd.org/changeset/base/270899 Log: MFC r270399: Add comment explaining one of the quirks in autofs. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/autofs/autofs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/autofs/autofs.c ============================================================================== --- stable/10/sys/fs/autofs/autofs.c Sun Aug 31 21:49:45 2014 (r270898) +++ stable/10/sys/fs/autofs/autofs.c Sun Aug 31 21:51:01 2014 (r270899) @@ -595,6 +595,14 @@ autofs_open(struct cdev *dev, int flags, { sx_xlock(&sc->sc_lock); + /* + * We must never block automountd(8) and its descendants, and we use + * session ID to determine that: we store session id of the process + * that opened the device, and then compare it with session ids + * of triggering processes. This means running a second automountd(8) + * instance would break the previous one. The check below prevents + * it from happening. + */ if (sc->sc_dev_opened) { sx_xunlock(&sc->sc_lock); return (EBUSY); From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 21:52:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C880DA4; Sun, 31 Aug 2014 21:52:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CBCD1E58; Sun, 31 Aug 2014 21:52:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLqRu1091813; Sun, 31 Aug 2014 21:52:27 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLqQX0091808; Sun, 31 Aug 2014 21:52:26 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312152.s7VLqQX0091808@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:52:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270900 - stable/10/sys/fs/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:52:27 -0000 Author: trasz Date: Sun Aug 31 21:52:26 2014 New Revision: 270900 URL: http://svnweb.freebsd.org/changeset/base/270900 Log: MFC r270402: Autofs softc needs to be global anyway, so don't pass it as a local variable, and don't store in autofs_mount. Also rename it from 'sc' to 'autofs_softc', since it's global and extern. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/autofs/autofs.c stable/10/sys/fs/autofs/autofs.h stable/10/sys/fs/autofs/autofs_vfsops.c stable/10/sys/fs/autofs/autofs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/autofs/autofs.c ============================================================================== --- stable/10/sys/fs/autofs/autofs.c Sun Aug 31 21:51:01 2014 (r270899) +++ stable/10/sys/fs/autofs/autofs.c Sun Aug 31 21:52:26 2014 (r270900) @@ -115,7 +115,7 @@ int autofs_sig_set[] = { SIGQUIT }; -struct autofs_softc *sc; +struct autofs_softc *autofs_softc; SYSCTL_NODE(_vfs, OID_AUTO, autofs, CTLFLAG_RD, 0, "Automounter filesystem"); int autofs_debug = 1; @@ -153,7 +153,11 @@ autofs_init(struct vfsconf *vfsp) { int error; - sc = malloc(sizeof(*sc), M_AUTOFS, M_WAITOK | M_ZERO); + KASSERT(autofs_softc == NULL, + ("softc %p, should be NULL", autofs_softc)); + + autofs_softc = malloc(sizeof(*autofs_softc), M_AUTOFS, + M_WAITOK | M_ZERO); autofs_request_zone = uma_zcreate("autofs_request", sizeof(struct autofs_request), NULL, NULL, NULL, NULL, @@ -162,18 +166,21 @@ autofs_init(struct vfsconf *vfsp) sizeof(struct autofs_node), NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); - TAILQ_INIT(&sc->sc_requests); - cv_init(&sc->sc_cv, "autofscv"); - sx_init(&sc->sc_lock, "autofslk"); + TAILQ_INIT(&autofs_softc->sc_requests); + cv_init(&autofs_softc->sc_cv, "autofscv"); + sx_init(&autofs_softc->sc_lock, "autofslk"); - error = make_dev_p(MAKEDEV_CHECKNAME, &sc->sc_cdev, &autofs_cdevsw, - NULL, UID_ROOT, GID_WHEEL, 0600, "autofs"); + error = make_dev_p(MAKEDEV_CHECKNAME, &autofs_softc->sc_cdev, + &autofs_cdevsw, NULL, UID_ROOT, GID_WHEEL, 0600, "autofs"); if (error != 0) { AUTOFS_WARN("failed to create device node, error %d", error); - free(sc, M_AUTOFS); + uma_zdestroy(autofs_request_zone); + uma_zdestroy(autofs_node_zone); + free(autofs_softc, M_AUTOFS); + return (error); } - sc->sc_cdev->si_drv1 = sc; + autofs_softc->sc_cdev->si_drv1 = autofs_softc; return (0); } @@ -182,22 +189,22 @@ int autofs_uninit(struct vfsconf *vfsp) { - sx_xlock(&sc->sc_lock); - if (sc->sc_dev_opened) { - sx_xunlock(&sc->sc_lock); + sx_xlock(&autofs_softc->sc_lock); + if (autofs_softc->sc_dev_opened) { + sx_xunlock(&autofs_softc->sc_lock); return (EBUSY); } - if (sc->sc_cdev != NULL) - destroy_dev(sc->sc_cdev); + if (autofs_softc->sc_cdev != NULL) + destroy_dev(autofs_softc->sc_cdev); uma_zdestroy(autofs_request_zone); uma_zdestroy(autofs_node_zone); - sx_xunlock(&sc->sc_lock); + sx_xunlock(&autofs_softc->sc_lock); /* * XXX: Race with open? */ - free(sc, M_AUTOFS); + free(autofs_softc, M_AUTOFS); return (0); } @@ -209,11 +216,11 @@ autofs_ignore_thread(const struct thread p = td->td_proc; - if (sc->sc_dev_opened == false) + if (autofs_softc->sc_dev_opened == false) return (false); PROC_LOCK(p); - if (p->p_session->s_sid == sc->sc_dev_sid) { + if (p->p_session->s_sid == autofs_softc->sc_dev_sid) { PROC_UNLOCK(p); return (true); } @@ -256,12 +263,10 @@ static void autofs_callout(void *context) { struct autofs_request *ar; - struct autofs_softc *sc; ar = context; - sc = ar->ar_mount->am_softc; - sx_xlock(&sc->sc_lock); + sx_xlock(&autofs_softc->sc_lock); AUTOFS_WARN("request %d for %s timed out after %d seconds", ar->ar_id, ar->ar_path, autofs_timeout); /* @@ -270,8 +275,8 @@ autofs_callout(void *context) ar->ar_error = ETIMEDOUT; ar->ar_done = true; ar->ar_in_progress = false; - cv_broadcast(&sc->sc_cv); - sx_xunlock(&sc->sc_lock); + cv_broadcast(&autofs_softc->sc_cv); + sx_xunlock(&autofs_softc->sc_lock); } bool @@ -356,16 +361,14 @@ autofs_trigger_one(struct autofs_node *a { sigset_t oldset; struct autofs_mount *amp; - struct autofs_softc *sc; struct autofs_node *firstanp; struct autofs_request *ar; char *key, *path; int error = 0, request_error, last; amp = VFSTOAUTOFS(anp->an_vnode->v_mount); - sc = amp->am_softc; - sx_assert(&sc->sc_lock, SA_XLOCKED); + sx_assert(&autofs_softc->sc_lock, SA_XLOCKED); if (anp->an_parent == NULL) { key = strndup(component, componentlen, M_AUTOFS); @@ -378,7 +381,7 @@ autofs_trigger_one(struct autofs_node *a path = autofs_path(anp); - TAILQ_FOREACH(ar, &sc->sc_requests, ar_next) { + TAILQ_FOREACH(ar, &autofs_softc->sc_requests, ar_next) { if (strcmp(ar->ar_path, path) != 0) continue; if (strcmp(ar->ar_key, key) != 0) @@ -402,7 +405,8 @@ autofs_trigger_one(struct autofs_node *a ar = uma_zalloc(autofs_request_zone, M_WAITOK | M_ZERO); ar->ar_mount = amp; - ar->ar_id = atomic_fetchadd_int(&sc->sc_last_request_id, 1); + ar->ar_id = + atomic_fetchadd_int(&autofs_softc->sc_last_request_id, 1); strlcpy(ar->ar_from, amp->am_from, sizeof(ar->ar_from)); strlcpy(ar->ar_path, path, sizeof(ar->ar_path)); strlcpy(ar->ar_prefix, amp->am_prefix, sizeof(ar->ar_prefix)); @@ -414,14 +418,15 @@ autofs_trigger_one(struct autofs_node *a callout_reset(&ar->ar_callout, autofs_timeout * hz, autofs_callout, ar); refcount_init(&ar->ar_refcount, 1); - TAILQ_INSERT_TAIL(&sc->sc_requests, ar, ar_next); + TAILQ_INSERT_TAIL(&autofs_softc->sc_requests, ar, ar_next); } - cv_broadcast(&sc->sc_cv); + cv_broadcast(&autofs_softc->sc_cv); while (ar->ar_done == false) { if (autofs_interruptible != 0) { autofs_set_sigmask(&oldset); - error = cv_wait_sig(&sc->sc_cv, &sc->sc_lock); + error = cv_wait_sig(&autofs_softc->sc_cv, + &autofs_softc->sc_lock); autofs_restore_sigmask(&oldset); if (error != 0) { /* @@ -434,7 +439,7 @@ autofs_trigger_one(struct autofs_node *a break; } } else { - cv_wait(&sc->sc_cv, &sc->sc_lock); + cv_wait(&autofs_softc->sc_cv, &autofs_softc->sc_lock); } } @@ -446,13 +451,13 @@ autofs_trigger_one(struct autofs_node *a last = refcount_release(&ar->ar_refcount); if (last) { - TAILQ_REMOVE(&sc->sc_requests, ar, ar_next); + TAILQ_REMOVE(&autofs_softc->sc_requests, ar, ar_next); /* * XXX: Is it safe? */ - sx_xunlock(&sc->sc_lock); + sx_xunlock(&autofs_softc->sc_lock); callout_drain(&ar->ar_callout); - sx_xlock(&sc->sc_lock); + sx_xlock(&autofs_softc->sc_lock); uma_zfree(autofs_request_zone, ar); } @@ -507,21 +512,21 @@ autofs_trigger(struct autofs_node *anp, AUTOFS_DEBUG("trigger failed with error %d; will retry in " "%d seconds, %d attempts left", error, autofs_retry_delay, autofs_retry_attempts - anp->an_retries); - sx_xunlock(&sc->sc_lock); + sx_xunlock(&autofs_softc->sc_lock); pause("autofs_retry", autofs_retry_delay * hz); - sx_xlock(&sc->sc_lock); + sx_xlock(&autofs_softc->sc_lock); } } static int -autofs_ioctl_request(struct autofs_softc *sc, struct autofs_daemon_request *adr) +autofs_ioctl_request(struct autofs_daemon_request *adr) { struct autofs_request *ar; int error; - sx_xlock(&sc->sc_lock); + sx_xlock(&autofs_softc->sc_lock); for (;;) { - TAILQ_FOREACH(ar, &sc->sc_requests, ar_next) { + TAILQ_FOREACH(ar, &autofs_softc->sc_requests, ar_next) { if (ar->ar_done) continue; if (ar->ar_in_progress) @@ -533,21 +538,22 @@ autofs_ioctl_request(struct autofs_softc if (ar != NULL) break; - error = cv_wait_sig(&sc->sc_cv, &sc->sc_lock); + error = cv_wait_sig(&autofs_softc->sc_cv, + &autofs_softc->sc_lock); if (error != 0) { /* * XXX: For some reson this returns -1 instead * of EINTR, wtf?! */ error = EINTR; - sx_xunlock(&sc->sc_lock); + sx_xunlock(&autofs_softc->sc_lock); AUTOFS_DEBUG("failed with error %d", error); return (error); } } ar->ar_in_progress = true; - sx_xunlock(&sc->sc_lock); + sx_xunlock(&autofs_softc->sc_lock); adr->adr_id = ar->ar_id; strlcpy(adr->adr_from, ar->ar_from, sizeof(adr->adr_from)); @@ -557,25 +563,25 @@ autofs_ioctl_request(struct autofs_softc strlcpy(adr->adr_options, ar->ar_options, sizeof(adr->adr_options)); PROC_LOCK(curproc); - sc->sc_dev_sid = curproc->p_session->s_sid; + autofs_softc->sc_dev_sid = curproc->p_session->s_sid; PROC_UNLOCK(curproc); return (0); } static int -autofs_ioctl_done(struct autofs_softc *sc, struct autofs_daemon_done *add) +autofs_ioctl_done(struct autofs_daemon_done *add) { struct autofs_request *ar; - sx_xlock(&sc->sc_lock); - TAILQ_FOREACH(ar, &sc->sc_requests, ar_next) { + sx_xlock(&autofs_softc->sc_lock); + TAILQ_FOREACH(ar, &autofs_softc->sc_requests, ar_next) { if (ar->ar_id == add->add_id) break; } if (ar == NULL) { - sx_xunlock(&sc->sc_lock); + sx_xunlock(&autofs_softc->sc_lock); AUTOFS_DEBUG("id %d not found", add->add_id); return (ESRCH); } @@ -583,9 +589,9 @@ autofs_ioctl_done(struct autofs_softc *s ar->ar_error = add->add_error; ar->ar_done = true; ar->ar_in_progress = false; - cv_broadcast(&sc->sc_cv); + cv_broadcast(&autofs_softc->sc_cv); - sx_xunlock(&sc->sc_lock); + sx_xunlock(&autofs_softc->sc_lock); return (0); } @@ -594,7 +600,7 @@ static int autofs_open(struct cdev *dev, int flags, int fmt, struct thread *td) { - sx_xlock(&sc->sc_lock); + sx_xlock(&autofs_softc->sc_lock); /* * We must never block automountd(8) and its descendants, and we use * session ID to determine that: we store session id of the process @@ -603,13 +609,13 @@ autofs_open(struct cdev *dev, int flags, * instance would break the previous one. The check below prevents * it from happening. */ - if (sc->sc_dev_opened) { - sx_xunlock(&sc->sc_lock); + if (autofs_softc->sc_dev_opened) { + sx_xunlock(&autofs_softc->sc_lock); return (EBUSY); } - sc->sc_dev_opened = true; - sx_xunlock(&sc->sc_lock); + autofs_softc->sc_dev_opened = true; + sx_xunlock(&autofs_softc->sc_lock); return (0); } @@ -618,10 +624,10 @@ static int autofs_close(struct cdev *dev, int flag, int fmt, struct thread *td) { - sx_xlock(&sc->sc_lock); - KASSERT(sc->sc_dev_opened, ("not opened?")); - sc->sc_dev_opened = false; - sx_xunlock(&sc->sc_lock); + sx_xlock(&autofs_softc->sc_lock); + KASSERT(autofs_softc->sc_dev_opened, ("not opened?")); + autofs_softc->sc_dev_opened = false; + sx_xunlock(&autofs_softc->sc_lock); return (0); } @@ -631,14 +637,14 @@ autofs_ioctl(struct cdev *dev, u_long cm struct thread *td) { - KASSERT(sc->sc_dev_opened, ("not opened?")); + KASSERT(autofs_softc->sc_dev_opened, ("not opened?")); switch (cmd) { case AUTOFSREQUEST: - return (autofs_ioctl_request(sc, + return (autofs_ioctl_request( (struct autofs_daemon_request *)arg)); case AUTOFSDONE: - return (autofs_ioctl_done(sc, + return (autofs_ioctl_done( (struct autofs_daemon_done *)arg)); default: AUTOFS_DEBUG("invalid cmd %lx", cmd); Modified: stable/10/sys/fs/autofs/autofs.h ============================================================================== --- stable/10/sys/fs/autofs/autofs.h Sun Aug 31 21:51:01 2014 (r270899) +++ stable/10/sys/fs/autofs/autofs.h Sun Aug 31 21:52:26 2014 (r270900) @@ -75,7 +75,6 @@ struct autofs_node { struct autofs_mount { TAILQ_ENTRY(autofs_mount) am_next; - struct autofs_softc *am_softc; struct autofs_node *am_root; struct mount *am_mp; struct sx am_lock; Modified: stable/10/sys/fs/autofs/autofs_vfsops.c ============================================================================== --- stable/10/sys/fs/autofs/autofs_vfsops.c Sun Aug 31 21:51:01 2014 (r270899) +++ stable/10/sys/fs/autofs/autofs_vfsops.c Sun Aug 31 21:52:26 2014 (r270900) @@ -48,7 +48,7 @@ static const char *autofs_opts[] = { "from", "master_options", "master_prefix", NULL }; -extern struct autofs_softc *sc; +extern struct autofs_softc *autofs_softc; static int autofs_mount(struct mount *mp) @@ -78,7 +78,6 @@ autofs_mount(struct mount *mp) amp = malloc(sizeof(*amp), M_AUTOFS, M_WAITOK | M_ZERO); mp->mnt_data = amp; amp->am_mp = mp; - amp->am_softc = sc; strlcpy(amp->am_from, from, sizeof(amp->am_from)); strlcpy(amp->am_mountpoint, fspath, sizeof(amp->am_mountpoint)); strlcpy(amp->am_options, options, sizeof(amp->am_options)); @@ -129,8 +128,8 @@ autofs_unmount(struct mount *mp, int mnt */ for (;;) { found = false; - sx_xlock(&sc->sc_lock); - TAILQ_FOREACH(ar, &sc->sc_requests, ar_next) { + sx_xlock(&autofs_softc->sc_lock); + TAILQ_FOREACH(ar, &autofs_softc->sc_requests, ar_next) { if (ar->ar_mount != amp) continue; ar->ar_error = ENXIO; @@ -138,11 +137,11 @@ autofs_unmount(struct mount *mp, int mnt ar->ar_in_progress = false; found = true; } - sx_xunlock(&sc->sc_lock); + sx_xunlock(&autofs_softc->sc_lock); if (found == false) break; - cv_broadcast(&sc->sc_cv); + cv_broadcast(&autofs_softc->sc_cv); pause("autofs_umount", 1); } Modified: stable/10/sys/fs/autofs/autofs_vnops.c ============================================================================== --- stable/10/sys/fs/autofs/autofs_vnops.c Sun Aug 31 21:51:01 2014 (r270899) +++ stable/10/sys/fs/autofs/autofs_vnops.c Sun Aug 31 21:52:26 2014 (r270900) @@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$"); static int autofs_trigger_vn(struct vnode *vp, const char *path, int pathlen, struct vnode **newvp); +extern struct autofs_softc *autofs_softc; + static int autofs_access(struct vop_access_args *ap) { @@ -134,12 +136,10 @@ autofs_trigger_vn(struct vnode *vp, cons { struct autofs_node *anp; struct autofs_mount *amp; - struct autofs_softc *sc; int error, lock_flags; anp = vp->v_data; amp = VFSTOAUTOFS(vp->v_mount); - sc = amp->am_softc; /* * Release the vnode lock, so that other operations, in partcular @@ -151,7 +151,7 @@ autofs_trigger_vn(struct vnode *vp, cons vref(vp); VOP_UNLOCK(vp, 0); - sx_xlock(&sc->sc_lock); + sx_xlock(&autofs_softc->sc_lock); /* * XXX: Workaround for mounting the same thing multiple times; revisit. @@ -163,7 +163,7 @@ autofs_trigger_vn(struct vnode *vp, cons error = autofs_trigger(anp, path, pathlen); mounted: - sx_xunlock(&sc->sc_lock); + sx_xunlock(&autofs_softc->sc_lock); vn_lock(vp, lock_flags | LK_RETRY); vunref(vp); if ((vp->v_iflag & VI_DOOMED) != 0) { From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 21:53:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06077EDA; Sun, 31 Aug 2014 21:53:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E4FC51E63; Sun, 31 Aug 2014 21:53:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLrgCs092021; Sun, 31 Aug 2014 21:53:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLrgQl092020; Sun, 31 Aug 2014 21:53:42 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312153.s7VLrgQl092020@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270901 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:53:43 -0000 Author: trasz Date: Sun Aug 31 21:53:42 2014 New Revision: 270901 URL: http://svnweb.freebsd.org/changeset/base/270901 Log: MFC r270405: Don't fail on executable maps that return no entries. This turns useless error message into useful one. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Sun Aug 31 21:52:26 2014 (r270900) +++ stable/10/usr.sbin/autofs/common.c Sun Aug 31 21:53:42 2014 (r270901) @@ -716,7 +716,13 @@ parse_map_yyin(struct node *parent, cons for (;;) { ret = yylex(); if (ret == 0 || ret == NEWLINE) { - if (key != NULL || options != NULL) { + /* + * In case of executable map, the key is always + * non-NULL, even if the map is empty. So, make sure + * we don't fail empty maps here. + */ + if ((key != NULL && executable_key == NULL) || + options != NULL) { log_errx(1, "truncated entry at %s, line %d", map, lineno); } From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 21:55:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1298493; Sun, 31 Aug 2014 21:55:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E64BD1E6C; Sun, 31 Aug 2014 21:55:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLt96A092327; Sun, 31 Aug 2014 21:55:09 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLt9Wf092323; Sun, 31 Aug 2014 21:55:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312155.s7VLt9Wf092323@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:55:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270902 - in stable/10: etc usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:55:10 -0000 Author: trasz Date: Sun Aug 31 21:55:08 2014 New Revision: 270902 URL: http://svnweb.freebsd.org/changeset/base/270902 Log: MFC r270406: Add "nobrowse" option. Previously automountd(8) always behaved as if it was set, now it's conditional. PR: 192862 Sponsored by: The FreeBSD Foundation Modified: stable/10/etc/auto_master stable/10/usr.sbin/autofs/auto_master.5 stable/10/usr.sbin/autofs/automountd.c stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/auto_master ============================================================================== --- stable/10/etc/auto_master Sun Aug 31 21:53:42 2014 (r270901) +++ stable/10/etc/auto_master Sun Aug 31 21:55:08 2014 (r270902) @@ -2,4 +2,4 @@ # # Automounter master map, see auto_master(5) for details. # -/net -hosts -nosuid +/net -hosts -nobrowse,nosuid Modified: stable/10/usr.sbin/autofs/auto_master.5 ============================================================================== --- stable/10/usr.sbin/autofs/auto_master.5 Sun Aug 31 21:53:42 2014 (r270901) +++ stable/10/usr.sbin/autofs/auto_master.5 Sun Aug 31 21:55:08 2014 (r270902) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 31, 2014 +.Dd August 23, 2014 .Dt AUTO_MASTER 5 .Os .Sh NAME @@ -134,6 +134,10 @@ is used to specify filesystem type. It is not passed to the mount program as an option. Instead, it is passed as argument to .Cm "mount -t". +The special option +.Li nobrowse +is used to disable creation of top-level directories for special +and executable maps. .Pp The optional .Pa mountpoint Modified: stable/10/usr.sbin/autofs/automountd.c ============================================================================== --- stable/10/usr.sbin/autofs/automountd.c Sun Aug 31 21:53:42 2014 (r270901) +++ stable/10/usr.sbin/autofs/automountd.c Sun Aug 31 21:55:08 2014 (r270902) @@ -182,7 +182,7 @@ handle_request(const struct autofs_daemo const char *map; struct node *root, *parent, *node; FILE *f; - char *options, *fstype, *retrycnt, *tmp; + char *options, *fstype, *nobrowse, *retrycnt, *tmp; int error; log_debugx("got request %d: from %s, path %s, prefix \"%s\", " @@ -222,6 +222,28 @@ handle_request(const struct autofs_daemo log_debugx("found node defined at %s:%d; not a mountpoint", node->n_config_file, node->n_config_line); + options = node_options(node); + + /* + * Prepend options passed via automountd(8) command line. + */ + if (cmdline_options != NULL) { + options = + separated_concat(cmdline_options, options, ','); + } + + nobrowse = pick_option("nobrowse", &options); + if (nobrowse != NULL && adr->adr_key[0] == '\0') { + log_debugx("skipping map %s due to \"nobrowse\" " + "option; exiting", map); + done(0); + + /* + * Exit without calling exit_callback(). + */ + quick_exit(0); + } + /* * Not a mountpoint; create directories in the autofs mount * and complete the request. @@ -239,9 +261,9 @@ handle_request(const struct autofs_daemo if (node != NULL) create_subtree(node, false); } - done(0); log_debugx("nothing to mount; exiting"); + done(0); /* * Exit without calling exit_callback(). @@ -274,6 +296,11 @@ handle_request(const struct autofs_daemo options = separated_concat(options, "automounted", ','); /* + * Remove "nobrowse", mount(8) doesn't understand it. + */ + pick_option("nobrowse", &options); + + /* * Figure out fstype. */ fstype = pick_option("fstype=", &options); @@ -309,8 +336,8 @@ handle_request(const struct autofs_daemo if (error != 0) log_errx(1, "mount failed"); - done(0); log_debugx("mount done; exiting"); + done(0); /* * Exit without calling exit_callback(). Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Sun Aug 31 21:53:42 2014 (r270901) +++ stable/10/usr.sbin/autofs/common.c Sun Aug 31 21:55:08 2014 (r270902) @@ -856,6 +856,36 @@ again: } } +/* + * Parse output of a special map called without argument. This is just + * a list of keys. + */ +static void +parse_map_keys_yyin(struct node *parent, const char *map) +{ + char *key = NULL; + int ret; + + lineno = 1; + + for (;;) { + ret = yylex(); + + if (ret == NEWLINE) + continue; + + if (ret == 0) { + /* + * End of file. + */ + break; + } + + key = checked_strdup(yytext); + node_new(parent, key, NULL, NULL, map, lineno); + } +} + static bool file_is_executable(const char *path) { @@ -882,11 +912,6 @@ parse_special_map(struct node *parent, c assert(map[0] == '-'); - if (key == NULL) { - log_debugx("skipping map %s due to forced -nobrowse", map); - return; - } - /* * +1 to skip leading "-" in map name. */ @@ -897,7 +922,11 @@ parse_special_map(struct node *parent, c yyin = auto_popen(path, key, NULL); assert(yyin != NULL); - parse_map_yyin(parent, map, key); + if (key == NULL) { + parse_map_keys_yyin(parent, map); + } else { + parse_map_yyin(parent, map, key); + } error = auto_pclose(yyin); yyin = NULL; From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 21:56:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1B221CB; Sun, 31 Aug 2014 21:56:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A286F1E7B; Sun, 31 Aug 2014 21:56:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLugmm092581; Sun, 31 Aug 2014 21:56:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLugr1092580; Sun, 31 Aug 2014 21:56:42 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312156.s7VLugr1092580@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:56:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270903 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:56:42 -0000 Author: trasz Date: Sun Aug 31 21:56:42 2014 New Revision: 270903 URL: http://svnweb.freebsd.org/changeset/base/270903 Log: MFC r270454: Fix handling of keys in executable maps. Previously it was broken for keys containing whitespace. PR: 192947 Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Sun Aug 31 21:55:08 2014 (r270902) +++ stable/10/usr.sbin/autofs/common.c Sun Aug 31 21:56:42 2014 (r270903) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#define _WITH_GETLINE #include #include #include @@ -213,6 +214,7 @@ node_new(struct node *parent, char *key, TAILQ_INIT(&n->n_children); assert(key != NULL); + assert(key[0] != '\0'); n->n_key = key; if (options != NULL) n->n_options = options; @@ -243,6 +245,7 @@ node_new_map(struct node *parent, char * TAILQ_INIT(&n->n_children); assert(key != NULL); + assert(key[0] != '\0'); n->n_key = key; if (options != NULL) n->n_options = options; @@ -565,6 +568,7 @@ node_path_x(const struct node *n, char * return (x); } + assert(n->n_key[0] != '\0'); path = separated_concat(n->n_key, x, '/'); free(x); @@ -857,33 +861,44 @@ again: } /* - * Parse output of a special map called without argument. This is just - * a list of keys. + * Parse output of a special map called without argument. It is a list + * of keys, separated by newlines. They can contain whitespace, so use + * getline(3) instead of lexer used for maps. */ static void parse_map_keys_yyin(struct node *parent, const char *map) { - char *key = NULL; - int ret; + char *line = NULL, *key; + size_t linecap = 0; + ssize_t linelen; lineno = 1; for (;;) { - ret = yylex(); - - if (ret == NEWLINE) - continue; - - if (ret == 0) { + linelen = getline(&line, &linecap, yyin); + if (linelen < 0) { /* * End of file. */ break; } + if (linelen <= 1) { + /* + * Empty line, consisting of just the newline. + */ + continue; + } + + /* + * "-1" to strip the trailing newline. + */ + key = strndup(line, linelen - 1); - key = checked_strdup(yytext); + log_debugx("adding key \"%s\"", key); node_new(parent, key, NULL, NULL, map, lineno); + lineno++; } + free(line); } static bool From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 21:58:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B520314; Sun, 31 Aug 2014 21:58:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 261FF1E90; Sun, 31 Aug 2014 21:58:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VLw8RI092842; Sun, 31 Aug 2014 21:58:08 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VLw8ZE092841; Sun, 31 Aug 2014 21:58:08 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201408312158.s7VLw8ZE092841@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 31 Aug 2014 21:58:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270904 - stable/10/sys/fs/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 21:58:08 -0000 Author: trasz Date: Sun Aug 31 21:58:07 2014 New Revision: 270904 URL: http://svnweb.freebsd.org/changeset/base/270904 Log: MFC r270507: Fix bug that, assuming a/ is a root of NFS filesystem mounted on autofs, prevented "mv a/from a/to" from working, while "cd a && mv from to" was ok. PR: 192948 Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/fs/autofs/autofs_vnops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/autofs/autofs_vnops.c ============================================================================== --- stable/10/sys/fs/autofs/autofs_vnops.c Sun Aug 31 21:56:42 2014 (r270903) +++ stable/10/sys/fs/autofs/autofs_vnops.c Sun Aug 31 21:58:07 2014 (r270904) @@ -276,9 +276,6 @@ autofs_lookup(struct vop_lookup_args *ap } } - if (cnp->cn_nameiop == RENAME) - return (EOPNOTSUPP); - AUTOFS_LOCK(amp); error = autofs_node_find(anp, cnp->cn_nameptr, cnp->cn_namelen, &child); if (error != 0) { From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 23:09:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FEB3D18; Sun, 31 Aug 2014 23:09:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FBD115B5; Sun, 31 Aug 2014 23:09:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7VN9PLC026552; Sun, 31 Aug 2014 23:09:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7VN9NuI026535; Sun, 31 Aug 2014 23:09:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201408312309.s7VN9NuI026535@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 31 Aug 2014 23:09:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270905 - in stable/10: . contrib/atf contrib/atf/atf-c contrib/atf/atf-c++ contrib/atf/atf-sh etc/mtree lib/atf/libatf-c lib/atf/libatf-c++ lib/atf/libatf-c++/tests lib/atf/libatf-c/te... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 23:09:26 -0000 Author: ngie Date: Sun Aug 31 23:09:23 2014 New Revision: 270905 URL: http://svnweb.freebsd.org/changeset/base/270905 Log: MFC r266650, r267172 (both by jmmv): r266650: Change libatf-c and libatf-c++ to be private libraries. We should not be leaking these interfaces to the outside world given that it's much easier for third-party components to use the devel/atf package from ports. As a side-effect, we can also drop the ATF pkgconfig and aclocal files from the base system. Nothing in the base system needs these, and it was quite ugly to have to get them installed only so that a few ports could build. The offending ports have been fixed to depend on devel/atf explicitly. Reviewed by: bapt r267172: Homogenize libatf-* version numbers with upstream. The libatf-* major version numbers in FreeBSD were one version ahead of upstream because, when atf was first imported into FreeBSD, the upstream numbers were not respected. This is just confusing and bound to cause problems down the road. Fix this by taking advantage of the fact that libatf-* are now private and that atf is not yet built by default. However, and unfortunately, a clean build is needed for tests to continue working once "make delete-old-libs" has been run; hence the note in UPDATING. Phabric: D701 Approved by: jmmv (maintainer, mentor) Deleted: stable/10/contrib/atf/atf-c++/atf-c++.m4 stable/10/contrib/atf/atf-c++/atf-c++.pc.in stable/10/contrib/atf/atf-c/atf-c.m4 stable/10/contrib/atf/atf-c/atf-c.pc.in stable/10/contrib/atf/atf-c/atf-common.m4 stable/10/contrib/atf/atf-sh/atf-sh.m4 stable/10/contrib/atf/atf-sh/atf-sh.pc.in Modified: stable/10/UPDATING stable/10/contrib/atf/FREEBSD-Xlist stable/10/etc/mtree/BSD.tests.dist stable/10/lib/atf/libatf-c++/Makefile stable/10/lib/atf/libatf-c++/tests/Makefile stable/10/lib/atf/libatf-c/Makefile stable/10/lib/atf/libatf-c/tests/Makefile stable/10/libexec/atf/atf-check/Makefile stable/10/share/mk/atf.test.mk stable/10/share/mk/bsd.libnames.mk stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.bin/atf/atf-sh/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/UPDATING Sun Aug 31 23:09:23 2014 (r270905) @@ -16,6 +16,22 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20140831: + The libatf-c and libatf-c++ major versions were downgraded to 0 and + 1 respectively to match the upstream numbers. They were out of + sync because, when they were originally added to FreeBSD, the + upstream versions were not respected. These libraries are private + and not yet built by default, so renumbering them should be a + non-issue. However, unclean source trees will yield broken test + programs once the operator executes "make delete-old-libs" after a + "make installworld". + + If you are using WITH_TESTS=yes (not the default), wipe the object + tree and rebuild from scratch to prevent spurious test failures. + This is only needed once: the old, misnumbered libraries have been + added to OptionalObsoleteFiles.inc so they will be removed during a + clean upgrade. + 20140814: The ixgbe tunables now match their sysctl counterparts, for example: hw.ixgbe.enable_aim => hw.ix.enable_aim Modified: stable/10/contrib/atf/FREEBSD-Xlist ============================================================================== --- stable/10/contrib/atf/FREEBSD-Xlist Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/contrib/atf/FREEBSD-Xlist Sun Aug 31 23:09:23 2014 (r270905) @@ -2,6 +2,8 @@ */*/Makefile* */Atffile */Makefile* +*/*.m4 +*/*.pc.in Atffile INSTALL Makefile* Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/etc/mtree/BSD.tests.dist Sun Aug 31 23:09:23 2014 (r270905) @@ -12,8 +12,6 @@ .. .. share - aclocal - .. atf .. doc Modified: stable/10/lib/atf/libatf-c++/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c++/Makefile Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/lib/atf/libatf-c++/Makefile Sun Aug 31 23:09:23 2014 (r270905) @@ -28,7 +28,8 @@ .include LIB= atf-c++ -SHLIB_MAJOR= 2 +PRIVATELIB= true +SHLIB_MAJOR= 1 # libatf-c++ depends on the C version of the ATF library to build. DPADD= ${LIBATF_C} @@ -72,20 +73,6 @@ INCSDIR_atf-c++.hpp= ${INCLUDEDIR} MAN= atf-c++-api.3 -all: atf-c++.pc -atf-c++.pc: atf-c++.pc.in atf-version - sed -e 's,__CXX__,${CXX},g' \ - -e 's,__INCLUDEDIR__,${INCLUDEDIR},g' \ - -e 's,__LIBDIR__,${LIBDIR},g' \ - -e "s,__ATF_VERSION__,$$(cat atf-version),g" \ - <${ATF}/atf-c++/atf-c++.pc.in >atf-c++.pc - -beforeinstall: - ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - atf-c++.pc ${DESTDIR}${LIBDATADIR}/pkgconfig - ${INSTALL} -C -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \ - ${ATF}/atf-c++/atf-c++.m4 ${DESTDIR}${SHAREDIR}/aclocal - .if ${MK_TESTS} != "no" SUBDIR= tests .endif Modified: stable/10/lib/atf/libatf-c++/tests/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c++/tests/Makefile Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/lib/atf/libatf-c++/tests/Makefile Sun Aug 31 23:09:23 2014 (r270905) @@ -26,6 +26,4 @@ ATF_TESTS_CXX+= ${_T} SRCS.${_T}= ${_T}.cpp test_helpers.cpp .endfor -ATF_TESTS_SH= pkg_config_test - .include Modified: stable/10/lib/atf/libatf-c/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c/Makefile Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/lib/atf/libatf-c/Makefile Sun Aug 31 23:09:23 2014 (r270905) @@ -28,7 +28,8 @@ .include LIB= atf-c -SHLIB_MAJOR= 1 +PRIVATELIB= true +SHLIB_MAJOR= 0 ATF= ${.CURDIR:H:H:H}/contrib/atf .PATH: ${ATF} @@ -74,22 +75,6 @@ INCSDIR_atf-c.h= ${INCLUDEDIR} MAN= atf-c-api.3 -all: atf-c.pc -atf-c.pc: atf-c.pc.in atf-version - sed -e 's,__CC__,${CC},g' \ - -e 's,__INCLUDEDIR__,${INCLUDEDIR},g' \ - -e 's,__LIBDIR__,${LIBDIR},g' \ - -e "s,__ATF_VERSION__,$$(cat atf-version),g" \ - <${ATF}/atf-c/atf-c.pc.in >atf-c.pc - -beforeinstall: - ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - atf-c.pc ${DESTDIR}${LIBDATADIR}/pkgconfig - ${INSTALL} -C -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \ - ${ATF}/atf-c/atf-common.m4 ${DESTDIR}${SHAREDIR}/aclocal - ${INSTALL} -C -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \ - ${ATF}/atf-c/atf-c.m4 ${DESTDIR}${SHAREDIR}/aclocal - .if ${MK_TESTS} != "no" SUBDIR= tests .endif Modified: stable/10/lib/atf/libatf-c/tests/Makefile ============================================================================== --- stable/10/lib/atf/libatf-c/tests/Makefile Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/lib/atf/libatf-c/tests/Makefile Sun Aug 31 23:09:23 2014 (r270905) @@ -33,6 +33,4 @@ ATF_TESTS_C+= ${_T} SRCS.${_T}= ${_T}.c test_helpers.c .endfor -ATF_TESTS_SH= pkg_config_test - .include Modified: stable/10/libexec/atf/atf-check/Makefile ============================================================================== --- stable/10/libexec/atf/atf-check/Makefile Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/libexec/atf/atf-check/Makefile Sun Aug 31 23:09:23 2014 (r270905) @@ -37,11 +37,11 @@ MAN= atf-check.1 CFLAGS+= -I${ATF} -DPADD+= ${LIBATF_CXX} ${LIBATF_C} - LDFLAGS+= -L${.OBJDIR}/../../../lib/atf/libatf-c++ LDFLAGS+= -L${.OBJDIR}/../../../lib/atf/libatf-c +DPADD+= ${LIBATF_CXX} ${LIBATF_C} LDADD+= -latf-c++ -latf-c +USEPRIVATELIB= atf-c++ atf-c .if ${MK_TESTS} != "no" SUBDIR+= tests Modified: stable/10/share/mk/atf.test.mk ============================================================================== --- stable/10/share/mk/atf.test.mk Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/share/mk/atf.test.mk Sun Aug 31 23:09:23 2014 (r270905) @@ -72,6 +72,7 @@ MAN.${_T}?= # empty SRCS.${_T}?= ${_T}.c DPADD.${_T}+= ${LIBATF_C} LDADD.${_T}+= -latf-c +USEPRIVATELIB+= atf-c TEST_INTERFACE.${_T}= atf .endfor .endif @@ -85,6 +86,7 @@ MAN.${_T}?= # empty SRCS.${_T}?= ${_T}${CXX_SUFFIX:U.cc} DPADD.${_T}+= ${LIBATF_CXX} ${LIBATF_C} LDADD.${_T}+= -latf-c++ -latf-c +USEPRIVATELIB+= atf-c++ TEST_INTERFACE.${_T}= atf .endfor .endif Modified: stable/10/share/mk/bsd.libnames.mk ============================================================================== --- stable/10/share/mk/bsd.libnames.mk Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/share/mk/bsd.libnames.mk Sun Aug 31 23:09:23 2014 (r270905) @@ -13,8 +13,8 @@ LIBCRT0?= ${DESTDIR}${LIBDIR}/crt0.o LIBALIAS?= ${DESTDIR}${LIBDIR}/libalias.a LIBARCHIVE?= ${DESTDIR}${LIBDIR}/libarchive.a LIBASN1?= ${DESTDIR}${LIBDIR}/libasn1.a -LIBATF_C?= ${DESTDIR}${LIBDIR}/libatf-c.a -LIBATF_CXX?= ${DESTDIR}${LIBDIR}/libatf-c++.a +LIBATF_C?= ${DESTDIR}${LIBPRIVATEDIR}/libatf-c.a +LIBATF_CXX?= ${DESTDIR}${LIBPRIVATEDIR}/libatf-c++.a LIBATM?= ${DESTDIR}${LIBDIR}/libatm.a LIBAUDITD?= ${DESTDIR}${LIBDIR}/libauditd.a LIBAVL?= ${DESTDIR}${LIBDIR}/libavl.a Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Sun Aug 31 23:09:23 2014 (r270905) @@ -4070,7 +4070,38 @@ OLD_FILES+=usr/share/man/man8/telnetd.8. .endif .if ${MK_TESTS} == yes +OLD_LIBS+=usr/lib/libatf-c++.a +OLD_LIBS+=usr/lib/libatf-c++.so OLD_LIBS+=usr/lib/libatf-c++.so.1 +OLD_LIBS+=usr/lib/libatf-c++.so.2 +OLD_LIBS+=usr/lib/libatf-c++_p.a +OLD_LIBS+=usr/lib/libatf-c.a +OLD_LIBS+=usr/lib/libatf-c.so +OLD_LIBS+=usr/lib/libatf-c.so.1 +OLD_LIBS+=usr/lib/libatf-c_p.a +OLD_LIBS+=usr/lib/private/libatf-c.so.1 +OLD_LIBS+=usr/lib/private/libatf-c++.so.2 +.if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" +OLD_LIBS+=usr/lib32/libatf-c++.a +OLD_LIBS+=usr/lib32/libatf-c++.so +OLD_LIBS+=usr/lib32/libatf-c++.so.1 +OLD_LIBS+=usr/lib32/libatf-c++.so.2 +OLD_LIBS+=usr/lib32/libatf-c++_p.a +OLD_LIBS+=usr/lib32/libatf-c.a +OLD_LIBS+=usr/lib32/libatf-c.so +OLD_LIBS+=usr/lib32/libatf-c.so.1 +OLD_LIBS+=usr/lib32/libatf-c_p.a +OLD_LIBS+=usr/lib32/private/libatf-c.so.1 +OLD_LIBS+=usr/lib32/private/libatf-c++.so.2 +.endif +OLD_FILES+=usr/libdata/pkgconfig/atf-c++.pc +OLD_FILES+=usr/libdata/pkgconfig/atf-c.pc +OLD_FILES+=usr/libdata/pkgconfig/atf-sh.pc +OLD_FILES+=usr/share/aclocal/atf-c++.m4 +OLD_FILES+=usr/share/aclocal/atf-c.m4 +OLD_FILES+=usr/share/aclocal/atf-common.m4 +OLD_FILES+=usr/share/aclocal/atf-sh.m4 +OLD_DIRS+=usr/share/aclocal OLD_FILES+=usr/tests/bin/date/legacy_test OLD_FILES+=usr/tests/lib/atf/libatf-c/test_helpers_test OLD_FILES+=usr/tests/lib/atf/test-programs/fork_test @@ -4085,6 +4116,7 @@ OLD_FILES+=usr/tests/lib/atf/libatf-c++/ OLD_FILES+=usr/tests/lib/atf/libatf-c++/parser_test OLD_FILES+=usr/tests/lib/atf/libatf-c++/process_test OLD_FILES+=usr/tests/lib/atf/libatf-c++/sanity_test +OLD_FILES+=usr/tests/lib/atf/libatf-c++/pkg_config_test OLD_FILES+=usr/tests/lib/atf/libatf-c++/text_test OLD_FILES+=usr/tests/lib/atf/libatf-c++/ui_test OLD_FILES+=usr/tests/lib/atf/libatf-c/dynstr_test @@ -4092,6 +4124,7 @@ OLD_FILES+=usr/tests/lib/atf/libatf-c/en OLD_FILES+=usr/tests/lib/atf/libatf-c/fs_test OLD_FILES+=usr/tests/lib/atf/libatf-c/list_test OLD_FILES+=usr/tests/lib/atf/libatf-c/map_test +OLD_FILES+=usr/tests/lib/atf/libatf-c/pkg_config_test OLD_FILES+=usr/tests/lib/atf/libatf-c/process_helpers OLD_FILES+=usr/tests/lib/atf/libatf-c/process_test OLD_FILES+=usr/tests/lib/atf/libatf-c/sanity_test Modified: stable/10/usr.bin/atf/atf-sh/Makefile ============================================================================== --- stable/10/usr.bin/atf/atf-sh/Makefile Sun Aug 31 21:58:07 2014 (r270904) +++ stable/10/usr.bin/atf/atf-sh/Makefile Sun Aug 31 23:09:23 2014 (r270905) @@ -39,24 +39,13 @@ CFLAGS+= -I${ATF} DPADD+= ${LIBATF_C} ${LIBATF_CXX} LDADD+= -latf-c++ -latf-c +USEPRIVATELIB= atf-c++ atf-c FILESGROUPS= SUBR SUBRDIR= ${SHAREDIR}/atf SUBR= libatf-sh.subr -all: atf-sh.pc -atf-sh.pc: atf-sh.pc.in atf-version - sed -e 's,__EXEC_PREFIX__,/usr,g' \ - -e "s,__ATF_VERSION__,$$(cat atf-version),g" \ - <${ATF}/atf-sh/atf-sh.pc.in >atf-sh.pc - -beforeinstall: - ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - atf-sh.pc ${DESTDIR}${LIBDATADIR}/pkgconfig - ${INSTALL} -C -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} \ - ${ATF}/atf-sh/atf-sh.m4 ${DESTDIR}${SHAREDIR}/aclocal - .if ${MK_TESTS} != "no" SUBDIR+= tests .endif From owner-svn-src-all@FreeBSD.ORG Sun Aug 31 23:14:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 178C4E93; Sun, 31 Aug 2014 23:14:24 +0000 (UTC) Received: from mail-pa0-x235.google.com (mail-pa0-x235.google.com [IPv6:2607:f8b0:400e:c03::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C9C211788; Sun, 31 Aug 2014 23:14:23 +0000 (UTC) Received: by mail-pa0-f53.google.com with SMTP id fa1so10535450pad.26 for ; Sun, 31 Aug 2014 16:14:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=h1/QP7WeYEjlB9blEAgL7lxx5N6ko42CcLsctDvzoZ8=; b=umruFgWAqEDgvooJLTaqIyjMs51flbaLKZS3ZdntA1t1QnGdaSN8WAvW0XB0TUAXWY GPIs1tlBnZ+vqguRHeeleuiN0kMgMGatYiXB47xceWzrAYSvsruTCCIamjCtY+doA9qU znnfurFqtErKc4+e1sCRuCRmns+QNVDm4lKnChLwqviauaznZiewqcF40p89KelEtaS7 X0NvSmnotRgmWpu83sORToWNUmYqEKRpg7UnauxMdP0Jpm6Z9FFCgnGmpnTbqRYbSi5C Nxnjz3CfBm28WwR7OqxhmTcnO4PmJu09BIf01jHELyEF7+Xy+RF2hLb3wR0M4F0Hog5L nh2w== X-Received: by 10.68.136.100 with SMTP id pz4mr33863707pbb.119.1409526862837; Sun, 31 Aug 2014 16:14:22 -0700 (PDT) Received: from [192.168.20.5] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id e11sm9359021pdm.47.2014.08.31.16.14.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 31 Aug 2014 16:14:22 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_5737E3B2-5CA8-47D7-8EF0-A208D5012416"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r270905 - in stable/10: . contrib/atf contrib/atf/atf-c contrib/atf/atf-c++ contrib/atf/atf-sh etc/mtree lib/atf/libatf-c lib/atf/libatf-c++ lib/atf/libatf-c++/tests lib/atf/libatf-c/te... From: yaneurabeya@gmail.com In-Reply-To: <201408312309.s7VN9NuI026535@svn.freebsd.org> Date: Sun, 31 Aug 2014 16:14:20 -0700 Message-Id: <6FAE3831-F98D-49E6-B919-67386FC1F986@gmail.com> References: <201408312309.s7VN9NuI026535@svn.freebsd.org> To: Garrett Cooper X-Mailer: Apple Mail (2.1878.6) Cc: "freebsd-testing@freebsd.org" , svn-src-all@freebsd.org, Julio Merino X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Aug 2014 23:14:24 -0000 --Apple-Mail=_5737E3B2-5CA8-47D7-8EF0-A208D5012416 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Aug 31, 2014, at 4:09 PM, Garrett Cooper wrote: > Author: ngie > Date: Sun Aug 31 23:09:23 2014 > New Revision: 270905 > URL: http://svnweb.freebsd.org/changeset/base/270905 >=20 > Log: > MFC r266650, r267172 (both by jmmv): >=20 > r266650: >=20 > Change libatf-c and libatf-c++ to be private libraries. >=20 > We should not be leaking these interfaces to the outside world = given > that it's much easier for third-party components to use the = devel/atf > package from ports. >=20 > As a side-effect, we can also drop the ATF pkgconfig and aclocal = files > from the base system. Nothing in the base system needs these, and = it > was quite ugly to have to get them installed only so that a few = ports > could build. The offending ports have been fixed to depend on > devel/atf explicitly. >=20 > Reviewed by: bapt >=20 > r267172: >=20 > Homogenize libatf-* version numbers with upstream. >=20 > The libatf-* major version numbers in FreeBSD were one version = ahead of > upstream because, when atf was first imported into FreeBSD, the = upstream > numbers were not respected. This is just confusing and bound to = cause > problems down the road. >=20 > Fix this by taking advantage of the fact that libatf-* are now = private > and that atf is not yet built by default. However, and = unfortunately, a > clean build is needed for tests to continue working once "make > delete-old-libs" has been run; hence the note in UPDATING. >=20 > Phabric: D701 > Approved by: jmmv (maintainer, mentor) Hi all, If you=92re running stable/10 after this point, please be sure = to run make delete-old-libs as described in UPDATING (prior to = installworld though IIRC). It=92s important because you might run into = runtime linking issues with the tests depending on which compiler you = use, which could cause false positives when run with kyua as the ATF = code. I=92m going to try and get out the MFC for r267181 out before = 10.1 is cut as well, which should make going between CURRENT and = 10-STABLE considerably easier with the test infrastructure. Thanks! -Garrett --Apple-Mail=_5737E3B2-5CA8-47D7-8EF0-A208D5012416 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUA6xNAAoJEMZr5QU6S73exSoH/A6Isz48cE9TkGmzhE3JmGQS DA526u4LzaP9CadZYjR1pswBPP4y4xHWb0mznFmT3YWD91cC5qT+I4pR7Jm4ktug 4D5dz+lXLuolHx5dekkSXpra0jYup2UBODlw1IbQhRqmIU8hE7MtJGtLIEjoZpPg b3f8LohdSsGtT1qh4SBvKgKCw5snd5zxn/Ni+SQ7CJ8kw1d5p/DlElia+PFqB3YS e4ziKdoKUcKt7PJbefEVkC7mUAcOpO1UIrRDFQm3SOlBFtd0CB9LZCII/9iWBfZu K/tJFqThkejEwQ22SMutqGmPh0l4jahsWAK23/BaVbDkz5EPJ02/Znv1pZ4Bjpg= =Clkr -----END PGP SIGNATURE----- --Apple-Mail=_5737E3B2-5CA8-47D7-8EF0-A208D5012416-- From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 01:39:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9ABDDDC; Mon, 1 Sep 2014 01:39:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 949EF146F; Mon, 1 Sep 2014 01:39:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s811dL10096686; Mon, 1 Sep 2014 01:39:21 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s811dLPd096684; Mon, 1 Sep 2014 01:39:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409010139.s811dLPd096684@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 1 Sep 2014 01:39:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270907 - stable/10/usr.bin/iscsictl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 01:39:21 -0000 Author: ngie Date: Mon Sep 1 01:39:20 2014 New Revision: 270907 URL: http://svnweb.freebsd.org/changeset/base/270907 Log: MFC r270432: Fix "make checkdpadd" in usr.bin/iscsictl by removing -lfl dependency Approved by: rpaulo (mentor) MFC after: 1 week Modified: stable/10/usr.bin/iscsictl/Makefile stable/10/usr.bin/iscsictl/token.l Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/iscsictl/Makefile ============================================================================== --- stable/10/usr.bin/iscsictl/Makefile Sun Aug 31 23:51:09 2014 (r270906) +++ stable/10/usr.bin/iscsictl/Makefile Mon Sep 1 01:39:20 2014 (r270907) @@ -7,7 +7,7 @@ CFLAGS+= -I${.CURDIR}/../../sys/dev/iscs MAN= iscsictl.8 DPADD= ${LIBCAM} ${LIBUTIL} -LDADD= -lcam -lfl -lutil +LDADD= -lcam -lutil YFLAGS+= -v LFLAGS+= -i Modified: stable/10/usr.bin/iscsictl/token.l ============================================================================== --- stable/10/usr.bin/iscsictl/token.l Sun Aug 31 23:51:09 2014 (r270906) +++ stable/10/usr.bin/iscsictl/token.l Mon Sep 1 01:39:20 2014 (r270907) @@ -46,6 +46,7 @@ extern int yylex(void); %option noinput %option nounput +%option noyywrap %% HeaderDigest { return HEADER_DIGEST; } From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 02:53:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C30E2463; Mon, 1 Sep 2014 02:53:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE7EC1C4A; Mon, 1 Sep 2014 02:53:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s812rWL2032415; Mon, 1 Sep 2014 02:53:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s812rWG7032414; Mon, 1 Sep 2014 02:53:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409010253.s812rWG7032414@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 1 Sep 2014 02:53:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270908 - stable/10/lib/clang X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 02:53:32 -0000 Author: ngie Date: Mon Sep 1 02:53:32 2014 New Revision: 270908 URL: http://svnweb.freebsd.org/changeset/base/270908 Log: MFC r270145: Replace DPADD with DPSRCS to fix "make checkdpadd" Phabric: D625 Approved by: jmmv (mentor) Reviewed by: dim PR: 192734 Modified: stable/10/lib/clang/clang.build.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/clang/clang.build.mk ============================================================================== --- stable/10/lib/clang/clang.build.mk Mon Sep 1 01:39:20 2014 (r270907) +++ stable/10/lib/clang/clang.build.mk Mon Sep 1 02:53:32 2014 (r270908) @@ -233,5 +233,5 @@ Checkers.inc.h: ${CLANG_SRCS}/lib/Static .endfor SRCS+= ${TGHDRS:C/$/.inc.h/} -DPADD+= ${TGHDRS:C/$/.inc.h/} +DPSRCS+= ${TGHDRS:C/$/.inc.h/} CLEANFILES+= ${TGHDRS:C/$/.inc.h/} ${TGHDRS:C/$/.inc.d/} From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 03:05:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0994B88D; Mon, 1 Sep 2014 03:05:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E90FF1E21; Mon, 1 Sep 2014 03:04:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8134xFb038269; Mon, 1 Sep 2014 03:04:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8134xBS038268; Mon, 1 Sep 2014 03:04:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409010304.s8134xBS038268@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 1 Sep 2014 03:04:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270909 - stable/10/usr.sbin/iscsid X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 03:05:00 -0000 Author: ngie Date: Mon Sep 1 03:04:59 2014 New Revision: 270909 URL: http://svnweb.freebsd.org/changeset/base/270909 Log: MFC r270146: Add LIBCRYPTO and LIBSSL to DPADD This fixes "make checkdpadd" Phabric: D621 PR: 192761 Approved by: rpaulo (mentor) Modified: stable/10/usr.sbin/iscsid/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/iscsid/Makefile ============================================================================== --- stable/10/usr.sbin/iscsid/Makefile Mon Sep 1 02:53:32 2014 (r270908) +++ stable/10/usr.sbin/iscsid/Makefile Mon Sep 1 03:04:59 2014 (r270909) @@ -8,7 +8,7 @@ CFLAGS+= -I${.CURDIR}/../../sys/dev/iscs #CFLAGS+= -DICL_KERNEL_PROXY MAN= iscsid.8 -DPADD= ${LIBUTIL} +DPADD= ${LIBCRYPTO} ${LIBSSL} ${LIBUTIL} LDADD= -lcrypto -lssl -lutil WARNS= 6 From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 03:20:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D918B46; Mon, 1 Sep 2014 03:20:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6950F1F28; Mon, 1 Sep 2014 03:20:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s813KBKw045471; Mon, 1 Sep 2014 03:20:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s813KBAJ045470; Mon, 1 Sep 2014 03:20:11 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409010320.s813KBAJ045470@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 1 Sep 2014 03:20:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270910 - stable/10/sbin/hastd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 03:20:11 -0000 Author: ngie Date: Mon Sep 1 03:20:10 2014 New Revision: 270910 URL: http://svnweb.freebsd.org/changeset/base/270910 Log: MFC r270117: Add -ll to LDADD to fix "make checkdpadd" Phabric: D622 Approved by: rpaulo (mentor) Modified: stable/10/sbin/hastd/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/hastd/Makefile ============================================================================== --- stable/10/sbin/hastd/Makefile Mon Sep 1 03:04:59 2014 (r270909) +++ stable/10/sbin/hastd/Makefile Mon Sep 1 03:20:10 2014 (r270910) @@ -31,7 +31,7 @@ CFLAGS+=-DINET6 .endif DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL} -LDADD= -lgeom -lbsdxml -lsbuf -lpthread -lutil +LDADD= -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil .if ${MK_OPENSSL} != "no" DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 03:22:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78833CCD; Mon, 1 Sep 2014 03:22:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6480A1FE9; Mon, 1 Sep 2014 03:22:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s813Mm4N047320; Mon, 1 Sep 2014 03:22:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s813Mmqr047319; Mon, 1 Sep 2014 03:22:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409010322.s813Mmqr047319@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 1 Sep 2014 03:22:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270911 - stable/10/sbin/hastd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 03:22:48 -0000 Author: ngie Date: Mon Sep 1 03:22:47 2014 New Revision: 270911 URL: http://svnweb.freebsd.org/changeset/base/270911 Log: MFC r270433: Garbage collect libl dependency The application links and runs without libl Approved by: rpaulo (mentor) Phabric: D673 Submitted by: trociny Modified: stable/10/sbin/hastd/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/hastd/Makefile ============================================================================== --- stable/10/sbin/hastd/Makefile Mon Sep 1 03:20:10 2014 (r270910) +++ stable/10/sbin/hastd/Makefile Mon Sep 1 03:22:47 2014 (r270911) @@ -30,8 +30,8 @@ CFLAGS+=-DINET CFLAGS+=-DINET6 .endif -DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL} -LDADD= -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil +DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBPTHREAD} ${LIBUTIL} +LDADD= -lgeom -lbsdxml -lsbuf -lpthread -lutil .if ${MK_OPENSSL} != "no" DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 03:49:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFEFD22F; Mon, 1 Sep 2014 03:49:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81C5A12A1; Mon, 1 Sep 2014 03:49:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s813nQgh057273; Mon, 1 Sep 2014 03:49:26 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s813nLpM057241; Mon, 1 Sep 2014 03:49:21 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201409010349.s813nLpM057241@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 1 Sep 2014 03:49:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270912 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 03:49:26 -0000 Author: imp Date: Mon Sep 1 03:49:21 2014 New Revision: 270912 URL: http://svnweb.freebsd.org/changeset/base/270912 Log: Resync comments about scbus and pass for life after AHCI joined CAM. Sponsored by: Netflix Modified: head/sys/arm/conf/BEAGLEBONE head/sys/arm/conf/CNS11XXNAS head/sys/arm/conf/CUBIEBOARD head/sys/arm/conf/CUBIEBOARD2 head/sys/arm/conf/DIGI-CCWMX53 head/sys/arm/conf/EB9200 head/sys/arm/conf/EFIKA_MX head/sys/arm/conf/EXYNOS5.common head/sys/arm/conf/HL200 head/sys/arm/conf/HL201 head/sys/arm/conf/IMX53-QSB head/sys/arm/conf/IMX6 head/sys/arm/conf/KB920X head/sys/arm/conf/NSLU head/sys/arm/conf/PANDABOARD head/sys/arm/conf/QILA9G20 head/sys/arm/conf/RK3188 head/sys/arm/conf/SAM9G20EK head/sys/arm/conf/SAM9X25EK head/sys/arm/conf/SN9G45 head/sys/arm/conf/VYBRID head/sys/arm/conf/ZEDBOARD Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/BEAGLEBONE Mon Sep 1 03:49:21 2014 (r270912) @@ -116,7 +116,7 @@ options USB_DEBUG #options USB_VERBOSE device musb device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) # Ethernet Modified: head/sys/arm/conf/CNS11XXNAS ============================================================================== --- head/sys/arm/conf/CNS11XXNAS Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/CNS11XXNAS Mon Sep 1 03:49:21 2014 (r270912) @@ -111,7 +111,7 @@ device usb device ohci device ehci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device pass device cfi Modified: head/sys/arm/conf/CUBIEBOARD ============================================================================== --- head/sys/arm/conf/CUBIEBOARD Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/CUBIEBOARD Mon Sep 1 03:49:21 2014 (r270912) @@ -104,7 +104,7 @@ device random # Entropy device # GPIO device gpio -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device pass Modified: head/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- head/sys/arm/conf/CUBIEBOARD2 Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/CUBIEBOARD2 Mon Sep 1 03:49:21 2014 (r270912) @@ -104,7 +104,7 @@ device random # Entropy device # GPIO device gpio -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device pass Modified: head/sys/arm/conf/DIGI-CCWMX53 ============================================================================== --- head/sys/arm/conf/DIGI-CCWMX53 Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/DIGI-CCWMX53 Mon Sep 1 03:49:21 2014 (r270912) @@ -130,10 +130,10 @@ device iic device iicbus # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. Modified: head/sys/arm/conf/EB9200 ============================================================================== --- head/sys/arm/conf/EB9200 Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/EB9200 Mon Sep 1 03:49:21 2014 (r270912) @@ -102,10 +102,10 @@ device ohci # OHCI localbus->USB inte device usb # USB Bus (required) device umass # Disks/Mass storage - Requires scbus and da # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB device (gadget) support #device at91_dci # Atmel's usb device Modified: head/sys/arm/conf/EFIKA_MX ============================================================================== --- head/sys/arm/conf/EFIKA_MX Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/EFIKA_MX Mon Sep 1 03:49:21 2014 (r270912) @@ -126,10 +126,10 @@ device iic device iicbus # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. Modified: head/sys/arm/conf/EXYNOS5.common ============================================================================== --- head/sys/arm/conf/EXYNOS5.common Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/EXYNOS5.common Mon Sep 1 03:49:21 2014 (r270912) @@ -104,7 +104,7 @@ device ehci device xhci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device pass Modified: head/sys/arm/conf/HL200 ============================================================================== --- head/sys/arm/conf/HL200 Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/HL200 Mon Sep 1 03:49:21 2014 (r270912) @@ -132,10 +132,10 @@ device uath # Atheros AR5523 wireless device ural # Ralink Technology RT2500USB wireless NICs device zyd # ZyDAS zd1211/zd1211b wireless NICs # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # Wireless NIC cards device wlan # 802.11 support device wlan_wep # 802.11 WEP support Modified: head/sys/arm/conf/HL201 ============================================================================== --- head/sys/arm/conf/HL201 Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/HL201 Mon Sep 1 03:49:21 2014 (r270912) @@ -116,10 +116,10 @@ device miibus #device ural # Ralink Technology RT2500USB wireless NICs #device zyd # ZyDAS zd1211/zd1211b wireless NICs # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # Wireless NIC cards #device wlan # 802.11 support #device wlan_wep # 802.11 WEP support Modified: head/sys/arm/conf/IMX53-QSB ============================================================================== --- head/sys/arm/conf/IMX53-QSB Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/IMX53-QSB Mon Sep 1 03:49:21 2014 (r270912) @@ -129,10 +129,10 @@ device iic device iicbus # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. Modified: head/sys/arm/conf/IMX6 ============================================================================== --- head/sys/arm/conf/IMX6 Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/IMX6 Mon Sep 1 03:49:21 2014 (r270912) @@ -94,10 +94,10 @@ device mmc # SD/MMC protocol device mmcsd # SDCard disk device # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support #options USB_DEBUG # enable debug msgs Modified: head/sys/arm/conf/KB920X ============================================================================== --- head/sys/arm/conf/KB920X Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/KB920X Mon Sep 1 03:49:21 2014 (r270912) @@ -132,10 +132,10 @@ device uath # Atheros AR5523 wireless device ural # Ralink Technology RT2500USB wireless NICs device zyd # ZyDAS zd1211/zd1211b wireless NICs # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # Wireless NIC cards device wlan # 802.11 support device wlan_wep # 802.11 WEP support Modified: head/sys/arm/conf/NSLU ============================================================================== --- head/sys/arm/conf/NSLU Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/NSLU Mon Sep 1 03:49:21 2014 (r270912) @@ -115,5 +115,5 @@ options USB_DEBUG device ohci device ehci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) Modified: head/sys/arm/conf/PANDABOARD ============================================================================== --- head/sys/arm/conf/PANDABOARD Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/PANDABOARD Mon Sep 1 03:49:21 2014 (r270912) @@ -122,7 +122,7 @@ options USB_DEBUG device ohci device ehci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) # Ethernet Modified: head/sys/arm/conf/QILA9G20 ============================================================================== --- head/sys/arm/conf/QILA9G20 Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/QILA9G20 Mon Sep 1 03:49:21 2014 (r270912) @@ -117,10 +117,10 @@ device iicbus device icee # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support device ohci # OHCI localbus->USB interface Modified: head/sys/arm/conf/RK3188 ============================================================================== --- head/sys/arm/conf/RK3188 Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/RK3188 Mon Sep 1 03:49:21 2014 (r270912) @@ -88,7 +88,7 @@ device random # Entropy device # GPIO device gpio -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device pass Modified: head/sys/arm/conf/SAM9G20EK ============================================================================== --- head/sys/arm/conf/SAM9G20EK Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/SAM9G20EK Mon Sep 1 03:49:21 2014 (r270912) @@ -119,10 +119,10 @@ device iicbus device icee # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support device ohci # OHCI localbus->USB interface Modified: head/sys/arm/conf/SAM9X25EK ============================================================================== --- head/sys/arm/conf/SAM9X25EK Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/SAM9X25EK Mon Sep 1 03:49:21 2014 (r270912) @@ -118,10 +118,10 @@ device iicbus device icee # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support #device ohci # OHCI localbus->USB interface Modified: head/sys/arm/conf/SN9G45 ============================================================================== --- head/sys/arm/conf/SN9G45 Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/SN9G45 Mon Sep 1 03:49:21 2014 (r270912) @@ -95,10 +95,10 @@ option AT91_ATE_USE_RMII device at91_wdt # WDT: Watchdog timer # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support device ohci # OHCI localbus->USB interface Modified: head/sys/arm/conf/VYBRID ============================================================================== --- head/sys/arm/conf/VYBRID Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/VYBRID Mon Sep 1 03:49:21 2014 (r270912) @@ -112,7 +112,7 @@ device ehci #device ohci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device pass Modified: head/sys/arm/conf/ZEDBOARD ============================================================================== --- head/sys/arm/conf/ZEDBOARD Mon Sep 1 03:22:47 2014 (r270911) +++ head/sys/arm/conf/ZEDBOARD Mon Sep 1 03:49:21 2014 (r270912) @@ -91,7 +91,7 @@ options USB_DEBUG #options USB_VERBOSE device ehci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device axe # USB-Ethernet From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 05:18:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 154971EAF; Mon, 1 Sep 2014 05:18:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00CA611C2; Mon, 1 Sep 2014 05:18:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s815IKSe098596; Mon, 1 Sep 2014 05:18:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s815IKbD098595; Mon, 1 Sep 2014 05:18:20 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409010518.s815IKbD098595@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 1 Sep 2014 05:18:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270914 - stable/9/sbin/hastd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 05:18:21 -0000 Author: ngie Date: Mon Sep 1 05:18:20 2014 New Revision: 270914 URL: http://svnweb.freebsd.org/changeset/base/270914 Log: MFC r270117: Add -ll to LDADD to fix "make checkdpadd" Phabric: D622 Approved by: rpaulo (mentor) Modified: stable/9/sbin/hastd/Makefile Directory Properties: stable/9/ (props changed) stable/9/sbin/ (props changed) stable/9/sbin/hastd/ (props changed) Modified: stable/9/sbin/hastd/Makefile ============================================================================== --- stable/9/sbin/hastd/Makefile Mon Sep 1 05:13:14 2014 (r270913) +++ stable/9/sbin/hastd/Makefile Mon Sep 1 05:18:20 2014 (r270914) @@ -30,7 +30,7 @@ CFLAGS+=-DINET6 .endif DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL} -LDADD= -lgeom -lbsdxml -lsbuf -lpthread -lutil +LDADD= -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil .if ${MK_OPENSSL} != "no" DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 05:26:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B04751C5; Mon, 1 Sep 2014 05:26:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BB3A12E7; Mon, 1 Sep 2014 05:26:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s815Qr1m003203; Mon, 1 Sep 2014 05:26:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s815Qrop003202; Mon, 1 Sep 2014 05:26:53 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409010526.s815Qrop003202@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 1 Sep 2014 05:26:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270915 - stable/9/usr.sbin/nmtree X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 05:26:53 -0000 Author: ngie Date: Mon Sep 1 05:26:53 2014 New Revision: 270915 URL: http://svnweb.freebsd.org/changeset/base/270915 Log: MFC r270180: Add LIBMD and LIBUTIL to DPADD to fix "make checkdpadd" Approved by: jmmv (mentor) Phabric: D633 PR: 192763 Modified: stable/9/usr.sbin/nmtree/Makefile Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/nmtree/ (props changed) Modified: stable/9/usr.sbin/nmtree/Makefile ============================================================================== --- stable/9/usr.sbin/nmtree/Makefile Mon Sep 1 05:18:20 2014 (r270914) +++ stable/9/usr.sbin/nmtree/Makefile Mon Sep 1 05:26:53 2014 (r270915) @@ -8,6 +8,7 @@ PROG= nmtree MAN= nmtree.8 SRCS= compare.c crc.c create.c excludes.c getid.c misc.c mtree.c \ spec.c specspec.c verify.c +DPADD+= ${LIBMD} ${LIBUTIL} LDADD+= -lmd -lutil CFLAGS+= -I${.CURDIR}/../../contrib/mknod From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 05:13:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6B5A1D4B; Mon, 1 Sep 2014 05:13:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C21F51125; Mon, 1 Sep 2014 05:13:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s815DEIL097827; Mon, 1 Sep 2014 05:13:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s815DEPE097826; Mon, 1 Sep 2014 05:13:14 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409010513.s815DEPE097826@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 1 Sep 2014 05:13:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270913 - stable/9/lib/clang X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 05:13:15 -0000 Author: ngie Date: Mon Sep 1 05:13:14 2014 New Revision: 270913 URL: http://svnweb.freebsd.org/changeset/base/270913 Log: MFC r270145: Replace DPADD with DPSRCS to fix "make checkdpadd" Phabric: D625 Approved by: jmmv (mentor) Reviewed by: dim PR: 192734 Modified: stable/9/lib/clang/clang.build.mk Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/clang/ (props changed) Modified: stable/9/lib/clang/clang.build.mk ============================================================================== --- stable/9/lib/clang/clang.build.mk Mon Sep 1 03:49:21 2014 (r270912) +++ stable/9/lib/clang/clang.build.mk Mon Sep 1 05:13:14 2014 (r270913) @@ -233,5 +233,5 @@ Checkers.inc.h: ${CLANG_SRCS}/lib/Static .endfor SRCS+= ${TGHDRS:C/$/.inc.h/} -DPADD+= ${TGHDRS:C/$/.inc.h/} +DPSRCS+= ${TGHDRS:C/$/.inc.h/} CLEANFILES+= ${TGHDRS:C/$/.inc.h/} ${TGHDRS:C/$/.inc.d/} From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 05:35:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CB2F535; Mon, 1 Sep 2014 05:35:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77F131527; Mon, 1 Sep 2014 05:35:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s815Zu0Y008125; Mon, 1 Sep 2014 05:35:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s815Zujs008123; Mon, 1 Sep 2014 05:35:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409010535.s815Zujs008123@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 1 Sep 2014 05:35:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270916 - in stable/9: lib/libc share/mk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 05:35:56 -0000 Author: ngie Date: Mon Sep 1 05:35:55 2014 New Revision: 270916 URL: http://svnweb.freebsd.org/changeset/base/270916 Log: MFC r270519: Fix "make checkdpadd" for lib/libc when MK_SSP != no Add LIBSSP_NONSHARED to bsd.libnames.mk and append LIBSSP_NONSHARED to DPADD in lib/libc when MK_SSP != no Approved by: rpaulo (mentor) Phabric: D675 (as part of a larger diff) PR: 192728 Modified: stable/9/lib/libc/Makefile stable/9/share/mk/bsd.libnames.mk Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) stable/9/share/ (props changed) stable/9/share/mk/ (props changed) Modified: stable/9/lib/libc/Makefile ============================================================================== --- stable/9/lib/libc/Makefile Mon Sep 1 05:26:53 2014 (r270915) +++ stable/9/lib/libc/Makefile Mon Sep 1 05:35:55 2014 (r270916) @@ -39,7 +39,7 @@ CFLAGS+=${CANCELPOINTS_CFLAGS} # # Only link with static libgcc.a (no libgcc_eh.a). # -DPADD+= ${LIBGCC} +DPADD+= ${LIBGCC} ${LIBSSP_NONSHARED} LDFLAGS+= -nodefaultlibs LDADD+= -lgcc -lssp_nonshared Modified: stable/9/share/mk/bsd.libnames.mk ============================================================================== --- stable/9/share/mk/bsd.libnames.mk Mon Sep 1 05:26:53 2014 (r270915) +++ stable/9/share/mk/bsd.libnames.mk Mon Sep 1 05:35:55 2014 (r270916) @@ -148,6 +148,7 @@ LIBSDP?= ${DESTDIR}${LIBDIR}/libsdp.a LIBSMB?= ${DESTDIR}${LIBDIR}/libsmb.a LIBSSH?= ${DESTDIR}${LIBPRIVATEDIR}/libssh.a LIBSSL?= ${DESTDIR}${LIBDIR}/libssl.a +LIBSSP_NONSHARED?= ${DESTDIR}${LIBDIR}/libssp_nonshared.a LIBSTAND?= ${DESTDIR}${LIBDIR}/libstand.a LIBSTDCPLUSPLUS?= ${DESTDIR}${LIBDIR}/libstdc++.a LIBTACPLUS?= ${DESTDIR}${LIBDIR}/libtacplus.a From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 07:34:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A475F9DB; Mon, 1 Sep 2014 07:34:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75C6A1222; Mon, 1 Sep 2014 07:34:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s817YH18063112; Mon, 1 Sep 2014 07:34:17 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s817YHcK063111; Mon, 1 Sep 2014 07:34:17 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409010734.s817YHcK063111@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 1 Sep 2014 07:34:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270917 - stable/10/sys/boot/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 07:34:17 -0000 Author: ae Date: Mon Sep 1 07:34:16 2014 New Revision: 270917 URL: http://svnweb.freebsd.org/changeset/base/270917 Log: MFC r270445: The size of the GPT table can not be less than one sector. MFC r270521: Since the size of GPT entry may differ from the sizeof(struct gpt_ent), use the size from GPT header to iterate entries. Modified: stable/10/sys/boot/common/part.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/common/part.c ============================================================================== --- stable/10/sys/boot/common/part.c Mon Sep 1 05:35:55 2014 (r270916) +++ stable/10/sys/boot/common/part.c Mon Sep 1 07:34:16 2014 (r270917) @@ -212,8 +212,8 @@ gpt_checktbl(const struct gpt_hdr *hdr, return (-1); } } - ent = (struct gpt_ent *)tbl; - for (i = 0; i < cnt; i++, ent++) { + for (i = 0; i < cnt; i++) { + ent = (struct gpt_ent *)(tbl + i * hdr->hdr_entsz); uuid_letoh(&ent->ent_type); if (uuid_equal(&ent->ent_type, &gpt_uuid_unused, NULL)) continue; @@ -254,8 +254,8 @@ ptable_gptread(struct ptable *table, voi table->sectorsize); if (phdr != NULL) { /* Read the primary GPT table. */ - size = MIN(MAXTBLSZ, - phdr->hdr_entries * phdr->hdr_entsz / table->sectorsize); + size = MIN(MAXTBLSZ, (phdr->hdr_entries * phdr->hdr_entsz + + table->sectorsize - 1) / table->sectorsize); if (dread(dev, tbl, size, phdr->hdr_lba_table) == 0 && gpt_checktbl(phdr, tbl, size * table->sectorsize, table->sectors - 1) == 0) { @@ -287,8 +287,9 @@ ptable_gptread(struct ptable *table, voi hdr.hdr_entsz != phdr->hdr_entsz || hdr.hdr_crc_table != phdr->hdr_crc_table) { /* Read the backup GPT table. */ - size = MIN(MAXTBLSZ, phdr->hdr_entries * - phdr->hdr_entsz / table->sectorsize); + size = MIN(MAXTBLSZ, (phdr->hdr_entries * + phdr->hdr_entsz + table->sectorsize - 1) / + table->sectorsize); if (dread(dev, tbl, size, phdr->hdr_lba_table) == 0 && gpt_checktbl(phdr, tbl, size * table->sectorsize, table->sectors - 1) == 0) { @@ -302,10 +303,10 @@ ptable_gptread(struct ptable *table, voi table->type = PTABLE_NONE; goto out; } - ent = (struct gpt_ent *)tbl; size = MIN(hdr.hdr_entries * hdr.hdr_entsz, MAXTBLSZ * table->sectorsize); - for (i = 0; i < size / hdr.hdr_entsz; i++, ent++) { + for (i = 0; i < size / hdr.hdr_entsz; i++) { + ent = (struct gpt_ent *)(tbl + i * hdr.hdr_entsz); if (uuid_equal(&ent->ent_type, &gpt_uuid_unused, NULL)) continue; entry = malloc(sizeof(*entry)); From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 07:34:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9895CBEB; Mon, 1 Sep 2014 07:34:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A2BB1228; Mon, 1 Sep 2014 07:34:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s817Yb0D063187; Mon, 1 Sep 2014 07:34:37 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s817Ybxf063186; Mon, 1 Sep 2014 07:34:37 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409010734.s817Ybxf063186@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 1 Sep 2014 07:34:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270918 - stable/9/sys/boot/common X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 07:34:37 -0000 Author: ae Date: Mon Sep 1 07:34:36 2014 New Revision: 270918 URL: http://svnweb.freebsd.org/changeset/base/270918 Log: MFC r270445: The size of the GPT table can not be less than one sector. MFC r270521: Since the size of GPT entry may differ from the sizeof(struct gpt_ent), use the size from GPT header to iterate entries. Modified: stable/9/sys/boot/common/part.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/common/part.c ============================================================================== --- stable/9/sys/boot/common/part.c Mon Sep 1 07:34:16 2014 (r270917) +++ stable/9/sys/boot/common/part.c Mon Sep 1 07:34:36 2014 (r270918) @@ -212,8 +212,8 @@ gpt_checktbl(const struct gpt_hdr *hdr, return (-1); } } - ent = (struct gpt_ent *)tbl; - for (i = 0; i < cnt; i++, ent++) { + for (i = 0; i < cnt; i++) { + ent = (struct gpt_ent *)(tbl + i * hdr->hdr_entsz); uuid_letoh(&ent->ent_type); if (uuid_equal(&ent->ent_type, &gpt_uuid_unused, NULL)) continue; @@ -254,8 +254,8 @@ ptable_gptread(struct ptable *table, voi table->sectorsize); if (phdr != NULL) { /* Read the primary GPT table. */ - size = MIN(MAXTBLSZ, - phdr->hdr_entries * phdr->hdr_entsz / table->sectorsize); + size = MIN(MAXTBLSZ, (phdr->hdr_entries * phdr->hdr_entsz + + table->sectorsize - 1) / table->sectorsize); if (dread(dev, tbl, size, phdr->hdr_lba_table) == 0 && gpt_checktbl(phdr, tbl, size * table->sectorsize, table->sectors - 1) == 0) { @@ -287,8 +287,9 @@ ptable_gptread(struct ptable *table, voi hdr.hdr_entsz != phdr->hdr_entsz || hdr.hdr_crc_table != phdr->hdr_crc_table) { /* Read the backup GPT table. */ - size = MIN(MAXTBLSZ, phdr->hdr_entries * - phdr->hdr_entsz / table->sectorsize); + size = MIN(MAXTBLSZ, (phdr->hdr_entries * + phdr->hdr_entsz + table->sectorsize - 1) / + table->sectorsize); if (dread(dev, tbl, size, phdr->hdr_lba_table) == 0 && gpt_checktbl(phdr, tbl, size * table->sectorsize, table->sectors - 1) == 0) { @@ -302,10 +303,10 @@ ptable_gptread(struct ptable *table, voi table->type = PTABLE_NONE; goto out; } - ent = (struct gpt_ent *)tbl; size = MIN(hdr.hdr_entries * hdr.hdr_entsz, MAXTBLSZ * table->sectorsize); - for (i = 0; i < size / hdr.hdr_entsz; i++, ent++) { + for (i = 0; i < size / hdr.hdr_entsz; i++) { + ent = (struct gpt_ent *)(tbl + i * hdr.hdr_entsz); if (uuid_equal(&ent->ent_type, &gpt_uuid_unused, NULL)) continue; entry = malloc(sizeof(*entry)); From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 07:54:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56C9F3A9; Mon, 1 Sep 2014 07:54:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40382144A; Mon, 1 Sep 2014 07:54:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s817sXr3072471; Mon, 1 Sep 2014 07:54:33 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s817sVdO072460; Mon, 1 Sep 2014 07:54:31 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201409010754.s817sVdO072460@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Mon, 1 Sep 2014 07:54:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270919 - in stable/10/sys: conf dev/ixl modules X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 07:54:33 -0000 Author: jfv Date: Mon Sep 1 07:54:30 2014 New Revision: 270919 URL: http://svnweb.freebsd.org/changeset/base/270919 Log: MFC of 270755, 270772, 270773, 270775, 270799, 270806, 270807, 270820 Enable the build of the Intel XL710 drivers, and fixes for that build. Modified: stable/10/sys/conf/NOTES stable/10/sys/dev/ixl/README stable/10/sys/dev/ixl/i40e_alloc.h stable/10/sys/dev/ixl/i40e_common.c stable/10/sys/dev/ixl/i40e_osdep.h stable/10/sys/dev/ixl/if_ixl.c stable/10/sys/dev/ixl/if_ixlv.c stable/10/sys/dev/ixl/ixl.h stable/10/sys/dev/ixl/ixl_txrx.c stable/10/sys/modules/Makefile Modified: stable/10/sys/conf/NOTES ============================================================================== --- stable/10/sys/conf/NOTES Mon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/conf/NOTES Mon Sep 1 07:54:30 2014 (r270919) @@ -2089,6 +2089,8 @@ device em # Intel Pro/1000 Gigabit Eth device igb # Intel Pro/1000 PCIE Gigabit Ethernet device ixgb # Intel Pro/10Gbe PCI-X Ethernet device ixgbe # Intel Pro/10Gbe PCIE Ethernet +device ixl # Intel XL710 40Gbe PCIE Ethernet +device ixlv # Intel XL710 40Gbe VF PCIE Ethernet device le # AMD Am7900 LANCE and Am79C9xx PCnet device mxge # Myricom Myri-10G 10GbE NIC device nxge # Neterion Xframe 10GbE Server/Storage Adapter Modified: stable/10/sys/dev/ixl/README ============================================================================== --- stable/10/sys/dev/ixl/README Mon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/dev/ixl/README Mon Sep 1 07:54:30 2014 (r270919) @@ -1,9 +1,10 @@ -ixl FreeBSD* Base Driver for the Intel® XL710 Ethernet Controller Family + ixl FreeBSD* Base Driver and ixlv VF Driver for the + Intel XL710 Ethernet Controller Family /*$FreeBSD$*/ ================================================================ -July 21, 2014 +August 26, 2014 Contents @@ -11,6 +12,7 @@ Contents - Overview - Supported Adapters +- The VF Driver - Building and Installation - Additional Configurations - Known Limitations @@ -19,15 +21,21 @@ Contents Overview ======== -This file describes the IXL FreeBSD* Base driver for the XL710 Ethernet Family of Adapters. The Driver has been developed for use with FreeBSD 10.0 or later, but should be compatible with any supported release. - -For questions related to hardware requirements, refer to the documentation supplied with your Intel XL710 adapter. All hardware requirements listed apply for use with FreeBSD. +This file describes the IXL FreeBSD* Base driver and the IXLV VF Driver +for the XL710 Ethernet Family of Adapters. The Driver has been developed +for use with FreeBSD 10.0 or later, but should be compatible with any +supported release. + +For questions related to hardware requirements, refer to the documentation +supplied with your Intel XL710 adapter. All hardware requirements listed +apply for use with FreeBSD. Supported Adapters ================== -The driver in this release is compatible with XL710 and X710-based Intel Ethernet Network Connections. +The drivers in this release are compatible with XL710 and X710-based +Intel Ethernet Network Connections. SFP+ Devices with Pluggable Optics @@ -49,18 +57,45 @@ QSFP+ Modules Intel TRIPLE RATE 1G/10G/40G QSFP+ LR (bailed) E40GQSFPLR QSFP+ 1G speed is not supported on XL710 based devices. -X710/XL710 Based SFP+ adapters support all passive and active limiting direct attach cables that comply with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. +X710/XL710 Based SFP+ adapters support all passive and active limiting direct +attach cables that comply with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. +The VF Driver +================== +The VF driver is normally used in a virtualized environment where a host +driver manages SRIOV, and provides a VF device to the guest. With this +first release the only host environment tested was using Linux QEMU/KVM. +Support is planned for Xen and VMWare hosts at a later time. + +In the FreeBSD guest the IXLV driver would be loaded and will function +using the VF device assigned to it. + +The VF driver provides most of the same functionality as the CORE driver, +but is actually a slave to the Host, access to many controls are actually +accomplished by a request to the Host via what is called the "Admin queue". +These are startup and initialization events however, once in operation +the device is self-contained and should achieve near native performance. + +Some notable limitations of the VF environment: for security reasons +the driver is never permitted to be promiscuous, therefore a tcpdump +will not behave the same with the interface. Second, media info is not +available from the PF, so it will always appear as auto. -Building and Installation +Tarball Building and Installation ========================= -NOTE: You must have kernel sources installed to compile the driver module. +NOTE: You must have kernel sources installed to compile the driver tarball. + +These instructions assume a standalone driver tarball, building the driver +already in the kernel source is simply a matter of adding the device entry +to the kernel config file, or building in the ixl or ixlv module directory. In the instructions below, x.x.x is the driver version -as indicated in thename of the driver tar. +as indicated in the name of the driver tarball. The example is +for ixl, the same procedure applies for ixlv. -1. Move the base driver tar file to the directory of your choice. For example, use /home/username/ixl or /usr/local/src/ixl. +1. Move the base driver tar file to the directory of your choice. + For example, use /home/username/ixl or /usr/local/src/ixl. 2. Untar/unzip the archive: tar xfz ixl-x.x.x.tar.gz @@ -76,7 +111,9 @@ as indicated in thename of the driver ta 5. To assign an IP address to the interface, enter the following: ifconfig ixl -6. Verify that the interface works. Enter the following, where is the IP address for another machine on the same subnet as the interface that is being tested: +6. Verify that the interface works. Enter the following, where + is the IP address for another machine on the same subnet as the interface + that is being tested: ping @@ -105,7 +142,7 @@ as indicated in thename of the driver ta Configuration and Tuning ========================= -The driver supports Transmit/Receive Checksum Offload for IPv4 and IPv6, +Both drivers supports Transmit/Receive Checksum Offload for IPv4 and IPv6, TSO forIPv4 and IPv6, LRO, and Jumbo Frames on all 40 Gigabit adapters. Jumbo Frames @@ -240,7 +277,7 @@ TSO forIPv4 and IPv6, LRO, and Jumbo Fra ifconfig ixl lro -Flow Control +Flow Control (IXL only) ------------ Flow control is disabled by default. To change flow control settings use sysctl. @@ -263,19 +300,25 @@ To disable flow control: NOTE: You must have a flow control capable link partner. +NOTE: The VF driver does not have access to flow control, it must be + managed from the host side. Important system configuration changes: ======================================= - -Change the file /etc/sysctl.conf, and add the line: hw.intr_storm_threshold: 0 (the default is 1000) -Best throughput results are seen with a large MTU; use 9706 if possible. --The default number of descriptors per ring is 1024, increasing this may improve performance depending on the use case. +-The default number of descriptors per ring is 1024, increasing this may +improve performance depending on the use case. + +-The VF driver uses a relatively large buf ring, this was found to eliminate + UDP transmit errors, it is a tuneable, and if no UDP traffic is used it can + be reduced. It is memory used per queue. Known Limitations @@ -283,7 +326,11 @@ Known Limitations Network Memory Buffer allocation -------------------------------- - FreeBSD may have a low number of network memory buffers (mbufs) by default. Ifyour mbuf value is too low, it may cause the driver to fail to initialize and/orcause the system to become unresponsive. You can check to see if the system is mbuf-starved by running 'netstat -m'. Increase the number of mbufs by editing the lines below in /etc/sysctl.conf: + FreeBSD may have a low number of network memory buffers (mbufs) by default. +If your mbuf value is too low, it may cause the driver to fail to initialize +and/or cause the system to become unresponsive. You can check to see if the +system is mbuf-starved by running 'netstat -m'. Increase the number of mbufs +by editing the lines below in /etc/sysctl.conf: kern.ipc.nmbclusters kern.ipc.nmbjumbop @@ -291,9 +338,11 @@ Network Memory Buffer allocation kern.ipc.nmbjumbo16 kern.ipc.nmbufs -The amount of memory that you allocate is system specific, and may require some trial and error. +The amount of memory that you allocate is system specific, and may +require some trial and error. -Also, increasing the follwing in /etc/sysctl.conf could help increase network performance: +Also, increasing the follwing in /etc/sysctl.conf could help increase +network performance: kern.ipc.maxsockbuf net.inet.tcp.sendspace @@ -304,7 +353,10 @@ Also, increasing the follwing in /etc/sy UDP Stress Test Dropped Packet Issue ------------------------------------ - Under small packet UDP stress test with the ixl driver, the FreeBSD system will drop UDP packets due to the fullness of socket buffers. You may want to change the driver's Flow Control variables to the minimum value for controlling packet reception. +Under small packet UDP stress test with the ixl driver, the FreeBSD system +may drop UDP packets due to the fullness of socket buffers. You may want to +change the driver's Flow Control variables to the minimum value for +controlling packet reception. Disable LRO when routing/bridging @@ -314,11 +366,20 @@ LRO must be turned off when forwarding t Lower than expected performance ------------------------------- - Some PCIe x8 slots are actually configured as x4 slots. These slots have insufficient bandwidth for full line rate with dual port and quad port devices. In addition, if you put a PCIe Generation 3-capable adapter into a PCIe Generation 2 slot, you cannot get full bandwidth. The driver detects this situation and writes the following message in the system log: - - "PCI-Express bandwidth available for this card is not sufficient for optimal performance. For optimal performance a x8 PCI-Express slot is required." +Some PCIe x8 slots are actually configured as x4 slots. These slots have +insufficient bandwidth for full line rate with dual port and quad port +devices. + +In addition, if you put a PCIe Generation 3-capable adapter into a PCIe +Generation 2 slot, you cannot get full bandwidth. The driver detects this +situation and writes the following message in the system log: + + "PCI-Express bandwidth available for this card is not sufficient for + optimal performance. For optimal performance a x8 PCI-Express slot + is required." -If this error occurs, moving your adapter to a true PCIe Generation 3 x8 slot will resolve the issue. +If this error occurs, moving your adapter to a true PCIe Generation 3 x8 +slot will resolve the issue. Support @@ -328,14 +389,21 @@ For general information and support, go http://support.intel.com -If an issue is identified with the released source code on the supported kernel with a supported adapter, email the specific information related to the issue tofreebsdnic@mailbox.intel.com. +If an issue is identified with the released source code on the supported kernel +with a supported adapter, email the specific information related to the issue +to freebsdnic@mailbox.intel.com. License ======= -This software program is released under the terms of a license agreement betweenyou ('Licensee') and Intel. Do not use or load this software or any associated materials (collectively, the 'Software') until you have carefully read the full terms and conditions of the LICENSE located in this software package. By loadingor using the Software, you agree to the terms of this Agreement. If you do not -agree with the terms of this Agreement, do not install or use the Software. +This software program is released under the terms of a license agreement +between you ('Licensee') and Intel. Do not use or load this software or any +associated materials (collectively, the 'Software') until you have carefully +read the full terms and conditions of the LICENSE located in this software +package. By loadingor using the Software, you agree to the terms of this +Agreement. If you do not agree with the terms of this Agreement, do not +install or use the Software. * Other names and brands may be claimed as the property of others. Modified: stable/10/sys/dev/ixl/i40e_alloc.h ============================================================================== --- stable/10/sys/dev/ixl/i40e_alloc.h Mon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/dev/ixl/i40e_alloc.h Mon Sep 1 07:54:30 2014 (r270919) @@ -51,16 +51,15 @@ enum i40e_memory_type { }; /* prototype for functions used for dynamic memory allocation */ -enum i40e_status_code i40e_allocate_dma_mem(struct i40e_hw *hw, +enum i40e_status_code i40e_allocate_dma(struct i40e_hw *hw, struct i40e_dma_mem *mem, - enum i40e_memory_type type, - u64 size, u32 alignment); -enum i40e_status_code i40e_free_dma_mem(struct i40e_hw *hw, + bus_size_t size, u32 alignment); +enum i40e_status_code i40e_free_dma(struct i40e_hw *hw, struct i40e_dma_mem *mem); -enum i40e_status_code i40e_allocate_virt_mem(struct i40e_hw *hw, +enum i40e_status_code i40e_allocate_virt(struct i40e_hw *hw, struct i40e_virt_mem *mem, u32 size); -enum i40e_status_code i40e_free_virt_mem(struct i40e_hw *hw, +enum i40e_status_code i40e_free_virt(struct i40e_hw *hw, struct i40e_virt_mem *mem); #endif /* _I40E_ALLOC_H_ */ Modified: stable/10/sys/dev/ixl/i40e_common.c ============================================================================== --- stable/10/sys/dev/ixl/i40e_common.c Mon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/dev/ixl/i40e_common.c Mon Sep 1 07:54:30 2014 (r270919) @@ -4375,8 +4375,8 @@ enum i40e_status_code i40e_aq_alternate_ cmd_resp->address = CPU_TO_LE32(addr); cmd_resp->length = CPU_TO_LE32(dw_count); - cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_WORD((u64)buffer)); - cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)buffer)); + cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_WORD((u64)(uintptr_t)buffer)); + cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)(uintptr_t)buffer)); status = i40e_asq_send_command(hw, &desc, buffer, I40E_LO_DWORD(4*dw_count), NULL); @@ -4458,8 +4458,8 @@ enum i40e_status_code i40e_aq_alternate_ cmd_resp->address = CPU_TO_LE32(addr); cmd_resp->length = CPU_TO_LE32(dw_count); - cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_DWORD((u64)buffer)); - cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)buffer)); + cmd_resp->addr_high = CPU_TO_LE32(I40E_HI_DWORD((u64)(uintptr_t)buffer)); + cmd_resp->addr_low = CPU_TO_LE32(I40E_LO_DWORD((u64)(uintptr_t)buffer)); status = i40e_asq_send_command(hw, &desc, buffer, I40E_LO_DWORD(4*dw_count), NULL); Modified: stable/10/sys/dev/ixl/i40e_osdep.h ============================================================================== --- stable/10/sys/dev/ixl/i40e_osdep.h Mon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/dev/ixl/i40e_osdep.h Mon Sep 1 07:54:30 2014 (r270919) @@ -137,11 +137,15 @@ struct i40e_spinlock { #define le16_to_cpu +#if defined(__amd64__) || defined(i386) static __inline void prefetch(void *x) { __asm volatile("prefetcht0 %0" :: "m" (*(unsigned long *)x)); } +#else +#define prefetch(x) +#endif struct i40e_osdep { @@ -191,7 +195,7 @@ rd32_osdep(struct i40e_osdep *osdep, uin KASSERT(reg < osdep->mem_bus_space_size, ("ixl: register offset %#jx too large (max is %#jx", - (uintmax_t)a, (uintmax_t)osdep->mem_bus_space_size)); + (uintmax_t)reg, (uintmax_t)osdep->mem_bus_space_size)); return (bus_space_read_4(osdep->mem_bus_space_tag, osdep->mem_bus_space_handle, reg)); @@ -203,7 +207,7 @@ wr32_osdep(struct i40e_osdep *osdep, uin KASSERT(reg < osdep->mem_bus_space_size, ("ixl: register offset %#jx too large (max is %#jx", - (uintmax_t)a, (uintmax_t)osdep->mem_bus_space_size)); + (uintmax_t)reg, (uintmax_t)osdep->mem_bus_space_size)); bus_space_write_4(osdep->mem_bus_space_tag, osdep->mem_bus_space_handle, reg, value); Modified: stable/10/sys/dev/ixl/if_ixl.c ============================================================================== --- stable/10/sys/dev/ixl/if_ixl.c Mon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/dev/ixl/if_ixl.c Mon Sep 1 07:54:30 2014 (r270919) @@ -276,10 +276,6 @@ int ixl_atr_rate = 20; TUNABLE_INT("hw.ixl.atr_rate", &ixl_atr_rate); #endif -#ifdef DEV_NETMAP -#include -#endif /* DEV_NETMAP */ - static char *ixl_fc_string[6] = { "None", "Rx", @@ -652,10 +648,6 @@ ixl_attach(device_t dev) vsi->vlan_detach = EVENTHANDLER_REGISTER(vlan_unconfig, ixl_unregister_vlan, vsi, EVENTHANDLER_PRI_FIRST); -#ifdef DEV_NETMAP - ixl_netmap_attach(pf); -#endif /* DEV_NETMAP */ - INIT_DEBUGOUT("ixl_attach: end"); return (0); @@ -733,10 +725,6 @@ ixl_detach(device_t dev) ether_ifdetach(vsi->ifp); callout_drain(&pf->timer); -#ifdef DEV_NETMAP - netmap_detach(vsi->ifp); -#endif /* DEV_NETMAP */ - ixl_free_pci_resources(pf); bus_generic_detach(dev); if_free(vsi->ifp); @@ -2300,7 +2288,7 @@ ixl_setup_interface(device_t dev, struct /* * Tell the upper layer(s) we support long frames. */ - ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); + ifp->if_hdrlen = sizeof(struct ether_vlan_header); ifp->if_capabilities |= IFCAP_HWCSUM; ifp->if_capabilities |= IFCAP_HWCSUM_IPV6; @@ -2552,12 +2540,6 @@ ixl_initialize_vsi(struct ixl_vsi *vsi) rctx.tphdata_ena = 0; rctx.tphhead_ena = 0; rctx.lrxqthresh = 2; -#ifdef DEV_NETMAP - /* "CRC strip in netmap is conditional" */ - if (vsi->ifp->if_capenable & IFCAP_NETMAP && !ixl_crcstrip) - rctx.crcstrip = 0; - else -#endif /* DEV_NETMAP */ rctx.crcstrip = 1; rctx.l2tsel = 1; rctx.showiv = 1; @@ -2581,21 +2563,6 @@ ixl_initialize_vsi(struct ixl_vsi *vsi) break; } wr32(vsi->hw, I40E_QRX_TAIL(que->me), 0); -#ifdef DEV_NETMAP - /* TODO appropriately comment - * Code based on netmap code in ixgbe_init_locked() - * Messes with what the software sets as queue - * descriptor tail in hardware. - */ - if (vsi->ifp->if_capenable & IFCAP_NETMAP) - { - struct netmap_adapter *na = NA(vsi->ifp); - struct netmap_kring *kring = &na->rx_rings[que->me]; - int t = na->num_rx_desc - 1 - kring->nr_hwavail; - - wr32(vsi->hw, I40E_QRX_TAIL(que->me), t); - } else -#endif /* DEV_NETMAP */ wr32(vsi->hw, I40E_QRX_TAIL(que->me), que->num_desc - 1); } return (err); @@ -4016,11 +3983,11 @@ ixl_print_debug_info(struct ixl_pf *pf) u32 reg; - printf("Queue irqs = %lx\n", que->irqs); - printf("AdminQ irqs = %lx\n", pf->admin_irq); + printf("Queue irqs = %jx\n", (uintmax_t)que->irqs); + printf("AdminQ irqs = %jx\n", (uintmax_t)pf->admin_irq); printf("RX next check = %x\n", rxr->next_check); - printf("RX not ready = %lx\n", rxr->not_done); - printf("RX packets = %lx\n", rxr->rx_packets); + printf("RX not ready = %jx\n", (uintmax_t)rxr->not_done); + printf("RX packets = %jx\n", (uintmax_t)rxr->rx_packets); printf("TX desc avail = %x\n", txr->avail); reg = rd32(hw, I40E_GLV_GORCL(0xc)); @@ -4161,7 +4128,7 @@ ixl_stat_update48(struct i40e_hw *hw, u3 { u64 new_data; -#if __FreeBSD__ >= 10 && __amd64__ +#if defined(__FreeBSD__) && (__FreeBSD_version >= 1000000) && defined(__amd64__) new_data = rd64(hw, loreg); #else /* Modified: stable/10/sys/dev/ixl/if_ixlv.c ============================================================================== --- stable/10/sys/dev/ixl/if_ixlv.c Mon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/dev/ixl/if_ixlv.c Mon Sep 1 07:54:30 2014 (r270919) @@ -1367,7 +1367,7 @@ ixlv_setup_interface(device_t dev, struc /* * Tell the upper layer(s) we support long frames. */ - ifp->if_data.ifi_hdrlen = sizeof(struct ether_vlan_header); + ifp->if_hdrlen = sizeof(struct ether_vlan_header); ifp->if_capabilities |= IFCAP_HWCSUM; ifp->if_capabilities |= IFCAP_HWCSUM_IPV6; @@ -2311,7 +2311,7 @@ ixlv_update_link_status(struct ixlv_sc * static void ixlv_stop(struct ixlv_sc *sc) { - mtx_assert(&sc->sc_mtx, MA_OWNED); + mtx_assert(&sc->mtx, MA_OWNED); INIT_DBG_IF(&sc->vsi->ifp, "begin"); Modified: stable/10/sys/dev/ixl/ixl.h ============================================================================== --- stable/10/sys/dev/ixl/ixl.h Mon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/dev/ixl/ixl.h Mon Sep 1 07:54:30 2014 (r270919) @@ -47,8 +47,10 @@ #include #include #include +#include #include +#include #include #include #include @@ -293,9 +295,6 @@ struct ixl_rx_buf { struct mbuf *fmp; bus_dmamap_t hmap; bus_dmamap_t pmap; -#ifdef DEV_NETMAP - u64 addr; -#endif }; /* Modified: stable/10/sys/dev/ixl/ixl_txrx.c ============================================================================== --- stable/10/sys/dev/ixl/ixl_txrx.c Mon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/dev/ixl/ixl_txrx.c Mon Sep 1 07:54:30 2014 (r270919) @@ -454,17 +454,9 @@ ixl_init_tx_ring(struct ixl_queue *que) { struct tx_ring *txr = &que->txr; struct ixl_tx_buf *buf; -#ifdef DEV_NETMAP - struct ixl_vsi *vsi = que->vsi; - struct netmap_adapter *na = NA(vsi->ifp); - struct netmap_slot *slot; -#endif /* DEV_NETMAP */ /* Clear the old ring contents */ IXL_TX_LOCK(txr); -#ifdef DEV_NETMAP - slot = netmap_reset(na, NR_TX, que->me, 0); -#endif bzero((void *)txr->base, (sizeof(struct i40e_tx_desc)) * que->num_desc); @@ -488,13 +480,6 @@ ixl_init_tx_ring(struct ixl_queue *que) m_freem(buf->m_head); buf->m_head = NULL; } -#ifdef DEV_NETMAP - if (slot) - { - int si = netmap_idx_n2k(&na->tx_rings[que->me], i); - netmap_load_map(txr->tag, buf->map, NMB(slot + si)); - } -#endif /* Clear the EOP index */ buf->eop_index = -1; } @@ -573,9 +558,13 @@ ixl_tx_setup_offload(struct ixl_queue *q struct mbuf *mp, u32 *cmd, u32 *off) { struct ether_vlan_header *eh; +#ifdef INET struct ip *ip = NULL; +#endif struct tcphdr *th = NULL; +#ifdef INET6 struct ip6_hdr *ip6; +#endif int elen, ip_hlen = 0, tcp_hlen; u16 etype; u8 ipproto = 0; @@ -606,6 +595,7 @@ ixl_tx_setup_offload(struct ixl_queue *q } switch (etype) { +#ifdef INET case ETHERTYPE_IP: ip = (struct ip *)(mp->m_data + elen); ip_hlen = ip->ip_hl << 2; @@ -617,13 +607,16 @@ ixl_tx_setup_offload(struct ixl_queue *q else *cmd |= I40E_TX_DESC_CMD_IIPT_IPV4; break; +#endif +#ifdef INET6 case ETHERTYPE_IPV6: ip6 = (struct ip6_hdr *)(mp->m_data + elen); ip_hlen = sizeof(struct ip6_hdr); ipproto = ip6->ip6_nxt; th = (struct tcphdr *)((caddr_t)ip6 + ip_hlen); *cmd |= I40E_TX_DESC_CMD_IIPT_IPV6; - /* Falls thru */ + break; +#endif default: break; } @@ -681,9 +674,15 @@ ixl_tso_setup(struct ixl_queue *que, str u16 etype; int idx, elen, ip_hlen, tcp_hlen; struct ether_vlan_header *eh; +#ifdef INET struct ip *ip; +#endif +#ifdef INET6 struct ip6_hdr *ip6; +#endif +#if defined(INET6) || defined(INET) struct tcphdr *th; +#endif u64 type_cmd_tso_mss; /* @@ -725,9 +724,9 @@ ixl_tso_setup(struct ixl_queue *que, str break; #endif default: - panic("%s: CSUM_TSO but no supported IP version (0x%04x)", + printf("%s: CSUM_TSO but no supported IP version (0x%04x)", __func__, ntohs(etype)); - break; + return FALSE; } /* Ensure we have at least the IP+TCP header in the first mbuf. */ @@ -794,36 +793,6 @@ ixl_txeof(struct ixl_queue *que) mtx_assert(&txr->mtx, MA_OWNED); -#ifdef DEV_NETMAP - if (ifp->if_capenable & IFCAP_NETMAP) { - struct netmap_adapter *na = NA(ifp); - struct netmap_kring *kring = &na->tx_rings[que->me]; - tx_desc = txr->base; - bus_dmamap_sync(txr->dma.tag, txr->dma.map, - BUS_DMASYNC_POSTREAD); - if (!netmap_mitigate || - (kring->nr_kflags < kring->nkr_num_slots && - tx_desc[kring->nr_kflags].cmd_type_offset_bsz & - htole32(I40E_TX_DESC_DTYPE_DESC_DONE))) - { -#if NETMAP_API < 4 - struct ixl_pf *pf = vsi->pf; - kring->nr_kflags = kring->nkr_num_slots; - selwakeuppri(&na->tx_rings[que->me].si, PI_NET); - IXL_TX_UNLOCK(txr); - IXL_PF_LOCK(pf); - selwakeuppri(&na->tx_si, PI_NET); - IXL_PF_UNLOCK(pf); - IXL_TX_LOCK(txr); -#else /* NETMAP_API >= 4 */ - netmap_tx_irq(ifp, txr->que->me); -#endif /* NETMAP_API */ - } - // XXX guessing there is no more work to be done - return FALSE; - } -#endif /* DEV_NETMAP */ - /* These are not the descriptors you seek, move along :) */ if (txr->avail == que->num_desc) { que->busy = 0; @@ -1011,12 +980,8 @@ no_split: buf->m_pack = mp; bus_dmamap_sync(rxr->ptag, buf->pmap, BUS_DMASYNC_PREREAD); -#ifdef DEV_NETMAP - rxr->base[i].read.pkt_addr = buf->addr; -#else /* !DEV_NETMAP */ rxr->base[i].read.pkt_addr = htole64(pseg[0].ds_addr); -#endif /* DEV_NETMAP */ /* Used only when doing header split */ rxr->base[i].read.hdr_addr = 0; @@ -1127,15 +1092,8 @@ ixl_init_rx_ring(struct ixl_queue *que) struct ixl_rx_buf *buf; bus_dma_segment_t pseg[1], hseg[1]; int rsize, nsegs, error = 0; -#ifdef DEV_NETMAP - struct netmap_adapter *na = NA(ifp); - struct netmap_slot *slot; -#endif /* DEV_NETMAP */ IXL_RX_LOCK(rxr); -#ifdef DEV_NETMAP - slot = netmap_reset(na, NR_RX, que->me, 0); -#endif /* Clear the ring contents */ rsize = roundup2(que->num_desc * sizeof(union i40e_rx_desc), DBA_ALIGN); @@ -1169,21 +1127,6 @@ ixl_init_rx_ring(struct ixl_queue *que) struct mbuf *mh, *mp; buf = &rxr->buffers[j]; -#ifdef DEV_NETMAP - if (slot) - { - int sj = netmap_idx_n2k(&na->rx_rings[que->me], j); - u64 paddr; - void *addr; - - addr = PNMB(slot + sj, &paddr); - netmap_load_map(rxr->ptag, buf->pmap, addr); - /* Update descriptor and cached value */ - rxr->base[j].read.pkt_addr = htole64(paddr); - buf->addr = htole64(paddr); - continue; - } -#endif /* DEV_NETMAP */ /* ** Don't allocate mbufs if not ** doing header split, its wasteful @@ -1416,29 +1359,6 @@ ixl_rxeof(struct ixl_queue *que, int cou IXL_RX_LOCK(rxr); -#ifdef DEV_NETMAP -#if NETMAP_API < 4 - if (ifp->if_capenable & IFCAP_NETMAP) - { - struct netmap_adapter *na = NA(ifp); - - na->rx_rings[que->me].nr_kflags |= NKR_PENDINTR; - selwakeuppri(&na->rx_rings[que->me].si, PI_NET); - IXL_RX_UNLOCK(rxr); - IXL_PF_LOCK(vsi->pf); - selwakeuppri(&na->rx_si, PI_NET); - IXL_PF_UNLOCK(vsi->pf); - return (FALSE); - } -#else /* NETMAP_API >= 4 */ - if (netmap_rx_irq(ifp, que->me, &processed)) - { - IXL_RX_UNLOCK(rxr); - return (FALSE); - } -#endif /* NETMAP_API */ -#endif /* DEV_NETMAP */ - for (i = rxr->next_check; count != 0;) { struct mbuf *sendmp, *mh, *mp; u32 rsc, status, error; Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Mon Sep 1 07:34:36 2014 (r270918) +++ stable/10/sys/modules/Makefile Mon Sep 1 07:54:30 2014 (r270919) @@ -176,6 +176,8 @@ SUBDIR= \ ${_iwnfw} \ ${_ixgb} \ ${_ixgbe} \ + ${_ixl} \ + ${_ixlv} \ jme \ joy \ kbdmux \ @@ -721,6 +723,8 @@ _iwnfw= iwnfw .endif _ixgb= ixgb _ixgbe= ixgbe +_ixl= ixl +_ixlv= ixlv _lindev= lindev _linprocfs= linprocfs _linsysfs= linsysfs From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 07:58:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1F59533; Mon, 1 Sep 2014 07:58:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89635149A; Mon, 1 Sep 2014 07:58:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s817wI8l073027; Mon, 1 Sep 2014 07:58:18 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s817wFHH073009; Mon, 1 Sep 2014 07:58:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409010758.s817wFHH073009@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 1 Sep 2014 07:58:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270920 - in stable/10: . share/man/man9 sys/amd64/amd64 sys/arm/arm sys/i386/i386 sys/i386/xen sys/ia64/ia64 sys/mips/mips sys/powerpc/aim sys/powerpc/booke sys/powerpc/powerpc sys/spa... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 07:58:18 -0000 Author: kib Date: Mon Sep 1 07:58:15 2014 New Revision: 270920 URL: http://svnweb.freebsd.org/changeset/base/270920 Log: Fix a leak of the wired pages when unwiring of the PROT_NONE-mapped wired region. Rework the handling of unwire to do the it in batch, both at pmap and object level. All commits below are by alc. MFC r268327: Introduce pmap_unwire(). MFC r268591: Implement pmap_unwire() for powerpc. MFC r268776: Implement pmap_unwire() for arm. MFC r268806: pmap_unwire(9) man page. MFC r269134: When unwiring a region of an address space, do not assume that the underlying physical pages are mapped by the pmap. This fixes a leak of the wired pages on the unwiring of the region mapped with no access allowed. MFC r269339: In the implementation of the new function pmap_unwire(), the call to MOEA64_PVO_TO_PTE() must be performed before any changes are made to the PVO. Otherwise, MOEA64_PVO_TO_PTE() will panic. MFC r269365: Correct a long-standing problem in moea{,64}_pvo_enter() that was revealed by the combination of r268591 and r269134: When we attempt to add the wired attribute to an existing mapping, moea{,64}_pvo_enter() do nothing. (They only set the wired attribute on newly created mappings.) MFC r269433: Handle wiring failures in vm_map_wire() with the new functions pmap_unwire() and vm_object_unwire(). Retire vm_fault_{un,}wire(), since they are no longer used. MFC r269438: Rewrite a loop in vm_map_wire() so that gcc doesn't think that the variable "rv" is uninitialized. MFC r269485: Retire pmap_change_wiring(). Reviewed by: alc Added: stable/10/share/man/man9/pmap_unwire.9 - copied unchanged from r268806, head/share/man/man9/pmap_unwire.9 Modified: stable/10/ObsoleteFiles.inc stable/10/share/man/man9/Makefile stable/10/share/man/man9/pmap.9 stable/10/sys/amd64/amd64/pmap.c stable/10/sys/arm/arm/pmap-v6.c stable/10/sys/arm/arm/pmap.c stable/10/sys/i386/i386/pmap.c stable/10/sys/i386/xen/pmap.c stable/10/sys/ia64/ia64/pmap.c stable/10/sys/mips/mips/pmap.c stable/10/sys/powerpc/aim/mmu_oea.c stable/10/sys/powerpc/aim/mmu_oea64.c stable/10/sys/powerpc/booke/pmap.c stable/10/sys/powerpc/powerpc/mmu_if.m stable/10/sys/powerpc/powerpc/pmap_dispatch.c stable/10/sys/sparc64/sparc64/pmap.c stable/10/sys/vm/pmap.h stable/10/sys/vm/vm_extern.h stable/10/sys/vm/vm_fault.c stable/10/sys/vm/vm_map.c stable/10/sys/vm/vm_object.c stable/10/sys/vm/vm_object.h Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/ObsoleteFiles.inc Mon Sep 1 07:58:15 2014 (r270920) @@ -47,6 +47,8 @@ OLD_FILES+=usr/share/man/man1/otp-sha.1. # 20140812: example files removed OLD_FILES+=usr/share/examples/libusb20/aux.c OLD_FILES+=usr/share/examples/libusb20/aux.h +# 20140803: Remove an obsolete man page +OLD_FILES+=usr/share/man/man9/pmap_change_wiring.9.gz # 20140728: Remove an obsolete man page OLD_FILES+=usr/share/man/man9/VOP_GETVOBJECT.9.gz OLD_FILES+=usr/share/man/man9/VOP_CREATEVOBJECT.9.gz Modified: stable/10/share/man/man9/Makefile ============================================================================== --- stable/10/share/man/man9/Makefile Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/share/man/man9/Makefile Mon Sep 1 07:58:15 2014 (r270920) @@ -197,7 +197,6 @@ MAN= accept_filter.9 \ physio.9 \ pmap.9 \ pmap_activate.9 \ - pmap_change_wiring.9 \ pmap_clear_modify.9 \ pmap_copy.9 \ pmap_enter.9 \ @@ -217,6 +216,7 @@ MAN= accept_filter.9 \ pmap_release.9 \ pmap_remove.9 \ pmap_resident_count.9 \ + pmap_unwire.9 \ pmap_zero_page.9 \ printf.9 \ prison_check.9 \ Modified: stable/10/share/man/man9/pmap.9 ============================================================================== --- stable/10/share/man/man9/pmap.9 Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/share/man/man9/pmap.9 Mon Sep 1 07:58:15 2014 (r270920) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 21, 2003 +.Dd July 18, 2014 .Dt PMAP 9 .Os .Sh NAME @@ -89,7 +89,6 @@ operation. .Sh SEE ALSO .Xr pmap 9 , .Xr pmap_activate 9 , -.Xr pmap_change_wiring 9 , .Xr pmap_clear_modify 9 , .Xr pmap_clear_reference 9 , .Xr pmap_copy 9 , @@ -120,6 +119,7 @@ operation. .Xr pmap_remove_pages 9 , .Xr pmap_resident_count 9 , .Xr pmap_ts_modified 9 , +.Xr pmap_unwire 9 , .Xr pmap_wired_count 9 , .Xr pmap_zero_area 9 , .Xr pmap_zero_idle 9 , Copied: stable/10/share/man/man9/pmap_unwire.9 (from r268806, head/share/man/man9/pmap_unwire.9) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/share/man/man9/pmap_unwire.9 Mon Sep 1 07:58:15 2014 (r270920, copy of r268806, head/share/man/man9/pmap_unwire.9) @@ -0,0 +1,66 @@ +.\" +.\" Copyright (c) 2014 Alan L. Cox +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd July 17, 2014 +.Dt PMAP_UNWIRE 9 +.Os +.Sh NAME +.Nm pmap_unwire +.Nd unwire a range of virtual pages +.Sh SYNOPSIS +.In sys/param.h +.In vm/vm.h +.In vm/pmap.h +.Ft void +.Fo pmap_unwire +.Fa "pmap_t pmap" "vm_offset_t start" "vm_offset_t end" +.Fc +.Sh DESCRIPTION +.Pp +The function +.Fn pmap_unwire +removes the wired attribute from each of the virtual-to-physical page mappings +within the virtual address range from +.Fa start +to +.Fa end +of the physical map +.Fa pmap . +Every valid mapping within that range is required to have the wired attribute +set. +Invalid mappings are ignored, since they cannot have the wired attribute set. +.Sh NOTES +Only the function +.Xr pmap_enter 9 +can be used to set the wired attribute of a virtual-to-physical page mapping. +.Sh SEE ALSO +.Xr pmap 9 , +.Xr pmap_enter 9 , +.Xr pmap_wired_count 9 +.Sh AUTHORS +This manual page was written by +.An Alan L. Cox Aq alc@rice.edu . Modified: stable/10/sys/amd64/amd64/pmap.c ============================================================================== --- stable/10/sys/amd64/amd64/pmap.c Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/sys/amd64/amd64/pmap.c Mon Sep 1 07:58:15 2014 (r270920) @@ -4704,52 +4704,96 @@ pmap_object_init_pt(pmap_t pmap, vm_offs } /* - * Routine: pmap_change_wiring - * Function: Change the wiring attribute for a map/virtual-address - * pair. - * In/out conditions: - * The mapping must already exist in the pmap. + * Clear the wired attribute from the mappings for the specified range of + * addresses in the given pmap. Every valid mapping within that range + * must have the wired attribute set. In contrast, invalid mappings + * cannot have the wired attribute set, so they are ignored. + * + * The wired attribute of the page table entry is not a hardware feature, + * so there is no need to invalidate any TLB entries. */ void -pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) +pmap_unwire(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { + vm_offset_t va_next; + pml4_entry_t *pml4e; + pdp_entry_t *pdpe; pd_entry_t *pde; - pt_entry_t *pte; + pt_entry_t *pte, PG_V; boolean_t pv_lists_locked; + PG_V = pmap_valid_bit(pmap); pv_lists_locked = FALSE; - - /* - * Wiring is not a hardware characteristic so there is no need to - * invalidate TLB. - */ -retry: +resume: PMAP_LOCK(pmap); - pde = pmap_pde(pmap, va); - if ((*pde & PG_PS) != 0) { - if (!wired != ((*pde & PG_W) == 0)) { - if (!pv_lists_locked) { - pv_lists_locked = TRUE; - if (!rw_try_rlock(&pvh_global_lock)) { - PMAP_UNLOCK(pmap); - rw_rlock(&pvh_global_lock); - goto retry; + for (; sva < eva; sva = va_next) { + pml4e = pmap_pml4e(pmap, sva); + if ((*pml4e & PG_V) == 0) { + va_next = (sva + NBPML4) & ~PML4MASK; + if (va_next < sva) + va_next = eva; + continue; + } + pdpe = pmap_pml4e_to_pdpe(pml4e, sva); + if ((*pdpe & PG_V) == 0) { + va_next = (sva + NBPDP) & ~PDPMASK; + if (va_next < sva) + va_next = eva; + continue; + } + va_next = (sva + NBPDR) & ~PDRMASK; + if (va_next < sva) + va_next = eva; + pde = pmap_pdpe_to_pde(pdpe, sva); + if ((*pde & PG_V) == 0) + continue; + if ((*pde & PG_PS) != 0) { + if ((*pde & PG_W) == 0) + panic("pmap_unwire: pde %#jx is missing PG_W", + (uintmax_t)*pde); + + /* + * Are we unwiring the entire large page? If not, + * demote the mapping and fall through. + */ + if (sva + NBPDR == va_next && eva >= va_next) { + atomic_clear_long(pde, PG_W); + pmap->pm_stats.wired_count -= NBPDR / + PAGE_SIZE; + continue; + } else { + if (!pv_lists_locked) { + pv_lists_locked = TRUE; + if (!rw_try_rlock(&pvh_global_lock)) { + PMAP_UNLOCK(pmap); + rw_rlock(&pvh_global_lock); + /* Repeat sva. */ + goto resume; + } } + if (!pmap_demote_pde(pmap, pde, sva)) + panic("pmap_unwire: demotion failed"); } - if (!pmap_demote_pde(pmap, pde, va)) - panic("pmap_change_wiring: demotion failed"); - } else - goto out; - } - pte = pmap_pde_to_pte(pde, va); - if (wired && (*pte & PG_W) == 0) { - pmap->pm_stats.wired_count++; - atomic_set_long(pte, PG_W); - } else if (!wired && (*pte & PG_W) != 0) { - pmap->pm_stats.wired_count--; - atomic_clear_long(pte, PG_W); + } + if (va_next > eva) + va_next = eva; + for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; pte++, + sva += PAGE_SIZE) { + if ((*pte & PG_V) == 0) + continue; + if ((*pte & PG_W) == 0) + panic("pmap_unwire: pte %#jx is missing PG_W", + (uintmax_t)*pte); + + /* + * PG_W must be cleared atomically. Although the pmap + * lock synchronizes access to PG_W, another processor + * could be setting PG_M and/or PG_A concurrently. + */ + atomic_clear_long(pte, PG_W); + pmap->pm_stats.wired_count--; + } } -out: if (pv_lists_locked) rw_runlock(&pvh_global_lock); PMAP_UNLOCK(pmap); Modified: stable/10/sys/arm/arm/pmap-v6.c ============================================================================== --- stable/10/sys/arm/arm/pmap-v6.c Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/sys/arm/arm/pmap-v6.c Mon Sep 1 07:58:15 2014 (r270920) @@ -3264,53 +3264,76 @@ pmap_enter_quick(pmap_t pmap, vm_offset_ } /* - * Routine: pmap_change_wiring - * Function: Change the wiring attribute for a map/virtual-address - * pair. - * In/out conditions: - * The mapping must already exist in the pmap. + * Clear the wired attribute from the mappings for the specified range of + * addresses in the given pmap. Every valid mapping within that range + * must have the wired attribute set. In contrast, invalid mappings + * cannot have the wired attribute set, so they are ignored. + * + * XXX Wired mappings of unmanaged pages cannot be counted by this pmap + * implementation. */ void -pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) +pmap_unwire(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { struct l2_bucket *l2b; struct md_page *pvh; - struct pv_entry *pve; - pd_entry_t *pl1pd, l1pd; + pd_entry_t l1pd; pt_entry_t *ptep, pte; + pv_entry_t pv; + vm_offset_t next_bucket; + vm_paddr_t pa; vm_page_t m; - + rw_wlock(&pvh_global_lock); PMAP_LOCK(pmap); - pl1pd = &pmap->pm_l1->l1_kva[L1_IDX(va)]; - l1pd = *pl1pd; - if ((l1pd & L1_TYPE_MASK) == L1_S_PROTO) { - m = PHYS_TO_VM_PAGE(l1pd & L1_S_FRAME); - KASSERT((m != NULL) && ((m->oflags & VPO_UNMANAGED) == 0), - ("pmap_change_wiring: unmanaged superpage should not " - "be changed")); - KASSERT(pmap != pmap_kernel(), - ("pmap_change_wiring: managed kernel superpage " - "should not exist")); - pvh = pa_to_pvh(l1pd & L1_S_FRAME); - pve = pmap_find_pv(pvh, pmap, trunc_1mpage(va)); - if (!wired != ((pve->pv_flags & PVF_WIRED) == 0)) { - if (!pmap_demote_section(pmap, va)) - panic("pmap_change_wiring: demotion failed"); - } else - goto out; + while (sva < eva) { + next_bucket = L2_NEXT_BUCKET(sva); + l1pd = pmap->pm_l1->l1_kva[L1_IDX(sva)]; + if ((l1pd & L1_TYPE_MASK) == L1_S_PROTO) { + pa = l1pd & L1_S_FRAME; + m = PHYS_TO_VM_PAGE(pa); + KASSERT(m != NULL && (m->oflags & VPO_UNMANAGED) == 0, + ("pmap_unwire: unmanaged 1mpage %p", m)); + pvh = pa_to_pvh(pa); + pv = pmap_find_pv(pvh, pmap, trunc_1mpage(sva)); + if ((pv->pv_flags & PVF_WIRED) == 0) + panic("pmap_unwire: pv %p isn't wired", pv); + + /* + * Are we unwiring the entire large page? If not, + * demote the mapping and fall through. + */ + if (sva + L1_S_SIZE == next_bucket && + eva >= next_bucket) { + pv->pv_flags &= ~PVF_WIRED; + pmap->pm_stats.wired_count -= L2_PTE_NUM_TOTAL; + sva = next_bucket; + continue; + } else if (!pmap_demote_section(pmap, sva)) + panic("pmap_unwire: demotion failed"); + } + if (next_bucket > eva) + next_bucket = eva; + l2b = pmap_get_l2_bucket(pmap, sva); + if (l2b == NULL) { + sva = next_bucket; + continue; + } + for (ptep = &l2b->l2b_kva[l2pte_index(sva)]; sva < next_bucket; + sva += PAGE_SIZE, ptep++) { + if ((pte = *ptep) == 0 || + (m = PHYS_TO_VM_PAGE(l2pte_pa(pte))) == NULL || + (m->oflags & VPO_UNMANAGED) != 0) + continue; + pv = pmap_find_pv(&m->md, pmap, sva); + if ((pv->pv_flags & PVF_WIRED) == 0) + panic("pmap_unwire: pv %p isn't wired", pv); + pv->pv_flags &= ~PVF_WIRED; + pmap->pm_stats.wired_count--; + } } - l2b = pmap_get_l2_bucket(pmap, va); - KASSERT(l2b, ("No l2b bucket in pmap_change_wiring")); - ptep = &l2b->l2b_kva[l2pte_index(va)]; - pte = *ptep; - m = PHYS_TO_VM_PAGE(l2pte_pa(pte)); - if (m != NULL) - pmap_modify_pv(m, pmap, va, PVF_WIRED, - wired == TRUE ? PVF_WIRED : 0); -out: rw_wunlock(&pvh_global_lock); - PMAP_UNLOCK(pmap); + PMAP_UNLOCK(pmap); } Modified: stable/10/sys/arm/arm/pmap.c ============================================================================== --- stable/10/sys/arm/arm/pmap.c Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/sys/arm/arm/pmap.c Mon Sep 1 07:58:15 2014 (r270920) @@ -3542,28 +3542,47 @@ pmap_enter_quick(pmap_t pmap, vm_offset_ } /* - * Routine: pmap_change_wiring - * Function: Change the wiring attribute for a map/virtual-address - * pair. - * In/out conditions: - * The mapping must already exist in the pmap. + * Clear the wired attribute from the mappings for the specified range of + * addresses in the given pmap. Every valid mapping within that range + * must have the wired attribute set. In contrast, invalid mappings + * cannot have the wired attribute set, so they are ignored. + * + * XXX Wired mappings of unmanaged pages cannot be counted by this pmap + * implementation. */ void -pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) +pmap_unwire(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { struct l2_bucket *l2b; pt_entry_t *ptep, pte; - vm_page_t pg; - + pv_entry_t pv; + vm_offset_t next_bucket; + vm_page_t m; + rw_wlock(&pvh_global_lock); - PMAP_LOCK(pmap); - l2b = pmap_get_l2_bucket(pmap, va); - KASSERT(l2b, ("No l2b bucket in pmap_change_wiring")); - ptep = &l2b->l2b_kva[l2pte_index(va)]; - pte = *ptep; - pg = PHYS_TO_VM_PAGE(l2pte_pa(pte)); - if (pg) - pmap_modify_pv(pg, pmap, va, PVF_WIRED, wired ? PVF_WIRED : 0); + PMAP_LOCK(pmap); + while (sva < eva) { + next_bucket = L2_NEXT_BUCKET(sva); + if (next_bucket > eva) + next_bucket = eva; + l2b = pmap_get_l2_bucket(pmap, sva); + if (l2b == NULL) { + sva = next_bucket; + continue; + } + for (ptep = &l2b->l2b_kva[l2pte_index(sva)]; sva < next_bucket; + sva += PAGE_SIZE, ptep++) { + if ((pte = *ptep) == 0 || + (m = PHYS_TO_VM_PAGE(l2pte_pa(pte))) == NULL || + (m->oflags & VPO_UNMANAGED) != 0) + continue; + pv = pmap_find_pv(m, pmap, sva); + if ((pv->pv_flags & PVF_WIRED) == 0) + panic("pmap_unwire: pv %p isn't wired", pv); + pv->pv_flags &= ~PVF_WIRED; + pmap->pm_stats.wired_count--; + } + } rw_wunlock(&pvh_global_lock); PMAP_UNLOCK(pmap); } Modified: stable/10/sys/i386/i386/pmap.c ============================================================================== --- stable/10/sys/i386/i386/pmap.c Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/sys/i386/i386/pmap.c Mon Sep 1 07:58:15 2014 (r270920) @@ -3968,59 +3968,100 @@ pmap_object_init_pt(pmap_t pmap, vm_offs } /* - * Routine: pmap_change_wiring - * Function: Change the wiring attribute for a map/virtual-address - * pair. - * In/out conditions: - * The mapping must already exist in the pmap. + * Clear the wired attribute from the mappings for the specified range of + * addresses in the given pmap. Every valid mapping within that range + * must have the wired attribute set. In contrast, invalid mappings + * cannot have the wired attribute set, so they are ignored. + * + * The wired attribute of the page table entry is not a hardware feature, + * so there is no need to invalidate any TLB entries. */ void -pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) +pmap_unwire(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { + vm_offset_t pdnxt; pd_entry_t *pde; pt_entry_t *pte; - boolean_t are_queues_locked; + boolean_t pv_lists_locked; - are_queues_locked = FALSE; -retry: + if (pmap_is_current(pmap)) + pv_lists_locked = FALSE; + else { + pv_lists_locked = TRUE; +resume: + rw_wlock(&pvh_global_lock); + sched_pin(); + } PMAP_LOCK(pmap); - pde = pmap_pde(pmap, va); - if ((*pde & PG_PS) != 0) { - if (!wired != ((*pde & PG_W) == 0)) { - if (!are_queues_locked) { - are_queues_locked = TRUE; - if (!rw_try_wlock(&pvh_global_lock)) { - PMAP_UNLOCK(pmap); - rw_wlock(&pvh_global_lock); - goto retry; + for (; sva < eva; sva = pdnxt) { + pdnxt = (sva + NBPDR) & ~PDRMASK; + if (pdnxt < sva) + pdnxt = eva; + pde = pmap_pde(pmap, sva); + if ((*pde & PG_V) == 0) + continue; + if ((*pde & PG_PS) != 0) { + if ((*pde & PG_W) == 0) + panic("pmap_unwire: pde %#jx is missing PG_W", + (uintmax_t)*pde); + + /* + * Are we unwiring the entire large page? If not, + * demote the mapping and fall through. + */ + if (sva + NBPDR == pdnxt && eva >= pdnxt) { + /* + * Regardless of whether a pde (or pte) is 32 + * or 64 bits in size, PG_W is among the least + * significant 32 bits. + */ + atomic_clear_int((u_int *)pde, PG_W); + pmap->pm_stats.wired_count -= NBPDR / + PAGE_SIZE; + continue; + } else { + if (!pv_lists_locked) { + pv_lists_locked = TRUE; + if (!rw_try_wlock(&pvh_global_lock)) { + PMAP_UNLOCK(pmap); + /* Repeat sva. */ + goto resume; + } + sched_pin(); } + if (!pmap_demote_pde(pmap, pde, sva)) + panic("pmap_unwire: demotion failed"); } - if (!pmap_demote_pde(pmap, pde, va)) - panic("pmap_change_wiring: demotion failed"); - } else - goto out; - } - pte = pmap_pte(pmap, va); - - if (wired && !pmap_pte_w(pte)) - pmap->pm_stats.wired_count++; - else if (!wired && pmap_pte_w(pte)) - pmap->pm_stats.wired_count--; + } + if (pdnxt > eva) + pdnxt = eva; + for (pte = pmap_pte_quick(pmap, sva); sva != pdnxt; pte++, + sva += PAGE_SIZE) { + if ((*pte & PG_V) == 0) + continue; + if ((*pte & PG_W) == 0) + panic("pmap_unwire: pte %#jx is missing PG_W", + (uintmax_t)*pte); - /* - * Wiring is not a hardware characteristic so there is no need to - * invalidate TLB. - */ - pmap_pte_set_w(pte, wired); - pmap_pte_release(pte); -out: - if (are_queues_locked) + /* + * PG_W must be cleared atomically. Although the pmap + * lock synchronizes access to PG_W, another processor + * could be setting PG_M and/or PG_A concurrently. + * + * PG_W is among the least significant 32 bits. + */ + atomic_clear_int((u_int *)pte, PG_W); + pmap->pm_stats.wired_count--; + } + } + if (pv_lists_locked) { + sched_unpin(); rw_wunlock(&pvh_global_lock); + } PMAP_UNLOCK(pmap); } - /* * Copy the range specified by src_addr/len * from the source map to the range dst_addr/len Modified: stable/10/sys/i386/xen/pmap.c ============================================================================== --- stable/10/sys/i386/xen/pmap.c Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/sys/i386/xen/pmap.c Mon Sep 1 07:58:15 2014 (r270920) @@ -3169,40 +3169,58 @@ pmap_object_init_pt(pmap_t pmap, vm_offs } /* - * Routine: pmap_change_wiring - * Function: Change the wiring attribute for a map/virtual-address - * pair. - * In/out conditions: - * The mapping must already exist in the pmap. + * Clear the wired attribute from the mappings for the specified range of + * addresses in the given pmap. Every valid mapping within that range + * must have the wired attribute set. In contrast, invalid mappings + * cannot have the wired attribute set, so they are ignored. + * + * The wired attribute of the page table entry is not a hardware feature, + * so there is no need to invalidate any TLB entries. */ void -pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) +pmap_unwire(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { + vm_offset_t pdnxt; + pd_entry_t *pde; pt_entry_t *pte; + CTR3(KTR_PMAP, "pmap_unwire: pmap=%p sva=0x%x eva=0x%x", pmap, sva, + eva); rw_wlock(&pvh_global_lock); + sched_pin(); PMAP_LOCK(pmap); - pte = pmap_pte(pmap, va); - - if (wired && !pmap_pte_w(pte)) { - PT_SET_VA_MA((pte), *(pte) | PG_W, TRUE); - pmap->pm_stats.wired_count++; - } else if (!wired && pmap_pte_w(pte)) { - PT_SET_VA_MA((pte), *(pte) & ~PG_W, TRUE); - pmap->pm_stats.wired_count--; + for (; sva < eva; sva = pdnxt) { + pdnxt = (sva + NBPDR) & ~PDRMASK; + if (pdnxt < sva) + pdnxt = eva; + pde = pmap_pde(pmap, sva); + if ((*pde & PG_V) == 0) + continue; + if ((*pde & PG_PS) != 0) + panic("pmap_unwire: unexpected PG_PS in pde %#jx", + (uintmax_t)*pde); + if (pdnxt > eva) + pdnxt = eva; + for (pte = pmap_pte_quick(pmap, sva); sva != pdnxt; pte++, + sva += PAGE_SIZE) { + if ((*pte & PG_V) == 0) + continue; + if ((*pte & PG_W) == 0) + panic("pmap_unwire: pte %#jx is missing PG_W", + (uintmax_t)*pte); + PT_SET_VA_MA(pte, *pte & ~PG_W, FALSE); + pmap->pm_stats.wired_count--; + } } - - /* - * Wiring is not a hardware characteristic so there is no need to - * invalidate TLB. - */ - pmap_pte_release(pte); - PMAP_UNLOCK(pmap); + if (*PMAP1) + PT_CLEAR_VA(PMAP1, FALSE); + PT_UPDATES_FLUSH(); + sched_unpin(); rw_wunlock(&pvh_global_lock); + PMAP_UNLOCK(pmap); } - /* * Copy the range specified by src_addr/len * from the source map to the range dst_addr/len Modified: stable/10/sys/ia64/ia64/pmap.c ============================================================================== --- stable/10/sys/ia64/ia64/pmap.c Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/sys/ia64/ia64/pmap.c Mon Sep 1 07:58:15 2014 (r270920) @@ -1946,34 +1946,33 @@ pmap_object_init_pt(pmap_t pmap, vm_offs } /* - * Routine: pmap_change_wiring - * Function: Change the wiring attribute for a map/virtual-address - * pair. - * In/out conditions: - * The mapping must already exist in the pmap. + * Clear the wired attribute from the mappings for the specified range of + * addresses in the given pmap. Every valid mapping within that range + * must have the wired attribute set. In contrast, invalid mappings + * cannot have the wired attribute set, so they are ignored. + * + * The wired attribute of the page table entry is not a hardware feature, + * so there is no need to invalidate any TLB entries. */ void -pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) +pmap_unwire(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { pmap_t oldpmap; struct ia64_lpte *pte; - CTR4(KTR_PMAP, "%s(pm=%p, va=%#lx, wired=%u)", __func__, pmap, va, - wired); + CTR4(KTR_PMAP, "%s(%p, %#x, %#x)", __func__, pmap, sva, eva); PMAP_LOCK(pmap); oldpmap = pmap_switch(pmap); - - pte = pmap_find_vhpt(va); - KASSERT(pte != NULL, ("pte")); - if (wired && !pmap_wired(pte)) { - pmap->pm_stats.wired_count++; - pmap_set_wired(pte); - } else if (!wired && pmap_wired(pte)) { + for (; sva < eva; sva += PAGE_SIZE) { + pte = pmap_find_vhpt(sva); + if (pte == NULL) + continue; + if (!pmap_wired(pte)) + panic("pmap_unwire: pte %p isn't wired", pte); pmap->pm_stats.wired_count--; pmap_clear_wired(pte); } - pmap_switch(oldpmap); PMAP_UNLOCK(pmap); } Modified: stable/10/sys/mips/mips/pmap.c ============================================================================== --- stable/10/sys/mips/mips/pmap.c Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/sys/mips/mips/pmap.c Mon Sep 1 07:58:15 2014 (r270920) @@ -2426,33 +2426,51 @@ pmap_object_init_pt(pmap_t pmap, vm_offs } /* - * Routine: pmap_change_wiring - * Function: Change the wiring attribute for a map/virtual-address - * pair. - * In/out conditions: - * The mapping must already exist in the pmap. + * Clear the wired attribute from the mappings for the specified range of + * addresses in the given pmap. Every valid mapping within that range + * must have the wired attribute set. In contrast, invalid mappings + * cannot have the wired attribute set, so they are ignored. + * + * The wired attribute of the page table entry is not a hardware feature, + * so there is no need to invalidate any TLB entries. */ void -pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) +pmap_unwire(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { + pd_entry_t *pde, *pdpe; pt_entry_t *pte; + vm_offset_t va_next; PMAP_LOCK(pmap); - pte = pmap_pte(pmap, va); - - if (wired && !pte_test(pte, PTE_W)) - pmap->pm_stats.wired_count++; - else if (!wired && pte_test(pte, PTE_W)) - pmap->pm_stats.wired_count--; - - /* - * Wiring is not a hardware characteristic so there is no need to - * invalidate TLB. - */ - if (wired) - pte_set(pte, PTE_W); - else - pte_clear(pte, PTE_W); + for (; sva < eva; sva = va_next) { + pdpe = pmap_segmap(pmap, sva); +#ifdef __mips_n64 + if (*pdpe == NULL) { + va_next = (sva + NBSEG) & ~SEGMASK; + if (va_next < sva) + va_next = eva; + continue; + } +#endif + va_next = (sva + NBPDR) & ~PDRMASK; + if (va_next < sva) + va_next = eva; + pde = pmap_pdpe_to_pde(pdpe, sva); + if (*pde == NULL) + continue; + if (va_next > eva) + va_next = eva; + for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; pte++, + sva += PAGE_SIZE) { + if (!pte_test(pte, PTE_V)) + continue; + if (!pte_test(pte, PTE_W)) + panic("pmap_unwire: pte %#jx is missing PG_W", + (uintmax_t)*pte); + pte_clear(pte, PTE_W); + pmap->pm_stats.wired_count--; + } + } PMAP_UNLOCK(pmap); } Modified: stable/10/sys/powerpc/aim/mmu_oea.c ============================================================================== --- stable/10/sys/powerpc/aim/mmu_oea.c Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/sys/powerpc/aim/mmu_oea.c Mon Sep 1 07:58:15 2014 (r270920) @@ -269,7 +269,6 @@ int moea_pte_spill(vm_offset_t); /* * Kernel MMU interface */ -void moea_change_wiring(mmu_t, pmap_t, vm_offset_t, boolean_t); void moea_clear_modify(mmu_t, vm_page_t); void moea_copy_page(mmu_t, vm_page_t, vm_page_t); void moea_copy_pages(mmu_t mmu, vm_page_t *ma, vm_offset_t a_offset, @@ -298,6 +297,7 @@ void moea_release(mmu_t, pmap_t); void moea_remove(mmu_t, pmap_t, vm_offset_t, vm_offset_t); void moea_remove_all(mmu_t, vm_page_t); void moea_remove_write(mmu_t, vm_page_t); +void moea_unwire(mmu_t, pmap_t, vm_offset_t, vm_offset_t); void moea_zero_page(mmu_t, vm_page_t); void moea_zero_page_area(mmu_t, vm_page_t, int, int); void moea_zero_page_idle(mmu_t, vm_page_t); @@ -319,7 +319,6 @@ vm_offset_t moea_dumpsys_map(mmu_t mmu, struct pmap_md * moea_scan_md(mmu_t mmu, struct pmap_md *prev); static mmu_method_t moea_methods[] = { - MMUMETHOD(mmu_change_wiring, moea_change_wiring), MMUMETHOD(mmu_clear_modify, moea_clear_modify), MMUMETHOD(mmu_copy_page, moea_copy_page), MMUMETHOD(mmu_copy_pages, moea_copy_pages), @@ -346,6 +345,7 @@ static mmu_method_t moea_methods[] = { MMUMETHOD(mmu_remove_all, moea_remove_all), MMUMETHOD(mmu_remove_write, moea_remove_write), MMUMETHOD(mmu_sync_icache, moea_sync_icache), + MMUMETHOD(mmu_unwire, moea_unwire), MMUMETHOD(mmu_zero_page, moea_zero_page), MMUMETHOD(mmu_zero_page_area, moea_zero_page_area), MMUMETHOD(mmu_zero_page_idle, moea_zero_page_idle), @@ -1015,23 +1015,19 @@ moea_deactivate(mmu_t mmu, struct thread } void -moea_change_wiring(mmu_t mmu, pmap_t pm, vm_offset_t va, boolean_t wired) +moea_unwire(mmu_t mmu, pmap_t pm, vm_offset_t sva, vm_offset_t eva) { - struct pvo_entry *pvo; + struct pvo_entry key, *pvo; PMAP_LOCK(pm); - pvo = moea_pvo_find_va(pm, va & ~ADDR_POFF, NULL); - - if (pvo != NULL) { - if (wired) { - if ((pvo->pvo_vaddr & PVO_WIRED) == 0) - pm->pm_stats.wired_count++; - pvo->pvo_vaddr |= PVO_WIRED; - } else { - if ((pvo->pvo_vaddr & PVO_WIRED) != 0) - pm->pm_stats.wired_count--; - pvo->pvo_vaddr &= ~PVO_WIRED; - } + key.pvo_vaddr = sva; + for (pvo = RB_NFIND(pvo_tree, &pm->pmap_pvo, &key); + pvo != NULL && PVO_VADDR(pvo) < eva; + pvo = RB_NEXT(pvo_tree, &pm->pmap_pvo, pvo)) { + if ((pvo->pvo_vaddr & PVO_WIRED) == 0) + panic("moea_unwire: pvo %p is missing PVO_WIRED", pvo); + pvo->pvo_vaddr &= ~PVO_WIRED; + pm->pm_stats.wired_count--; } PMAP_UNLOCK(pm); } @@ -1941,7 +1937,21 @@ moea_pvo_enter(pmap_t pm, uma_zone_t zon if ((pvo->pvo_pte.pte.pte_lo & PTE_RPGN) == pa && (pvo->pvo_pte.pte.pte_lo & PTE_PP) == (pte_lo & PTE_PP)) { + /* + * The PTE is not changing. Instead, this may + * be a request to change the mapping's wired + * attribute. + */ mtx_unlock(&moea_table_mutex); + if ((flags & PVO_WIRED) != 0 && + (pvo->pvo_vaddr & PVO_WIRED) == 0) { + pvo->pvo_vaddr |= PVO_WIRED; + pm->pm_stats.wired_count++; + } else if ((flags & PVO_WIRED) == 0 && + (pvo->pvo_vaddr & PVO_WIRED) != 0) { + pvo->pvo_vaddr &= ~PVO_WIRED; + pm->pm_stats.wired_count--; + } return (0); } moea_pvo_remove(pvo, -1); Modified: stable/10/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- stable/10/sys/powerpc/aim/mmu_oea64.c Mon Sep 1 07:54:30 2014 (r270919) +++ stable/10/sys/powerpc/aim/mmu_oea64.c Mon Sep 1 07:58:15 2014 (r270920) @@ -283,7 +283,6 @@ static void moea64_syncicache(mmu_t, pm /* * Kernel MMU interface */ -void moea64_change_wiring(mmu_t, pmap_t, vm_offset_t, boolean_t); void moea64_clear_modify(mmu_t, vm_page_t); void moea64_copy_page(mmu_t, vm_page_t, vm_page_t); void moea64_copy_pages(mmu_t mmu, vm_page_t *ma, vm_offset_t a_offset, @@ -313,6 +312,7 @@ void moea64_remove(mmu_t, pmap_t, vm_off void moea64_remove_pages(mmu_t, pmap_t); void moea64_remove_all(mmu_t, vm_page_t); void moea64_remove_write(mmu_t, vm_page_t); +void moea64_unwire(mmu_t, pmap_t, vm_offset_t, vm_offset_t); void moea64_zero_page(mmu_t, vm_page_t); void moea64_zero_page_area(mmu_t, vm_page_t, int, int); void moea64_zero_page_idle(mmu_t, vm_page_t); @@ -332,7 +332,6 @@ vm_offset_t moea64_dumpsys_map(mmu_t mmu struct pmap_md * moea64_scan_md(mmu_t mmu, struct pmap_md *prev); static mmu_method_t moea64_methods[] = { - MMUMETHOD(mmu_change_wiring, moea64_change_wiring), MMUMETHOD(mmu_clear_modify, moea64_clear_modify), MMUMETHOD(mmu_copy_page, moea64_copy_page), MMUMETHOD(mmu_copy_pages, moea64_copy_pages), @@ -360,6 +359,7 @@ static mmu_method_t moea64_methods[] = { MMUMETHOD(mmu_remove_all, moea64_remove_all), MMUMETHOD(mmu_remove_write, moea64_remove_write), MMUMETHOD(mmu_sync_icache, moea64_sync_icache), + MMUMETHOD(mmu_unwire, moea64_unwire), MMUMETHOD(mmu_zero_page, moea64_zero_page), MMUMETHOD(mmu_zero_page_area, moea64_zero_page_area), MMUMETHOD(mmu_zero_page_idle, moea64_zero_page_idle), @@ -1025,55 +1025,38 @@ moea64_deactivate(mmu_t mmu, struct thre } void -moea64_change_wiring(mmu_t mmu, pmap_t pm, vm_offset_t va, boolean_t wired) +moea64_unwire(mmu_t mmu, pmap_t pm, vm_offset_t sva, vm_offset_t eva) { - struct pvo_entry *pvo; + struct pvo_entry key, *pvo; uintptr_t pt; - uint64_t vsid; - int i, ptegidx; - LOCK_TABLE_WR(); + LOCK_TABLE_RD(); PMAP_LOCK(pm); - pvo = moea64_pvo_find_va(pm, va & ~ADDR_POFF); - - if (pvo != NULL) { + key.pvo_vaddr = sva; + for (pvo = RB_NFIND(pvo_tree, &pm->pmap_pvo, &key); + pvo != NULL && PVO_VADDR(pvo) < eva; + pvo = RB_NEXT(pvo_tree, &pm->pmap_pvo, pvo)) { pt = MOEA64_PVO_TO_PTE(mmu, pvo); - - if (wired) { - if ((pvo->pvo_vaddr & PVO_WIRED) == 0) - pm->pm_stats.wired_count++; - pvo->pvo_vaddr |= PVO_WIRED; - pvo->pvo_pte.lpte.pte_hi |= LPTE_WIRED; - } else { - if ((pvo->pvo_vaddr & PVO_WIRED) != 0) - pm->pm_stats.wired_count--; - pvo->pvo_vaddr &= ~PVO_WIRED; - pvo->pvo_pte.lpte.pte_hi &= ~LPTE_WIRED; - } - + if ((pvo->pvo_vaddr & PVO_WIRED) == 0) + panic("moea64_unwire: pvo %p is missing PVO_WIRED", + pvo); + pvo->pvo_vaddr &= ~PVO_WIRED; + if ((pvo->pvo_pte.lpte.pte_hi & LPTE_WIRED) == 0) + panic("moea64_unwire: pte %p is missing LPTE_WIRED", + &pvo->pvo_pte.lpte); + pvo->pvo_pte.lpte.pte_hi &= ~LPTE_WIRED; if (pt != -1) { - /* Update wiring flag in page table. */ - MOEA64_PTE_CHANGE(mmu, pt, &pvo->pvo_pte.lpte, - pvo->pvo_vpn); - } else if (wired) { /* - * If we are wiring the page, and it wasn't in the - * page table before, add it. + * The PTE's wired attribute is not a hardware + * feature, so there is no need to invalidate any TLB + * entries. */ - vsid = PVO_VSID(pvo); - ptegidx = va_to_pteg(vsid, PVO_VADDR(pvo), - pvo->pvo_vaddr & PVO_LARGE); - - i = MOEA64_PTE_INSERT(mmu, ptegidx, &pvo->pvo_pte.lpte); - - if (i >= 0) { - PVO_PTEGIDX_CLR(pvo); - PVO_PTEGIDX_SET(pvo, i); - } + MOEA64_PTE_CHANGE(mmu, pt, &pvo->pvo_pte.lpte, + pvo->pvo_vpn); } - + pm->pm_stats.wired_count--; } - UNLOCK_TABLE_WR(); + UNLOCK_TABLE_RD(); PMAP_UNLOCK(pm); } @@ -2207,6 +2190,7 @@ moea64_pvo_enter(mmu_t mmu, pmap_t pm, u uint64_t pte_lo, int flags, int8_t psind __unused) { struct pvo_entry *pvo; + uintptr_t pt; uint64_t vsid; int first; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 08:02:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2661A9AD; Mon, 1 Sep 2014 08:02:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11B8215CE; Mon, 1 Sep 2014 08:02:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8182N07077193; Mon, 1 Sep 2014 08:02:23 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8182NuY077192; Mon, 1 Sep 2014 08:02:23 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409010802.s8182NuY077192@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 1 Sep 2014 08:02:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270921 - stable/10/libexec/rtld-elf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 08:02:24 -0000 Author: kib Date: Mon Sep 1 08:02:23 2014 New Revision: 270921 URL: http://svnweb.freebsd.org/changeset/base/270921 Log: MFC r270803: Document the whole settings needed to build a debug version of rtld. Modified: stable/10/libexec/rtld-elf/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/rtld-elf/Makefile ============================================================================== --- stable/10/libexec/rtld-elf/Makefile Mon Sep 1 07:58:15 2014 (r270920) +++ stable/10/libexec/rtld-elf/Makefile Mon Sep 1 08:02:23 2014 (r270921) @@ -1,5 +1,9 @@ # $FreeBSD$ +# Use the following command to build local debug version of dynamic +# linker: +# make DEBUG_FLAGS=-g DEBUG=-DDEBUG MK_TESTS=no all + .include MK_SSP= no From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 08:08:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B305B67; Mon, 1 Sep 2014 08:08:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D096C1746; Mon, 1 Sep 2014 08:08:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8188WEP077999; Mon, 1 Sep 2014 08:08:32 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8188Wjt077998; Mon, 1 Sep 2014 08:08:32 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201409010808.s8188Wjt077998@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Mon, 1 Sep 2014 08:08:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270922 - stable/10/share/examples/autofs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 08:08:33 -0000 Author: trasz Date: Mon Sep 1 08:08:32 2014 New Revision: 270922 URL: http://svnweb.freebsd.org/changeset/base/270922 Log: MFC r270135: Remove vestiges of previous autofs. Discussed with: alfred@ Sponsored by: The FreeBSD Foundation Deleted: stable/10/share/examples/autofs/ Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 08:33:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D40F1A3; Mon, 1 Sep 2014 08:33:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0012719FF; Mon, 1 Sep 2014 08:33:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s818XcLk091398; Mon, 1 Sep 2014 08:33:38 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s818XchH091397; Mon, 1 Sep 2014 08:33:38 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409010833.s818XchH091397@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 1 Sep 2014 08:33:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270923 - stable/10/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 08:33:39 -0000 Author: ae Date: Mon Sep 1 08:33:38 2014 New Revision: 270923 URL: http://svnweb.freebsd.org/changeset/base/270923 Log: MFC r257985: Fix panic with RADIX_MPATH, when RTFREE_LOCKED() called for already unlocked route. Use in6_rtalloc() instead of in6_rtalloc1. This helps simplify the code and remove several now unused variables. PR: 156283 Modified: stable/10/sys/netinet6/nd6_nbr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/10/sys/netinet6/nd6_nbr.c Mon Sep 1 08:08:32 2014 (r270922) +++ stable/10/sys/netinet6/nd6_nbr.c Mon Sep 1 08:33:38 2014 (r270923) @@ -232,41 +232,28 @@ nd6_ns_input(struct mbuf *m, int off, in /* (2) check. */ if (ifa == NULL) { - struct rtentry *rt; - struct sockaddr_in6 tsin6; - int need_proxy; -#ifdef RADIX_MPATH struct route_in6 ro; -#endif + int need_proxy; - bzero(&tsin6, sizeof tsin6); - tsin6.sin6_len = sizeof(struct sockaddr_in6); - tsin6.sin6_family = AF_INET6; - tsin6.sin6_addr = taddr6; + bzero(&ro, sizeof(ro)); + ro.ro_dst.sin6_len = sizeof(struct sockaddr_in6); + ro.ro_dst.sin6_family = AF_INET6; + ro.ro_dst.sin6_addr = taddr6; /* Always use the default FIB. */ #ifdef RADIX_MPATH - bzero(&ro, sizeof(ro)); - ro.ro_dst = tsin6; rtalloc_mpath_fib((struct route *)&ro, RTF_ANNOUNCE, RT_DEFAULT_FIB); - rt = ro.ro_rt; #else - rt = in6_rtalloc1((struct sockaddr *)&tsin6, 0, 0, - RT_DEFAULT_FIB); + in6_rtalloc(&ro, RT_DEFAULT_FIB); #endif - need_proxy = (rt && (rt->rt_flags & RTF_ANNOUNCE) != 0 && - rt->rt_gateway->sa_family == AF_LINK); - if (rt != NULL) { - /* - * Make a copy while we can be sure that rt_gateway - * is still stable before unlocking to avoid lock - * order problems. proxydl will only be used if - * proxy will be set in the next block. - */ + need_proxy = (ro.ro_rt && + (ro.ro_rt->rt_flags & RTF_ANNOUNCE) != 0 && + ro.ro_rt->rt_gateway->sa_family == AF_LINK); + if (ro.ro_rt != NULL) { if (need_proxy) - proxydl = *SDL(rt->rt_gateway); - RTFREE_LOCKED(rt); + proxydl = *SDL(ro.ro_rt->rt_gateway); + RTFREE(ro.ro_rt); } if (need_proxy) { /* From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 08:33:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0925A2DD; Mon, 1 Sep 2014 08:33:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE9BF1A04; Mon, 1 Sep 2014 08:33:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s818XqZS091479; Mon, 1 Sep 2014 08:33:52 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s818XqIf091478; Mon, 1 Sep 2014 08:33:52 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409010833.s818XqIf091478@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 1 Sep 2014 08:33:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r270924 - stable/9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 08:33:53 -0000 Author: ae Date: Mon Sep 1 08:33:52 2014 New Revision: 270924 URL: http://svnweb.freebsd.org/changeset/base/270924 Log: MFC r257985: Fix panic with RADIX_MPATH, when RTFREE_LOCKED() called for already unlocked route. Use in6_rtalloc() instead of in6_rtalloc1. This helps simplify the code and remove several now unused variables. PR: 156283 Modified: stable/9/sys/netinet6/nd6_nbr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/9/sys/netinet6/nd6_nbr.c Mon Sep 1 08:33:38 2014 (r270923) +++ stable/9/sys/netinet6/nd6_nbr.c Mon Sep 1 08:33:52 2014 (r270924) @@ -232,41 +232,28 @@ nd6_ns_input(struct mbuf *m, int off, in /* (2) check. */ if (ifa == NULL) { - struct rtentry *rt; - struct sockaddr_in6 tsin6; - int need_proxy; -#ifdef RADIX_MPATH struct route_in6 ro; -#endif + int need_proxy; - bzero(&tsin6, sizeof tsin6); - tsin6.sin6_len = sizeof(struct sockaddr_in6); - tsin6.sin6_family = AF_INET6; - tsin6.sin6_addr = taddr6; + bzero(&ro, sizeof(ro)); + ro.ro_dst.sin6_len = sizeof(struct sockaddr_in6); + ro.ro_dst.sin6_family = AF_INET6; + ro.ro_dst.sin6_addr = taddr6; /* Always use the default FIB. */ #ifdef RADIX_MPATH - bzero(&ro, sizeof(ro)); - ro.ro_dst = tsin6; rtalloc_mpath_fib((struct route *)&ro, RTF_ANNOUNCE, RT_DEFAULT_FIB); - rt = ro.ro_rt; #else - rt = in6_rtalloc1((struct sockaddr *)&tsin6, 0, 0, - RT_DEFAULT_FIB); + in6_rtalloc(&ro, RT_DEFAULT_FIB); #endif - need_proxy = (rt && (rt->rt_flags & RTF_ANNOUNCE) != 0 && - rt->rt_gateway->sa_family == AF_LINK); - if (rt != NULL) { - /* - * Make a copy while we can be sure that rt_gateway - * is still stable before unlocking to avoid lock - * order problems. proxydl will only be used if - * proxy will be set in the next block. - */ + need_proxy = (ro.ro_rt && + (ro.ro_rt->rt_flags & RTF_ANNOUNCE) != 0 && + ro.ro_rt->rt_gateway->sa_family == AF_LINK); + if (ro.ro_rt != NULL) { if (need_proxy) - proxydl = *SDL(rt->rt_gateway); - RTFREE_LOCKED(rt); + proxydl = *SDL(ro.ro_rt->rt_gateway); + RTFREE(ro.ro_rt); } if (need_proxy) { /* From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 08:34:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC949429; Mon, 1 Sep 2014 08:34:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C847F1A16; Mon, 1 Sep 2014 08:34:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s818YdOj091668; Mon, 1 Sep 2014 08:34:39 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s818YdW7091665; Mon, 1 Sep 2014 08:34:39 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409010834.s818YdW7091665@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 1 Sep 2014 08:34:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270925 - stable/10/sys/netpfil/pf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 08:34:40 -0000 Author: glebius Date: Mon Sep 1 08:34:39 2014 New Revision: 270925 URL: http://svnweb.freebsd.org/changeset/base/270925 Log: Fix ABI broken in r270576. This is direct commit to stable/10. Reported by: kib Modified: stable/10/sys/netpfil/pf/pf.c stable/10/sys/netpfil/pf/pf.h Modified: stable/10/sys/netpfil/pf/pf.c ============================================================================== --- stable/10/sys/netpfil/pf/pf.c Mon Sep 1 08:33:52 2014 (r270924) +++ stable/10/sys/netpfil/pf/pf.c Mon Sep 1 08:34:39 2014 (r270925) @@ -3522,7 +3522,7 @@ pf_create_state(struct pf_rule *r, struc if (r->rt && r->rt != PF_FASTROUTE) { if (pf_map_addr(pd->af, r, pd->src, &s->rt_addr, NULL, &sn)) { - REASON_SET(&reason, PFRES_MAPFAILED); + REASON_SET(&reason, PFRES_BADSTATE); pf_src_tree_remove_state(s); STATE_DEC_COUNTERS(s); uma_zfree(V_pf_state_z, s); Modified: stable/10/sys/netpfil/pf/pf.h ============================================================================== --- stable/10/sys/netpfil/pf/pf.h Mon Sep 1 08:33:52 2014 (r270924) +++ stable/10/sys/netpfil/pf/pf.h Mon Sep 1 08:34:39 2014 (r270925) @@ -125,8 +125,7 @@ enum { PF_ADDR_ADDRMASK, PF_ADDR_NOROUTE #define PFRES_MAXSTATES 12 /* State limit */ #define PFRES_SRCLIMIT 13 /* Source node/conn limit */ #define PFRES_SYNPROXY 14 /* SYN proxy */ -#define PFRES_MAPFAILED 15 /* pf_map_addr() failed */ -#define PFRES_MAX 16 /* total+1 */ +#define PFRES_MAX 15 /* total+1 */ #define PFRES_NAMES { \ "match", \ @@ -144,7 +143,6 @@ enum { PF_ADDR_ADDRMASK, PF_ADDR_NOROUTE "state-limit", \ "src-limit", \ "synproxy", \ - "map-failed", \ NULL \ } From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 09:00:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3221DBE0; Mon, 1 Sep 2014 09:00:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 052EE1C44; Mon, 1 Sep 2014 09:00:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81900KO002125; Mon, 1 Sep 2014 09:00:00 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81900NX002124; Mon, 1 Sep 2014 09:00:00 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409010900.s81900NX002124@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 1 Sep 2014 09:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r270926 - stable/8/sys/netinet6 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 09:00:01 -0000 Author: ae Date: Mon Sep 1 09:00:00 2014 New Revision: 270926 URL: http://svnweb.freebsd.org/changeset/base/270926 Log: MFC r257985: Fix panic with RADIX_MPATH, when RTFREE_LOCKED() called for already unlocked route. Use in6_rtalloc() instead of in6_rtalloc1. This helps simplify the code and remove several now unused variables. PR: 156283 Modified: stable/8/sys/netinet6/nd6_nbr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/netinet6/ (props changed) Modified: stable/8/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/8/sys/netinet6/nd6_nbr.c Mon Sep 1 08:34:39 2014 (r270925) +++ stable/8/sys/netinet6/nd6_nbr.c Mon Sep 1 09:00:00 2014 (r270926) @@ -227,41 +227,28 @@ nd6_ns_input(struct mbuf *m, int off, in /* (2) check. */ if (ifa == NULL) { - struct rtentry *rt; - struct sockaddr_in6 tsin6; - int need_proxy; -#ifdef RADIX_MPATH struct route_in6 ro; -#endif + int need_proxy; - bzero(&tsin6, sizeof tsin6); - tsin6.sin6_len = sizeof(struct sockaddr_in6); - tsin6.sin6_family = AF_INET6; - tsin6.sin6_addr = taddr6; + bzero(&ro, sizeof(ro)); + ro.ro_dst.sin6_len = sizeof(struct sockaddr_in6); + ro.ro_dst.sin6_family = AF_INET6; + ro.ro_dst.sin6_addr = taddr6; /* Always use the default FIB. */ #ifdef RADIX_MPATH - bzero(&ro, sizeof(ro)); - ro.ro_dst = tsin6; rtalloc_mpath_fib((struct route *)&ro, RTF_ANNOUNCE, RT_DEFAULT_FIB); - rt = ro.ro_rt; #else - rt = in6_rtalloc1((struct sockaddr *)&tsin6, 0, 0, - RT_DEFAULT_FIB); + in6_rtalloc(&ro, RT_DEFAULT_FIB); #endif - need_proxy = (rt && (rt->rt_flags & RTF_ANNOUNCE) != 0 && - rt->rt_gateway->sa_family == AF_LINK); - if (rt != NULL) { - /* - * Make a copy while we can be sure that rt_gateway - * is still stable before unlocking to avoid lock - * order problems. proxydl will only be used if - * proxy will be set in the next block. - */ + need_proxy = (ro.ro_rt && + (ro.ro_rt->rt_flags & RTF_ANNOUNCE) != 0 && + ro.ro_rt->rt_gateway->sa_family == AF_LINK); + if (ro.ro_rt != NULL) { if (need_proxy) - proxydl = *SDL(rt->rt_gateway); - RTFREE_LOCKED(rt); + proxydl = *SDL(ro.ro_rt->rt_gateway); + RTFREE(ro.ro_rt); } if (need_proxy) { /* From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 09:30:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3BE6A48; Mon, 1 Sep 2014 09:30:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72DFF1FE0; Mon, 1 Sep 2014 09:30:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s819UZ10017837; Mon, 1 Sep 2014 09:30:35 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s819UZ9d017831; Mon, 1 Sep 2014 09:30:35 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409010930.s819UZ9d017831@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Mon, 1 Sep 2014 09:30:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270927 - in head: sys/netinet6 usr.bin/netstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 09:30:35 -0000 Author: ae Date: Mon Sep 1 09:30:34 2014 New Revision: 270927 URL: http://svnweb.freebsd.org/changeset/base/270927 Log: Add the reverse part to rule #9. Also change its description in the netstat(8) output. MFC after: 1 week Modified: head/sys/netinet6/in6_src.c head/usr.bin/netstat/inet6.c Modified: head/sys/netinet6/in6_src.c ============================================================================== --- head/sys/netinet6/in6_src.c Mon Sep 1 09:00:00 2014 (r270926) +++ head/sys/netinet6/in6_src.c Mon Sep 1 09:30:34 2014 (r270927) @@ -448,6 +448,8 @@ in6_selectsrc(struct sockaddr_in6 *dstso */ if (ifa_preferred(&ia_best->ia_ifa, &ia->ia_ifa)) REPLACE(9); + if (ifa_preferred(&ia->ia_ifa, &ia_best->ia_ifa)) + NEXT(9); /* * Rule 14: Use longest matching prefix. Modified: head/usr.bin/netstat/inet6.c ============================================================================== --- head/usr.bin/netstat/inet6.c Mon Sep 1 09:00:00 2014 (r270926) +++ head/usr.bin/netstat/inet6.c Mon Sep 1 09:30:34 2014 (r270927) @@ -345,7 +345,7 @@ static const char *srcrule_str[] = { "matching label", "public/temporary address", "alive interface", - "preferred interface", + "better virtual status", "rule #10", "rule #11", "rule #12", From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 13:00:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 144F27B3; Mon, 1 Sep 2014 13:00:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 004DC18A9; Mon, 1 Sep 2014 13:00:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81D0jmK019059; Mon, 1 Sep 2014 13:00:45 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81D0jnF019058; Mon, 1 Sep 2014 13:00:45 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409011300.s81D0jnF019058@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 1 Sep 2014 13:00:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270928 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 13:00:46 -0000 Author: glebius Date: Mon Sep 1 13:00:45 2014 New Revision: 270928 URL: http://svnweb.freebsd.org/changeset/base/270928 Log: Explicitly free packet on PF_DROP, otherwise a "quick" rule with "route-to" may still forward it. PR: 177808 Submitted by: Kajetan Staszkiewicz Sponsored by: InnoGames GmbH Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Mon Sep 1 09:30:34 2014 (r270927) +++ head/sys/netpfil/pf/pf.c Mon Sep 1 13:00:45 2014 (r270928) @@ -6000,6 +6000,10 @@ done: *m0 = NULL; action = PF_PASS; break; + case PF_DROP: + m_freem(*m0); + *m0 = NULL; + break; default: /* pf_route() returns unlocked. */ if (r->rt) { @@ -6376,6 +6380,10 @@ done: *m0 = NULL; action = PF_PASS; break; + case PF_DROP: + m_freem(*m0); + *m0 = NULL; + break; default: /* pf_route6() returns unlocked. */ if (r->rt) { From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 14:04:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70F9F9AC; Mon, 1 Sep 2014 14:04:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E46C1F5C; Mon, 1 Sep 2014 14:04:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81E4qDQ051142; Mon, 1 Sep 2014 14:04:52 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81E4pJg051138; Mon, 1 Sep 2014 14:04:51 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409011404.s81E4pJg051138@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 1 Sep 2014 14:04:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270929 - in head: share/man/man4 sys/netinet sys/sys usr.sbin/traceroute X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 14:04:52 -0000 Author: glebius Date: Mon Sep 1 14:04:51 2014 New Revision: 270929 URL: http://svnweb.freebsd.org/changeset/base/270929 Log: Make SOCK_RAW sockets to be truly raw, not modifying received and sent packets at all. Swapping byte order on SOCK_RAW was actually a bug, an artifact from the BSD network stack, that used to convert a packet to native byte order once it is received by kernel. Other operating systems didn't follow this, and later other BSD descendants fixed this, leaving us alone with the bug. Now it is clear that we should fix the bug. In collaboration with: Olivier Cochard-Labbé See also: https://wiki.freebsd.org/SOCK_RAW Sponsored by: Nginx, Inc. Modified: head/share/man/man4/ip.4 head/sys/netinet/raw_ip.c head/sys/sys/param.h head/usr.sbin/traceroute/Makefile Modified: head/share/man/man4/ip.4 ============================================================================== --- head/share/man/man4/ip.4 Mon Sep 1 13:00:45 2014 (r270928) +++ head/share/man/man4/ip.4 Mon Sep 1 14:04:51 2014 (r270929) @@ -28,7 +28,7 @@ .\" @(#)ip.4 8.2 (Berkeley) 11/30/93 .\" $FreeBSD$ .\" -.Dd October 12, 2012 +.Dd September 1, 2014 .Dt IP 4 .Os .Sh NAME @@ -755,13 +755,11 @@ number the socket is created with), unless the .Dv IP_HDRINCL option has been set. -Incoming packets are received with +Unlike in previous +.Bx +releases, incoming packets are received with .Tn IP -header and options intact, except for -.Va ip_len -and -.Va ip_off -fields converted to host byte order. +header and options intact, leaving all fields in network byte order. .Pp .Dv IP_HDRINCL indicates the complete IP header is included with the data @@ -784,17 +782,16 @@ the fields of the IP header, including t ip->ip_v = IPVERSION; ip->ip_hl = hlen >> 2; ip->ip_id = 0; /* 0 means kernel set appropriate value */ -ip->ip_off = offset; +ip->ip_off = htons(offset); +ip->ip_len = htons(len); .Ed .Pp -The +The packet should be provided as is to be sent over wire. +This implies all fields, including .Va ip_len and .Va ip_off -fields -.Em must -be provided in host byte order. -All other fields must be provided in network byte order. +to be in network byte order. See .Xr byteorder 3 for more information on network byte order. @@ -891,3 +888,16 @@ packets received on raw IP sockets had t subtracted from the .Va ip_len field. +.Pp +Before +.Fx 11.0 +packets received on raw IP sockets had the +.Va ip_len +and +.Va ip_off +fields converted to host byte order. +Packets written to raw IP sockets were expected to have +.Va ip_len +and +.Va ip_off +in host byte order. Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Mon Sep 1 13:00:45 2014 (r270928) +++ head/sys/netinet/raw_ip.c Mon Sep 1 14:04:51 2014 (r270929) @@ -290,11 +290,6 @@ rip_input(struct mbuf **mp, int *offp, i last = NULL; ifp = m->m_pkthdr.rcvif; - /* - * Applications on raw sockets expect host byte order. - */ - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); hash = INP_PCBHASH_RAW(proto, ip->ip_src.s_addr, ip->ip_dst.s_addr, V_ripcbinfo.ipi_hashmask); @@ -504,8 +499,8 @@ rip_output(struct mbuf *m, struct socket * and don't allow packet length sizes that will crash. */ if (((ip->ip_hl != (sizeof (*ip) >> 2)) && inp->inp_options) - || (ip->ip_len > m->m_pkthdr.len) - || (ip->ip_len < (ip->ip_hl << 2))) { + || (ntohs(ip->ip_len) > m->m_pkthdr.len) + || (ntohs(ip->ip_len) < (ip->ip_hl << 2))) { INP_RUNLOCK(inp); m_freem(m); return (EINVAL); @@ -514,13 +509,6 @@ rip_output(struct mbuf *m, struct socket ip->ip_id = ip_newid(); /* - * Applications on raw sockets pass us packets - * in host byte order. - */ - ip->ip_len = htons(ip->ip_len); - ip->ip_off = htons(ip->ip_off); - - /* * XXX prevent ip_output from overwriting header fields. */ flags |= IP_RAWOUTPUT; Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon Sep 1 13:00:45 2014 (r270928) +++ head/sys/sys/param.h Mon Sep 1 14:04:51 2014 (r270929) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100029 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100030 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: head/usr.sbin/traceroute/Makefile ============================================================================== --- head/usr.sbin/traceroute/Makefile Mon Sep 1 13:00:45 2014 (r270928) +++ head/usr.sbin/traceroute/Makefile Mon Sep 1 14:04:51 2014 (r270929) @@ -13,7 +13,7 @@ CLEANFILES= version.c CFLAGS+= -DHAVE_SYS_SELECT_H=1 -DHAVE_SYS_SOCKIO_H=1 \ -DHAVE_NET_ROUTE_H=1 -DHAVE_NET_IF_DL_H=1 \ -DHAVE_STRERROR=1 -DHAVE_USLEEP=1 \ - -DHAVE_SYS_SYSCTL_H=1 \ + -DHAVE_SYS_SYSCTL_H=1 -DBYTESWAP_IP_HDR=1 \ -DHAVE_SETLINEBUF=1 -DHAVE_RAW_OPTIONS=1 \ -DHAVE_SOCKADDR_SA_LEN=1 -DHAVE_ICMP_NEXTMTU=1 .if !defined(TRACEROUTE_NO_IPSEC) From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 14:57:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0E5D575; Mon, 1 Sep 2014 14:57:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CDD01584; Mon, 1 Sep 2014 14:57:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81Ev4rB075487; Mon, 1 Sep 2014 14:57:04 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81Ev483075486; Mon, 1 Sep 2014 14:57:04 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409011457.s81Ev483075486@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 1 Sep 2014 14:57:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270930 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 14:57:04 -0000 Author: ian Date: Mon Sep 1 14:57:04 2014 New Revision: 270930 URL: http://svnweb.freebsd.org/changeset/base/270930 Log: Do not generate unwind info in asm functions if _STANDALONE is defined. The .fnend op causes the assembler to emit RELOC references to unwind support functions that don't exist in libstand. Modified: head/sys/arm/include/asm.h Modified: head/sys/arm/include/asm.h ============================================================================== --- head/sys/arm/include/asm.h Mon Sep 1 14:04:51 2014 (r270929) +++ head/sys/arm/include/asm.h Mon Sep 1 14:57:04 2014 (r270930) @@ -53,7 +53,7 @@ # define _ALIGN_TEXT .align 0 #endif -#ifdef __ARM_EABI__ +#if defined(__ARM_EABI__) && !defined(_STANDALONE) #define STOP_UNWINDING .cantunwind #define _FNSTART .fnstart #define _FNEND .fnend From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 16:12:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A70E64E1; Mon, 1 Sep 2014 16:12:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92DC21EDA; Mon, 1 Sep 2014 16:12:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81GCTdZ014500; Mon, 1 Sep 2014 16:12:29 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81GCTll014499; Mon, 1 Sep 2014 16:12:29 GMT (envelope-from se@FreeBSD.org) Message-Id: <201409011612.s81GCTll014499@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Mon, 1 Sep 2014 16:12:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270931 - head/usr.sbin/smbmsg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 16:12:29 -0000 Author: se Date: Mon Sep 1 16:12:29 2014 New Revision: 270931 URL: http://svnweb.freebsd.org/changeset/base/270931 Log: Fix typo (by -> be). MFC after: 3 days Modified: head/usr.sbin/smbmsg/smbmsg.8 Modified: head/usr.sbin/smbmsg/smbmsg.8 ============================================================================== --- head/usr.sbin/smbmsg/smbmsg.8 Mon Sep 1 14:57:04 2014 (r270930) +++ head/usr.sbin/smbmsg/smbmsg.8 Mon Sep 1 16:12:29 2014 (r270931) @@ -59,7 +59,7 @@ The first form shown in the synopsis can the devices on the SMBus. This is done by sending each valid device address one receive byte, and one quick read message, respectively. -Devices that respond to these requests will by displayed +Devices that respond to these requests will be displayed by their device address, followed by the strings .Ql r , .Ql w , From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 16:24:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25B41947; Mon, 1 Sep 2014 16:24:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB8F31FBE; Mon, 1 Sep 2014 16:24:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81GOPRt019856; Mon, 1 Sep 2014 16:24:25 GMT (envelope-from kargl@FreeBSD.org) Received: (from kargl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81GOPdM019854; Mon, 1 Sep 2014 16:24:25 GMT (envelope-from kargl@FreeBSD.org) Message-Id: <201409011624.s81GOPdM019854@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kargl set sender to kargl@FreeBSD.org using -f From: Steve Kargl Date: Mon, 1 Sep 2014 16:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270932 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 16:24:26 -0000 Author: kargl Date: Mon Sep 1 16:24:25 2014 New Revision: 270932 URL: http://svnweb.freebsd.org/changeset/base/270932 Log: Fix a tab that somehow became 8 spaces. Remove parentheses in a return statement to be consistent with the rest of the file. Rename sin_pi() in the float version to sin_pif(). Remove large comment that precedes sin_pif(). The comment duplicates a comment in e_lgamma_r.c where the algorithm is documented. Requested by: bde Modified: head/lib/msun/src/e_lgamma_r.c head/lib/msun/src/e_lgammaf_r.c Modified: head/lib/msun/src/e_lgamma_r.c ============================================================================== --- head/lib/msun/src/e_lgamma_r.c Mon Sep 1 16:12:29 2014 (r270931) +++ head/lib/msun/src/e_lgamma_r.c Mon Sep 1 16:24:25 2014 (r270932) @@ -171,9 +171,9 @@ sin_pi(double x) y = -x; vz = y+0x1p52; /* depend on 0 <= y < 0x1p52 */ - z = vz-0x1p52; /* rint(y) for the above range */ + z = vz-0x1p52; /* rint(y) for the above range */ if (z == y) - return (zero); + return zero; vz = y+0x1p50; GET_LOW_WORD(n,vz); /* bits for rounded y (units 0.25) */ Modified: head/lib/msun/src/e_lgammaf_r.c ============================================================================== --- head/lib/msun/src/e_lgammaf_r.c Mon Sep 1 16:12:29 2014 (r270931) +++ head/lib/msun/src/e_lgammaf_r.c Mon Sep 1 16:24:25 2014 (r270932) @@ -89,13 +89,8 @@ w6 = -1.6309292987e-03; /* 0xbad5c4e8 * static const float zero= 0.0000000000e+00; -/* - * Compute sin(pi*x) without actually doing the pi*x multiplication. - * sin_pi(x) is only called for x < 0 and |x| < 2**(p-1) where p is - * the precision of x. - */ static float -sin_pi(float x) +sin_pif(float x) { volatile float vz; float y,z; @@ -106,7 +101,7 @@ sin_pi(float x) vz = y+0x1p23F; /* depend on 0 <= y < 0x1p23 */ z = vz-0x1p23F; /* rintf(y) for the above range */ if (z == y) - return (zero); + return zero; vz = y+0x1p21F; GET_FLOAT_WORD(n,vz); /* bits for rounded y (units 0.25) */ @@ -155,7 +150,7 @@ __ieee754_lgammaf_r(float x, int *signga if(hx<0) { if(ix>=0x4b000000) /* |x|>=2**23, must be -integer */ return one/zero; - t = sin_pi(x); + t = sin_pif(x); if(t==zero) return one/zero; /* -integer */ nadj = __ieee754_logf(pi/fabsf(t*x)); if(t Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5DDFBA86; Mon, 1 Sep 2014 16:25:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 490E91FC3; Mon, 1 Sep 2014 16:25:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81GP9BV020031; Mon, 1 Sep 2014 16:25:09 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81GP8gt020029; Mon, 1 Sep 2014 16:25:08 GMT (envelope-from se@FreeBSD.org) Message-Id: <201409011625.s81GP8gt020029@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Mon, 1 Sep 2014 16:25:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270933 - in head: sbin/conscontrol usr.sbin/vidcontrol X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 16:25:09 -0000 Author: se Date: Mon Sep 1 16:25:08 2014 New Revision: 270933 URL: http://svnweb.freebsd.org/changeset/base/270933 Log: Add references to vt(4) to further man-pages. MFC after: 3 days Modified: head/sbin/conscontrol/conscontrol.8 head/usr.sbin/vidcontrol/vidcontrol.1 Modified: head/sbin/conscontrol/conscontrol.8 ============================================================================== --- head/sbin/conscontrol/conscontrol.8 Mon Sep 1 16:24:25 2014 (r270932) +++ head/sbin/conscontrol/conscontrol.8 Mon Sep 1 16:25:08 2014 (r270933) @@ -104,6 +104,7 @@ This is an interface to the tty ioctl .Xr sio 4 , .Xr syscons 4 , .Xr tty 4 , +.Xr vt 4 , .Xr boot 8 , .Xr loader 8 .Sh HISTORY Modified: head/usr.sbin/vidcontrol/vidcontrol.1 ============================================================================== --- head/usr.sbin/vidcontrol/vidcontrol.1 Mon Sep 1 16:24:25 2014 (r270932) +++ head/usr.sbin/vidcontrol/vidcontrol.1 Mon Sep 1 16:25:08 2014 (r270933) @@ -1,5 +1,5 @@ .\" -.\" vidcontrol - a utility for manipulating the syscons video driver +.\" vidcontrol - a utility for manipulating the syscons or vt video driver .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -48,9 +48,15 @@ The .Nm utility is used to set various options for the .Xr syscons 4 +or +.Xr vt 4 console driver, such as video mode, colors, cursor shape, screen output map, font and screen saver timeout. +Only a small subset of options is supported by +.Xr vt 4 . +Unsupported options lead to error messages, typically including +the text "Inappropriate ioctl for device". .Pp The following command line options are supported: .Bl -tag -width indent @@ -158,8 +164,11 @@ See also .Sx Video Mode Support and .Sx EXAMPLES -below and the man page for -.Xr syscons 4 . +below and the man page for either +.Xr syscons 4 +or +.Xr vt 4 +(depending on which driver you use). .It Fl g Ar geometry Set the .Ar geometry @@ -185,7 +194,10 @@ Shows the possible video modes with the Install screen output map file from .Ar screen_map . See also -.Xr syscons 4 . +.Xr syscons 4 +or +.Xr vt 4 +(depending on which driver you use). .It Fl L Install default screen output map. .It Fl M Ar char @@ -307,12 +319,18 @@ kernel with the option. See .Xr syscons 4 +or +.Xr vt 4 +(depending on which driver you use) for more details on this kernel option. .Ss Format of Video Buffer Dump The .Nm utility uses the .Xr syscons 4 +.\" is it supported on vt(4)??? +or +.Xr vt 4 .Dv CONS_SCRSHOT .Xr ioctl 2 to capture the current contents of the video buffer. @@ -453,9 +471,12 @@ for details. .Sh FILES .Bl -tag -width /usr/share/syscons/scrnmaps/foo-bar -compact .It Pa /usr/share/syscons/fonts/* +.It Pa /usr/share/vt/fonts/* font files. .It Pa /usr/share/syscons/scrnmaps/* -screen output map files. +screen output map files (relevant for +.Xr syscons 4 +only). .El .Sh EXAMPLES If you want to load @@ -467,7 +488,10 @@ as: .Dl vidcontrol -f 8x16 /usr/share/syscons/fonts/iso-8x16.fnt .Pp So long as the font file is in -.Pa /usr/share/syscons/fonts , +.Pa /usr/share/syscons/fonts +(if using syscons) or +.Pa /usr/share/vt/fonts +(if using vt), you may abbreviate the file name as .Pa iso-8x16 : .Pp @@ -521,6 +545,7 @@ to the standard output in the human read .Xr screen 4 , .Xr syscons 4 , .Xr vga 4 , +.Xr vt 4 , .Xr rc.conf 5 , .Xr kldload 8 , .Xr moused 8 , From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 16:26:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60144CBF; Mon, 1 Sep 2014 16:26:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 320E81FDF; Mon, 1 Sep 2014 16:26:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81GQwuJ020310; Mon, 1 Sep 2014 16:26:58 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81GQvmP020308; Mon, 1 Sep 2014 16:26:57 GMT (envelope-from se@FreeBSD.org) Message-Id: <201409011626.s81GQvmP020308@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Mon, 1 Sep 2014 16:26:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270934 - head/tools/tools/vt/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 16:26:58 -0000 Author: se Date: Mon Sep 1 16:26:57 2014 New Revision: 270934 URL: http://svnweb.freebsd.org/changeset/base/270934 Log: Final patches to the tools used to convert syscons keymaps for use with vt. MFC after: 3 days Modified: head/tools/tools/vt/keymaps/KBDFILES.map head/tools/tools/vt/keymaps/convert-keymap.pl Modified: head/tools/tools/vt/keymaps/KBDFILES.map ============================================================================== --- head/tools/tools/vt/keymaps/KBDFILES.map Mon Sep 1 16:25:08 2014 (r270933) +++ head/tools/tools/vt/keymaps/KBDFILES.map Mon Sep 1 16:26:57 2014 (r270934) @@ -144,6 +144,6 @@ ISO8859-1 us.emacs.kbd us.emacs.kbd ISO8859-1 us.pc-ctrl.kbd us.ctrl.kbd ISO8859-1 us.unix.kbd us.unix.kbd -ISO8859-5 ua.iso5.kbd ua.kbd.from-iso5 +#ISO8859-5 ua.iso5.kbd ua.kbd.from-iso5 KOI8-U ua.koi8-u.kbd ua.kbd KOI8-U ua.koi8-u.shift.alt.kbd ua.shift.alt.kbd Modified: head/tools/tools/vt/keymaps/convert-keymap.pl ============================================================================== --- head/tools/tools/vt/keymaps/convert-keymap.pl Mon Sep 1 16:25:08 2014 (r270933) +++ head/tools/tools/vt/keymaps/convert-keymap.pl Mon Sep 1 16:26:57 2014 (r270934) @@ -7,7 +7,7 @@ use strict; use utf8; # command line parsing -die "Usage: $0 filename.kbd CHARSET [EURO]" +die "Usage: $0 filename.kbd charset [EURO|YEN]\n" unless ($ARGV[1]); my $inputfile = shift; # first command argument @@ -60,8 +60,8 @@ sub local_to_UCS_code $ucs_char = 0xa5 # replace with Jap. Yen character on PC kbd if $ucs_char == ord('\\') and $use_yen and $current_scancode == 125; - $ucs_char = 0xa5 # replace with Jap. Yen character on PC98x1 kbd - if $ucs_char == ord('\\') and $use_yen and $current_scancode == 13; +# $ucs_char = 0xa5 # replace with Jap. Yen character on PC98x1 kbd +# if $ucs_char == ord('\\') and $use_yen and $current_scancode == 13; return prettyprint_token($ucs_char); } From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 16:51:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A10F2BF; Mon, 1 Sep 2014 16:51:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE1461311; Mon, 1 Sep 2014 16:51:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81GpvRJ034721; Mon, 1 Sep 2014 16:51:57 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81GpvcB034720; Mon, 1 Sep 2014 16:51:57 GMT (envelope-from se@FreeBSD.org) Message-Id: <201409011651.s81GpvcB034720@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Mon, 1 Sep 2014 16:51:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270935 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 16:51:58 -0000 Author: se Date: Mon Sep 1 16:51:57 2014 New Revision: 270935 URL: http://svnweb.freebsd.org/changeset/base/270935 Log: Add vt(4) support to the console initialisation script, specifically: - Identify the console driver used and print syscons or vt as appropriate. - If vt is used and a keymap could not be loaded, then try to replace the keymap name configured in rc.conf based on a replacement list in this script. Warn about the fact, that a syscons keyname is configured and report the replacement used under vt. - If no replacement keymap is found, no keymap is loaded and a warning is displayed, which points at the conversion script and allows the conversion of keymaps not part of the official distribution. This patch has been sent to the -hackers list for review, but no comment has been received, yet. It is tested to work under syscons and vt on my system (on vt with either the syscons or vt keymap file name in rc.conf). MFC after: 3 days Modified: head/etc/rc.d/syscons Modified: head/etc/rc.d/syscons ============================================================================== --- head/etc/rc.d/syscons Mon Sep 1 16:26:57 2014 (r270934) +++ head/etc/rc.d/syscons Mon Sep 1 16:51:57 2014 (r270935) @@ -45,16 +45,122 @@ stop_cmd=":" kbddev=/dev/ttyv0 viddev=/dev/ttyv0 -_sc_config="syscons" +_sc_config= +_sc_console= _sc_initdone= +_sc_keymap_msg= sc_init() { if [ -z "${_sc_initdone}" ]; then + if [ -z "${_sc_console}" ]; then + if [ x`sysctl -n kern.vty` = x"vt" ]; then + _sc_console="vt" + else + _sc_console="syscons" + fi + _sc_config="${_sc_console}" + fi echo -n "Configuring ${_sc_config}:" _sc_initdone=yes fi } +# syscons to vt migration helper +lookup_keymap_for_vt() +{ + keymap=`basename $1 .kbd` + case $keymap in +hy.armscii-8) echo am;; +be.iso.acc) echo be.acc;; +be.iso) echo be;; +bg.bds.ctrlcaps) echo bg.bds;; +bg.phonetic.ctrlcaps) echo bg.phonetic;; +br275.iso.acc) echo br;; +br275.*) echo br.noacc;; +by.*) echo by;; +fr_CA.iso.acc) echo ca-fr;; +swissgerman.macbook.acc) echo ch.macbook.acc;; +swissgerman.iso.acc) echo ch.acc;; +swissgerman.*) echo ch;; +swissfrench.iso.acc) echo ch-fr.acc;; +swissfrench.*) echo ch-fr;; +ce.iso2) echo centraleuropean.qwerty;; +colemak.iso15.acc) echo colemak.acc;; +cs.*|cz.*) echo cz;; +german.iso.acc) echo de.acc;; +german.*) echo de;; +danish.iso.acc) echo dk.acc;; +danish.iso.macbook) echo dk.macbook;; +danish.*) echo dk;; +estonian.*) echo ee;; +spanish.dvorak) echo es.dvorak;; +spanish.iso*.acc) echo es.acc;; +spanish.iso) echo es;; +finnish.*) echo fi;; +fr.macbook.acc) echo fr.macbook;; +fr.iso.acc) echo fr.acc;; +fr.iso) echo fr;; +el.iso07) echo gr;; +gr.us101.acc) echo gr.101.acc;; +hr.iso) echo hr;; +hu.iso2.101keys) echo hu.101;; +hu.iso2.102keys) echo hu.102;; +iw.iso8) echo il;; +icelandic.iso.acc) echo is.acc;; +icelandic.iso) echo is;; +it.iso) echo it;; +jp.106x) echo jp.capsctrl;; +jp.106) echo jp;; +#?? jp.pc98.iso) echo jp.pc98;; +kk.pt154.io) echo kz.io;; +kk.pt154.kst) echo kz.kst;; +latinamerican.iso.acc) echo latinamerican.acc;; +lt.iso4) echo lt;; +norwegian.iso) echo no;; +norwegian.dvorak) echo no.dvorak;; +dutch.iso.acc) echo nl;; +eee_nordic) echo nordic.asus-eee;; +pl_PL.dvorak) echo pl.dvorak;; +pl_PL.ISO8859-2) echo pl;; +pt.iso.acc) echo pt.acc;; +pt.iso) echo pt;; +ru.koi8-r.shift) echo ru.shift;; +ru.koi8-r.win) echo ru.win;; +ru.*) echo ru;; +swedish.*) echo se;; +si.iso) echo si;; +sk.iso2) echo sk;; +tr.iso9.q) echo tr;; +ua.koi8-u.shift.alt) echo ua.shift.alt;; +ua.*) echo ua;; +uk.*-ctrl) echo uk.capsctrl;; +uk.dvorak) echo uk.dvorak;; +uk.*) echo uk;; +us.iso.acc) echo us.acc;; +us.pc-ctrl) echo us.ctrl;; +us.iso) echo us;; + esac +} + +kbdcontrol_load_keymap() +{ + errmsg=`kbdcontrol < ${kbddev} -l ${keymap} 2>&1` + if [ -n "${errmsg}" -a "${_sc_console}" = "vt" ]; then + _sc_keymap_msg="${errmsg}" + keymap_vt=`lookup_keymap_for_vt ${keymap}` + if [ -n "${keymap_vt}" ]; then + errmsg=`kbdcontrol < ${kbddev} -l ${keymap_vt} 2>&1` + if [ -z "${errmsg}" ]; then + _sc_keymap_msg="New keymap: In /etc/rc.conf replace 'keymap=${keymap}' by 'keymap=${keymap_vt}'" + fi + else + _sc_keymap_msg="No replacement found for keymap '${keymap}'. +You may try to convert your keymap file using 'convert-keymap.pl', which is +part of the system sources and located in /usr/src/tools/tools/vt/keymaps/" + fi + fi +} + # helper syscons_configure_keyboard() { @@ -65,7 +171,7 @@ syscons_configure_keyboard() ;; *) sc_init - echo -n ' keymap'; kbdcontrol < ${kbddev} -l ${keymap} + echo -n ' keymap'; kbdcontrol_load_keymap ;; esac @@ -139,10 +245,9 @@ syscons_setkeyboard() # if [ -n "${_sc_initdone}" ]; then echo '.' - _sc_config="syscons" + _sc_config="${_sc_console}" _sc_initdone= fi - } syscons_precmd() @@ -256,6 +361,12 @@ syscons_start() fi [ -n "${_sc_initdone}" ] && echo '.' + if [ -n "${_sc_keymap_msg}" ]; then + echo + echo "WARNING:" + echo "${_sc_keymap_msg}." + echo + fi } load_rc_config $name From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 18:27:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D196B28B; Mon, 1 Sep 2014 18:27:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB31B1EF1; Mon, 1 Sep 2014 18:27:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81IR4a8081938; Mon, 1 Sep 2014 18:27:04 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81IR4iD081937; Mon, 1 Sep 2014 18:27:04 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201409011827.s81IR4iD081937@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Mon, 1 Sep 2014 18:27:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270941 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 18:27:05 -0000 Author: ed Date: Mon Sep 1 18:27:04 2014 New Revision: 270941 URL: http://svnweb.freebsd.org/changeset/base/270941 Log: Add lock annotations to . Clang has support for annotating mutexes and code that uses mutexes to validate certain aspects of thread safety: - Whether acquiring/releasing locks is done properly (e.g., whether you unlock a mutex before leaving a function). - Whether a lock is held while reading/writing data from/to memory. Analysis is performed at the function level. Functions can be annotated to indicate they: - (try to) pick up a lock, - release a lock, - can only be called when (not) holding a lock, - assert that a lock is held. Variables and structure members can be annotated to indicate that they are guarded by a certain lock. In C++, these annotations can refer to both global variables, but also other class/structure members. In C, it is only possible to refer to global variables. This change adds wrappers for the annotations used by Clang to . They currently have no effect, but this is on purpose. This change will be merged back to FreeBSD 9 and 10, which means we can safely experiment with these annotations on HEAD without making it harder to port changes back. Reviewed by: announced on arch@ and toolchain@ MFC after: 3 weeks Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Mon Sep 1 18:25:49 2014 (r270940) +++ head/sys/sys/cdefs.h Mon Sep 1 18:27:04 2014 (r270941) @@ -739,4 +739,60 @@ #define __NO_TLS 1 #endif +/* + * Lock annotations. + * + * Clang provides support for doing basic thread-safety tests at + * compile-time, by marking which locks will/should be held when + * entering/leaving a functions. + * + * Furthermore, it is also possible to annotate variables and structure + * members to enforce that they are only accessed when certain locks are + * held. + * + * Note: These annotations have no effect on this version of FreeBSD. + * They are merely provided for forward compatibilty. + */ + +#define __lock_annotate(x) + +/* Structure implements a lock. */ +#define __lockable __lock_annotate(lockable) + +/* Function acquires an exclusive or shared lock. */ +#define __locks_exclusive(...) \ + __lock_annotate(exclusive_lock_function(__VA_ARGS__)) +#define __locks_shared(...) \ + __lock_annotate(shared_lock_function(__VA_ARGS__)) + +/* Function attempts to acquire an exclusive or shared lock. */ +#define __trylocks_exclusive(...) \ + __lock_annotate(exclusive_trylock_function(__VA_ARGS__)) +#define __trylocks_shared(...) \ + __lock_annotate(shared_trylock_function(__VA_ARGS__)) + +/* Function releases a lock. */ +#define __unlocks(...) __lock_annotate(unlock_function(__VA_ARGS__)) + +/* Function asserts that an exclusive or shared lock is held. */ +#define __asserts_exclusive(...) \ + __lock_annotate(assert_exclusive_lock(__VA_ARGS__)) +#define __asserts_shared(...) \ + __lock_annotate(assert_shared_lock(__VA_ARGS__)) + +/* Function requires that an exclusive or shared lock is or is not held. */ +#define __requires_exclusive(...) \ + __lock_annotate(exclusive_locks_required(__VA_ARGS__)) +#define __requires_shared(...) \ + __lock_annotate(shared_locks_required(__VA_ARGS__)) +#define __requires_unlocked(...) \ + __lock_annotate(locks_excluded(__VA_ARGS__)) + +/* Function should not be analyzed. */ +#define __no_lock_analysis __lock_annotate(no_thread_safety_analysis) + +/* Guard variables and structure members by lock. */ +#define __guarded_by(x) __lock_annotate(guarded_by(x)) +#define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x)) + #endif /* !_SYS_CDEFS_H_ */ From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 18:28:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5976C45B; Mon, 1 Sep 2014 18:28:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 455201F0C; Mon, 1 Sep 2014 18:28:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81ISCLS082143; Mon, 1 Sep 2014 18:28:12 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81ISCF6082142; Mon, 1 Sep 2014 18:28:12 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201409011828.s81ISCF6082142@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Mon, 1 Sep 2014 18:28:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270942 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 18:28:12 -0000 Author: ed Date: Mon Sep 1 18:28:11 2014 New Revision: 270942 URL: http://svnweb.freebsd.org/changeset/base/270942 Log: Enable lock annotations on HEAD when using Clang. MFC after: never Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Mon Sep 1 18:27:04 2014 (r270941) +++ head/sys/sys/cdefs.h Mon Sep 1 18:28:11 2014 (r270942) @@ -749,12 +749,13 @@ * Furthermore, it is also possible to annotate variables and structure * members to enforce that they are only accessed when certain locks are * held. - * - * Note: These annotations have no effect on this version of FreeBSD. - * They are merely provided for forward compatibilty. */ +#ifdef __clang__ +#define __lock_annotate(x) __attribute__((x)) +#else #define __lock_annotate(x) +#endif /* Structure implements a lock. */ #define __lockable __lock_annotate(lockable) From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 18:34:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B68666A0; Mon, 1 Sep 2014 18:34:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A150B1FCE; Mon, 1 Sep 2014 18:34:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81IYVp0086398; Mon, 1 Sep 2014 18:34:31 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81IYVUO086394; Mon, 1 Sep 2014 18:34:31 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201409011834.s81IYVUO086394@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Mon, 1 Sep 2014 18:34:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270943 - in head: include lib/libstdthreads X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 18:34:31 -0000 Author: ed Date: Mon Sep 1 18:34:30 2014 New Revision: 270943 URL: http://svnweb.freebsd.org/changeset/base/270943 Log: Add lock annotations to the header files of our threading libraries. This change extends all of the functions present in the and headers to have lock annotations. This will allow Clang to warn about the following: - Locking a function twice, - Unlocking a function without a mutex being locked, - Forgetting to unlock a mutex before returning, - Destroying or reinitializing a mutex that is currenty locked, - Using an unlocked mutex in combination with a condition variable. Enabling these annotations already allowed me to catch a bug in one of our userspace tools (r270749). Modified: head/include/pthread.h head/lib/libstdthreads/threads.h Modified: head/include/pthread.h ============================================================================== --- head/include/pthread.h Mon Sep 1 18:28:11 2014 (r270942) +++ head/include/pthread.h Mon Sep 1 18:34:30 2014 (r270943) @@ -193,8 +193,10 @@ int pthread_cond_init(pthread_cond_t *, const pthread_condattr_t *); int pthread_cond_signal(pthread_cond_t *); int pthread_cond_timedwait(pthread_cond_t *, - pthread_mutex_t *, const struct timespec *); -int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *); + pthread_mutex_t *__mutex, const struct timespec *) + __requires_exclusive(*__mutex); +int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *__mutex) + __requires_exclusive(*__mutex); int pthread_create(pthread_t *, const pthread_attr_t *, void *(*) (void *), void *); int pthread_detach(pthread_t); @@ -213,27 +215,42 @@ int pthread_mutexattr_getpshared(const int pthread_mutexattr_gettype(pthread_mutexattr_t *, int *); int pthread_mutexattr_settype(pthread_mutexattr_t *, int); int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int); -int pthread_mutex_destroy(pthread_mutex_t *); -int pthread_mutex_init(pthread_mutex_t *, - const pthread_mutexattr_t *); -int pthread_mutex_lock(pthread_mutex_t *); -int pthread_mutex_trylock(pthread_mutex_t *); -int pthread_mutex_timedlock(pthread_mutex_t *, - const struct timespec *); -int pthread_mutex_unlock(pthread_mutex_t *); +int pthread_mutex_destroy(pthread_mutex_t *__mutex) + __requires_unlocked(*__mutex); +int pthread_mutex_init(pthread_mutex_t *__mutex, + const pthread_mutexattr_t *) + __requires_unlocked(*__mutex); +int pthread_mutex_lock(pthread_mutex_t *__mutex) + __locks_exclusive(*__mutex); +int pthread_mutex_trylock(pthread_mutex_t *__mutex) + __trylocks_exclusive(0, *__mutex); +int pthread_mutex_timedlock(pthread_mutex_t *__mutex, + const struct timespec *) + __trylocks_exclusive(0, *__mutex); +int pthread_mutex_unlock(pthread_mutex_t *__mutex) + __unlocks(*__mutex); int pthread_once(pthread_once_t *, void (*) (void)); -int pthread_rwlock_destroy(pthread_rwlock_t *); -int pthread_rwlock_init(pthread_rwlock_t *, - const pthread_rwlockattr_t *); -int pthread_rwlock_rdlock(pthread_rwlock_t *); -int pthread_rwlock_timedrdlock(pthread_rwlock_t *, - const struct timespec *); -int pthread_rwlock_timedwrlock(pthread_rwlock_t *, - const struct timespec *); -int pthread_rwlock_tryrdlock(pthread_rwlock_t *); -int pthread_rwlock_trywrlock(pthread_rwlock_t *); -int pthread_rwlock_unlock(pthread_rwlock_t *); -int pthread_rwlock_wrlock(pthread_rwlock_t *); +int pthread_rwlock_destroy(pthread_rwlock_t *__rwlock) + __requires_unlocked(*__rwlock); +int pthread_rwlock_init(pthread_rwlock_t *__rwlock, + const pthread_rwlockattr_t *) + __requires_unlocked(*__rwlock); +int pthread_rwlock_rdlock(pthread_rwlock_t *__rwlock) + __locks_shared(*__rwlock); +int pthread_rwlock_timedrdlock(pthread_rwlock_t *__rwlock, + const struct timespec *) + __trylocks_shared(0, *__rwlock); +int pthread_rwlock_timedwrlock(pthread_rwlock_t *__rwlock, + const struct timespec *) + __trylocks_exclusive(0, *__rwlock); +int pthread_rwlock_tryrdlock(pthread_rwlock_t *__rwlock) + __trylocks_shared(0, *__rwlock); +int pthread_rwlock_trywrlock(pthread_rwlock_t *__rwlock) + __trylocks_exclusive(0, *__rwlock); +int pthread_rwlock_unlock(pthread_rwlock_t *__rwlock) + __unlocks(*__rwlock); +int pthread_rwlock_wrlock(pthread_rwlock_t *__rwlock) + __locks_exclusive(*__rwlock); int pthread_rwlockattr_destroy(pthread_rwlockattr_t *); int pthread_rwlockattr_getkind_np(const pthread_rwlockattr_t *, int *); @@ -245,11 +262,16 @@ int pthread_rwlockattr_setpshared(pthre pthread_t pthread_self(void); int pthread_setspecific(pthread_key_t, const void *); -int pthread_spin_init(pthread_spinlock_t *, int); -int pthread_spin_destroy(pthread_spinlock_t *); -int pthread_spin_lock(pthread_spinlock_t *); -int pthread_spin_trylock(pthread_spinlock_t *); -int pthread_spin_unlock(pthread_spinlock_t *); +int pthread_spin_init(pthread_spinlock_t *__spin, int) + __requires_unlocked(*__spin); +int pthread_spin_destroy(pthread_spinlock_t *__spin) + __requires_unlocked(*__spin); +int pthread_spin_lock(pthread_spinlock_t *__spin) + __locks_exclusive(*__spin); +int pthread_spin_trylock(pthread_spinlock_t *__spin) + __trylocks_exclusive(0, *__spin); +int pthread_spin_unlock(pthread_spinlock_t *__spin) + __unlocks(*__spin); int pthread_cancel(pthread_t); int pthread_setcancelstate(int, int *); int pthread_setcanceltype(int, int *); Modified: head/lib/libstdthreads/threads.h ============================================================================== --- head/lib/libstdthreads/threads.h Mon Sep 1 18:28:11 2014 (r270942) +++ head/lib/libstdthreads/threads.h Mon Sep 1 18:34:30 2014 (r270943) @@ -79,15 +79,24 @@ int cnd_broadcast(cnd_t *); void cnd_destroy(cnd_t *); int cnd_init(cnd_t *); int cnd_signal(cnd_t *); -int cnd_timedwait(cnd_t *__restrict, mtx_t *__restrict, - const struct timespec *__restrict); -int cnd_wait(cnd_t *, mtx_t *); -void mtx_destroy(mtx_t *); -int mtx_init(mtx_t *, int); -int mtx_lock(mtx_t *); -int mtx_timedlock(mtx_t *__restrict, const struct timespec *__restrict); -int mtx_trylock(mtx_t *); -int mtx_unlock(mtx_t *); +int cnd_timedwait(cnd_t *__restrict, mtx_t *__restrict __mtx, + const struct timespec *__restrict) + __requires_exclusive(*__mtx); +int cnd_wait(cnd_t *, mtx_t *__mtx) + __requires_exclusive(*__mtx); +void mtx_destroy(mtx_t *__mtx) + __requires_unlocked(*__mtx); +int mtx_init(mtx_t *__mtx, int) + __requires_unlocked(*__mtx); +int mtx_lock(mtx_t *__mtx) + __locks_exclusive(*__mtx); +int mtx_timedlock(mtx_t *__restrict __mtx, + const struct timespec *__restrict) + __trylocks_exclusive(thrd_success, *__mtx); +int mtx_trylock(mtx_t *__mtx) + __trylocks_exclusive(thrd_success, *__mtx); +int mtx_unlock(mtx_t *__mtx) + __unlocks(*__mtx); int thrd_create(thrd_t *, thrd_start_t, void *); thrd_t thrd_current(void); int thrd_detach(thrd_t); From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 18:35:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC400996; Mon, 1 Sep 2014 18:35:44 +0000 (UTC) Received: from mail-la0-x229.google.com (mail-la0-x229.google.com [IPv6:2a00:1450:4010:c03::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F42F1FDC; Mon, 1 Sep 2014 18:35:43 +0000 (UTC) Received: by mail-la0-f41.google.com with SMTP id gi9so6586632lab.0 for ; Mon, 01 Sep 2014 11:35:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=1KoxknqTFB6BYh6PXANirlnsRPCFfehg1YSeRV/IxHk=; b=N5qnOB+HsOSR39AYaAZy+kBqv24WgHJ6X5NcLsw+t3ybKOPkhV+Sg9tgNqZ7UKbRIs cbTZbrCC27a7hYP/gut2meAzP8wD5CqUdp/HCHaOumBQrYTv46ZF5sqOLyMjAM/Hj7GF nMHbbS4f+m2Z3lDvlczMNNAs9d8OvczYaHGOG+cefLnOWIT+zaVYr3MEh1kE1UGO4HuY 9NFFhV1ZWoNHQekhlxNGhwlptZ/xKObFN2GURgiCEJmxhK/3V20OrnYXTt5TOKJpag5D aaoulnPPDYH87Df0b5dPdw9speCtGWKcsrLu9u7e5ml4F/CJaxoWoD51m0S4q/CYRtW5 doTQ== MIME-Version: 1.0 X-Received: by 10.112.202.69 with SMTP id kg5mr29003872lbc.33.1409596541666; Mon, 01 Sep 2014 11:35:41 -0700 (PDT) Sender: edschouten@gmail.com Received: by 10.152.144.2 with HTTP; Mon, 1 Sep 2014 11:35:41 -0700 (PDT) In-Reply-To: <201409011834.s81IYVUO086394@svn.freebsd.org> References: <201409011834.s81IYVUO086394@svn.freebsd.org> Date: Mon, 1 Sep 2014 20:35:41 +0200 X-Google-Sender-Auth: STzDBKdyQP_hW-QULPIJoqtv6k0 Message-ID: Subject: Re: svn commit: r270943 - in head: include lib/libstdthreads From: Ed Schouten To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 18:35:45 -0000 On 1 September 2014 20:34, Ed Schouten wrote: > - Locking a function twice, > - Unlocking a function without a mutex being locked, Errr... - Locking a mutex twice, - Unlocking a mutex without it being locked -- Ed Schouten From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 18:37:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 416B7AE8; Mon, 1 Sep 2014 18:37:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CE971FEE; Mon, 1 Sep 2014 18:37:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81IbIWT086836; Mon, 1 Sep 2014 18:37:18 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81IbHSc086834; Mon, 1 Sep 2014 18:37:17 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201409011837.s81IbHSc086834@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Mon, 1 Sep 2014 18:37:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270944 - head/sbin/hastd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 18:37:18 -0000 Author: ed Date: Mon Sep 1 18:37:17 2014 New Revision: 270944 URL: http://svnweb.freebsd.org/changeset/base/270944 Log: Add lock annotations to the threading API used by hastd. Approved by: pjd@ Modified: head/sbin/hastd/primary.c head/sbin/hastd/synch.h Modified: head/sbin/hastd/primary.c ============================================================================== --- head/sbin/hastd/primary.c Mon Sep 1 18:34:30 2014 (r270943) +++ head/sbin/hastd/primary.c Mon Sep 1 18:37:17 2014 (r270944) @@ -330,9 +330,8 @@ primary_exitx(int exitcode, const char * exit(exitcode); } -/* Expects res->hr_amp locked, returns unlocked. */ static int -hast_activemap_flush(struct hast_resource *res) +hast_activemap_flush(struct hast_resource *res) __unlocks(res->hr_amp_lock) { const unsigned char *buf; size_t size; Modified: head/sbin/hastd/synch.h ============================================================================== --- head/sbin/hastd/synch.h Mon Sep 1 18:34:30 2014 (r270943) +++ head/sbin/hastd/synch.h Mon Sep 1 18:37:17 2014 (r270944) @@ -46,7 +46,7 @@ #endif static __inline void -mtx_init(pthread_mutex_t *lock) +mtx_init(pthread_mutex_t *lock) __requires_unlocked(*lock) { int error; @@ -54,7 +54,7 @@ mtx_init(pthread_mutex_t *lock) PJDLOG_ASSERT(error == 0); } static __inline void -mtx_destroy(pthread_mutex_t *lock) +mtx_destroy(pthread_mutex_t *lock) __requires_unlocked(*lock) { int error; @@ -62,7 +62,7 @@ mtx_destroy(pthread_mutex_t *lock) PJDLOG_ASSERT(error == 0); } static __inline void -mtx_lock(pthread_mutex_t *lock) +mtx_lock(pthread_mutex_t *lock) __locks_exclusive(*lock) { int error; @@ -70,7 +70,7 @@ mtx_lock(pthread_mutex_t *lock) PJDLOG_ASSERT(error == 0); } static __inline bool -mtx_trylock(pthread_mutex_t *lock) +mtx_trylock(pthread_mutex_t *lock) __trylocks_exclusive(true, *lock) { int error; @@ -79,7 +79,7 @@ mtx_trylock(pthread_mutex_t *lock) return (error == 0); } static __inline void -mtx_unlock(pthread_mutex_t *lock) +mtx_unlock(pthread_mutex_t *lock) __unlocks(*lock) { int error; @@ -94,7 +94,7 @@ mtx_owned(pthread_mutex_t *lock) } static __inline void -rw_init(pthread_rwlock_t *lock) +rw_init(pthread_rwlock_t *lock) __requires_unlocked(*lock) { int error; @@ -102,7 +102,7 @@ rw_init(pthread_rwlock_t *lock) PJDLOG_ASSERT(error == 0); } static __inline void -rw_destroy(pthread_rwlock_t *lock) +rw_destroy(pthread_rwlock_t *lock) __requires_unlocked(*lock) { int error; @@ -110,7 +110,7 @@ rw_destroy(pthread_rwlock_t *lock) PJDLOG_ASSERT(error == 0); } static __inline void -rw_rlock(pthread_rwlock_t *lock) +rw_rlock(pthread_rwlock_t *lock) __locks_shared(*lock) { int error; @@ -118,7 +118,7 @@ rw_rlock(pthread_rwlock_t *lock) PJDLOG_ASSERT(error == 0); } static __inline void -rw_wlock(pthread_rwlock_t *lock) +rw_wlock(pthread_rwlock_t *lock) __locks_exclusive(*lock) { int error; @@ -126,7 +126,7 @@ rw_wlock(pthread_rwlock_t *lock) PJDLOG_ASSERT(error == 0); } static __inline void -rw_unlock(pthread_rwlock_t *lock) +rw_unlock(pthread_rwlock_t *lock) __unlocks(*lock) { int error; @@ -150,7 +150,7 @@ cv_init(pthread_cond_t *cv) PJDLOG_ASSERT(error == 0); } static __inline void -cv_wait(pthread_cond_t *cv, pthread_mutex_t *lock) +cv_wait(pthread_cond_t *cv, pthread_mutex_t *lock) __requires_exclusive(*lock) { int error; @@ -159,6 +159,7 @@ cv_wait(pthread_cond_t *cv, pthread_mute } static __inline bool cv_timedwait(pthread_cond_t *cv, pthread_mutex_t *lock, int timeout) + __requires_exclusive(*lock) { struct timespec ts; int error; From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 18:51:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0CF4DE4; Mon, 1 Sep 2014 18:51:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 996B51213; Mon, 1 Sep 2014 18:51:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81Ip5kY093048; Mon, 1 Sep 2014 18:51:05 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81Ip1oL093023; Mon, 1 Sep 2014 18:51:01 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409011851.s81Ip1oL093023@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 1 Sep 2014 18:51:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270945 - in head/sys: arm/arm arm/at91 arm/freescale/vybrid arm/mv arm/rockchip dev/fdt dev/gpio dev/ofw dev/tsec mips/beri powerpc/ofw powerpc/powermac X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 18:51:05 -0000 Author: ian Date: Mon Sep 1 18:51:01 2014 New Revision: 270945 URL: http://svnweb.freebsd.org/changeset/base/270945 Log: Rename OF_xref_phandle() to OF_node_from_xref() and add a new function that provides the inverse translation, OF_xref_from_node(). Discussed with: nwhitehorn Modified: head/sys/arm/arm/nexus.c head/sys/arm/at91/at91_pinctrl.c head/sys/arm/freescale/vybrid/vf_sai.c head/sys/arm/mv/gpio.c head/sys/arm/rockchip/rk30xx_gpio.c head/sys/dev/fdt/fdt_common.c head/sys/dev/fdt/simplebus.c head/sys/dev/gpio/ofw_gpiobus.c head/sys/dev/ofw/ofw_bus_subr.c head/sys/dev/ofw/ofw_fdt.c head/sys/dev/ofw/ofwbus.c head/sys/dev/ofw/openfirm.c head/sys/dev/ofw/openfirm.h head/sys/dev/tsec/if_tsec_fdt.c head/sys/mips/beri/beri_simplebus.c head/sys/powerpc/ofw/ofw_pcibus.c head/sys/powerpc/powermac/macio.c Modified: head/sys/arm/arm/nexus.c ============================================================================== --- head/sys/arm/arm/nexus.c Mon Sep 1 18:37:17 2014 (r270944) +++ head/sys/arm/arm/nexus.c Mon Sep 1 18:51:01 2014 (r270945) @@ -341,7 +341,7 @@ nexus_ofw_map_intr(device_t dev, device_ phandle_t intr_offset; int i, rv, interrupt, trig, pol; - intr_offset = OF_xref_phandle(iparent); + intr_offset = OF_node_from_xref(iparent); for (i = 0; i < icells; i++) intr[i] = cpu_to_fdt32(intr[i]); Modified: head/sys/arm/at91/at91_pinctrl.c ============================================================================== --- head/sys/arm/at91/at91_pinctrl.c Mon Sep 1 18:37:17 2014 (r270944) +++ head/sys/arm/at91/at91_pinctrl.c Mon Sep 1 18:51:01 2014 (r270945) @@ -136,7 +136,7 @@ at91_pinctrl_setup_dinfo(device_t dev, p "assuming direct parent\n"); iparent = OF_parent(node); } - if (OF_searchencprop(OF_xref_phandle(iparent), + if (OF_searchencprop(OF_node_from_xref(iparent), "#interrupt-cells", &icells, sizeof(icells)) == -1) { device_printf(dev, "Missing #interrupt-cells property, " "assuming <1>\n"); @@ -399,7 +399,7 @@ pinctrl_walk_tree(device_t bus, phandle_ len /= sizeof(phandle_t); printf("pinctrl: Found active node %s\n", name); for (i = 0; i < len; i++) { - scratch = OF_xref_phandle(pinctrl[i]); + scratch = OF_node_from_xref(pinctrl[i]); npins = OF_getencprop(scratch, "atmel,pins", pins, sizeof(pins)); if (npins <= 0) { printf("We're doing it wrong %s\n", name); Modified: head/sys/arm/freescale/vybrid/vf_sai.c ============================================================================== --- head/sys/arm/freescale/vybrid/vf_sai.c Mon Sep 1 18:37:17 2014 (r270944) +++ head/sys/arm/freescale/vybrid/vf_sai.c Mon Sep 1 18:51:01 2014 (r270945) @@ -430,7 +430,7 @@ find_edma_controller(struct sc_info *sc) OF_getprop(node, "edma-mux-group", &dts_value, len); edma_mux_group = fdt32_to_cpu(dts_value); OF_getprop(node, "edma-controller", &dts_value, len); - edma_node = OF_xref_phandle(fdt32_to_cpu(dts_value)); + edma_node = OF_node_from_xref(fdt32_to_cpu(dts_value)); if ((len = OF_getproplen(edma_node, "device-id")) <= 0) { return (ENXIO); Modified: head/sys/arm/mv/gpio.c ============================================================================== --- head/sys/arm/mv/gpio.c Mon Sep 1 18:37:17 2014 (r270944) +++ head/sys/arm/mv/gpio.c Mon Sep 1 18:51:01 2014 (r270945) @@ -642,7 +642,7 @@ mv_gpio_init(void) * contain a ref. to a node defining GPIO * controller. */ - ctrl = OF_xref_phandle(fdt32_to_cpu(gpios[0])); + ctrl = OF_node_from_xref(fdt32_to_cpu(gpios[0])); if (fdt_is_compatible(ctrl, e->compat)) /* Call a handler. */ Modified: head/sys/arm/rockchip/rk30xx_gpio.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_gpio.c Mon Sep 1 18:37:17 2014 (r270944) +++ head/sys/arm/rockchip/rk30xx_gpio.c Mon Sep 1 18:51:01 2014 (r270945) @@ -656,7 +656,7 @@ rk30_gpio_init(void) * contain a ref. to a node defining GPIO * controller. */ - ctrl = OF_xref_phandle(fdt32_to_cpu(gpios[0])); + ctrl = OF_node_from_xref(fdt32_to_cpu(gpios[0])); if (fdt_is_compatible(ctrl, e->compat)) /* Call a handler. */ Modified: head/sys/dev/fdt/fdt_common.c ============================================================================== --- head/sys/dev/fdt/fdt_common.c Mon Sep 1 18:37:17 2014 (r270944) +++ head/sys/dev/fdt/fdt_common.c Mon Sep 1 18:51:01 2014 (r270945) @@ -510,7 +510,7 @@ fdt_intr_to_rl(device_t dev, phandle_t n "assuming direct parent\n"); iparent = OF_parent(node); } - if (OF_searchencprop(OF_xref_phandle(iparent), + if (OF_searchencprop(OF_node_from_xref(iparent), "#interrupt-cells", &icells, sizeof(icells)) == -1) { device_printf(dev, "Missing #interrupt-cells property, " "assuming <1>\n"); @@ -545,7 +545,7 @@ fdt_get_phyaddr(phandle_t node, device_t sizeof(phy_handle)) <= 0) return (ENXIO); - phy_node = OF_xref_phandle(phy_handle); + phy_node = OF_node_from_xref(phy_handle); if (OF_getprop(phy_node, "reg", (void *)&phy_reg, sizeof(phy_reg)) <= 0) Modified: head/sys/dev/fdt/simplebus.c ============================================================================== --- head/sys/dev/fdt/simplebus.c Mon Sep 1 18:37:17 2014 (r270944) +++ head/sys/dev/fdt/simplebus.c Mon Sep 1 18:51:01 2014 (r270945) @@ -298,7 +298,7 @@ simplebus_setup_dinfo(device_t dev, phan "assuming direct parent\n"); iparent = OF_parent(node); } - if (OF_searchencprop(OF_xref_phandle(iparent), + if (OF_searchencprop(OF_node_from_xref(iparent), "#interrupt-cells", &icells, sizeof(icells)) == -1) { device_printf(dev, "Missing #interrupt-cells property, " "assuming <1>\n"); Modified: head/sys/dev/gpio/ofw_gpiobus.c ============================================================================== --- head/sys/dev/gpio/ofw_gpiobus.c Mon Sep 1 18:37:17 2014 (r270944) +++ head/sys/dev/gpio/ofw_gpiobus.c Mon Sep 1 18:51:01 2014 (r270945) @@ -129,7 +129,7 @@ ofw_gpiobus_parse_gpios(struct gpiobus_s i++; continue; } - gpio = OF_xref_phandle(gpios[i]); + gpio = OF_node_from_xref(gpios[i]); /* Verify if we're attaching to the correct GPIO controller. */ if (!OF_hasprop(gpio, "gpio-controller") || gpio != ofw_bus_get_node(sc->sc_dev)) { @@ -168,7 +168,7 @@ ofw_gpiobus_parse_gpios(struct gpiobus_s continue; } - gpio = OF_xref_phandle(gpios[i]); + gpio = OF_node_from_xref(gpios[i]); /* Read gpio-cells property for this GPIO controller. */ if (OF_getencprop(gpio, "#gpio-cells", &cells, sizeof(cells)) < 0) { Modified: head/sys/dev/ofw/ofw_bus_subr.c ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.c Mon Sep 1 18:37:17 2014 (r270944) +++ head/sys/dev/ofw/ofw_bus_subr.c Mon Sep 1 18:51:01 2014 (r270945) @@ -344,7 +344,7 @@ ofw_bus_search_intrmap(void *intr, int i i = imapsz; while (i > 0) { bcopy(mptr + physsz + intrsz, &parent, sizeof(parent)); - if (OF_searchencprop(OF_xref_phandle(parent), + if (OF_searchencprop(OF_node_from_xref(parent), "#interrupt-cells", &pintrsz, sizeof(pintrsz)) == -1) pintrsz = 1; /* default */ pintrsz *= sizeof(pcell_t); Modified: head/sys/dev/ofw/ofw_fdt.c ============================================================================== --- head/sys/dev/ofw/ofw_fdt.c Mon Sep 1 18:37:17 2014 (r270944) +++ head/sys/dev/ofw/ofw_fdt.c Mon Sep 1 18:51:01 2014 (r270945) @@ -208,7 +208,7 @@ ofw_fdt_instance_to_package(ofw_t ofw, i { /* Where real OF uses ihandles in the tree, FDT uses xref phandles */ - return (OF_xref_phandle(instance)); + return (OF_node_from_xref(instance)); } /* Get the length of a property of a package. */ Modified: head/sys/dev/ofw/ofwbus.c ============================================================================== --- head/sys/dev/ofw/ofwbus.c Mon Sep 1 18:37:17 2014 (r270944) +++ head/sys/dev/ofw/ofwbus.c Mon Sep 1 18:51:01 2014 (r270945) @@ -494,7 +494,7 @@ ofwbus_setup_dinfo(device_t dev, phandle "assuming nexus on <%s>\n", nodename); iparent = 0xffffffff; } - if (OF_searchencprop(OF_xref_phandle(iparent), + if (OF_searchencprop(OF_node_from_xref(iparent), "#interrupt-cells", &icells, sizeof(icells)) == -1) { device_printf(dev, "Missing #interrupt-cells property, " "assuming <1> on <%s>\n", nodename); Modified: head/sys/dev/ofw/openfirm.c ============================================================================== --- head/sys/dev/ofw/openfirm.c Mon Sep 1 18:37:17 2014 (r270944) +++ head/sys/dev/ofw/openfirm.c Mon Sep 1 18:51:01 2014 (r270945) @@ -463,7 +463,7 @@ OF_child_xref_phandle(phandle_t parent, } phandle_t -OF_xref_phandle(phandle_t xref) +OF_node_from_xref(phandle_t xref) { phandle_t node; @@ -474,6 +474,20 @@ OF_xref_phandle(phandle_t xref) return (node); } +phandle_t +OF_xref_from_node(phandle_t node) +{ + phandle_t xref; + + if (OF_getencprop(node, "phandle", &xref, sizeof(xref)) == + -1 && OF_getencprop(node, "ibm,phandle", &xref, + sizeof(xref)) == -1 && OF_getencprop(node, + "linux,phandle", &xref, sizeof(xref)) == -1) + return (node); + + return (xref); +} + /* Call the method in the scope of a given instance. */ int OF_call_method(const char *method, ihandle_t instance, int nargs, int nreturns, Modified: head/sys/dev/ofw/openfirm.h ============================================================================== --- head/sys/dev/ofw/openfirm.h Mon Sep 1 18:37:17 2014 (r270944) +++ head/sys/dev/ofw/openfirm.h Mon Sep 1 18:51:01 2014 (r270945) @@ -130,7 +130,8 @@ ssize_t OF_package_to_path(phandle_t no * real phandle. If one can't be found (or running on OF implementations * without this property), returns its input. */ -phandle_t OF_xref_phandle(phandle_t xref); +phandle_t OF_node_from_xref(phandle_t xref); +phandle_t OF_xref_from_node(phandle_t node); /* Device I/O functions */ ihandle_t OF_open(const char *path); Modified: head/sys/dev/tsec/if_tsec_fdt.c ============================================================================== --- head/sys/dev/tsec/if_tsec_fdt.c Mon Sep 1 18:37:17 2014 (r270944) +++ head/sys/dev/tsec/if_tsec_fdt.c Mon Sep 1 18:51:01 2014 (r270945) @@ -166,7 +166,7 @@ tsec_fdt_attach(device_t dev) return (ENXIO); } - phy = OF_xref_phandle(phy); + phy = OF_node_from_xref(phy); OF_decode_addr(OF_parent(phy), 0, &sc->phy_bst, &sc->phy_bsh); OF_getencprop(phy, "reg", &sc->phyaddr, sizeof(sc->phyaddr)); Modified: head/sys/mips/beri/beri_simplebus.c ============================================================================== --- head/sys/mips/beri/beri_simplebus.c Mon Sep 1 18:37:17 2014 (r270944) +++ head/sys/mips/beri/beri_simplebus.c Mon Sep 1 18:51:01 2014 (r270945) @@ -351,7 +351,7 @@ simplebus_get_interrupt_parent(device_t if (OF_getencprop(di->di_ofw.obd_node, "interrupt-parent", &iph, sizeof(iph)) > 0) { - ph = OF_xref_phandle(iph); + ph = OF_node_from_xref(iph); SLIST_FOREACH(ic, &fdt_ic_list_head, fdt_ics) { if (ic->iph == ph) { ip = ic->dev; Modified: head/sys/powerpc/ofw/ofw_pcibus.c ============================================================================== --- head/sys/powerpc/ofw/ofw_pcibus.c Mon Sep 1 18:37:17 2014 (r270944) +++ head/sys/powerpc/ofw/ofw_pcibus.c Mon Sep 1 18:51:01 2014 (r270945) @@ -212,7 +212,7 @@ ofw_pcibus_enum_devtree(device_t dev, u_ OF_getprop(child, "interrupt-parent", &iparent, sizeof(iparent)); if (iparent != 0) { - OF_getprop(OF_xref_phandle(iparent), + OF_getprop(OF_node_from_xref(iparent), "#interrupt-cells", &icells, sizeof(icells)); intr[0] = ofw_bus_map_intr(dev, iparent, @@ -329,7 +329,7 @@ ofw_pcibus_assign_interrupt(device_t dev iparent = -1; icells = 1; if (iparent != -1) - OF_getprop(OF_xref_phandle(iparent), "#interrupt-cells", + OF_getprop(OF_node_from_xref(iparent), "#interrupt-cells", &icells, sizeof(icells)); /* Modified: head/sys/powerpc/powermac/macio.c ============================================================================== --- head/sys/powerpc/powermac/macio.c Mon Sep 1 18:37:17 2014 (r270944) +++ head/sys/powerpc/powermac/macio.c Mon Sep 1 18:51:01 2014 (r270945) @@ -217,7 +217,7 @@ macio_add_intr(phandle_t devnode, struct <= 0) panic("Interrupt but no interrupt parent!\n"); - if (OF_getprop(OF_xref_phandle(iparent), "#interrupt-cells", &icells, + if (OF_getprop(OF_node_from_xref(iparent), "#interrupt-cells", &icells, sizeof(icells)) <= 0) icells = 1; From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 18:57:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 776641FD; Mon, 1 Sep 2014 18:57:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F62212FB; Mon, 1 Sep 2014 18:57:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81IvEjN096376; Mon, 1 Sep 2014 18:57:14 GMT (envelope-from kargl@FreeBSD.org) Received: (from kargl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81IvEmc096373; Mon, 1 Sep 2014 18:57:14 GMT (envelope-from kargl@FreeBSD.org) Message-Id: <201409011857.s81IvEmc096373@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kargl set sender to kargl@FreeBSD.org using -f From: Steve Kargl Date: Mon, 1 Sep 2014 18:57:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270947 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 18:57:14 -0000 Author: kargl Date: Mon Sep 1 18:57:13 2014 New Revision: 270947 URL: http://svnweb.freebsd.org/changeset/base/270947 Log: According to the ISO C standard, lgamma(-integer) returns inf and raises the divided-by-zero exception. Compilers constant fold one/zero to inf but do not raise the exception. Introduce a volatile vzero to prevent the constant folding. Move the declaration of zero into the main declaration block. While here, fix a nearby disordering of 'lx,ix' Discussed with: bde Modified: head/lib/msun/src/e_lgamma_r.c head/lib/msun/src/e_lgammaf_r.c Modified: head/lib/msun/src/e_lgamma_r.c ============================================================================== --- head/lib/msun/src/e_lgamma_r.c Mon Sep 1 18:56:22 2014 (r270946) +++ head/lib/msun/src/e_lgamma_r.c Mon Sep 1 18:57:13 2014 (r270947) @@ -86,7 +86,10 @@ __FBSDID("$FreeBSD$"); #include "math.h" #include "math_private.h" +static const volatile double vzero = 0; + static const double +zero= 0.00000000000000000000e+00, two52= 4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */ half= 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */ one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ @@ -154,8 +157,6 @@ w4 = -5.95187557450339963135e-04, /* 0x w5 = 8.36339918996282139126e-04, /* 0x3F4B67BA, 0x4CDAD5D1 */ w6 = -1.63092934096575273989e-03; /* 0xBF5AB89D, 0x0B9E43E4 */ -static const double zero= 0.00000000000000000000e+00; - /* * Compute sin(pi*x) without actually doing the pi*x multiplication. * sin_pi(x) is only called for x < 0 and |x| < 2**(p-1) where p is @@ -204,7 +205,7 @@ __ieee754_lgamma_r(double x, int *signga { double t,y,z,nadj,p,p1,p2,p3,q,r,w; int32_t hx; - int i,lx,ix; + int i,ix,lx; EXTRACT_WORDS(hx,lx,x); @@ -212,7 +213,7 @@ __ieee754_lgamma_r(double x, int *signga *signgamp = 1; ix = hx&0x7fffffff; if(ix>=0x7ff00000) return x*x; - if((ix|lx)==0) return one/zero; + if((ix|lx)==0) return one/vzero; if(ix<0x3b900000) { /* |x|<2**-70, return -log(|x|) */ if(hx<0) { *signgamp = -1; @@ -221,9 +222,9 @@ __ieee754_lgamma_r(double x, int *signga } if(hx<0) { if(ix>=0x43300000) /* |x|>=2**52, must be -integer */ - return one/zero; + return one/vzero; t = sin_pi(x); - if(t==zero) return one/zero; /* -integer */ + if(t==zero) return one/vzero; /* -integer */ nadj = __ieee754_log(pi/fabs(t*x)); if(t=0x7f800000) return x*x; - if(ix==0) return one/zero; + if(ix==0) return one/vzero; if(ix<0x35000000) { /* |x|<2**-21, return -log(|x|) */ if(hx<0) { *signgamp = -1; @@ -149,9 +150,9 @@ __ieee754_lgammaf_r(float x, int *signga } if(hx<0) { if(ix>=0x4b000000) /* |x|>=2**23, must be -integer */ - return one/zero; + return one/vzero; t = sin_pif(x); - if(t==zero) return one/zero; /* -integer */ + if(t==zero) return one/vzero; /* -integer */ nadj = __ieee754_logf(pi/fabsf(t*x)); if(t Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5762BF3B; Mon, 1 Sep 2014 19:20:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41EA815AC; Mon, 1 Sep 2014 19:20:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81JKZO6007759; Mon, 1 Sep 2014 19:20:35 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81JKYrk007754; Mon, 1 Sep 2014 19:20:34 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409011920.s81JKYrk007754@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 1 Sep 2014 19:20:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270948 - in head/sys/arm: broadcom/bcm2835 freescale/imx ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 19:20:35 -0000 Author: ian Date: Mon Sep 1 19:20:34 2014 New Revision: 270948 URL: http://svnweb.freebsd.org/changeset/base/270948 Log: sdhci.h has grown a dependency on sysctl.h, include the latter where needed. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c head/sys/arm/freescale/imx/imx_sdhci.c head/sys/arm/ti/ti_sdhci.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Mon Sep 1 18:57:13 2014 (r270947) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Mon Sep 1 19:20:34 2014 (r270948) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/arm/freescale/imx/imx_sdhci.c ============================================================================== --- head/sys/arm/freescale/imx/imx_sdhci.c Mon Sep 1 18:57:13 2014 (r270947) +++ head/sys/arm/freescale/imx/imx_sdhci.c Mon Sep 1 19:20:34 2014 (r270948) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/arm/ti/ti_sdhci.c ============================================================================== --- head/sys/arm/ti/ti_sdhci.c Mon Sep 1 18:57:13 2014 (r270947) +++ head/sys/arm/ti/ti_sdhci.c Mon Sep 1 19:20:34 2014 (r270948) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 19:56:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34598604; Mon, 1 Sep 2014 19:56:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FB081A9E; Mon, 1 Sep 2014 19:56:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81JuTWh028691; Mon, 1 Sep 2014 19:56:29 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81JuS6a028690; Mon, 1 Sep 2014 19:56:28 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201409011956.s81JuS6a028690@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Mon, 1 Sep 2014 19:56:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270950 - head/lib/libcuse X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 19:56:29 -0000 Author: ed Date: Mon Sep 1 19:56:28 2014 New Revision: 270950 URL: http://svnweb.freebsd.org/changeset/base/270950 Log: Add lock annotations to libcuse. - Add annotations to the lock/unlock function to indicate that the function is allowed to lock and unlock the underlying pthread mutex. - Add __guarded_by() annotations to the global variables. Approved by: hselasky@ Modified: head/lib/libcuse/cuse_lib.c Modified: head/lib/libcuse/cuse_lib.c ============================================================================== --- head/lib/libcuse/cuse_lib.c Mon Sep 1 19:20:42 2014 (r270949) +++ head/lib/libcuse/cuse_lib.c Mon Sep 1 19:56:28 2014 (r270950) @@ -79,20 +79,22 @@ struct cuse_dev { void *priv1; }; -static TAILQ_HEAD(, cuse_dev) h_cuse; -static TAILQ_HEAD(, cuse_dev_entered) h_cuse_entered; static int f_cuse = -1; + static pthread_mutex_t m_cuse; -static struct cuse_vm_allocation a_cuse[CUSE_ALLOC_UNIT_MAX]; +static TAILQ_HEAD(, cuse_dev) h_cuse __guarded_by(m_cuse); +static TAILQ_HEAD(, cuse_dev_entered) h_cuse_entered __guarded_by(m_cuse); +static struct cuse_vm_allocation a_cuse[CUSE_ALLOC_UNIT_MAX] + __guarded_by(m_cuse); static void -cuse_lock(void) +cuse_lock(void) __locks_exclusive(m_cuse) { pthread_mutex_lock(&m_cuse); } static void -cuse_unlock(void) +cuse_unlock(void) __unlocks(m_cuse) { pthread_mutex_unlock(&m_cuse); } From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 20:18:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5362A1B4; Mon, 1 Sep 2014 20:18:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3EB121CB5; Mon, 1 Sep 2014 20:18:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81KIAY3039512; Mon, 1 Sep 2014 20:18:10 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81KI9lc039510; Mon, 1 Sep 2014 20:18:09 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201409012018.s81KI9lc039510@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Mon, 1 Sep 2014 20:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270951 - in head: share/mk usr.sbin/auditdistd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 20:18:10 -0000 Author: ed Date: Mon Sep 1 20:18:09 2014 New Revision: 270951 URL: http://svnweb.freebsd.org/changeset/base/270951 Log: Add -Wthread-safety to WARNS=6. While there, add a NO_WTHREAD_SAFETY flag that can be used to disable this specific warning flag. Disable it for auditdistd. We can easily patch up auditdistd to have the right annotations to build, but as auditdistd is intended to be portable across other operating systems, it's not worth the effort. Approved by: brueffer@ Modified: head/share/mk/bsd.sys.mk head/usr.sbin/auditdistd/Makefile Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Mon Sep 1 19:56:28 2014 (r270950) +++ head/share/mk/bsd.sys.mk Mon Sep 1 20:18:09 2014 (r270951) @@ -54,6 +54,9 @@ CWARNFLAGS+= -Wchar-subscripts -Winline .if !defined(NO_WMISSING_VARIABLE_DECLARATIONS) CWARNFLAGS.clang+= -Wmissing-variable-declarations .endif +.if !defined(NO_WTHREAD_SAFETY) +CWARNFLAGS.clang+= -Wthread-safety +.endif .endif # WARNS >= 6 .if ${WARNS} >= 2 && ${WARNS} <= 4 # XXX Delete -Wuninitialized by default for now -- the compiler doesn't Modified: head/usr.sbin/auditdistd/Makefile ============================================================================== --- head/usr.sbin/auditdistd/Makefile Mon Sep 1 19:56:28 2014 (r270950) +++ head/usr.sbin/auditdistd/Makefile Mon Sep 1 20:18:09 2014 (r270951) @@ -30,4 +30,8 @@ YFLAGS+=-v CLEANFILES=parse.c parse.h parse.output +# auditdistd cannot use FreeBSD specific lock annotation macros. Disable +# thread safety analysis completely. +NO_WTHREAD_SAFETY= + .include From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 22:25:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F464869; Mon, 1 Sep 2014 22:25:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 212F61AE2; Mon, 1 Sep 2014 22:25:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81MPg4X004845; Mon, 1 Sep 2014 22:25:42 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81MPg8l004843; Mon, 1 Sep 2014 22:25:42 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201409012225.s81MPg8l004843@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 1 Sep 2014 22:25:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270952 - in head: include lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 22:25:43 -0000 Author: pfg Date: Mon Sep 1 22:25:42 2014 New Revision: 270952 URL: http://svnweb.freebsd.org/changeset/base/270952 Log: Add bsearch_b to the libc map and the stdlib header. bsearch_b is the Apple blocks enabled version of bsearch(3). This was added to libc in Revision 264042 but the commit missed the declaration required to make use of it. While here move some other block-related functions to the BSD_VISIBLE block as these are non-standard. Phabric: D638 Reviewed by: theraven, wollman Modified: head/include/stdlib.h head/lib/libc/stdlib/Symbol.map Modified: head/include/stdlib.h ============================================================================== --- head/include/stdlib.h Mon Sep 1 20:18:09 2014 (r270951) +++ head/include/stdlib.h Mon Sep 1 22:25:42 2014 (r270952) @@ -82,9 +82,6 @@ extern int ___mb_cur_max(void); _Noreturn void abort(void); int abs(int) __pure2; int atexit(void (*)(void)); -#ifdef __BLOCKS__ -int atexit_b(void (^)(void)); -#endif double atof(const char *); int atoi(const char *); long atol(const char *); @@ -103,10 +100,6 @@ size_t mbstowcs(wchar_t * __restrict , int mbtowc(wchar_t * __restrict, const char * __restrict, size_t); void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); -#ifdef __BLOCKS__ -void qsort_b(void *, size_t, size_t, - int (^)(const void *, const void *)); -#endif int rand(void); void *realloc(void *, size_t); void srand(unsigned); @@ -264,6 +257,11 @@ void arc4random_buf(void *, size_t); void arc4random_stir(void); __uint32_t arc4random_uniform(__uint32_t); +#ifdef __BLOCKS__ +int atexit_b(void (^)(void)); +void *bsearch_b(const void *, const void *, size_t, + size_t, int (^)(const void *, const void *)); +#endif char *getbsize(int *, long *); /* getcap(3) functions */ char *cgetcap(char *, const char *, int); @@ -289,6 +287,8 @@ const char * int heapsort(void *, size_t, size_t, int (*)(const void *, const void *)); #ifdef __BLOCKS__ int heapsort_b(void *, size_t, size_t, int (^)(const void *, const void *)); +void qsort_b(void *, size_t, size_t, + int (^)(const void *, const void *)); #endif int l64a_r(long, char *, int); int mergesort(void *, size_t, size_t, int (*)(const void *, const void *)); Modified: head/lib/libc/stdlib/Symbol.map ============================================================================== --- head/lib/libc/stdlib/Symbol.map Mon Sep 1 20:18:09 2014 (r270951) +++ head/lib/libc/stdlib/Symbol.map Mon Sep 1 22:25:42 2014 (r270952) @@ -106,6 +106,7 @@ FBSD_1.3 { FBSD_1.4 { atexit_b; + bsearch_b; heapsort_b; mergesort_b; qsort_b; From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 22:40:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FC7BB0D; Mon, 1 Sep 2014 22:40:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 217331C89; Mon, 1 Sep 2014 22:40:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81MeWAK010271; Mon, 1 Sep 2014 22:40:32 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81MeVrB010269; Mon, 1 Sep 2014 22:40:31 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409012240.s81MeVrB010269@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 1 Sep 2014 22:40:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270953 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 22:40:32 -0000 Author: ian Date: Mon Sep 1 22:40:31 2014 New Revision: 270953 URL: http://svnweb.freebsd.org/changeset/base/270953 Log: Create a mechanism for looking up a device_t associated with an ofw/fdt xref handle, and for registering that association. Also use the same data for faster translations between node and xref handles. Now when fdt properties contain &othernode references, a driver can find the device instance that corresponds to &othernode, and thus can use interfaces provided by that instance. Reviewed by: nwhitehorn Modified: head/sys/dev/ofw/openfirm.c head/sys/dev/ofw/openfirm.h Modified: head/sys/dev/ofw/openfirm.c ============================================================================== --- head/sys/dev/ofw/openfirm.c Mon Sep 1 22:25:42 2014 (r270952) +++ head/sys/dev/ofw/openfirm.c Mon Sep 1 22:40:31 2014 (r270953) @@ -84,6 +84,78 @@ static ofw_t ofw_obj; static struct ofw_kobj ofw_kernel_obj; static struct kobj_ops ofw_kernel_kops; +struct xrefinfo { + phandle_t xref; + phandle_t node; + device_t dev; + SLIST_ENTRY(xrefinfo) next_entry; +}; + +static SLIST_HEAD(, xrefinfo) xreflist = SLIST_HEAD_INITIALIZER(xreflist); +static boolean_t xref_init_done; + +#define FIND_BY_XREF 0 +#define FIND_BY_NODE 1 + +/* + * xref-phandle-device lookup helper routines. + * + * As soon as we are able to use malloc(), walk the node tree and build a list + * of info that cross-references node handles, xref handles, and device_t + * instances. This list exists primarily to allow association of a device_t + * with an xref handle, but it is also used to speed up translation between xref + * and node handles. Before malloc() is available we have to recursively search + * the node tree each time we want to translate between a node and xref handle. + * Afterwards we can do the translations by searching this much shorter list. + */ +static void +xrefinfo_create(phandle_t node) +{ + struct xrefinfo * xi; + phandle_t child, xref; + + /* + * Recursively descend from parent, looking for nodes with a property + * named either "phandle", "ibm,phandle", or "linux,phandle". For each + * such node found create an entry in the xreflist. + */ + for (child = OF_child(node); child != 0; child = OF_peer(child)) { + xrefinfo_create(child); + if (OF_getencprop(child, "phandle", &xref, sizeof(xref)) == + -1 && OF_getencprop(child, "ibm,phandle", &xref, + sizeof(xref)) == -1 && OF_getencprop(child, + "linux,phandle", &xref, sizeof(xref)) == -1) + continue; + xi = malloc(sizeof(*xi), M_OFWPROP, M_WAITOK | M_ZERO); + xi->node = child; + xi->xref = xref; + SLIST_INSERT_HEAD(&xreflist, xi, next_entry); + } +} + +static void +xrefinfo_init(void *unsed) +{ + + xrefinfo_create(OF_peer(0)); + xref_init_done = true; +} +SYSINIT(xrefinfo, SI_SUB_KMEM, SI_ORDER_ANY, xrefinfo_init, NULL); + +static struct xrefinfo * +xrefinfo_find(phandle_t phandle, int find_by) +{ + struct xrefinfo * xi; + + SLIST_FOREACH(xi, &xreflist, next_entry) { + if (find_by == FIND_BY_XREF && phandle == xi->xref) + return (xi); + else if (find_by == FIND_BY_NODE && phandle == xi->node) + return (xi); + } + return (NULL); +} + /* * OFW install routines. Highest priority wins, equal priority also * overrides allowing last-set to win. @@ -465,29 +537,67 @@ OF_child_xref_phandle(phandle_t parent, phandle_t OF_node_from_xref(phandle_t xref) { + struct xrefinfo *xi; phandle_t node; - node = OF_child_xref_phandle(OF_peer(0), xref); - if (node == -1) - return (xref); + if (xref_init_done) { + if ((xi = xrefinfo_find(xref, FIND_BY_XREF)) == NULL) + return (xref); + return (xi->node); + } + if ((node = OF_child_xref_phandle(OF_peer(0), xref)) == -1) + return (xref); return (node); } phandle_t OF_xref_from_node(phandle_t node) { + struct xrefinfo *xi; phandle_t xref; + if (xref_init_done) { + if ((xi = xrefinfo_find(node, FIND_BY_NODE)) == NULL) + return (node); + return (xi->xref); + } + if (OF_getencprop(node, "phandle", &xref, sizeof(xref)) == -1 && OF_getencprop(node, "ibm,phandle", &xref, sizeof(xref)) == -1 && OF_getencprop(node, "linux,phandle", &xref, sizeof(xref)) == -1) return (node); - return (xref); } +device_t +OF_device_from_xref(phandle_t xref) +{ + struct xrefinfo *xi; + + if (xref_init_done) { + if ((xi = xrefinfo_find(xref, FIND_BY_XREF)) == NULL) + return (NULL); + return (xi->dev); + } + panic("Attempt to find device before xreflist_init"); +} + +int +OF_device_register_xref(phandle_t xref, device_t dev) +{ + struct xrefinfo *xi; + + if (xref_init_done) { + if ((xi = xrefinfo_find(xref, FIND_BY_XREF)) == NULL) + return (ENXIO); + xi->dev = dev; + return (0); + } + panic("Attempt to register device before xreflist_init"); +} + /* Call the method in the scope of a given instance. */ int OF_call_method(const char *method, ihandle_t instance, int nargs, int nreturns, Modified: head/sys/dev/ofw/openfirm.h ============================================================================== --- head/sys/dev/ofw/openfirm.h Mon Sep 1 22:25:42 2014 (r270952) +++ head/sys/dev/ofw/openfirm.h Mon Sep 1 22:40:31 2014 (r270953) @@ -133,6 +133,16 @@ ssize_t OF_package_to_path(phandle_t no phandle_t OF_node_from_xref(phandle_t xref); phandle_t OF_xref_from_node(phandle_t node); +/* + * When properties contain references to other nodes using xref handles it is + * often necessary to use interfaces provided by the driver for the referenced + * instance. These routines allow a driver that provides such an interface to + * register its association with an xref handle, and for other drivers to obtain + * the device_t associated with an xref handle. + */ +device_t OF_device_from_xref(phandle_t xref); +int OF_device_register_xref(phandle_t xref, device_t dev); + /* Device I/O functions */ ihandle_t OF_open(const char *path); void OF_close(ihandle_t instance); From owner-svn-src-all@FreeBSD.ORG Mon Sep 1 22:53:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D97D4D2A; Mon, 1 Sep 2014 22:53:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C56581D66; Mon, 1 Sep 2014 22:53:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81MrlOu018628; Mon, 1 Sep 2014 22:53:47 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81MrlHL018627; Mon, 1 Sep 2014 22:53:47 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201409012253.s81MrlHL018627@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 1 Sep 2014 22:53:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270954 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 22:53:48 -0000 Author: dteske Date: Mon Sep 1 22:53:47 2014 New Revision: 270954 URL: http://svnweb.freebsd.org/changeset/base/270954 Log: Fix a bug where command line arguments could be misprocessed if getopts is used prior to f_dialog_init() -- e.g., in a script that sets DIALOG_SELF_INITIALIZE to NULL, preventing f_dialog_init() from being run automaticaly when `dialog.subr' is included. Caused by sub-shell processing of arguments inheriting prior value of $OPTIND, used by getopts. Solved by unsetting OPTIND prior to [re-]processing of positional arguments. Modified: head/usr.sbin/bsdconfig/share/dialog.subr Modified: head/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/dialog.subr Mon Sep 1 22:40:31 2014 (r270953) +++ head/usr.sbin/bsdconfig/share/dialog.subr Mon Sep 1 22:53:47 2014 (r270954) @@ -2116,6 +2116,7 @@ f_dialog_init() f_dprintf "f_dialog_init: ARGV=[%s] GETOPTS_STDARGS=[%s]" \ "$ARGV" "$GETOPTS_STDARGS" SECURE=`set -- $ARGV + unset OPTIND while getopts \ "$GETOPTS_STDARGS$GETOPTS_EXTRA$GETOPTS_ALLFLAGS" \ flag > /dev/null; do @@ -2125,6 +2126,7 @@ f_dialog_init() done ` # END-BACKTICK USE_XDIALOG=`set -- $ARGV + unset OPTIND while getopts \ "$GETOPTS_STDARGS$GETOPTS_EXTRA$GETOPTS_ALLFLAGS" \ flag > /dev/null; do From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 02:54:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDF9A611; Tue, 2 Sep 2014 02:54:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA66F1553; Tue, 2 Sep 2014 02:54:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s822stLP034900; Tue, 2 Sep 2014 02:54:55 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s822stcS034899; Tue, 2 Sep 2014 02:54:55 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409020254.s822stcS034899@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 2 Sep 2014 02:54:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270955 - head/sys/arm/freescale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 02:54:55 -0000 Author: ian Date: Tue Sep 2 02:54:55 2014 New Revision: 270955 URL: http://svnweb.freebsd.org/changeset/base/270955 Log: The ocotp driver provides access to registers containing chip configuration data that is needed by other drivers, so make it an EARLY_DRIVER_MODULE() that loads before just about anything else. Modified: head/sys/arm/freescale/fsl_ocotp.c Modified: head/sys/arm/freescale/fsl_ocotp.c ============================================================================== --- head/sys/arm/freescale/fsl_ocotp.c Mon Sep 1 22:53:47 2014 (r270954) +++ head/sys/arm/freescale/fsl_ocotp.c Tue Sep 2 02:54:55 2014 (r270955) @@ -200,5 +200,6 @@ static driver_t ocotp_driver = { static devclass_t ocotp_devclass; -DRIVER_MODULE(ocotp, simplebus, ocotp_driver, ocotp_devclass, 0, 0); +EARLY_DRIVER_MODULE(ocotp, simplebus, ocotp_driver, ocotp_devclass, 0, 0, + BUS_PASS_CPU + BUS_PASS_ORDER_FIRST); From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 02:56:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39669774; Tue, 2 Sep 2014 02:56:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C446157C; Tue, 2 Sep 2014 02:56:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s822uhjT035200; Tue, 2 Sep 2014 02:56:43 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s822uh4g035199; Tue, 2 Sep 2014 02:56:43 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409020256.s822uh4g035199@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 2 Sep 2014 02:56:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270956 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 02:56:44 -0000 Author: ian Date: Tue Sep 2 02:56:43 2014 New Revision: 270956 URL: http://svnweb.freebsd.org/changeset/base/270956 Log: The anatop driver controls power and PLLs and needs to be available before just about anything else (other than octop which provides it config info), so make it an EARLY_DRIVER_MODULE(). Modified: head/sys/arm/freescale/imx/imx6_anatop.c Modified: head/sys/arm/freescale/imx/imx6_anatop.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_anatop.c Tue Sep 2 02:54:55 2014 (r270955) +++ head/sys/arm/freescale/imx/imx6_anatop.c Tue Sep 2 02:56:43 2014 (r270956) @@ -88,6 +88,8 @@ static struct resource_spec imx6_anatop_ struct imx6_anatop_softc { device_t dev; struct resource *res[2]; + struct intr_config_hook + intr_setup_hook; uint32_t cpu_curmhz; uint32_t cpu_curmv; uint32_t cpu_minmhz; @@ -610,10 +612,22 @@ initialize_tempmon(struct imx6_anatop_so "Throttle CPU when exceeding this temperature"); } +static void +intr_setup(void *arg) +{ + struct imx6_anatop_softc *sc; + + sc = arg; + bus_setup_intr(sc->dev, sc->res[IRQRES], INTR_TYPE_MISC | INTR_MPSAFE, + tempmon_intr, NULL, sc, &sc->temp_intrhand); + config_intrhook_disestablish(&sc->intr_setup_hook); +} + static int imx6_anatop_detach(device_t dev) { + /* This device can never detach. */ return (EBUSY); } @@ -633,10 +647,9 @@ imx6_anatop_attach(device_t dev) goto out; } - err = bus_setup_intr(dev, sc->res[IRQRES], INTR_TYPE_MISC | INTR_MPSAFE, - tempmon_intr, NULL, sc, &sc->temp_intrhand); - if (err != 0) - goto out; + sc->intr_setup_hook.ich_func = intr_setup; + sc->intr_setup_hook.ich_arg = sc; + config_intrhook_establish(&sc->intr_setup_hook); SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev), SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)), @@ -713,5 +726,6 @@ static driver_t imx6_anatop_driver = { static devclass_t imx6_anatop_devclass; -DRIVER_MODULE(imx6_anatop, simplebus, imx6_anatop_driver, imx6_anatop_devclass, 0, 0); +EARLY_DRIVER_MODULE(imx6_anatop, simplebus, imx6_anatop_driver, + imx6_anatop_devclass, 0, 0, BUS_PASS_CPU + BUS_PASS_ORDER_FIRST + 1); From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 03:23:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 333B9A03; Tue, 2 Sep 2014 03:23:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D00C1A86; Tue, 2 Sep 2014 03:23:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s823N6bq049580; Tue, 2 Sep 2014 03:23:06 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s823N6X2049576; Tue, 2 Sep 2014 03:23:06 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409020323.s823N6X2049576@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 2 Sep 2014 03:23:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270957 - in head/sys: conf dev/fdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 03:23:07 -0000 Author: ian Date: Tue Sep 2 03:23:05 2014 New Revision: 270957 URL: http://svnweb.freebsd.org/changeset/base/270957 Log: Create an interface for drivers to enable or disable their clocks as listed in the clocks=<...> properties of their FDT data. The clock properties consist of 2-cell tuples, each containing a clock device node reference and a clock number. A clock device driver can register itself as providing this interface, then other drivers can turn the FDT clock node reference into the corresponding device_t so that they can use the interface to query and manipulate their clocks. This provides convenience functions to enable or disable all the clocks listed in the properties for a device, so most drivers will be able to manage their clocks with a single call to fdt_clock_enable_all(dev). Added: head/sys/dev/fdt/fdt_clock.c (contents, props changed) head/sys/dev/fdt/fdt_clock.h (contents, props changed) head/sys/dev/fdt/fdt_clock_if.m (contents, props changed) Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Sep 2 02:56:43 2014 (r270956) +++ head/sys/conf/files Tue Sep 2 03:23:05 2014 (r270957) @@ -1376,6 +1376,8 @@ dev/fatm/if_fatm.c optional fatm pci dev/fb/fbd.c optional fbd | vt dev/fb/fb_if.m standard dev/fb/splash.c optional sc splash +dev/fdt/fdt_clock.c optional fdt +dev/fdt/fdt_clock_if.m optional fdt dev/fdt/fdt_common.c optional fdt dev/fdt/fdt_slicer.c optional fdt cfi | fdt nand dev/fdt/fdt_static_dtb.S optional fdt fdt_dtb_static \ Added: head/sys/dev/fdt/fdt_clock.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/fdt/fdt_clock.c Tue Sep 2 03:23:05 2014 (r270957) @@ -0,0 +1,160 @@ +/*- + * Copyright (c) 2014 Ian Lepore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "fdt_clock_if.h" +#include + +/* + * Loop through all the tuples in the clocks= property for a device, enabling or + * disabling each clock. + * + * Be liberal about errors for now: warn about a failure to enable but keep + * trying with any other clocks in the list. Return ENXIO if any errors were + * found, and let the caller decide whether the problem is fatal. + */ +static int +enable_disable_all(device_t consumer, boolean_t enable) +{ + phandle_t cnode; + device_t clockdev; + int clocknum, err, i, ncells; + uint32_t *clks; + boolean_t anyerrors; + + cnode = ofw_bus_get_node(consumer); + ncells = OF_getencprop_alloc(cnode, "clocks", sizeof(*clks), + (void **)&clks); + if (enable && ncells < 2) { + device_printf(consumer, "Warning: No clocks specified in fdt " + "data; device may not function."); + return (ENXIO); + } + anyerrors = false; + for (i = 0; i < ncells; i += 2) { + clockdev = OF_device_from_xref(clks[i]); + clocknum = clks[i + 1]; + if (clockdev == NULL) { + if (enable) + device_printf(consumer, "Warning: can not find " + "driver for clock number %u; device may not " + "function\n", clocknum); + anyerrors = true; + continue; + } + if (enable) + err = FDT_CLOCK_ENABLE(clockdev, clocknum); + else + err = FDT_CLOCK_DISABLE(clockdev, clocknum); + if (err != 0) { + if (enable) + device_printf(consumer, "Warning: failed to " + "enable clock number %u; device may not " + "function\n", clocknum); + anyerrors = true; + } + } + free(clks, M_OFWPROP); + return (anyerrors ? ENXIO : 0); +} + +int +fdt_clock_get_info(device_t consumer, int n, struct fdt_clock_info *info) +{ + phandle_t cnode; + device_t clockdev; + int clocknum, err, ncells; + uint32_t *clks; + + cnode = ofw_bus_get_node(consumer); + ncells = OF_getencprop_alloc(cnode, "clocks", sizeof(*clks), + (void **)&clks); + if (ncells <= 0) + return (ENXIO); + n *= 2; + if (ncells <= n) + err = ENXIO; + else { + clockdev = OF_device_from_xref(clks[n]); + if (clockdev == NULL) + err = ENXIO; + else { + /* + * Make struct contents minimally valid, then call + * provider to fill in what it knows (provider can + * override anything it wants to). + */ + clocknum = clks[n + 1]; + memset(info, 0, sizeof(*info)); + info->provider = clockdev; + info->index = clocknum; + info->name = ""; + err = FDT_CLOCK_GET_INFO(clockdev, clocknum, info); + } + } + free(clks, M_OFWPROP); + return (err); +} + +int +fdt_clock_enable_all(device_t consumer) +{ + + return (enable_disable_all(consumer, true)); +} + +int +fdt_clock_disable_all(device_t consumer) +{ + + return (enable_disable_all(consumer, false)); +} + +void +fdt_clock_register_provider(device_t provider) +{ + + OF_device_register_xref(OF_xref_from_node(provider), provider); +} + +void +fdt_clock_unregister_provider(device_t provider) +{ + + OF_device_register_xref(OF_xref_from_node(provider), NULL); +} + Added: head/sys/dev/fdt/fdt_clock.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/fdt/fdt_clock.h Tue Sep 2 03:23:05 2014 (r270957) @@ -0,0 +1,55 @@ +/*- + * Copyright (c) 2014 Ian Lepore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef DEV_FDT_CLOCK_H +#define DEV_FDT_CLOCK_H + +#include "fdt_clock_if.h" + +/* + * Get info about the Nth clock listed in consumer's "clocks" property. + * + * Returns 0 on success, ENXIO if clock #n not found. + */ +int fdt_clock_get_info(device_t consumer, int n, struct fdt_clock_info *info); + +/* + * Look up "clocks" property in consumer's fdt data and enable or disable all + * configured clocks. + */ +int fdt_clock_enable_all(device_t consumer); +int fdt_clock_disable_all(device_t consumer); + +/* + * [Un]register the given device instance as a driver that implements the + * fdt_clock interface. + */ +void fdt_clock_register_provider(device_t provider); +void fdt_clock_unregister_provider(device_t provider); + +#endif /* DEV_FDT_CLOCK_H */ + Added: head/sys/dev/fdt/fdt_clock_if.m ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/fdt/fdt_clock_if.m Tue Sep 2 03:23:05 2014 (r270957) @@ -0,0 +1,81 @@ +#- +# Copyright (c) 2014 Ian Lepore +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +#include + +# +# This is the interface that fdt_clock drivers provide to other drivers. +# In this context, clock refers to a clock signal provided to some other +# hardware component within the system. They are most often found within +# embedded processors that have on-chip IO controllers. +# + +INTERFACE fdt_clock; + +HEADER { + + enum { + FDT_CIFLAG_RUNNING = 0x01, + }; + + struct fdt_clock_info { + device_t provider; + uint32_t index; + const char * name; /* May be "", will not be NULL. */ + uint32_t flags; + uint64_t frequency; /* In Hz. */ + }; +} + +# +# Enable the specified clock. +# Returns 0 on success or a standard errno value. +# +METHOD int enable { + device_t provider; + int index; +}; + +# +# Disable the specified clock. +# Returns 0 on success or a standard errno value. +# +METHOD int disable { + device_t provider; + int index; +}; + +# +# Returns information about the current operational state of specified clock. +# +METHOD int get_info { + device_t provider; + int index; + struct fdt_clock_info *info; +}; + From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 03:45:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7435E796; Tue, 2 Sep 2014 03:45:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4717E1CB5; Tue, 2 Sep 2014 03:45:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s823j2sS059015; Tue, 2 Sep 2014 03:45:02 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s823j1HW059013; Tue, 2 Sep 2014 03:45:01 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409020345.s823j1HW059013@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 2 Sep 2014 03:45:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270958 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 03:45:02 -0000 Author: ian Date: Tue Sep 2 03:45:01 2014 New Revision: 270958 URL: http://svnweb.freebsd.org/changeset/base/270958 Log: Add OF_xref_from_device() so that there's no need to have an intermediate call to ofw_bus_get_node() to lookup info that's already in the xreflist. Modified: head/sys/dev/ofw/openfirm.c head/sys/dev/ofw/openfirm.h Modified: head/sys/dev/ofw/openfirm.c ============================================================================== --- head/sys/dev/ofw/openfirm.c Tue Sep 2 03:23:05 2014 (r270957) +++ head/sys/dev/ofw/openfirm.c Tue Sep 2 03:45:01 2014 (r270958) @@ -96,6 +96,7 @@ static boolean_t xref_init_done; #define FIND_BY_XREF 0 #define FIND_BY_NODE 1 +#define FIND_BY_DEV 1 /* * xref-phandle-device lookup helper routines. @@ -152,6 +153,8 @@ xrefinfo_find(phandle_t phandle, int fin return (xi); else if (find_by == FIND_BY_NODE && phandle == xi->node) return (xi); + else if (find_by == FIND_BY_DEV && phandle == (uintptr_t)xi->dev) + return (xi); } return (NULL); } @@ -584,6 +587,19 @@ OF_device_from_xref(phandle_t xref) panic("Attempt to find device before xreflist_init"); } +phandle_t +OF_xref_from_device(device_t dev) +{ + struct xrefinfo *xi; + + if (xref_init_done) { + if ((xi = xrefinfo_find((uintptr_t)dev, FIND_BY_DEV)) == NULL) + return (0); + return (xi->xref); + } + panic("Attempt to find xref before xreflist_init"); +} + int OF_device_register_xref(phandle_t xref, device_t dev) { Modified: head/sys/dev/ofw/openfirm.h ============================================================================== --- head/sys/dev/ofw/openfirm.h Tue Sep 2 03:23:05 2014 (r270957) +++ head/sys/dev/ofw/openfirm.h Tue Sep 2 03:45:01 2014 (r270958) @@ -141,6 +141,7 @@ phandle_t OF_xref_from_node(phandle_t no * the device_t associated with an xref handle. */ device_t OF_device_from_xref(phandle_t xref); +phandle_t OF_xref_from_device(device_t dev); int OF_device_register_xref(phandle_t xref, device_t dev); /* Device I/O functions */ From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 03:46:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 320E68FF; Tue, 2 Sep 2014 03:46:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EBC61CD0; Tue, 2 Sep 2014 03:46:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s823kOvl059230; Tue, 2 Sep 2014 03:46:24 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s823kOEO059229; Tue, 2 Sep 2014 03:46:24 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409020346.s823kOEO059229@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 2 Sep 2014 03:46:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270959 - head/sys/dev/fdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 03:46:25 -0000 Author: ian Date: Tue Sep 2 03:46:24 2014 New Revision: 270959 URL: http://svnweb.freebsd.org/changeset/base/270959 Log: Use OF_xref_from_device(), not OF_xref_from_node(). Also, use bzero() rather than memset(). Modified: head/sys/dev/fdt/fdt_clock.c Modified: head/sys/dev/fdt/fdt_clock.c ============================================================================== --- head/sys/dev/fdt/fdt_clock.c Tue Sep 2 03:45:01 2014 (r270958) +++ head/sys/dev/fdt/fdt_clock.c Tue Sep 2 03:46:24 2014 (r270959) @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -119,7 +120,7 @@ fdt_clock_get_info(device_t consumer, in * override anything it wants to). */ clocknum = clks[n + 1]; - memset(info, 0, sizeof(*info)); + bzero(info, sizeof(*info)); info->provider = clockdev; info->index = clocknum; info->name = ""; @@ -148,13 +149,13 @@ void fdt_clock_register_provider(device_t provider) { - OF_device_register_xref(OF_xref_from_node(provider), provider); + OF_device_register_xref(OF_xref_from_device(provider), provider); } void fdt_clock_unregister_provider(device_t provider) { - OF_device_register_xref(OF_xref_from_node(provider), NULL); + OF_device_register_xref(OF_xref_from_device(provider), NULL); } From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 03:51:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8CB8BB91; Tue, 2 Sep 2014 03:51:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7980E1D28; Tue, 2 Sep 2014 03:51:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s823pD61062984; Tue, 2 Sep 2014 03:51:13 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s823pDPu062983; Tue, 2 Sep 2014 03:51:13 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409020351.s823pDPu062983@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 2 Sep 2014 03:51:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270960 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 03:51:13 -0000 Author: ian Date: Tue Sep 2 03:51:12 2014 New Revision: 270960 URL: http://svnweb.freebsd.org/changeset/base/270960 Log: Fix typo. Pointy hat: ian Modified: head/sys/dev/ofw/openfirm.c Modified: head/sys/dev/ofw/openfirm.c ============================================================================== --- head/sys/dev/ofw/openfirm.c Tue Sep 2 03:46:24 2014 (r270959) +++ head/sys/dev/ofw/openfirm.c Tue Sep 2 03:51:12 2014 (r270960) @@ -96,7 +96,7 @@ static boolean_t xref_init_done; #define FIND_BY_XREF 0 #define FIND_BY_NODE 1 -#define FIND_BY_DEV 1 +#define FIND_BY_DEV 2 /* * xref-phandle-device lookup helper routines. From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 04:11:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A55C2B6; Tue, 2 Sep 2014 04:11:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66E391F14; Tue, 2 Sep 2014 04:11:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s824BL3R071933; Tue, 2 Sep 2014 04:11:21 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s824BLsl071932; Tue, 2 Sep 2014 04:11:21 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201409020411.s824BLsl071932@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Tue, 2 Sep 2014 04:11:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270961 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 04:11:21 -0000 Author: alc Date: Tue Sep 2 04:11:20 2014 New Revision: 270961 URL: http://svnweb.freebsd.org/changeset/base/270961 Log: Update a comment to reflect the changes in r213408. MFC after: 5 days Modified: head/sys/amd64/amd64/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Tue Sep 2 03:51:12 2014 (r270960) +++ head/sys/amd64/amd64/pmap.c Tue Sep 2 04:11:20 2014 (r270961) @@ -2571,7 +2571,7 @@ pmap_growkernel(vm_offset_t addr) * "kernel_vm_end" and the kernel page table as they were. * * The correctness of this action is based on the following - * argument: vm_map_findspace() allocates contiguous ranges of the + * argument: vm_map_insert() allocates contiguous ranges of the * kernel virtual address space. It calls this function if a range * ends after "kernel_vm_end". If the kernel is mapped between * "kernel_vm_end" and "addr", then the range cannot begin at From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 09:30:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6605D264; Tue, 2 Sep 2014 09:30:16 +0000 (UTC) Received: from mail-wg0-x22a.google.com (mail-wg0-x22a.google.com [IPv6:2a00:1450:400c:c00::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E1751300; Tue, 2 Sep 2014 09:30:15 +0000 (UTC) Received: by mail-wg0-f42.google.com with SMTP id b13so6463015wgh.13 for ; Tue, 02 Sep 2014 02:30:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=Gfqz1ep3pKJyc2dPyZnIAyN9Cexd4LPyiPF25D1XurQ=; b=EQeewgfng8BHJetZqcnvXZ8vyGwjRTE5BohY7SkbCtq5/gHTMUFa2Y9v43ekWNtbVN dANL6L/y8pVx2rMQvcmnAPB8Wl4BTFp/zh7kP2QRCvhh3uTcH/fsunDxb3P6ha2wZagq wMT3Y+oeCWf2lx+tPdcYzos5Zs/m9RmssVCsXKhq62noM/AOhYdeNHnOlwyWVCo2DpbO 6x3kC10I3tVb3h+diD1VWz0Q83Tx9IaTl4AJ3Q7N+n+TbWOHKe5rXEs7Wl2VFsW8E7pY 4UuEO7ohnXms+CI1D9Z94j59jnT76eFRjL/6uXpbXcc82js9Gcmwy6xzZCffHLwZuRIy NGQA== X-Received: by 10.180.12.173 with SMTP id z13mr3739489wib.53.1409650213344; Tue, 02 Sep 2014 02:30:13 -0700 (PDT) Received: from [172.16.1.30] (124.Red-83-33-238.dynamicIP.rima-tde.net. [83.33.238.124]) by mx.google.com with ESMTPSA id kw2sm8193706wjb.30.2014.09.02.02.30.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Sep 2014 02:30:12 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Message-ID: <54058E1E.4050907@FreeBSD.org> Date: Tue, 02 Sep 2014 11:30:06 +0200 From: =?windows-1252?Q?Roger_Pau_Monn=E9?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Alexander Motin , John-Mark Gurney Subject: Re: svn commit: r269814 - head/sys/dev/xen/blkfront References: <53e8e31e.2179.30c1c657@svn.freebsd.org> <53FF7386.3050804@FreeBSD.org> <20140828184515.GV71691@funkthat.com> <53FF7BC4.6050801@FreeBSD.org> <5400BDC7.7020902@FreeBSD.org> In-Reply-To: <5400BDC7.7020902@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 09:30:16 -0000 El 29/08/14 a les 19.52, Roger Pau Monné ha escrit: > El 28/08/14 a les 20.58, Alexander Motin ha escrit: >> On 28.08.2014 21:45, John-Mark Gurney wrote: >>> Alexander Motin wrote this message on Thu, Aug 28, 2014 at 21:23 +0300: >>>> Hi, Roger. >>>> >>>> It looks to me like this commit does not work as it should. I got >>>> problem when I just tried `newfs /dev/ada0 ; mount /dev/ada0 /mnt`. >>>> Somehow newfs does not produce valid filesystem. Problem is reliably >>>> repeatable and reverting this commit fixes it. >>>> >>>> I found at least one possible cause there: If original data buffer is >>>> unmapped, misaligned and not physically contiguous, then present x86 >>>> bus_dmamap_load_bio() implementation will process each physically >>>> contiguous segment separately. Due to the misalignment first and last >>>> physical segments may have size not multiple to 512 bytes. Since each >>>> segment processed separately, they are not joined together, and >>>> xbd_queue_cb() is getting segments not multiple to 512 bytes. Attempt to >>>> convert them to exact number of sectors in the driver cause data corruption. >>> >>> Are you sure this isn't a problem w/ the tag not properly specifying >>> the correct alignement? >> >> I don't know how to specify it stronger then this: >> error = bus_dma_tag_create( >> bus_get_dma_tag(sc->xbd_dev), /* parent */ >> 512, PAGE_SIZE, /* algnmnt, boundary */ >> BUS_SPACE_MAXADDR, /* lowaddr */ >> BUS_SPACE_MAXADDR, /* highaddr */ >> NULL, NULL, /* filter, filterarg */ >> sc->xbd_max_request_size, >> sc->xbd_max_request_segments, >> PAGE_SIZE, /* maxsegsize */ >> BUS_DMA_ALLOCNOW, /* flags */ >> busdma_lock_mutex, /* lockfunc */ >> &sc->xbd_io_lock, /* lockarg */ >> &sc->xbd_io_dmat); >> >>> Also, I don't think there is a way for busdma >>> to say that you MUST have a segment be a multiple of 512, though you >>> could use a 512 boundary, but that would force all segments to only be >>> 512 bytes... >> >> As I understand, that is mandatory requirement for this "hardware". >> Alike 4K alignment requirement also exist at least for SDHCI, and IIRC >> UHCI/OHCI hardware. Even AHCI requires both segment addresses and >> lengths to be even. >> >> I may be wrong, but I think it is quite likely that hardware that >> requires segment address alignment quite likely will have the same >> requirements for segments length. Hello, I have the following fix, which makes sure the total length and the size of each segment is aligned. I'm not very knowledgeable of the busdma code, so someone has to review it. Roger. --- diff --git a/sys/x86/x86/busdma_bounce.c b/sys/x86/x86/busdma_bounce.c index d1c75f8..688f559 100644 --- a/sys/x86/x86/busdma_bounce.c +++ b/sys/x86/x86/busdma_bounce.c @@ -620,6 +620,8 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map, segs = dmat->segments; if ((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) { + /* Make sure buflen is aligned */ + buflen = roundup2(buflen, dmat->common.alignment); _bus_dmamap_count_phys(dmat, map, buf, buflen, flags); if (map->pagesneeded != 0) { error = _bus_dmamap_reserve_pages(dmat, map, flags); @@ -634,6 +636,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map, if (((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) && map->pagesneeded != 0 && bus_dma_run_filter(&dmat->common, curaddr)) { + sgsize = roundup2(sgsize, dmat->common.alignment); sgsize = MIN(sgsize, PAGE_SIZE); curaddr = add_bounce_page(dmat, map, 0, curaddr, sgsize); From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 11:16:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1511359D; Tue, 2 Sep 2014 11:16:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00E711111; Tue, 2 Sep 2014 11:16:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82BGiqF071066; Tue, 2 Sep 2014 11:16:44 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82BGiXI071065; Tue, 2 Sep 2014 11:16:44 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201409021116.s82BGiXI071065@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Tue, 2 Sep 2014 11:16:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270964 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 11:16:45 -0000 Author: ed Date: Tue Sep 2 11:16:44 2014 New Revision: 270964 URL: http://svnweb.freebsd.org/changeset/base/270964 Log: Clean up slightly. - Remove c++0x hack from that was needed when Clang did not fully implement C++11. We can now safely test against C++11 to check whether thread_local is available, like we do for all other C++11 keywords. - Don't use __clang__ to test for thread safety annotation presence. It turns out we have a proper attribute for this. Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Tue Sep 2 10:35:04 2014 (r270963) +++ head/sys/sys/cdefs.h Tue Sep 2 11:16:44 2014 (r270964) @@ -298,8 +298,7 @@ #endif #if !__has_extension(c_thread_local) -/* XXX: Change this to test against C++11 when clang in base supports it. */ -#if /* (defined(__cplusplus) && __cplusplus >= 201103L) || */ \ +#if (defined(__cplusplus) && __cplusplus >= 201103L) || \ __has_extension(cxx_thread_local) #define _Thread_local thread_local #else @@ -751,7 +750,7 @@ * held. */ -#ifdef __clang__ +#if __has_extension(c_thread_safety_attributes) #define __lock_annotate(x) __attribute__((x)) #else #define __lock_annotate(x) From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 15:21:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C011DA89; Tue, 2 Sep 2014 15:21:09 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62A6115C3; Tue, 2 Sep 2014 15:21:09 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 1E105B941; Tue, 2 Sep 2014 11:21:08 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Subject: Re: svn commit: r270850 - in head/sys: i386/i386 i386/include i386/isa x86/acpica Date: Tue, 2 Sep 2014 11:00:57 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <201408301748.s7UHmc6H059701@svn.freebsd.org> <20140830195809.GS2737@kib.kiev.ua> In-Reply-To: <20140830195809.GS2737@kib.kiev.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201409021100.57493.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 02 Sep 2014 11:21:08 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 15:21:09 -0000 On Saturday, August 30, 2014 3:58:09 pm Konstantin Belousov wrote: > On Sat, Aug 30, 2014 at 05:48:38PM +0000, John Baldwin wrote: > > Author: jhb > > Date: Sat Aug 30 17:48:38 2014 > > New Revision: 270850 > > URL: http://svnweb.freebsd.org/changeset/base/270850 > > > > Log: > > Save and restore FPU state across suspend and resume. In earlier revisions > > of this patch, resumectx() called npxresume() directly, but that doesn't > > work because resumectx() runs with a non-standard %cs selector. Instead, > > all of the FPU suspend/resume handling is done in C. > > > > MFC after: 1 week > > > > Modified: > > head/sys/i386/i386/mp_machdep.c > > head/sys/i386/i386/swtch.s > > head/sys/i386/include/npx.h > > head/sys/i386/include/pcb.h > > head/sys/i386/isa/npx.c > > head/sys/x86/acpica/acpi_wakeup.c > > > > Modified: head/sys/i386/i386/mp_machdep.c > > ============================================================================== > > --- head/sys/i386/i386/mp_machdep.c Sat Aug 30 17:39:28 2014 (r270849) > > +++ head/sys/i386/i386/mp_machdep.c Sat Aug 30 17:48:38 2014 (r270850) > > @@ -1522,9 +1522,15 @@ cpususpend_handler(void) > > > > cpu = PCPU_GET(cpuid); > > if (savectx(susppcbs[cpu])) { > > +#ifdef DEV_NPX > > + npxsuspend(&suspcbs[cpu]->pcb_fpususpend); > > +#endif > > wbinvd(); > > CPU_SET_ATOMIC(cpu, &suspended_cpus); > > } else { > > +#ifdef DEV_NPX > > + npxresume(&suspcbs[cpu]->pcb_fpususpend); > > +#endif > > pmap_init_pat(); > > PCPU_SET(switchtime, 0); > > PCPU_SET(switchticks, ticks); > > > > Modified: head/sys/i386/i386/swtch.s > > ============================================================================== > > --- head/sys/i386/i386/swtch.s Sat Aug 30 17:39:28 2014 (r270849) > > +++ head/sys/i386/i386/swtch.s Sat Aug 30 17:48:38 2014 (r270850) > > @@ -416,45 +416,6 @@ ENTRY(savectx) > > sldt PCB_LDT(%ecx) > > str PCB_TR(%ecx) > > > > -#ifdef DEV_NPX > > - /* > > - * If fpcurthread == NULL, then the npx 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 npx 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 npx state for forks by forgetting to reload. > > - */ > > - pushfl > > - CLI > > - movl PCPU(FPCURTHREAD),%eax > > - testl %eax,%eax > > - je 1f > > - > > - pushl %ecx > > - movl TD_PCB(%eax),%eax > > - movl PCB_SAVEFPU(%eax),%eax > > - pushl %eax > > - pushl %eax > > - call npxsave > > - addl $4,%esp > > - popl %eax > > - popl %ecx > > - > > - pushl $PCB_SAVEFPU_SIZE > > - leal PCB_USERFPU(%ecx),%ecx > > - pushl %ecx > > - pushl %eax > > - call bcopy > > - addl $12,%esp > > -1: > > - popfl > > -#endif /* DEV_NPX */ > > - > > movl $1,%eax > > ret > > END(savectx) > > @@ -519,10 +480,6 @@ ENTRY(resumectx) > > movl PCB_DR7(%ecx),%eax > > movl %eax,%dr7 > > > > -#ifdef DEV_NPX > > - /* XXX FIX ME */ > > -#endif > > - > > /* Restore other registers */ > > movl PCB_EDI(%ecx),%edi > > movl PCB_ESI(%ecx),%esi > > > > Modified: head/sys/i386/include/npx.h > > ============================================================================== > > --- head/sys/i386/include/npx.h Sat Aug 30 17:39:28 2014 (r270849) > > +++ head/sys/i386/include/npx.h Sat Aug 30 17:48:38 2014 (r270850) > > @@ -53,8 +53,10 @@ void npxexit(struct thread *td); > > int npxformat(void); > > int npxgetregs(struct thread *td); > > void npxinit(void); > > +void npxresume(union savefpu *addr); > > void npxsave(union savefpu *addr); > > void npxsetregs(struct thread *td, union savefpu *addr); > > +void npxsuspend(union savefpu *addr); > > int npxtrap_x87(void); > > int npxtrap_sse(void); > > void npxuserinited(struct thread *); > > > > Modified: head/sys/i386/include/pcb.h > > ============================================================================== > > --- head/sys/i386/include/pcb.h Sat Aug 30 17:39:28 2014 (r270849) > > +++ head/sys/i386/include/pcb.h Sat Aug 30 17:48:38 2014 (r270850) > > @@ -90,6 +90,8 @@ struct pcb { > > struct region_descriptor pcb_idt; > > uint16_t pcb_ldt; > > uint16_t pcb_tr; > > + > > + union savefpu pcb_fpususpend; > > }; > Now pcb consumes 512 bytes from each thread' kernel stack, which mostly > stay unused. > > Amd64 only stores the pointer to the fpususpend context in pcb, and > acpu_wakeup() allocates the memory as needed. Even this is a waste of 8 > bytes which are not needed for normal kernel operations. > > Suspend FPU context, as well as amd64 MSRs should go out of pcb into > some per-cpu suspend data block. I thought about that. I could easily make a parallel array, or perhaps use a separate 'susppcb' structure that includes a pcb and the savefpu union and change susppcbs to be an array of those. Which do you prefer? If we want to move some state out of the PCB on amd64 into this, then a separate struct for susppcbs might be the sanest. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 15:41:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E6E72FD; Tue, 2 Sep 2014 15:41:35 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02FF61A15; Tue, 2 Sep 2014 15:41:34 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s82FfRJx003268 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 2 Sep 2014 18:41:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s82FfRJx003268 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s82FfRJI003267; Tue, 2 Sep 2014 18:41:27 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 2 Sep 2014 18:41:27 +0300 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r270850 - in head/sys: i386/i386 i386/include i386/isa x86/acpica Message-ID: <20140902154127.GD2737@kib.kiev.ua> References: <201408301748.s7UHmc6H059701@svn.freebsd.org> <20140830195809.GS2737@kib.kiev.ua> <201409021100.57493.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="I2bJ1vO3Y/RENlXz" Content-Disposition: inline In-Reply-To: <201409021100.57493.jhb@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 15:41:35 -0000 --I2bJ1vO3Y/RENlXz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 02, 2014 at 11:00:57AM -0400, John Baldwin wrote: > On Saturday, August 30, 2014 3:58:09 pm Konstantin Belousov wrote: > > On Sat, Aug 30, 2014 at 05:48:38PM +0000, John Baldwin wrote: > > > Author: jhb > > > Date: Sat Aug 30 17:48:38 2014 > > > New Revision: 270850 > > > URL: http://svnweb.freebsd.org/changeset/base/270850 > > >=20 > > > Log: > > > Save and restore FPU state across suspend and resume. In earlier= =20 > revisions > > > of this patch, resumectx() called npxresume() directly, but that do= esn't > > > work because resumectx() runs with a non-standard %cs selector. =20 > Instead, > > > all of the FPU suspend/resume handling is done in C. > > > =20 > > > MFC after: 1 week > > >=20 > > > Modified: > > > head/sys/i386/i386/mp_machdep.c > > > head/sys/i386/i386/swtch.s > > > head/sys/i386/include/npx.h > > > head/sys/i386/include/pcb.h > > > head/sys/i386/isa/npx.c > > > head/sys/x86/acpica/acpi_wakeup.c > > >=20 > > > Modified: head/sys/i386/i386/mp_machdep.c > > >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > > > --- head/sys/i386/i386/mp_machdep.c Sat Aug 30 17:39:28 2014 (r270849) > > > +++ head/sys/i386/i386/mp_machdep.c Sat Aug 30 17:48:38 2014 (r270850) > > > @@ -1522,9 +1522,15 @@ cpususpend_handler(void) > > > =20 > > > cpu =3D PCPU_GET(cpuid); > > > if (savectx(susppcbs[cpu])) { > > > +#ifdef DEV_NPX > > > + npxsuspend(&suspcbs[cpu]->pcb_fpususpend); > > > +#endif > > > wbinvd(); > > > CPU_SET_ATOMIC(cpu, &suspended_cpus); > > > } else { > > > +#ifdef DEV_NPX > > > + npxresume(&suspcbs[cpu]->pcb_fpususpend); > > > +#endif > > > pmap_init_pat(); > > > PCPU_SET(switchtime, 0); > > > PCPU_SET(switchticks, ticks); > > >=20 > > > Modified: head/sys/i386/i386/swtch.s > > >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > > > --- head/sys/i386/i386/swtch.s Sat Aug 30 17:39:28 2014 (r270849) > > > +++ head/sys/i386/i386/swtch.s Sat Aug 30 17:48:38 2014 (r270850) > > > @@ -416,45 +416,6 @@ ENTRY(savectx) > > > sldt PCB_LDT(%ecx) > > > str PCB_TR(%ecx) > > > =20 > > > -#ifdef DEV_NPX > > > - /* > > > - * If fpcurthread =3D=3D NULL, then the npx h/w state is irrelevant= and=20 > 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 !=3D NULL, then we have to save the npx h/w state= to > > > - * fpcurthread's pcb and copy it to the requested pcb, or save to t= he > > > - * 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 npx state for forks by forgetting to reload. > > > - */ > > > - pushfl > > > - CLI > > > - movl PCPU(FPCURTHREAD),%eax > > > - testl %eax,%eax > > > - je 1f > > > - > > > - pushl %ecx > > > - movl TD_PCB(%eax),%eax > > > - movl PCB_SAVEFPU(%eax),%eax > > > - pushl %eax > > > - pushl %eax > > > - call npxsave > > > - addl $4,%esp > > > - popl %eax > > > - popl %ecx > > > - > > > - pushl $PCB_SAVEFPU_SIZE > > > - leal PCB_USERFPU(%ecx),%ecx > > > - pushl %ecx > > > - pushl %eax > > > - call bcopy > > > - addl $12,%esp > > > -1: > > > - popfl > > > -#endif /* DEV_NPX */ > > > - > > > movl $1,%eax > > > ret > > > END(savectx) > > > @@ -519,10 +480,6 @@ ENTRY(resumectx) > > > movl PCB_DR7(%ecx),%eax > > > movl %eax,%dr7 > > > =20 > > > -#ifdef DEV_NPX > > > - /* XXX FIX ME */ > > > -#endif > > > - > > > /* Restore other registers */ > > > movl PCB_EDI(%ecx),%edi > > > movl PCB_ESI(%ecx),%esi > > >=20 > > > Modified: head/sys/i386/include/npx.h > > >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > > > --- head/sys/i386/include/npx.h Sat Aug 30 17:39:28 2014 (r270849) > > > +++ head/sys/i386/include/npx.h Sat Aug 30 17:48:38 2014 (r270850) > > > @@ -53,8 +53,10 @@ void npxexit(struct thread *td); > > > int npxformat(void); > > > int npxgetregs(struct thread *td); > > > void npxinit(void); > > > +void npxresume(union savefpu *addr); > > > void npxsave(union savefpu *addr); > > > void npxsetregs(struct thread *td, union savefpu *addr); > > > +void npxsuspend(union savefpu *addr); > > > int npxtrap_x87(void); > > > int npxtrap_sse(void); > > > void npxuserinited(struct thread *); > > >=20 > > > Modified: head/sys/i386/include/pcb.h > > >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > > > --- head/sys/i386/include/pcb.h Sat Aug 30 17:39:28 2014 (r270849) > > > +++ head/sys/i386/include/pcb.h Sat Aug 30 17:48:38 2014 (r270850) > > > @@ -90,6 +90,8 @@ struct pcb { > > > struct region_descriptor pcb_idt; > > > uint16_t pcb_ldt; > > > uint16_t pcb_tr; > > > + > > > + union savefpu pcb_fpususpend; > > > }; > > Now pcb consumes 512 bytes from each thread' kernel stack, which mostly > > stay unused. > >=20 > > Amd64 only stores the pointer to the fpususpend context in pcb, and > > acpu_wakeup() allocates the memory as needed. Even this is a waste of 8 > > bytes which are not needed for normal kernel operations. > >=20 > > Suspend FPU context, as well as amd64 MSRs should go out of pcb into > > some per-cpu suspend data block. >=20 > I thought about that. I could easily make a parallel array, or perhaps u= se a=20 > separate 'susppcb' structure that includes a pcb and the savefpu union and > change susppcbs to be an array of those. Which do you prefer? If we want > to move some state out of the PCB on amd64 into this, then a separate str= uct > for susppcbs might be the sanest. Yes, separate structure seems to be a way forward. FWIW, I do not understand the need for pcb in its current form, allocated on the thread kernel stack, at all. It looks like a vestige of the u-area, but serves no real purpose except to consume now precious stack space. The idea of the part of the thread state that can be swapped out, together with the stack, seems to become alien. Most of the thread state which is not needed when the thread is not runnable, now goes to struct thread anyway. Might be, we should move the pcb into td_md. People actively object to the idea of the swappable kernel stack when they learn hard that local vars cannot participate in the global lists. The only thing which is currently allocated below the pcb and which seems to be reasonable to swap out, is the FPU context on amd64. --I2bJ1vO3Y/RENlXz Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUBeUmAAoJEJDCuSvBvK1BRY8P/jJrYZlapubg7Gq/IcOlHD30 j8wk2GUR09kK+97FlpZ84SFcuQTNjguI9ygaDXbjYxmEcEGcV2WJFFIBA5MPpi2R D4MCYtHwdYHAdQ3umKBRWi/Jnx1Ctpq69pDYlzbMd39EnBfNR9MJbN5AHJ95Z7Kq Hm9TWYVIXIvi6eTcwz4q9agbbcn6S3UqUGQYbOQ5u8fUcbuzxhmxx8j/d9F8xg1H 3myJ1N8A2gf5b5Ux2+bLlE8+V5SsHutNj/2fcIVEppSAVBNxlhYBkZKcuZw9TgQL y4F73p3y53ppfaK+cyClwbnV35qH5MxOgWqAEusVr2DvLMNfQbWOnkUkXTG4pKIL BPPaaJAOUqEbdU+fE5EbKSoHKPY5fD+gYD70Eyml5G6H72HzJYvzLgpfIj4M2s0X v9MWAJvdo1aHRuu2D54A00fsmBUp9CVKp2cyfOZChJTJhnlTTcP7PgFCoDNG6MKt Q7ukiXjzl+B+c0aeqxkn4vy7RTR5K4drkbyqlExg7lrYjhryrt+k/LWJALIMVQnX qMjylHOvtQ0vxroZb0Goh8Mreovr7fKtxJfQsyaAiBTU8H3pKsQNm7F70Eq6LYBR wncIIpiHdM+xLNpo+bPA2SYpsxNOAGkqJ4s1+H0kpxf4bFQc8bm8dmofsVwoJQeg EhOErA1bkAZE7SZbfvM3 =fmsT -----END PGP SIGNATURE----- --I2bJ1vO3Y/RENlXz-- From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 15:49:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 531A0BBD; Tue, 2 Sep 2014 15:49:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2010C1ABF; Tue, 2 Sep 2014 15:49:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82FnXTh005771; Tue, 2 Sep 2014 15:49:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82FnXbn005769; Tue, 2 Sep 2014 15:49:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409021549.s82FnXbn005769@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 15:49:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270969 - in stable/10: sys/sys usr.bin/elfdump X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 15:49:34 -0000 Author: emaste Date: Tue Sep 2 15:49:33 2014 New Revision: 270969 URL: http://svnweb.freebsd.org/changeset/base/270969 Log: MFC elfdump improvements r269092: Improve section type reporting The SHT range 0x70000000-0x7fffffff is processor-specific. Pass the ELF machine type header to sh_types so the section header type name can be reported correctly for the given processor. For all ranges report the actual value for unknown types. Add MIPS-specific type SHT_MIPS_OPTIONS. r269143 (andreast): Further improvements on elfdump, to follow up r269092: - Add ARM specific section header types. - Add SHT_GNU_HASH section header type. - Improve reporting of undefined tags in d_tags. - Add DT_GNU_HASH tag. Reviewed by: emaste r269337: add EM_AARCH64 64-bit ARM machine architecture r269338: use existing ELF constants where available r270303: Rename DT_FEATURE_1 to DT_FEATURE This provides a minor cleanup in elfdump; there are otherwise no consumers in the tree. Old SUN documentation can be found for either variant, but GNU binutils switched to DT_FEATURE around 2000. r270304: Remove extraneous _SUNW_ in reported DT_ names Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/sys/elf_common.h stable/10/usr.bin/elfdump/elfdump.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/elf_common.h ============================================================================== --- stable/10/sys/sys/elf_common.h Tue Sep 2 14:27:12 2014 (r270968) +++ stable/10/sys/sys/elf_common.h Tue Sep 2 15:49:33 2014 (r270969) @@ -237,6 +237,7 @@ typedef struct { #define EM_ARCA 109 /* Arca RISC Microprocessor. */ #define EM_UNICORE 110 /* Microprocessor series from PKU-Unity Ltd. and MPRC of Peking University */ +#define EM_AARCH64 183 /* AArch64 (64-bit ARM) */ /* Non-standard or deprecated. */ #define EM_486 6 /* Intel i486. */ @@ -424,7 +425,7 @@ typedef struct { #define DT_PLTPADSZ 0x6ffffdf9 /* pltpadding size */ #define DT_MOVEENT 0x6ffffdfa /* move table entry size */ #define DT_MOVESZ 0x6ffffdfb /* move table size */ -#define DT_FEATURE_1 0x6ffffdfc /* feature holder */ +#define DT_FEATURE 0x6ffffdfc /* feature holder */ #define DT_POSFLAG_1 0x6ffffdfd /* flags for DT_* entries, effecting */ /* the following DT_* entry. */ /* See DF_P1_* definitions */ Modified: stable/10/usr.bin/elfdump/elfdump.c ============================================================================== --- stable/10/usr.bin/elfdump/elfdump.c Tue Sep 2 14:27:12 2014 (r270968) +++ stable/10/usr.bin/elfdump/elfdump.c Tue Sep 2 15:49:33 2014 (r270969) @@ -167,77 +167,83 @@ static int elf64_offsets[] = { /* http://www.sco.com/developers/gabi/latest/ch5.dynamic.html#tag_encodings */ static const char * -d_tags(u_int64_t tag) { +d_tags(u_int64_t tag) +{ + static char unknown_tag[48]; + switch (tag) { - case 0: return "DT_NULL"; - case 1: return "DT_NEEDED"; - case 2: return "DT_PLTRELSZ"; - case 3: return "DT_PLTGOT"; - case 4: return "DT_HASH"; - case 5: return "DT_STRTAB"; - case 6: return "DT_SYMTAB"; - case 7: return "DT_RELA"; - case 8: return "DT_RELASZ"; - case 9: return "DT_RELAENT"; - case 10: return "DT_STRSZ"; - case 11: return "DT_SYMENT"; - case 12: return "DT_INIT"; - case 13: return "DT_FINI"; - case 14: return "DT_SONAME"; - case 15: return "DT_RPATH"; - case 16: return "DT_SYMBOLIC"; - case 17: return "DT_REL"; - case 18: return "DT_RELSZ"; - case 19: return "DT_RELENT"; - case 20: return "DT_PLTREL"; - case 21: return "DT_DEBUG"; - case 22: return "DT_TEXTREL"; - case 23: return "DT_JMPREL"; - case 24: return "DT_BIND_NOW"; - case 25: return "DT_INIT_ARRAY"; - case 26: return "DT_FINI_ARRAY"; - case 27: return "DT_INIT_ARRAYSZ"; - case 28: return "DT_FINI_ARRAYSZ"; - case 29: return "DT_RUNPATH"; - case 30: return "DT_FLAGS"; - case 32: return "DT_PREINIT_ARRAY"; /* XXX: DT_ENCODING */ - case 33: return "DT_PREINIT_ARRAYSZ"; + case DT_NULL: return "DT_NULL"; + case DT_NEEDED: return "DT_NEEDED"; + case DT_PLTRELSZ: return "DT_PLTRELSZ"; + case DT_PLTGOT: return "DT_PLTGOT"; + case DT_HASH: return "DT_HASH"; + case DT_STRTAB: return "DT_STRTAB"; + case DT_SYMTAB: return "DT_SYMTAB"; + case DT_RELA: return "DT_RELA"; + case DT_RELASZ: return "DT_RELASZ"; + case DT_RELAENT: return "DT_RELAENT"; + case DT_STRSZ: return "DT_STRSZ"; + case DT_SYMENT: return "DT_SYMENT"; + case DT_INIT: return "DT_INIT"; + case DT_FINI: return "DT_FINI"; + case DT_SONAME: return "DT_SONAME"; + case DT_RPATH: return "DT_RPATH"; + case DT_SYMBOLIC: return "DT_SYMBOLIC"; + case DT_REL: return "DT_REL"; + case DT_RELSZ: return "DT_RELSZ"; + case DT_RELENT: return "DT_RELENT"; + case DT_PLTREL: return "DT_PLTREL"; + case DT_DEBUG: return "DT_DEBUG"; + case DT_TEXTREL: return "DT_TEXTREL"; + case DT_JMPREL: return "DT_JMPREL"; + case DT_BIND_NOW: return "DT_BIND_NOW"; + case DT_INIT_ARRAY: return "DT_INIT_ARRAY"; + case DT_FINI_ARRAY: return "DT_FINI_ARRAY"; + case DT_INIT_ARRAYSZ: return "DT_INIT_ARRAYSZ"; + case DT_FINI_ARRAYSZ: return "DT_FINI_ARRAYSZ"; + case DT_RUNPATH: return "DT_RUNPATH"; + case DT_FLAGS: return "DT_FLAGS"; + case DT_PREINIT_ARRAY: return "DT_PREINIT_ARRAY"; /* XXX DT_ENCODING */ + case DT_PREINIT_ARRAYSZ:return "DT_PREINIT_ARRAYSZ"; /* 0x6000000D - 0x6ffff000 operating system-specific semantics */ - case 0x6ffffdf5: return "DT_GNU_PRELINKED"; - case 0x6ffffdf6: return "DT_GNU_CONFLICTSZ"; - case 0x6ffffdf7: return "DT_GNU_LIBLISTSZ"; - case 0x6ffffdf8: return "DT_SUNW_CHECKSUM"; - case 0x6ffffdf9: return "DT_PLTPADSZ"; - case 0x6ffffdfa: return "DT_MOVEENT"; - case 0x6ffffdfb: return "DT_MOVESZ"; - case 0x6ffffdfc: return "DT_FEATURE"; - case 0x6ffffdfd: return "DT_POSFLAG_1"; - case 0x6ffffdfe: return "DT_SYMINSZ"; - case 0x6ffffdff: return "DT_SYMINENT (DT_VALRNGHI)"; - case 0x6ffffe00: return "DT_ADDRRNGLO"; - case 0x6ffffef8: return "DT_GNU_CONFLICT"; - case 0x6ffffef9: return "DT_GNU_LIBLIST"; - case 0x6ffffefa: return "DT_SUNW_CONFIG"; - case 0x6ffffefb: return "DT_SUNW_DEPAUDIT"; - case 0x6ffffefc: return "DT_SUNW_AUDIT"; - case 0x6ffffefd: return "DT_SUNW_PLTPAD"; - case 0x6ffffefe: return "DT_SUNW_MOVETAB"; - case 0x6ffffeff: return "DT_SYMINFO (DT_ADDRRNGHI)"; - case 0x6ffffff9: return "DT_RELACOUNT"; - case 0x6ffffffa: return "DT_RELCOUNT"; - case 0x6ffffffb: return "DT_FLAGS_1"; - case 0x6ffffffc: return "DT_VERDEF"; - case 0x6ffffffd: return "DT_VERDEFNUM"; - case 0x6ffffffe: return "DT_VERNEED"; - case 0x6fffffff: return "DT_VERNEEDNUM"; - case 0x6ffffff0: return "DT_GNU_VERSYM"; + case 0x6ffffdf5: return "DT_GNU_PRELINKED"; + case 0x6ffffdf6: return "DT_GNU_CONFLICTSZ"; + case 0x6ffffdf7: return "DT_GNU_LIBLISTSZ"; + case 0x6ffffdf8: return "DT_SUNW_CHECKSUM"; + case DT_PLTPADSZ: return "DT_PLTPADSZ"; + case DT_MOVEENT: return "DT_MOVEENT"; + case DT_MOVESZ: return "DT_MOVESZ"; + case DT_FEATURE: return "DT_FEATURE"; + case DT_POSFLAG_1: return "DT_POSFLAG_1"; + case DT_SYMINSZ: return "DT_SYMINSZ"; + case DT_SYMINENT : return "DT_SYMINENT (DT_VALRNGHI)"; + case DT_ADDRRNGLO: return "DT_ADDRRNGLO"; + case DT_GNU_HASH: return "DT_GNU_HASH"; + case 0x6ffffef8: return "DT_GNU_CONFLICT"; + case 0x6ffffef9: return "DT_GNU_LIBLIST"; + case DT_CONFIG: return "DT_CONFIG"; + case DT_DEPAUDIT: return "DT_DEPAUDIT"; + case DT_AUDIT: return "DT_AUDIT"; + case DT_PLTPAD: return "DT_PLTPAD"; + case DT_MOVETAB: return "DT_MOVETAB"; + case DT_SYMINFO : return "DT_SYMINFO (DT_ADDRRNGHI)"; + case DT_RELACOUNT: return "DT_RELACOUNT"; + case DT_RELCOUNT: return "DT_RELCOUNT"; + case DT_FLAGS_1: return "DT_FLAGS_1"; + case DT_VERDEF: return "DT_VERDEF"; + case DT_VERDEFNUM: return "DT_VERDEFNUM"; + case DT_VERNEED: return "DT_VERNEED"; + case DT_VERNEEDNUM: return "DT_VERNEEDNUM"; + case 0x6ffffff0: return "DT_GNU_VERSYM"; /* 0x70000000 - 0x7fffffff processor-specific semantics */ - case 0x70000000: return "DT_IA_64_PLT_RESERVE"; - case 0x7ffffffd: return "DT_SUNW_AUXILIARY"; - case 0x7ffffffe: return "DT_SUNW_USED"; - case 0x7fffffff: return "DT_SUNW_FILTER"; - default: return "ERROR: TAG NOT DEFINED"; - } + case 0x70000000: return "DT_IA_64_PLT_RESERVE"; + case 0x7ffffffd: return "DT_SUNW_AUXILIARY"; + case 0x7ffffffe: return "DT_SUNW_USED"; + case 0x7fffffff: return "DT_SUNW_FILTER"; + } + snprintf(unknown_tag, sizeof(unknown_tag), + "ERROR: TAG NOT DEFINED -- tag 0x%jx", (uintmax_t)tag); + return (unknown_tag); } static const char * @@ -261,6 +267,7 @@ e_machines(u_int mach) case EM_SPARCV9:return "EM_SPARCV9"; case EM_IA_64: return "EM_IA_64"; case EM_X86_64: return "EM_X86_64"; + case EM_AARCH64:return "EM_AARCH64"; } snprintf(machdesc, sizeof(machdesc), "(unknown machine) -- type 0x%x", mach); @@ -303,40 +310,88 @@ static const char *p_flags[] = { /* http://www.sco.com/developers/gabi/latest/ch4.sheader.html#sh_type */ static const char * -sh_types(u_int64_t sht) { - switch (sht) { - case 0: return "SHT_NULL"; - case 1: return "SHT_PROGBITS"; - case 2: return "SHT_SYMTAB"; - case 3: return "SHT_STRTAB"; - case 4: return "SHT_RELA"; - case 5: return "SHT_HASH"; - case 6: return "SHT_DYNAMIC"; - case 7: return "SHT_NOTE"; - case 8: return "SHT_NOBITS"; - case 9: return "SHT_REL"; - case 10: return "SHT_SHLIB"; - case 11: return "SHT_DYNSYM"; - case 14: return "SHT_INIT_ARRAY"; - case 15: return "SHT_FINI_ARRAY"; - case 16: return "SHT_PREINIT_ARRAY"; - case 17: return "SHT_GROUP"; - case 18: return "SHT_SYMTAB_SHNDX"; - /* 0x60000000 - 0x6fffffff operating system-specific semantics */ - case 0x6ffffff0: return "XXX:VERSYM"; - case 0x6ffffff4: return "SHT_SUNW_dof"; - case 0x6ffffff7: return "SHT_GNU_LIBLIST"; - case 0x6ffffffc: return "XXX:VERDEF"; - case 0x6ffffffd: return "SHT_SUNW(GNU)_verdef"; - case 0x6ffffffe: return "SHT_SUNW(GNU)_verneed"; - case 0x6fffffff: return "SHT_SUNW(GNU)_versym"; - /* 0x70000000 - 0x7fffffff processor-specific semantics */ - case 0x70000000: return "SHT_IA_64_EXT"; - case 0x70000001: return "SHT_IA_64_UNWIND"; - case 0x7ffffffd: return "XXX:AUXILIARY"; - case 0x7fffffff: return "XXX:FILTER"; - /* 0x80000000 - 0xffffffff application programs */ - default: return "ERROR: SHT NOT DEFINED"; +sh_types(uint64_t machine, uint64_t sht) { + static char unknown_buf[64]; + + if (sht < 0x60000000) { + switch (sht) { + case SHT_NULL: return "SHT_NULL"; + case SHT_PROGBITS: return "SHT_PROGBITS"; + case SHT_SYMTAB: return "SHT_SYMTAB"; + case SHT_STRTAB: return "SHT_STRTAB"; + case SHT_RELA: return "SHT_RELA"; + case SHT_HASH: return "SHT_HASH"; + case SHT_DYNAMIC: return "SHT_DYNAMIC"; + case SHT_NOTE: return "SHT_NOTE"; + case SHT_NOBITS: return "SHT_NOBITS"; + case SHT_REL: return "SHT_REL"; + case SHT_SHLIB: return "SHT_SHLIB"; + case SHT_DYNSYM: return "SHT_DYNSYM"; + case SHT_INIT_ARRAY: return "SHT_INIT_ARRAY"; + case SHT_FINI_ARRAY: return "SHT_FINI_ARRAY"; + case SHT_PREINIT_ARRAY: return "SHT_PREINIT_ARRAY"; + case SHT_GROUP: return "SHT_GROUP"; + case SHT_SYMTAB_SHNDX: return "SHT_SYMTAB_SHNDX"; + } + snprintf(unknown_buf, sizeof(unknown_buf), + "ERROR: SHT %ju NOT DEFINED", (uintmax_t)sht); + return (unknown_buf); + } else if (sht < 0x70000000) { + /* 0x60000000-0x6fffffff operating system-specific semantics */ + switch (sht) { + case 0x6ffffff0: return "XXX:VERSYM"; + case SHT_SUNW_dof: return "SHT_SUNW_dof"; + case SHT_GNU_HASH: return "SHT_GNU_HASH"; + case 0x6ffffff7: return "SHT_GNU_LIBLIST"; + case 0x6ffffffc: return "XXX:VERDEF"; + case SHT_SUNW_verdef: return "SHT_SUNW(GNU)_verdef"; + case SHT_SUNW_verneed: return "SHT_SUNW(GNU)_verneed"; + case SHT_SUNW_versym: return "SHT_SUNW(GNU)_versym"; + } + snprintf(unknown_buf, sizeof(unknown_buf), + "ERROR: OS-SPECIFIC SHT 0x%jx NOT DEFINED", + (uintmax_t)sht); + return (unknown_buf); + } else if (sht < 0x80000000) { + /* 0x70000000-0x7fffffff processor-specific semantics */ + switch (machine) { + case EM_ARM: + switch (sht) { + case SHT_ARM_EXIDX: return "SHT_ARM_EXIDX"; + case SHT_ARM_PREEMPTMAP:return "SHT_ARM_PREEMPTMAP"; + case SHT_ARM_ATTRIBUTES:return "SHT_ARM_ATTRIBUTES"; + case SHT_ARM_DEBUGOVERLAY: + return "SHT_ARM_DEBUGOVERLAY"; + case SHT_ARM_OVERLAYSECTION: + return "SHT_ARM_OVERLAYSECTION"; + } + break; + case EM_IA_64: + switch (sht) { + case 0x70000000: return "SHT_IA_64_EXT"; + case 0x70000001: return "SHT_IA_64_UNWIND"; + } + break; + case EM_MIPS: + switch (sht) { + case SHT_MIPS_OPTIONS: return "SHT_MIPS_OPTIONS"; + } + break; + } + switch (sht) { + case 0x7ffffffd: return "XXX:AUXILIARY"; + case 0x7fffffff: return "XXX:FILTER"; + } + snprintf(unknown_buf, sizeof(unknown_buf), + "ERROR: PROCESSOR-SPECIFIC SHT 0x%jx NOT DEFINED", + (uintmax_t)sht); + return (unknown_buf); + } else { + /* 0x80000000-0xffffffff application programs */ + snprintf(unknown_buf, sizeof(unknown_buf), + "ERROR: SHT 0x%jx NOT DEFINED", + (uintmax_t)sht); + return (unknown_buf); } } @@ -704,6 +759,7 @@ elf_print_shdr(Elf32_Ehdr *e, void *sh) u_int64_t info; u_int64_t addralign; u_int64_t entsize; + u_int64_t machine; void *v; int i; @@ -712,6 +768,7 @@ elf_print_shdr(Elf32_Ehdr *e, void *sh) return; } + machine = elf_get_quarter(e, e, E_MACHINE); shentsize = elf_get_quarter(e, e, E_SHENTSIZE); shnum = elf_get_shnum(e, sh); fprintf(out, "\nsection header:\n"); @@ -730,7 +787,7 @@ elf_print_shdr(Elf32_Ehdr *e, void *sh) fprintf(out, "\n"); fprintf(out, "entry: %d\n", i); fprintf(out, "\tsh_name: %s\n", shstrtab + name); - fprintf(out, "\tsh_type: %s\n", sh_types(type)); + fprintf(out, "\tsh_type: %s\n", sh_types(machine, type)); fprintf(out, "\tsh_flags: %s\n", sh_flags[flags & 0x7]); fprintf(out, "\tsh_addr: %#jx\n", addr); fprintf(out, "\tsh_offset: %jd\n", (intmax_t)offset); From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 16:06:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 519053BF; Tue, 2 Sep 2014 16:06:11 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24F6F1CE1; Tue, 2 Sep 2014 16:06:11 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A77D7B924; Tue, 2 Sep 2014 12:06:09 -0400 (EDT) From: John Baldwin To: Peter Wemm Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm Date: Tue, 2 Sep 2014 12:01:15 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <201408281950.s7SJo90I047213@svn.freebsd.org> <39211177.i8nn9sHiCx@overcee.wemm.org> In-Reply-To: <39211177.i8nn9sHiCx@overcee.wemm.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201409021201.15967.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 02 Sep 2014 12:06:09 -0400 (EDT) Cc: src-committers@freebsd.org, Alan Cox , svn-src-all@freebsd.org, Dmitry Morozovsky , "Matthew D. Fuller" , svn-src-head@freebsd.org, Steven Hartland X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 16:06:11 -0000 On Saturday, August 30, 2014 1:37:43 pm Peter Wemm wrote: > On Saturday 30 August 2014 02:03:42 Steven Hartland wrote: > I'm very disappointed in the attention to detail and errors in the commit. > I'm almost at the point where I want to ask for the whole thing to be backed > out. I would not be too supportive of that. This PR has been open for a long, long time with many users using patches from it in production loads that were greatly improved by the changes and clamoring on the lists multiple times to get someone to look at it. avg@ contributed quite a bit of time to diagnose this with Karl early on, but other developers aside from Steven did not. It also was not hard to explain to Karl the meaning of 'cache + free' in the bug follow-ups itself (though I believe avg@ had tried this before and it didn't sink in that time for some reason). I know Steven has since committed a fix, but if there are still concerns, I think it would be best to not just revert this entirely but to spend some time fixing the remaining issues. Clearly this issue affects a lot of users and the earlier fixes to pagedaemon were not sufficient to fix their issues alone. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 16:14:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3267E8BB; Tue, 2 Sep 2014 16:14:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DB731DEC; Tue, 2 Sep 2014 16:14:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82GEGu1020141; Tue, 2 Sep 2014 16:14:16 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82GEGbq020140; Tue, 2 Sep 2014 16:14:16 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409021614.s82GEGbq020140@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 2 Sep 2014 16:14:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270970 - stable/10/usr.sbin/ctld X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 16:14:17 -0000 Author: ngie Date: Tue Sep 2 16:14:16 2014 New Revision: 270970 URL: http://svnweb.freebsd.org/changeset/base/270970 Log: MFC r270179: Add missing libraries to DPADD; sort DPADD so DPADD and LDADD match up This fixes "make checkdpadd" Approved by: jmmv (mentor) Phabric: D630 PR: 192765 Modified: stable/10/usr.sbin/ctld/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/Makefile ============================================================================== --- stable/10/usr.sbin/ctld/Makefile Tue Sep 2 15:49:33 2014 (r270969) +++ stable/10/usr.sbin/ctld/Makefile Tue Sep 2 16:14:16 2014 (r270970) @@ -9,8 +9,8 @@ CFLAGS+= -I${.CURDIR}/../../sys/dev/iscs #CFLAGS+= -DICL_KERNEL_PROXY MAN= ctld.8 ctl.conf.5 -DPADD= ${LIBCAM} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL} -LDADD= -lbsdxml -lcam -lcrypto -lfl -lsbuf -lssl -lutil +DPADD= ${LIBBSDXML} ${LIBCAM} ${LIBCRYPTO} ${LIBL} ${LIBSBUF} ${LIBSSL} ${LIBUTIL} +LDADD= -lbsdxml -lcam -lcrypto -ll -lsbuf -lssl -lutil YFLAGS+= -v CLEANFILES= y.tab.c y.tab.h y.output From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 16:36:50 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 110B9340; Tue, 2 Sep 2014 16:36:50 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 8FC531195; Tue, 2 Sep 2014 16:36:48 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA29497; Tue, 02 Sep 2014 19:36:40 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XOr4S-000CKM-J1; Tue, 02 Sep 2014 19:36:40 +0300 Message-ID: <5405F1F3.1@FreeBSD.org> Date: Tue, 02 Sep 2014 19:36:03 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: John Baldwin , Peter Wemm , Steven Hartland Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm References: <201408281950.s7SJo90I047213@svn.freebsd.org> <39211177.i8nn9sHiCx@overcee.wemm.org> <201409021201.15967.jhb@freebsd.org> In-Reply-To: <201409021201.15967.jhb@freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, Alan Cox , svn-src-all@FreeBSD.org, Dmitry Morozovsky , "Matthew D. Fuller" , svn-src-head@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 16:36:50 -0000 on 02/09/2014 19:01 John Baldwin said the following: > I know Steven has since committed a fix, but if there are still concerns, I > think it would be best to not just revert this entirely but to spend some time > fixing the remaining issues. Clearly this issue affects a lot of users and > the earlier fixes to pagedaemon were not sufficient to fix their issues alone. I am not sure that that is the case. I could have very well missed an evidence of that, but then I'd appreciate a pointer or two to such reports. I am certainly sure that a large number of reports about "ZFS vs swapping" issue appeared after the pagedaemon problem was introduced. I have also missed any "theoretical" justification for the patch. That is, an explanation of how the patch interacts with the pagedaemon and improves things. The empirical evidence could be insufficient, because it's easy to tilt the balance such that the ARC gives in too easily. But people who were affected by the opposite problem could be different from people who would be affected by the new problem, because of differences in system characteristics such as amount of RAM, workload patterns, working set sizes, etc. Having said that, I do not ask for the changes to be reverted, but I'll probably get back after I have sufficient time to look at the patch and also to test its effect on my systems. This might not be very soon though. P.S. I think that there was no technical reason to initialize the newly introduced parameters via SYSINIT mechanism. I think that the initialization could be just done in arc_init. And the newly added kmem_foo() functions probably do not belong in cddl/compat/opensolaris as Solaris / illumos does not have those functions. I think that in this case e.g. vm_cnt.v_free_target can just be used directly by the FreeBSD-specific ARC code. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 16:38:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3165549A; Tue, 2 Sep 2014 16:38:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D64611C2; Tue, 2 Sep 2014 16:38:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82Gc0eS030197; Tue, 2 Sep 2014 16:38:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82Gc0oC030191; Tue, 2 Sep 2014 16:38:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201409021638.s82Gc0oC030191@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 2 Sep 2014 16:38:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270971 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 16:38:01 -0000 Author: imp Date: Tue Sep 2 16:38:00 2014 New Revision: 270971 URL: http://svnweb.freebsd.org/changeset/base/270971 Log: The proper compatibility string for the AHCI device is allwinner,sun4i-ahci, so use that instead of the older string which had become FreeBSD specific. Modified: head/sys/boot/fdt/dts/arm/cubieboard2.dts head/sys/boot/fdt/dts/arm/sun4i-a10.dtsi head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi Modified: head/sys/boot/fdt/dts/arm/cubieboard2.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/cubieboard2.dts Tue Sep 2 16:14:16 2014 (r270970) +++ head/sys/boot/fdt/dts/arm/cubieboard2.dts Tue Sep 2 16:38:00 2014 (r270971) @@ -60,6 +60,10 @@ emac@01c0b000 { status = "okay"; }; + + ahci: sata@01c18000 { + status = "okay"; + }; }; chosen { Modified: head/sys/boot/fdt/dts/arm/sun4i-a10.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/sun4i-a10.dtsi Tue Sep 2 16:14:16 2014 (r270970) +++ head/sys/boot/fdt/dts/arm/sun4i-a10.dtsi Tue Sep 2 16:38:00 2014 (r270971) @@ -104,7 +104,7 @@ }; sata@01c18000 { - compatible = "allwinner,ahci"; + compatible = "allwinner,sun4i-ahci"; reg = <0x01c18000 0x1000>; interrupts = <56>; interrupt-parent = <&AINTC>; Modified: head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi Tue Sep 2 16:14:16 2014 (r270970) +++ head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi Tue Sep 2 16:38:00 2014 (r270971) @@ -110,7 +110,7 @@ }; sata@01c18000 { - compatible = "allwinner,ahci"; + compatible = "allwinner,sun4i-a10-ahci"; reg = <0x01c18000 0x1000>; interrupts = <56>; interrupt-parent = <&GIC>; From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 17:18:44 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1876A6E6; Tue, 2 Sep 2014 17:18:44 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E04C118B9; Tue, 2 Sep 2014 17:18:43 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s82HIfee057115 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 2 Sep 2014 10:18:42 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s82HIf6D057114; Tue, 2 Sep 2014 10:18:41 -0700 (PDT) (envelope-from jmg) Date: Tue, 2 Sep 2014 10:18:41 -0700 From: John-Mark Gurney To: Roger Pau =?iso-8859-1?Q?Monn=E9?= Subject: Re: svn commit: r269814 - head/sys/dev/xen/blkfront Message-ID: <20140902171841.GX71691@funkthat.com> References: <53e8e31e.2179.30c1c657@svn.freebsd.org> <53FF7386.3050804@FreeBSD.org> <20140828184515.GV71691@funkthat.com> <53FF7BC4.6050801@FreeBSD.org> <5400BDC7.7020902@FreeBSD.org> <54058E1E.4050907@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <54058E1E.4050907@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Tue, 02 Sep 2014 10:18:42 -0700 (PDT) Cc: src-committers@FreeBSD.org, Alexander Motin , scottl@FreeBSD.org, cperciva@FreeBSD.org, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 17:18:44 -0000 Roger Pau Monn wrote this message on Tue, Sep 02, 2014 at 11:30 +0200: > El 29/08/14 a les 19.52, Roger Pau Monné ha escrit: > > El 28/08/14 a les 20.58, Alexander Motin ha escrit: > >> On 28.08.2014 21:45, John-Mark Gurney wrote: > >>> Alexander Motin wrote this message on Thu, Aug 28, 2014 at 21:23 +0300: > >>>> Hi, Roger. > >>>> > >>>> It looks to me like this commit does not work as it should. I got > >>>> problem when I just tried `newfs /dev/ada0 ; mount /dev/ada0 /mnt`. > >>>> Somehow newfs does not produce valid filesystem. Problem is reliably > >>>> repeatable and reverting this commit fixes it. > >>>> > >>>> I found at least one possible cause there: If original data buffer is > >>>> unmapped, misaligned and not physically contiguous, then present x86 > >>>> bus_dmamap_load_bio() implementation will process each physically > >>>> contiguous segment separately. Due to the misalignment first and last > >>>> physical segments may have size not multiple to 512 bytes. Since each > >>>> segment processed separately, they are not joined together, and > >>>> xbd_queue_cb() is getting segments not multiple to 512 bytes. Attempt to > >>>> convert them to exact number of sectors in the driver cause data corruption. > >>> > >>> Are you sure this isn't a problem w/ the tag not properly specifying > >>> the correct alignement? > >> > >> I don't know how to specify it stronger then this: > >> error = bus_dma_tag_create( > >> bus_get_dma_tag(sc->xbd_dev), /* parent */ > >> 512, PAGE_SIZE, /* algnmnt, boundary */ > >> BUS_SPACE_MAXADDR, /* lowaddr */ > >> BUS_SPACE_MAXADDR, /* highaddr */ > >> NULL, NULL, /* filter, filterarg */ > >> sc->xbd_max_request_size, > >> sc->xbd_max_request_segments, > >> PAGE_SIZE, /* maxsegsize */ > >> BUS_DMA_ALLOCNOW, /* flags */ > >> busdma_lock_mutex, /* lockfunc */ > >> &sc->xbd_io_lock, /* lockarg */ > >> &sc->xbd_io_dmat); > >> > >>> Also, I don't think there is a way for busdma > >>> to say that you MUST have a segment be a multiple of 512, though you > >>> could use a 512 boundary, but that would force all segments to only be > >>> 512 bytes... > >> > >> As I understand, that is mandatory requirement for this "hardware". > >> Alike 4K alignment requirement also exist at least for SDHCI, and IIRC > >> UHCI/OHCI hardware. Even AHCI requires both segment addresses and > >> lengths to be even. > >> > >> I may be wrong, but I think it is quite likely that hardware that > >> requires segment address alignment quite likely will have the same > >> requirements for segments length. > > Hello, > > I have the following fix, which makes sure the total length and the > size of each segment is aligned. I'm not very knowledgeable of the > busdma code, so someone has to review it. I feel that this alignment should only be enforced via a new option on the tag... I don't see how alignment and segment size should be conflated... I could totally see a device that requires an alignement of 8 bytes, but has a segment size of 16, or vice versa, and requiring them to be the same means we will bounce unnecesarily... cc'd scottl since he knows this code better than I... and cperciva as he touched it for similar reasons.. Oh, I just found PR 152818, where cperciva did a similar fix to bounce_bus_dmamap_load_buffer for the exact same reason... It was committed in r216194... > --- > diff --git a/sys/x86/x86/busdma_bounce.c b/sys/x86/x86/busdma_bounce.c > index d1c75f8..688f559 100644 > --- a/sys/x86/x86/busdma_bounce.c > +++ b/sys/x86/x86/busdma_bounce.c > @@ -620,6 +620,8 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map, > segs = dmat->segments; > > if ((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) { > + /* Make sure buflen is aligned */ > + buflen = roundup2(buflen, dmat->common.alignment); > _bus_dmamap_count_phys(dmat, map, buf, buflen, flags); > if (map->pagesneeded != 0) { > error = _bus_dmamap_reserve_pages(dmat, map, flags); > @@ -634,6 +636,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map, > if (((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) && > map->pagesneeded != 0 && > bus_dma_run_filter(&dmat->common, curaddr)) { > + sgsize = roundup2(sgsize, dmat->common.alignment); > sgsize = MIN(sgsize, PAGE_SIZE); > curaddr = add_bounce_page(dmat, map, 0, curaddr, > sgsize); > Doesn't this same change need to be made to _bus_dmamap_count_phys so that the cound will be correct? Also, make sure you review the other arch's bounce implementations, as they were often copied from the x86 one... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 17:24:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A87CA76; Tue, 2 Sep 2014 17:24:00 +0000 (UTC) Received: from pp2.rice.edu (proofpoint2.mail.rice.edu [128.42.201.101]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CEB21985; Tue, 2 Sep 2014 17:23:59 +0000 (UTC) Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.14.5/8.14.5) with SMTP id s82HCKU4008536; Tue, 2 Sep 2014 12:23:57 -0500 Received: from mh3.mail.rice.edu (mh3.mail.rice.edu [128.42.199.10]) by pp2.rice.edu with ESMTP id 1p574dgbh8-1; Tue, 02 Sep 2014 12:23:57 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh3.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh3.mail.rice.edu (Postfix) with ESMTPSA id 15013403F0; Tue, 2 Sep 2014 12:23:57 -0500 (CDT) Message-ID: <5405FD2C.8000901@rice.edu> Date: Tue, 02 Sep 2014 12:23:56 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: John Baldwin , Peter Wemm Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm References: <201408281950.s7SJo90I047213@svn.freebsd.org> <39211177.i8nn9sHiCx@overcee.wemm.org> <201409021201.15967.jhb@freebsd.org> In-Reply-To: <201409021201.15967.jhb@freebsd.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=0 kscore.compositescore=0 circleOfTrustscore=0 compositescore=0.248919945447816 urlsuspect_oldscore=0.248919945447816 suspectscore=11 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=0 rbsscore=0.248919945447816 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1409020196 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Dmitry Morozovsky , "Matthew D. Fuller" , svn-src-head@freebsd.org, Steven Hartland X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 17:24:00 -0000 On 09/02/2014 11:01, John Baldwin wrote: > On Saturday, August 30, 2014 1:37:43 pm Peter Wemm wrote: >> On Saturday 30 August 2014 02:03:42 Steven Hartland wrote: >> I'm very disappointed in the attention to detail and errors in the commit. >> I'm almost at the point where I want to ask for the whole thing to be backed >> out. > I would not be too supportive of that. This PR has been open for a long, long > time with many users using patches from it in production loads that were > greatly improved by the changes and clamoring on the lists multiple times to > get someone to look at it. avg@ contributed quite a bit of time to diagnose > this with Karl early on, but other developers aside from Steven did not. It > also was not hard to explain to Karl the meaning of 'cache + free' in the bug > follow-ups itself (though I believe avg@ had tried this before and it didn't > sink in that time for some reason). > > I know Steven has since committed a fix, but if there are still concerns, I > think it would be best to not just revert this entirely but to spend some time > fixing the remaining issues. Clearly this issue affects a lot of users and > the earlier fixes to pagedaemon were not sufficient to fix their issues alone. > The patch actually makes two completely orthogonal changes at once, and one of those changes has no connection to the page daemon. I suspect that is why some people have said that their issues were not addressed by the page daemon fix. Prior to this patch, we were limiting the ARC size to 3/4 the kmem map/arena/object size on all architectures, including 64-bit, uma_small_alloc-enabled architectures where such a limit makes no sense. Consequently, some people were complaining, "Why is 1/4 of my memory going unused?" From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 17:27:48 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BBE1E8B; Tue, 2 Sep 2014 17:27:48 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E397819DC; Tue, 2 Sep 2014 17:27:47 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s82HRkVN057293 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 2 Sep 2014 10:27:47 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s82HRkkk057292; Tue, 2 Sep 2014 10:27:46 -0700 (PDT) (envelope-from jmg) Date: Tue, 2 Sep 2014 10:27:46 -0700 From: John-Mark Gurney To: Roger Pau =?iso-8859-1?Q?Monn=E9?= Subject: Re: svn commit: r269814 - head/sys/dev/xen/blkfront Message-ID: <20140902172746.GY71691@funkthat.com> References: <53e8e31e.2179.30c1c657@svn.freebsd.org> <53FF7386.3050804@FreeBSD.org> <20140828184515.GV71691@funkthat.com> <53FF7BC4.6050801@FreeBSD.org> <5400BDC7.7020902@FreeBSD.org> <54058E1E.4050907@FreeBSD.org> <20140902171841.GX71691@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20140902171841.GX71691@funkthat.com> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Tue, 02 Sep 2014 10:27:47 -0700 (PDT) Cc: src-committers@FreeBSD.org, Alexander Motin , scottl@FreeBSD.org, cperciva@FreeBSD.org, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 17:27:48 -0000 John-Mark Gurney wrote this message on Tue, Sep 02, 2014 at 10:18 -0700: > Roger Pau Monn wrote this message on Tue, Sep 02, 2014 at 11:30 +0200: > > El 29/08/14 a les 19.52, Roger Pau Monné ha escrit: > > > El 28/08/14 a les 20.58, Alexander Motin ha escrit: > > >> On 28.08.2014 21:45, John-Mark Gurney wrote: > > >>> Alexander Motin wrote this message on Thu, Aug 28, 2014 at 21:23 +0300: > > >>>> Hi, Roger. > > >>>> > > >>>> It looks to me like this commit does not work as it should. I got > > >>>> problem when I just tried `newfs /dev/ada0 ; mount /dev/ada0 /mnt`. > > >>>> Somehow newfs does not produce valid filesystem. Problem is reliably > > >>>> repeatable and reverting this commit fixes it. > > >>>> > > >>>> I found at least one possible cause there: If original data buffer is > > >>>> unmapped, misaligned and not physically contiguous, then present x86 > > >>>> bus_dmamap_load_bio() implementation will process each physically > > >>>> contiguous segment separately. Due to the misalignment first and last > > >>>> physical segments may have size not multiple to 512 bytes. Since each > > >>>> segment processed separately, they are not joined together, and > > >>>> xbd_queue_cb() is getting segments not multiple to 512 bytes. Attempt to > > >>>> convert them to exact number of sectors in the driver cause data corruption. > > >>> > > >>> Are you sure this isn't a problem w/ the tag not properly specifying > > >>> the correct alignement? > > >> > > >> I don't know how to specify it stronger then this: > > >> error = bus_dma_tag_create( > > >> bus_get_dma_tag(sc->xbd_dev), /* parent */ > > >> 512, PAGE_SIZE, /* algnmnt, boundary */ > > >> BUS_SPACE_MAXADDR, /* lowaddr */ > > >> BUS_SPACE_MAXADDR, /* highaddr */ > > >> NULL, NULL, /* filter, filterarg */ > > >> sc->xbd_max_request_size, > > >> sc->xbd_max_request_segments, > > >> PAGE_SIZE, /* maxsegsize */ > > >> BUS_DMA_ALLOCNOW, /* flags */ > > >> busdma_lock_mutex, /* lockfunc */ > > >> &sc->xbd_io_lock, /* lockarg */ > > >> &sc->xbd_io_dmat); > > >> > > >>> Also, I don't think there is a way for busdma > > >>> to say that you MUST have a segment be a multiple of 512, though you > > >>> could use a 512 boundary, but that would force all segments to only be > > >>> 512 bytes... > > >> > > >> As I understand, that is mandatory requirement for this "hardware". > > >> Alike 4K alignment requirement also exist at least for SDHCI, and IIRC > > >> UHCI/OHCI hardware. Even AHCI requires both segment addresses and > > >> lengths to be even. > > >> > > >> I may be wrong, but I think it is quite likely that hardware that > > >> requires segment address alignment quite likely will have the same > > >> requirements for segments length. > > > > Hello, > > > > I have the following fix, which makes sure the total length and the > > size of each segment is aligned. I'm not very knowledgeable of the > > busdma code, so someone has to review it. > > I feel that this alignment should only be enforced via a new option on > the tag... I don't see how alignment and segment size should be > conflated... I could totally see a device that requires an alignement > of 8 bytes, but has a segment size of 16, or vice versa, and requiring > them to be the same means we will bounce unnecesarily... > > cc'd scottl since he knows this code better than I... and cperciva as > he touched it for similar reasons.. > > Oh, I just found PR 152818, where cperciva did a similar fix to > bounce_bus_dmamap_load_buffer for the exact same reason... It was > committed in r216194... Also, if this change is made w/o adding a field to the tag, the busdma man page needs to be updated w/ the fact that alignment also forces segment sizes to be alignment sized... cperciva forgot this when he did his commit... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 17:34:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 636D248E; Tue, 2 Sep 2014 17:34:59 +0000 (UTC) Received: from smtp1.multiplay.co.uk (smtp1.multiplay.co.uk [85.236.96.35]) by mx1.freebsd.org (Postfix) with ESMTP id 225CA1AC4; Tue, 2 Sep 2014 17:34:58 +0000 (UTC) Received: by smtp1.multiplay.co.uk (Postfix, from userid 65534) id 6D0E520E7088F; Tue, 2 Sep 2014 17:34:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.multiplay.co.uk X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=8.0 tests=AWL,BAYES_00,DOS_OE_TO_MX, FSL_HELO_NON_FQDN_1,RDNS_DYNAMIC,STOX_REPLY_TYPE autolearn=no version=3.3.1 Received: from r2d2 (82-69-141-170.dsl.in-addr.zen.co.uk [82.69.141.170]) by smtp1.multiplay.co.uk (Postfix) with ESMTPS id F11B520E7088C; Tue, 2 Sep 2014 17:34:53 +0000 (UTC) Message-ID: From: "Steven Hartland" To: "Alan Cox" , "John Baldwin" , "Peter Wemm" References: <201408281950.s7SJo90I047213@svn.freebsd.org> <39211177.i8nn9sHiCx@overcee.wemm.org> <201409021201.15967.jhb@freebsd.org> <5405FD2C.8000901@rice.edu> Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm Date: Tue, 2 Sep 2014 18:34:55 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-15"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dmitry Morozovsky , "Matthew D. Fuller" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 17:34:59 -0000 ----- Original Message ----- From: "Alan Cox" > On 09/02/2014 11:01, John Baldwin wrote: >> On Saturday, August 30, 2014 1:37:43 pm Peter Wemm wrote: >>> On Saturday 30 August 2014 02:03:42 Steven Hartland wrote: >>> I'm very disappointed in the attention to detail and errors in the commit. >>> I'm almost at the point where I want to ask for the whole thing to be backed >>> out. >> I would not be too supportive of that. This PR has been open for a long, long >> time with many users using patches from it in production loads that were >> greatly improved by the changes and clamoring on the lists multiple times to >> get someone to look at it. avg@ contributed quite a bit of time to diagnose >> this with Karl early on, but other developers aside from Steven did not. It >> also was not hard to explain to Karl the meaning of 'cache + free' in the bug >> follow-ups itself (though I believe avg@ had tried this before and it didn't >> sink in that time for some reason). >> >> I know Steven has since committed a fix, but if there are still concerns, I >> think it would be best to not just revert this entirely but to spend some time >> fixing the remaining issues. Clearly this issue affects a lot of users and >> the earlier fixes to pagedaemon were not sufficient to fix their issues alone. >> > > The patch actually makes two completely orthogonal changes at once, and > one of those changes has no connection to the page daemon. I suspect > that is why some people have said that their issues were not addressed > by the page daemon fix. > > Prior to this patch, we were limiting the ARC size to 3/4 the kmem > map/arena/object size on all architectures, including 64-bit, > uma_small_alloc-enabled architectures where such a limit makes no > sense. Consequently, some people were complaining, "Why is 1/4 of my > memory going unused?" This is exactly the problem which lead me into investigating the issue. It should be noted that for i386, as requested by Peter, this limitation has been re-applied. Regards Steve From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 17:43:20 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78712809; Tue, 2 Sep 2014 17:43:20 +0000 (UTC) Received: from smtp1.multiplay.co.uk (smtp1.multiplay.co.uk [85.236.96.35]) by mx1.freebsd.org (Postfix) with ESMTP id 0F0541BB8; Tue, 2 Sep 2014 17:43:19 +0000 (UTC) Received: by smtp1.multiplay.co.uk (Postfix, from userid 65534) id D18B220E70890; Tue, 2 Sep 2014 17:43:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.multiplay.co.uk X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=8.0 tests=AWL,BAYES_00,DOS_OE_TO_MX, FSL_HELO_NON_FQDN_1,RDNS_DYNAMIC,STOX_REPLY_TYPE autolearn=no version=3.3.1 Received: from r2d2 (82-69-141-170.dsl.in-addr.zen.co.uk [82.69.141.170]) by smtp1.multiplay.co.uk (Postfix) with ESMTPS id 1117320E7088C; Tue, 2 Sep 2014 17:43:17 +0000 (UTC) Message-ID: <8AA1D02BB967468DA07731149E95390D@multiplay.co.uk> From: "Steven Hartland" To: "Andriy Gapon" , "John Baldwin" , "Peter Wemm" References: <201408281950.s7SJo90I047213@svn.freebsd.org> <39211177.i8nn9sHiCx@overcee.wemm.org> <201409021201.15967.jhb@freebsd.org> <5405F1F3.1@FreeBSD.org> Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm Date: Tue, 2 Sep 2014 18:43:18 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-15"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Cc: src-committers@FreeBSD.org, Alan Cox , svn-src-all@FreeBSD.org, Dmitry Morozovsky , "Matthew D. Fuller" , svn-src-head@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 17:43:20 -0000 ----- Original Message ----- From: "Andriy Gapon" > on 02/09/2014 19:01 John Baldwin said the following: >> I know Steven has since committed a fix, but if there are still >> concerns, I >> think it would be best to not just revert this entirely but to spend >> some time >> fixing the remaining issues. Clearly this issue affects a lot of >> users and >> the earlier fixes to pagedaemon were not sufficient to fix their >> issues alone. > > I am not sure that that is the case. I could have very well missed an > evidence > of that, but then I'd appreciate a pointer or two to such reports. > I am certainly sure that a large number of reports about "ZFS vs > swapping" issue > appeared after the pagedaemon problem was introduced. > > I have also missed any "theoretical" justification for the patch. > That is, an > explanation of how the patch interacts with the pagedaemon and > improves things. > The empirical evidence could be insufficient, because it's easy to > tilt the > balance such that the ARC gives in too easily. But people who were > affected by > the opposite problem could be different from people who would be > affected by the > new problem, because of differences in system characteristics such as > amount of > RAM, workload patterns, working set sizes, etc. > > Having said that, I do not ask for the changes to be reverted, but > I'll probably > get back after I have sufficient time to look at the patch and also to > test its > effect on my systems. This might not be very soon though. > > P.S. I think that there was no technical reason to initialize the > newly > introduced parameters via SYSINIT mechanism. I created the SYSINT as the values are not available early enough for the sysctl. > I think that the initialization could be just done in arc_init. I thought I'd tested this when doing the initial implementation but it was a long week so I just did a quick re-test and confirmed arc_init is called before the pagedaemon is initialised so it can't be used in this case. On a side note it would be nice if ARC sysctls, which are currently done via arc_init, where cleaned up as currently the limits aren't enforced correctly when manually changed, as well as being split up into two locations making them hard to follow. Something I intend to look at when I get some free time. > And the newly added kmem_foo() functions probably do not belong in > cddl/compat/opensolaris as Solaris / illumos does not have those > functions. They could be moved but their current location keeps all the kmem related functions neatly in one place. Spreading them around IMO would just make things hard to find. > I think that in this case e.g. vm_cnt.v_free_target can just be > used directly by the FreeBSD-specific ARC code. It could but as above keeping everything in one place makes it to find and hence MFC as this area has seen changes which will require all those fields renamed. It also means if the logic for free pages changes in the future there's only one place it needs to be changed. For those interested there's also an open review on additional changes in this area: https://reviews.freebsd.org/D702 Regards Steve From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 17:46:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5ED039A7 for ; Tue, 2 Sep 2014 17:46:02 +0000 (UTC) Received: from o1.l99.sendgrid.net (o1.l99.sendgrid.net [198.37.153.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 023811BD5 for ; Tue, 2 Sep 2014 17:46:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h=from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=JPD5EVRwPoW01MikeRDo033mK7Y=; b=p7ThUPK5kv4yXMPrMi m9UXZ8h/mZfM4ykX4sxpibhVI3zJE0ow/itt97o8STw+d+UKL+e30c88ndMoTWs5 JfFQ5cK+UcIg7F8OFwdpMxJ+sABXjUPfMkJZB3S2+KH58k9DI5s1bcx1kxxdbVXw MFTguZrwiOivPhBl4Pq9pxy4Y= Received: by mf187.sendgrid.net with SMTP id mf187.17133.5406003F1C 2014-09-02 17:37:05.865519895 +0000 UTC Received: from mail.tarsnap.com (unknown [10.100.60.97]) by ismtpd-013.iad1.sendgrid.net (SG) with ESMTP id 148377100da.7394.379c75 for ; Tue, 02 Sep 2014 17:37:05 +0000 (GMT) Received: (qmail 83353 invoked from network); 2 Sep 2014 17:37:05 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 2 Sep 2014 17:37:05 -0000 Received: (qmail 10160 invoked from network); 2 Sep 2014 17:36:07 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 2 Sep 2014 17:36:07 -0000 Message-ID: <54060007.1090500@freebsd.org> Date: Tue, 02 Sep 2014 10:36:07 -0700 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: John-Mark Gurney , =?ISO-8859-1?Q?Roger_Pau_Mon?= =?ISO-8859-1?Q?n=E9?= Subject: Re: svn commit: r269814 - head/sys/dev/xen/blkfront References: <53e8e31e.2179.30c1c657@svn.freebsd.org> <53FF7386.3050804@FreeBSD.org> <20140828184515.GV71691@funkthat.com> <53FF7BC4.6050801@FreeBSD.org> <5400BDC7.7020902@FreeBSD.org> <54058E1E.4050907@FreeBSD.org> <20140902171841.GX71691@funkthat.com> In-Reply-To: <20140902171841.GX71691@funkthat.com> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SG-EID: A6W2xSVPHetogaU8rnzccWwgBYtN+QvIzXyjfe/10PFmopxHiQQdwPelT7uyEynjtQdzxDGkAEKwj7xrX267KmOznS4KR17I84oG12XFIGM3l7AThORKeDtNFnKse62qnDIrS37DKOKLpzemtlJe//QofHXD6qx2RpW3TJFTosE= Cc: src-committers@FreeBSD.org, Alexander Motin , scottl@FreeBSD.org, svn-src-head@FreeBSD.org, "Justin T. Gibbs" , svn-src-all@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 17:46:02 -0000 On 09/02/14 10:18, John-Mark Gurney wrote: > cc'd scottl since he knows this code better than I... and cperciva as > he touched it for similar reasons.. > > Oh, I just found PR 152818, where cperciva did a similar fix to > bounce_bus_dmamap_load_buffer for the exact same reason... It was > committed in r216194... This was just a MFamd64 of r204214 -- at that point i386 and amd64 had separate busdma_bounce.c files with different sets of bug fixes. I don't think I ever fixed any new bugs; I just merged fixes between the two architectures and then (once they were identical) replaced them by a single x86 file (in r216316). This particular bug fix came from gibbs. -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 18:21:20 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 971E780E; Tue, 2 Sep 2014 18:21:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 816931FA5; Tue, 2 Sep 2014 18:21:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82ILK4F081190; Tue, 2 Sep 2014 18:21:20 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82ILKmr081189; Tue, 2 Sep 2014 18:21:20 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201409021821.s82ILKmr081189@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Tue, 2 Sep 2014 18:21:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270972 - head/lib/libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 18:21:20 -0000 Author: rpaulo Date: Tue Sep 2 18:21:19 2014 New Revision: 270972 URL: http://svnweb.freebsd.org/changeset/base/270972 Log: Fix typo in a comment. Modified: head/lib/libthr/thread/thr_cond.c Modified: head/lib/libthr/thread/thr_cond.c ============================================================================== --- head/lib/libthr/thread/thr_cond.c Tue Sep 2 16:38:00 2014 (r270971) +++ head/lib/libthr/thread/thr_cond.c Tue Sep 2 18:21:19 2014 (r270972) @@ -150,7 +150,7 @@ _pthread_cond_destroy(pthread_cond_t *co } /* - * Cancellation behaivor: + * Cancellation behavior: * Thread may be canceled at start, if thread is canceled, it means it * did not get a wakeup from pthread_cond_signal(), otherwise, it is * not canceled. From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 18:32:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2AFD2C18; Tue, 2 Sep 2014 18:32:00 +0000 (UTC) Received: from pp1.rice.edu (proofpoint1.mail.rice.edu [128.42.201.100]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFE01114F; Tue, 2 Sep 2014 18:31:59 +0000 (UTC) Received: from pps.filterd (pp1.rice.edu [127.0.0.1]) by pp1.rice.edu (8.14.5/8.14.5) with SMTP id s82IRN9x009021; Tue, 2 Sep 2014 13:31:57 -0500 Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by pp1.rice.edu with ESMTP id 1p2u5b9n6h-1; Tue, 02 Sep 2014 13:31:56 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh11.mail.rice.edu (Postfix) with ESMTPSA id C14E04C01BC; Tue, 2 Sep 2014 13:31:55 -0500 (CDT) Message-ID: <54060D1B.6020700@rice.edu> Date: Tue, 02 Sep 2014 13:31:55 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Steven Hartland , John Baldwin , Peter Wemm Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm References: <201408281950.s7SJo90I047213@svn.freebsd.org> <39211177.i8nn9sHiCx@overcee.wemm.org> <201409021201.15967.jhb@freebsd.org> <5405FD2C.8000901@rice.edu> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=0 kscore.compositescore=0 circleOfTrustscore=0 compositescore=0.601496849000349 urlsuspect_oldscore=0.00149684900034924 suspectscore=11 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=0 rbsscore=0.601496849000349 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1409020199 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dmitry Morozovsky , "Matthew D. Fuller" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 18:32:00 -0000 On 09/02/2014 12:34, Steven Hartland wrote: > ----- Original Message ----- From: "Alan Cox" > >> On 09/02/2014 11:01, John Baldwin wrote: >>> On Saturday, August 30, 2014 1:37:43 pm Peter Wemm wrote: >>>> On Saturday 30 August 2014 02:03:42 Steven Hartland wrote: >>>> I'm very disappointed in the attention to detail and errors in the >>>> commit. I'm almost at the point where I want to ask for the whole >>>> thing to be backed out. >>> I would not be too supportive of that. This PR has been open for a >>> long, long time with many users using patches from it in production >>> loads that were greatly improved by the changes and clamoring on the >>> lists multiple times to get someone to look at it. avg@ contributed >>> quite a bit of time to diagnose this with Karl early on, but other >>> developers aside from Steven did not. It also was not hard to >>> explain to Karl the meaning of 'cache + free' in the bug follow-ups >>> itself (though I believe avg@ had tried this before and it didn't >>> sink in that time for some reason). >>> >>> I know Steven has since committed a fix, but if there are still >>> concerns, I think it would be best to not just revert this entirely >>> but to spend some time fixing the remaining issues. Clearly this >>> issue affects a lot of users and the earlier fixes to pagedaemon >>> were not sufficient to fix their issues alone. >>> >> >> The patch actually makes two completely orthogonal changes at once, and >> one of those changes has no connection to the page daemon. I suspect >> that is why some people have said that their issues were not addressed >> by the page daemon fix. >> >> Prior to this patch, we were limiting the ARC size to 3/4 the kmem >> map/arena/object size on all architectures, including 64-bit, >> uma_small_alloc-enabled architectures where such a limit makes no >> sense. Consequently, some people were complaining, "Why is 1/4 of my >> memory going unused?" > > This is exactly the problem which lead me into investigating the issue. > Is there any evidence that anything other than eliminating the KVA limit is needed on machines where the page daemon isn't broken? > It should be noted that for i386, as requested by Peter, this limitation > has been re-applied. > Unlike Solaris, we run on a few 32-bit architectures, besides i386, that don't have a direct map or a full 4GB address space for the kernel. So, for FreeBSD, this needs to be more general than just i386. I would suggest using '#ifndef UMA_MD_SMALL_ALLOC' as being the closest thing that we have to what you want here. This check will allow any machine, including 32-bit machines that allocate some kernel memory through a direct map, to opt out of the kmem map/arena/object limit. Finally, the Solaris KVA check is written to avoid the possibility of integer overflow. However, the FreeBSD version is not. For example, suppose that I setup an i386 machine with something approaching a 2GB/2GB user/kernel split, 3 * kmem_size() could overflow. From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 18:32:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 245B6D59; Tue, 2 Sep 2014 18:32:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FDB9115B; Tue, 2 Sep 2014 18:32:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82IWfpb088448; Tue, 2 Sep 2014 18:32:41 GMT (envelope-from kadesai@FreeBSD.org) Received: (from kadesai@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82IWfWj088446; Tue, 2 Sep 2014 18:32:41 GMT (envelope-from kadesai@FreeBSD.org) Message-Id: <201409021832.s82IWfWj088446@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kadesai set sender to kadesai@FreeBSD.org using -f From: Kashyap D Desai Date: Tue, 2 Sep 2014 18:32:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270973 - head/sys/dev/mrsas X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 18:32:42 -0000 Author: kadesai Date: Tue Sep 2 18:32:41 2014 New Revision: 270973 URL: http://svnweb.freebsd.org/changeset/base/270973 Log: Fix for WITNESS warning while doing xpt_rescan. This happen when converting any JBOD to RAID or creating any new RAID from Unconfigured Drives. Without this fix, user may see below call trace if WITNESS is enabled. witness_warn() at witness_warn+0x4b5/frame 0xfffffe011f929a00 uma_zalloc_arg() at uma_zalloc_arg+0x3b/frame 0xfffffe011f929a70 malloc() at malloc+0x192/frame 0xfffffe011f929ac0 mrsas_bus_scan_sim() at mrsas_bus_scan_sim+0x32/frame 0xfffffe011f929af0 mrsas_aen_handler() at mrsas_aen_handler+0x11c/frame 0xfffffe011f929b20 taskqueue_run_locked() at taskqueue_run_locked+0xf0/frame 0xfffffe011f929b80 taskqueue_thread_loop() at taskqueue_thread_loop+0x9b/frame 0xfffffe011f929bb0 fork_exit() at fork_exit+0x84/frame 0xfffffe011f929bf0 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe011f929bf0 Submitted by: kadesai Reviewed by: ambrisko MFC after: 3 days Modified: head/sys/dev/mrsas/mrsas.h head/sys/dev/mrsas/mrsas_cam.c Modified: head/sys/dev/mrsas/mrsas.h ============================================================================== --- head/sys/dev/mrsas/mrsas.h Tue Sep 2 18:21:19 2014 (r270972) +++ head/sys/dev/mrsas/mrsas.h Tue Sep 2 18:32:41 2014 (r270973) @@ -101,7 +101,7 @@ __FBSDID("$FreeBSD$"); */ #define BYTE_ALIGNMENT 1 #define MRSAS_MAX_NAME_LENGTH 32 -#define MRSAS_VERSION "06.704.01.00-fbsd" +#define MRSAS_VERSION "06.704.01.01-fbsd" #define MRSAS_ULONG_MAX 0xFFFFFFFFFFFFFFFF #define MRSAS_DEFAULT_TIMEOUT 0x14 //temp #define DONE 0 Modified: head/sys/dev/mrsas/mrsas_cam.c ============================================================================== --- head/sys/dev/mrsas/mrsas_cam.c Tue Sep 2 18:21:19 2014 (r270972) +++ head/sys/dev/mrsas/mrsas_cam.c Tue Sep 2 18:32:41 2014 (r270973) @@ -1116,18 +1116,16 @@ int mrsas_bus_scan(struct mrsas_softc *s union ccb *ccb_0; union ccb *ccb_1; - mtx_lock(&sc->sim_lock); if ((ccb_0 = xpt_alloc_ccb()) == NULL) { - mtx_unlock(&sc->sim_lock); return(ENOMEM); } if ((ccb_1 = xpt_alloc_ccb()) == NULL) { xpt_free_ccb(ccb_0); - mtx_unlock(&sc->sim_lock); return(ENOMEM); } + mtx_lock(&sc->sim_lock); if (xpt_create_path(&ccb_0->ccb_h.path, xpt_periph, cam_sim_path(sc->sim_0), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP){ xpt_free_ccb(ccb_0); @@ -1144,9 +1142,9 @@ int mrsas_bus_scan(struct mrsas_softc *s return(EIO); } + mtx_unlock(&sc->sim_lock); xpt_rescan(ccb_0); xpt_rescan(ccb_1); - mtx_unlock(&sc->sim_lock); return(0); } @@ -1161,19 +1159,18 @@ int mrsas_bus_scan_sim(struct mrsas_soft { union ccb *ccb; - mtx_lock(&sc->sim_lock); if ((ccb = xpt_alloc_ccb()) == NULL) { - mtx_unlock(&sc->sim_lock); return(ENOMEM); } + mtx_lock(&sc->sim_lock); if (xpt_create_path(&ccb->ccb_h.path, xpt_periph, cam_sim_path(sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP){ xpt_free_ccb(ccb); mtx_unlock(&sc->sim_lock); return(EIO); } - xpt_rescan(ccb); mtx_unlock(&sc->sim_lock); + xpt_rescan(ccb); return(0); } From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 18:54:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A32A03C4; Tue, 2 Sep 2014 18:54:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 744D11381; Tue, 2 Sep 2014 18:54:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82Isfxh098224; Tue, 2 Sep 2014 18:54:41 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82IsffF098222; Tue, 2 Sep 2014 18:54:41 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409021854.s82IsffF098222@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 18:54:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270974 - in stable/10/sys: amd64/include dev/vt/hw/efifb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 18:54:41 -0000 Author: emaste Date: Tue Sep 2 18:54:40 2014 New Revision: 270974 URL: http://svnweb.freebsd.org/changeset/base/270974 Log: MFC r263826: Update EFI framebuffer handoff from loader Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/amd64/include/metadata.h stable/10/sys/dev/vt/hw/efifb/efifb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/include/metadata.h ============================================================================== --- stable/10/sys/amd64/include/metadata.h Tue Sep 2 18:32:41 2014 (r270973) +++ stable/10/sys/amd64/include/metadata.h Tue Sep 2 18:54:40 2014 (r270974) @@ -33,11 +33,24 @@ #define MODINFOMD_SMAP_XATTR 0x1002 #define MODINFOMD_DTBP 0x1003 #define MODINFOMD_EFI_MAP 0x1004 +#define MODINFOMD_EFI_FB 0x1005 -struct efi_map_header { +struct efi_map_header { size_t memory_size; size_t descriptor_size; uint32_t descriptor_version; }; +struct efi_fb { + uint64_t fb_addr; + uint64_t fb_size; + int fb_height; + int fb_width; + int fb_stride; + uint32_t fb_mask_red; + uint32_t fb_mask_green; + uint32_t fb_mask_blue; + uint32_t fb_mask_reserved; +}; + #endif /* !_MACHINE_METADATA_H_ */ Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- stable/10/sys/dev/vt/hw/efifb/efifb.c Tue Sep 2 18:32:41 2014 (r270973) +++ stable/10/sys/dev/vt/hw/efifb/efifb.c Tue Sep 2 18:54:40 2014 (r270974) @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include "opt_platform.h" -#include #include #include #include @@ -107,8 +106,8 @@ vt_efifb_init(struct vt_device *vd) kmdp = preload_search_by_type("elf kernel"); if (kmdp == NULL) kmdp = preload_search_by_type("elf64 kernel"); - efifb = (struct efi_fb *)preload_search_info(kmdp, - MODINFO_METADATA | MODINFOMD_EFI_FB); + efifb = (struct efi_fb *)preload_search_info(kmdp, + MODINFO_METADATA | MODINFOMD_EFI_FB); if (efifb == NULL) return (CN_DEAD); From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 18:57:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFAE950B; Tue, 2 Sep 2014 18:57:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B9C41399; Tue, 2 Sep 2014 18:57:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82IvJtN098662; Tue, 2 Sep 2014 18:57:19 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82IvJl1098661; Tue, 2 Sep 2014 18:57:19 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409021857.s82IvJl1098661@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 2 Sep 2014 18:57:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270975 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 18:57:19 -0000 Author: jhb Date: Tue Sep 2 18:57:19 2014 New Revision: 270975 URL: http://svnweb.freebsd.org/changeset/base/270975 Log: Use callout(9) instead of timeout(9). Tested by: danfe Modified: head/sys/dev/ofw/ofw_console.c Modified: head/sys/dev/ofw/ofw_console.c ============================================================================== --- head/sys/dev/ofw/ofw_console.c Tue Sep 2 18:54:40 2014 (r270974) +++ head/sys/dev/ofw/ofw_console.c Tue Sep 2 18:57:19 2014 (r270975) @@ -60,8 +60,7 @@ static struct ttydevsw ofw_ttydevsw = { }; static int polltime; -static struct callout_handle ofw_timeouthandle - = CALLOUT_HANDLE_INITIALIZER(&ofw_timeouthandle); +static struct callout ofw_timer; #if defined(KDB) static int alt_break_state; @@ -101,6 +100,7 @@ cn_drvinit(void *unused) return; if (strlen(output) > 0) tty_makealias(tp, "%s", output); + callout_init_mtx(&ofw_timer, tty_getlock(tp), 0); } } @@ -116,7 +116,7 @@ ofwtty_open(struct tty *tp) if (polltime < 1) polltime = 1; - ofw_timeouthandle = timeout(ofw_timeout, tp, polltime); + callout_reset(&ofw_timer, polltime, ofw_timeout, tp); return (0); } @@ -125,8 +125,7 @@ static void ofwtty_close(struct tty *tp) { - /* XXX Should be replaced with callout_stop(9) */ - untimeout(ofw_timeout, tp, ofw_timeouthandle); + callout_stop(&ofw_timer); } static void @@ -151,13 +150,12 @@ ofw_timeout(void *v) tp = (struct tty *)v; - tty_lock(tp); + tty_lock_assert(tp, MA_OWNED); while ((c = ofw_cngetc(NULL)) != -1) ttydisc_rint(tp, c, 0); ttydisc_rint_done(tp); - tty_unlock(tp); - ofw_timeouthandle = timeout(ofw_timeout, tp, polltime); + callout_schedule(&ofw_timer, polltime); } static void From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 19:05:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B24F391A; Tue, 2 Sep 2014 19:05:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E63114F9; Tue, 2 Sep 2014 19:05:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82J5YdJ003528; Tue, 2 Sep 2014 19:05:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82J5YHf003527; Tue, 2 Sep 2014 19:05:34 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409021905.s82J5YHf003527@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 19:05:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270976 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 19:05:34 -0000 Author: emaste Date: Tue Sep 2 19:05:34 2014 New Revision: 270976 URL: http://svnweb.freebsd.org/changeset/base/270976 Log: Allow standalone debug for non-default ${PROG} targets This allows WITH_DEBUG_FILES to produce standalone debug for the ELF runtime linker. We previously disabled standalone debug files for bsd.prog.mk consumers that included a non-default ${PROG} target, but this is not required. Consumers that do not support standalone debug are still handled by disabling it for statically linked binaries, and for those that specify a non-default binary format. Sponsored by: DARPA, AFRL Modified: head/share/mk/bsd.prog.mk Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Tue Sep 2 18:57:19 2014 (r270975) +++ head/share/mk/bsd.prog.mk Tue Sep 2 19:05:34 2014 (r270976) @@ -29,9 +29,7 @@ CTFFLAGS+= -g PROG= ${PROG_CXX} .endif -.if defined(PROG) && target(${PROG}) -MK_DEBUG_FILES= no -.elif !empty(LDFLAGS:M-Wl,*--oformat,*) || !empty(LDFLAGS:M-static) +.if !empty(LDFLAGS:M-Wl,*--oformat,*) || !empty(LDFLAGS:M-static) MK_DEBUG_FILES= no .endif From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 19:09:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5D69B8B; Tue, 2 Sep 2014 19:09:13 +0000 (UTC) Received: from smtp1.multiplay.co.uk (smtp1.multiplay.co.uk [85.236.96.35]) by mx1.freebsd.org (Postfix) with ESMTP id 5EA69154D; Tue, 2 Sep 2014 19:09:13 +0000 (UTC) Received: by smtp1.multiplay.co.uk (Postfix, from userid 65534) id E1EFA20E7088E; Tue, 2 Sep 2014 19:09:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=1.0 required=8.0 tests=AWL,BAYES_00,DOS_OE_TO_MX, FSL_HELO_NON_FQDN_1,RDNS_DYNAMIC,STOX_REPLY_TYPE autolearn=no version=3.3.1 Received: from r2d2 (82-69-141-170.dsl.in-addr.zen.co.uk [82.69.141.170]) by smtp1.multiplay.co.uk (Postfix) with ESMTP id 0C2CC20E7088C; Tue, 2 Sep 2014 19:09:09 +0000 (UTC) Message-ID: <774F8EEE96EB483DA8ACF533CF7C23F3@multiplay.co.uk> From: "Steven Hartland" To: "Alan Cox" , "John Baldwin" , "Peter Wemm" References: <201408281950.s7SJo90I047213@svn.freebsd.org> <39211177.i8nn9sHiCx@overcee.wemm.org> <201409021201.15967.jhb@freebsd.org> <5405FD2C.8000901@rice.edu> <54060D1B.6020700@rice.edu> Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm Date: Tue, 2 Sep 2014 20:09:10 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-15"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dmitry Morozovsky , "Matthew D. Fuller" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 19:09:14 -0000 ----- Original Message ----- From: "Alan Cox" > On 09/02/2014 12:34, Steven Hartland wrote: >> ----- Original Message ----- From: "Alan Cox" >>> The patch actually makes two completely orthogonal changes at once, and >>> one of those changes has no connection to the page daemon. I suspect >>> that is why some people have said that their issues were not addressed >>> by the page daemon fix. >>> >>> Prior to this patch, we were limiting the ARC size to 3/4 the kmem >>> map/arena/object size on all architectures, including 64-bit, >>> uma_small_alloc-enabled architectures where such a limit makes no >>> sense. Consequently, some people were complaining, "Why is 1/4 of my >>> memory going unused?" >> >> This is exactly the problem which lead me into investigating the issue. >> > > Is there any evidence that anything other than eliminating the KVA limit > is needed on machines where the page daemon isn't broken? In "my" direct experience, I would have to say no, I can't speak for others. >> It should be noted that for i386, as requested by Peter, this limitation >> has been re-applied. >> > > Unlike Solaris, we run on a few 32-bit architectures, besides i386, that > don't have a direct map or a full 4GB address space for the kernel. So, > for FreeBSD, this needs to be more general than just i386. I would > suggest using '#ifndef UMA_MD_SMALL_ALLOC' as being the closest thing > that we have to what you want here. This check will allow any machine, > including 32-bit machines that allocate some kernel memory through a > direct map, to opt out of the kmem map/arena/object limit. I'm not and don't profess to be an expert in this domain as you know ;-) So I'm to defer to you guys, Peter would you agree with this? > Finally, the Solaris KVA check is written to avoid the possibility of > integer overflow. However, the FreeBSD version is not. For example, > suppose that I setup an i386 machine with something approaching a > 2GB/2GB user/kernel split, 3 * kmem_size() could overflow. The returns of said functions are uint64_t so I'm not sure where the overflow would be when working with 2GB values? We seem to be missing some of the following, which doesn't impact us directly but may affect understanding of the "current" illumos code as its not in the tree: https://github.com/illumos/illumos-gate/commit/94dd93aee32d1616436eb51fb7b58094b9a8d3e8 Regards Steve From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 19:14:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B8D0EB6; Tue, 2 Sep 2014 19:14:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0728E175E; Tue, 2 Sep 2014 19:14:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82JEXKI008182; Tue, 2 Sep 2014 19:14:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82JEX8w008181; Tue, 2 Sep 2014 19:14:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409021914.s82JEX8w008181@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 19:14:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270977 - stable/10/sys/amd64/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 19:14:34 -0000 Author: emaste Date: Tue Sep 2 19:14:33 2014 New Revision: 270977 URL: http://svnweb.freebsd.org/changeset/base/270977 Log: Revert r268372 - enable vt_efifb vt(4) driver again. It was disabled as some parts of UEFI support had not yet been merged to stable/10. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/amd64/conf/GENERIC Modified: stable/10/sys/amd64/conf/GENERIC ============================================================================== --- stable/10/sys/amd64/conf/GENERIC Tue Sep 2 19:05:34 2014 (r270976) +++ stable/10/sys/amd64/conf/GENERIC Tue Sep 2 19:14:33 2014 (r270977) @@ -179,6 +179,7 @@ options SC_PIXEL_MODE # add support fo # vt is the new video console driver device vt device vt_vga +device vt_efifb device agp # support several AGP chipsets From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 19:36:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33E2F6E0; Tue, 2 Sep 2014 19:36:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 052D019C7; Tue, 2 Sep 2014 19:36:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82JaI3r017767; Tue, 2 Sep 2014 19:36:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82JaIad017766; Tue, 2 Sep 2014 19:36:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409021936.s82JaIad017766@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 19:36:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270978 - stable/10/sys/dev/vt/hw/efifb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 19:36:19 -0000 Author: emaste Date: Tue Sep 2 19:36:18 2014 New Revision: 270978 URL: http://svnweb.freebsd.org/changeset/base/270978 Log: MFC r268624 by nwhitehorn: On my Lenovo laptop, the firmware maps the EFI framebuffer with MTRRs set to uncacheable. This leads to execrable console performance. Once PMAP is up, remap the framebuffer as write-combining. This reduces boot time on my laptop by 60% when booting with EFI. Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- stable/10/sys/dev/vt/hw/efifb/efifb.c Tue Sep 2 19:14:33 2014 (r270977) +++ stable/10/sys/dev/vt/hw/efifb/efifb.c Tue Sep 2 19:36:18 2014 (r270978) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); static vd_init_t vt_efifb_init; static vd_probe_t vt_efifb_probe; +static void vt_efifb_remap(void *efifb_data); static struct vt_driver vt_efifb_driver = { .vd_name = "efifb", @@ -68,6 +69,8 @@ static struct vt_driver vt_efifb_driver static struct fb_info local_info; VT_DRIVER_DECLARE(vt_efifb, vt_efifb_driver); +SYSINIT(efifb_remap, SI_SUB_KMEM, SI_ORDER_ANY, vt_efifb_remap, &local_info); + static int vt_efifb_probe(struct vt_device *vd) { @@ -133,9 +136,9 @@ vt_efifb_init(struct vt_device *vd) info->fb_size = info->fb_height * info->fb_stride; info->fb_pbase = efifb->fb_addr; /* - * We could use pmap_mapdev here except that the kernel pmap - * hasn't been created yet and hence any attempt to lock it will - * fail. + * Use the direct map as a crutch until pmap is available. Once pmap + * is online, the framebuffer will be remapped by vt_efifb_remap() + * using pmap_mapdev_attr(). */ info->fb_vbase = PHYS_TO_DMAP(efifb->fb_addr); @@ -163,3 +166,22 @@ vt_efifb_init(struct vt_device *vd) return (CN_INTERNAL); } + +static void +vt_efifb_remap(void *xinfo) +{ + struct fb_info *info = xinfo; + + if (info->fb_pbase == 0) + return; + + /* + * Remap as write-combining. This massively improves performance and + * happens very early in kernel initialization, when everything is + * still single-threaded and interrupts are off, so replacing the + * mapping address is safe. + */ + info->fb_vbase = (intptr_t)pmap_mapdev_attr(info->fb_pbase, + info->fb_size, VM_MEMATTR_WRITE_COMBINING); +} + From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 19:48:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 603AFBD2; Tue, 2 Sep 2014 19:48:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AE1C1ADD; Tue, 2 Sep 2014 19:48:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82JmcBE022999; Tue, 2 Sep 2014 19:48:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82JmcVP022998; Tue, 2 Sep 2014 19:48:38 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409021948.s82JmcVP022998@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 19:48:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270979 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 19:48:38 -0000 Author: emaste Date: Tue Sep 2 19:48:37 2014 New Revision: 270979 URL: http://svnweb.freebsd.org/changeset/base/270979 Log: MFC part of r267973: remove redundant "" assignment for string in BSS. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/kern/kern_cons.c Modified: stable/10/sys/kern/kern_cons.c ============================================================================== --- stable/10/sys/kern/kern_cons.c Tue Sep 2 19:36:18 2014 (r270978) +++ stable/10/sys/kern/kern_cons.c Tue Sep 2 19:48:37 2014 (r270979) @@ -652,7 +652,7 @@ sysbeep(int pitch __unused, int period _ /* * Temporary support for sc(4) to vt(4) transition. */ -static char vty_name[16] = ""; +static char vty_name[16]; SYSCTL_STRING(_kern, OID_AUTO, vty, CTLFLAG_RDTUN, vty_name, 0, "Console vty driver"); From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 19:56:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 92D50E79; Tue, 2 Sep 2014 19:56:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CF7E1BE0; Tue, 2 Sep 2014 19:56:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82JucQS027573; Tue, 2 Sep 2014 19:56:38 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82Jub4G027568; Tue, 2 Sep 2014 19:56:37 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409021956.s82Jub4G027568@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 19:56:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270980 - in stable/10/sys: dev/fb dev/vt/hw/fb sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 19:56:38 -0000 Author: emaste Date: Tue Sep 2 19:56:37 2014 New Revision: 270980 URL: http://svnweb.freebsd.org/changeset/base/270980 Log: MFC r268771, r268796 by nwhitehorn: r268771: Allow console drivers active from early boot to be used with xf86-video-scfb, rather than only drivers attached later on. This involves a small amount of code duplication with dev/fb/fbd.c, which will fixed later on. Also improve performance of vt_blank() by making it not read from the framebuffer unnecessarily. r268796: Fix embarassing typos I made. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/fb/fbd.c stable/10/sys/dev/vt/hw/fb/vt_fb.c stable/10/sys/dev/vt/hw/fb/vt_fb.h stable/10/sys/sys/fbio.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/fb/fbd.c ============================================================================== --- stable/10/sys/dev/fb/fbd.c Tue Sep 2 19:48:37 2014 (r270979) +++ stable/10/sys/dev/fb/fbd.c Tue Sep 2 19:56:37 2014 (r270980) @@ -257,9 +257,6 @@ fb_probe(struct fb_info *info) } else if (info->fb_vbase != 0) { if (info->fb_pbase == 0) { info->fb_flags |= FB_FLAG_NOMMAP; - } else { - if (info->fb_mmap == NULL) - info->fb_mmap = &fb_mmap; } info->wr1 = &vt_fb_mem_wr1; info->wr2 = &vt_fb_mem_wr2; @@ -268,10 +265,6 @@ fb_probe(struct fb_info *info) } else return (ENXIO); - if (info->fb_ioctl == NULL) - info->fb_ioctl = &fb_ioctl; - - return (0); } Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.c Tue Sep 2 19:48:37 2014 (r270979) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.c Tue Sep 2 19:56:37 2014 (r270980) @@ -41,10 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -static int vt_fb_ioctl(struct vt_device *vd, u_long cmd, caddr_t data, - struct thread *td); -static int vt_fb_mmap(struct vt_device *vd, vm_ooffset_t offset, - vm_paddr_t *paddr, int prot, vm_memattr_t *memattr); void vt_fb_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, int fill, term_color_t color); void vt_fb_setpixel(struct vt_device *vd, int x, int y, term_color_t color); @@ -65,20 +61,47 @@ static struct vt_driver vt_fb_driver = { VT_DRIVER_DECLARE(vt_fb, vt_fb_driver); -static int +int vt_fb_ioctl(struct vt_device *vd, u_long cmd, caddr_t data, struct thread *td) { struct fb_info *info; + int error = 0; info = vd->vd_softc; - if (info->fb_ioctl == NULL) - return (-1); + switch (cmd) { + case FBIOGTYPE: + bcopy(info, (struct fbtype *)data, sizeof(struct fbtype)); + break; + + case FBIO_GETWINORG: /* get frame buffer window origin */ + *(u_int *)data = 0; + break; + + case FBIO_GETDISPSTART: /* get display start address */ + ((video_display_start_t *)data)->x = 0; + ((video_display_start_t *)data)->y = 0; + break; + + case FBIO_GETLINEWIDTH: /* get scan line width in bytes */ + *(u_int *)data = info->fb_stride; + break; - return (info->fb_ioctl(info->fb_cdev, cmd, data, 0, td)); + case FBIO_BLANK: /* blank display */ + if (vd->vd_driver->vd_blank == NULL) + return (ENODEV); + vd->vd_driver->vd_blank(vd, TC_BLACK); + break; + + default: + error = ENOIOCTL; + break; + } + + return (error); } -static int +int vt_fb_mmap(struct vt_device *vd, vm_ooffset_t offset, vm_paddr_t *paddr, int prot, vm_memattr_t *memattr) { @@ -86,10 +109,18 @@ vt_fb_mmap(struct vt_device *vd, vm_ooff info = vd->vd_softc; - if (info->fb_ioctl == NULL) - return (ENXIO); + if (info->fb_flags & FB_FLAG_NOMMAP) + return (ENODEV); - return (info->fb_mmap(info->fb_cdev, offset, paddr, prot, memattr)); + if (offset >= 0 && offset < info->fb_size) { + *paddr = info->fb_pbase + offset; + #ifdef VM_MEMATTR_WRITE_COMBINING + *memattr = VM_MEMATTR_WRITE_COMBINING; + #endif + return (0); + } + + return (EINVAL); } void @@ -147,41 +178,42 @@ vt_fb_blank(struct vt_device *vd, term_c { struct fb_info *info; uint32_t c; - u_int o; + u_int o, h; info = vd->vd_softc; c = info->fb_cmap[color]; switch (FBTYPE_GET_BYTESPP(info)) { case 1: - for (o = 0; o < info->fb_stride; o++) - info->wr1(info, o, c); + for (h = 0; h < info->fb_height; h++) + for (o = 0; o < info->fb_stride; o++) + info->wr1(info, h*info->fb_stride + o, c); break; case 2: - for (o = 0; o < info->fb_stride; o += 2) - info->wr2(info, o, c); + for (h = 0; h < info->fb_height; h++) + for (o = 0; o < info->fb_stride; o += 2) + info->wr2(info, h*info->fb_stride + o, c); break; case 3: - /* line 0 */ - for (o = 0; o < info->fb_stride; o += 3) { - info->wr1(info, o, (c >> 16) & 0xff); - info->wr1(info, o + 1, (c >> 8) & 0xff); - info->wr1(info, o + 2, c & 0xff); - } + for (h = 0; h < info->fb_height; h++) + for (o = 0; o < info->fb_stride; o += 3) { + info->wr1(info, h*info->fb_stride + o, + (c >> 16) & 0xff); + info->wr1(info, h*info->fb_stride + o + 1, + (c >> 8) & 0xff); + info->wr1(info, h*info->fb_stride + o + 2, + c & 0xff); + } break; case 4: - for (o = 0; o < info->fb_stride; o += 4) - info->wr4(info, o, c); + for (h = 0; h < info->fb_height; h++) + for (o = 0; o < info->fb_stride; o += 4) + info->wr4(info, h*info->fb_stride + o, c); break; default: /* panic? */ return; } - /* Copy line0 to all other lines. */ - /* XXX will copy with borders. */ - for (o = info->fb_stride; o < info->fb_size; o += info->fb_stride) { - info->copy(info, o, 0, info->fb_stride); - } } void Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.h ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.h Tue Sep 2 19:48:37 2014 (r270979) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.h Tue Sep 2 19:56:37 2014 (r270980) @@ -43,5 +43,7 @@ vd_blank_t vt_fb_blank; vd_bitbltchr_t vt_fb_bitbltchr; vd_maskbitbltchr_t vt_fb_maskbitbltchr; vd_postswitch_t vt_fb_postswitch; +vd_fb_ioctl_t vt_fb_ioctl; +vd_fb_mmap_t vt_fb_mmap; #endif /* _DEV_VT_HW_FB_VT_FB_H_ */ Modified: stable/10/sys/sys/fbio.h ============================================================================== --- stable/10/sys/sys/fbio.h Tue Sep 2 19:48:37 2014 (r270979) +++ stable/10/sys/sys/fbio.h Tue Sep 2 19:56:37 2014 (r270980) @@ -141,8 +141,6 @@ struct fb_info { /* Methods. */ fb_write_t *fb_write; /* if NULL, direct mem write. */ fb_read_t *fb_read; /* if NULL, direct mem read. */ - fb_ioctl_t *fb_ioctl; /* Can be NULL. */ - fb_mmap_t *fb_mmap; /* Can be NULL. */ struct cdev *fb_cdev; From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 19:57:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E41ECFB3; Tue, 2 Sep 2014 19:57:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF7061BEC; Tue, 2 Sep 2014 19:57:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82JvXqT027750; Tue, 2 Sep 2014 19:57:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82JvXXi027749; Tue, 2 Sep 2014 19:57:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409021957.s82JvXXi027749@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 19:57:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270981 - stable/10/sys/dev/vt/hw/efifb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 19:57:34 -0000 Author: emaste Date: Tue Sep 2 19:57:33 2014 New Revision: 270981 URL: http://svnweb.freebsd.org/changeset/base/270981 Log: MFC r268772 by nwhitehorn: Allow efifb to be used with xf86-video-scfb. This is important for EFI systems without either a CSM or real graphics drivers, such as my Lenovo Haswell laptop. This provides working X with the small complication of a console cursor permanently overlaid on the upper-left corner of the screen that will be dealt with later. Also remove some redundant screen clearing. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- stable/10/sys/dev/vt/hw/efifb/efifb.c Tue Sep 2 19:56:37 2014 (r270980) +++ stable/10/sys/dev/vt/hw/efifb/efifb.c Tue Sep 2 19:57:33 2014 (r270981) @@ -62,6 +62,8 @@ static struct vt_driver vt_efifb_driver .vd_blank = vt_fb_blank, .vd_bitbltchr = vt_fb_bitbltchr, .vd_maskbitbltchr = vt_fb_maskbitbltchr, + .vd_fb_ioctl = vt_fb_ioctl, + .vd_fb_mmap = vt_fb_mmap, /* Better than VGA, but still generic driver. */ .vd_priority = VD_PRIORITY_GENERIC + 1, }; @@ -97,7 +99,7 @@ vt_efifb_probe(struct vt_device *vd) static int vt_efifb_init(struct vt_device *vd) { - int depth, d, i, len; + int depth, d; struct fb_info *info; struct efi_fb *efifb; caddr_t kmdp; @@ -142,12 +144,6 @@ vt_efifb_init(struct vt_device *vd) */ info->fb_vbase = PHYS_TO_DMAP(efifb->fb_addr); - /* blank full size */ - len = info->fb_size / 4; - for (i = 0; i < len; i++) { - ((uint32_t *)info->fb_vbase)[i] = 0; - } - /* Get pixel storage size. */ info->fb_bpp = info->fb_stride / info->fb_width * 8; From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 20:02:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 409192AB; Tue, 2 Sep 2014 20:02:54 +0000 (UTC) Received: from pp1.rice.edu (proofpoint1.mail.rice.edu [128.42.201.100]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0005B1CAF; Tue, 2 Sep 2014 20:02:53 +0000 (UTC) Received: from pps.filterd (pp1.rice.edu [127.0.0.1]) by pp1.rice.edu (8.14.5/8.14.5) with SMTP id s82K2NK1009245; Tue, 2 Sep 2014 15:02:50 -0500 Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by pp1.rice.edu with ESMTP id 1p2u5b9r1g-1; Tue, 02 Sep 2014 15:02:50 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh11.mail.rice.edu (Postfix) with ESMTPSA id 7D0354C01D0; Tue, 2 Sep 2014 15:02:49 -0500 (CDT) Message-ID: <54062268.9060603@rice.edu> Date: Tue, 02 Sep 2014 15:02:48 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Steven Hartland , John Baldwin , Peter Wemm Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm References: <201408281950.s7SJo90I047213@svn.freebsd.org> <39211177.i8nn9sHiCx@overcee.wemm.org> <201409021201.15967.jhb@freebsd.org> <5405FD2C.8000901@rice.edu> <54060D1B.6020700@rice.edu> <774F8EEE96EB483DA8ACF533CF7C23F3@multiplay.co.uk> In-Reply-To: <774F8EEE96EB483DA8ACF533CF7C23F3@multiplay.co.uk> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=0 kscore.compositescore=0 circleOfTrustscore=0 compositescore=0.601496849000349 urlsuspect_oldscore=0.00149684900034924 suspectscore=3 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=0 rbsscore=0.601496849000349 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1409020210 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dmitry Morozovsky , "Matthew D. Fuller" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 20:02:54 -0000 On 09/02/2014 14:09, Steven Hartland wrote: > ----- Original Message ----- From: "Alan Cox" >> On 09/02/2014 12:34, Steven Hartland wrote: >>> ----- Original Message ----- From: "Alan Cox" >>>> The patch actually makes two completely orthogonal changes at once, >>>> and >>>> one of those changes has no connection to the page daemon. I suspect >>>> that is why some people have said that their issues were not addressed >>>> by the page daemon fix. >>>> >>>> Prior to this patch, we were limiting the ARC size to 3/4 the kmem >>>> map/arena/object size on all architectures, including 64-bit, >>>> uma_small_alloc-enabled architectures where such a limit makes no >>>> sense. Consequently, some people were complaining, "Why is 1/4 of my >>>> memory going unused?" >>> >>> This is exactly the problem which lead me into investigating the issue. >>> >> >> Is there any evidence that anything other than eliminating the KVA limit >> is needed on machines where the page daemon isn't broken? > > In "my" direct experience, I would have to say no, I can't speak for > others. > >>> It should be noted that for i386, as requested by Peter, this >>> limitation >>> has been re-applied. >>> >> >> Unlike Solaris, we run on a few 32-bit architectures, besides i386, that >> don't have a direct map or a full 4GB address space for the kernel. So, >> for FreeBSD, this needs to be more general than just i386. I would >> suggest using '#ifndef UMA_MD_SMALL_ALLOC' as being the closest thing >> that we have to what you want here. This check will allow any machine, >> including 32-bit machines that allocate some kernel memory through a >> direct map, to opt out of the kmem map/arena/object limit. > > I'm not and don't profess to be an expert in this domain as you > know ;-) So I'm to defer to you guys, Peter would you agree with > this? > >> Finally, the Solaris KVA check is written to avoid the possibility of >> integer overflow. However, the FreeBSD version is not. For example, >> suppose that I setup an i386 machine with something approaching a >> 2GB/2GB user/kernel split, 3 * kmem_size() could overflow. > > The returns of said functions are uint64_t so I'm not sure where > the overflow would be when working with 2GB values? > Ah, I didn't see the uint64_t. I only looked at the calculation and assumed vm_offset_t was being used. So, yes, you are safe from overflow. > We seem to be missing some of the following, which doesn't impact > us directly but may affect understanding of the "current" illumos > code as its not in the tree: > https://github.com/illumos/illumos-gate/commit/94dd93aee32d1616436eb51fb7b58094b9a8d3e8 > > > Regards > Steve > > From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 21:05:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 662A94D8; Tue, 2 Sep 2014 21:05:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 376E41356; Tue, 2 Sep 2014 21:05:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82L5kcn061079; Tue, 2 Sep 2014 21:05:46 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82L5jSL061076; Tue, 2 Sep 2014 21:05:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409022105.s82L5jSL061076@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 21:05:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270983 - stable/10/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 21:05:46 -0000 Author: emaste Date: Tue Sep 2 21:05:45 2014 New Revision: 270983 URL: http://svnweb.freebsd.org/changeset/base/270983 Log: MFC r269185 by ray@: Remove unused macro VT_CONSDEV_DECLARE. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/vt.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt.h ============================================================================== --- stable/10/sys/dev/vt/vt.h Tue Sep 2 20:46:18 2014 (r270982) +++ stable/10/sys/dev/vt/vt.h Tue Sep 2 21:05:45 2014 (r270983) @@ -348,54 +348,6 @@ void vt_upgrade(struct vt_device *vd); #define VT_FB_DEFAULT_HEIGHT 1200 #endif -#define VT_CONSDEV_DECLARE(driver, width, height, softc) \ -static struct terminal driver ## _consterm; \ -static struct vt_window driver ## _conswindow; \ -static struct vt_device driver ## _consdev = { \ - .vd_driver = &driver, \ - .vd_softc = (softc), \ - .vd_flags = VDF_INVALID, \ - .vd_windows = { [VT_CONSWINDOW] = &driver ## _conswindow, }, \ - .vd_curwindow = &driver ## _conswindow, \ - .vd_markedwin = NULL, \ - .vd_kbstate = 0, \ -}; \ -static term_char_t driver ## _constextbuf[(width) * \ - (VBF_DEFAULT_HISTORY_SIZE)]; \ -static term_char_t *driver ## _constextbufrows[ \ - VBF_DEFAULT_HISTORY_SIZE]; \ -static struct vt_window driver ## _conswindow = { \ - .vw_number = VT_CONSWINDOW, \ - .vw_flags = VWF_CONSOLE, \ - .vw_buf = { \ - .vb_buffer = driver ## _constextbuf, \ - .vb_rows = driver ## _constextbufrows, \ - .vb_history_size = VBF_DEFAULT_HISTORY_SIZE, \ - .vb_curroffset = 0, \ - .vb_roffset = 0, \ - .vb_flags = VBF_STATIC, \ - .vb_mark_start = { \ - .tp_row = 0, \ - .tp_col = 0, \ - }, \ - .vb_mark_end = { \ - .tp_row = 0, \ - .tp_col = 0, \ - }, \ - .vb_scr_size = { \ - .tp_row = height, \ - .tp_col = width, \ - }, \ - }, \ - .vw_device = &driver ## _consdev, \ - .vw_terminal = &driver ## _consterm, \ - .vw_kbdmode = K_XLATE, \ -}; \ -TERMINAL_DECLARE_EARLY(driver ## _consterm, vt_termclass, \ - &driver ## _conswindow); \ -SYSINIT(vt_early_cons, SI_SUB_INT_CONFIG_HOOKS, SI_ORDER_ANY, \ - vt_upgrade, &driver ## _consdev) - /* name argument is not used yet. */ #define VT_DRIVER_DECLARE(name, drv) DATA_SET(vt_drv_set, drv) From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 21:50:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52D5C290; Tue, 2 Sep 2014 21:50:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DF961941; Tue, 2 Sep 2014 21:50:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82LoFDa081578; Tue, 2 Sep 2014 21:50:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82LoFMQ081577; Tue, 2 Sep 2014 21:50:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409022150.s82LoFMQ081577@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 21:50:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270986 - stable/10/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 21:50:15 -0000 Author: emaste Date: Tue Sep 2 21:50:14 2014 New Revision: 270986 URL: http://svnweb.freebsd.org/changeset/base/270986 Log: MFC r269186 by ray@: Remove useless debug string. Fix indent. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/vt_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Tue Sep 2 21:49:02 2014 (r270985) +++ stable/10/sys/dev/vt/vt_core.c Tue Sep 2 21:50:14 2014 (r270986) @@ -2025,9 +2025,8 @@ vt_upgrade(struct vt_device *vd) vd->vd_curwindow = vd->vd_windows[VT_CONSWINDOW]; if (!(vd->vd_flags & VDF_ASYNC)) { - /* Attach keyboard. */ - vt_allocate_keyboard(vd); - DPRINTF(20, "%s: vd_keyboard = %d\n", __func__, vd->vd_keyboard); + /* Attach keyboard. */ + vt_allocate_keyboard(vd); /* Init 25 Hz timer. */ callout_init_mtx(&vd->vd_timer, &vd->vd_lock, 0); From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 22:01:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE4EEDB0; Tue, 2 Sep 2014 22:01:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EA9E1AEB; Tue, 2 Sep 2014 22:01:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82M1F3Y087487; Tue, 2 Sep 2014 22:01:15 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82M1F4e087482; Tue, 2 Sep 2014 22:01:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409022201.s82M1F4e087482@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 2 Sep 2014 22:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270988 - in stable/10/sys: amd64/amd64 kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 22:01:16 -0000 Author: emaste Date: Tue Sep 2 22:01:14 2014 New Revision: 270988 URL: http://svnweb.freebsd.org/changeset/base/270988 Log: MFC automatic vt(4) selection for UEFI boot r268158: Prefer vt(4) for UEFI boot The UEFI framebuffer driver vt_efifb requires vt(4), so add a mechanism for the startup routine to set the preferred console. This change is ugly because console init happens very early in the boot, making a cleaner interface difficult. This change is intended only to facilitate the sc(4) / vt(4) transition, and can be reverted once vt(4) is the default. r268160: Fix typos in VTY constant names from r268158 r268982: Don't pass null kmdp to preload_search_info On Xen PVH guests kmdp == NULL. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/amd64/amd64/machdep.c stable/10/sys/kern/kern_cons.c stable/10/sys/sys/cons.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/machdep.c ============================================================================== --- stable/10/sys/amd64/amd64/machdep.c Tue Sep 2 21:59:24 2014 (r270987) +++ stable/10/sys/amd64/amd64/machdep.c Tue Sep 2 22:01:14 2014 (r270988) @@ -1909,6 +1909,14 @@ hammer_time(u_int64_t modulep, u_int64_t i8254_init(); /* + * Use vt(4) by default for UEFI boot (during the sc(4)/vt(4) + * transition). + */ + if (kmdp != NULL && preload_search_info(kmdp, + MODINFO_METADATA | MODINFOMD_EFI_MAP) != NULL) + vty_set_preferred(VTY_VT); + + /* * Initialize the console before we print anything out. */ cninit(); Modified: stable/10/sys/kern/kern_cons.c ============================================================================== --- stable/10/sys/kern/kern_cons.c Tue Sep 2 21:59:24 2014 (r270987) +++ stable/10/sys/kern/kern_cons.c Tue Sep 2 22:01:14 2014 (r270988) @@ -652,6 +652,7 @@ sysbeep(int pitch __unused, int period _ /* * Temporary support for sc(4) to vt(4) transition. */ +static unsigned vty_prefer; static char vty_name[16]; SYSCTL_STRING(_kern, OID_AUTO, vty, CTLFLAG_RDTUN, vty_name, 0, "Console vty driver"); @@ -676,6 +677,10 @@ vty_enabled(unsigned vty) break; } #endif + if (vty_prefer != 0) { + vty_selected = vty_prefer; + break; + } #if defined(DEV_SC) vty_selected = VTY_SC; #elif defined(DEV_VT) @@ -691,3 +696,16 @@ vty_enabled(unsigned vty) return ((vty_selected & vty) != 0); } +void +vty_set_preferred(unsigned vty) +{ + + vty_prefer = vty; +#if !defined(DEV_SC) + vty_prefer &= ~VTY_SC; +#endif +#if !defined(DEV_VT) + vty_prefer &= ~VTY_VT; +#endif +} + Modified: stable/10/sys/sys/cons.h ============================================================================== --- stable/10/sys/sys/cons.h Tue Sep 2 21:59:24 2014 (r270987) +++ stable/10/sys/sys/cons.h Tue Sep 2 22:01:14 2014 (r270988) @@ -137,6 +137,7 @@ void constty_clear(void); #define VTY_SC 0x01 #define VTY_VT 0x02 int vty_enabled(unsigned int); +void vty_set_preferred(unsigned int); #endif /* _KERNEL */ From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 22:59:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1AE92B4; Tue, 2 Sep 2014 22:59:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD5CB10BF; Tue, 2 Sep 2014 22:59:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82MxeRT017935; Tue, 2 Sep 2014 22:59:40 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82MxeVN017934; Tue, 2 Sep 2014 22:59:40 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201409022259.s82MxeVN017934@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Tue, 2 Sep 2014 22:59:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270989 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 22:59:41 -0000 Author: dteske Date: Tue Sep 2 22:59:40 2014 New Revision: 270989 URL: http://svnweb.freebsd.org/changeset/base/270989 Log: Fix regression introduced by SVN r270954. Correct way to reset getopts is to set OPTIND to 1, not unset it (which causes an error). Thanks to: jilles Modified: head/usr.sbin/bsdconfig/share/dialog.subr Modified: head/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/dialog.subr Tue Sep 2 22:01:14 2014 (r270988) +++ head/usr.sbin/bsdconfig/share/dialog.subr Tue Sep 2 22:59:40 2014 (r270989) @@ -2116,7 +2116,7 @@ f_dialog_init() f_dprintf "f_dialog_init: ARGV=[%s] GETOPTS_STDARGS=[%s]" \ "$ARGV" "$GETOPTS_STDARGS" SECURE=`set -- $ARGV - unset OPTIND + OPTIND=1 while getopts \ "$GETOPTS_STDARGS$GETOPTS_EXTRA$GETOPTS_ALLFLAGS" \ flag > /dev/null; do @@ -2126,7 +2126,7 @@ f_dialog_init() done ` # END-BACKTICK USE_XDIALOG=`set -- $ARGV - unset OPTIND + OPTIND=1 while getopts \ "$GETOPTS_STDARGS$GETOPTS_EXTRA$GETOPTS_ALLFLAGS" \ flag > /dev/null; do From owner-svn-src-all@FreeBSD.ORG Tue Sep 2 23:43:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6027F685; Tue, 2 Sep 2014 23:43:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4B7A41789; Tue, 2 Sep 2014 23:43:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s82Nh7G0042044; Tue, 2 Sep 2014 23:43:07 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s82Nh6FH042040; Tue, 2 Sep 2014 23:43:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201409022343.s82Nh6FH042040@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 2 Sep 2014 23:43:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270990 - in head: share/mk sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2014 23:43:07 -0000 Author: markj Date: Tue Sep 2 23:43:06 2014 New Revision: 270990 URL: http://svnweb.freebsd.org/changeset/base/270990 Log: Define _DTRACE_VERSION in sdt.h rather than setting it manually. This is similar to what illumos does, and makes it easier to enable USDT probes in third-party software that doesn't make use of the system makefiles. Modified: head/share/mk/bsd.dep.mk head/sys/sys/sdt.h Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Tue Sep 2 22:59:40 2014 (r270989) +++ head/share/mk/bsd.dep.mk Tue Sep 2 23:43:06 2014 (r270990) @@ -125,7 +125,7 @@ ${_YC:R}.o: ${_YC} .if ${SRCS:M*.d} LDFLAGS+= -lelf LDADD+= ${LIBELF} -CFLAGS+= -D_DTRACE_VERSION=1 -I${.OBJDIR} +CFLAGS+= -I${.OBJDIR} .endif .for _DSRC in ${SRCS:M*.d:N*/*} .for _D in ${_DSRC:R} Modified: head/sys/sys/sdt.h ============================================================================== --- head/sys/sys/sdt.h Tue Sep 2 22:59:40 2014 (r270989) +++ head/sys/sys/sdt.h Tue Sep 2 23:43:06 2014 (r270990) @@ -33,6 +33,8 @@ #ifndef _KERNEL +#define _DTRACE_VERSION 1 + #define DTRACE_PROBE(prov, name) { \ extern void __dtrace_##prov##___##name(void); \ __dtrace_##prov##___##name(); \ From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 00:32:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAC0DAFE; Wed, 3 Sep 2014 00:32:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B76CA1BC2; Wed, 3 Sep 2014 00:32:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s830WJhX066536; Wed, 3 Sep 2014 00:32:19 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s830WJCI066535; Wed, 3 Sep 2014 00:32:19 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201409030032.s830WJCI066535@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 3 Sep 2014 00:32:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270991 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 00:32:19 -0000 Author: imp Date: Wed Sep 3 00:32:19 2014 New Revision: 270991 URL: http://svnweb.freebsd.org/changeset/base/270991 Log: Invoke make_dtb with MACHINE defined for enhanced cross building friendliness. This should restore old-fashioned kernel building in a cross environment, though this has only had limited testing. Sponsored by: Netflix Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Sep 2 23:43:06 2014 (r270990) +++ head/sys/conf/files Wed Sep 3 00:32:19 2014 (r270991) @@ -14,11 +14,11 @@ acpi_quirks.h optional acpi \ # from the specified source (DTS) file: .dts -> .dtb # fdt_dtb_file optional fdt fdt_dtb_static \ - compile-with "sh $S/tools/fdt/make_dtb.sh $S ${FDT_DTS_FILE} ${.CURDIR}" \ + compile-with "sh MACHINE=${MACHINE} $S/tools/fdt/make_dtb.sh $S ${FDT_DTS_FILE} ${.CURDIR}" \ no-obj no-implicit-rule before-depend \ clean "${FDT_DTS_FILE:R}.dtb" fdt_static_dtb.h optional fdt fdt_dtb_static \ - compile-with "sh $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ${.CURDIR}" \ + compile-with "sh MACHINE=${MACHINE} $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ${.CURDIR}" \ dependency "fdt_dtb_file" \ no-obj no-implicit-rule before-depend \ clean "fdt_static_dtb.h" From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 05:14:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A5257C4; Wed, 3 Sep 2014 05:14:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3601E1C2D; Wed, 3 Sep 2014 05:14:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s835Ep56098397; Wed, 3 Sep 2014 05:14:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s835EpmF098396; Wed, 3 Sep 2014 05:14:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409030514.s835EpmF098396@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Sep 2014 05:14:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270992 - head/sys/dev/usb/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 05:14:51 -0000 Author: hselasky Date: Wed Sep 3 05:14:50 2014 New Revision: 270992 URL: http://svnweb.freebsd.org/changeset/base/270992 Log: Fix logical error. MFC after: 3 days Modified: head/sys/dev/usb/net/if_aue.c Modified: head/sys/dev/usb/net/if_aue.c ============================================================================== --- head/sys/dev/usb/net/if_aue.c Wed Sep 3 00:32:19 2014 (r270991) +++ head/sys/dev/usb/net/if_aue.c Wed Sep 3 05:14:50 2014 (r270992) @@ -749,7 +749,7 @@ aue_intr_callback(struct usb_xfer *xfer, if (pkt.aue_txstat0) ifp->if_oerrors++; - if (pkt.aue_txstat0 & (AUE_TXSTAT0_LATECOLL & + if (pkt.aue_txstat0 & (AUE_TXSTAT0_LATECOLL | AUE_TXSTAT0_EXCESSCOLL)) ifp->if_collisions++; } From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 05:44:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23025F57; Wed, 3 Sep 2014 05:44:18 +0000 (UTC) Received: from mail-yk0-x230.google.com (mail-yk0-x230.google.com [IPv6:2607:f8b0:4002:c07::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B01491EC0; Wed, 3 Sep 2014 05:44:17 +0000 (UTC) Received: by mail-yk0-f176.google.com with SMTP id 19so4724509ykq.21 for ; Tue, 02 Sep 2014 22:44:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=zoSoomAmAxKHQxJp4LZ51syZ/IoKhf4b3AkK+5qY7iE=; b=D3c+pMvfZbfKZTioUTyZ2fGYdKGRFHrvB258xkvKyFVU+gpbAqGAkMMsoIonYocxAB mAd5X96Lxf7MWpfxvKqfrTazTyqoHA4ooNFPCxYiZQMkB2TMWD3ChKEQ57kTk9+/xtPE kTQkPiEevPXKEbANLl2IGl2CZx6x0jrTw1LJzl5dASRjy1JwN+VbvdVkcqSFep/5Vv/D wQN+SqFIvUtc1IJbOHGPYRZbftc2rD+EXTFi+0WM2zGsQMIrySwiPU6rqfBIuRD+r2nB LdBLvRVmLCMY+nIupuOp03cJiIibPcMgva3/brqCTacX/MT5oThczoSsZa+JlOB/OvB3 Z3CQ== MIME-Version: 1.0 X-Received: by 10.236.121.44 with SMTP id q32mr58901462yhh.55.1409723056870; Tue, 02 Sep 2014 22:44:16 -0700 (PDT) Sender: antoine.brodin.freebsd@gmail.com Received: by 10.170.164.197 with HTTP; Tue, 2 Sep 2014 22:44:16 -0700 (PDT) In-Reply-To: <201409021116.s82BGiXI071065@svn.freebsd.org> References: <201409021116.s82BGiXI071065@svn.freebsd.org> Date: Wed, 3 Sep 2014 07:44:16 +0200 X-Google-Sender-Auth: oNzTjlPMM7c6ACePfweYJOlLjlo Message-ID: Subject: Re: svn commit: r270964 - head/sys/sys From: Antoine Brodin To: Ed Schouten Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 05:44:18 -0000 On Tue, Sep 2, 2014 at 1:16 PM, Ed Schouten wrote: > Author: ed > Date: Tue Sep 2 11:16:44 2014 > New Revision: 270964 > URL: http://svnweb.freebsd.org/changeset/base/270964 > > Log: > Clean up slightly. > > - Remove c++0x hack from that was needed when Clang did > not fully implement C++11. We can now safely test against C++11 to > check whether thread_local is available, like we do for all other > C++11 keywords. > > - Don't use __clang__ to test for thread safety annotation presence. It > turns out we have a proper attribute for this. > > Modified: > head/sys/sys/cdefs.h > > Modified: head/sys/sys/cdefs.h > ============================================================================== > --- head/sys/sys/cdefs.h Tue Sep 2 10:35:04 2014 (r270963) > +++ head/sys/sys/cdefs.h Tue Sep 2 11:16:44 2014 (r270964) > @@ -298,8 +298,7 @@ > #endif > > #if !__has_extension(c_thread_local) > -/* XXX: Change this to test against C++11 when clang in base supports it. */ > -#if /* (defined(__cplusplus) && __cplusplus >= 201103L) || */ \ > +#if (defined(__cplusplus) && __cplusplus >= 201103L) || \ > __has_extension(cxx_thread_local) > #define _Thread_local thread_local > #else Hi, This change may break the lang/gcc port on head: http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p367138_s270990/logs/errors/gcc-4.7.4.log Cheers, Antoine From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 06:25:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C10DCC9; Wed, 3 Sep 2014 06:25:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 581881311; Wed, 3 Sep 2014 06:25:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s836PZ3Q032160; Wed, 3 Sep 2014 06:25:35 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s836PZHY032159; Wed, 3 Sep 2014 06:25:35 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201409030625.s836PZHY032159@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 3 Sep 2014 06:25:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270993 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 06:25:35 -0000 Author: mjg Date: Wed Sep 3 06:25:34 2014 New Revision: 270993 URL: http://svnweb.freebsd.org/changeset/base/270993 Log: Fix up proc_realparent to always return correct process. Prior to the change it would always return initproc for non-traced processes. This fixes ps apparently always returning 1 as ppid. Pointy hat: mjg Reported by: many MFC after: 1 week Modified: head/sys/kern/kern_exit.c Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Wed Sep 3 05:14:50 2014 (r270992) +++ head/sys/kern/kern_exit.c Wed Sep 3 06:25:34 2014 (r270993) @@ -104,8 +104,12 @@ proc_realparent(struct proc *child) sx_assert(&proctree_lock, SX_LOCKED); if ((child->p_treeflag & P_TREE_ORPHANED) == 0) { - return (child->p_pptr->p_pid == child->p_oppid ? - child->p_pptr : initproc); + if (child->p_oppid == 0 || + child->p_pptr->p_pid == child->p_oppid) + parent = child->p_pptr; + else + parent = initproc; + return (parent); } for (p = child; (p->p_treeflag & P_TREE_FIRST_ORPHAN) == 0;) { /* Cannot use LIST_PREV(), since the list head is not known. */ From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 06:34:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 511B7D0; Wed, 3 Sep 2014 06:34:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D3F213DC; Wed, 3 Sep 2014 06:34:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s836YHIP036748; Wed, 3 Sep 2014 06:34:17 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s836YHEG036747; Wed, 3 Sep 2014 06:34:17 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201409030634.s836YHEG036747@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Wed, 3 Sep 2014 06:34:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270994 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 06:34:17 -0000 Author: ed Date: Wed Sep 3 06:34:16 2014 New Revision: 270994 URL: http://svnweb.freebsd.org/changeset/base/270994 Log: Partially revert r270964. Don't test for C++11 to define _Thread_local. In addition to Clang 3.3, it turns out that GCC 4.7 in Ports also does not support the _Thread_local keyword. Let's document this in a bit more detail. Reported by: antoine@ Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Wed Sep 3 06:25:34 2014 (r270993) +++ head/sys/sys/cdefs.h Wed Sep 3 06:34:16 2014 (r270994) @@ -298,7 +298,12 @@ #endif #if !__has_extension(c_thread_local) -#if (defined(__cplusplus) && __cplusplus >= 201103L) || \ +/* + * XXX: Some compilers (Clang 3.3, GCC 4.7) falsely announce C++11 mode + * without actually supporting the thread_local keyword. Don't check for + * the presence of C++11 when defining _Thread_local. + */ +#if /* (defined(__cplusplus) && __cplusplus >= 201103L) || */ \ __has_extension(cxx_thread_local) #define _Thread_local thread_local #else From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 06:34:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7190B2F3; Wed, 3 Sep 2014 06:34:44 +0000 (UTC) Received: from mail-la0-x22b.google.com (mail-la0-x22b.google.com [IPv6:2a00:1450:4010:c03::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 68C5C13E6; Wed, 3 Sep 2014 06:34:43 +0000 (UTC) Received: by mail-la0-f43.google.com with SMTP id ty20so9110621lab.2 for ; Tue, 02 Sep 2014 23:34:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=0XAPpeV7ZDuyHQ4OhWzw21FCrFI14hnBBJLIhfDmMro=; b=ULC87RPScA/5GtnRmzFFUCdywUBIiDgr48HnbqK9m3QSNj+/fJS1iP5ssoQUJcjTZj 05geunnfywGFUa+SmJoNEm967YFtBIcH6lFrL4JlxgLoUsFacQW6ISnfV70vBfjDnubW zpApU7FW9jQlIXryuhvZMDMmQgi4en5r84CV4bBHXP4lc3DXQtsdTkwepYkY5WtvUawj NAw2PuK6UZtZcvgnCDRHVd8zm8mJtMu1glKpUv3LYra512vzN3KIMX/NhI78tVle+thW ouEv2YMZ8k0MVJW+vn2P9kXxr2/TuKGHra73DbrDSOapTZAHfz4c317VLc56SLcEzwI0 BTAA== MIME-Version: 1.0 X-Received: by 10.112.198.233 with SMTP id jf9mr15593674lbc.43.1409726081290; Tue, 02 Sep 2014 23:34:41 -0700 (PDT) Sender: edschouten@gmail.com Received: by 10.152.144.2 with HTTP; Tue, 2 Sep 2014 23:34:41 -0700 (PDT) In-Reply-To: References: <201409021116.s82BGiXI071065@svn.freebsd.org> Date: Wed, 3 Sep 2014 08:34:41 +0200 X-Google-Sender-Auth: qGopY8j7JOg1ve0rxcwEHtDBLKs Message-ID: Subject: Re: svn commit: r270964 - head/sys/sys From: Ed Schouten To: Antoine Brodin Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 06:34:44 -0000 On 3 September 2014 07:44, Antoine Brodin wrote: > This change may break the lang/gcc port on head: > http://gohan2.ysv.freebsd.org/data/head-amd64-default-baseline/p367138_s270990/logs/errors/gcc-4.7.4.log Good catch! Fixed in r270994. -- Ed Schouten From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 06:47:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 913579A1; Wed, 3 Sep 2014 06:47:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62E7615A1; Wed, 3 Sep 2014 06:47:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s836l6fC042382; Wed, 3 Sep 2014 06:47:06 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s836l6ew042380; Wed, 3 Sep 2014 06:47:06 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201409030647.s836l6ew042380@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 3 Sep 2014 06:47:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270995 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 06:47:06 -0000 Author: alc Date: Wed Sep 3 06:47:05 2014 New Revision: 270995 URL: http://svnweb.freebsd.org/changeset/base/270995 Log: MFC r270666 Back in the days when the kernel was single threaded, testing "vm_paging_target() > 0" was a reasonable way of determining if the inactive queue scan met its target. However, now that other threads can be allocating pages while the inactive queue scan is running, it's an unreliable method. The effect of it being unreliable is that we can start swapping out processes when we didn't intend to. This issue has existed since the kernel was multithreaded, but the changes to the inactive queue target in 10.0-RELEASE have made its effects visible. This change introduces a more direct method for determining if the inactive queue scan met its target that is not affected by the actions of other threads. Modified: stable/10/sys/vm/vm_pageout.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_pageout.c ============================================================================== --- stable/10/sys/vm/vm_pageout.c Wed Sep 3 06:34:16 2014 (r270994) +++ stable/10/sys/vm/vm_pageout.c Wed Sep 3 06:47:05 2014 (r270995) @@ -1308,6 +1308,23 @@ relock_queues: } vm_pagequeue_unlock(pq); +#if !defined(NO_SWAPPING) + /* + * Wakeup the swapout daemon if we didn't cache or free the targeted + * number of pages. + */ + if (vm_swap_enabled && page_shortage > 0) + vm_req_vmdaemon(VM_SWAP_NORMAL); +#endif + + /* + * Wakeup the sync daemon if we skipped a vnode in a writeable object + * and we didn't cache or free enough pages. + */ + if (vnodes_skipped > 0 && page_shortage > vm_cnt.v_free_target - + vm_cnt.v_free_min) + (void)speedup_syncer(); + /* * Compute the number of pages we want to try to move from the * active queue to the inactive queue. @@ -1418,20 +1435,6 @@ relock_queues: } } #endif - - /* - * If we didn't get enough free pages, and we have skipped a vnode - * in a writeable object, wakeup the sync daemon. And kick swapout - * if we did not get enough free pages. - */ - if (vm_paging_target() > 0) { - if (vnodes_skipped && vm_page_count_min()) - (void) speedup_syncer(); -#if !defined(NO_SWAPPING) - if (vm_swap_enabled && vm_page_count_target()) - vm_req_vmdaemon(VM_SWAP_NORMAL); -#endif - } /* * If we are critically low on one of RAM or swap and low on From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 07:16:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24D96EFB; Wed, 3 Sep 2014 07:16:37 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7037199E; Wed, 3 Sep 2014 07:16:36 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s837GUeS014627 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Sep 2014 10:16:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s837GUeS014627 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s837GTnE014626; Wed, 3 Sep 2014 10:16:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 3 Sep 2014 10:16:29 +0300 From: Konstantin Belousov To: Mateusz Guzik Subject: Re: svn commit: r270993 - head/sys/kern Message-ID: <20140903071629.GG2737@kib.kiev.ua> References: <201409030625.s836PZHY032159@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ycwUkriSLVNn2GEA" Content-Disposition: inline In-Reply-To: <201409030625.s836PZHY032159@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 07:16:37 -0000 --ycwUkriSLVNn2GEA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 03, 2014 at 06:25:35AM +0000, Mateusz Guzik wrote: > Author: mjg > Date: Wed Sep 3 06:25:34 2014 > New Revision: 270993 > URL: http://svnweb.freebsd.org/changeset/base/270993 >=20 > Log: > Fix up proc_realparent to always return correct process. > =20 > Prior to the change it would always return initproc for non-traced proc= esses. > =20 > This fixes ps apparently always returning 1 as ppid. > =20 > Pointy hat: mjg No, this is my bug. Thank you for fixing it. It is a consequence of the last minute 'safety' change I did. > Reported by: many > MFC after: 1 week I suggest to merge in 3 days. >=20 > Modified: > head/sys/kern/kern_exit.c >=20 > Modified: head/sys/kern/kern_exit.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/kern_exit.c Wed Sep 3 05:14:50 2014 (r270992) > +++ head/sys/kern/kern_exit.c Wed Sep 3 06:25:34 2014 (r270993) > @@ -104,8 +104,12 @@ proc_realparent(struct proc *child) > =20 > sx_assert(&proctree_lock, SX_LOCKED); > if ((child->p_treeflag & P_TREE_ORPHANED) =3D=3D 0) { > - return (child->p_pptr->p_pid =3D=3D child->p_oppid ? > - child->p_pptr : initproc); > + if (child->p_oppid =3D=3D 0 || > + child->p_pptr->p_pid =3D=3D child->p_oppid) > + parent =3D child->p_pptr; > + else > + parent =3D initproc; > + return (parent); > } > for (p =3D child; (p->p_treeflag & P_TREE_FIRST_ORPHAN) =3D=3D 0;) { > /* Cannot use LIST_PREV(), since the list head is not known. */ --ycwUkriSLVNn2GEA Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUBsBNAAoJEJDCuSvBvK1BZsYQAKMG6eByajEpv3jfq4zesfOR n6IrBo6JWXfIGKgyh/Jfz83beKwWwGWj3QW767zCZeTGtUW/zSsgZD2ntTMchPVg phYuOmeKSFYg0qLwauISHuCloWDCDLXSQ3Ytlq5UQ93nHvsuBSrI1Y91Gl/ZiEAt Tz6e4Uz9Hs4aS0TffGMLSKDmDk2vIEPRCxIpVy9TxBHdZMyPxEt8txPzXp8pgOlR X0N9cHCESjYIcTeDJ/0ZOW2dH5NAFLtW4ppAEQll9+ptdcbwHExRh/KOTtkesqf7 1LM2EEYOVC48xDD5QP3omZ6IiMTUzX/wFBU8Ce7ju62R+XTIqqxLskRtIZxRA9hc JAFL/eRjJ3Rn/Dm01u7pmKCF8g+ajCe7jR/wdHm3LAFfcjWDAmrjuNiJWQI75HcX Ky0JLo/paw+9NgDOrNmpo5ZpS77VoS7ZKkPAro9zQSPE6HCzcNdduKiqI9r6NmjJ VTRvHUlMcUK9X7gcKQp+rmZAP+xb7OZep0AdIwERUNmzk5Om9vbu8AjLtfkpMGO4 X2VyGgpDLraVHghtLZ4Vj0c5c/wr159cVLB/sPn2fQUX0skAwP15pdyQx3lmmoX/ /oWQhmc4DWMaEEYvtEYxCty7oAkUNPP42RDgaOpNIVwA5XGI2b+Vv95M1ySvznLd lE/ZCMRbYQQl6FQeeGpO =aWPA -----END PGP SIGNATURE----- --ycwUkriSLVNn2GEA-- From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 07:20:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C686011C; Wed, 3 Sep 2014 07:20:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1ABE19C4; Wed, 3 Sep 2014 07:20:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s837KA13056734; Wed, 3 Sep 2014 07:20:10 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s837KAQm056733; Wed, 3 Sep 2014 07:20:10 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201409030720.s837KAQm056733@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Wed, 3 Sep 2014 07:20:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270996 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 07:20:10 -0000 Author: alc Date: Wed Sep 3 07:20:09 2014 New Revision: 270996 URL: http://svnweb.freebsd.org/changeset/base/270996 Log: This is a direct commit to account for the renaming of 'cnt' to 'vm_cnt' in HEAD but not stable/10. Modified: stable/10/sys/vm/vm_pageout.c Modified: stable/10/sys/vm/vm_pageout.c ============================================================================== --- stable/10/sys/vm/vm_pageout.c Wed Sep 3 06:47:05 2014 (r270995) +++ stable/10/sys/vm/vm_pageout.c Wed Sep 3 07:20:09 2014 (r270996) @@ -1321,8 +1321,8 @@ relock_queues: * Wakeup the sync daemon if we skipped a vnode in a writeable object * and we didn't cache or free enough pages. */ - if (vnodes_skipped > 0 && page_shortage > vm_cnt.v_free_target - - vm_cnt.v_free_min) + if (vnodes_skipped > 0 && page_shortage > cnt.v_free_target - + cnt.v_free_min) (void)speedup_syncer(); /* From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 08:03:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 77DCBAA3; Wed, 3 Sep 2014 08:03:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62C931E36; Wed, 3 Sep 2014 08:03:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8383RxS079227; Wed, 3 Sep 2014 08:03:27 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8383Rt2079226; Wed, 3 Sep 2014 08:03:27 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409030803.s8383Rt2079226@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 3 Sep 2014 08:03:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270997 - stable/10/rescue/rescue X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:03:27 -0000 Author: delphij Date: Wed Sep 3 08:03:26 2014 New Revision: 270997 URL: http://svnweb.freebsd.org/changeset/base/270997 Log: MFC r270189: Add zdb into rescue environment. On amd64, this would increase the binary size by 1.1MiB and make it possible to examine zpool status offline, useful for recovery and diagnostic purposes. Submitted by: sef Obtained from: FreeNAS Modified: stable/10/rescue/rescue/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/rescue/rescue/Makefile ============================================================================== --- stable/10/rescue/rescue/Makefile Wed Sep 3 07:20:09 2014 (r270996) +++ stable/10/rescue/rescue/Makefile Wed Sep 3 08:03:26 2014 (r270997) @@ -113,6 +113,7 @@ CRUNCH_PROGS_sbin+= ipf .if ${MK_ZFS} != "no" CRUNCH_PROGS_sbin+= zfs CRUNCH_PROGS_sbin+= zpool +CRUNCH_PROGS_usr.sbin+= zdb .endif # crunchgen does not like C++ programs; this should be fixed someday @@ -123,7 +124,7 @@ CRUNCH_LIBS+= -lalias -lcam -lcurses -ld CRUNCH_LIBS+= -lipx .endif .if ${MK_ZFS} != "no" -CRUNCH_LIBS+= -lavl -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem +CRUNCH_LIBS+= -lavl -lzpool -lzfs_core -lzfs -lnvpair -lpthread -luutil -lumem .endif CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv .if ${MK_OPENSSL} == "no" @@ -165,6 +166,7 @@ CRUNCH_SRCDIR_ipf= $(.CURDIR)/../../sbin .if ${MK_ZFS} != "no" CRUNCH_SRCDIR_zfs= ${.CURDIR}/../../cddl/sbin/zfs CRUNCH_SRCDIR_zpool= ${.CURDIR}/../../cddl/sbin/zpool +CRUNCH_SRCDIR_zdb= ${.CURDIR}/../../cddl/usr.sbin/zdb .endif CRUNCH_ALIAS_reboot= fastboot halt fasthalt CRUNCH_ALIAS_restore= rrestore @@ -215,7 +217,7 @@ CRUNCH_ALIAS_id= groups whoami # CRUNCH_SRCDIRS+= usr.sbin -CRUNCH_PROGS_usr.sbin= chroot +CRUNCH_PROGS_usr.sbin+= chroot CRUNCH_PROGS_usr.sbin+= chown CRUNCH_ALIAS_chown= chgrp From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 08:09:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A0BEC25; Wed, 3 Sep 2014 08:09:25 +0000 (UTC) Received: from smtp1.multiplay.co.uk (smtp1.multiplay.co.uk [85.236.96.35]) by mx1.freebsd.org (Postfix) with ESMTP id 37ADE1E70; Wed, 3 Sep 2014 08:09:24 +0000 (UTC) Received: by smtp1.multiplay.co.uk (Postfix, from userid 65534) id 0B42220E7088C; Wed, 3 Sep 2014 08:09:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.multiplay.co.uk X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=8.0 tests=AWL,BAYES_00,DOS_OE_TO_MX, FSL_HELO_NON_FQDN_1,RDNS_DYNAMIC,STOX_REPLY_TYPE autolearn=no version=3.3.1 Received: from r2d2 (82-69-141-170.dsl.in-addr.zen.co.uk [82.69.141.170]) by smtp1.multiplay.co.uk (Postfix) with ESMTPS id B043C20E7088A; Wed, 3 Sep 2014 08:09:21 +0000 (UTC) Message-ID: <169C94ED141B435BACEADB04A4824717@multiplay.co.uk> From: "Steven Hartland" To: "Alan Cox" , "John Baldwin" , "Peter Wemm" References: <201408281950.s7SJo90I047213@svn.freebsd.org> <39211177.i8nn9sHiCx@overcee.wemm.org> <201409021201.15967.jhb@freebsd.org> <5405FD2C.8000901@rice.edu> <54060D1B.6020700@rice.edu> <774F8EEE96EB483DA8ACF533CF7C23F3@multiplay.co.uk> <54062268.9060603@rice.edu> Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm Date: Wed, 3 Sep 2014 09:09:23 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-15"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dmitry Morozovsky , "Matthew D. Fuller" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:09:25 -0000 I'm looking to MFC this change so wanted to check if anyone had an final feedback / objections? I know we currently have Alan's feedback on changing the #ifdef __i386__ to #ifndef UMA_MD_SMALL_ALLOC which sounds sensible but waiting Peter to comment on. Regards Steve From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 08:13:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E95CFE80; Wed, 3 Sep 2014 08:13:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3E741F1F; Wed, 3 Sep 2014 08:13:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s838DlFN084137; Wed, 3 Sep 2014 08:13:47 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s838Dlvm084132; Wed, 3 Sep 2014 08:13:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409030813.s838Dlvm084132@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 3 Sep 2014 08:13:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270998 - in stable/10/sys/cddl/contrib/opensolaris/uts/common: dtrace os sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:13:48 -0000 Author: delphij Date: Wed Sep 3 08:13:46 2014 New Revision: 270998 URL: http://svnweb.freebsd.org/changeset/base/270998 Log: MFC r270239: MFV r270193: Illumos issues: 5042 stop using deprecated atomic functions Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/systrace.c stable/10/sys/cddl/contrib/opensolaris/uts/common/os/fm.c stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/systrace.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/systrace.c Wed Sep 3 08:03:26 2014 (r270997) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/systrace.c Wed Sep 3 08:13:46 2014 (r270998) @@ -165,11 +165,11 @@ systrace_enable(void *arg, dtrace_id_t i return; } - (void) casptr(&sysent[sysnum].sy_callc, + (void) atomic_cas_ptr(&sysent[sysnum].sy_callc, (void *)systrace_sysent[sysnum].stsy_underlying, (void *)dtrace_systrace_syscall); #ifdef _SYSCALL32_IMPL - (void) casptr(&sysent32[sysnum].sy_callc, + (void) atomic_cas_ptr(&sysent32[sysnum].sy_callc, (void *)systrace_sysent32[sysnum].stsy_underlying, (void *)dtrace_systrace_syscall32); #endif @@ -184,12 +184,12 @@ systrace_disable(void *arg, dtrace_id_t systrace_sysent[sysnum].stsy_return == DTRACE_IDNONE); if (disable) { - (void) casptr(&sysent[sysnum].sy_callc, + (void) atomic_cas_ptr(&sysent[sysnum].sy_callc, (void *)dtrace_systrace_syscall, (void *)systrace_sysent[sysnum].stsy_underlying); #ifdef _SYSCALL32_IMPL - (void) casptr(&sysent32[sysnum].sy_callc, + (void) atomic_cas_ptr(&sysent32[sysnum].sy_callc, (void *)dtrace_systrace_syscall32, (void *)systrace_sysent32[sysnum].stsy_underlying); #endif Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/os/fm.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/os/fm.c Wed Sep 3 08:03:26 2014 (r270997) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/os/fm.c Wed Sep 3 08:13:46 2014 (r270998) @@ -379,7 +379,7 @@ fm_panic(const char *format, ...) { va_list ap; - (void) casptr((void *)&fm_panicstr, NULL, (void *)format); + (void) atomic_cas_ptr((void *)&fm_panicstr, NULL, (void *)format); #if defined(__i386) || defined(__amd64) fastreboot_disable_highpil(); #endif /* __i386 || __amd64 */ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h Wed Sep 3 08:03:26 2014 (r270997) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/bitmap.h Wed Sep 3 08:13:46 2014 (r270998) @@ -171,9 +171,9 @@ extern int odd_parity(ulong_t); * to 0 otherwise. */ #define BT_ATOMIC_SET(bitmap, bitindex) \ - { atomic_or_long(&(BT_WIM(bitmap, bitindex)), BT_BIW(bitindex)); } + { atomic_or_ulong(&(BT_WIM(bitmap, bitindex)), BT_BIW(bitindex)); } #define BT_ATOMIC_CLEAR(bitmap, bitindex) \ - { atomic_and_long(&(BT_WIM(bitmap, bitindex)), ~BT_BIW(bitindex)); } + { atomic_and_ulong(&(BT_WIM(bitmap, bitindex)), ~BT_BIW(bitindex)); } #define BT_ATOMIC_SET_EXCL(bitmap, bitindex, result) \ { result = atomic_set_long_excl(&(BT_WIM(bitmap, bitindex)), \ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h Wed Sep 3 08:03:26 2014 (r270997) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h Wed Sep 3 08:13:46 2014 (r270998) @@ -524,8 +524,8 @@ typedef ulong_t cpuset_t; /* a set of CP largest = (uint_t)(highbit(set) - 1); \ } -#define CPUSET_ATOMIC_DEL(set, cpu) atomic_and_long(&(set), ~CPUSET(cpu)) -#define CPUSET_ATOMIC_ADD(set, cpu) atomic_or_long(&(set), CPUSET(cpu)) +#define CPUSET_ATOMIC_DEL(set, cpu) atomic_and_ulong(&(set), ~CPUSET(cpu)) +#define CPUSET_ATOMIC_ADD(set, cpu) atomic_or_ulong(&(set), CPUSET(cpu)) #define CPUSET_ATOMIC_XADD(set, cpu, result) \ { result = atomic_set_long_excl(&(set), (cpu)); } From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 08:14:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C0BE100; Wed, 3 Sep 2014 08:14:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBF5D1F26; Wed, 3 Sep 2014 08:14:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s838E7C0084258; Wed, 3 Sep 2014 08:14:07 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s838E7A2084257; Wed, 3 Sep 2014 08:14:07 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409030814.s838E7A2084257@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 3 Sep 2014 08:14:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270999 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:14:08 -0000 Author: glebius Date: Wed Sep 3 08:14:07 2014 New Revision: 270999 URL: http://svnweb.freebsd.org/changeset/base/270999 Log: Fix dereference after NULL check. CID: 1234607 Sponsored by: Nginx, Inc. Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Wed Sep 3 08:13:46 2014 (r270998) +++ head/sys/kern/kern_proc.c Wed Sep 3 08:14:07 2014 (r270999) @@ -921,10 +921,11 @@ fill_kinfo_proc_only(struct proc *p, str kp->ki_xstat = p->p_xstat; kp->ki_acflag = p->p_acflag; kp->ki_lock = p->p_lock; - if (p->p_pptr) + if (p->p_pptr) { kp->ki_ppid = proc_realparent(p)->p_pid; - if (p->p_flag & P_TRACED) - kp->ki_tracer = p->p_pptr->p_pid; + if (p->p_flag & P_TRACED) + kp->ki_tracer = p->p_pptr->p_pid; + } } /* From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 08:18:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D702272; Wed, 3 Sep 2014 08:18:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F42F1F48; Wed, 3 Sep 2014 08:18:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s838I8q5084844; Wed, 3 Sep 2014 08:18:08 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s838I8uY084843; Wed, 3 Sep 2014 08:18:08 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409030818.s838I8uY084843@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Sep 2014 08:18:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271000 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:18:08 -0000 Author: kib Date: Wed Sep 3 08:18:07 2014 New Revision: 271000 URL: http://svnweb.freebsd.org/changeset/base/271000 Log: Right now, thread_single(SINGLE_EXIT) returns after the p_numthreads reaches 1. The p_numthreads counter is decremented in thread_exit() by a call to thread_unlink(). This means that the exiting threads may still execute on other CPUs when thread_single(SINGLE_EXIT) returns. As result, vmspace could be destroyed while paging structures are still used on other CPUs by exiting threads. Delay the return from thread_single(SINGLE_EXIT) until all threads are really destroyed by thread_stash() after the last switch out. The p_exitthreads counter already provides the required mechanism, move the wait from the thread_wait() (which is called from wait(2) code) into thread_single(). Reported by: many (as "panic: pmap active ") Reviewed by: alc, jhb Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_thread.c Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Wed Sep 3 08:14:07 2014 (r270999) +++ head/sys/kern/kern_thread.c Wed Sep 3 08:18:07 2014 (r271000) @@ -432,6 +432,7 @@ thread_exit(void) */ if (p->p_flag & P_HADTHREADS) { if (p->p_numthreads > 1) { + atomic_add_int(&td->td_proc->p_exitthreads, 1); thread_unlink(td); td2 = FIRST_THREAD_IN_PROC(p); sched_exit_thread(td2, td); @@ -452,7 +453,6 @@ thread_exit(void) } } - atomic_add_int(&td->td_proc->p_exitthreads, 1); PCPU_SET(deadthread, td); } else { /* @@ -507,14 +507,12 @@ thread_wait(struct proc *p) struct thread *td; mtx_assert(&Giant, MA_NOTOWNED); - KASSERT((p->p_numthreads == 1), ("Multiple threads in wait1()")); + KASSERT((p->p_numthreads == 1), ("multiple threads in thread_wait()")); + KASSERT((p->p_exitthreads == 0), ("p_exitthreads leaking")); td = FIRST_THREAD_IN_PROC(p); /* Lock the last thread so we spin until it exits cpu_throw(). */ thread_lock(td); thread_unlock(td); - /* Wait for any remaining threads to exit cpu_throw(). */ - while (p->p_exitthreads) - sched_relinquish(curthread); lock_profile_thread_exit(td); cpuset_rel(td->td_cpuset); td->td_cpuset = NULL; @@ -722,6 +720,17 @@ stopme: p->p_singlethread = NULL; p->p_flag &= ~(P_STOPPED_SINGLE | P_SINGLE_EXIT); thread_unthread(td); + + /* + * Wait for any remaining threads to exit cpu_throw(). + */ + while (p->p_exitthreads != 0) { + PROC_SUNLOCK(p); + PROC_UNLOCK(p); + sched_relinquish(td); + PROC_LOCK(p); + PROC_SLOCK(p); + } } PROC_SUNLOCK(p); return (0); From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 08:18:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 37EDA38F; Wed, 3 Sep 2014 08:18:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 205AB1F4A; Wed, 3 Sep 2014 08:18:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s838ICSE084899; Wed, 3 Sep 2014 08:18:12 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s838I9ni084887; Wed, 3 Sep 2014 08:18:09 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409030818.s838I9ni084887@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 3 Sep 2014 08:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271001 - in stable/10/sys/cddl/contrib/opensolaris/uts: common/dtrace common/fs/zfs common/fs/zfs/sys common/os sparc/dtrace X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:18:12 -0000 Author: delphij Date: Wed Sep 3 08:18:09 2014 New Revision: 271001 URL: http://svnweb.freebsd.org/changeset/base/271001 Log: MFC r270247: MFV r270195: Illumos issue: 5045 use atomic_{inc,dec}_* instead of atomic_add_* Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/profile.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c stable/10/sys/cddl/contrib/opensolaris/uts/common/os/fm.c stable/10/sys/cddl/contrib/opensolaris/uts/sparc/dtrace/fasttrap_isa.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Wed Sep 3 08:18:09 2014 (r271001) @@ -1467,7 +1467,7 @@ fasttrap_proc_lookup(pid_t pid) mutex_enter(&fprc->ftpc_mtx); mutex_exit(&bucket->ftb_mtx); fprc->ftpc_rcount++; - atomic_add_64(&fprc->ftpc_acount, 1); + atomic_inc_64(&fprc->ftpc_acount); ASSERT(fprc->ftpc_acount <= fprc->ftpc_rcount); mutex_exit(&fprc->ftpc_mtx); @@ -1501,7 +1501,7 @@ fasttrap_proc_lookup(pid_t pid) mutex_enter(&fprc->ftpc_mtx); mutex_exit(&bucket->ftb_mtx); fprc->ftpc_rcount++; - atomic_add_64(&fprc->ftpc_acount, 1); + atomic_inc_64(&fprc->ftpc_acount); ASSERT(fprc->ftpc_acount <= fprc->ftpc_rcount); mutex_exit(&fprc->ftpc_mtx); @@ -1738,7 +1738,7 @@ fasttrap_provider_free(fasttrap_provider * count of active providers on the associated process structure. */ if (!provider->ftp_retired) { - atomic_add_64(&provider->ftp_proc->ftpc_acount, -1); + atomic_dec_64(&provider->ftp_proc->ftpc_acount); ASSERT(provider->ftp_proc->ftpc_acount < provider->ftp_proc->ftpc_rcount); } @@ -1814,7 +1814,7 @@ fasttrap_provider_retire(pid_t pid, cons * bucket lock therefore protects the integrity of the provider hash * table. */ - atomic_add_64(&fp->ftp_proc->ftpc_acount, -1); + atomic_dec_64(&fp->ftp_proc->ftpc_acount); ASSERT(fp->ftp_proc->ftpc_acount < fp->ftp_proc->ftpc_rcount); fp->ftp_retired = 1; @@ -1910,10 +1910,10 @@ fasttrap_add_probe(fasttrap_probe_spec_t pdata->ftps_mod, pdata->ftps_func, name_str) != 0) continue; - atomic_add_32(&fasttrap_total, 1); + atomic_inc_32(&fasttrap_total); if (fasttrap_total > fasttrap_max) { - atomic_add_32(&fasttrap_total, -1); + atomic_dec_32(&fasttrap_total); goto no_mem; } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/profile.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/profile.c Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/profile.c Wed Sep 3 08:18:09 2014 (r271001) @@ -169,9 +169,9 @@ profile_create(hrtime_t interval, const if (dtrace_probe_lookup(profile_id, NULL, NULL, name) != 0) return; - atomic_add_32(&profile_total, 1); + atomic_inc_32(&profile_total); if (profile_total > profile_max) { - atomic_add_32(&profile_total, -1); + atomic_dec_32(&profile_total); return; } @@ -326,7 +326,7 @@ profile_destroy(void *arg, dtrace_id_t i kmem_free(prof, sizeof (profile_probe_t)); ASSERT(profile_total >= 1); - atomic_add_32(&profile_total, -1); + atomic_dec_32(&profile_total); } /*ARGSUSED*/ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Sep 3 08:18:09 2014 (r271001) @@ -176,7 +176,7 @@ dbuf_hash_insert(dmu_buf_impl_t *db) db->db_hash_next = h->hash_table[idx]; h->hash_table[idx] = db; mutex_exit(DBUF_HASH_MUTEX(h, idx)); - atomic_add_64(&dbuf_hash_count, 1); + atomic_inc_64(&dbuf_hash_count); return (NULL); } @@ -210,7 +210,7 @@ dbuf_hash_remove(dmu_buf_impl_t *db) *dbp = db->db_hash_next; db->db_hash_next = NULL; mutex_exit(DBUF_HASH_MUTEX(h, idx)); - atomic_add_64(&dbuf_hash_count, -1); + atomic_dec_64(&dbuf_hash_count); } static arc_evict_func_t dbuf_do_evict; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Wed Sep 3 08:18:09 2014 (r271001) @@ -1873,9 +1873,9 @@ spa_load_verify_done(zio_t *zio) if (error) { if ((BP_GET_LEVEL(bp) != 0 || DMU_OT_IS_METADATA(type)) && type != DMU_OT_INTENT_LOG) - atomic_add_64(&sle->sle_meta_count, 1); + atomic_inc_64(&sle->sle_meta_count); else - atomic_add_64(&sle->sle_data_count, 1); + atomic_inc_64(&sle->sle_data_count); } zio_data_buf_free(zio->io_data, zio->io_size); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/refcount.h Wed Sep 3 08:18:09 2014 (r271001) @@ -89,8 +89,8 @@ typedef struct refcount { #define refcount_destroy_many(rc, number) ((rc)->rc_count = 0) #define refcount_is_zero(rc) ((rc)->rc_count == 0) #define refcount_count(rc) ((rc)->rc_count) -#define refcount_add(rc, holder) atomic_add_64_nv(&(rc)->rc_count, 1) -#define refcount_remove(rc, holder) atomic_add_64_nv(&(rc)->rc_count, -1) +#define refcount_add(rc, holder) atomic_inc_64_nv(&(rc)->rc_count) +#define refcount_remove(rc, holder) atomic_dec_64_nv(&(rc)->rc_count) #define refcount_add_many(rc, number, holder) \ atomic_add_64_nv(&(rc)->rc_count, number) #define refcount_remove_many(rc, number, holder) \ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c Wed Sep 3 08:18:09 2014 (r271001) @@ -114,7 +114,7 @@ static vdc_stats_t vdc_stats = { { "misses", KSTAT_DATA_UINT64 } }; -#define VDCSTAT_BUMP(stat) atomic_add_64(&vdc_stats.stat.value.ui64, 1); +#define VDCSTAT_BUMP(stat) atomic_inc_64(&vdc_stats.stat.value.ui64); static int vdev_cache_offset_compare(const void *a1, const void *a2) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c Wed Sep 3 08:18:09 2014 (r271001) @@ -992,7 +992,7 @@ vdev_uberblock_sync_done(zio_t *zio) uint64_t *good_writes = zio->io_private; if (zio->io_error == 0 && zio->io_vd->vdev_top->vdev_ms_array != 0) - atomic_add_64(good_writes, 1); + atomic_inc_64(good_writes); } /* @@ -1067,7 +1067,7 @@ vdev_label_sync_done(zio_t *zio) uint64_t *good_writes = zio->io_private; if (zio->io_error == 0) - atomic_add_64(good_writes, 1); + atomic_inc_64(good_writes); } /* Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Sep 3 08:18:09 2014 (r271001) @@ -1234,7 +1234,7 @@ out: dmu_objset_disown(zfsvfs->z_os, zfsvfs); zfsvfs_free(zfsvfs); } else { - atomic_add_32(&zfs_active_fs_count, 1); + atomic_inc_32(&zfs_active_fs_count); } return (error); @@ -2325,7 +2325,7 @@ zfs_freevfs(vfs_t *vfsp) zfsvfs_free(zfsvfs); - atomic_add_32(&zfs_active_fs_count, -1); + atomic_dec_32(&zfs_active_fs_count); } #ifdef __i386__ Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c Wed Sep 3 08:18:09 2014 (r271001) @@ -426,7 +426,7 @@ zio_inject_fault(char *name, int flags, handler->zi_spa = spa; handler->zi_record = *record; list_insert_tail(&inject_handlers, handler); - atomic_add_32(&zio_injection_enabled, 1); + atomic_inc_32(&zio_injection_enabled); rw_exit(&inject_lock); } @@ -503,7 +503,7 @@ zio_clear_fault(int id) spa_inject_delref(handler->zi_spa); kmem_free(handler, sizeof (inject_handler_t)); - atomic_add_32(&zio_injection_enabled, -1); + atomic_dec_32(&zio_injection_enabled); return (0); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/os/fm.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/os/fm.c Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/os/fm.c Wed Sep 3 08:18:09 2014 (r271001) @@ -524,20 +524,20 @@ fm_ereport_post(nvlist_t *ereport, int e (void) nvlist_size(ereport, &nvl_size, NV_ENCODE_NATIVE); if (nvl_size > ERPT_DATA_SZ || nvl_size == 0) { - atomic_add_64(&erpt_kstat_data.erpt_dropped.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_dropped.value.ui64); return; } #ifdef sun if (sysevent_evc_bind(FM_ERROR_CHAN, &error_chan, EVCH_CREAT|EVCH_HOLD_PEND) != 0) { - atomic_add_64(&erpt_kstat_data.erpt_dropped.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_dropped.value.ui64); return; } if (sysevent_evc_publish(error_chan, EC_FM, ESC_FM_ERROR, SUNW_VENDOR, FM_PUB, ereport, evc_flag) != 0) { - atomic_add_64(&erpt_kstat_data.erpt_dropped.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_dropped.value.ui64); (void) sysevent_evc_unbind(error_chan); return; } @@ -803,8 +803,7 @@ fm_payload_set(nvlist_t *payload, ...) va_end(ap); if (ret) - atomic_add_64( - &erpt_kstat_data.payload_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.payload_set_failed.value.ui64); } /* @@ -837,24 +836,24 @@ fm_ereport_set(nvlist_t *ereport, int ve int ret; if (version != FM_EREPORT_VERS0) { - atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64); return; } (void) snprintf(ereport_class, FM_MAX_CLASS, "%s.%s", FM_EREPORT_CLASS, erpt_class); if (nvlist_add_string(ereport, FM_CLASS, ereport_class) != 0) { - atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64); return; } if (nvlist_add_uint64(ereport, FM_EREPORT_ENA, ena)) { - atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64); } if (nvlist_add_nvlist(ereport, FM_EREPORT_DETECTOR, (nvlist_t *)detector) != 0) { - atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64); } va_start(ap, detector); @@ -863,7 +862,7 @@ fm_ereport_set(nvlist_t *ereport, int ve va_end(ap); if (ret) - atomic_add_64(&erpt_kstat_data.erpt_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.erpt_set_failed.value.ui64); } /* @@ -886,19 +885,19 @@ static int fm_fmri_hc_set_common(nvlist_t *fmri, int version, const nvlist_t *auth) { if (version != FM_HC_SCHEME_VERSION) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return (0); } if (nvlist_add_uint8(fmri, FM_VERSION, version) != 0 || nvlist_add_string(fmri, FM_FMRI_SCHEME, FM_FMRI_SCHEME_HC) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return (0); } if (auth != NULL && nvlist_add_nvlist(fmri, FM_FMRI_AUTHORITY, (nvlist_t *)auth) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return (0); } @@ -930,22 +929,22 @@ fm_fmri_hc_set(nvlist_t *fmri, int versi pairs[i] = fm_nvlist_create(nva); if (nvlist_add_string(pairs[i], FM_FMRI_HC_NAME, name) != 0 || nvlist_add_string(pairs[i], FM_FMRI_HC_ID, idstr) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } } va_end(ap); if (nvlist_add_nvlist_array(fmri, FM_FMRI_HC_LIST, pairs, npairs) != 0) - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); for (i = 0; i < npairs; i++) fm_nvlist_destroy(pairs[i], FM_NVA_RETAIN); if (snvl != NULL) { if (nvlist_add_nvlist(fmri, FM_FMRI_HC_SPECIFIC, snvl) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } } } @@ -970,7 +969,7 @@ fm_fmri_dev_set(nvlist_t *fmri_dev, int int err = 0; if (version != DEV_SCHEME_VERSION0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } @@ -991,7 +990,7 @@ fm_fmri_dev_set(nvlist_t *fmri_dev, int err |= nvlist_add_string(fmri_dev, FM_FMRI_DEV_TGTPTLUN0, tpl0); if (err) - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); } @@ -1016,35 +1015,35 @@ fm_fmri_cpu_set(nvlist_t *fmri_cpu, int uint64_t *failedp = &erpt_kstat_data.fmri_set_failed.value.ui64; if (version < CPU_SCHEME_VERSION1) { - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); return; } if (nvlist_add_uint8(fmri_cpu, FM_VERSION, version) != 0) { - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); return; } if (nvlist_add_string(fmri_cpu, FM_FMRI_SCHEME, FM_FMRI_SCHEME_CPU) != 0) { - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); return; } if (auth != NULL && nvlist_add_nvlist(fmri_cpu, FM_FMRI_AUTHORITY, (nvlist_t *)auth) != 0) - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); if (nvlist_add_uint32(fmri_cpu, FM_FMRI_CPU_ID, cpu_id) != 0) - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); if (cpu_maskp != NULL && nvlist_add_uint8(fmri_cpu, FM_FMRI_CPU_MASK, *cpu_maskp) != 0) - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); if (serial_idp == NULL || nvlist_add_string(fmri_cpu, FM_FMRI_CPU_SERIAL_ID, (char *)serial_idp) != 0) - atomic_add_64(failedp, 1); + atomic_inc_64(failedp); } /* @@ -1065,49 +1064,47 @@ fm_fmri_mem_set(nvlist_t *fmri, int vers const char *unum, const char *serial, uint64_t offset) { if (version != MEM_SCHEME_VERSION0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (!serial && (offset != (uint64_t)-1)) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_add_uint8(fmri, FM_VERSION, version) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_add_string(fmri, FM_FMRI_SCHEME, FM_FMRI_SCHEME_MEM) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (auth != NULL) { if (nvlist_add_nvlist(fmri, FM_FMRI_AUTHORITY, (nvlist_t *)auth) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } } if (nvlist_add_string(fmri, FM_FMRI_MEM_UNUM, unum) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); } if (serial != NULL) { if (nvlist_add_string_array(fmri, FM_FMRI_MEM_SERIAL_ID, (char **)&serial, 1) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } - if (offset != (uint64_t)-1) { - if (nvlist_add_uint64(fmri, FM_FMRI_MEM_OFFSET, - offset) != 0) { - atomic_add_64(&erpt_kstat_data. - fmri_set_failed.value.ui64, 1); - } + if (offset != (uint64_t)-1 && nvlist_add_uint64(fmri, + FM_FMRI_MEM_OFFSET, offset) != 0) { + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } } } @@ -1117,28 +1114,28 @@ fm_fmri_zfs_set(nvlist_t *fmri, int vers uint64_t vdev_guid) { if (version != ZFS_SCHEME_VERSION0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_add_uint8(fmri, FM_VERSION, version) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_add_string(fmri, FM_FMRI_SCHEME, FM_FMRI_SCHEME_ZFS) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_add_uint64(fmri, FM_FMRI_ZFS_POOL, pool_guid) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); } if (vdev_guid != 0) { if (nvlist_add_uint64(fmri, FM_FMRI_ZFS_VDEV, vdev_guid) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); } } } @@ -1322,20 +1319,20 @@ fm_fmri_hc_create(nvlist_t *fmri, int ve */ if (nvlist_lookup_nvlist_array(bboard, FM_FMRI_HC_LIST, &hcl, &n) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } for (i = 0; i < n; i++) { if (nvlist_lookup_string(hcl[i], FM_FMRI_HC_NAME, &hcname) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); return; } if (nvlist_lookup_string(hcl[i], FM_FMRI_HC_ID, &hcid) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); return; } @@ -1347,8 +1344,8 @@ fm_fmri_hc_create(nvlist_t *fmri, int ve fm_nvlist_destroy(pairs[j], FM_NVA_RETAIN); } - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); return; } } @@ -1372,8 +1369,8 @@ fm_fmri_hc_create(nvlist_t *fmri, int ve fm_nvlist_destroy(pairs[j], FM_NVA_RETAIN); } - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); return; } } @@ -1384,7 +1381,7 @@ fm_fmri_hc_create(nvlist_t *fmri, int ve */ if (nvlist_add_nvlist_array(fmri, FM_FMRI_HC_LIST, pairs, npairs + n) != 0) { - atomic_add_64(&erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64(&erpt_kstat_data.fmri_set_failed.value.ui64); return; } @@ -1394,8 +1391,8 @@ fm_fmri_hc_create(nvlist_t *fmri, int ve if (snvl != NULL) { if (nvlist_add_nvlist(fmri, FM_FMRI_HC_SPECIFIC, snvl) != 0) { - atomic_add_64( - &erpt_kstat_data.fmri_set_failed.value.ui64, 1); + atomic_inc_64( + &erpt_kstat_data.fmri_set_failed.value.ui64); return; } } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/sparc/dtrace/fasttrap_isa.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/sparc/dtrace/fasttrap_isa.c Wed Sep 3 08:18:07 2014 (r271000) +++ stable/10/sys/cddl/contrib/opensolaris/uts/sparc/dtrace/fasttrap_isa.c Wed Sep 3 08:18:09 2014 (r271001) @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include @@ -1410,7 +1408,7 @@ fasttrap_getreg(struct regs *rp, uint_t value = dtrace_getreg_win(reg, 1); dtrace_interrupt_enable(cookie); - atomic_add_64(&fasttrap_getreg_fast_cnt, 1); + atomic_inc_64(&fasttrap_getreg_fast_cnt); return (value); } @@ -1435,7 +1433,7 @@ fasttrap_getreg(struct regs *rp, uint_t if ((long)mpcb->mpcb_spbuf[i] != rp->r_sp) continue; - atomic_add_64(&fasttrap_getreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_getreg_mpcb_cnt); return (rwin[i].rw_local[reg - 16]); } while (i > 0); } @@ -1455,7 +1453,7 @@ fasttrap_getreg(struct regs *rp, uint_t if ((long)mpcb->mpcb_spbuf[i] != rp->r_sp) continue; - atomic_add_64(&fasttrap_getreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_getreg_mpcb_cnt); return (rwin[i].rw_local[reg - 16]); } while (i > 0); } @@ -1466,7 +1464,7 @@ fasttrap_getreg(struct regs *rp, uint_t v32[0] = 0; } - atomic_add_64(&fasttrap_getreg_slow_cnt, 1); + atomic_inc_64(&fasttrap_getreg_slow_cnt); return (value); err: @@ -1505,7 +1503,7 @@ fasttrap_putreg(struct regs *rp, uint_t if (dtrace_getotherwin() > 0) { dtrace_putreg_win(reg, value); dtrace_interrupt_enable(cookie); - atomic_add_64(&fasttrap_putreg_fast_cnt, 1); + atomic_inc_64(&fasttrap_putreg_fast_cnt); return; } dtrace_interrupt_enable(cookie); @@ -1536,7 +1534,7 @@ fasttrap_putreg(struct regs *rp, uint_t continue; rwin[i].rw_local[reg - 16] = value; - atomic_add_64(&fasttrap_putreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_putreg_mpcb_cnt); return; } while (i > 0); } @@ -1549,7 +1547,7 @@ fasttrap_putreg(struct regs *rp, uint_t rwin[mpcb->mpcb_wbcnt].rw_local[reg - 16] = value; mpcb->mpcb_spbuf[mpcb->mpcb_wbcnt] = (caddr_t)rp->r_sp; mpcb->mpcb_wbcnt++; - atomic_add_64(&fasttrap_putreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_putreg_mpcb_cnt); return; } } else { @@ -1567,7 +1565,7 @@ fasttrap_putreg(struct regs *rp, uint_t continue; rwin[i].rw_local[reg - 16] = v32; - atomic_add_64(&fasttrap_putreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_putreg_mpcb_cnt); return; } while (i > 0); } @@ -1580,12 +1578,12 @@ fasttrap_putreg(struct regs *rp, uint_t rwin[mpcb->mpcb_wbcnt].rw_local[reg - 16] = v32; mpcb->mpcb_spbuf[mpcb->mpcb_wbcnt] = (caddr_t)rp->r_sp; mpcb->mpcb_wbcnt++; - atomic_add_64(&fasttrap_putreg_mpcb_cnt, 1); + atomic_inc_64(&fasttrap_putreg_mpcb_cnt); return; } } - atomic_add_64(&fasttrap_putreg_slow_cnt, 1); + atomic_inc_64(&fasttrap_putreg_slow_cnt); return; err: From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 08:21:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9EF2752F; Wed, 3 Sep 2014 08:21:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F73C1F72; Wed, 3 Sep 2014 08:21:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s838LMjc086439; Wed, 3 Sep 2014 08:21:22 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s838LMdS086437; Wed, 3 Sep 2014 08:21:22 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409030821.s838LMdS086437@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 3 Sep 2014 08:21:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271002 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:21:22 -0000 Author: delphij Date: Wed Sep 3 08:21:21 2014 New Revision: 271002 URL: http://svnweb.freebsd.org/changeset/base/271002 Log: MFC r270248: MFV r270196: Illumos issue: 5047 don't use atomic_*_nv if you discard the return value Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Sep 3 08:18:09 2014 (r271001) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Wed Sep 3 08:21:21 2014 (r271002) @@ -1603,7 +1603,7 @@ dbuf_clear(dmu_buf_impl_t *db) dndb = dn->dn_dbuf; if (db->db_blkid != DMU_BONUS_BLKID && MUTEX_HELD(&dn->dn_dbufs_mtx)) { avl_remove(&dn->dn_dbufs, db); - (void) atomic_dec_32_nv(&dn->dn_dbufs_count); + atomic_dec_32(&dn->dn_dbufs_count); membar_producer(); DB_DNODE_EXIT(db); /* @@ -1779,7 +1779,7 @@ dbuf_create(dnode_t *dn, uint8_t level, ASSERT(dn->dn_object == DMU_META_DNODE_OBJECT || refcount_count(&dn->dn_holds) > 0); (void) refcount_add(&dn->dn_holds, db); - (void) atomic_inc_32_nv(&dn->dn_dbufs_count); + atomic_inc_32(&dn->dn_dbufs_count); dprintf_dbuf(db, "db=%p\n", db); @@ -1825,7 +1825,7 @@ dbuf_destroy(dmu_buf_impl_t *db) dn = DB_DNODE(db); mutex_enter(&dn->dn_dbufs_mtx); avl_remove(&dn->dn_dbufs, db); - (void) atomic_dec_32_nv(&dn->dn_dbufs_count); + atomic_dec_32(&dn->dn_dbufs_count); mutex_exit(&dn->dn_dbufs_mtx); DB_DNODE_EXIT(db); /* @@ -2109,7 +2109,7 @@ dbuf_rele_and_unlock(dmu_buf_impl_t *db, * until the move completes. */ DB_DNODE_ENTER(db); - (void) atomic_dec_32_nv(&DB_DNODE(db)->dn_dbufs_count); + atomic_dec_32(&DB_DNODE(db)->dn_dbufs_count); DB_DNODE_EXIT(db); /* * The bonus buffer's dnode hold is no longer discounted Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Wed Sep 3 08:18:09 2014 (r271001) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Wed Sep 3 08:21:21 2014 (r271002) @@ -288,7 +288,7 @@ dmu_bonus_hold(objset_t *os, uint64_t ob /* as long as the bonus buf is held, the dnode will be held */ if (refcount_add(&db->db_holds, tag) == 1) { VERIFY(dnode_add_ref(dn, db)); - (void) atomic_inc_32_nv(&dn->dn_dbufs_count); + atomic_inc_32(&dn->dn_dbufs_count); } /* From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 08:24:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F0AD7CB; Wed, 3 Sep 2014 08:24:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDBBC105B; Wed, 3 Sep 2014 08:24:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s838OBpC089128; Wed, 3 Sep 2014 08:24:11 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s838OBs9089127; Wed, 3 Sep 2014 08:24:11 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201409030824.s838OBs9089127@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 3 Sep 2014 08:24:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271003 - stable/10/sys/cddl/compat/opensolaris/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:24:12 -0000 Author: delphij Date: Wed Sep 3 08:24:11 2014 New Revision: 271003 URL: http://svnweb.freebsd.org/changeset/base/271003 Log: MFC r270260: Provide compatibility shim for atomic_dec_64_nv. Modified: stable/10/sys/cddl/compat/opensolaris/sys/atomic.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/compat/opensolaris/sys/atomic.h ============================================================================== --- stable/10/sys/cddl/compat/opensolaris/sys/atomic.h Wed Sep 3 08:21:21 2014 (r271002) +++ stable/10/sys/cddl/compat/opensolaris/sys/atomic.h Wed Sep 3 08:24:11 2014 (r271003) @@ -117,6 +117,12 @@ atomic_inc_64_nv(volatile uint64_t *targ return (atomic_add_64_nv(target, 1)); } +static __inline uint64_t +atomic_dec_64_nv(volatile uint64_t *target) +{ + return (atomic_add_64_nv(target, -1)); +} + #if !defined(COMPAT_32BIT) && defined(__LP64__) static __inline void * atomic_cas_ptr(volatile void *target, void *cmp, void *newval) From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 08:27:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67A94AA0; Wed, 3 Sep 2014 08:27:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38A9810A6; Wed, 3 Sep 2014 08:27:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s838R6ZG089652; Wed, 3 Sep 2014 08:27:06 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s838R6lH089651; Wed, 3 Sep 2014 08:27:06 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409030827.s838R6lH089651@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 3 Sep 2014 08:27:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271004 - stable/10/contrib/libarchive/tar X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:27:06 -0000 Author: ae Date: Wed Sep 3 08:27:05 2014 New Revision: 271004 URL: http://svnweb.freebsd.org/changeset/base/271004 Log: MFC r270661: Remove leading '/' from hardlink name when removing them from the regular file name. This fixes the problem, when bsdtar can not create hardlinks to extracted files. Modified: stable/10/contrib/libarchive/tar/util.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libarchive/tar/util.c ============================================================================== --- stable/10/contrib/libarchive/tar/util.c Wed Sep 3 08:24:11 2014 (r271003) +++ stable/10/contrib/libarchive/tar/util.c Wed Sep 3 08:27:05 2014 (r271004) @@ -372,6 +372,21 @@ strip_components(const char *p, int elem } } +static const char* +strip_leading_slashes(const char *p) +{ + + /* Remove leading "/../", "//", etc. */ + while (p[0] == '/' || p[0] == '\\') { + if (p[1] == '.' && p[2] == '.' && ( + p[3] == '/' || p[3] == '\\')) { + p += 3; /* Remove "/..", leave "/" for next pass. */ + } else + p += 1; /* Remove "/". */ + } + return (p); +} + /* * Handle --strip-components and any future path-rewriting options. * Returns non-zero if the pathname should not be extracted. @@ -474,16 +489,7 @@ edit_pathname(struct bsdtar *bsdtar, str p += 2; slashonly = 0; } - /* Remove leading "/../", "//", etc. */ - while (p[0] == '/' || p[0] == '\\') { - if (p[1] == '.' && p[2] == '.' && - (p[3] == '/' || p[3] == '\\')) { - p += 3; /* Remove "/..", leave "/" - * for next pass. */ - slashonly = 0; - } else - p += 1; /* Remove "/". */ - } + p = strip_leading_slashes(p); } while (rp != p); if (p != name && !bsdtar->warned_lead_slash) { @@ -504,6 +510,19 @@ edit_pathname(struct bsdtar *bsdtar, str name = "."; else name = p; + + p = archive_entry_hardlink(entry); + if (p != NULL) { + rp = strip_leading_slashes(p); + if (rp == '\0') + return (1); + if (rp != p) { + char *linkname = strdup(rp); + + archive_entry_copy_hardlink(entry, linkname); + free(linkname); + } + } } else { /* Strip redundant leading '/' characters. */ while (name[0] == '/' && name[1] == '/') From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 08:28:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 740F4BEA; Wed, 3 Sep 2014 08:28:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F95F10C2; Wed, 3 Sep 2014 08:28:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s838SHJj089840; Wed, 3 Sep 2014 08:28:17 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s838SHnb089839; Wed, 3 Sep 2014 08:28:17 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409030828.s838SHnb089839@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 3 Sep 2014 08:28:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271005 - head/sys/dev/bce X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:28:17 -0000 Author: glebius Date: Wed Sep 3 08:28:16 2014 New Revision: 271005 URL: http://svnweb.freebsd.org/changeset/base/271005 Log: Use CSUM_BITS instead of incorrect copy. Sponsored by: Nginx, Inc. Modified: head/sys/dev/bce/if_bce.c Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Wed Sep 3 08:27:05 2014 (r271004) +++ head/sys/dev/bce/if_bce.c Wed Sep 3 08:28:16 2014 (r271005) @@ -9837,11 +9837,7 @@ bce_dump_mbuf(struct bce_softc *sc, stru BCE_PRINTF("- m_pkthdr: len = %d, flags = 0x%b, " "csum_flags = %b\n", mp->m_pkthdr.len, mp->m_flags, M_FLAG_PRINTF, - mp->m_pkthdr.csum_flags, - "\20\1CSUM_IP\2CSUM_TCP\3CSUM_UDP" - "\5CSUM_FRAGMENT\6CSUM_TSO\11CSUM_IP_CHECKED" - "\12CSUM_IP_VALID\13CSUM_DATA_VALID" - "\14CSUM_PSEUDO_HDR"); + mp->m_pkthdr.csum_flags, CSUM_BITS); } if (mp->m_flags & M_EXT) { From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 08:30:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84BA9D58; Wed, 3 Sep 2014 08:30:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F7701106; Wed, 3 Sep 2014 08:30:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s838UJcJ090248; Wed, 3 Sep 2014 08:30:19 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s838UIxI090242; Wed, 3 Sep 2014 08:30:18 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409030830.s838UIxI090242@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 3 Sep 2014 08:30:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271006 - in head/sys: net netinet netpfil/pf sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:30:19 -0000 Author: glebius Date: Wed Sep 3 08:30:18 2014 New Revision: 271006 URL: http://svnweb.freebsd.org/changeset/base/271006 Log: Clean up unused CSUM_FRAGMENT. Sponsored by: Nginx, Inc. Modified: head/sys/net/if_vlan.c head/sys/netinet/ip_fastfwd.c head/sys/netinet/ip_output.c head/sys/netpfil/pf/pf.c head/sys/sys/mbuf.h Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Wed Sep 3 08:28:16 2014 (r271005) +++ head/sys/net/if_vlan.c Wed Sep 3 08:30:18 2014 (r271006) @@ -1501,7 +1501,7 @@ vlan_capabilities(struct ifvlan *ifv) p->if_capenable & IFCAP_VLAN_HWTAGGING) { ifp->if_capenable = p->if_capenable & IFCAP_HWCSUM; ifp->if_hwassist = p->if_hwassist & (CSUM_IP | CSUM_TCP | - CSUM_UDP | CSUM_SCTP | CSUM_FRAGMENT); + CSUM_UDP | CSUM_SCTP); } else { ifp->if_capenable = 0; ifp->if_hwassist = 0; Modified: head/sys/netinet/ip_fastfwd.c ============================================================================== --- head/sys/netinet/ip_fastfwd.c Wed Sep 3 08:28:16 2014 (r271005) +++ head/sys/netinet/ip_fastfwd.c Wed Sep 3 08:30:18 2014 (r271006) @@ -523,8 +523,7 @@ passout: else mtu = ifp->if_mtu; - if (ip_len <= mtu || - (ifp->if_hwassist & CSUM_FRAGMENT && (ip_off & IP_DF) == 0)) { + if (ip_len <= mtu) { /* * Avoid confusing lower layers. */ Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Wed Sep 3 08:28:16 2014 (r271005) +++ head/sys/netinet/ip_output.c Wed Sep 3 08:30:18 2014 (r271006) @@ -624,8 +624,7 @@ passout: * care of the fragmentation for us, we can just send directly. */ if (ip_len <= mtu || - (m->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0 || - ((ip_off & IP_DF) == 0 && (ifp->if_hwassist & CSUM_FRAGMENT))) { + (m->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0) { ip->ip_sum = 0; if (m->m_pkthdr.csum_flags & CSUM_IP & ~ifp->if_hwassist) { ip->ip_sum = in_cksum(m, hlen); Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Wed Sep 3 08:28:16 2014 (r271005) +++ head/sys/netpfil/pf/pf.c Wed Sep 3 08:30:18 2014 (r271006) @@ -5332,8 +5332,7 @@ pf_route(struct mbuf **m, struct pf_rule * care of the fragmentation for us, we can just send directly. */ if (ip_len <= ifp->if_mtu || - (m0->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0 || - ((ip_off & IP_DF) == 0 && (ifp->if_hwassist & CSUM_FRAGMENT))) { + (m0->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0) { ip->ip_sum = 0; if (m0->m_pkthdr.csum_flags & CSUM_IP & ~ifp->if_hwassist) { ip->ip_sum = in_cksum(m0, ip->ip_hl << 2); Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Wed Sep 3 08:28:16 2014 (r271005) +++ head/sys/sys/mbuf.h Wed Sep 3 08:30:18 2014 (r271006) @@ -445,7 +445,6 @@ void sf_ext_free(void *, void *); #define CSUM_UDP_IPV6 CSUM_IP6_UDP #define CSUM_TCP_IPV6 CSUM_IP6_TCP #define CSUM_SCTP_IPV6 CSUM_IP6_SCTP -#define CSUM_FRAGMENT 0x0 /* Unused */ /* * mbuf types describing the content of the mbuf (including external storage). From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 08:35:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 094FFFC6; Wed, 3 Sep 2014 08:35:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF30E1218; Wed, 3 Sep 2014 08:35:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s838Zg6i094415; Wed, 3 Sep 2014 08:35:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s838ZgcH094413; Wed, 3 Sep 2014 08:35:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409030835.s838ZgcH094413@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Sep 2014 08:35:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271007 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:35:43 -0000 Author: kib Date: Wed Sep 3 08:35:42 2014 New Revision: 271007 URL: http://svnweb.freebsd.org/changeset/base/271007 Log: Retire thread_unthread(), it has only one caller. Update comment in the block of code before the previous call to thread_unthread(). Discussed with: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_thread.c head/sys/sys/proc.h Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Wed Sep 3 08:30:18 2014 (r271006) +++ head/sys/kern/kern_thread.c Wed Sep 3 08:35:42 2014 (r271007) @@ -549,18 +549,6 @@ thread_link(struct thread *td, struct pr } /* - * Convert a process with one thread to an unthreaded process. - */ -void -thread_unthread(struct thread *td) -{ - struct proc *p = td->td_proc; - - KASSERT((p->p_numthreads == 1), ("Unthreading with >1 threads")); - p->p_flag &= ~P_HADTHREADS; -} - -/* * Called from: * thread_exit() */ @@ -712,14 +700,13 @@ stopme: } if (mode == SINGLE_EXIT) { /* - * We have gotten rid of all the other threads and we - * are about to either exit or exec. In either case, - * we try our utmost to revert to being a non-threaded - * process. + * Convert the process to an unthreaded process. The + * SINGLE_EXIT is called by exit1() or execve(), in + * both cases other threads must be retired. */ + KASSERT(p->p_numthreads == 1, ("Unthreading with >1 threads")); p->p_singlethread = NULL; - p->p_flag &= ~(P_STOPPED_SINGLE | P_SINGLE_EXIT); - thread_unthread(td); + p->p_flag &= ~(P_STOPPED_SINGLE | P_SINGLE_EXIT | P_HADTHREADS); /* * Wait for any remaining threads to exit cpu_throw(). Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Wed Sep 3 08:30:18 2014 (r271006) +++ head/sys/sys/proc.h Wed Sep 3 08:35:42 2014 (r271007) @@ -956,7 +956,6 @@ void thread_suspend_one(struct thread *t void thread_unlink(struct thread *td); void thread_unsuspend(struct proc *p); int thread_unsuspend_one(struct thread *td); -void thread_unthread(struct thread *td); void thread_wait(struct proc *p); struct thread *thread_find(struct proc *p, lwpid_t tid); From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 08:40:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB4351E5; Wed, 3 Sep 2014 08:40:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96F021251; Wed, 3 Sep 2014 08:40:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s838eGmR095079; Wed, 3 Sep 2014 08:40:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s838eGgD095078; Wed, 3 Sep 2014 08:40:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409030840.s838eGgD095078@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Sep 2014 08:40:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271008 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:40:16 -0000 Author: kib Date: Wed Sep 3 08:40:16 2014 New Revision: 271008 URL: http://svnweb.freebsd.org/changeset/base/271008 Log: Style. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_thread.c Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Wed Sep 3 08:35:42 2014 (r271007) +++ head/sys/kern/kern_thread.c Wed Sep 3 08:40:16 2014 (r271008) @@ -507,8 +507,8 @@ thread_wait(struct proc *p) struct thread *td; mtx_assert(&Giant, MA_NOTOWNED); - KASSERT((p->p_numthreads == 1), ("multiple threads in thread_wait()")); - KASSERT((p->p_exitthreads == 0), ("p_exitthreads leaking")); + KASSERT(p->p_numthreads == 1, ("multiple threads in thread_wait()")); + KASSERT(p->p_exitthreads == 0, ("p_exitthreads leaking")); td = FIRST_THREAD_IN_PROC(p); /* Lock the last thread so we spin until it exits cpu_throw(). */ thread_lock(td); From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 08:47:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6E3C6F6; Wed, 3 Sep 2014 08:47:13 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 866DE13D4; Wed, 3 Sep 2014 08:47:13 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s838l7UN035262 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Sep 2014 11:47:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s838l7UN035262 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s838l7sT035261; Wed, 3 Sep 2014 11:47:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 3 Sep 2014 11:47:07 +0300 From: Konstantin Belousov To: Gleb Smirnoff Subject: Re: svn commit: r270999 - head/sys/kern Message-ID: <20140903084707.GH2737@kib.kiev.ua> References: <201409030814.s838E7A2084257@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wfk8K8yAAOQoLncY" Content-Disposition: inline In-Reply-To: <201409030814.s838E7A2084257@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:47:14 -0000 --wfk8K8yAAOQoLncY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 03, 2014 at 08:14:07AM +0000, Gleb Smirnoff wrote: > Author: glebius > Date: Wed Sep 3 08:14:07 2014 > New Revision: 270999 > URL: http://svnweb.freebsd.org/changeset/base/270999 >=20 > Log: > Fix dereference after NULL check. > =20 > CID: 1234607 > Sponsored by: Nginx, Inc. >=20 > Modified: > head/sys/kern/kern_proc.c >=20 > Modified: head/sys/kern/kern_proc.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/kern_proc.c Wed Sep 3 08:13:46 2014 (r270998) > +++ head/sys/kern/kern_proc.c Wed Sep 3 08:14:07 2014 (r270999) > @@ -921,10 +921,11 @@ fill_kinfo_proc_only(struct proc *p, str > kp->ki_xstat =3D p->p_xstat; > kp->ki_acflag =3D p->p_acflag; > kp->ki_lock =3D p->p_lock; > - if (p->p_pptr) > + if (p->p_pptr) { > kp->ki_ppid =3D proc_realparent(p)->p_pid; > - if (p->p_flag & P_TRACED) > - kp->ki_tracer =3D p->p_pptr->p_pid; > + if (p->p_flag & P_TRACED) > + kp->ki_tracer =3D p->p_pptr->p_pid; > + } > } If P_TRACED is set, p_pptr must be non-NULL. Or in reverse, only kernel process (pid 0) may have p_pptr as NULL, and it cannot be traced. Previous code contained assertion (triggered by paging hardware) that p_pptr is not NULL if P_TRACED is set. It is Coverity which cannot deduce the invariant. I do not expect any analyzer to be able to make the implication, though. --wfk8K8yAAOQoLncY Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUBtWLAAoJEJDCuSvBvK1BEpQP/RYW3XUszfAXBpDM7cojLBUR EAqN90D5uDWvBmDzjqQof804RfgV9hCNshBol9mzIlUQxxRvQo+006LTQ73Mc0aK XTOeALw49fh4AV3BdG54cnUeVpDgpzz2iojU5C+bPf2kzYDaLJDgNd10FyIsyRGR 5d2soMOA+rAW5m9SVPNnwVsZdRX8/dXsX9gESIqF2bT71Kfl7aURxFdE6qDCYtr8 oHaT4Qf3HlzzIj+eaSPRgqs6Te11NsD8h3VluSQyX3SDcRGPfIc3oYJg+MDsfTZq pRxDAqym1n0aD5UUu32sk93XUEt9hl1BVa4YstcCq5+8PBuCmd3Pker5sSiEOQwd 4s6knIjCM8QOukXUX00sn+iCIFYlFSFTOlbXhXc112gYbDO1nLOBPoI3Y4US4yuC UJlSOd9eQvPYvZtzx6/NIXNnWUUFc9qeU2TLXkjmSerd5lNTWt57Ix56EcZH8kPW j/1avXWU+vIaysxKnhZRwWpztJ6g1k25qQufBJmQHmqF0CR84YsUQ7Piz3ImP5j6 9wkXX0PY89bohmVsqzNftOBF4HpxZrKpQVK5gd/l7ujZ2bhTWLzEqOo+vwLgmM7H wQwaR0A8NE3Je528Mmme1TpzN6ZPgQ1d9Ge0K7MW8q8rj5BOvmvEDMCv5caI4yKn aV5rPuq4zKLVDbSlhmwG =HzmX -----END PGP SIGNATURE----- --wfk8K8yAAOQoLncY-- From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 08:55:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EACCB8E2; Wed, 3 Sep 2014 08:55:34 +0000 (UTC) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 12094150D; Wed, 3 Sep 2014 08:55:33 +0000 (UTC) Received: by mail-wi0-f182.google.com with SMTP id z2so9333386wiv.15 for ; Wed, 03 Sep 2014 01:55:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=bsv/k5TUKUCqGAc5QdjUbDjEYPL2gVZUwiMZ2QFqHUk=; b=0eeLzetZguaiVyyyAFzBrpfxw/ilCLXfTPK5m+Sb6vbnFMVYIQcXNqgKJwPKoMKPwg 9W8mKqJd7+z2CFTg/uPPniRErVl4Alqh7e2nI9tVhZ4KszTEE/A+WNQ2NucRiO3ohuYc o3vDfsBqL6x8XqSjsvS/FoD10+HsvSCT6SUy9uIK0LmM0SnRFggApTTgoxaBQFsWtvuv Q0nTxSiUKtrW+0GeafPELDItojK4MSa9nIj7hanVE8+SfC+AgAFxQcpKbzmseCICLbaj oqsazc5wjFeo3Gp75O156zwwatcgBEY2B13QiUHrHfWqyCpyrQiPyoEH9y9ZHw5mRzYj LdQw== X-Received: by 10.194.81.37 with SMTP id w5mr46169485wjx.12.1409734532323; Wed, 03 Sep 2014 01:55:32 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id xm4sm3323353wib.9.2014.09.03.01.55.30 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 03 Sep 2014 01:55:31 -0700 (PDT) Date: Wed, 3 Sep 2014 10:55:23 +0200 From: Mateusz Guzik To: Gleb Smirnoff Subject: Re: svn commit: r270999 - head/sys/kern Message-ID: <20140903085523.GB13871@dft-labs.eu> References: <201409030814.s838E7A2084257@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201409030814.s838E7A2084257@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 08:55:35 -0000 On Wed, Sep 03, 2014 at 08:14:07AM +0000, Gleb Smirnoff wrote: > Author: glebius > Date: Wed Sep 3 08:14:07 2014 > New Revision: 270999 > URL: http://svnweb.freebsd.org/changeset/base/270999 > > Log: > Fix dereference after NULL check. > > CID: 1234607 > Sponsored by: Nginx, Inc. > > Modified: > head/sys/kern/kern_proc.c > > Modified: head/sys/kern/kern_proc.c > ============================================================================== > --- head/sys/kern/kern_proc.c Wed Sep 3 08:13:46 2014 (r270998) > +++ head/sys/kern/kern_proc.c Wed Sep 3 08:14:07 2014 (r270999) > @@ -921,10 +921,11 @@ fill_kinfo_proc_only(struct proc *p, str > kp->ki_xstat = p->p_xstat; > kp->ki_acflag = p->p_acflag; > kp->ki_lock = p->p_lock; > - if (p->p_pptr) > + if (p->p_pptr) { > kp->ki_ppid = proc_realparent(p)->p_pid; > - if (p->p_flag & P_TRACED) > - kp->ki_tracer = p->p_pptr->p_pid; > + if (p->p_flag & P_TRACED) > + kp->ki_tracer = p->p_pptr->p_pid; > + } > } > > /* > p_pptr must be non-NULL if P_TRACED is set. If there is no way to annotate it for coverity, this change deserves a comment in the code (and in retrospect previous code should have had appropriate comment as well). -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 09:04:50 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F331D54; Wed, 3 Sep 2014 09:04:50 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 5299E175F; Wed, 3 Sep 2014 09:04:48 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA10288; Wed, 03 Sep 2014 12:04:44 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XP6Ue-000GLY-Ae; Wed, 03 Sep 2014 12:04:44 +0300 Message-ID: <5406D972.8010305@FreeBSD.org> Date: Wed, 03 Sep 2014 12:03:46 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Steven Hartland Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm References: <201408281950.s7SJo90I047213@svn.freebsd.org> <39211177.i8nn9sHiCx@overcee.wemm.org> <201409021201.15967.jhb@freebsd.org> <5405F1F3.1@FreeBSD.org> <8AA1D02BB967468DA07731149E95390D@multiplay.co.uk> In-Reply-To: <8AA1D02BB967468DA07731149E95390D@multiplay.co.uk> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, John Baldwin , Peter Wemm , Alan Cox , svn-src-all@FreeBSD.org, Dmitry Morozovsky , "Matthew D. Fuller" , svn-src-head@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 09:04:50 -0000 on 02/09/2014 20:43 Steven Hartland said the following: > ----- Original Message ----- From: "Andriy Gapon" >> And the newly added kmem_foo() functions probably do not belong in >> cddl/compat/opensolaris as Solaris / illumos does not have those functions. > > They could be moved but their current location keeps all the kmem > related functions neatly in one place. Spreading them around IMO > would just make things hard to find. BTW, here is some of my old WIP that completely removed the pre-existing kmem_* functions and made the related code much closer to that in illumos. Unfortunately, I will now have hard time merging my changes with your change. https://github.com/avg-I/freebsd/compare/wip/hc/kmem_size-memguard-fix (esp.commits e0cf2f7 and becf087) >> I think that in this case e.g. vm_cnt.v_free_target can just be >> used directly by the FreeBSD-specific ARC code. > > It could but as above keeping everything in one place makes it to > find and hence MFC as this area has seen changes which will require > all those fields renamed. It also means if the logic for free pages > changes in the future there's only one place it needs to be changed. > > For those interested there's also an open review on additional > changes in this area: https://reviews.freebsd.org/D702 -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 09:05:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7924E90; Wed, 3 Sep 2014 09:05:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2E0A1764; Wed, 3 Sep 2014 09:05:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8395H0t008819; Wed, 3 Sep 2014 09:05:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8395H7r008817; Wed, 3 Sep 2014 09:05:17 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409030905.s8395H7r008817@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Sep 2014 09:05:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271010 - stable/10/sys/compat/freebsd32 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 09:05:18 -0000 Author: kib Date: Wed Sep 3 09:05:16 2014 New Revision: 271010 URL: http://svnweb.freebsd.org/changeset/base/271010 Log: MFC r270691: Fix handling of the third argument for fcntl(2). The native syscall uses long for arg, which needs translation. Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c stable/10/sys/compat/freebsd32/syscalls.master Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_misc.c Wed Sep 3 08:45:58 2014 (r271009) +++ stable/10/sys/compat/freebsd32/freebsd32_misc.c Wed Sep 3 09:05:16 2014 (r271010) @@ -3072,3 +3072,28 @@ freebsd32_procctl(struct thread *td, str return (kern_procctl(td, uap->idtype, PAIR32TO64(id_t, uap->id), uap->com, data)); } + +int +freebsd32_fcntl(struct thread *td, struct freebsd32_fcntl_args *uap) +{ + intptr_t tmp; + + switch (uap->cmd) { + /* + * Do unsigned conversion for arg when operation + * interprets it as flags or pointer. + */ + case F_SETLK_REMOTE: + case F_SETLKW: + case F_SETLK: + case F_GETLK: + case F_SETFD: + case F_SETFL: + tmp = (unsigned int)(uap->arg); + break; + default: + tmp = uap->arg; + break; + } + return (kern_fcntl(td, uap->fd, uap->cmd, tmp)); +} Modified: stable/10/sys/compat/freebsd32/syscalls.master ============================================================================== --- stable/10/sys/compat/freebsd32/syscalls.master Wed Sep 3 08:45:58 2014 (r271009) +++ stable/10/sys/compat/freebsd32/syscalls.master Wed Sep 3 09:05:16 2014 (r271010) @@ -200,7 +200,8 @@ 89 AUE_GETDTABLESIZE NOPROTO { int getdtablesize(void); } 90 AUE_DUP2 NOPROTO { int dup2(u_int from, u_int to); } 91 AUE_NULL UNIMPL getdopt -92 AUE_FCNTL NOPROTO { int fcntl(int fd, int cmd, long arg); } +92 AUE_FCNTL STD { int freebsd32_fcntl(int fd, int cmd, \ + int arg); } 93 AUE_SELECT STD { int freebsd32_select(int nd, fd_set *in, \ fd_set *ou, fd_set *ex, \ struct timeval32 *tv); } From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 09:05:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86EB1FD2; Wed, 3 Sep 2014 09:05:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66C09176F; Wed, 3 Sep 2014 09:05:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8395cxH008901; Wed, 3 Sep 2014 09:05:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8395bwM008896; Wed, 3 Sep 2014 09:05:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409030905.s8395bwM008896@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 3 Sep 2014 09:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271011 - stable/10/sys/compat/freebsd32 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 09:05:38 -0000 Author: kib Date: Wed Sep 3 09:05:37 2014 New Revision: 271011 URL: http://svnweb.freebsd.org/changeset/base/271011 Log: Regen. Modified: stable/10/sys/compat/freebsd32/freebsd32_proto.h stable/10/sys/compat/freebsd32/freebsd32_syscall.h stable/10/sys/compat/freebsd32/freebsd32_syscalls.c stable/10/sys/compat/freebsd32/freebsd32_sysent.c stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c Modified: stable/10/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_proto.h Wed Sep 3 09:05:16 2014 (r271010) +++ stable/10/sys/compat/freebsd32/freebsd32_proto.h Wed Sep 3 09:05:37 2014 (r271011) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255708 2013-09-19 18:53:42Z jhb + * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 271010 2014-09-03 09:05:16Z kib */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -92,6 +92,11 @@ struct freebsd32_getitimer_args { char which_l_[PADL_(u_int)]; u_int which; char which_r_[PADR_(u_int)]; char itv_l_[PADL_(struct itimerval32 *)]; struct itimerval32 * itv; char itv_r_[PADR_(struct itimerval32 *)]; }; +struct freebsd32_fcntl_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; + char arg_l_[PADL_(int)]; int arg; char arg_r_[PADR_(int)]; +}; struct freebsd32_select_args { char nd_l_[PADL_(int)]; int nd; char nd_r_[PADR_(int)]; char in_l_[PADL_(fd_set *)]; fd_set * in; char in_r_[PADR_(fd_set *)]; @@ -701,6 +706,7 @@ int freebsd32_execve(struct thread *, st int freebsd32_mprotect(struct thread *, struct freebsd32_mprotect_args *); int freebsd32_setitimer(struct thread *, struct freebsd32_setitimer_args *); int freebsd32_getitimer(struct thread *, struct freebsd32_getitimer_args *); +int freebsd32_fcntl(struct thread *, struct freebsd32_fcntl_args *); int freebsd32_select(struct thread *, struct freebsd32_select_args *); int freebsd32_gettimeofday(struct thread *, struct freebsd32_gettimeofday_args *); int freebsd32_getrusage(struct thread *, struct freebsd32_getrusage_args *); @@ -1106,6 +1112,7 @@ int freebsd7_freebsd32_shmctl(struct thr #define FREEBSD32_SYS_AUE_freebsd32_mprotect AUE_MPROTECT #define FREEBSD32_SYS_AUE_freebsd32_setitimer AUE_SETITIMER #define FREEBSD32_SYS_AUE_freebsd32_getitimer AUE_GETITIMER +#define FREEBSD32_SYS_AUE_freebsd32_fcntl AUE_FCNTL #define FREEBSD32_SYS_AUE_freebsd32_select AUE_SELECT #define FREEBSD32_SYS_AUE_ofreebsd32_sigreturn AUE_NULL #define FREEBSD32_SYS_AUE_ofreebsd32_sigvec AUE_O_SIGVEC Modified: stable/10/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_syscall.h Wed Sep 3 09:05:16 2014 (r271010) +++ stable/10/sys/compat/freebsd32/freebsd32_syscall.h Wed Sep 3 09:05:37 2014 (r271011) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255708 2013-09-19 18:53:42Z jhb + * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 271010 2014-09-03 09:05:16Z kib */ #define FREEBSD32_SYS_syscall 0 @@ -97,7 +97,7 @@ /* 88 is obsolete osethostname */ #define FREEBSD32_SYS_getdtablesize 89 #define FREEBSD32_SYS_dup2 90 -#define FREEBSD32_SYS_fcntl 92 +#define FREEBSD32_SYS_freebsd32_fcntl 92 #define FREEBSD32_SYS_freebsd32_select 93 #define FREEBSD32_SYS_fsync 95 #define FREEBSD32_SYS_setpriority 96 Modified: stable/10/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_syscalls.c Wed Sep 3 09:05:16 2014 (r271010) +++ stable/10/sys/compat/freebsd32/freebsd32_syscalls.c Wed Sep 3 09:05:37 2014 (r271011) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255708 2013-09-19 18:53:42Z jhb + * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 271010 2014-09-03 09:05:16Z kib */ const char *freebsd32_syscallnames[] = { @@ -102,7 +102,7 @@ const char *freebsd32_syscallnames[] = { "getdtablesize", /* 89 = getdtablesize */ "dup2", /* 90 = dup2 */ "#91", /* 91 = getdopt */ - "fcntl", /* 92 = fcntl */ + "freebsd32_fcntl", /* 92 = freebsd32_fcntl */ "freebsd32_select", /* 93 = freebsd32_select */ "#94", /* 94 = setdopt */ "fsync", /* 95 = fsync */ Modified: stable/10/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_sysent.c Wed Sep 3 09:05:16 2014 (r271010) +++ stable/10/sys/compat/freebsd32/freebsd32_sysent.c Wed Sep 3 09:05:37 2014 (r271011) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 255708 2013-09-19 18:53:42Z jhb + * created from FreeBSD: stable/10/sys/compat/freebsd32/syscalls.master 271010 2014-09-03 09:05:16Z kib */ #include "opt_compat.h" @@ -139,7 +139,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)sys_getdtablesize, AUE_GETDTABLESIZE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 89 = getdtablesize */ { AS(dup2_args), (sy_call_t *)sys_dup2, AUE_DUP2, NULL, 0, 0, 0, SY_THR_STATIC }, /* 90 = dup2 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 91 = getdopt */ - { AS(fcntl_args), (sy_call_t *)sys_fcntl, AUE_FCNTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 92 = fcntl */ + { AS(freebsd32_fcntl_args), (sy_call_t *)freebsd32_fcntl, AUE_FCNTL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 92 = freebsd32_fcntl */ { AS(freebsd32_select_args), (sy_call_t *)freebsd32_select, AUE_SELECT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 93 = freebsd32_select */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 94 = setdopt */ { AS(fsync_args), (sy_call_t *)sys_fsync, AUE_FSYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 95 = fsync */ Modified: stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c Wed Sep 3 09:05:16 2014 (r271010) +++ stable/10/sys/compat/freebsd32/freebsd32_systrace_args.c Wed Sep 3 09:05:37 2014 (r271011) @@ -557,12 +557,12 @@ systrace_args(int sysnum, void *params, *n_args = 2; break; } - /* fcntl */ + /* freebsd32_fcntl */ case 92: { - struct fcntl_args *p = params; + struct freebsd32_fcntl_args *p = params; iarg[0] = p->fd; /* int */ iarg[1] = p->cmd; /* int */ - iarg[2] = p->arg; /* long */ + iarg[2] = p->arg; /* int */ *n_args = 3; break; } @@ -4161,7 +4161,7 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; - /* fcntl */ + /* freebsd32_fcntl */ case 92: switch(ndx) { case 0: @@ -4171,7 +4171,7 @@ systrace_entry_setargdesc(int sysnum, in p = "int"; break; case 2: - p = "long"; + p = "int"; break; default: break; @@ -9208,7 +9208,7 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; - /* fcntl */ + /* freebsd32_fcntl */ case 92: if (ndx == 0 || ndx == 1) p = "int"; From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 09:12:43 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B10F2A1; Wed, 3 Sep 2014 09:12:43 +0000 (UTC) Received: from smtp1.multiplay.co.uk (smtp1.multiplay.co.uk [85.236.96.35]) by mx1.freebsd.org (Postfix) with ESMTP id B1DE71861; Wed, 3 Sep 2014 09:12:42 +0000 (UTC) Received: by smtp1.multiplay.co.uk (Postfix, from userid 65534) id 6B51C20E7088D; Wed, 3 Sep 2014 09:12:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.multiplay.co.uk X-Spam-Level: * X-Spam-Status: No, score=1.0 required=8.0 tests=AWL,BAYES_00,DOS_OE_TO_MX, FSL_HELO_NON_FQDN_1,RDNS_DYNAMIC,STOX_REPLY_TYPE autolearn=no version=3.3.1 Received: from r2d2 (82-69-141-170.dsl.in-addr.zen.co.uk [82.69.141.170]) by smtp1.multiplay.co.uk (Postfix) with ESMTP id C504F20E70886; Wed, 3 Sep 2014 09:12:37 +0000 (UTC) Message-ID: <7DF8E1BCE4E648888B9AA8BABB1A5991@multiplay.co.uk> From: "Steven Hartland" To: "Andriy Gapon" References: <201408281950.s7SJo90I047213@svn.freebsd.org> <39211177.i8nn9sHiCx@overcee.wemm.org> <201409021201.15967.jhb@freebsd.org> <5405F1F3.1@FreeBSD.org> <8AA1D02BB967468DA07731149E95390D@multiplay.co.uk> <5406D972.8010305@FreeBSD.org> Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm Date: Wed, 3 Sep 2014 10:12:39 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-15"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Cc: src-committers@FreeBSD.org, John Baldwin , Peter Wemm , Alan Cox , svn-src-all@FreeBSD.org, Dmitry Morozovsky , "Matthew D. Fuller" , svn-src-head@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 09:12:43 -0000 ----- Original Message ----- From: "Andriy Gapon" > on 02/09/2014 20:43 Steven Hartland said the following: >> ----- Original Message ----- From: "Andriy Gapon" >>> And the newly added kmem_foo() functions probably do not belong in >>> cddl/compat/opensolaris as Solaris / illumos does not have those functions. >> >> They could be moved but their current location keeps all the kmem >> related functions neatly in one place. Spreading them around IMO >> would just make things hard to find. > > BTW, here is some of my old WIP that completely removed the pre-existing kmem_* > functions and made the related code much closer to that in illumos. > Unfortunately, I will now have hard time merging my changes with your change. > > https://github.com/avg-I/freebsd/compare/wip/hc/kmem_size-memguard-fix > (esp.commits e0cf2f7 and becf087) Looking good, I'm all for eliminating the differences between the two code bases as that will make things easier to maintain in the future, so something we should definitely try to get in for 11. Regards Steve From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 09:35:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC18A884; Wed, 3 Sep 2014 09:35:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBF6D1A88; Wed, 3 Sep 2014 09:35:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s839ZcNV023060; Wed, 3 Sep 2014 09:35:38 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s839Zccf023058; Wed, 3 Sep 2014 09:35:38 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201409030935.s839Zccf023058@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Wed, 3 Sep 2014 09:35:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271012 - in head: include sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 09:35:39 -0000 Author: ed Date: Wed Sep 3 09:35:38 2014 New Revision: 271012 URL: http://svnweb.freebsd.org/changeset/base/271012 Log: Leave the C11 keywords alone when we have a recent version of GCC. As GCC also gained support for the C11 keywords over time, we can patch up to not define these anymore. This has the advantage that error messages for static assertions are printed natively and that _Alignas() will work with even a type outside of C11 mode. All C11 keywords are supported with GCC 4.7 and higher, with the exception of _Thread_local and _Generic. These are only supported as of GCC 4.9. Modified: head/include/tgmath.h head/sys/sys/cdefs.h Modified: head/include/tgmath.h ============================================================================== --- head/include/tgmath.h Wed Sep 3 09:05:37 2014 (r271011) +++ head/include/tgmath.h Wed Sep 3 09:35:38 2014 (r271012) @@ -61,7 +61,7 @@ */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ - __has_extension(c_generic_selections) + __has_extension(c_generic_selections) || __GNUC_PREREQ__(4, 9) #define __tg_generic(x, cfnl, cfn, cfnf, fnl, fn, fnf) \ _Generic(x, \ long double _Complex: cfnl, \ Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Wed Sep 3 09:05:37 2014 (r271011) +++ head/sys/sys/cdefs.h Wed Sep 3 09:35:38 2014 (r271012) @@ -254,7 +254,7 @@ #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L -#if !__has_extension(c_alignas) +#if !__has_extension(c_alignas) && !__GNUC_PREREQ__(4, 7) #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ __has_extension(cxx_alignas) #define _Alignas(x) alignas(x) @@ -264,11 +264,13 @@ #endif #endif +#if !__GNUC_PREREQ__(4, 7) #if defined(__cplusplus) && __cplusplus >= 201103L #define _Alignof(x) alignof(x) #else #define _Alignof(x) __alignof(x) #endif +#endif #if !__has_extension(c_atomic) && !__has_extension(cxx_atomic) /* @@ -278,13 +280,15 @@ #define _Atomic(T) struct { T volatile __val; } #endif +#if !__GNUC_PREREQ__(4, 7) #if defined(__cplusplus) && __cplusplus >= 201103L #define _Noreturn [[noreturn]] #else #define _Noreturn __dead2 #endif +#endif -#if !__has_extension(c_static_assert) +#if !__has_extension(c_static_assert) && !__GNUC_PREREQ__(4, 7) #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ __has_extension(cxx_static_assert) #define _Static_assert(x, y) static_assert(x, y) @@ -297,7 +301,7 @@ #endif #endif -#if !__has_extension(c_thread_local) +#if !__has_extension(c_thread_local) && !__GNUC_PREREQ__(4, 9) /* * XXX: Some compilers (Clang 3.3, GCC 4.7) falsely announce C++11 mode * without actually supporting the thread_local keyword. Don't check for @@ -322,7 +326,8 @@ * distinguish multiple cases. */ -#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L +#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ + __has_extension(c_generic_selections) || __GNUC_PREREQ__(4, 9) #define __generic(expr, t, yes, no) \ _Generic(expr, t: yes, default: no) #elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus) From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 09:49:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EF06F23; Wed, 3 Sep 2014 09:49:27 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C2E61BC5; Wed, 3 Sep 2014 09:49:25 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s839nHxU003325 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 3 Sep 2014 13:49:17 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s839nGkV003324; Wed, 3 Sep 2014 13:49:16 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 3 Sep 2014 13:49:16 +0400 From: Gleb Smirnoff To: Mateusz Guzik , kib@FreeBSD.org Subject: Re: svn commit: r270999 - head/sys/kern Message-ID: <20140903094916.GO7693@FreeBSD.org> References: <201409030814.s838E7A2084257@svn.freebsd.org> <20140903085523.GB13871@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140903085523.GB13871@dft-labs.eu> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 09:49:27 -0000 Mateusz, Kostik, On Wed, Sep 03, 2014 at 10:55:23AM +0200, Mateusz Guzik wrote: M> > Modified: head/sys/kern/kern_proc.c M> > ============================================================================== M> > --- head/sys/kern/kern_proc.c Wed Sep 3 08:13:46 2014 (r270998) M> > +++ head/sys/kern/kern_proc.c Wed Sep 3 08:14:07 2014 (r270999) M> > @@ -921,10 +921,11 @@ fill_kinfo_proc_only(struct proc *p, str M> > kp->ki_xstat = p->p_xstat; M> > kp->ki_acflag = p->p_acflag; M> > kp->ki_lock = p->p_lock; M> > - if (p->p_pptr) M> > + if (p->p_pptr) { M> > kp->ki_ppid = proc_realparent(p)->p_pid; M> > - if (p->p_flag & P_TRACED) M> > - kp->ki_tracer = p->p_pptr->p_pid; M> > + if (p->p_flag & P_TRACED) M> > + kp->ki_tracer = p->p_pptr->p_pid; M> > + } M> > } M> > M> > /* M> > M> M> p_pptr must be non-NULL if P_TRACED is set. If there is no way to M> annotate it for coverity, this change deserves a comment in the code M> (and in retrospect previous code should have had appropriate comment as M> well). Thanks for explanation. I'd suggest to leave the change in, since now it is a micro-micro-optimization :) -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 09:58:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE4D52E9; Wed, 3 Sep 2014 09:58:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9EB31CD3; Wed, 3 Sep 2014 09:58:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s839wxpU032980; Wed, 3 Sep 2014 09:58:59 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s839wxNG032979; Wed, 3 Sep 2014 09:58:59 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409030958.s839wxNG032979@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 3 Sep 2014 09:58:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271013 - head/sys/dev/drm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 09:58:59 -0000 Author: glebius Date: Wed Sep 3 09:58:59 2014 New Revision: 271013 URL: http://svnweb.freebsd.org/changeset/base/271013 Log: Remove always false comparison. Sponsored by: Nginx, Inc. Modified: head/sys/dev/drm/drm_sysctl.c Modified: head/sys/dev/drm/drm_sysctl.c ============================================================================== --- head/sys/dev/drm/drm_sysctl.c Wed Sep 3 09:35:38 2014 (r271012) +++ head/sys/dev/drm/drm_sysctl.c Wed Sep 3 09:58:59 2014 (r271013) @@ -193,7 +193,7 @@ static int drm_vm_info DRM_SYSCTL_HANDLE for (i = 0; i < mapcount; i++) { map = &tempmaps[i]; - if (map->type < 0 || map->type > 4) + if (map->type > 4) type = "??"; else type = types[map->type]; From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 11:07:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5847045B; Wed, 3 Sep 2014 11:07:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 433CB153E; Wed, 3 Sep 2014 11:07:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83B7oow065406; Wed, 3 Sep 2014 11:07:50 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83B7of1065405; Wed, 3 Sep 2014 11:07:50 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201409031107.s83B7of1065405@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Wed, 3 Sep 2014 11:07:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271014 - head/sbin/ifconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 11:07:50 -0000 Author: melifaro Date: Wed Sep 3 11:07:49 2014 New Revision: 271014 URL: http://svnweb.freebsd.org/changeset/base/271014 Log: * Unconditionally turn on SIOCGI2C probing for all interfaces on "ifconfig -v". I've seen no measurable timing difference for doing additional SIOCGI2C call for system with 4k vlans. * Determine appropriate handler (SFP/QSFP) by reading identification byte (which is the same for both SFF-8472 and SFF-8436) instead of checking driver name. MFC with: r270064 Sponsored by: Yandex LLC Modified: head/sbin/ifconfig/sfp.c Modified: head/sbin/ifconfig/sfp.c ============================================================================== --- head/sbin/ifconfig/sfp.c Wed Sep 3 09:58:59 2014 (r271013) +++ head/sbin/ifconfig/sfp.c Wed Sep 3 11:07:49 2014 (r271014) @@ -753,25 +753,31 @@ void sfp_status(int s, struct ifreq *ifr, int verbose) { struct i2c_info ii; + uint8_t id_byte; memset(&ii, 0, sizeof(ii)); /* Prepare necessary into to pass to NIC handler */ ii.s = s; ii.ifr = ifr; + ii.f = read_i2c_generic; /* - * Check if we have i2c support for particular driver. - * TODO: Determine driver by original name. + * Try to read byte 0 from i2c: + * Both SFF-8472 and SFF-8436 use it as + * 'identification byte' */ - if (strncmp(ifr->ifr_name, "ix", 2) == 0) { - ii.f = read_i2c_generic; - print_sfp_status(&ii, verbose); - } else if (strncmp(ifr->ifr_name, "cxl", 3) == 0) { - ii.port_id = atoi(&ifr->ifr_name[3]); - ii.f = read_i2c_generic; - ii.cfd = -1; - print_qsfp_status(&ii, verbose); - } else + id_byte = 0; + ii.f(&ii, SFF_8472_BASE, SFF_8472_ID, 1, (caddr_t)&id_byte); + if (ii.error != 0) return; + + switch (id_byte) { + case SFF_8024_ID_QSFP: + case SFF_8024_ID_QSFPPLUS: + print_qsfp_status(&ii, verbose); + break; + default: + print_sfp_status(&ii, verbose); + }; } From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 11:17:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7FE46945; Wed, 3 Sep 2014 11:17:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 506C717D0; Wed, 3 Sep 2014 11:17:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83BHCu0070082; Wed, 3 Sep 2014 11:17:12 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83BHCoh070081; Wed, 3 Sep 2014 11:17:12 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409031117.s83BHCoh070081@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 3 Sep 2014 11:17:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r271015 - stable/9/contrib/libarchive/tar X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 11:17:12 -0000 Author: ae Date: Wed Sep 3 11:17:11 2014 New Revision: 271015 URL: http://svnweb.freebsd.org/changeset/base/271015 Log: MFC r270661: Remove leading '/' from hardlink name when removing them from the regular file name. This fixes the problem, when bsdtar can not create hardlinks to extracted files. Modified: stable/9/contrib/libarchive/tar/util.c Directory Properties: stable/9/contrib/libarchive/tar/ (props changed) Modified: stable/9/contrib/libarchive/tar/util.c ============================================================================== --- stable/9/contrib/libarchive/tar/util.c Wed Sep 3 11:07:49 2014 (r271014) +++ stable/9/contrib/libarchive/tar/util.c Wed Sep 3 11:17:11 2014 (r271015) @@ -349,6 +349,21 @@ strip_components(const char *p, int elem } } +static const char* +strip_leading_slashes(const char *p) +{ + + /* Remove leading "/../", "//", etc. */ + while (p[0] == '/' || p[0] == '\\') { + if (p[1] == '.' && p[2] == '.' && ( + p[3] == '/' || p[3] == '\\')) { + p += 3; /* Remove "/..", leave "/" for next pass. */ + } else + p += 1; /* Remove "/". */ + } + return (p); +} + /* * Handle --strip-components and any future path-rewriting options. * Returns non-zero if the pathname should not be extracted. @@ -453,16 +468,7 @@ edit_pathname(struct bsdtar *bsdtar, str p += 2; slashonly = 0; } - /* Remove leading "/../", "//", etc. */ - while (p[0] == '/' || p[0] == '\\') { - if (p[1] == '.' && p[2] == '.' && - (p[3] == '/' || p[3] == '\\')) { - p += 3; /* Remove "/..", leave "/" - * for next pass. */ - slashonly = 0; - } else - p += 1; /* Remove "/". */ - } + p = strip_leading_slashes(p); } while (rp != p); if (p != name && !bsdtar->warned_lead_slash) { @@ -483,6 +489,19 @@ edit_pathname(struct bsdtar *bsdtar, str name = "."; else name = p; + + p = archive_entry_hardlink(entry); + if (p != NULL) { + rp = strip_leading_slashes(p); + if (rp == '\0') + return (1); + if (rp != p) { + char *linkname = strdup(rp); + + archive_entry_copy_hardlink(entry, linkname); + free(linkname); + } + } } else { /* Strip redundant leading '/' characters. */ while (name[0] == '/' && name[1] == '/') From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 11:17:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF969A72; Wed, 3 Sep 2014 11:17:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 904F717D3; Wed, 3 Sep 2014 11:17:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83BHRnw070151; Wed, 3 Sep 2014 11:17:27 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83BHRoq070150; Wed, 3 Sep 2014 11:17:27 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201409031117.s83BHRoq070150@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 3 Sep 2014 11:17:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r271016 - stable/8/contrib/libarchive/tar X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 11:17:27 -0000 Author: ae Date: Wed Sep 3 11:17:27 2014 New Revision: 271016 URL: http://svnweb.freebsd.org/changeset/base/271016 Log: MFC r270661: Remove leading '/' from hardlink name when removing them from the regular file name. This fixes the problem, when bsdtar can not create hardlinks to extracted files. Modified: stable/8/contrib/libarchive/tar/util.c Directory Properties: stable/8/contrib/libarchive/tar/ (props changed) Modified: stable/8/contrib/libarchive/tar/util.c ============================================================================== --- stable/8/contrib/libarchive/tar/util.c Wed Sep 3 11:17:11 2014 (r271015) +++ stable/8/contrib/libarchive/tar/util.c Wed Sep 3 11:17:27 2014 (r271016) @@ -349,6 +349,21 @@ strip_components(const char *p, int elem } } +static const char* +strip_leading_slashes(const char *p) +{ + + /* Remove leading "/../", "//", etc. */ + while (p[0] == '/' || p[0] == '\\') { + if (p[1] == '.' && p[2] == '.' && ( + p[3] == '/' || p[3] == '\\')) { + p += 3; /* Remove "/..", leave "/" for next pass. */ + } else + p += 1; /* Remove "/". */ + } + return (p); +} + /* * Handle --strip-components and any future path-rewriting options. * Returns non-zero if the pathname should not be extracted. @@ -453,16 +468,7 @@ edit_pathname(struct bsdtar *bsdtar, str p += 2; slashonly = 0; } - /* Remove leading "/../", "//", etc. */ - while (p[0] == '/' || p[0] == '\\') { - if (p[1] == '.' && p[2] == '.' && - (p[3] == '/' || p[3] == '\\')) { - p += 3; /* Remove "/..", leave "/" - * for next pass. */ - slashonly = 0; - } else - p += 1; /* Remove "/". */ - } + p = strip_leading_slashes(p); } while (rp != p); if (p != name && !bsdtar->warned_lead_slash) { @@ -483,6 +489,19 @@ edit_pathname(struct bsdtar *bsdtar, str name = "."; else name = p; + + p = archive_entry_hardlink(entry); + if (p != NULL) { + rp = strip_leading_slashes(p); + if (rp == '\0') + return (1); + if (rp != p) { + char *linkname = strdup(rp); + + archive_entry_copy_hardlink(entry, linkname); + free(linkname); + } + } } else { /* Strip redundant leading '/' characters. */ while (name[0] == '/' && name[1] == '/') From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 11:46:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B49F8F82; Wed, 3 Sep 2014 11:46:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FBD61AFB; Wed, 3 Sep 2014 11:46:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83Bkim6084091; Wed, 3 Sep 2014 11:46:44 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83BkiYn084089; Wed, 3 Sep 2014 11:46:44 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409031146.s83BkiYn084089@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Sep 2014 11:46:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271017 - in head/sys/dev/usb: . quirk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 11:46:44 -0000 Author: hselasky Date: Wed Sep 3 11:46:43 2014 New Revision: 271017 URL: http://svnweb.freebsd.org/changeset/base/271017 Log: Add new quirk. PR: 193279 MFC after: 1 week Modified: head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Wed Sep 3 11:17:27 2014 (r271016) +++ head/sys/dev/usb/quirk/usb_quirk.c Wed Sep 3 11:46:43 2014 (r271017) @@ -130,6 +130,8 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(MICROSOFT, WLINTELLIMOUSE, 0x0000, 0xffff, UQ_MS_LEADING_BYTE), /* Quirk for Corsair Vengeance K60 keyboard */ USB_QUIRK(CORSAIR, K60, 0x0000, 0xffff, UQ_KBD_BOOTPROTO), + /* Quirk for Corsair Vengeance K60 keyboard */ + USB_QUIRK(CORSAIR, K70, 0x0000, 0xffff, UQ_KBD_BOOTPROTO), /* umodem(4) device quirks */ USB_QUIRK(METRICOM, RICOCHET_GS, 0x100, 0x100, UQ_ASSUME_CM_OVER_DATA), USB_QUIRK(SANYO, SCP4900, 0x000, 0x000, UQ_ASSUME_CM_OVER_DATA), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Sep 3 11:17:27 2014 (r271016) +++ head/sys/dev/usb/usbdevs Wed Sep 3 11:46:43 2014 (r271017) @@ -1486,6 +1486,7 @@ product COREGA FETHER_USB_TXC 0x9601 FEt /* Corsair products */ product CORSAIR K60 0x0a60 Corsair Vengeance K60 keyboard +product CORSAIR K70 0x1b09 Corsair Vengeance K70 keyboard /* Creative products */ product CREATIVE NOMAD_II 0x1002 Nomad II MP3 player From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 12:07:01 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7AB77771; Wed, 3 Sep 2014 12:07:01 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 297951D32; Wed, 3 Sep 2014 12:06:59 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA12757; Wed, 03 Sep 2014 15:06:50 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XP9Ks-000GW7-AO; Wed, 03 Sep 2014 15:06:50 +0300 Message-ID: <54070421.9030200@FreeBSD.org> Date: Wed, 03 Sep 2014 15:05:53 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Steven Hartland , Alan Cox , John Baldwin , Peter Wemm Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm References: <201408281950.s7SJo90I047213@svn.freebsd.org> <39211177.i8nn9sHiCx@overcee.wemm.org> <201409021201.15967.jhb@freebsd.org> <5405FD2C.8000901@rice.edu> <54060D1B.6020700@rice.edu> <774F8EEE96EB483DA8ACF533CF7C23F3@multiplay.co.uk> <54062268.9060603@rice.edu> <169C94ED141B435BACEADB04A4824717@multiplay.co.uk> In-Reply-To: <169C94ED141B435BACEADB04A4824717@multiplay.co.uk> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Dmitry Morozovsky , "Matthew D. Fuller" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 12:07:01 -0000 on 03/09/2014 11:09 Steven Hartland said the following: > I'm looking to MFC this change so wanted to check if > anyone had an final feedback / objections? I think that your changes went in a bit prematurely (little review), so perhaps MFC would be premature as well. > I know we currently have Alan's feedback on changing > the #ifdef __i386__ to #ifndef UMA_MD_SMALL_ALLOC > which sounds sensible but waiting Peter to comment on. > > Regards > Steve > -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 12:17:44 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A2ACB32; Wed, 3 Sep 2014 12:17:44 +0000 (UTC) Received: from smtp1.multiplay.co.uk (smtp1.multiplay.co.uk [85.236.96.35]) by mx1.freebsd.org (Postfix) with ESMTP id 363281E2D; Wed, 3 Sep 2014 12:17:44 +0000 (UTC) Received: by smtp1.multiplay.co.uk (Postfix, from userid 65534) id 1D26220E7088F; Wed, 3 Sep 2014 12:17:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.multiplay.co.uk X-Spam-Level: * X-Spam-Status: No, score=1.0 required=8.0 tests=AWL,BAYES_00,DOS_OE_TO_MX, FSL_HELO_NON_FQDN_1,RDNS_DYNAMIC,STOX_REPLY_TYPE autolearn=no version=3.3.1 Received: from r2d2 (82-69-141-170.dsl.in-addr.zen.co.uk [82.69.141.170]) by smtp1.multiplay.co.uk (Postfix) with ESMTP id BB3DD20E70886; Wed, 3 Sep 2014 12:17:40 +0000 (UTC) Message-ID: <7FA917F9BB6F45FA84D8408C13359748@multiplay.co.uk> From: "Steven Hartland" To: "Andriy Gapon" , "Alan Cox" , "John Baldwin" , "Peter Wemm" References: <201408281950.s7SJo90I047213@svn.freebsd.org> <39211177.i8nn9sHiCx@overcee.wemm.org> <201409021201.15967.jhb@freebsd.org> <5405FD2C.8000901@rice.edu> <54060D1B.6020700@rice.edu> <774F8EEE96EB483DA8ACF533CF7C23F3@multiplay.co.uk> <54062268.9060603@rice.edu> <169C94ED141B435BACEADB04A4824717@multiplay.co.uk> <54070421.9030200@FreeBSD.org> Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm Date: Wed, 3 Sep 2014 13:17:42 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-15"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Dmitry Morozovsky , "Matthew D. Fuller" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 12:17:44 -0000 ----- Original Message ----- From: "Andriy Gapon" > on 03/09/2014 11:09 Steven Hartland said the following: >> I'm looking to MFC this change so wanted to check if >> anyone had an final feedback / objections? > > I think that your changes went in a bit prematurely (little review), so perhaps > MFC would be premature as well. Its a change which really needs to make it into 10.1 IMO due to its impact on users so I don't really want to hold off too long. If anyone has any substantiated reason to then off course I'll hold off. Regards Steve From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 12:20:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1A4CCC6; Wed, 3 Sep 2014 12:20:28 +0000 (UTC) Received: from mail-we0-x233.google.com (mail-we0-x233.google.com [IPv6:2a00:1450:400c:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EEB4B1E62; Wed, 3 Sep 2014 12:20:27 +0000 (UTC) Received: by mail-we0-f179.google.com with SMTP id t60so8426730wes.38 for ; Wed, 03 Sep 2014 05:20:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=wpe7n3WYQFet+yr8O8wfVEuIUHJQBo8aLkDVZWZBwoE=; b=ID9NZNm5ok0sGiHT+qNHaXNzYj5+gSEyK/0ixARYy9z1v73QP6B5xE7hrdoiojcrEm AOT7NP99YJGbUj+VPxxoPQUlO58tUE+PY2dWKWKgSUYBC1hHDsdSC8UqQKbbNo3VR/Wn L/cVdB/E1w4kcGGcAKIT8L90pdWJuZfmwUm+OxsN0NsWNtxPYbfllkvFywIJy1xfTzo3 Q8vx0lnQGkQr0IbdyvLjBNJzh2q0xkrKq4AMkKobEI7FXCpDdAzLpBG95uXeOegKt0tO jQZ7Mq8dYCbtjImBopwaWRwJknaDpODD4+miQ8B1ojXPm4Hh7/2+hiGTQGE/3sF5d5C5 GBLw== X-Received: by 10.180.207.6 with SMTP id ls6mr25009371wic.48.1409746824637; Wed, 03 Sep 2014 05:20:24 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id mx19sm4480878wic.3.2014.09.03.05.20.23 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 03 Sep 2014 05:20:23 -0700 (PDT) Date: Wed, 3 Sep 2014 14:20:18 +0200 From: Mateusz Guzik To: Konstantin Belousov Subject: Re: svn commit: r270993 - head/sys/kern Message-ID: <20140903122018.GC13871@dft-labs.eu> References: <201409030625.s836PZHY032159@svn.freebsd.org> <20140903071629.GG2737@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20140903071629.GG2737@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Mateusz Guzik X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 12:20:28 -0000 On Wed, Sep 03, 2014 at 10:16:29AM +0300, Konstantin Belousov wrote: > On Wed, Sep 03, 2014 at 06:25:35AM +0000, Mateusz Guzik wrote: > > Author: mjg > > Date: Wed Sep 3 06:25:34 2014 > > New Revision: 270993 > > URL: http://svnweb.freebsd.org/changeset/base/270993 > > > > Log: > > Fix up proc_realparent to always return correct process. > > > > Prior to the change it would always return initproc for non-traced processes. > > > > This fixes ps apparently always returning 1 as ppid. > > > > Pointy hat: mjg > No, this is my bug. Thank you for fixing it. It is a consequence of > the last minute 'safety' change I did. > I used it without veryfing it returns correct results. I'm happy to share the blame. :> > > Reported by: many > > MFC after: 1 week > I suggest to merge in 3 days. > Ok. > > > > Modified: > > head/sys/kern/kern_exit.c > > > > Modified: head/sys/kern/kern_exit.c > > ============================================================================== > > --- head/sys/kern/kern_exit.c Wed Sep 3 05:14:50 2014 (r270992) > > +++ head/sys/kern/kern_exit.c Wed Sep 3 06:25:34 2014 (r270993) > > @@ -104,8 +104,12 @@ proc_realparent(struct proc *child) > > > > sx_assert(&proctree_lock, SX_LOCKED); > > if ((child->p_treeflag & P_TREE_ORPHANED) == 0) { > > - return (child->p_pptr->p_pid == child->p_oppid ? > > - child->p_pptr : initproc); > > + if (child->p_oppid == 0 || > > + child->p_pptr->p_pid == child->p_oppid) > > + parent = child->p_pptr; > > + else > > + parent = initproc; > > + return (parent); > > } > > for (p = child; (p->p_treeflag & P_TREE_FIRST_ORPHAN) == 0;) { > > /* Cannot use LIST_PREV(), since the list head is not known. */ -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 13:15:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFCC5CD4; Wed, 3 Sep 2014 13:15:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB29F15CD; Wed, 3 Sep 2014 13:15:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83DFG9i026268; Wed, 3 Sep 2014 13:15:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83DFG02026267; Wed, 3 Sep 2014 13:15:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409031315.s83DFG02026267@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 3 Sep 2014 13:15:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271018 - head/sys/dev/usb/quirk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 13:15:16 -0000 Author: hselasky Date: Wed Sep 3 13:15:16 2014 New Revision: 271018 URL: http://svnweb.freebsd.org/changeset/base/271018 Log: Fix spelling. PR: 193279 MFC after: 1 week Modified: head/sys/dev/usb/quirk/usb_quirk.c Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Wed Sep 3 11:46:43 2014 (r271017) +++ head/sys/dev/usb/quirk/usb_quirk.c Wed Sep 3 13:15:16 2014 (r271018) @@ -130,7 +130,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(MICROSOFT, WLINTELLIMOUSE, 0x0000, 0xffff, UQ_MS_LEADING_BYTE), /* Quirk for Corsair Vengeance K60 keyboard */ USB_QUIRK(CORSAIR, K60, 0x0000, 0xffff, UQ_KBD_BOOTPROTO), - /* Quirk for Corsair Vengeance K60 keyboard */ + /* Quirk for Corsair Vengeance K70 keyboard */ USB_QUIRK(CORSAIR, K70, 0x0000, 0xffff, UQ_KBD_BOOTPROTO), /* umodem(4) device quirks */ USB_QUIRK(METRICOM, RICOCHET_GS, 0x100, 0x100, UQ_ASSUME_CM_OVER_DATA), From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 13:17:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDE2B13E; Wed, 3 Sep 2014 13:17:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B87871736; Wed, 3 Sep 2014 13:17:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83DHibV026829; Wed, 3 Sep 2014 13:17:44 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83DHib9026828; Wed, 3 Sep 2014 13:17:44 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409031317.s83DHib9026828@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Sep 2014 13:17:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271019 - stable/10/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 13:17:45 -0000 Author: emaste Date: Wed Sep 3 13:17:44 2014 New Revision: 271019 URL: http://svnweb.freebsd.org/changeset/base/271019 Log: MFC vt(4) work from ray@: r269188: [Rework vb_buffer and vb_rows assignment] r269192: Remove special handling of console window size. It's done in vt_upgrade() for all windows. r269193: Update comments. r269194: Revise font initialization handling. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/vt_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Wed Sep 3 13:15:16 2014 (r271018) +++ stable/10/sys/dev/vt/vt_core.c Wed Sep 3 13:17:44 2014 (r271019) @@ -166,8 +166,8 @@ static struct vt_window vt_conswindow = .vw_number = VT_CONSWINDOW, .vw_flags = VWF_CONSOLE, .vw_buf = { - .vb_buffer = vt_constextbuf, - .vb_rows = vt_constextbufrows, + .vb_buffer = &vt_constextbuf[0], + .vb_rows = &vt_constextbufrows[0], .vb_history_size = VBF_DEFAULT_HISTORY_SIZE, .vb_curroffset = 0, .vb_roffset = 0, @@ -996,7 +996,7 @@ vtterm_cnprobe(struct terminal *tm, stru sprintf(cp->cn_name, "ttyv%r", VT_UNIT(vw)); /* Attach default font if not in TEXTMODE. */ - if (!(vd->vd_flags & VDF_TEXTMODE)) + if ((vd->vd_flags & VDF_TEXTMODE) == 0) vw->vw_font = vtfont_ref(&vt_font_default); vtbuf_init_early(&vw->vw_buf); @@ -1147,7 +1147,7 @@ vt_change_font(struct vt_window *vw, str VT_UNLOCK(vd); return (EBUSY); } - if (vw->vw_font == NULL) { + if (vd->vd_flags & VDF_TEXTMODE) { /* Our device doesn't need fonts. */ VT_UNLOCK(vd); return (ENOTTY); @@ -1169,8 +1169,14 @@ vt_change_font(struct vt_window *vw, str /* Actually apply the font to the current window. */ VT_LOCK(vd); - vtfont_unref(vw->vw_font); - vw->vw_font = vtfont_ref(vf); + if (vw->vw_font != vf) { + /* + * In case vt_change_font called to update size we don't need + * to update font link. + */ + vtfont_unref(vw->vw_font); + vw->vw_font = vtfont_ref(vf); + } /* Force a full redraw the next timer tick. */ if (vd->vd_curwindow == vw) @@ -1978,7 +1984,7 @@ vt_allocate_window(struct vt_device *vd, vw->vw_number = window; vw->vw_kbdmode = K_XLATE; - if (!(vd->vd_flags & VDF_TEXTMODE)) + if ((vd->vd_flags & VDF_TEXTMODE) == 0) vw->vw_font = vtfont_ref(&vt_font_default); vt_termsize(vd, vw->vw_font, &size); @@ -2056,7 +2062,10 @@ vt_resize(struct vt_device *vd) vw->vw_font = vtfont_ref(&vt_font_default); VT_UNLOCK(vd); /* Resize terminal windows */ - vt_change_font(vw, vw->vw_font); + while (vt_change_font(vw, vw->vw_font) == EBUSY) { + DPRINTF(100, "%s: vt_change_font() is busy, " + "window %d\n", __func__, i); + } } } @@ -2064,7 +2073,6 @@ void vt_allocate(struct vt_driver *drv, void *softc) { struct vt_device *vd; - struct winsize wsz; if (!vty_enabled(VTY_VT)) return; @@ -2112,6 +2120,7 @@ vt_allocate(struct vt_driver *drv, void vd->vd_driver->vd_init(vd); VT_UNLOCK(vd); + /* Update windows sizes and initialize last items. */ vt_upgrade(vd); #ifdef DEV_SPLASH @@ -2120,16 +2129,17 @@ vt_allocate(struct vt_driver *drv, void #endif if (vd->vd_flags & VDF_ASYNC) { + /* Allow to put chars now. */ terminal_mute(vd->vd_curwindow->vw_terminal, 0); + /* Rerun timer for screen updates. */ callout_schedule(&vd->vd_timer, hz / VT_TIMERFREQ); } + /* + * Register as console. If it already registered, cnadd() will ignore + * it. + */ termcn_cnregister(vd->vd_windows[VT_CONSWINDOW]->vw_terminal); - - /* Update console window sizes to actual. */ - vt_winsize(vd, vd->vd_windows[VT_CONSWINDOW]->vw_font, &wsz); - terminal_set_winsize_blank(vd->vd_windows[VT_CONSWINDOW]->vw_terminal, - &wsz, 0, NULL); } void From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 13:22:50 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9DA245D2; Wed, 3 Sep 2014 13:22:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 887CA1820; Wed, 3 Sep 2014 13:22:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83DMob7031413; Wed, 3 Sep 2014 13:22:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83DMoKf031412; Wed, 3 Sep 2014 13:22:50 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409031322.s83DMoKf031412@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Sep 2014 13:22:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271020 - stable/10/sys/dev/vt/hw/fb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 13:22:50 -0000 Author: emaste Date: Wed Sep 3 13:22:50 2014 New Revision: 271020 URL: http://svnweb.freebsd.org/changeset/base/271020 Log: MFC r269437 by nwhitehorn: Don't assume that the framebuffer driver is using vt_fb_blank() when blanking the screen during init. Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.c Wed Sep 3 13:17:44 2014 (r271019) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.c Wed Sep 3 13:22:50 2014 (r271020) @@ -401,7 +401,7 @@ vt_fb_init(struct vt_device *vd) } /* Clear the screen. */ - vt_fb_blank(vd, TC_BLACK); + vd->vd_driver->vd_blank(vd, TC_BLACK); /* Wakeup screen. KMS need this. */ vt_fb_postswitch(vd); From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 13:31:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B7DFAC5; Wed, 3 Sep 2014 13:31:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 667B3188F; Wed, 3 Sep 2014 13:31:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83DV916035636; Wed, 3 Sep 2014 13:31:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83DV99U035635; Wed, 3 Sep 2014 13:31:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409031331.s83DV99U035635@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Sep 2014 13:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271021 - stable/10/sys/dev/vt/font X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 13:31:09 -0000 Author: emaste Date: Wed Sep 3 13:31:08 2014 New Revision: 271021 URL: http://svnweb.freebsd.org/changeset/base/271021 Log: MFC r270265 by dumbbell: vt(4): Fix an inconsistency between the mouse cursor bitmap and its mask Modified: stable/10/sys/dev/vt/font/vt_mouse_cursor.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/font/vt_mouse_cursor.c ============================================================================== --- stable/10/sys/dev/vt/font/vt_mouse_cursor.c Wed Sep 3 13:22:50 2014 (r271020) +++ stable/10/sys/dev/vt/font/vt_mouse_cursor.c Wed Sep 3 13:31:08 2014 (r271021) @@ -43,7 +43,7 @@ struct mouse_cursor vt_default_mouse_poi 0x7c, /* "_*****_ " */ 0x7e, /* "_******_" */ 0x68, /* "_**_****" */ - 0x4c, /* "_*__**__" */ + 0x4c, /* "_*__**_ " */ 0x0c, /* " _ _**_ " */ 0x06, /* " _**_" */ 0x06, /* " _**_" */ @@ -58,8 +58,8 @@ struct mouse_cursor vt_default_mouse_poi 0xfe, /* "_______ " */ 0xff, /* "________" */ 0xff, /* "________" */ - 0xff, /* "________" */ - 0x1e, /* " ____ " */ + 0xfe, /* "_______ " */ + 0x5e, /* " _ ____ " */ 0x0f, /* " ____" */ 0x0f, /* " ____" */ 0x0f, /* " ____" */ From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 13:40:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67CBEDF5; Wed, 3 Sep 2014 13:40:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 491531978; Wed, 3 Sep 2014 13:40:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83De3jm037566; Wed, 3 Sep 2014 13:40:03 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83De2qs037559; Wed, 3 Sep 2014 13:40:02 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409031340.s83De2qs037559@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Sep 2014 13:40:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271022 - stable/10/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 13:40:03 -0000 Author: emaste Date: Wed Sep 3 13:40:02 2014 New Revision: 271022 URL: http://svnweb.freebsd.org/changeset/base/271022 Log: MFC vt(4) mouse cursor improvements from dumbbell: r270269: vt(4): Handle global and per-window mouse cursor toggle in one place Before the global flag was set/unset using the CONS_MOUSECTL ioctl, and the per-window flag through the MOUSE_SETLEVEL or MOUSE_SETMODE ioctls. Also, if the cursor is already enabled/disabled, return immediatly. This avoids to reset the cursor's position to the center of the screen. This matches syscons' behavior. While here, remove a trailing space and a redundant variable declaration. r270271: vt(4): Mark cursor old position as dirty before reading the dirty area Otherwise, the redraw is done during the next vt_flush run. r270272: vt(4): If the cursor is globally disabled, don't mark its position as dirty This avoids unnecessary redraw. In particular, during boot, where the cursor is disabled and its fake position is [0;0], this triggered a refresh of the whole screen each time vt_flush() is called. r270273: vt(4): If the cursor didn't move, don't mark its position as dirty Currently, this has no effect, because the cursor is always redrawn anyway. But this will be useful after improvements to the vd_bitbltchr_t callback API. The vt_device structure members used to store the position of the cursor as of the last redraw are renamed from vd_mdirty{x,y} to vd_mold{x,y}. The associated comment is fixed too. Also, their value is now expressed in pixels, not in character columns/row. r270275: vt(4): Mark the current cursor position as dirty Like r270273, this has no effect for now, because the cursor is always drawn. This is in preparation of future changes to vd_bitbltchr_t API. r270278: vt(4): Mark cursor position as dirty when we enable/disable it Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/vt.h stable/10/sys/dev/vt/vt_core.c stable/10/sys/dev/vt/vt_sysmouse.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt.h ============================================================================== --- stable/10/sys/dev/vt/vt.h Wed Sep 3 13:31:08 2014 (r271021) +++ stable/10/sys/dev/vt/vt.h Wed Sep 3 13:40:02 2014 (r271022) @@ -117,10 +117,10 @@ struct vt_device { struct vt_window *vd_markedwin; /* (?) Copy/paste buf owner. */ const struct vt_driver *vd_driver; /* (c) Graphics driver. */ void *vd_softc; /* (u) Driver data. */ - uint16_t vd_mx; /* (?) Mouse X. */ - uint16_t vd_my; /* (?) Mouse Y. */ - vt_axis_t vd_mdirtyx; /* (?) Screen width. */ - vt_axis_t vd_mdirtyy; /* (?) Screen height. */ + uint16_t vd_mx; /* (?) Current mouse X. */ + uint16_t vd_my; /* (?) current mouse Y. */ + vt_axis_t vd_moldx; /* (?) Mouse X as of last redraw. */ + vt_axis_t vd_moldy; /* (?) Mouse Y as of last redraw. */ uint32_t vd_mstate; /* (?) Mouse state. */ term_pos_t vd_offset; /* (?) Pixel offset. */ vt_axis_t vd_width; /* (?) Screen width. */ Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Wed Sep 3 13:31:08 2014 (r271021) +++ stable/10/sys/dev/vt/vt_core.c Wed Sep 3 13:40:02 2014 (r271022) @@ -825,6 +825,45 @@ vt_flush(struct vt_device *vd) if (vd->vd_flags & VDF_SPLASH || vw->vw_flags & VWF_BUSY) return; +#ifndef SC_NO_CUTPASTE + if ((vd->vd_flags & VDF_MOUSECURSOR) && /* Mouse support enabled. */ + !(vw->vw_flags & VWF_MOUSE_HIDE)) { /* Cursor displayed. */ + if (vd->vd_moldx != vd->vd_mx || + vd->vd_moldy != vd->vd_my) { + /* + * Mark last mouse position as dirty to erase. + * + * FIXME: The font size could be different among + * all windows, so the column/row calculation + * below isn't correct for all windows. + * + * FIXME: The cursor can span more than one + * character cell. vtbuf_mouse_cursor_position + * marks surrounding cells as dirty. But due + * to font size possibly inconsistent across + * windows, this may not be sufficient. This + * causes part of the cursor to not be erased. + * + * FIXME: The vt_buf lock is acquired twice in a + * row. + */ + vtbuf_mouse_cursor_position(&vw->vw_buf, + vd->vd_moldx / vf->vf_width, + vd->vd_moldy / vf->vf_height); + vtbuf_mouse_cursor_position(&vw->vw_buf, + vd->vd_mx / vf->vf_width, + vd->vd_my / vf->vf_height); + + /* + * Save point of last mouse cursor to erase it + * later. + */ + vd->vd_moldx = vd->vd_mx; + vd->vd_moldy = vd->vd_my; + } + } +#endif + vtbuf_undirty(&vw->vw_buf, &tarea, &tmask); vt_termsize(vd, vf, &size); @@ -837,14 +876,6 @@ vt_flush(struct vt_device *vd) vd->vd_flags &= ~VDF_INVALID; } -#ifndef SC_NO_CUTPASTE - if ((vw->vw_flags & VWF_MOUSE_HIDE) == 0) { - /* Mark last mouse position as dirty to erase. */ - vtbuf_mouse_cursor_position(&vw->vw_buf, vd->vd_mdirtyx, - vd->vd_mdirtyy); - } -#endif - for (row = tarea.tr_begin.tp_row; row < tarea.tr_end.tp_row; row++) { if (!VTBUF_DIRTYROW(&tmask, row)) continue; @@ -884,9 +915,6 @@ vt_flush(struct vt_device *vd) vd->vd_offset.tp_row + vd->vd_my, vd->vd_offset.tp_col + vd->vd_mx, w, h, TC_WHITE, TC_BLACK); - /* Save point of last mouse cursor to erase it later. */ - vd->vd_mdirtyx = vd->vd_mx / vf->vf_width; - vd->vd_mdirtyy = vd->vd_my / vf->vf_height; } #endif } @@ -1524,6 +1552,15 @@ vt_mouse_state(int show) vw->vw_flags &= ~VWF_MOUSE_HIDE; break; } + + /* + * Mark mouse position as dirty. + * + * FIXME: See comments in vt_flush(). + */ + vtbuf_mouse_cursor_position(&vw->vw_buf, + vd->vd_mx / vw->vw_font->vf_width, + vd->vd_my / vw->vw_font->vf_height); } #endif @@ -1696,7 +1733,7 @@ skip_thunk: /* XXX: other fields! */ return (0); } - case CONS_GETVERS: + case CONS_GETVERS: *(int *)data = 0x200; return (0); case CONS_MODEINFO: @@ -1706,20 +1743,28 @@ skip_thunk: mouse_info_t *mouse = (mouse_info_t*)data; /* - * This has no effect on vt(4). We don't draw any mouse - * cursor. Just ignore MOUSE_HIDE and MOUSE_SHOW to - * prevent excessive errors. All the other commands + * All the commands except MOUSE_SHOW nd MOUSE_HIDE * should not be applied to individual TTYs, but only to * consolectl. */ switch (mouse->operation) { case MOUSE_HIDE: - vd->vd_flags &= ~VDF_MOUSECURSOR; + if (vd->vd_flags & VDF_MOUSECURSOR) { + vd->vd_flags &= ~VDF_MOUSECURSOR; +#ifndef SC_NO_CUTPASTE + vt_mouse_state(VT_MOUSE_HIDE); +#endif + } return (0); case MOUSE_SHOW: - vd->vd_mx = vd->vd_width / 2; - vd->vd_my = vd->vd_height / 2; - vd->vd_flags |= VDF_MOUSECURSOR; + if (!(vd->vd_flags & VDF_MOUSECURSOR)) { + vd->vd_flags |= VDF_MOUSECURSOR; + vd->vd_mx = vd->vd_width / 2; + vd->vd_my = vd->vd_height / 2; +#ifndef SC_NO_CUTPASTE + vt_mouse_state(VT_MOUSE_SHOW); +#endif + } return (0); default: return (EINVAL); @@ -1742,7 +1787,6 @@ skip_thunk: } case GIO_SCRNMAP: { scrmap_t *sm = (scrmap_t *)data; - int i; /* We don't have screen maps, so return a handcrafted one. */ for (i = 0; i < 256; i++) Modified: stable/10/sys/dev/vt/vt_sysmouse.c ============================================================================== --- stable/10/sys/dev/vt/vt_sysmouse.c Wed Sep 3 13:31:08 2014 (r271021) +++ stable/10/sys/dev/vt/vt_sysmouse.c Wed Sep 3 13:40:02 2014 (r271022) @@ -347,9 +347,6 @@ sysmouse_ioctl(struct cdev *dev, u_long return (EINVAL); sysmouse_level = level; -#ifndef SC_NO_CUTPASTE - vt_mouse_state((level == 0)?VT_MOUSE_SHOW:VT_MOUSE_HIDE); -#endif return (0); } case MOUSE_SETMODE: { @@ -362,10 +359,6 @@ sysmouse_ioctl(struct cdev *dev, u_long case 0: case 1: sysmouse_level = mode->level; -#ifndef SC_NO_CUTPASTE - vt_mouse_state((mode->level == 0)?VT_MOUSE_SHOW: - VT_MOUSE_HIDE); -#endif break; default: return (EINVAL); From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 14:00:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7BCFD72; Wed, 3 Sep 2014 14:00:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2E051D24; Wed, 3 Sep 2014 14:00:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83E0b5G049812; Wed, 3 Sep 2014 14:00:37 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83E0bK6049810; Wed, 3 Sep 2014 14:00:37 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409031400.s83E0bK6049810@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Sep 2014 14:00:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271023 - stable/10/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 14:00:38 -0000 Author: emaste Date: Wed Sep 3 14:00:37 2014 New Revision: 271023 URL: http://svnweb.freebsd.org/changeset/base/271023 Log: MFC r270280 by dumbbell: vt(4): Pause the flush timer while swithing window This fixes bad looking refresh when switching window: squares instead of text, flashing screen, and so on. In the worst case, vt_flush() came at a very inappropriate timing and the screen was not refreshed at all (leaving squares all over the place). This doesn't fix the flickering of the screen with vt_vga, because the sync signal is temporarily stopped and the video memory is cleared. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/vt.h stable/10/sys/dev/vt/vt_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt.h ============================================================================== --- stable/10/sys/dev/vt/vt.h Wed Sep 3 13:40:02 2014 (r271022) +++ stable/10/sys/dev/vt/vt.h Wed Sep 3 14:00:37 2014 (r271023) @@ -128,6 +128,7 @@ struct vt_device { struct mtx vd_lock; /* Per-device lock. */ struct cv vd_winswitch; /* (d) Window switch notify. */ struct callout vd_timer; /* (d) Display timer. */ + volatile unsigned int vd_timer_armed;/* (?) Display timer started.*/ int vd_flags; /* (d) Device flags. */ #define VDF_TEXTMODE 0x01 /* Do text mode rendering. */ #define VDF_SPLASH 0x02 /* Splash screen active. */ Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Wed Sep 3 13:40:02 2014 (r271022) +++ stable/10/sys/dev/vt/vt_core.c Wed Sep 3 14:00:37 2014 (r271023) @@ -225,6 +225,37 @@ vt_update_static(void *dummy) } static void +vt_schedule_flush(struct vt_device *vd, int ms) +{ + + if (ms <= 0) + /* Default to initial value. */ + ms = 1000 / VT_TIMERFREQ; + + callout_schedule(&vd->vd_timer, hz / (1000 / ms)); +} + +static void +vt_resume_flush_timer(struct vt_device *vd, int ms) +{ + + if (!atomic_cmpset_int(&vd->vd_timer_armed, 0, 1)) + return; + + vt_schedule_flush(vd, ms); +} + +static void +vt_suspend_flush_timer(struct vt_device *vd) +{ + + if (!atomic_cmpset_int(&vd->vd_timer_armed, 1, 0)) + return; + + callout_drain(&vd->vd_timer); +} + +static void vt_switch_timer(void *arg) { @@ -327,6 +358,8 @@ vt_window_switch(struct vt_window *vw) return (EINVAL); } + vt_suspend_flush_timer(vd); + vd->vd_curwindow = vw; vd->vd_flags |= VDF_INVALID; cv_broadcast(&vd->vd_winswitch); @@ -335,6 +368,8 @@ vt_window_switch(struct vt_window *vw) if (vd->vd_driver->vd_postswitch) vd->vd_driver->vd_postswitch(vd); + vt_resume_flush_timer(vd, 0); + /* Restore per-window keyboard mode. */ mtx_lock(&Giant); kbd = kbd_get_keyboard(vd->vd_keyboard); @@ -929,7 +964,7 @@ vt_timer(void *arg) vt_flush(vd); /* Schedule for next update. */ - callout_schedule(&vd->vd_timer, hz / VT_TIMERFREQ); + vt_schedule_flush(vd, 0); } static void @@ -2084,6 +2119,7 @@ vt_upgrade(struct vt_device *vd) /* Start timer when everything ready. */ vd->vd_flags |= VDF_ASYNC; callout_reset(&vd->vd_timer, hz / VT_TIMERFREQ, vt_timer, vd); + vd->vd_timer_armed = 1; } VT_UNLOCK(vd); @@ -2145,7 +2181,7 @@ vt_allocate(struct vt_driver *drv, void if (vd->vd_flags & VDF_ASYNC) { /* Stop vt_flush periodic task. */ - callout_drain(&vd->vd_timer); + vt_suspend_flush_timer(vd); /* * Mute current terminal until we done. vt_change_font (called * from vt_resize) will unmute it. @@ -2176,7 +2212,7 @@ vt_allocate(struct vt_driver *drv, void /* Allow to put chars now. */ terminal_mute(vd->vd_curwindow->vw_terminal, 0); /* Rerun timer for screen updates. */ - callout_schedule(&vd->vd_timer, hz / VT_TIMERFREQ); + vt_resume_flush_timer(vd, 0); } /* From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 14:06:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD275CC; Wed, 3 Sep 2014 14:06:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B82DA1D87; Wed, 3 Sep 2014 14:06:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83E6CJe051619; Wed, 3 Sep 2014 14:06:12 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83E6CaC051617; Wed, 3 Sep 2014 14:06:12 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409031406.s83E6CaC051617@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Sep 2014 14:06:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271024 - stable/10/sys/dev/vt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 14:06:12 -0000 Author: emaste Date: Wed Sep 3 14:06:12 2014 New Revision: 271024 URL: http://svnweb.freebsd.org/changeset/base/271024 Log: MFC r270288 by dumbbell: vt(4): Constify vt_buf argument of vtbuf_iscursor() Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/vt.h stable/10/sys/dev/vt/vt_buf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/vt.h ============================================================================== --- stable/10/sys/dev/vt/vt.h Wed Sep 3 14:00:37 2014 (r271023) +++ stable/10/sys/dev/vt/vt.h Wed Sep 3 14:06:12 2014 (r271024) @@ -192,7 +192,7 @@ void vtbuf_cursor_position(struct vt_buf void vtbuf_scroll_mode(struct vt_buf *vb, int yes); void vtbuf_undirty(struct vt_buf *, term_rect_t *, struct vt_bufmask *); void vtbuf_sethistory_size(struct vt_buf *, int); -int vtbuf_iscursor(struct vt_buf *vb, int row, int col); +int vtbuf_iscursor(const struct vt_buf *vb, int row, int col); void vtbuf_cursor_visibility(struct vt_buf *, int); #ifndef SC_NO_CUTPASTE void vtbuf_mouse_cursor_position(struct vt_buf *vb, int col, int row); Modified: stable/10/sys/dev/vt/vt_buf.c ============================================================================== --- stable/10/sys/dev/vt/vt_buf.c Wed Sep 3 14:00:37 2014 (r271023) +++ stable/10/sys/dev/vt/vt_buf.c Wed Sep 3 14:06:12 2014 (r271024) @@ -148,7 +148,7 @@ vtbuf_wth(struct vt_buf *vb, int row) /* Translate history row to current view row number. */ static int -vtbuf_htw(struct vt_buf *vb, int row) +vtbuf_htw(const struct vt_buf *vb, int row) { /* @@ -162,7 +162,7 @@ vtbuf_htw(struct vt_buf *vb, int row) } int -vtbuf_iscursor(struct vt_buf *vb, int row, int col) +vtbuf_iscursor(const struct vt_buf *vb, int row, int col) { int sc, sr, ec, er, tmp; From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 14:07:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 5A3CC217; Wed, 3 Sep 2014 14:07:57 +0000 (UTC) Date: Wed, 3 Sep 2014 14:07:57 +0000 From: Alexey Dokuchaev To: Ed Maste Subject: Re: svn commit: r271023 - stable/10/sys/dev/vt Message-ID: <20140903140757.GA7494@FreeBSD.org> References: <201409031400.s83E0bK6049810@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201409031400.s83E0bK6049810@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 14:07:57 -0000 On Wed, Sep 03, 2014 at 02:00:37PM +0000, Ed Maste wrote: > New Revision: 271023 > URL: http://svnweb.freebsd.org/changeset/base/271023 > > Log: > MFC r270280 by dumbbell: vt(4): Pause the flush timer while swithing window > > This fixes bad looking refresh when switching window: squares instead > of text, flashing screen, and so on. In the worst case, vt_flush() came > at a very inappropriate timing and the screen was not refreshed at all > (leaving squares all over the place). > > This doesn't fix the flickering of the screen with vt_vga, because the > sync signal is temporarily stopped and the video memory is cleared. Will this improve the current situation with switching ttys on the console? Right now it takes considerable time to switch, and sometimes the image is not properly restored. I'm also wondering why on PowerPC vt(4) behaves much better (switching is instant, no artifacts at all). ./danfe From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 14:16:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E035AD4; Wed, 3 Sep 2014 14:16:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 396AF1EE4; Wed, 3 Sep 2014 14:16:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83EGpd9057176; Wed, 3 Sep 2014 14:16:51 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83EGp1h057175; Wed, 3 Sep 2014 14:16:51 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201409031416.s83EGp1h057175@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Wed, 3 Sep 2014 14:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271025 - head/contrib/llvm/lib/Target/ARM X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 14:16:51 -0000 Author: sbruno Date: Wed Sep 3 14:16:50 2014 New Revision: 271025 URL: http://svnweb.freebsd.org/changeset/base/271025 Log: MFV: Only emit movw on ARMv6T2 Building for the FreeBSD default target ARMv6 was emitting movw ASM on certain test cases (found building qmake4/5 for ARM). Don't do that, moreover, the AS in base doesn't understand this instruction for this target. One would need to use --integrated-as to get this to build if desired. http://llvm.org/viewvc/llvm-project?view=revision&revision=216989 Submitted by: ian Reviewed by: dim Obtained from: llvm.org MFC after: 2 days Modified: head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Modified: head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td ============================================================================== --- head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Wed Sep 3 14:06:12 2014 (r271024) +++ head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Wed Sep 3 14:16:50 2014 (r271025) @@ -3248,7 +3248,8 @@ def : ARMPat<(ARMaddc GPR:$src, imm0_655 def : ARMPat<(ARMadde GPR:$src, so_imm_not:$imm, CPSR), (SBCri GPR:$src, so_imm_not:$imm)>; def : ARMPat<(ARMadde GPR:$src, imm0_65535_neg:$imm, CPSR), - (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>; + (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>, + Requires<[IsARM, HasV6T2]>; // Note: These are implemented in C++ code, because they have to generate // ADD/SUBrs instructions, which use a complex pattern that a xform function From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 14:34:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9232E6C1; Wed, 3 Sep 2014 14:34:42 +0000 (UTC) Received: from mail-ie0-x234.google.com (mail-ie0-x234.google.com [IPv6:2607:f8b0:4001:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3A81311FA; Wed, 3 Sep 2014 14:34:42 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id rl12so9779869iec.39 for ; Wed, 03 Sep 2014 07:34:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=ZMGEXsTVvox03kySViY6Pq9luOyuxfX/dkVPjK/HsqE=; b=Fkqa0XJYsom8Qp8sEXjPAU//jDT/ilpxMZiq/GXp2DwK6Ojuvu42GrOedUHdOHYLnR hLzDGqPRKCzwioqXZhmuZFYG8igzUipnzgp2OLyyks4gY+1No60ip13rqpg+xpOYVXkx Jz+7ZjR9YEkvQTMTgYQFA1I+B3xUnYlMtByiQd4m3blfTO3mz9KDLgKZ8bWgN2/rT3Kx XLM9x9VJNqRXGH+vVXXLP0bkywEr/kAvAfCpaCEVLL85SV7C5Gjg5oUhyfwd0hYvqFyL I/7SWhN7d4DMLg0wIkzqUrPdpyy4/z7F1QKMnuPtLeN2Xqt0SZ7mt4BM0ZBcHu09JX1m cFdw== X-Received: by 10.43.136.134 with SMTP id ik6mr39008152icc.6.1409754881585; Wed, 03 Sep 2014 07:34:41 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.44.1 with HTTP; Wed, 3 Sep 2014 07:34:21 -0700 (PDT) In-Reply-To: <20140903140757.GA7494@FreeBSD.org> References: <201409031400.s83E0bK6049810@svn.freebsd.org> <20140903140757.GA7494@FreeBSD.org> From: Ed Maste Date: Wed, 3 Sep 2014 10:34:21 -0400 X-Google-Sender-Auth: mSSxTKBT5CaeCMUqJbl9pYcnXXc Message-ID: Subject: Re: svn commit: r271023 - stable/10/sys/dev/vt To: Alexey Dokuchaev Content-Type: text/plain; charset=UTF-8 Cc: svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 14:34:42 -0000 On 3 September 2014 10:07, Alexey Dokuchaev wrote: > On Wed, Sep 03, 2014 at 02:00:37PM +0000, Ed Maste wrote: >> New Revision: 271023 >> URL: http://svnweb.freebsd.org/changeset/base/271023 >> >> Log: >> MFC r270280 by dumbbell: vt(4): Pause the flush timer while swithing window >> >> This fixes bad looking refresh when switching window: squares instead >> of text, flashing screen, and so on. In the worst case, vt_flush() came >> at a very inappropriate timing and the screen was not refreshed at all >> (leaving squares all over the place). >> >> This doesn't fix the flickering of the screen with vt_vga, because the >> sync signal is temporarily stopped and the video memory is cleared. > > Will this improve the current situation with switching ttys on the console? > Right now it takes considerable time to switch, and sometimes the image is > not properly restored. This should address the corruption on vt switch; I don't believe it will have an effect on the switching time. > I'm also wondering why on PowerPC vt(4) behaves much better (switching is > instant, no artifacts at all). The VGA vt(4) issues all stem from the relatively complex and arcane VGA hardware and a somewhat limited vt_vga implementation. Most of the issues have been sorted out in HEAD by dumbbell@ and those are in the pipeline to be merged. From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 14:44:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 61DB6C11; Wed, 3 Sep 2014 14:44:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DDCB1332; Wed, 3 Sep 2014 14:44:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83EiODc070848; Wed, 3 Sep 2014 14:44:24 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83EiOvS070847; Wed, 3 Sep 2014 14:44:24 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <201409031444.s83EiOvS070847@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Wed, 3 Sep 2014 14:44:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271026 - head/lib/libnv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 14:44:24 -0000 Author: pjd Date: Wed Sep 3 14:44:23 2014 New Revision: 271026 URL: http://svnweb.freebsd.org/changeset/base/271026 Log: Fix descriptors leak in case of nvlist_xunpack() failure. Submitted by: Mariusz Zaborski Modified: head/lib/libnv/nvlist.c Modified: head/lib/libnv/nvlist.c ============================================================================== --- head/lib/libnv/nvlist.c Wed Sep 3 14:16:50 2014 (r271025) +++ head/lib/libnv/nvlist.c Wed Sep 3 14:44:23 2014 (r271026) @@ -760,8 +760,11 @@ nvlist_recv(int sock) } nvl = nvlist_xunpack(buf, size, fds, nfds); - if (nvl == NULL) + if (nvl == NULL) { + for (i = 0; i < nfds; i++) + close(fds[i]); goto out; + } ret = nvl; out: From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 14:57:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id C8FDA707; Wed, 3 Sep 2014 14:57:53 +0000 (UTC) Date: Wed, 3 Sep 2014 14:57:53 +0000 From: Alexey Dokuchaev To: Ed Maste Subject: Re: svn commit: r271023 - stable/10/sys/dev/vt Message-ID: <20140903145753.GA25935@FreeBSD.org> References: <201409031400.s83E0bK6049810@svn.freebsd.org> <20140903140757.GA7494@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 14:57:53 -0000 On Wed, Sep 03, 2014 at 10:34:21AM -0400, Ed Maste wrote: > On 3 September 2014 10:07, Alexey Dokuchaev wrote: > > I'm also wondering why on PowerPC vt(4) behaves much better (switching is > > instant, no artifacts at all). > > The VGA vt(4) issues all stem from the relatively complex and arcane > VGA hardware and a somewhat limited vt_vga implementation. Can you elaborate a bit on the technical side of things? Particularly, it looks strange that syscons(4) was able to work just fine on "relatively complex and arcane VGA hardware", while more modern vt(4) is fighting with problems. Don't get me wrong, I greatly appreciate all of you guys' work, just want to understand better what are the challenges you're facing. Thank you, ./danfe From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 14:59:27 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6C119E2; Wed, 3 Sep 2014 14:59:27 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 244201515; Wed, 3 Sep 2014 14:59:25 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id RAA14644; Wed, 03 Sep 2014 17:59:22 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XPC1p-000GqR-QP; Wed, 03 Sep 2014 17:59:22 +0300 Message-ID: <54072C8E.7030501@FreeBSD.org> Date: Wed, 03 Sep 2014 17:58:22 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Steven Hartland , Peter Wemm Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm References: <201408281950.s7SJo90I047213@svn.freebsd.org> <39211177.i8nn9sHiCx@overcee.wemm.org> <201409021201.15967.jhb@freebsd.org> <5405FD2C.8000901@rice.edu> <54060D1B.6020700@rice.edu> <774F8EEE96EB483DA8ACF533CF7C23F3@multiplay.co.uk> <54062268.9060603@rice.edu> <169C94ED141B435BACEADB04A4824717@multiplay.co.uk> <54070421.9030200@FreeBSD.org> <7FA917F9BB6F45FA84D8408C13359748@multiplay.co.uk> In-Reply-To: <7FA917F9BB6F45FA84D8408C13359748@multiplay.co.uk> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, John Baldwin , Alan Cox , svn-src-all@FreeBSD.org, Dmitry Morozovsky , "Matthew D. Fuller" , svn-src-head@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 14:59:27 -0000 on 03/09/2014 15:17 Steven Hartland said the following: > ----- Original Message ----- From: "Andriy Gapon" > >> on 03/09/2014 11:09 Steven Hartland said the following: >>> I'm looking to MFC this change so wanted to check if >>> anyone had an final feedback / objections? >> >> I think that your changes went in a bit prematurely (little review), so perhaps >> MFC would be premature as well. > > Its a change which really needs to make it into 10.1 IMO I think that this is the arguable point. As I've mentioned before I have not noticed, perhaps through the fault of my own, any reports that users need this change after Alan's pagedaemon fix(es). Also, there is no confirmation yet that after this change ARC does not give up its buffers too easily. > due to its impact on users so I don't really want to hold > off too long. > > If anyone has any substantiated reason to then off course > I'll hold off. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 15:06:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 654CFE33 for ; Wed, 3 Sep 2014 15:06:11 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46A0A1768 for ; Wed, 3 Sep 2014 15:06:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id s83F6BwX062784 for ; Wed, 3 Sep 2014 15:06:11 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id s83F6BxK062780 for svn-src-all@freebsd.org; Wed, 3 Sep 2014 15:06:11 GMT (envelope-from bdrewery) Received: (qmail 36553 invoked from network); 3 Sep 2014 10:06:09 -0500 Received: from unknown (HELO ?10.10.0.24?) (freebsd@shatow.net@10.10.0.24) by sweb.xzibition.com with ESMTPA; 3 Sep 2014 10:06:09 -0500 Message-ID: <54072E34.3080403@FreeBSD.org> Date: Wed, 03 Sep 2014 10:05:24 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r271000 - head/sys/kern References: <201409030818.s838I8uY084843@svn.freebsd.org> In-Reply-To: <201409030818.s838I8uY084843@svn.freebsd.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mv7p62cdxbHga8v6jLn38kEFvItCLoG9o" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 15:06:11 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --mv7p62cdxbHga8v6jLn38kEFvItCLoG9o Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 9/3/2014 3:18 AM, Konstantin Belousov wrote: > Author: kib > Date: Wed Sep 3 08:18:07 2014 > New Revision: 271000 > URL: http://svnweb.freebsd.org/changeset/base/271000 >=20 > Log: > Right now, thread_single(SINGLE_EXIT) returns after the p_numthreads > reaches 1. The p_numthreads counter is decremented in thread_exit() b= y > a call to thread_unlink(). This means that the exiting threads may > still execute on other CPUs when thread_single(SINGLE_EXIT) returns. > As result, vmspace could be destroyed while paging structures are > still used on other CPUs by exiting threads. > =20 > Delay the return from thread_single(SINGLE_EXIT) until all threads ar= e > really destroyed by thread_stash() after the last switch out. The > p_exitthreads counter already provides the required mechanism, move > the wait from the thread_wait() (which is called from wait(2) code) > into thread_single(). > =20 > Reported by: many (as "panic: pmap active ") > Reviewed by: alc, jhb > Tested by: pho > Sponsored by: The FreeBSD Foundation > MFC after: 1 week >=20 > Modified: > head/sys/kern/kern_thread.c >=20 > Modified: head/sys/kern/kern_thread.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/kern_thread.c Wed Sep 3 08:14:07 2014 (r270999) > +++ head/sys/kern/kern_thread.c Wed Sep 3 08:18:07 2014 (r271000) > @@ -432,6 +432,7 @@ thread_exit(void) > */ > if (p->p_flag & P_HADTHREADS) { > if (p->p_numthreads > 1) { > + atomic_add_int(&td->td_proc->p_exitthreads, 1); > thread_unlink(td); > td2 =3D FIRST_THREAD_IN_PROC(p); > sched_exit_thread(td2, td); > @@ -452,7 +453,6 @@ thread_exit(void) > } > } > =20 > - atomic_add_int(&td->td_proc->p_exitthreads, 1); > PCPU_SET(deadthread, td); > } else { > /* > @@ -507,14 +507,12 @@ thread_wait(struct proc *p) > struct thread *td; > =20 > mtx_assert(&Giant, MA_NOTOWNED); > - KASSERT((p->p_numthreads =3D=3D 1), ("Multiple threads in wait1()"));= > + KASSERT((p->p_numthreads =3D=3D 1), ("multiple threads in thread_wait= ()")); > + KASSERT((p->p_exitthreads =3D=3D 0), ("p_exitthreads leaking")); > td =3D FIRST_THREAD_IN_PROC(p); > /* Lock the last thread so we spin until it exits cpu_throw(). */ > thread_lock(td); > thread_unlock(td); > - /* Wait for any remaining threads to exit cpu_throw(). */ > - while (p->p_exitthreads) > - sched_relinquish(curthread); > lock_profile_thread_exit(td); > cpuset_rel(td->td_cpuset); > td->td_cpuset =3D NULL; > @@ -722,6 +720,17 @@ stopme: > p->p_singlethread =3D NULL; > p->p_flag &=3D ~(P_STOPPED_SINGLE | P_SINGLE_EXIT); > thread_unthread(td); > + > + /* > + * Wait for any remaining threads to exit cpu_throw(). > + */ > + while (p->p_exitthreads !=3D 0) { > + PROC_SUNLOCK(p); > + PROC_UNLOCK(p); > + sched_relinquish(td); > + PROC_LOCK(p); > + PROC_SLOCK(p); > + } > } > PROC_SUNLOCK(p); > return (0); >=20 Thanks! --=20 Regards, Bryan Drewery --mv7p62cdxbHga8v6jLn38kEFvItCLoG9o Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) iQEcBAEBAgAGBQJUBy40AAoJEDXXcbtuRpfPgNIIAMcrjKmUsAr+qHsxaYGODJT+ wKHwdGwcNM3XuVXe8g8zG3/gyzYIvrWNuQyUKc0ZOewIhEgxUvHJz3WPB/IMV7zH cxH7R+W2sM/L+QUIbSEcpqe6YdogX8mzgzzmOxwKmN22HkE4RcaG5Dc7V3xmXs6v fnw1Ilbez0YCDXL1CpLSyc06cu11zTW5F/Fce798HdCyI0YQn1rxFbamfR5wdLLD gOeHFUgltZ7eMb6t7HEI101jrsh1qrsYpokPStA5pIdKhYK/rXKT+5LfTdrFl+Fz Ao5TX8NcmvgPwqrwBsLvV5ZMRPNOcgwkC3WurfhG3/uzm8F1Q655liXlU/Y6js0= =Eg8Q -----END PGP SIGNATURE----- --mv7p62cdxbHga8v6jLn38kEFvItCLoG9o-- From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 15:06:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C681AF7E; Wed, 3 Sep 2014 15:06:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2B13177A; Wed, 3 Sep 2014 15:06:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83F6lWZ081009; Wed, 3 Sep 2014 15:06:47 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83F6l8B081008; Wed, 3 Sep 2014 15:06:47 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <201409031506.s83F6l8B081008@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Wed, 3 Sep 2014 15:06:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271027 - head/lib/libnv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 15:06:47 -0000 Author: pjd Date: Wed Sep 3 15:06:47 2014 New Revision: 271027 URL: http://svnweb.freebsd.org/changeset/base/271027 Log: Declare i. Reported by: sbruno Modified: head/lib/libnv/nvlist.c Modified: head/lib/libnv/nvlist.c ============================================================================== --- head/lib/libnv/nvlist.c Wed Sep 3 14:44:23 2014 (r271026) +++ head/lib/libnv/nvlist.c Wed Sep 3 15:06:47 2014 (r271027) @@ -728,7 +728,7 @@ nvlist_recv(int sock) nvlist_t *nvl, *ret; unsigned char *buf; size_t nfds, size; - int serrno, *fds; + int serrno, i, *fds; if (buf_recv(sock, &nvlhdr, sizeof(nvlhdr)) == -1) return (NULL); From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 15:07:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D43015B; Wed, 3 Sep 2014 15:07:44 +0000 (UTC) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD68E1790; Wed, 3 Sep 2014 15:07:43 +0000 (UTC) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1XPC9s-0005r0-Ky; Wed, 03 Sep 2014 17:07:40 +0200 Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes To: "Ed Maste" , "Alexey Dokuchaev" Subject: Re: svn commit: r271023 - stable/10/sys/dev/vt References: <201409031400.s83E0bK6049810@svn.freebsd.org> <20140903140757.GA7494@FreeBSD.org> <20140903145753.GA25935@FreeBSD.org> Date: Wed, 03 Sep 2014 17:07:39 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <20140903145753.GA25935@FreeBSD.org> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.3.2 X-Scan-Signature: 5a1627636b35b65657045ef62631cd80 Cc: svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 15:07:44 -0000 On Wed, 03 Sep 2014 16:57:53 +0200, Alexey Dokuchaev wrote: > On Wed, Sep 03, 2014 at 10:34:21AM -0400, Ed Maste wrote: >> On 3 September 2014 10:07, Alexey Dokuchaev wrote: >> > I'm also wondering why on PowerPC vt(4) behaves much better >> (switching is >> > instant, no artifacts at all). >> >> The VGA vt(4) issues all stem from the relatively complex and arcane >> VGA hardware and a somewhat limited vt_vga implementation. > > Can you elaborate a bit on the technical side of things? Particularly, > it > looks strange that syscons(4) was able to work just fine on "relatively > complex and arcane VGA hardware", while more modern vt(4) is fighting > with > problems. AFAIK syscons works in the text mode of the BIOS. Not on VGA graphics mode. See the vt man page for textmode in vt_vga. http://www.freebsd.org/cgi/man.cgi?query=vt&manpath=FreeBSD+10.0-stable Regards. Ronald. > > Don't get me wrong, I greatly appreciate all of you guys' work, just want > to understand better what are the challenges you're facing. Thank you, > > ./danfe > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 15:08:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E91BE290; Wed, 3 Sep 2014 15:08:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D5200179A; Wed, 3 Sep 2014 15:08:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83F8X8i081283; Wed, 3 Sep 2014 15:08:33 GMT (envelope-from pjd@FreeBSD.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83F8Xhg081282; Wed, 3 Sep 2014 15:08:33 GMT (envelope-from pjd@FreeBSD.org) Message-Id: <201409031508.s83F8Xhg081282@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pjd set sender to pjd@FreeBSD.org using -f From: Pawel Jakub Dawidek Date: Wed, 3 Sep 2014 15:08:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271028 - head/lib/libnv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 15:08:34 -0000 Author: pjd Date: Wed Sep 3 15:08:33 2014 New Revision: 271028 URL: http://svnweb.freebsd.org/changeset/base/271028 Log: Use better type for i. Modified: head/lib/libnv/nvlist.c Modified: head/lib/libnv/nvlist.c ============================================================================== --- head/lib/libnv/nvlist.c Wed Sep 3 15:06:47 2014 (r271027) +++ head/lib/libnv/nvlist.c Wed Sep 3 15:08:33 2014 (r271028) @@ -727,8 +727,8 @@ nvlist_recv(int sock) struct nvlist_header nvlhdr; nvlist_t *nvl, *ret; unsigned char *buf; - size_t nfds, size; - int serrno, i, *fds; + size_t nfds, size, i; + int serrno, *fds; if (buf_recv(sock, &nvlhdr, sizeof(nvlhdr)) == -1) return (NULL); From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 15:14:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52CBC616; Wed, 3 Sep 2014 15:14:30 +0000 (UTC) Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32057189A; Wed, 3 Sep 2014 15:14:30 +0000 (UTC) Received: by mail.lifanov.com (Postfix, from userid 58) id 568131B3061; Wed, 3 Sep 2014 11:05:07 -0400 (EDT) Received: from [127.0.0.1] (vnat004.nandomedia.com [166.108.31.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.lifanov.com (Postfix) with ESMTPSA id 9E1061B2E63; Wed, 3 Sep 2014 11:05:05 -0400 (EDT) Message-ID: <54072E20.10802@mail.lifanov.com> Date: Wed, 03 Sep 2014 11:05:04 -0400 From: Nikolai Lifanov User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Steven Hartland , Alan Cox , John Baldwin , Peter Wemm Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm References: <201408281950.s7SJo90I047213@svn.freebsd.org> <39211177.i8nn9sHiCx@overcee.wemm.org> <201409021201.15967.jhb@freebsd.org> <5405FD2C.8000901@rice.edu> <54060D1B.6020700@rice.edu> <774F8EEE96EB483DA8ACF533CF7C23F3@multiplay.co.uk> <54062268.9060603@rice.edu> <169C94ED141B435BACEADB04A4824717@multiplay.co.uk> In-Reply-To: <169C94ED141B435BACEADB04A4824717@multiplay.co.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dmitry Morozovsky , "Matthew D. Fuller" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 15:14:30 -0000 On 09/03/14 04:09, Steven Hartland wrote: > I'm looking to MFC this change so wanted to check if > anyone had an final feedback / objections? > > I know we currently have Alan's feedback on changing > the #ifdef __i386__ to #ifndef UMA_MD_SMALL_ALLOC > which sounds sensible but waiting Peter to comment on. > > Regards > Steve I have no technical input, but this change improves ARC usefulness for me quite a bit. I would like to see the improvement in 10-STABLE. - Nikolai Lifanov From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 15:17:32 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5F4694F; Wed, 3 Sep 2014 15:17:32 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 347B618DE; Wed, 3 Sep 2014 15:17:30 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA14867; Wed, 03 Sep 2014 18:17:29 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XPCJM-000GtV-IX; Wed, 03 Sep 2014 18:17:28 +0300 Message-ID: <540730E5.1080206@FreeBSD.org> Date: Wed, 03 Sep 2014 18:16:53 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Steven Hartland , Peter Wemm Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm References: <201408281950.s7SJo90I047213@svn.freebsd.org> <39211177.i8nn9sHiCx@overcee.wemm.org> <201409021201.15967.jhb@freebsd.org> <5405FD2C.8000901@rice.edu> <54060D1B.6020700@rice.edu> <774F8EEE96EB483DA8ACF533CF7C23F3@multiplay.co.uk> <54062268.9060603@rice.edu> <169C94ED141B435BACEADB04A4824717@multiplay.co.uk> <54070421.9030200@FreeBSD.org> <7FA917F9BB6F45FA84D8408C13359748@multiplay.co.uk> <54072C8E.7030501@FreeBSD.org> In-Reply-To: <54072C8E.7030501@FreeBSD.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, John Baldwin , Alan Cox , svn-src-all@FreeBSD.org, Dmitry Morozovsky , "Matthew D. Fuller" , svn-src-head@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 15:17:32 -0000 on 03/09/2014 17:58 Andriy Gapon said the following: > on 03/09/2014 15:17 Steven Hartland said the following: >> ----- Original Message ----- From: "Andriy Gapon" >> >>> on 03/09/2014 11:09 Steven Hartland said the following: >>>> I'm looking to MFC this change so wanted to check if >>>> anyone had an final feedback / objections? >>> >>> I think that your changes went in a bit prematurely (little review), so perhaps >>> MFC would be premature as well. >> >> Its a change which really needs to make it into 10.1 IMO > > I think that this is the arguable point. > As I've mentioned before I have not noticed, perhaps through the fault of my > own, any reports that users need this change after Alan's pagedaemon fix(es). > Also, there is no confirmation yet that after this change ARC does not give up > its buffers too easily. > >> due to its impact on users so I don't really want to hold >> off too long. >> >> If anyone has any substantiated reason to then off course >> I'll hold off. Based on our parallel conversation I feel a need to clarify my position. The commit in question has multiple changes in it: 1. removal of KVA check, which was later correctly restored for i386 2. addition of DTrace probes 3. zfs_arc_free_target check and all the support code for it So, #1 plus later fixes is obviously correct. #2 is useful and I like it. #3 is what I have great doubts about. All of what I said in the previous emails applies to #3 exclusively. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 15:32:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAA8C4ED; Wed, 3 Sep 2014 15:32:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAF991AB5; Wed, 3 Sep 2014 15:32:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83FWcSA094858; Wed, 3 Sep 2014 15:32:38 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83FWcRg094856; Wed, 3 Sep 2014 15:32:38 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201409031532.s83FWcRg094856@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Wed, 3 Sep 2014 15:32:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271029 - in head/contrib/llvm: lib/Target/ARM patches X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 15:32:39 -0000 Author: sbruno Date: Wed Sep 3 15:32:38 2014 New Revision: 271029 URL: http://svnweb.freebsd.org/changeset/base/271029 Log: Do not direct commit to contrib/llvm. Make the change a patch file instead. Reverts 271025 but still functionally patches it. Original intent is still the same. Pointed out by rdivacky. MFV: Only emit movw on ARMv6T2 Building for the FreeBSD default target ARMv6 was emitting movw ASM on certain test cases (found building qmake4/5 for ARM). Don't do that, moreover, the AS in base doesn't understand this instruction for this target. One would need to use --integrated-as to get this to build if desired. http://llvm.org/viewvc/llvm-project?view=revision&revision=216989 Submitted by: ian Reviewed by: dim Obtained from: llvm.org MFC after: 2 days Relnotes: yes Added: head/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Modified: head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Modified: head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td ============================================================================== --- head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Wed Sep 3 15:08:33 2014 (r271028) +++ head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Wed Sep 3 15:32:38 2014 (r271029) @@ -3248,8 +3248,7 @@ def : ARMPat<(ARMaddc GPR:$src, imm0_655 def : ARMPat<(ARMadde GPR:$src, so_imm_not:$imm, CPSR), (SBCri GPR:$src, so_imm_not:$imm)>; def : ARMPat<(ARMadde GPR:$src, imm0_65535_neg:$imm, CPSR), - (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>, - Requires<[IsARM, HasV6T2]>; + (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>; // Note: These are implemented in C++ code, because they have to generate // ADD/SUBrs instructions, which use a complex pattern that a xform function Added: head/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Wed Sep 3 15:32:38 2014 (r271029) @@ -0,0 +1,14 @@ +Index: lib/Target/ARM/ARMInstrInfo.td +=================================================================== +--- lib/Target/ARM/ARMInstrInfo.td (revision 271024) ++++ lib/Target/ARM/ARMInstrInfo.td (revision 271026) +@@ -3248,7 +3248,8 @@ + def : ARMPat<(ARMadde GPR:$src, so_imm_not:$imm, CPSR), + (SBCri GPR:$src, so_imm_not:$imm)>; + def : ARMPat<(ARMadde GPR:$src, imm0_65535_neg:$imm, CPSR), +- (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>; ++ (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>, ++ Requires<[IsARM, HasV6T2]>; + + // Note: These are implemented in C++ code, because they have to generate + // ADD/SUBrs instructions, which use a complex pattern that a xform function From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 15:48:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A486C8C; Wed, 3 Sep 2014 15:48:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75E0E1C69; Wed, 3 Sep 2014 15:48:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83Fm8jb000429; Wed, 3 Sep 2014 15:48:08 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83Fm8k0000428; Wed, 3 Sep 2014 15:48:08 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201409031548.s83Fm8k0000428@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Wed, 3 Sep 2014 15:48:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271030 - head/contrib/llvm/lib/Target/ARM X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 15:48:08 -0000 Author: sbruno Date: Wed Sep 3 15:48:07 2014 New Revision: 271030 URL: http://svnweb.freebsd.org/changeset/base/271030 Log: Apparently, the patch commited in svn r271029 doesn't actually do anyting, so we still need to modify the code in place. Pointed out by emaste. MFC after: 2 days Relnotes: yes Modified: head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Modified: head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td ============================================================================== --- head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Wed Sep 3 15:32:38 2014 (r271029) +++ head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Wed Sep 3 15:48:07 2014 (r271030) @@ -3248,7 +3248,8 @@ def : ARMPat<(ARMaddc GPR:$src, imm0_655 def : ARMPat<(ARMadde GPR:$src, so_imm_not:$imm, CPSR), (SBCri GPR:$src, so_imm_not:$imm)>; def : ARMPat<(ARMadde GPR:$src, imm0_65535_neg:$imm, CPSR), - (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>; + (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>, + Requires<[IsARM, HasV6T2]>; // Note: These are implemented in C++ code, because they have to generate // ADD/SUBrs instructions, which use a complex pattern that a xform function From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 15:48:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B00F0EBE; Wed, 3 Sep 2014 15:48:58 +0000 (UTC) Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 558351C86; Wed, 3 Sep 2014 15:48:57 +0000 (UTC) Received: by mail-wi0-f178.google.com with SMTP id r20so10047422wiv.11 for ; Wed, 03 Sep 2014 08:48:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=XSA/dVEeGGg1FOnnS/kc4TprmChoekUeqRZnW7a9ybI=; b=t4kq5RxubVbsKMD1nakwnvIVFBKBdI1mD8NRR5eMfFZ+3AzSf6OTr1PZwzlhhb3Rfo Q7zelEbkFPvFM2cXXK7O4aB9bVrhTbtYq/5UYnSHbG7cdEzZyMhl4BSycBpvwkK6WKhc IGdgZOKFYrZ+/T6QX/5cLpTymxPlho1f6cx6lZoHqYPWg1984jKTj7Uj8sWXSvOt5A5p j9+2CTKoNGI0fB+PNeW8i4SxFPg1HhC5EkQsJgrKsVtaWy5P8BE3Y5CA+Xqnkyh6YeUJ HQyRigYLwkx4fzsEIs8BbGII1Fq6MNWQqq9Yk6xJMR13RgQGyY2pzVne0VhM/M1gazOL x5BA== X-Received: by 10.194.58.83 with SMTP id o19mr49103998wjq.20.1409759332963; Wed, 03 Sep 2014 08:48:52 -0700 (PDT) Received: from [172.16.1.30] (124.Red-83-33-238.dynamicIP.rima-tde.net. [83.33.238.124]) by mx.google.com with ESMTPSA id w10sm5403760wif.15.2014.09.03.08.48.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Sep 2014 08:48:52 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Message-ID: <5407385B.1000005@FreeBSD.org> Date: Wed, 03 Sep 2014 17:48:43 +0200 From: =?windows-1252?Q?Roger_Pau_Monn=E9?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: John-Mark Gurney Subject: Re: svn commit: r269814 - head/sys/dev/xen/blkfront References: <53e8e31e.2179.30c1c657@svn.freebsd.org> <53FF7386.3050804@FreeBSD.org> <20140828184515.GV71691@funkthat.com> <53FF7BC4.6050801@FreeBSD.org> <5400BDC7.7020902@FreeBSD.org> <54058E1E.4050907@FreeBSD.org> <20140902171841.GX71691@funkthat.com> In-Reply-To: <20140902171841.GX71691@funkthat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: src-committers@FreeBSD.org, Alexander Motin , scottl@FreeBSD.org, cperciva@FreeBSD.org, svn-src-head@FreeBSD.org, gibbs@freebsd.org, svn-src-all@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 15:48:58 -0000 El 02/09/14 a les 19.18, John-Mark Gurney ha escrit: > Roger Pau Monn wrote this message on Tue, Sep 02, 2014 at 11:30 +0200: >> El 29/08/14 a les 19.52, Roger Pau Monné ha escrit: >>> El 28/08/14 a les 20.58, Alexander Motin ha escrit: >>>> On 28.08.2014 21:45, John-Mark Gurney wrote: >>>>> Alexander Motin wrote this message on Thu, Aug 28, 2014 at 21:23 +0300: >>>>>> Hi, Roger. >>>>>> >>>>>> It looks to me like this commit does not work as it should. I got >>>>>> problem when I just tried `newfs /dev/ada0 ; mount /dev/ada0 /mnt`. >>>>>> Somehow newfs does not produce valid filesystem. Problem is reliably >>>>>> repeatable and reverting this commit fixes it. >>>>>> >>>>>> I found at least one possible cause there: If original data buffer is >>>>>> unmapped, misaligned and not physically contiguous, then present x86 >>>>>> bus_dmamap_load_bio() implementation will process each physically >>>>>> contiguous segment separately. Due to the misalignment first and last >>>>>> physical segments may have size not multiple to 512 bytes. Since each >>>>>> segment processed separately, they are not joined together, and >>>>>> xbd_queue_cb() is getting segments not multiple to 512 bytes. Attempt to >>>>>> convert them to exact number of sectors in the driver cause data corruption. >>>>> >>>>> Are you sure this isn't a problem w/ the tag not properly specifying >>>>> the correct alignement? >>>> >>>> I don't know how to specify it stronger then this: >>>> error = bus_dma_tag_create( >>>> bus_get_dma_tag(sc->xbd_dev), /* parent */ >>>> 512, PAGE_SIZE, /* algnmnt, boundary */ >>>> BUS_SPACE_MAXADDR, /* lowaddr */ >>>> BUS_SPACE_MAXADDR, /* highaddr */ >>>> NULL, NULL, /* filter, filterarg */ >>>> sc->xbd_max_request_size, >>>> sc->xbd_max_request_segments, >>>> PAGE_SIZE, /* maxsegsize */ >>>> BUS_DMA_ALLOCNOW, /* flags */ >>>> busdma_lock_mutex, /* lockfunc */ >>>> &sc->xbd_io_lock, /* lockarg */ >>>> &sc->xbd_io_dmat); >>>> >>>>> Also, I don't think there is a way for busdma >>>>> to say that you MUST have a segment be a multiple of 512, though you >>>>> could use a 512 boundary, but that would force all segments to only be >>>>> 512 bytes... >>>> >>>> As I understand, that is mandatory requirement for this "hardware". >>>> Alike 4K alignment requirement also exist at least for SDHCI, and IIRC >>>> UHCI/OHCI hardware. Even AHCI requires both segment addresses and >>>> lengths to be even. >>>> >>>> I may be wrong, but I think it is quite likely that hardware that >>>> requires segment address alignment quite likely will have the same >>>> requirements for segments length. >> >> Hello, >> >> I have the following fix, which makes sure the total length and the >> size of each segment is aligned. I'm not very knowledgeable of the >> busdma code, so someone has to review it. > > I feel that this alignment should only be enforced via a new option on > the tag... I don't see how alignment and segment size should be > conflated... I could totally see a device that requires an alignement > of 8 bytes, but has a segment size of 16, or vice versa, and requiring > them to be the same means we will bounce unnecesarily... > > cc'd scottl since he knows this code better than I... and cperciva as > he touched it for similar reasons.. > > Oh, I just found PR 152818, where cperciva did a similar fix to > bounce_bus_dmamap_load_buffer for the exact same reason... It was > committed in r216194... Since Xen blkfront seems to be the only driver to have such segment size requirements, it might be best to just fix blkfront to always roundup segment size to 512, like the following: diff --git a/sys/dev/xen/blkfront/blkfront.c b/sys/dev/xen/blkfront/blkfront.c index 26b8f09..2d284d9 100644 --- a/sys/dev/xen/blkfront/blkfront.c +++ b/sys/dev/xen/blkfront/blkfront.c @@ -209,7 +209,8 @@ xbd_queue_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) buffer_ma = segs->ds_addr; fsect = (buffer_ma & PAGE_MASK) >> XBD_SECTOR_SHFT; - lsect = fsect + (segs->ds_len >> XBD_SECTOR_SHFT) - 1; + lsect = fsect + (roundup2(segs->ds_len, 512) + >> XBD_SECTOR_SHFT) - 1; KASSERT(lsect <= 7, ("XEN disk driver data cannot " "cross a page boundary")); >> --- >> diff --git a/sys/x86/x86/busdma_bounce.c b/sys/x86/x86/busdma_bounce.c >> index d1c75f8..688f559 100644 >> --- a/sys/x86/x86/busdma_bounce.c >> +++ b/sys/x86/x86/busdma_bounce.c >> @@ -620,6 +620,8 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map, >> segs = dmat->segments; >> >> if ((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) { >> + /* Make sure buflen is aligned */ >> + buflen = roundup2(buflen, dmat->common.alignment); >> _bus_dmamap_count_phys(dmat, map, buf, buflen, flags); >> if (map->pagesneeded != 0) { >> error = _bus_dmamap_reserve_pages(dmat, map, flags); >> @@ -634,6 +636,7 @@ bounce_bus_dmamap_load_phys(bus_dma_tag_t dmat, bus_dmamap_t map, >> if (((dmat->bounce_flags & BUS_DMA_COULD_BOUNCE) != 0) && >> map->pagesneeded != 0 && >> bus_dma_run_filter(&dmat->common, curaddr)) { >> + sgsize = roundup2(sgsize, dmat->common.alignment); >> sgsize = MIN(sgsize, PAGE_SIZE); >> curaddr = add_bounce_page(dmat, map, 0, curaddr, >> sgsize); >> > > Doesn't this same change need to be made to _bus_dmamap_count_phys so that > the cound will be correct? We already roundup the buflen to the alignement value before calling _bus_dmamap_count_phys, so every segment should have a size that's a multiple of alignement. > Also, make sure you review the other arch's bounce implementations, as > they were often copied from the x86 one... > From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 16:03:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC5C2640; Wed, 3 Sep 2014 16:03:21 +0000 (UTC) Received: from mail-la0-x22a.google.com (mail-la0-x22a.google.com [IPv6:2a00:1450:4010:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1AA2E1E71; Wed, 3 Sep 2014 16:03:19 +0000 (UTC) Received: by mail-la0-f42.google.com with SMTP id mc6so10143727lab.1 for ; Wed, 03 Sep 2014 09:03:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=/4P1Fuosth6xxyAGnExTlaVK46ATL8oTYWyyhzOfwwA=; b=JZg0WMQOTRjSFksX6nXkJM713ztT/brfF+MSX5wPxdSUgJ8hH7Ft6HBsbTPWK1QvTI yfMAI7PLffCIgcNH83Cw0Hx2/FWm1BT2ACvS1XaaYTBNzD8WTh0ueykwaOhR6UhCZKEB xmgqHtwV8WV7HOZV0bkvzR6CDC/ZjG9yKqyK85Fq0SaIbxjBCL0/z0IjGxtQ2uEX745a oEIGVL5V04jne+rOfl20HAIWn6Wl+zBBjL6yKUsxD0NP4W+7uLKQKl6JcWwXjEEci6/E DsDS1x0uAZfFC2Y0UzXjsOjUIfgZTf6Ra621oScb1+nAHfHmRX92al2HwsQtznfopyWt Xeqw== X-Received: by 10.152.4.9 with SMTP id g9mr43019213lag.14.1409760198036; Wed, 03 Sep 2014 09:03:18 -0700 (PDT) Received: from mavbook.mavhome.dp.ua ([134.249.139.101]) by mx.google.com with ESMTPSA id sr4sm1300574lac.39.2014.09.03.09.03.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Sep 2014 09:03:17 -0700 (PDT) Sender: Alexander Motin Message-ID: <54073BC2.1000703@FreeBSD.org> Date: Wed, 03 Sep 2014 19:03:14 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: =?windows-1252?Q?Roger_Pau_Monn=E9?= , John-Mark Gurney Subject: Re: svn commit: r269814 - head/sys/dev/xen/blkfront References: <53e8e31e.2179.30c1c657@svn.freebsd.org> <53FF7386.3050804@FreeBSD.org> <20140828184515.GV71691@funkthat.com> <53FF7BC4.6050801@FreeBSD.org> <5400BDC7.7020902@FreeBSD.org> <54058E1E.4050907@FreeBSD.org> <20140902171841.GX71691@funkthat.com> <5407385B.1000005@FreeBSD.org> In-Reply-To: <5407385B.1000005@FreeBSD.org> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, scottl@FreeBSD.org, cperciva@FreeBSD.org, svn-src-head@FreeBSD.org, gibbs@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:03:21 -0000 On 03.09.2014 18:48, Roger Pau Monné wrote: > El 02/09/14 a les 19.18, John-Mark Gurney ha escrit: >> Roger Pau Monn wrote this message on Tue, Sep 02, 2014 at 11:30 +0200: >>> El 29/08/14 a les 19.52, Roger Pau Monné ha escrit: >>>> El 28/08/14 a les 20.58, Alexander Motin ha escrit: >>>>> On 28.08.2014 21:45, John-Mark Gurney wrote: >>>>>> Alexander Motin wrote this message on Thu, Aug 28, 2014 at 21:23 +0300: >>>>>>> Hi, Roger. >>>>>>> >>>>>>> It looks to me like this commit does not work as it should. I got >>>>>>> problem when I just tried `newfs /dev/ada0 ; mount /dev/ada0 /mnt`. >>>>>>> Somehow newfs does not produce valid filesystem. Problem is reliably >>>>>>> repeatable and reverting this commit fixes it. >>>>>>> >>>>>>> I found at least one possible cause there: If original data buffer is >>>>>>> unmapped, misaligned and not physically contiguous, then present x86 >>>>>>> bus_dmamap_load_bio() implementation will process each physically >>>>>>> contiguous segment separately. Due to the misalignment first and last >>>>>>> physical segments may have size not multiple to 512 bytes. Since each >>>>>>> segment processed separately, they are not joined together, and >>>>>>> xbd_queue_cb() is getting segments not multiple to 512 bytes. Attempt to >>>>>>> convert them to exact number of sectors in the driver cause data corruption. >>>>>> >>>>>> Are you sure this isn't a problem w/ the tag not properly specifying >>>>>> the correct alignement? >>>>> >>>>> I don't know how to specify it stronger then this: >>>>> error = bus_dma_tag_create( >>>>> bus_get_dma_tag(sc->xbd_dev), /* parent */ >>>>> 512, PAGE_SIZE, /* algnmnt, boundary */ >>>>> BUS_SPACE_MAXADDR, /* lowaddr */ >>>>> BUS_SPACE_MAXADDR, /* highaddr */ >>>>> NULL, NULL, /* filter, filterarg */ >>>>> sc->xbd_max_request_size, >>>>> sc->xbd_max_request_segments, >>>>> PAGE_SIZE, /* maxsegsize */ >>>>> BUS_DMA_ALLOCNOW, /* flags */ >>>>> busdma_lock_mutex, /* lockfunc */ >>>>> &sc->xbd_io_lock, /* lockarg */ >>>>> &sc->xbd_io_dmat); >>>>> >>>>>> Also, I don't think there is a way for busdma >>>>>> to say that you MUST have a segment be a multiple of 512, though you >>>>>> could use a 512 boundary, but that would force all segments to only be >>>>>> 512 bytes... >>>>> >>>>> As I understand, that is mandatory requirement for this "hardware". >>>>> Alike 4K alignment requirement also exist at least for SDHCI, and IIRC >>>>> UHCI/OHCI hardware. Even AHCI requires both segment addresses and >>>>> lengths to be even. >>>>> >>>>> I may be wrong, but I think it is quite likely that hardware that >>>>> requires segment address alignment quite likely will have the same >>>>> requirements for segments length. >>> >>> Hello, >>> >>> I have the following fix, which makes sure the total length and the >>> size of each segment is aligned. I'm not very knowledgeable of the >>> busdma code, so someone has to review it. >> >> I feel that this alignment should only be enforced via a new option on >> the tag... I don't see how alignment and segment size should be >> conflated... I could totally see a device that requires an alignement >> of 8 bytes, but has a segment size of 16, or vice versa, and requiring >> them to be the same means we will bounce unnecesarily... >> >> cc'd scottl since he knows this code better than I... and cperciva as >> he touched it for similar reasons.. >> >> Oh, I just found PR 152818, where cperciva did a similar fix to >> bounce_bus_dmamap_load_buffer for the exact same reason... It was >> committed in r216194... > > Since Xen blkfront seems to be the only driver to have such segment > size requirements, No, it is not. I've already posted other examples I can recall: SDHCI, UHCI/OHCI and AHCI. Their limitations are different and less strict, but still may need handling. For SDHCI, since it is quite slow and has many other bugs, I practically implemented custom buffer bouncing. AHCI I suppose works only because limitation is only for even addresses, and odd ones happen extremely rarely (does not happen). For USB I am not sure, but at least umass driver does not support unmapped I/O. > it might be best to just fix blkfront to always > roundup segment size to 512, like the following: I think some coffee is needed here. ;) Rounding addresses won't make data properly aligned. Some copy is unavoidable in such cases. It would be good if it was done properly by default buffer bouncer. > diff --git a/sys/dev/xen/blkfront/blkfront.c b/sys/dev/xen/blkfront/blkfront.c > index 26b8f09..2d284d9 100644 > --- a/sys/dev/xen/blkfront/blkfront.c > +++ b/sys/dev/xen/blkfront/blkfront.c > @@ -209,7 +209,8 @@ xbd_queue_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) > > buffer_ma = segs->ds_addr; > fsect = (buffer_ma & PAGE_MASK) >> XBD_SECTOR_SHFT; > - lsect = fsect + (segs->ds_len >> XBD_SECTOR_SHFT) - 1; > + lsect = fsect + (roundup2(segs->ds_len, 512) > + >> XBD_SECTOR_SHFT) - 1; > > KASSERT(lsect <= 7, ("XEN disk driver data cannot " > "cross a page boundary")); -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 16:16:30 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F3ABBA2; Wed, 3 Sep 2014 16:16:30 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF6661FC4; Wed, 3 Sep 2014 16:16:29 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XPDEN-00028F-51; Wed, 03 Sep 2014 16:16:23 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s83GGLrB008496; Wed, 3 Sep 2014 10:16:21 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18JnAYrtXkqqIeDf/I6/jOg X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: svn commit: r269814 - head/sys/dev/xen/blkfront From: Ian Lepore To: Alexander Motin In-Reply-To: <54073BC2.1000703@FreeBSD.org> References: <53e8e31e.2179.30c1c657@svn.freebsd.org> <53FF7386.3050804@FreeBSD.org> <20140828184515.GV71691@funkthat.com> <53FF7BC4.6050801@FreeBSD.org> <5400BDC7.7020902@FreeBSD.org> <54058E1E.4050907@FreeBSD.org> <20140902171841.GX71691@funkthat.com> <5407385B.1000005@FreeBSD.org> <54073BC2.1000703@FreeBSD.org> Content-Type: text/plain; charset="ISO-8859-1" Date: Wed, 03 Sep 2014 10:16:21 -0600 Message-ID: <1409760981.1150.284.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by ilsoft.org id s83GGLrB008496 Cc: src-committers@FreeBSD.org, John-Mark Gurney , Roger Pau =?ISO-8859-1?Q?Monn=E9?= , scottl@FreeBSD.org, cperciva@FreeBSD.org, svn-src-head@FreeBSD.org, gibbs@freebsd.org, svn-src-all@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:16:30 -0000 On Wed, 2014-09-03 at 19:03 +0300, Alexander Motin wrote: > On 03.09.2014 18:48, Roger Pau Monn=E9 wrote: > > El 02/09/14 a les 19.18, John-Mark Gurney ha escrit: > >> Roger Pau Monn wrote this message on Tue, Sep 02, 2014 at 11:30 +020= 0: > >>> El 29/08/14 a les 19.52, Roger Pau Monn=E9 ha escrit: > >>>> El 28/08/14 a les 20.58, Alexander Motin ha escrit: > >>>>> On 28.08.2014 21:45, John-Mark Gurney wrote: > >>>>>> Alexander Motin wrote this message on Thu, Aug 28, 2014 at 21:23= +0300: > >>>>>>> Hi, Roger. > >>>>>>> > >>>>>>> It looks to me like this commit does not work as it should. I g= ot > >>>>>>> problem when I just tried `newfs /dev/ada0 ; mount /dev/ada0 /m= nt`. > >>>>>>> Somehow newfs does not produce valid filesystem. Problem is rel= iably > >>>>>>> repeatable and reverting this commit fixes it. > >>>>>>> > >>>>>>> I found at least one possible cause there: If original data buf= fer is > >>>>>>> unmapped, misaligned and not physically contiguous, then presen= t x86 > >>>>>>> bus_dmamap_load_bio() implementation will process each physical= ly > >>>>>>> contiguous segment separately. Due to the misalignment first an= d last > >>>>>>> physical segments may have size not multiple to 512 bytes. Sinc= e each > >>>>>>> segment processed separately, they are not joined together, and > >>>>>>> xbd_queue_cb() is getting segments not multiple to 512 bytes. A= ttempt to > >>>>>>> convert them to exact number of sectors in the driver cause dat= a corruption. > >>>>>> > >>>>>> Are you sure this isn't a problem w/ the tag not properly specif= ying > >>>>>> the correct alignement?=20 > >>>>> > >>>>> I don't know how to specify it stronger then this: > >>>>> error =3D bus_dma_tag_create( > >>>>> bus_get_dma_tag(sc->xbd_dev), /* parent */ > >>>>> 512, PAGE_SIZE, /* algnmnt, bound= ary */ > >>>>> BUS_SPACE_MAXADDR, /* lowaddr */ > >>>>> BUS_SPACE_MAXADDR, /* highaddr */ > >>>>> NULL, NULL, /* filter, filter= arg */ > >>>>> sc->xbd_max_request_size, > >>>>> sc->xbd_max_request_segments, > >>>>> PAGE_SIZE, /* maxsegsize */ > >>>>> BUS_DMA_ALLOCNOW, /* flags */ > >>>>> busdma_lock_mutex, /* lockfunc */ > >>>>> &sc->xbd_io_lock, /* lockarg */ > >>>>> &sc->xbd_io_dmat); > >>>>> > >>>>>> Also, I don't think there is a way for busdma > >>>>>> to say that you MUST have a segment be a multiple of 512, though= you > >>>>>> could use a 512 boundary, but that would force all segments to o= nly be > >>>>>> 512 bytes... > >>>>> > >>>>> As I understand, that is mandatory requirement for this "hardware= ". > >>>>> Alike 4K alignment requirement also exist at least for SDHCI, and= IIRC > >>>>> UHCI/OHCI hardware. Even AHCI requires both segment addresses and > >>>>> lengths to be even. > >>>>> > >>>>> I may be wrong, but I think it is quite likely that hardware that > >>>>> requires segment address alignment quite likely will have the sam= e > >>>>> requirements for segments length. > >>> > >>> Hello, > >>> > >>> I have the following fix, which makes sure the total length and the= =20 > >>> size of each segment is aligned. I'm not very knowledgeable of the=20 > >>> busdma code, so someone has to review it. > >> > >> I feel that this alignment should only be enforced via a new option = on > >> the tag... I don't see how alignment and segment size should be > >> conflated... I could totally see a device that requires an aligneme= nt > >> of 8 bytes, but has a segment size of 16, or vice versa, and requiri= ng > >> them to be the same means we will bounce unnecesarily... > >> > >> cc'd scottl since he knows this code better than I... and cperciva a= s > >> he touched it for similar reasons.. > >> > >> Oh, I just found PR 152818, where cperciva did a similar fix to > >> bounce_bus_dmamap_load_buffer for the exact same reason... It was > >> committed in r216194... > >=20 > > Since Xen blkfront seems to be the only driver to have such segment=20 > > size requirements,=20 >=20 > No, it is not. I've already posted other examples I can recall: SDHCI, > UHCI/OHCI and AHCI. Their limitations are different and less strict, bu= t > still may need handling. For SDHCI, since it is quite slow and has many > other bugs, I practically implemented custom buffer bouncing. AHCI I > suppose works only because limitation is only for even addresses, and > odd ones happen extremely rarely (does not happen). For USB I am not > sure, but at least umass driver does not support unmapped I/O. >=20 > > it might be best to just fix blkfront to always=20 > > roundup segment size to 512, like the following: >=20 > I think some coffee is needed here. ;) Rounding addresses won't make > data properly aligned. Some copy is unavoidable in such cases. It would > be good if it was done properly by default buffer bouncer. >=20 And likewise I don't see how rounding up sizes can result in anything other than writing extra garbage to disk. If there is a 512 byte sector's worth of data not aligned to a 512 boundary and crossing a page boundary, the bounce code is going to have to cope with the fact that the second half of the data to be copied may not be physically contiguous, unless there's some rule in the phys bio world that g'tees it is. -- Ian > > diff --git a/sys/dev/xen/blkfront/blkfront.c b/sys/dev/xen/blkfront/b= lkfront.c > > index 26b8f09..2d284d9 100644 > > --- a/sys/dev/xen/blkfront/blkfront.c > > +++ b/sys/dev/xen/blkfront/blkfront.c > > @@ -209,7 +209,8 @@ xbd_queue_cb(void *arg, bus_dma_segment_t *segs, = int nsegs, int error) > > =20 > > buffer_ma =3D segs->ds_addr; > > fsect =3D (buffer_ma & PAGE_MASK) >> XBD_SECTOR_SHFT; > > - lsect =3D fsect + (segs->ds_len >> XBD_SECTOR_SHFT) - 1; > > + lsect =3D fsect + (roundup2(segs->ds_len, 512) > > + >> XBD_SECTOR_SHFT) - 1; > > =20 > > KASSERT(lsect <=3D 7, ("XEN disk driver data cannot " > > "cross a page boundary")); >=20 >=20 From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 16:46:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 531642F0; Wed, 3 Sep 2014 16:46:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E10513C1; Wed, 3 Sep 2014 16:46:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83GkQoJ029090; Wed, 3 Sep 2014 16:46:26 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkQkR029089; Wed, 3 Sep 2014 16:46:26 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkQkR029089@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271031 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:26 -0000 Author: gjb Date: Wed Sep 3 16:46:25 2014 New Revision: 271031 URL: http://svnweb.freebsd.org/changeset/base/271031 Log: Document r269065, iSCSI redirection handling Submitted by: trasz Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 15:48:07 2014 (r271030) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:25 2014 (r271031) @@ -552,6 +552,15 @@ significantly improved its performance and SMP scapability. + The + iSCSI initiator has been updated to + support redirection handling when an + iSCSI device is configured with multiple + IP addresses across different network + interfaces. Previously, clients connecting to + such iSCSI devices could require + additional client-side configuration. + New kernel-based iSCSI target and initiator code took many fixes and performance optimizations. From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 16:46:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36C2A2FB; Wed, 3 Sep 2014 16:46:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22CCF13C2; Wed, 3 Sep 2014 16:46:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83GkS44029133; Wed, 3 Sep 2014 16:46:28 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkR6e029132; Wed, 3 Sep 2014 16:46:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkR6e029132@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271032 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:28 -0000 Author: gjb Date: Wed Sep 3 16:46:27 2014 New Revision: 271032 URL: http://svnweb.freebsd.org/changeset/base/271032 Log: Document r265523, kern.iscsi.fail_on_disconnection Submitted by: trasz Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:25 2014 (r271031) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:27 2014 (r271032) @@ -561,6 +561,14 @@ such iSCSI devices could require additional client-side configuration. + A new + &man.sysctl.8;, + kern.iscsi.fail_on_disconnection, has + been added, which allows iSCSI clients to + remove the attached disk device when the connection to the + target is dropped, where previously I/O would stop until the + connection is restored. + New kernel-based iSCSI target and initiator code took many fixes and performance optimizations. From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 16:46:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C3DD364; Wed, 3 Sep 2014 16:46:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66B1613C3; Wed, 3 Sep 2014 16:46:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83GkUf2029176; Wed, 3 Sep 2014 16:46:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkUJd029175; Wed, 3 Sep 2014 16:46:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkUJd029175@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271033 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:30 -0000 Author: gjb Date: Wed Sep 3 16:46:29 2014 New Revision: 271033 URL: http://svnweb.freebsd.org/changeset/base/271033 Log: Document r265524, iSCSI lock contention optimizations. Submitted by: trasz Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:27 2014 (r271032) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:29 2014 (r271033) @@ -569,6 +569,11 @@ target is dropped, where previously I/O would stop until the connection is restored. + The + iSCSI transmit code has been optimized + to coalesce PDUs and avoid lock + contention. + New kernel-based iSCSI target and initiator code took many fixes and performance optimizations. From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 16:46:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EA6A61B; Wed, 3 Sep 2014 16:46:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A59F13C7; Wed, 3 Sep 2014 16:46:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83GkYn9029279; Wed, 3 Sep 2014 16:46:34 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkYaU029278; Wed, 3 Sep 2014 16:46:34 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkYaU029278@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271035 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:34 -0000 Author: gjb Date: Wed Sep 3 16:46:33 2014 New Revision: 271035 URL: http://svnweb.freebsd.org/changeset/base/271035 Log: Expand r262855 to illustrate how to enable the test suite. Submitted by: jmmv Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:31 2014 (r271034) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:33 2014 (r271035) @@ -865,7 +865,10 @@ location of the file. The ATF test - suite has been updated to version 0.20. + suite has been updated to version 0.20. The test suite is + disabled by default in &os; 10.1, and can be enabled by + adding WITH_TESTS=yes to + &man.src.conf.5;. The libucl library (Unified Configuration Library) has been merged from From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 16:46:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42299936; Wed, 3 Sep 2014 16:46:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E311D13CD; Wed, 3 Sep 2014 16:46:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83Gkbpp029371; Wed, 3 Sep 2014 16:46:37 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkbYY029370; Wed, 3 Sep 2014 16:46:37 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkbYY029370@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271037 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:38 -0000 Author: gjb Date: Wed Sep 3 16:46:37 2014 New Revision: 271037 URL: http://svnweb.freebsd.org/changeset/base/271037 Log: Minor rewording to the r260385 entry. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:35 2014 (r271036) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:37 2014 (r271037) @@ -588,10 +588,10 @@ The &man.geom.4; subsystem has been updated to support I/O direct dispatch. When safety requirements are met, it - allows to avoid passing I/O requests to GEOM + enables avoiding passing I/O requests to GEOM g_up/g_down thread, - executing them directly in the caller context. That allows - to avoid CPU bottlenecks in + executing them directly in the caller context, avoiding + CPU bottlenecks in g_up/g_down threads, plus avoid several context switches per I/O. From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 16:46:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D5CC4E2; Wed, 3 Sep 2014 16:46:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48FB513C4; Wed, 3 Sep 2014 16:46:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83GkWkY029224; Wed, 3 Sep 2014 16:46:32 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkW2n029223; Wed, 3 Sep 2014 16:46:32 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkW2n029223@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271034 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:32 -0000 Author: gjb Date: Wed Sep 3 16:46:31 2014 New Revision: 271034 URL: http://svnweb.freebsd.org/changeset/base/271034 Log: Document r265524, iSCSI performance optimizations. Submitted by: trasz Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:29 2014 (r271033) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:31 2014 (r271034) @@ -574,6 +574,13 @@ to coalesce PDUs and avoid lock contention. + Several performance optimizations have been + made to the iSCSI subsystem, including + deferring wakeup until enough data has been received to + read or write a file, reducing CPU usage + and throughput performance with large I/O workloads. + New kernel-based iSCSI target and initiator code took many fixes and performance optimizations. From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 16:46:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26D48744; Wed, 3 Sep 2014 16:46:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 125E513C8; Wed, 3 Sep 2014 16:46:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83GkZQF029326; Wed, 3 Sep 2014 16:46:35 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkZp8029325; Wed, 3 Sep 2014 16:46:35 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkZp8029325@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271036 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:36 -0000 Author: gjb Date: Wed Sep 3 16:46:35 2014 New Revision: 271036 URL: http://svnweb.freebsd.org/changeset/base/271036 Log: Remove a generalized sentence regarding iSCSI updates that should be covered by the past few commits. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:33 2014 (r271035) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:35 2014 (r271036) @@ -580,9 +580,6 @@ deferring wakeup until enough data has been received to read or write a file, reducing CPU usage and throughput performance with large I/O workloads. - - New kernel-based iSCSI target and initiator code took - many fixes and performance optimizations. From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 16:46:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81CF3C97; Wed, 3 Sep 2014 16:46:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CC4A13D4; Wed, 3 Sep 2014 16:46:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83Gkid0029510; Wed, 3 Sep 2014 16:46:44 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkiAi029508; Wed, 3 Sep 2014 16:46:44 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkiAi029508@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271040 - in stable/10/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:44 -0000 Author: gjb Date: Wed Sep 3 16:46:43 2014 New Revision: 271040 URL: http://svnweb.freebsd.org/changeset/base/271040 Log: Document r270997, zdb(8) included in /rescue. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/10/release/doc/share/xml/vendor.ent Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:41 2014 (r271039) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:43 2014 (r271040) @@ -1177,6 +1177,13 @@ facility has been added to the &man.pam.group.8; module. + The + &man.zdb.8; utility is now included in the set of applications + installed in the /rescue environment, making it + possible to examine &man.zfs.8; filesystems when /usr is unavailable. + <filename>/etc/rc.d</filename> Scripts Modified: stable/10/release/doc/share/xml/vendor.ent ============================================================================== --- stable/10/release/doc/share/xml/vendor.ent Wed Sep 3 16:46:41 2014 (r271039) +++ stable/10/release/doc/share/xml/vendor.ent Wed Sep 3 16:46:43 2014 (r271040) @@ -10,4 +10,6 @@ + + From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 16:46:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FA009F1; Wed, 3 Sep 2014 16:46:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C790813CF; Wed, 3 Sep 2014 16:46:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83Gkd8n029416; Wed, 3 Sep 2014 16:46:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkdYF029415; Wed, 3 Sep 2014 16:46:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkdYF029415@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271038 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:40 -0000 Author: gjb Date: Wed Sep 3 16:46:39 2014 New Revision: 271038 URL: http://svnweb.freebsd.org/changeset/base/271038 Log: Document r270892, autofs(5) Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:37 2014 (r271037) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:39 2014 (r271038) @@ -839,6 +839,16 @@ multi-threaded soft updates. Previously, soft updates were handled by a single thread, and as of this change, now have one thread per FFS mountpoint. + + The + new filesystem automount facility, &man.autofs.5;, has been + merged from &os;-CURRENT. The new &man.autofs.5; facility + is similar to that found in other &unix;-like operating + systems, such as OS X™ and Solaris™. The + &man.autofs.5; facility uses a &sun;-compatible + &man.auto.master.5; configuration file, and is administered + with the &man.automount.8; userland utility, and the + &man.automountd.8; and &man.autounmountd.8; daemons. From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 16:46:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B590B50; Wed, 3 Sep 2014 16:46:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1726413D2; Wed, 3 Sep 2014 16:46:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83GkfGY029464; Wed, 3 Sep 2014 16:46:41 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkfmC029460; Wed, 3 Sep 2014 16:46:41 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkfmC029460@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271039 - in stable/10/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:42 -0000 Author: gjb Date: Wed Sep 3 16:46:41 2014 New Revision: 271039 URL: http://svnweb.freebsd.org/changeset/base/271039 Log: Document r270810, hptnr(4) update to 1.0.1. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml stable/10/release/doc/share/xml/vendor.ent Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:39 2014 (r271038) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:41 2014 (r271039) @@ -757,6 +757,10 @@ integration for better performance. + + The &man.hptnr.4; driver has been + updated to version 1.0.1. Modified: stable/10/release/doc/share/xml/vendor.ent ============================================================================== --- stable/10/release/doc/share/xml/vendor.ent Wed Sep 3 16:46:39 2014 (r271038) +++ stable/10/release/doc/share/xml/vendor.ent Wed Sep 3 16:46:41 2014 (r271039) @@ -9,3 +9,5 @@ --> + + From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 16:46:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A675DA5; Wed, 3 Sep 2014 16:46:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52FDD13D6; Wed, 3 Sep 2014 16:46:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83Gkk4J029552; Wed, 3 Sep 2014 16:46:46 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GkknR029551; Wed, 3 Sep 2014 16:46:46 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031646.s83GkknR029551@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:46:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271041 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:46:46 -0000 Author: gjb Date: Wed Sep 3 16:46:45 2014 New Revision: 271041 URL: http://svnweb.freebsd.org/changeset/base/271041 Log: Document r270890, pathchk(1): Ensure bytes >= 128 are considered non-portable characters. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:43 2014 (r271040) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:45 2014 (r271041) @@ -1177,6 +1177,10 @@ facility has been added to the &man.pam.group.8; module. + The &man.pathchk.1; utility has been + updated to ensure bytes greater than or equal to 128 are + considered non-portable. + The &man.zdb.8; utility is now included in the set of applications installed in the Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F581FEB; Wed, 3 Sep 2014 16:48:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A5A1143C; Wed, 3 Sep 2014 16:48:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83GmXfZ029916; Wed, 3 Sep 2014 16:48:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83GmXkJ029915; Wed, 3 Sep 2014 16:48:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031648.s83GmXkJ029915@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 16:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271042 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 16:48:33 -0000 Author: gjb Date: Wed Sep 3 16:48:33 2014 New Revision: 271042 URL: http://svnweb.freebsd.org/changeset/base/271042 Log: Minor rewording to the r260387 entry. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:46:45 2014 (r271041) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 16:48:33 2014 (r271042) @@ -601,9 +601,9 @@ The &man.cam.4; subsystem has been updated to support - finer-grained locking, direct dispatch and multi-queue. - Combined with &man.geom.4; direct dispatch that allows to - reduce lock congestion and improve SMP + finer-grained locking, direct dispatch and multi-queue, + which combined with &man.geom.4; direct dispatch, reduces + lock congestion and improves SMP scalability of the SCSI/ATA stack. The &man.geom.8; From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 17:15:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18DC19CB; Wed, 3 Sep 2014 17:15:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 050D418DB; Wed, 3 Sep 2014 17:15:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83HFC8L044050; Wed, 3 Sep 2014 17:15:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83HFC4h044049; Wed, 3 Sep 2014 17:15:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409031715.s83HFC4h044049@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 17:15:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271043 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 17:15:13 -0000 Author: gjb Date: Wed Sep 3 17:15:12 2014 New Revision: 271043 URL: http://svnweb.freebsd.org/changeset/base/271043 Log: Update the autofs(5) manual to reflect it first appeared in FreeBSD 10.1-RELEASE. Submitted by: dhw MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/share/man/man5/autofs.5 Modified: head/share/man/man5/autofs.5 ============================================================================== --- head/share/man/man5/autofs.5 Wed Sep 3 16:48:33 2014 (r271042) +++ head/share/man/man5/autofs.5 Wed Sep 3 17:15:12 2014 (r271043) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 14, 2014 +.Dd September 3, 2014 .Dt AUTOFS 5 .Os .Sh NAME @@ -90,7 +90,7 @@ filesystems specified in The .Nm driver first appeared in -.Fx 10.2 . +.Fx 10.1 . .Sh AUTHORS The .Nm From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 17:26:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A119AE54; Wed, 3 Sep 2014 17:26:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C55F19F8; Wed, 3 Sep 2014 17:26:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83HQl4S048948; Wed, 3 Sep 2014 17:26:47 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83HQlMM048946; Wed, 3 Sep 2014 17:26:47 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409031726.s83HQlMM048946@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 3 Sep 2014 17:26:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271044 - head/tools/tools/tscdrift X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 17:26:47 -0000 Author: jhb Date: Wed Sep 3 17:26:46 2014 New Revision: 271044 URL: http://svnweb.freebsd.org/changeset/base/271044 Log: Import a hackish tool I use to examine the skew of the TSC across CPUs in a system. The tool queries the kernel for its set of CPUs and compares TSC values on each of the additional CPUs to the first CPU in turn. It then outputs a table of simple statistics. Added: head/tools/tools/tscdrift/ head/tools/tools/tscdrift/Makefile (contents, props changed) head/tools/tools/tscdrift/tscdrift.c (contents, props changed) Added: head/tools/tools/tscdrift/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/tscdrift/Makefile Wed Sep 3 17:26:46 2014 (r271044) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +PROG= tscdrift +MAN= +WARNS?= 6 + +LDADD= -lpthread -lm +DPADD= ${LIBPTHREAD} ${LIBM} + +.include Added: head/tools/tools/tscdrift/tscdrift.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/tscdrift/tscdrift.c Wed Sep 3 17:26:46 2014 (r271044) @@ -0,0 +1,193 @@ +/*- + * Copyright (c) 2014 Advanced Computing Technologies LLC + * Written by: John H. Baldwin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define barrier() __asm __volatile("" ::: "memory") + +#define TESTS 1024 + +static volatile int gate; +static volatile uint64_t thread_tsc; + +/* Bind the current thread to the specified CPU. */ +static void +bind_cpu(int cpu) +{ + cpuset_t set; + + CPU_ZERO(&set); + CPU_SET(cpu, &set); + if (cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, sizeof(set), + &set) < 0) + err(1, "cpuset_setaffinity(%d)", cpu); +} + +static void * +thread_main(void *arg) +{ + int cpu, i; + + cpu = (intptr_t)arg; + bind_cpu(cpu); + for (i = 0; i < TESTS; i++) { + gate = 1; + while (gate == 1) + cpu_spinwait(); + barrier(); + + __asm __volatile("lfence"); + thread_tsc = rdtsc(); + + barrier(); + gate = 3; + while (gate == 3) + cpu_spinwait(); + } + return (NULL); +} + +int +main(int ac __unused, char **av __unused) +{ + cpuset_t all_cpus; + int64_t **skew, *aveskew, *minskew, *maxskew; + float *stddev; + double sumsq; + pthread_t child; + uint64_t tsc; + int *cpus; + int error, i, j, ncpu; + + /* + * Find all the CPUs this program is eligible to run on and use + * this as our global set. This means you can use cpuset to + * restrict this program to only run on a subset of CPUs. + */ + if (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, + sizeof(all_cpus), &all_cpus) < 0) + err(1, "cpuset_getaffinity"); + for (ncpu = 0, i = 0; i < CPU_SETSIZE; i++) { + if (CPU_ISSET(i, &all_cpus)) + ncpu++; + } + if (ncpu < 2) + errx(1, "Only one available CPU"); + cpus = calloc(ncpu, sizeof(*cpus)); + skew = calloc(ncpu, sizeof(*skew)); + for (i = 0; i < ncpu; i++) + skew[i] = calloc(TESTS, sizeof(*skew[i])); + for (i = 0, j = 0; i < CPU_SETSIZE; i++) + if (CPU_ISSET(i, &all_cpus)) { + assert(j < ncpu); + cpus[j] = i; + j++; + } + + /* + * We bind this thread to the first CPU and then bind all the + * other threads to other CPUs in turn saving TESTS counts of + * skew calculations. + */ + bind_cpu(cpus[0]); + for (i = 1; i < ncpu; i++) { + error = pthread_create(&child, NULL, thread_main, + (void *)(intptr_t)cpus[i]); + if (error) + errc(1, error, "pthread_create"); + + for (j = 0; j < TESTS; j++) { + while (gate != 1) + cpu_spinwait(); + gate = 2; + barrier(); + + tsc = rdtsc(); + + barrier(); + while (gate != 3) + cpu_spinwait(); + gate = 4; + + skew[i][j] = thread_tsc - tsc; + } + + error = pthread_join(child, NULL); + if (error) + errc(1, error, "pthread_join"); + } + + /* + * Compute average skew for each CPU and output a summary of + * the results. + */ + aveskew = calloc(ncpu, sizeof(*aveskew)); + minskew = calloc(ncpu, sizeof(*minskew)); + maxskew = calloc(ncpu, sizeof(*maxskew)); + stddev = calloc(ncpu, sizeof(*stddev)); + stddev[0] = 0.0; + for (i = 1; i < ncpu; i++) { + sumsq = 0; + minskew[i] = maxskew[i] = skew[i][0]; + for (j = 0; j < TESTS; j++) { + aveskew[i] += skew[i][j]; + if (skew[i][j] < minskew[i]) + minskew[i] = skew[i][j]; + if (skew[i][j] > maxskew[i]) + maxskew[i] = skew[i][j]; + sumsq += (skew[i][j] * skew[i][j]); + } + aveskew[i] /= TESTS; + sumsq /= TESTS; + sumsq -= aveskew[i] * aveskew[i]; + stddev[i] = sqrt(sumsq); + } + + printf("CPU | TSC skew (min/avg/max/stddev)\n"); + printf("----+------------------------------\n"); + for (i = 0; i < ncpu; i++) + printf("%3d | %5jd %5jd %5jd %6.3f\n", cpus[i], + (intmax_t)minskew[i], (intmax_t)aveskew[i], + (intmax_t)maxskew[i], stddev[i]); + return (0); +} From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 17:32:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FE25101; Wed, 3 Sep 2014 17:32:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7BA7E1ABA; Wed, 3 Sep 2014 17:32:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83HWIjr053049; Wed, 3 Sep 2014 17:32:18 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83HWIER053048; Wed, 3 Sep 2014 17:32:18 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409031732.s83HWIER053048@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 3 Sep 2014 17:32:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271045 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 17:32:18 -0000 Author: ian Date: Wed Sep 3 17:32:17 2014 New Revision: 271045 URL: http://svnweb.freebsd.org/changeset/base/271045 Log: Use sh -c '...' to launch the dtb build scripts with env stuff prepended, otherwise it tries to treat the env var stuff as a script file name. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Sep 3 17:26:46 2014 (r271044) +++ head/sys/conf/files Wed Sep 3 17:32:17 2014 (r271045) @@ -14,11 +14,11 @@ acpi_quirks.h optional acpi \ # from the specified source (DTS) file: .dts -> .dtb # fdt_dtb_file optional fdt fdt_dtb_static \ - compile-with "sh MACHINE=${MACHINE} $S/tools/fdt/make_dtb.sh $S ${FDT_DTS_FILE} ${.CURDIR}" \ + compile-with "sh -c 'MACHINE=${MACHINE} $S/tools/fdt/make_dtb.sh $S ${FDT_DTS_FILE} ${.CURDIR}'" \ no-obj no-implicit-rule before-depend \ clean "${FDT_DTS_FILE:R}.dtb" fdt_static_dtb.h optional fdt fdt_dtb_static \ - compile-with "sh MACHINE=${MACHINE} $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ${.CURDIR}" \ + compile-with "sh -c 'MACHINE=${MACHINE} $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ${.CURDIR}'" \ dependency "fdt_dtb_file" \ no-obj no-implicit-rule before-depend \ clean "fdt_static_dtb.h" From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 17:51:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C278499; Wed, 3 Sep 2014 17:51:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16D851CB4; Wed, 3 Sep 2014 17:51:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83Hp4tw061743; Wed, 3 Sep 2014 17:51:04 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83Hp3dw061738; Wed, 3 Sep 2014 17:51:03 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409031751.s83Hp3dw061738@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 3 Sep 2014 17:51:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271046 - in head/sys: arm/conf arm/xilinx dev/cadence X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 17:51:04 -0000 Author: ian Date: Wed Sep 3 17:51:03 2014 New Revision: 271046 URL: http://svnweb.freebsd.org/changeset/base/271046 Log: Fixes and enhancements for the if_cgem driver... - miibus fixes as suggested by Yonghyeon Pyun. - enable VLAN MTU support. - fix a few WITNESS complaints in cgem_attach(). - have cgem_attach() properly init the ifnet struct before calling mii_attach() to fix panic when using e1000phy. - fix ethernet address changing. - fix transmit queue overflow handling. - tweak receive queue handling to reduce receive overflows. - bring out MAC statistic counters to sysctls. - add e1000phy to config file. - implement receive hang work-around described in reference guide. - change device name from if_cgem to cgem to be consistent with other interfaces. Submitted by: Thomas Skibo Reviewed by: wkoszek, Yonghyeon PYUN Modified: head/sys/arm/conf/ZEDBOARD head/sys/arm/xilinx/files.zynq7 head/sys/dev/cadence/if_cgem.c head/sys/dev/cadence/if_cgem_hw.h Modified: head/sys/arm/conf/ZEDBOARD ============================================================================== --- head/sys/arm/conf/ZEDBOARD Wed Sep 3 17:32:17 2014 (r271045) +++ head/sys/arm/conf/ZEDBOARD Wed Sep 3 17:51:03 2014 (r271046) @@ -72,8 +72,9 @@ options KDB device loop device random device ether -device if_cgem # Zynq-7000 gig ethernet device +device cgem # Zynq-7000 gig ethernet device device mii +device e1000phy device pty device uart device gpio Modified: head/sys/arm/xilinx/files.zynq7 ============================================================================== --- head/sys/arm/xilinx/files.zynq7 Wed Sep 3 17:32:17 2014 (r271045) +++ head/sys/arm/xilinx/files.zynq7 Wed Sep 3 17:51:03 2014 (r271046) @@ -23,7 +23,7 @@ arm/xilinx/zy7_slcr.c standard arm/xilinx/zy7_devcfg.c standard arm/xilinx/zy7_mp.c optional smp -dev/cadence/if_cgem.c optional if_cgem +dev/cadence/if_cgem.c optional cgem dev/sdhci/sdhci_fdt.c optional sdhci arm/xilinx/zy7_ehci.c optional ehci arm/xilinx/uart_dev_cdnc.c optional uart Modified: head/sys/dev/cadence/if_cgem.c ============================================================================== --- head/sys/dev/cadence/if_cgem.c Wed Sep 3 17:32:17 2014 (r271045) +++ head/sys/dev/cadence/if_cgem.c Wed Sep 3 17:51:03 2014 (r271046) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2012-2014 Thomas Skibo + * Copyright (c) 2012-2014 Thomas Skibo * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -82,17 +82,17 @@ __FBSDID("$FreeBSD$"); #define IF_CGEM_NAME "cgem" -#define CGEM_NUM_RX_DESCS 256 /* size of receive descriptor ring */ -#define CGEM_NUM_TX_DESCS 256 /* size of transmit descriptor ring */ +#define CGEM_NUM_RX_DESCS 512 /* size of receive descriptor ring */ +#define CGEM_NUM_TX_DESCS 512 /* size of transmit descriptor ring */ #define MAX_DESC_RING_SIZE (MAX(CGEM_NUM_RX_DESCS*sizeof(struct cgem_rx_desc),\ CGEM_NUM_TX_DESCS*sizeof(struct cgem_tx_desc))) /* Default for sysctl rxbufs. Must be < CGEM_NUM_RX_DESCS of course. */ -#define DEFAULT_NUM_RX_BUFS 64 /* number of receive bufs to queue. */ +#define DEFAULT_NUM_RX_BUFS 256 /* number of receive bufs to queue. */ -#define TX_MAX_DMA_SEGS 4 /* maximum segs in a tx mbuf dma */ +#define TX_MAX_DMA_SEGS 8 /* maximum segs in a tx mbuf dma */ #define CGEM_CKSUM_ASSIST (CSUM_IP | CSUM_TCP | CSUM_UDP | \ CSUM_TCP_IPV6 | CSUM_UDP_IPV6) @@ -102,6 +102,7 @@ struct cgem_softc { struct mtx sc_mtx; device_t dev; device_t miibus; + u_int mii_media_active; /* last active media */ int if_old_flags; struct resource *mem_res; struct resource *irq_res; @@ -124,7 +125,11 @@ struct cgem_softc { int rxring_queued; /* how many rcv bufs queued */ bus_dmamap_t rxring_dma_map; int rxbufs; /* tunable number rcv bufs */ - int rxoverruns; /* rx ring overruns */ + int rxhangwar; /* rx hang work-around */ + u_int rxoverruns; /* rx overruns */ + u_int rxnobufs; /* rx buf ring empty events */ + u_int rxdmamapfails; /* rx dmamap failures */ + uint32_t rx_frames_prev; /* transmit descriptor ring */ struct cgem_tx_desc *txring; @@ -135,6 +140,56 @@ struct cgem_softc { int txring_tl_ptr; /* next xmit mbuf to free */ int txring_queued; /* num xmits segs queued */ bus_dmamap_t txring_dma_map; + u_int txfull; /* tx ring full events */ + u_int txdefrags; /* tx calls to m_defrag() */ + u_int txdefragfails; /* tx m_defrag() failures */ + u_int txdmamapfails; /* tx dmamap failures */ + + /* hardware provided statistics */ + struct cgem_hw_stats { + uint64_t tx_bytes; + uint32_t tx_frames; + uint32_t tx_frames_bcast; + uint32_t tx_frames_multi; + uint32_t tx_frames_pause; + uint32_t tx_frames_64b; + uint32_t tx_frames_65to127b; + uint32_t tx_frames_128to255b; + uint32_t tx_frames_256to511b; + uint32_t tx_frames_512to1023b; + uint32_t tx_frames_1024to1536b; + uint32_t tx_under_runs; + uint32_t tx_single_collisn; + uint32_t tx_multi_collisn; + uint32_t tx_excsv_collisn; + uint32_t tx_late_collisn; + uint32_t tx_deferred_frames; + uint32_t tx_carrier_sense_errs; + + uint64_t rx_bytes; + uint32_t rx_frames; + uint32_t rx_frames_bcast; + uint32_t rx_frames_multi; + uint32_t rx_frames_pause; + uint32_t rx_frames_64b; + uint32_t rx_frames_65to127b; + uint32_t rx_frames_128to255b; + uint32_t rx_frames_256to511b; + uint32_t rx_frames_512to1023b; + uint32_t rx_frames_1024to1536b; + uint32_t rx_frames_undersize; + uint32_t rx_frames_oversize; + uint32_t rx_frames_jabber; + uint32_t rx_frames_fcs_errs; + uint32_t rx_frames_length_errs; + uint32_t rx_symbol_errs; + uint32_t rx_align_errs; + uint32_t rx_resource_errs; + uint32_t rx_overrun_errs; + uint32_t rx_ip_hdr_csum_errs; + uint32_t rx_tcp_csum_errs; + uint32_t rx_udp_csum_errs; + } stats; }; #define RD4(sc, off) (bus_read_4((sc)->mem_res, (off))) @@ -161,6 +216,8 @@ static int cgem_detach(device_t dev); static void cgem_tick(void *); static void cgem_intr(void *); +static void cgem_mediachange(struct cgem_softc *, struct mii_data *); + static void cgem_get_mac(struct cgem_softc *sc, u_char eaddr[]) { @@ -197,10 +254,16 @@ cgem_get_mac(struct cgem_softc *sc, u_ch "random: %02x:%02x:%02x:%02x:%02x:%02x\n", eaddr[0], eaddr[1], eaddr[2], eaddr[3], eaddr[4], eaddr[5]); + } - WR4(sc, CGEM_SPEC_ADDR_LOW(0), (eaddr[3] << 24) | - (eaddr[2] << 16) | (eaddr[1] << 8) | eaddr[0]); - WR4(sc, CGEM_SPEC_ADDR_HI(0), (eaddr[5] << 8) | eaddr[4]); + /* Move address to first slot and zero out the rest. */ + WR4(sc, CGEM_SPEC_ADDR_LOW(0), (eaddr[3] << 24) | + (eaddr[2] << 16) | (eaddr[1] << 8) | eaddr[0]); + WR4(sc, CGEM_SPEC_ADDR_HI(0), (eaddr[5] << 8) | eaddr[4]); + + for (i = 1; i < 4; i++) { + WR4(sc, CGEM_SPEC_ADDR_LOW(i), 0); + WR4(sc, CGEM_SPEC_ADDR_HI(i), 0); } } @@ -426,7 +489,7 @@ cgem_fill_rqueue(struct cgem_softc *sc) if (bus_dmamap_load_mbuf_sg(sc->mbuf_dma_tag, sc->rxring_m_dmamap[sc->rxring_hd_ptr], m, segs, &nsegs, BUS_DMA_NOWAIT)) { - /* XXX: warn? */ + sc->rxdmamapfails++; m_free(m); break; } @@ -455,12 +518,14 @@ static void cgem_recv(struct cgem_softc *sc) { struct ifnet *ifp = sc->ifp; - struct mbuf *m; + struct mbuf *m, *m_hd, **m_tl; uint32_t ctl; CGEM_ASSERT_LOCKED(sc); /* Pick up all packets in which the OWN bit is set. */ + m_hd = NULL; + m_tl = &m_hd; while (sc->rxring_queued > 0 && (sc->rxring[sc->rxring_tl_ptr].addr & CGEM_RXDESC_OWN) != 0) { @@ -497,7 +562,7 @@ cgem_recv(struct cgem_softc *sc) continue; } - /* Hand it off to upper layers. */ + /* Ready it to hand off to upper layers. */ m->m_data += ETHER_ALIGN; m->m_len = (ctl & CGEM_RXDESC_LENGTH_MASK); m->m_pkthdr.rcvif = ifp; @@ -525,11 +590,24 @@ cgem_recv(struct cgem_softc *sc) } } + /* Queue it up for delivery below. */ + *m_tl = m; + m_tl = &m->m_next; + } + + /* Replenish receive buffers. */ + cgem_fill_rqueue(sc); + + /* Unlock and send up packets. */ + CGEM_UNLOCK(sc); + while (m_hd != NULL) { + m = m_hd; + m_hd = m_hd->m_next; + m->m_next = NULL; ifp->if_ipackets++; - CGEM_UNLOCK(sc); (*ifp->if_input)(ifp, m); - CGEM_LOCK(sc); } + CGEM_LOCK(sc); } /* Find completed transmits and free their mbufs. */ @@ -595,6 +673,8 @@ cgem_clean_tx(struct cgem_softc *sc) else sc->txring_tl_ptr++; sc->txring_queued--; + + sc->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; } } @@ -615,16 +695,17 @@ cgem_start_locked(struct ifnet *ifp) for (;;) { /* Check that there is room in the descriptor ring. */ - if (sc->txring_queued >= CGEM_NUM_TX_DESCS - - TX_MAX_DMA_SEGS - 1) { + if (sc->txring_queued >= + CGEM_NUM_TX_DESCS - TX_MAX_DMA_SEGS * 2) { /* Try to make room. */ cgem_clean_tx(sc); /* Still no room? */ - if (sc->txring_queued >= CGEM_NUM_TX_DESCS - - TX_MAX_DMA_SEGS - 1) { + if (sc->txring_queued >= + CGEM_NUM_TX_DESCS - TX_MAX_DMA_SEGS * 2) { ifp->if_drv_flags |= IFF_DRV_OACTIVE; + sc->txfull++; break; } } @@ -643,6 +724,7 @@ cgem_start_locked(struct ifnet *ifp) struct mbuf *m2 = m_defrag(m, M_NOWAIT); if (m2 == NULL) { + sc->txdefragfails++; m_freem(m); continue; } @@ -650,10 +732,12 @@ cgem_start_locked(struct ifnet *ifp) err = bus_dmamap_load_mbuf_sg(sc->mbuf_dma_tag, sc->txring_m_dmamap[sc->txring_hd_ptr], m, segs, &nsegs, BUS_DMA_NOWAIT); + sc->txdefrags++; } if (err) { /* Give up. */ m_freem(m); + sc->txdmamapfails++; continue; } sc->txring_m[sc->txring_hd_ptr] = m; @@ -697,8 +781,10 @@ cgem_start_locked(struct ifnet *ifp) /* Kick the transmitter. */ WR4(sc, CGEM_NET_CTRL, sc->net_ctl_shadow | CGEM_NET_CTRL_START_TX); - } + /* If there is a BPF listener, bounce a copy to to him. */ + ETHER_BPF_MTAP(ifp, m); + } } static void @@ -712,6 +798,71 @@ cgem_start(struct ifnet *ifp) } static void +cgem_poll_hw_stats(struct cgem_softc *sc) +{ + uint32_t n; + + CGEM_ASSERT_LOCKED(sc); + + sc->stats.tx_bytes += RD4(sc, CGEM_OCTETS_TX_BOT); + sc->stats.tx_bytes += (uint64_t)RD4(sc, CGEM_OCTETS_TX_TOP) << 32; + + sc->stats.tx_frames += RD4(sc, CGEM_FRAMES_TX); + sc->stats.tx_frames_bcast += RD4(sc, CGEM_BCAST_FRAMES_TX); + sc->stats.tx_frames_multi += RD4(sc, CGEM_MULTI_FRAMES_TX); + sc->stats.tx_frames_pause += RD4(sc, CGEM_PAUSE_FRAMES_TX); + sc->stats.tx_frames_64b += RD4(sc, CGEM_FRAMES_64B_TX); + sc->stats.tx_frames_65to127b += RD4(sc, CGEM_FRAMES_65_127B_TX); + sc->stats.tx_frames_128to255b += RD4(sc, CGEM_FRAMES_128_255B_TX); + sc->stats.tx_frames_256to511b += RD4(sc, CGEM_FRAMES_256_511B_TX); + sc->stats.tx_frames_512to1023b += RD4(sc, CGEM_FRAMES_512_1023B_TX); + sc->stats.tx_frames_1024to1536b += RD4(sc, CGEM_FRAMES_1024_1518B_TX); + sc->stats.tx_under_runs += RD4(sc, CGEM_TX_UNDERRUNS); + + n = RD4(sc, CGEM_SINGLE_COLL_FRAMES); + sc->stats.tx_single_collisn += n; + sc->ifp->if_collisions += n; + n = RD4(sc, CGEM_MULTI_COLL_FRAMES); + sc->stats.tx_multi_collisn += n; + sc->ifp->if_collisions += n; + n = RD4(sc, CGEM_EXCESSIVE_COLL_FRAMES); + sc->stats.tx_excsv_collisn += n; + sc->ifp->if_collisions += n; + n = RD4(sc, CGEM_LATE_COLL); + sc->stats.tx_late_collisn += n; + sc->ifp->if_collisions += n; + + sc->stats.tx_deferred_frames += RD4(sc, CGEM_DEFERRED_TX_FRAMES); + sc->stats.tx_carrier_sense_errs += RD4(sc, CGEM_CARRIER_SENSE_ERRS); + + sc->stats.rx_bytes += RD4(sc, CGEM_OCTETS_RX_BOT); + sc->stats.rx_bytes += (uint64_t)RD4(sc, CGEM_OCTETS_RX_TOP) << 32; + + sc->stats.rx_frames += RD4(sc, CGEM_FRAMES_RX); + sc->stats.rx_frames_bcast += RD4(sc, CGEM_BCAST_FRAMES_RX); + sc->stats.rx_frames_multi += RD4(sc, CGEM_MULTI_FRAMES_RX); + sc->stats.rx_frames_pause += RD4(sc, CGEM_PAUSE_FRAMES_RX); + sc->stats.rx_frames_64b += RD4(sc, CGEM_FRAMES_64B_RX); + sc->stats.rx_frames_65to127b += RD4(sc, CGEM_FRAMES_65_127B_RX); + sc->stats.rx_frames_128to255b += RD4(sc, CGEM_FRAMES_128_255B_RX); + sc->stats.rx_frames_256to511b += RD4(sc, CGEM_FRAMES_256_511B_RX); + sc->stats.rx_frames_512to1023b += RD4(sc, CGEM_FRAMES_512_1023B_RX); + sc->stats.rx_frames_1024to1536b += RD4(sc, CGEM_FRAMES_1024_1518B_RX); + sc->stats.rx_frames_undersize += RD4(sc, CGEM_UNDERSZ_RX); + sc->stats.rx_frames_oversize += RD4(sc, CGEM_OVERSZ_RX); + sc->stats.rx_frames_jabber += RD4(sc, CGEM_JABBERS_RX); + sc->stats.rx_frames_fcs_errs += RD4(sc, CGEM_FCS_ERRS); + sc->stats.rx_frames_length_errs += RD4(sc, CGEM_LENGTH_FIELD_ERRS); + sc->stats.rx_symbol_errs += RD4(sc, CGEM_RX_SYMBOL_ERRS); + sc->stats.rx_align_errs += RD4(sc, CGEM_ALIGN_ERRS); + sc->stats.rx_resource_errs += RD4(sc, CGEM_RX_RESOURCE_ERRS); + sc->stats.rx_overrun_errs += RD4(sc, CGEM_RX_OVERRUN_ERRS); + sc->stats.rx_ip_hdr_csum_errs += RD4(sc, CGEM_IP_HDR_CKSUM_ERRS); + sc->stats.rx_tcp_csum_errs += RD4(sc, CGEM_TCP_CKSUM_ERRS); + sc->stats.rx_udp_csum_errs += RD4(sc, CGEM_UDP_CKSUM_ERRS); +} + +static void cgem_tick(void *arg) { struct cgem_softc *sc = (struct cgem_softc *)arg; @@ -725,6 +876,23 @@ cgem_tick(void *arg) mii_tick(mii); } + /* Poll statistics registers. */ + cgem_poll_hw_stats(sc); + + /* Check for receiver hang. */ + if (sc->rxhangwar && sc->rx_frames_prev == sc->stats.rx_frames) { + /* + * Reset receiver logic by toggling RX_EN bit. 1usec + * delay is necessary especially when operating at 100mbps + * and 10mbps speeds. + */ + WR4(sc, CGEM_NET_CTRL, sc->net_ctl_shadow & + ~CGEM_NET_CTRL_RX_EN); + DELAY(1); + WR4(sc, CGEM_NET_CTRL, sc->net_ctl_shadow); + } + sc->rx_frames_prev = sc->stats.rx_frames; + /* Next callout in one second. */ callout_reset(&sc->tick_ch, hz, cgem_tick, sc); } @@ -743,33 +911,43 @@ cgem_intr(void *arg) return; } + /* Read interrupt status and immediately clear the bits. */ istatus = RD4(sc, CGEM_INTR_STAT); - WR4(sc, CGEM_INTR_STAT, istatus & - (CGEM_INTR_RX_COMPLETE | CGEM_INTR_TX_USED_READ | - CGEM_INTR_RX_OVERRUN | CGEM_INTR_HRESP_NOT_OK)); + WR4(sc, CGEM_INTR_STAT, istatus); + + /* Packets received. */ + if ((istatus & CGEM_INTR_RX_COMPLETE) != 0) + cgem_recv(sc); - /* Hresp not ok. Something very bad with DMA. Try to clear. */ + /* Free up any completed transmit buffers. */ + cgem_clean_tx(sc); + + /* Hresp not ok. Something is very bad with DMA. Try to clear. */ if ((istatus & CGEM_INTR_HRESP_NOT_OK) != 0) { - printf("cgem_intr: hresp not okay! rx_status=0x%x\n", - RD4(sc, CGEM_RX_STAT)); + device_printf(sc->dev, "cgem_intr: hresp not okay! " + "rx_status=0x%x\n", RD4(sc, CGEM_RX_STAT)); WR4(sc, CGEM_RX_STAT, CGEM_RX_STAT_HRESP_NOT_OK); } - /* Transmitter has idled. Free up any spent transmit buffers. */ - if ((istatus & CGEM_INTR_TX_USED_READ) != 0) - cgem_clean_tx(sc); + /* Receiver overrun. */ + if ((istatus & CGEM_INTR_RX_OVERRUN) != 0) { + /* Clear status bit. */ + WR4(sc, CGEM_RX_STAT, CGEM_RX_STAT_OVERRUN); + sc->rxoverruns++; + } - /* Packets received or overflow. */ - if ((istatus & (CGEM_INTR_RX_COMPLETE | CGEM_INTR_RX_OVERRUN)) != 0) { - cgem_recv(sc); + /* Receiver ran out of bufs. */ + if ((istatus & CGEM_INTR_RX_USED_READ) != 0) { + WR4(sc, CGEM_NET_CTRL, sc->net_ctl_shadow | + CGEM_NET_CTRL_FLUSH_DPRAM_PKT); cgem_fill_rqueue(sc); - if ((istatus & CGEM_INTR_RX_OVERRUN) != 0) { - /* Clear rx status register. */ - sc->rxoverruns++; - WR4(sc, CGEM_RX_STAT, CGEM_RX_STAT_ALL); - } + sc->rxnobufs++; } + /* Restart transmitter if needed. */ + if (!IFQ_DRV_IS_EMPTY(&sc->ifp->if_snd)) + cgem_start_locked(sc->ifp); + CGEM_UNLOCK(sc); } @@ -806,6 +984,7 @@ cgem_config(struct cgem_softc *sc) { uint32_t net_cfg; uint32_t dma_cfg; + u_char *eaddr = IF_LLADDR(sc->ifp); CGEM_ASSERT_LOCKED(sc); @@ -815,6 +994,7 @@ cgem_config(struct cgem_softc *sc) CGEM_NET_CFG_FCS_REMOVE | CGEM_NET_CFG_RX_BUF_OFFSET(ETHER_ALIGN) | CGEM_NET_CFG_GIGE_EN | + CGEM_NET_CFG_1536RXEN | CGEM_NET_CFG_FULL_DUPLEX | CGEM_NET_CFG_SPEED100; @@ -828,7 +1008,8 @@ cgem_config(struct cgem_softc *sc) dma_cfg = CGEM_DMA_CFG_RX_BUF_SIZE(MCLBYTES) | CGEM_DMA_CFG_RX_PKTBUF_MEMSZ_SEL_8K | CGEM_DMA_CFG_TX_PKTBUF_MEMSZ_SEL | - CGEM_DMA_CFG_AHB_FIXED_BURST_LEN_16; + CGEM_DMA_CFG_AHB_FIXED_BURST_LEN_16 | + CGEM_DMA_CFG_DISC_WHEN_NO_AHB; /* Enable transmit checksum offloading? */ if ((sc->ifp->if_capenable & IFCAP_TXCSUM) != 0) @@ -844,10 +1025,16 @@ cgem_config(struct cgem_softc *sc) sc->net_ctl_shadow |= (CGEM_NET_CTRL_TX_EN | CGEM_NET_CTRL_RX_EN); WR4(sc, CGEM_NET_CTRL, sc->net_ctl_shadow); + /* Set receive address in case it changed. */ + WR4(sc, CGEM_SPEC_ADDR_LOW(0), (eaddr[3] << 24) | + (eaddr[2] << 16) | (eaddr[1] << 8) | eaddr[0]); + WR4(sc, CGEM_SPEC_ADDR_HI(0), (eaddr[5] << 8) | eaddr[4]); + /* Set up interrupts. */ WR4(sc, CGEM_INTR_EN, - CGEM_INTR_RX_COMPLETE | CGEM_INTR_TX_USED_READ | - CGEM_INTR_RX_OVERRUN | CGEM_INTR_HRESP_NOT_OK); + CGEM_INTR_RX_COMPLETE | CGEM_INTR_RX_OVERRUN | + CGEM_INTR_TX_USED_READ | CGEM_INTR_RX_USED_READ | + CGEM_INTR_HRESP_NOT_OK); } /* Turn on interface and load up receive ring with buffers. */ @@ -868,8 +1055,7 @@ cgem_init_locked(struct cgem_softc *sc) sc->ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; mii = device_get_softc(sc->miibus); - mii_pollstat(mii); - cgem_start_locked(sc->ifp); + mii_mediachg(mii); callout_reset(&sc->tick_ch, hz, cgem_tick, sc); } @@ -932,6 +1118,9 @@ cgem_stop(struct cgem_softc *sc) sc->rxring_hd_ptr = 0; sc->rxring_tl_ptr = 0; sc->rxring_queued = 0; + + /* Force next statchg or linkchg to program net config register. */ + sc->mii_media_active = 0; } @@ -1021,6 +1210,11 @@ cgem_ioctl(struct ifnet *ifp, u_long cmd ~CGEM_NET_CFG_RX_CHKSUM_OFFLD_EN); } } + if ((ifp->if_capenable & (IFCAP_RXCSUM | IFCAP_TXCSUM)) == + (IFCAP_RXCSUM | IFCAP_TXCSUM)) + ifp->if_capenable |= IFCAP_VLAN_HWCSUM; + else + ifp->if_capenable &= ~IFCAP_VLAN_HWCSUM; CGEM_UNLOCK(sc); break; @@ -1038,6 +1232,7 @@ static void cgem_child_detached(device_t dev, device_t child) { struct cgem_softc *sc = device_get_softc(dev); + if (child == sc->miibus) sc->miibus = NULL; } @@ -1047,12 +1242,18 @@ cgem_ifmedia_upd(struct ifnet *ifp) { struct cgem_softc *sc = (struct cgem_softc *) ifp->if_softc; struct mii_data *mii; - int error; + struct mii_softc *miisc; + int error = 0; mii = device_get_softc(sc->miibus); CGEM_LOCK(sc); - error = mii_mediachg(mii); + if ((ifp->if_flags & IFF_UP) != 0) { + LIST_FOREACH(miisc, &mii->mii_phys, mii_list) + PHY_RESET(miisc); + error = mii_mediachg(mii); + } CGEM_UNLOCK(sc); + return (error); } @@ -1094,6 +1295,13 @@ cgem_miibus_readreg(device_t dev, int ph val = RD4(sc, CGEM_PHY_MAINT) & CGEM_PHY_MAINT_DATA_MASK; + if (reg == MII_EXTSR) + /* + * MAC does not support half-duplex at gig speeds. + * Let mii(4) exclude the capability. + */ + val &= ~(EXTSR_1000XHDX | EXTSR_1000THDX); + return (val); } @@ -1123,6 +1331,34 @@ cgem_miibus_writereg(device_t dev, int p return (0); } +static void +cgem_miibus_statchg(device_t dev) +{ + struct cgem_softc *sc = device_get_softc(dev); + struct mii_data *mii = device_get_softc(sc->miibus); + + CGEM_ASSERT_LOCKED(sc); + + if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == + (IFM_ACTIVE | IFM_AVALID) && + sc->mii_media_active != mii->mii_media_active) + cgem_mediachange(sc, mii); +} + +static void +cgem_miibus_linkchg(device_t dev) +{ + struct cgem_softc *sc = device_get_softc(dev); + struct mii_data *mii = device_get_softc(sc->miibus); + + CGEM_ASSERT_LOCKED(sc); + + if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == + (IFM_ACTIVE | IFM_AVALID) && + sc->mii_media_active != mii->mii_media_active) + cgem_mediachange(sc, mii); +} + /* * Overridable weak symbol cgem_set_ref_clk(). This allows platforms to * provide a function to set the cgem's reference clock. @@ -1135,49 +1371,226 @@ cgem_default_set_ref_clk(int unit, int f } __weak_reference(cgem_default_set_ref_clk, cgem_set_ref_clk); +/* Call to set reference clock and network config bits according to media. */ static void -cgem_miibus_statchg(device_t dev) +cgem_mediachange(struct cgem_softc *sc, struct mii_data *mii) { - struct cgem_softc *sc; - struct mii_data *mii; uint32_t net_cfg; int ref_clk_freq; - sc = device_get_softc(dev); - - mii = device_get_softc(sc->miibus); + CGEM_ASSERT_LOCKED(sc); - if ((mii->mii_media_status & IFM_AVALID) != 0) { - /* Update hardware to reflect phy status. */ - net_cfg = RD4(sc, CGEM_NET_CFG); - net_cfg &= ~(CGEM_NET_CFG_SPEED100 | CGEM_NET_CFG_GIGE_EN | - CGEM_NET_CFG_FULL_DUPLEX); - - switch (IFM_SUBTYPE(mii->mii_media_active)) { - case IFM_1000_T: - net_cfg |= (CGEM_NET_CFG_SPEED100 | - CGEM_NET_CFG_GIGE_EN); - ref_clk_freq = 125000000; - break; - case IFM_100_TX: - net_cfg |= CGEM_NET_CFG_SPEED100; - ref_clk_freq = 25000000; - break; - default: - ref_clk_freq = 2500000; - } + /* Update hardware to reflect media. */ + net_cfg = RD4(sc, CGEM_NET_CFG); + net_cfg &= ~(CGEM_NET_CFG_SPEED100 | CGEM_NET_CFG_GIGE_EN | + CGEM_NET_CFG_FULL_DUPLEX); - if ((mii->mii_media_active & IFM_FDX) != 0) - net_cfg |= CGEM_NET_CFG_FULL_DUPLEX; - WR4(sc, CGEM_NET_CFG, net_cfg); - - /* Set the reference clock if necessary. */ - if (cgem_set_ref_clk(sc->ref_clk_num, ref_clk_freq)) - device_printf(dev, "could not set ref clk%d to %d.\n", - sc->ref_clk_num, ref_clk_freq); + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_1000_T: + net_cfg |= (CGEM_NET_CFG_SPEED100 | + CGEM_NET_CFG_GIGE_EN); + ref_clk_freq = 125000000; + break; + case IFM_100_TX: + net_cfg |= CGEM_NET_CFG_SPEED100; + ref_clk_freq = 25000000; + break; + default: + ref_clk_freq = 2500000; } + + if ((mii->mii_media_active & IFM_FDX) != 0) + net_cfg |= CGEM_NET_CFG_FULL_DUPLEX; + + WR4(sc, CGEM_NET_CFG, net_cfg); + + /* Set the reference clock if necessary. */ + if (cgem_set_ref_clk(sc->ref_clk_num, ref_clk_freq)) + device_printf(sc->dev, "cgem_mediachange: " + "could not set ref clk%d to %d.\n", + sc->ref_clk_num, ref_clk_freq); + + sc->mii_media_active = mii->mii_media_active; } +static void +cgem_add_sysctls(device_t dev) +{ + struct cgem_softc *sc = device_get_softc(dev); + struct sysctl_ctx_list *ctx; + struct sysctl_oid_list *child; + struct sysctl_oid *tree; + + ctx = device_get_sysctl_ctx(dev); + child = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); + + SYSCTL_ADD_INT(ctx, child, OID_AUTO, "rxbufs", CTLFLAG_RW, + &sc->rxbufs, 0, + "Number receive buffers to provide"); + + SYSCTL_ADD_INT(ctx, child, OID_AUTO, "rxhangwar", CTLFLAG_RW, + &sc->rxhangwar, 0, + "Enable receive hang work-around"); + + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "_rxoverruns", CTLFLAG_RD, + &sc->rxoverruns, 0, + "Receive overrun events"); + + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "_rxnobufs", CTLFLAG_RD, + &sc->rxnobufs, 0, + "Receive buf queue empty events"); + + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "_rxdmamapfails", CTLFLAG_RD, + &sc->rxdmamapfails, 0, + "Receive DMA map failures"); + + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "_txfull", CTLFLAG_RD, + &sc->txfull, 0, + "Transmit ring full events"); + + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "_txdmamapfails", CTLFLAG_RD, + &sc->txdmamapfails, 0, + "Transmit DMA map failures"); + + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "_txdefrags", CTLFLAG_RD, + &sc->txdefrags, 0, + "Transmit m_defrag() calls"); + + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "_txdefragfails", CTLFLAG_RD, + &sc->txdefragfails, 0, + "Transmit m_defrag() failures"); + + tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD, + NULL, "GEM statistics"); + child = SYSCTL_CHILDREN(tree); + + SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, "tx_bytes", CTLFLAG_RD, + &sc->stats.tx_bytes, "Total bytes transmitted"); + + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_frames", CTLFLAG_RD, + &sc->stats.tx_frames, 0, "Total frames transmitted"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_frames_bcast", CTLFLAG_RD, + &sc->stats.tx_frames_bcast, 0, + "Number broadcast frames transmitted"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_frames_multi", CTLFLAG_RD, + &sc->stats.tx_frames_multi, 0, + "Number multicast frames transmitted"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_frames_pause", + CTLFLAG_RD, &sc->stats.tx_frames_pause, 0, + "Number pause frames transmitted"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_frames_64b", CTLFLAG_RD, + &sc->stats.tx_frames_64b, 0, + "Number frames transmitted of size 64 bytes or less"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_frames_65to127b", CTLFLAG_RD, + &sc->stats.tx_frames_65to127b, 0, + "Number frames transmitted of size 65-127 bytes"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_frames_128to255b", + CTLFLAG_RD, &sc->stats.tx_frames_128to255b, 0, + "Number frames transmitted of size 128-255 bytes"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_frames_256to511b", + CTLFLAG_RD, &sc->stats.tx_frames_256to511b, 0, + "Number frames transmitted of size 256-511 bytes"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_frames_512to1023b", + CTLFLAG_RD, &sc->stats.tx_frames_512to1023b, 0, + "Number frames transmitted of size 512-1023 bytes"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_frames_1024to1536b", + CTLFLAG_RD, &sc->stats.tx_frames_1024to1536b, 0, + "Number frames transmitted of size 1024-1536 bytes"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_under_runs", + CTLFLAG_RD, &sc->stats.tx_under_runs, 0, + "Number transmit under-run events"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_single_collisn", + CTLFLAG_RD, &sc->stats.tx_single_collisn, 0, + "Number single-collision transmit frames"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_multi_collisn", + CTLFLAG_RD, &sc->stats.tx_multi_collisn, 0, + "Number multi-collision transmit frames"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_excsv_collisn", + CTLFLAG_RD, &sc->stats.tx_excsv_collisn, 0, + "Number excessive collision transmit frames"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_late_collisn", + CTLFLAG_RD, &sc->stats.tx_late_collisn, 0, + "Number late-collision transmit frames"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_deferred_frames", + CTLFLAG_RD, &sc->stats.tx_deferred_frames, 0, + "Number deferred transmit frames"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "tx_carrier_sense_errs", + CTLFLAG_RD, &sc->stats.tx_carrier_sense_errs, 0, + "Number carrier sense errors on transmit"); + + SYSCTL_ADD_UQUAD(ctx, child, OID_AUTO, "rx_bytes", CTLFLAG_RD, + &sc->stats.rx_bytes, "Total bytes received"); + + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames", CTLFLAG_RD, + &sc->stats.rx_frames, 0, "Total frames received"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_bcast", + CTLFLAG_RD, &sc->stats.rx_frames_bcast, 0, + "Number broadcast frames received"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_multi", + CTLFLAG_RD, &sc->stats.rx_frames_multi, 0, + "Number multicast frames received"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_pause", + CTLFLAG_RD, &sc->stats.rx_frames_pause, 0, + "Number pause frames received"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_64b", + CTLFLAG_RD, &sc->stats.rx_frames_64b, 0, + "Number frames received of size 64 bytes or less"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_65to127b", + CTLFLAG_RD, &sc->stats.rx_frames_65to127b, 0, + "Number frames received of size 65-127 bytes"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_128to255b", + CTLFLAG_RD, &sc->stats.rx_frames_128to255b, 0, + "Number frames received of size 128-255 bytes"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_256to511b", + CTLFLAG_RD, &sc->stats.rx_frames_256to511b, 0, + "Number frames received of size 256-511 bytes"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_512to1023b", + CTLFLAG_RD, &sc->stats.rx_frames_512to1023b, 0, + "Number frames received of size 512-1023 bytes"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_1024to1536b", + CTLFLAG_RD, &sc->stats.rx_frames_1024to1536b, 0, + "Number frames received of size 1024-1536 bytes"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_undersize", + CTLFLAG_RD, &sc->stats.rx_frames_undersize, 0, + "Number undersize frames received"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_oversize", + CTLFLAG_RD, &sc->stats.rx_frames_oversize, 0, + "Number oversize frames received"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_jabber", + CTLFLAG_RD, &sc->stats.rx_frames_jabber, 0, + "Number jabber frames received"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_fcs_errs", + CTLFLAG_RD, &sc->stats.rx_frames_fcs_errs, 0, + "Number frames received with FCS errors"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_length_errs", + CTLFLAG_RD, &sc->stats.rx_frames_length_errs, 0, + "Number frames received with length errors"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_symbol_errs", + CTLFLAG_RD, &sc->stats.rx_symbol_errs, 0, + "Number receive symbol errors"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_align_errs", + CTLFLAG_RD, &sc->stats.rx_align_errs, 0, + "Number receive alignment errors"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_resource_errs", + CTLFLAG_RD, &sc->stats.rx_resource_errs, 0, + "Number frames received when no rx buffer available"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_overrun_errs", + CTLFLAG_RD, &sc->stats.rx_overrun_errs, 0, + "Number frames received but not copied due to " + "receive overrun"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_ip_hdr_csum_errs", + CTLFLAG_RD, &sc->stats.rx_ip_hdr_csum_errs, 0, + "Number frames received with IP header checksum " + "errors"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_tcp_csum_errs", + CTLFLAG_RD, &sc->stats.rx_tcp_csum_errs, 0, + "Number frames received with TCP checksum errors"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_frames_udp_csum_errs", + CTLFLAG_RD, &sc->stats.rx_udp_csum_errs, 0, + "Number frames received with UDP checksum errors"); +} + + static int cgem_probe(device_t dev) { @@ -1227,24 +1640,43 @@ cgem_attach(device_t dev) return (ENOMEM); } + /* Set up ifnet structure. */ ifp = sc->ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { device_printf(dev, "could not allocate ifnet structure\n"); cgem_detach(dev); return (ENOMEM); } + ifp->if_softc = sc; + if_initname(ifp, IF_CGEM_NAME, device_get_unit(dev)); + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_start = cgem_start; + ifp->if_ioctl = cgem_ioctl; + ifp->if_init = cgem_init; + ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 | + IFCAP_VLAN_MTU | IFCAP_VLAN_HWCSUM; + /* Disable hardware checksumming by default. */ + ifp->if_hwassist = 0; + ifp->if_capenable = ifp->if_capabilities & + ~(IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6 | IFCAP_VLAN_HWCSUM); + ifp->if_snd.ifq_drv_maxlen = CGEM_NUM_TX_DESCS; + IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen); + IFQ_SET_READY(&ifp->if_snd); - CGEM_LOCK(sc); + sc->if_old_flags = ifp->if_flags; + sc->rxbufs = DEFAULT_NUM_RX_BUFS; + sc->rxhangwar = 1; /* Reset hardware. */ + CGEM_LOCK(sc); cgem_reset(sc); + CGEM_UNLOCK(sc); /* Attach phy to mii bus. */ err = mii_attach(dev, &sc->miibus, ifp, cgem_ifmedia_upd, cgem_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0); if (err) { - CGEM_UNLOCK(sc); device_printf(dev, "attaching PHYs failed\n"); cgem_detach(dev); return (err); @@ -1253,7 +1685,6 @@ cgem_attach(device_t dev) /* Set up TX and RX descriptor area. */ err = cgem_setup_descs(sc); if (err) { - CGEM_UNLOCK(sc); device_printf(dev, "could not set up dma mem for descs.\n"); cgem_detach(dev); return (ENOMEM); @@ -1265,50 +1696,18 @@ cgem_attach(device_t dev) /* Start ticks. */ callout_init_mtx(&sc->tick_ch, &sc->sc_mtx, 0); - /* Set up ifnet structure. */ - ifp->if_softc = sc; - if_initname(ifp, IF_CGEM_NAME, device_get_unit(dev)); - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - ifp->if_start = cgem_start; - ifp->if_ioctl = cgem_ioctl; - ifp->if_init = cgem_init; - ifp->if_capabilities |= IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6; - /* XXX: disable hw checksumming for now. */ - ifp->if_hwassist = 0; - ifp->if_capenable = ifp->if_capabilities & - ~(IFCAP_HWCSUM | IFCAP_HWCSUM_IPV6); - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); - ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; - IFQ_SET_READY(&ifp->if_snd); - - sc->if_old_flags = ifp->if_flags; - sc->rxbufs = DEFAULT_NUM_RX_BUFS; - ether_ifattach(ifp, eaddr); err = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_NET | INTR_MPSAFE | INTR_EXCL, NULL, cgem_intr, sc, &sc->intrhand); if (err) { - CGEM_UNLOCK(sc); device_printf(dev, "could not set interrupt handler.\n"); ether_ifdetach(ifp); cgem_detach(dev); return (err); } - SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "rxbufs", CTLFLAG_RW, - &sc->rxbufs, 0, - "Number receive buffers to provide"); - - SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "_rxoverruns", CTLFLAG_RD, - &sc->rxoverruns, 0, - "Receive ring overrun events"); - - CGEM_UNLOCK(sc); + cgem_add_sysctls(dev); return (0); } @@ -1336,7 +1735,7 @@ cgem_detach(device_t dev) sc->miibus = NULL; } - /* Release resrouces. */ + /* Release resources. */ if (sc->mem_res != NULL) { bus_release_resource(dev, SYS_RES_MEMORY, rman_get_rid(sc->mem_res), sc->mem_res); @@ -1410,6 +1809,7 @@ static device_method_t cgem_methods[] = DEVMETHOD(miibus_readreg, cgem_miibus_readreg), DEVMETHOD(miibus_writereg, cgem_miibus_writereg), DEVMETHOD(miibus_statchg, cgem_miibus_statchg), + DEVMETHOD(miibus_linkchg, cgem_miibus_linkchg), DEVMETHOD_END }; Modified: head/sys/dev/cadence/if_cgem_hw.h ============================================================================== --- head/sys/dev/cadence/if_cgem_hw.h Wed Sep 3 17:32:17 2014 (r271045) +++ head/sys/dev/cadence/if_cgem_hw.h Wed Sep 3 17:51:03 2014 (r271046) @@ -90,6 +90,7 @@ #define CGEM_NET_CFG_PCS_SEL (1<<11) #define CGEM_NET_CFG_GIGE_EN (1<<10) #define CGEM_NET_CFG_EXT_ADDR_MATCH_EN (1<<9) +#define CGEM_NET_CFG_1536RXEN (1<<8) #define CGEM_NET_CFG_UNI_HASH_EN (1<<7) #define CGEM_NET_CFG_MULTI_HASH_EN (1<<6) #define CGEM_NET_CFG_NO_BCAST (1<<5) @@ -260,8 +261,8 @@ #define CGEM_FRAMES_256_511B_RX 0x174 /* 256-511 Byte Frames Rx'd */ #define CGEM_FRAMES_512_1023B_RX 0x178 /* 512-1023 Byte Frames Rx'd */ #define CGEM_FRAMES_1024_1518B_RX 0x17C /* 1024-1518 Byte Frames Rx'd*/ -#define CGEM_UNDERSZ_RX 0x180 /* Undersize Frames Rx'd */ -#define CGEM_OVERSZ_RX 0x184 /* Oversize Frames Rx'd */ +#define CGEM_UNDERSZ_RX 0x184 /* Undersize Frames Rx'd */ +#define CGEM_OVERSZ_RX 0x188 /* Oversize Frames Rx'd */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 18:51:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D86442C9; Wed, 3 Sep 2014 18:51:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C42D2138B; Wed, 3 Sep 2014 18:51:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83IpXMt089520; Wed, 3 Sep 2014 18:51:33 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83IpXDC089519; Wed, 3 Sep 2014 18:51:33 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409031851.s83IpXDC089519@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 3 Sep 2014 18:51:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271047 - head/share/zoneinfo X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 18:51:34 -0000 Author: emaste Date: Wed Sep 3 18:51:33 2014 New Revision: 271047 URL: http://svnweb.freebsd.org/changeset/base/271047 Log: Avoid ./ in zoneinfo entries in METALOG Use of "find ." resulted in METALOG entries with an extra ./ -- e.g., ./usr/share/zoneinfo/./America/Toronto. Avoid this by using globbing via "find *" instead. Reviewed by: brooks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D719 Modified: head/share/zoneinfo/Makefile Modified: head/share/zoneinfo/Makefile ============================================================================== --- head/share/zoneinfo/Makefile Wed Sep 3 17:51:03 2014 (r271046) +++ head/share/zoneinfo/Makefile Wed Sep 3 18:51:33 2014 (r271047) @@ -79,7 +79,7 @@ zoneinfo: yearistype ${TDATA} beforeinstall: cd ${TZBUILDDIR} && \ - find . -type f -print -exec ${INSTALL} \ + find * -type f -print -exec ${INSTALL} \ -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ \{} ${DESTDIR}/usr/share/zoneinfo/\{} \; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \ From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 19:01:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0607D57A; Wed, 3 Sep 2014 19:01:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E60BA14E8; Wed, 3 Sep 2014 19:01:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83J1Ysc093020; Wed, 3 Sep 2014 19:01:34 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83J1Yrw093019; Wed, 3 Sep 2014 19:01:34 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409031901.s83J1Yrw093019@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 3 Sep 2014 19:01:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271048 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 19:01:35 -0000 Author: jhb Date: Wed Sep 3 19:01:34 2014 New Revision: 271048 URL: http://svnweb.freebsd.org/changeset/base/271048 Log: Always seek back to the beginning of a regular directory, even if the previous seek location was 0. Without this, readdir() would see dd_loc of zero and call getdirentries() which would start reading entries at the current seek location of the directory ignoring the first batch of entries. Also, rewinddir() should always seek so that it reads the directory from the beginning to get updated entries. PR: 192935 Reported by: iron@mail.ua MFC after: 3 days Modified: head/lib/libc/gen/rewinddir.c Modified: head/lib/libc/gen/rewinddir.c ============================================================================== --- head/lib/libc/gen/rewinddir.c Wed Sep 3 18:51:33 2014 (r271047) +++ head/lib/libc/gen/rewinddir.c Wed Sep 3 19:01:34 2014 (r271048) @@ -53,7 +53,7 @@ rewinddir(dirp) _pthread_mutex_lock(&dirp->dd_lock); if (dirp->dd_flags & __DTF_READALL) _filldir(dirp, false); - else if (dirp->dd_seek != 0) { + else { (void) lseek(dirp->dd_fd, 0, SEEK_SET); dirp->dd_seek = 0; } From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 19:06:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0ABF795C; Wed, 3 Sep 2014 19:06:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA63B1535; Wed, 3 Sep 2014 19:06:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83J68fU095464; Wed, 3 Sep 2014 19:06:08 GMT (envelope-from obrien@FreeBSD.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83J682P095463; Wed, 3 Sep 2014 19:06:08 GMT (envelope-from obrien@FreeBSD.org) Message-Id: <201409031906.s83J682P095463@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: obrien set sender to obrien@FreeBSD.org using -f From: "David E. O'Brien" Date: Wed, 3 Sep 2014 19:06:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271049 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 19:06:09 -0000 Author: obrien Date: Wed Sep 3 19:06:08 2014 New Revision: 271049 URL: http://svnweb.freebsd.org/changeset/base/271049 Log: Note that script(1) consumes filemon(4). Modified: head/share/man/man4/filemon.4 Modified: head/share/man/man4/filemon.4 ============================================================================== --- head/share/man/man4/filemon.4 Wed Sep 3 19:01:34 2014 (r271048) +++ head/share/man/man4/filemon.4 Wed Sep 3 19:06:08 2014 (r271049) @@ -165,6 +165,7 @@ buffer contents to it. .Sh SEE ALSO .Xr dtrace 1 , .Xr ktrace 1 , +.Xr script 1 , .Xr truss 1 , .Xr ioctl 2 .Sh HISTORY From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 19:10:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CFF3BF4; Wed, 3 Sep 2014 19:10:36 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CFCB815A9; Wed, 3 Sep 2014 19:10:35 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s83JASJb082101 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Sep 2014 12:10:29 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s83JASop082100; Wed, 3 Sep 2014 12:10:28 -0700 (PDT) (envelope-from jmg) Date: Wed, 3 Sep 2014 12:10:28 -0700 From: John-Mark Gurney To: Gleb Smirnoff Subject: Re: svn commit: r270999 - head/sys/kern Message-ID: <20140903191028.GG71691@funkthat.com> References: <201409030814.s838E7A2084257@svn.freebsd.org> <20140903085523.GB13871@dft-labs.eu> <20140903094916.GO7693@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140903094916.GO7693@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Wed, 03 Sep 2014 12:10:29 -0700 (PDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Mateusz Guzik , kib@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 19:10:36 -0000 Gleb Smirnoff wrote this message on Wed, Sep 03, 2014 at 13:49 +0400: > Mateusz, Kostik, > > On Wed, Sep 03, 2014 at 10:55:23AM +0200, Mateusz Guzik wrote: > M> > Modified: head/sys/kern/kern_proc.c > M> > ============================================================================== > M> > --- head/sys/kern/kern_proc.c Wed Sep 3 08:13:46 2014 (r270998) > M> > +++ head/sys/kern/kern_proc.c Wed Sep 3 08:14:07 2014 (r270999) > M> > @@ -921,10 +921,11 @@ fill_kinfo_proc_only(struct proc *p, str > M> > kp->ki_xstat = p->p_xstat; > M> > kp->ki_acflag = p->p_acflag; > M> > kp->ki_lock = p->p_lock; > M> > - if (p->p_pptr) > M> > + if (p->p_pptr) { > M> > kp->ki_ppid = proc_realparent(p)->p_pid; > M> > - if (p->p_flag & P_TRACED) > M> > - kp->ki_tracer = p->p_pptr->p_pid; > M> > + if (p->p_flag & P_TRACED) > M> > + kp->ki_tracer = p->p_pptr->p_pid; > M> > + } > M> > } > M> > > M> > /* > M> > > M> > M> p_pptr must be non-NULL if P_TRACED is set. If there is no way to > M> annotate it for coverity, this change deserves a comment in the code > M> (and in retrospect previous code should have had appropriate comment as > M> well). > > Thanks for explanation. > > I'd suggest to leave the change in, since now it is a micro-micro-optimization :) If you must leave it in, then at least compare the pointer against NULL, and collapse two if statements into one... We should never introduce new pointer checks that aren't against NULL... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 19:37:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6F3A2A2; Wed, 3 Sep 2014 19:37:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D297719FA; Wed, 3 Sep 2014 19:37:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83JbgTB009954; Wed, 3 Sep 2014 19:37:42 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83JbfV5009941; Wed, 3 Sep 2014 19:37:41 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409031937.s83JbfV5009941@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 3 Sep 2014 19:37:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271050 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 19:37:43 -0000 Author: ian Date: Wed Sep 3 19:37:41 2014 New Revision: 271050 URL: http://svnweb.freebsd.org/changeset/base/271050 Log: Remove DIAGNOSTIC from the kernel config of low-end arm systems. Sanity checks such as vmem_check() can make a low-end system go completely unresponsive for as much as 3 seconds out of every 10. Modified: head/sys/arm/conf/DB-78XXX head/sys/arm/conf/DB-88F5XXX head/sys/arm/conf/DB-88F6XXX head/sys/arm/conf/DOCKSTAR head/sys/arm/conf/DREAMPLUG-1001 head/sys/arm/conf/EA3250 Modified: head/sys/arm/conf/DB-78XXX ============================================================================== --- head/sys/arm/conf/DB-78XXX Wed Sep 3 19:06:08 2014 (r271049) +++ head/sys/arm/conf/DB-78XXX Wed Sep 3 19:37:41 2014 (r271050) @@ -44,7 +44,7 @@ options NO_SWAPPING options ALT_BREAK_TO_DEBUGGER options DDB #options DEADLKRES # Enable the deadlock resolver -options DIAGNOSTIC +#options DIAGNOSTIC #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options KDB Modified: head/sys/arm/conf/DB-88F5XXX ============================================================================== --- head/sys/arm/conf/DB-88F5XXX Wed Sep 3 19:06:08 2014 (r271049) +++ head/sys/arm/conf/DB-88F5XXX Wed Sep 3 19:37:41 2014 (r271050) @@ -43,7 +43,7 @@ options NO_SWAPPING options ALT_BREAK_TO_DEBUGGER options DDB #options DEADLKRES # Enable the deadlock resolver -options DIAGNOSTIC +#options DIAGNOSTIC #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options KDB Modified: head/sys/arm/conf/DB-88F6XXX ============================================================================== --- head/sys/arm/conf/DB-88F6XXX Wed Sep 3 19:06:08 2014 (r271049) +++ head/sys/arm/conf/DB-88F6XXX Wed Sep 3 19:37:41 2014 (r271050) @@ -44,7 +44,7 @@ options NO_SWAPPING options ALT_BREAK_TO_DEBUGGER options DDB #options DEADLKRES # Enable the deadlock resolver -options DIAGNOSTIC +#options DIAGNOSTIC #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options KDB Modified: head/sys/arm/conf/DOCKSTAR ============================================================================== --- head/sys/arm/conf/DOCKSTAR Wed Sep 3 19:06:08 2014 (r271049) +++ head/sys/arm/conf/DOCKSTAR Wed Sep 3 19:37:41 2014 (r271050) @@ -145,7 +145,7 @@ options BREAK_TO_DEBUGGER options ALT_BREAK_TO_DEBUGGER options DDB options KDB -options DIAGNOSTIC +#options DIAGNOSTIC options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks and cycles Modified: head/sys/arm/conf/DREAMPLUG-1001 ============================================================================== --- head/sys/arm/conf/DREAMPLUG-1001 Wed Sep 3 19:06:08 2014 (r271049) +++ head/sys/arm/conf/DREAMPLUG-1001 Wed Sep 3 19:37:41 2014 (r271050) @@ -153,7 +153,7 @@ options BREAK_TO_DEBUGGER options ALT_BREAK_TO_DEBUGGER options DDB options KDB -options DIAGNOSTIC +#options DIAGNOSTIC options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks and cycles Modified: head/sys/arm/conf/EA3250 ============================================================================== --- head/sys/arm/conf/EA3250 Wed Sep 3 19:06:08 2014 (r271049) +++ head/sys/arm/conf/EA3250 Wed Sep 3 19:37:41 2014 (r271050) @@ -44,7 +44,7 @@ options NO_SWAPPING options ALT_BREAK_TO_DEBUGGER options DDB #options DEADLKRES # Enable the deadlock resolver -options DIAGNOSTIC +#options DIAGNOSTIC #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options KDB From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 20:06:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1257C63; Wed, 3 Sep 2014 20:06:28 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83C251D8C; Wed, 3 Sep 2014 20:06:28 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7F5B4B98D; Wed, 3 Sep 2014 16:06:27 -0400 (EDT) From: John Baldwin To: Nikolai Lifanov Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm Date: Wed, 03 Sep 2014 15:22:02 -0400 Message-ID: <2230377.GgKARkJyaG@ralph.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/10.0-STABLE; KDE/4.10.5; amd64; ; ) In-Reply-To: <54072E20.10802@mail.lifanov.com> References: <201408281950.s7SJo90I047213@svn.freebsd.org> <169C94ED141B435BACEADB04A4824717@multiplay.co.uk> <54072E20.10802@mail.lifanov.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 03 Sep 2014 16:06:27 -0400 (EDT) Cc: src-committers@freebsd.org, Peter Wemm , Alan Cox , svn-src-all@freebsd.org, Dmitry Morozovsky , "Matthew D. Fuller" , Steven Hartland , svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 20:06:28 -0000 On Wednesday, September 03, 2014 11:05:04 AM Nikolai Lifanov wrote: > On 09/03/14 04:09, Steven Hartland wrote: > > I'm looking to MFC this change so wanted to check if > > anyone had an final feedback / objections? > > > > I know we currently have Alan's feedback on changing > > the #ifdef __i386__ to #ifndef UMA_MD_SMALL_ALLOC > > which sounds sensible but waiting Peter to comment on. > > > > Regards > > Steve > > I have no technical input, but this change improves ARC usefulness for > me quite a bit. I would like to see the improvement in 10-STABLE. Can you verify that the current 10-STABLE (as of today) with all the various pagedaemon fixes still has ARC issues for your workload? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 20:07:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9420FA0; Wed, 3 Sep 2014 20:07:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9860E1DA8; Wed, 3 Sep 2014 20:07:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83K7S3k024567; Wed, 3 Sep 2014 20:07:28 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83K7QUw024552; Wed, 3 Sep 2014 20:07:26 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201409032007.s83K7QUw024552@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Wed, 3 Sep 2014 20:07:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271051 - in stable/10/sys: arm/broadcom/bcm2835 arm/freescale/imx arm/ti dev/sdhci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 20:07:28 -0000 Author: marius Date: Wed Sep 3 20:07:26 2014 New Revision: 271051 URL: http://svnweb.freebsd.org/changeset/base/271051 Log: MFC: r270885, r270948 - Nuke unused sdhci_softc. - Static'ize sdhci_debug local to sdhci.c. - Const'ify PCI device description strings. - Nuke redundant resource ID members from sdhci_pci_softc. - Nuke unused hw.sdhci_pci.debug tunable. - Add support for using MSI instead of INTx, controllable via the tunable hw.sdhci.enable_msi (defaulting to on) and tested with a RICOH R5CE823 SD controller. - Use NULL instead of 0 for pointers. Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c stable/10/sys/arm/freescale/imx/imx_sdhci.c stable/10/sys/arm/ti/ti_sdhci.c stable/10/sys/dev/sdhci/sdhci.c stable/10/sys/dev/sdhci/sdhci.h stable/10/sys/dev/sdhci/sdhci_fdt.c stable/10/sys/dev/sdhci/sdhci_if.m stable/10/sys/dev/sdhci/sdhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Wed Sep 3 19:37:41 2014 (r271050) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Wed Sep 3 20:07:26 2014 (r271051) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: stable/10/sys/arm/freescale/imx/imx_sdhci.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_sdhci.c Wed Sep 3 19:37:41 2014 (r271050) +++ stable/10/sys/arm/freescale/imx/imx_sdhci.c Wed Sep 3 20:07:26 2014 (r271051) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/10/sys/arm/ti/ti_sdhci.c ============================================================================== --- stable/10/sys/arm/ti/ti_sdhci.c Wed Sep 3 19:37:41 2014 (r271050) +++ stable/10/sys/arm/ti/ti_sdhci.c Wed Sep 3 20:07:26 2014 (r271051) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: stable/10/sys/dev/sdhci/sdhci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.c Wed Sep 3 19:37:41 2014 (r271050) +++ stable/10/sys/dev/sdhci/sdhci.c Wed Sep 3 20:07:26 2014 (r271051) @@ -52,23 +52,11 @@ __FBSDID("$FreeBSD$"); #include "sdhci.h" #include "sdhci_if.h" -struct sdhci_softc; +SYSCTL_NODE(_hw, OID_AUTO, sdhci, CTLFLAG_RD, 0, "sdhci driver"); -struct sdhci_softc { - device_t dev; /* Controller device */ - struct resource *irq_res; /* IRQ resource */ - int irq_rid; - void *intrhand; /* Interrupt handle */ - - int num_slots; /* Number of slots on this controller */ - struct sdhci_slot slots[6]; -}; - -static SYSCTL_NODE(_hw, OID_AUTO, sdhci, CTLFLAG_RD, 0, "sdhci driver"); - -int sdhci_debug = 0; +static int sdhci_debug; TUNABLE_INT("hw.sdhci.debug", &sdhci_debug); -SYSCTL_INT(_hw_sdhci, OID_AUTO, debug, CTLFLAG_RW, &sdhci_debug, 0, "Debug level"); +SYSCTL_INT(_hw_sdhci, OID_AUTO, debug, CTLFLAG_RWTUN, &sdhci_debug, 0, "Debug level"); #define RD1(slot, off) SDHCI_READ_1((slot)->bus, (slot), (off)) #define RD2(slot, off) SDHCI_READ_2((slot)->bus, (slot), (off)) Modified: stable/10/sys/dev/sdhci/sdhci.h ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.h Wed Sep 3 19:37:41 2014 (r271050) +++ stable/10/sys/dev/sdhci/sdhci.h Wed Sep 3 20:07:26 2014 (r271051) @@ -223,6 +223,8 @@ #define SDHCI_SPEC_200 1 #define SDHCI_SPEC_300 2 +SYSCTL_DECL(_hw_sdhci); + struct sdhci_slot { u_int quirks; /* Chip specific quirks */ u_int caps; /* Override SDHCI_CAPABILITIES */ Modified: stable/10/sys/dev/sdhci/sdhci_fdt.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci_fdt.c Wed Sep 3 19:37:41 2014 (r271050) +++ stable/10/sys/dev/sdhci/sdhci_fdt.c Wed Sep 3 20:07:26 2014 (r271051) @@ -180,7 +180,6 @@ sdhci_fdt_probe(device_t dev) if ((OF_getencprop(node, "max-frequency", &cid, sizeof(cid))) > 0) sc->max_clk = cid; - return (0); } @@ -189,7 +188,7 @@ sdhci_fdt_attach(device_t dev) { struct sdhci_fdt_softc *sc = device_get_softc(dev); int err, slots, rid, i; - + sc->dev = dev; /* Allocate IRQ. */ @@ -241,7 +240,7 @@ sdhci_fdt_attach(device_t dev) struct sdhci_slot *slot = &sc->slots[i]; sdhci_start_slot(slot); } - + return (0); } @@ -305,5 +304,6 @@ static driver_t sdhci_fdt_driver = { }; static devclass_t sdhci_fdt_devclass; -DRIVER_MODULE(sdhci_fdt, simplebus, sdhci_fdt_driver, sdhci_fdt_devclass, 0,0); +DRIVER_MODULE(sdhci_fdt, simplebus, sdhci_fdt_driver, sdhci_fdt_devclass, + NULL, NULL); MODULE_DEPEND(sdhci_fdt, sdhci, 1, 1, 1); Modified: stable/10/sys/dev/sdhci/sdhci_if.m ============================================================================== --- stable/10/sys/dev/sdhci/sdhci_if.m Wed Sep 3 19:37:41 2014 (r271050) +++ stable/10/sys/dev/sdhci/sdhci_if.m Wed Sep 3 20:07:26 2014 (r271051) @@ -62,6 +62,7 @@ #include #include #include +#include #include #include Modified: stable/10/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci_pci.c Wed Sep 3 19:37:41 2014 (r271050) +++ stable/10/sys/dev/sdhci/sdhci_pci.c Wed Sep 3 20:07:26 2014 (r271051) @@ -78,7 +78,7 @@ __FBSDID("$FreeBSD$"); static const struct sdhci_device { uint32_t model; uint16_t subvendor; - char *desc; + const char *desc; u_int quirks; } sdhci_devices[] = { { 0x08221180, 0xffff, "RICOH R5C822 SD", @@ -112,20 +112,17 @@ struct sdhci_pci_softc { device_t dev; /* Controller device */ u_int quirks; /* Chip specific quirks */ struct resource *irq_res; /* IRQ resource */ - int irq_rid; void *intrhand; /* Interrupt handle */ int num_slots; /* Number of slots on this controller */ struct sdhci_slot slots[6]; struct resource *mem_res[6]; /* Memory resource */ - int mem_rid[6]; }; -static SYSCTL_NODE(_hw, OID_AUTO, sdhci_pci, CTLFLAG_RD, 0, "sdhci PCI driver"); - -int sdhci_pci_debug; -TUNABLE_INT("hw.sdhci_pci.debug", &sdhci_pci_debug); -SYSCTL_INT(_hw_sdhci_pci, OID_AUTO, debug, CTLFLAG_RW, &sdhci_pci_debug, 0, "Debug level"); +static int sdhci_enable_msi = 1; +TUNABLE_INT("hw.sdhci.enable_msi", &sdhci_enable_msi); +SYSCTL_INT(_hw_sdhci, OID_AUTO, enable_msi, CTLFLAG_RDTUN, &sdhci_enable_msi, + 0, "Enable MSI interrupts"); static uint8_t sdhci_pci_read_1(device_t dev, struct sdhci_slot *slot, bus_size_t off) @@ -232,13 +229,13 @@ sdhci_pci_probe(device_t dev) uint16_t subvendor; uint8_t class, subclass; int i, result; - + model = (uint32_t)pci_get_device(dev) << 16; model |= (uint32_t)pci_get_vendor(dev) & 0x0000ffff; subvendor = pci_get_subvendor(dev); class = pci_get_class(dev); subclass = pci_get_subclass(dev); - + result = ENXIO; for (i = 0; sdhci_devices[i].model != 0; i++) { if (sdhci_devices[i].model == model && @@ -254,7 +251,7 @@ sdhci_pci_probe(device_t dev) device_set_desc(dev, "Generic SD HCI"); result = BUS_PROBE_GENERIC; } - + return (result); } @@ -265,7 +262,7 @@ sdhci_pci_attach(device_t dev) uint32_t model; uint16_t subvendor; uint8_t class, subclass, progif; - int err, slots, bar, i; + int bar, err, rid, slots, i; sc->dev = dev; model = (uint32_t)pci_get_device(dev) << 16; @@ -296,11 +293,15 @@ sdhci_pci_attach(device_t dev) return (EINVAL); } /* Allocate IRQ. */ - sc->irq_rid = 0; - sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid, - RF_SHAREABLE | RF_ACTIVE); + i = 1; + rid = 0; + if (sdhci_enable_msi != 0 && pci_alloc_msi(dev, &i) == 0) + rid = 1; + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, + RF_ACTIVE | (rid != 0 ? 0 : RF_SHAREABLE)); if (sc->irq_res == NULL) { device_printf(dev, "Can't allocate IRQ\n"); + pci_release_msi(dev); return (ENOMEM); } /* Scan all slots. */ @@ -308,9 +309,9 @@ sdhci_pci_attach(device_t dev) struct sdhci_slot *slot = &sc->slots[sc->num_slots]; /* Allocate memory. */ - sc->mem_rid[i] = PCIR_BAR(bar + i); - sc->mem_res[i] = bus_alloc_resource(dev, - SYS_RES_MEMORY, &(sc->mem_rid[i]), 0ul, ~0ul, 0x100, RF_ACTIVE); + rid = PCIR_BAR(bar + i); + sc->mem_res[i] = bus_alloc_resource(dev, SYS_RES_MEMORY, + &rid, 0ul, ~0ul, 0x100, RF_ACTIVE); if (sc->mem_res[i] == NULL) { device_printf(dev, "Can't allocate memory for slot %d\n", i); continue; @@ -319,7 +320,6 @@ sdhci_pci_attach(device_t dev) if (sdhci_init_slot(dev, slot, i) != 0) continue; - sc->num_slots++; } device_printf(dev, "%d slot(s) allocated\n", sc->num_slots); @@ -335,7 +335,7 @@ sdhci_pci_attach(device_t dev) sdhci_start_slot(slot); } - + return (0); } @@ -347,14 +347,15 @@ sdhci_pci_detach(device_t dev) bus_teardown_intr(dev, sc->irq_res, sc->intrhand); bus_release_resource(dev, SYS_RES_IRQ, - sc->irq_rid, sc->irq_res); + rman_get_rid(sc->irq_res), sc->irq_res); + pci_release_msi(dev); for (i = 0; i < sc->num_slots; i++) { struct sdhci_slot *slot = &sc->slots[i]; sdhci_cleanup_slot(slot); bus_release_resource(dev, SYS_RES_MEMORY, - sc->mem_rid[i], sc->mem_res[i]); + rman_get_rid(sc->mem_res[i]), sc->mem_res[i]); } return (0); } @@ -369,7 +370,7 @@ sdhci_pci_suspend(device_t dev) if (err) return (err); for (i = 0; i < sc->num_slots; i++) - sdhci_generic_suspend(&sc->slots[i]); + sdhci_generic_suspend(&sc->slots[i]); return (0); } @@ -384,7 +385,6 @@ sdhci_pci_resume(device_t dev) return (bus_generic_resume(dev)); } - static void sdhci_pci_intr(void *arg) { @@ -436,5 +436,6 @@ static driver_t sdhci_pci_driver = { }; static devclass_t sdhci_pci_devclass; -DRIVER_MODULE(sdhci_pci, pci, sdhci_pci_driver, sdhci_pci_devclass, 0, 0); +DRIVER_MODULE(sdhci_pci, pci, sdhci_pci_driver, sdhci_pci_devclass, NULL, + NULL); MODULE_DEPEND(sdhci_pci, sdhci, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 20:23:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1F626E3; Wed, 3 Sep 2014 20:23:09 +0000 (UTC) Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A36481F9C; Wed, 3 Sep 2014 20:23:09 +0000 (UTC) Received: by mail.lifanov.com (Postfix, from userid 58) id 82B091B3096; Wed, 3 Sep 2014 16:23:07 -0400 (EDT) Received: from [127.0.0.1] (vnat004.nandomedia.com [166.108.31.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.lifanov.com (Postfix) with ESMTPSA id D79DA1B3095; Wed, 3 Sep 2014 16:22:59 -0400 (EDT) Message-ID: <540778A2.3080809@mail.lifanov.com> Date: Wed, 03 Sep 2014 16:22:58 -0400 From: Nikolai Lifanov User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: John Baldwin Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm References: <201408281950.s7SJo90I047213@svn.freebsd.org> <169C94ED141B435BACEADB04A4824717@multiplay.co.uk> <54072E20.10802@mail.lifanov.com> <2230377.GgKARkJyaG@ralph.baldwin.cx> In-Reply-To: <2230377.GgKARkJyaG@ralph.baldwin.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: src-committers@freebsd.org, Peter Wemm , Alan Cox , svn-src-all@freebsd.org, Dmitry Morozovsky , "Matthew D. Fuller" , Steven Hartland , svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 20:23:09 -0000 On 09/03/14 15:22, John Baldwin wrote: > On Wednesday, September 03, 2014 11:05:04 AM Nikolai Lifanov wrote: >> On 09/03/14 04:09, Steven Hartland wrote: >>> I'm looking to MFC this change so wanted to check if >>> anyone had an final feedback / objections? >>> >>> I know we currently have Alan's feedback on changing >>> the #ifdef __i386__ to #ifndef UMA_MD_SMALL_ALLOC >>> which sounds sensible but waiting Peter to comment on. >>> >>> Regards >>> Steve >> >> I have no technical input, but this change improves ARC usefulness for >> me quite a bit. I would like to see the improvement in 10-STABLE. > > Can you verify that the current 10-STABLE (as of today) with all the various > pagedaemon fixes still has ARC issues for your workload? > It doesn't have any issues, but I noticed the improvement on CURRENT. I observed that just after this change, my package builder is much more likely to retain MFU and not evict useful things from there (the port tree) after large builds. However, I run a lot more 10.0-RELEASE than CURRENT and I would like to see this improvement release-bound. I would be happy to test this on 10-STABLE if you think that this is relevant. - Nikolai Lifanov From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 20:53:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E1F2635; Wed, 3 Sep 2014 20:53:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5574413BF; Wed, 3 Sep 2014 20:53:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83KrCOp057895; Wed, 3 Sep 2014 20:53:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83KrCPh057894; Wed, 3 Sep 2014 20:53:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409032053.s83KrCPh057894@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 3 Sep 2014 20:53:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271052 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 20:53:12 -0000 Author: gjb Date: Wed Sep 3 20:53:11 2014 New Revision: 271052 URL: http://svnweb.freebsd.org/changeset/base/271052 Log: Document libc updates from illumos and Apple. Submitted by: pfg Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 20:07:26 2014 (r271051) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Wed Sep 3 20:53:11 2014 (r271052) @@ -1188,6 +1188,10 @@ possible to examine &man.zfs.8; filesystems when /usr is unavailable. + Several libc improvements have been + merged from illumos™ and &apple;, providing better + internationalization support and &posix; compliance. + <filename>/etc/rc.d</filename> Scripts From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 21:17:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0A8616B; Wed, 3 Sep 2014 21:17:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C63017DB; Wed, 3 Sep 2014 21:17:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83LH9k2069909; Wed, 3 Sep 2014 21:17:09 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83LH9na069907; Wed, 3 Sep 2014 21:17:09 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409032117.s83LH9na069907@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 3 Sep 2014 21:17:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271053 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 21:17:09 -0000 Author: jhb Date: Wed Sep 3 21:17:09 2014 New Revision: 271053 URL: http://svnweb.freebsd.org/changeset/base/271053 Log: Actually save and restore FPU state on APs during suspend and resume. Committed from: Atom-based HP netbook after resuming in X Modified: head/sys/i386/i386/mp_machdep.c Modified: head/sys/i386/i386/mp_machdep.c ============================================================================== --- head/sys/i386/i386/mp_machdep.c Wed Sep 3 20:53:11 2014 (r271052) +++ head/sys/i386/i386/mp_machdep.c Wed Sep 3 21:17:09 2014 (r271053) @@ -1522,15 +1522,11 @@ cpususpend_handler(void) cpu = PCPU_GET(cpuid); if (savectx(susppcbs[cpu])) { -#ifdef DEV_NPX - npxsuspend(&suspcbs[cpu]->pcb_fpususpend); -#endif + npxsuspend(&susppcbs[cpu]->pcb_fpususpend); wbinvd(); CPU_SET_ATOMIC(cpu, &suspended_cpus); } else { -#ifdef DEV_NPX - npxresume(&suspcbs[cpu]->pcb_fpususpend); -#endif + npxresume(&susppcbs[cpu]->pcb_fpususpend); pmap_init_pat(); PCPU_SET(switchtime, 0); PCPU_SET(switchticks, ticks); From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 21:25:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D5AD485; Wed, 3 Sep 2014 21:25:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECFCE18EE; Wed, 3 Sep 2014 21:25:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83LPalk074443; Wed, 3 Sep 2014 21:25:36 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83LPahP074442; Wed, 3 Sep 2014 21:25:36 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409032125.s83LPahP074442@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 3 Sep 2014 21:25:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271054 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 21:25:37 -0000 Author: ian Date: Wed Sep 3 21:25:36 2014 New Revision: 271054 URL: http://svnweb.freebsd.org/changeset/base/271054 Log: When built with FDT support, add /boot/dtb to the list of search directories. Modified: head/sys/boot/common/module.c Modified: head/sys/boot/common/module.c ============================================================================== --- head/sys/boot/common/module.c Wed Sep 3 21:17:09 2014 (r271053) +++ head/sys/boot/common/module.c Wed Sep 3 21:25:36 2014 (r271054) @@ -66,7 +66,12 @@ static void moduledir_rebuild(void); /* load address should be tweaked by first module loaded (kernel) */ static vm_offset_t loadaddr = 0; +#if defined(LOADER_FDT_SUPPORT) +static const char *default_searchpath = + "/boot/kernel;/boot/modules;/boot/dtb"; +#else static const char *default_searchpath ="/boot/kernel;/boot/modules"; +#endif static STAILQ_HEAD(, moduledir) moduledir_list = STAILQ_HEAD_INITIALIZER(moduledir_list); From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 21:45:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E4E6A6D; Wed, 3 Sep 2014 21:45:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3F771AD8; Wed, 3 Sep 2014 21:45:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83LjeeE084193; Wed, 3 Sep 2014 21:45:40 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83LjeCx084190; Wed, 3 Sep 2014 21:45:40 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409032145.s83LjeCx084190@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 3 Sep 2014 21:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271055 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 21:45:41 -0000 Author: ian Date: Wed Sep 3 21:45:39 2014 New Revision: 271055 URL: http://svnweb.freebsd.org/changeset/base/271055 Log: Add a function to get the frequency of the AHB bus. Another stopgap function until we have full clock support for imx6. Modified: head/sys/arm/freescale/imx/imx51_ccm.c head/sys/arm/freescale/imx/imx6_ccm.c head/sys/arm/freescale/imx/imx_ccmvar.h Modified: head/sys/arm/freescale/imx/imx51_ccm.c ============================================================================== --- head/sys/arm/freescale/imx/imx51_ccm.c Wed Sep 3 21:25:36 2014 (r271054) +++ head/sys/arm/freescale/imx/imx51_ccm.c Wed Sep 3 21:45:39 2014 (r271055) @@ -580,3 +580,10 @@ imx_ccm_uart_hz(void) return (imx51_get_clock(IMX51CLK_UART_CLK_ROOT)); } + +uint32_t +imx_ccm_ahb_hz(void) +{ + + return (imx51_get_clock(IMX51CLK_AHB_CLK_ROOT)); +} Modified: head/sys/arm/freescale/imx/imx6_ccm.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_ccm.c Wed Sep 3 21:25:36 2014 (r271054) +++ head/sys/arm/freescale/imx/imx6_ccm.c Wed Sep 3 21:45:39 2014 (r271055) @@ -238,6 +238,12 @@ imx_ccm_uart_hz(void) return (80000000); } +uint32_t +imx_ccm_ahb_hz(void) +{ + return (132000000); +} + static device_method_t ccm_methods[] = { /* Device interface */ DEVMETHOD(device_probe, ccm_probe), Modified: head/sys/arm/freescale/imx/imx_ccmvar.h ============================================================================== --- head/sys/arm/freescale/imx/imx_ccmvar.h Wed Sep 3 21:25:36 2014 (r271054) +++ head/sys/arm/freescale/imx/imx_ccmvar.h Wed Sep 3 21:45:39 2014 (r271055) @@ -47,6 +47,7 @@ uint32_t imx_ccm_ipg_hz(void); uint32_t imx_ccm_perclk_hz(void); uint32_t imx_ccm_sdhci_hz(void); uint32_t imx_ccm_uart_hz(void); +uint32_t imx_ccm_ahb_hz(void); void imx_ccm_usb_enable(device_t _usbdev); void imx_ccm_usbphy_enable(device_t _phydev); From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 21:01:48 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93F8591D; Wed, 3 Sep 2014 21:01:48 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 2D8631519; Wed, 3 Sep 2014 21:01:46 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id AAA18421; Thu, 04 Sep 2014 00:01:24 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XPHgC-000HFw-HD; Thu, 04 Sep 2014 00:01:24 +0300 Message-ID: <5407816B.9000401@FreeBSD.org> Date: Thu, 04 Sep 2014 00:00:27 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Nikolai Lifanov , John Baldwin Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm References: <201408281950.s7SJo90I047213@svn.freebsd.org> <169C94ED141B435BACEADB04A4824717@multiplay.co.uk> <54072E20.10802@mail.lifanov.com> <2230377.GgKARkJyaG@ralph.baldwin.cx> <540778A2.3080809@mail.lifanov.com> In-Reply-To: <540778A2.3080809@mail.lifanov.com> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Wed, 03 Sep 2014 21:56:47 +0000 Cc: src-committers@FreeBSD.org, Peter Wemm , Alan Cox , svn-src-all@FreeBSD.org, Dmitry Morozovsky , "Matthew D. Fuller" , Steven Hartland , svn-src-head@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 21:01:48 -0000 on 03/09/2014 23:22 Nikolai Lifanov said the following: > On 09/03/14 15:22, John Baldwin wrote: >> On Wednesday, September 03, 2014 11:05:04 AM Nikolai Lifanov wrote: >>> On 09/03/14 04:09, Steven Hartland wrote: >>>> I'm looking to MFC this change so wanted to check if >>>> anyone had an final feedback / objections? >>>> >>>> I know we currently have Alan's feedback on changing >>>> the #ifdef __i386__ to #ifndef UMA_MD_SMALL_ALLOC >>>> which sounds sensible but waiting Peter to comment on. >>>> >>>> Regards >>>> Steve >>> >>> I have no technical input, but this change improves ARC usefulness for >>> me quite a bit. I would like to see the improvement in 10-STABLE. >> >> Can you verify that the current 10-STABLE (as of today) with all the various >> pagedaemon fixes still has ARC issues for your workload? >> > > It doesn't have any issues, but I noticed the improvement on CURRENT. I > observed that just after this change, my package builder is much more > likely to retain MFU and not evict useful things from there (the port > tree) after large builds. > However, I run a lot more 10.0-RELEASE than CURRENT and I would like to > see this improvement release-bound. > > I would be happy to test this on 10-STABLE if you think that this is > relevant. As noted before, unfortunately, this commit (plus its fixups) contains at least two related but distinct changes. So, to separate the wheat from the chaff, could you please try to comment out the following block in sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c, function arc_reclaim_needed: if (kmem_free_count() < zfs_arc_free_target) { DTRACE_PROBE2(arc__reclaim_freetarget, uint64_t, kmem_free_count(), uint64_t, zfs_arc_free_target); return (1); } Alternatively, I think that the same effect can be achieved by setting sysctl vfs.zfs.arc_free_target to the same value as vm.stats.vm.v_free_min. It's interesting to me whether you would still see the better performance or if that improvement would be undone. Thanks! -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 21:59:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA2C9D2; Wed, 3 Sep 2014 21:59:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB59D1C10; Wed, 3 Sep 2014 21:59:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83Lx8ms089457; Wed, 3 Sep 2014 21:59:08 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83Lx8fh089455; Wed, 3 Sep 2014 21:59:08 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201409032159.s83Lx8fh089455@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 3 Sep 2014 21:59:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271057 - in head: etc/mtree share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 21:59:09 -0000 Author: imp Date: Wed Sep 3 21:59:07 2014 New Revision: 271057 URL: http://svnweb.freebsd.org/changeset/base/271057 Log: Create a /boot/dtb directory to house DTB blobs. The flattened device tree support includes a device tree source compiler dtc(8) which converts .dts files into .dtb files. /boot/loader will load dtb files from this directory by default, allowing for fewer differences between images for different SoCs. Compiled dts files will wind up here eventually as an alternative to embedding them into the kernel. Document this in hier(7), as well as add missing entries for /boot/firmware and /boot/zfs, though the latter two should only be considered place holders if someone wants to make them better. Modified: head/etc/mtree/BSD.root.dist head/share/man/man7/hier.7 Modified: head/etc/mtree/BSD.root.dist ============================================================================== --- head/etc/mtree/BSD.root.dist Wed Sep 3 21:57:06 2014 (r271056) +++ head/etc/mtree/BSD.root.dist Wed Sep 3 21:59:07 2014 (r271057) @@ -10,6 +10,8 @@ boot defaults .. + dtb + .. firmware .. kernel Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Wed Sep 3 21:57:06 2014 (r271056) +++ head/share/man/man7/hier.7 Wed Sep 3 21:59:07 2014 (r271057) @@ -48,13 +48,25 @@ programs and configuration files used du .It Pa defaults/ default bootstrapping configuration files; see .Xr loader.conf 5 +.It Pa dtb/ +Compiled flattened device tree (FDT) files; see +.Xr fdt 4 +and +.Xr dtc 1 +.It Pa firmware/ +Loadable modules containing binary firmware for hardware that needs +firmware downloaded to it to function .It Pa kernel/ pure kernel executable (the operating system loaded into memory -at boot time). +at boot time) .It Pa modules/ third-party loadable kernel modules; see .Xr kldstat 8 +.It Pa zfs/ +Contains +.Xr zfs 8 +zpool cache files. .El .It Pa /cdrom/ default mount point for CD-ROM drives From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 23:04:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D11A3CD; Wed, 3 Sep 2014 23:04:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1888913E0; Wed, 3 Sep 2014 23:04:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83N4NS7021974; Wed, 3 Sep 2014 23:04:23 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83N4N2q021973; Wed, 3 Sep 2014 23:04:23 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201409032304.s83N4N2q021973@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 3 Sep 2014 23:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271058 - stable/10/sbin/camcontrol X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 23:04:24 -0000 Author: gavin Date: Wed Sep 3 23:04:23 2014 New Revision: 271058 URL: http://svnweb.freebsd.org/changeset/base/271058 Log: Merge 270872 from head: Fix character case in examples for "camcontrol security" - should be "-U user" not "-u user". PR: 193179 Submitted by: milios ccsys com Modified: stable/10/sbin/camcontrol/camcontrol.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.8 Wed Sep 3 21:59:07 2014 (r271057) +++ stable/10/sbin/camcontrol/camcontrol.8 Wed Sep 3 23:04:23 2014 (r271058) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 20, 2013 +.Dd August 31, 2014 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -1884,12 +1884,12 @@ camcontrol security ada0 .Pp Report security support and settings for ada0 .Bd -literal -offset indent -camcontrol security ada0 -u user -s MyPass +camcontrol security ada0 -U user -s MyPass .Ed .Pp Enable security on device ada0 with the password MyPass .Bd -literal -offset indent -camcontrol security ada0 -u user -e MyPass +camcontrol security ada0 -U user -e MyPass .Ed .Pp Secure erase ada0 which has had security enabled with user password MyPass From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 23:06:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 061E8523; Wed, 3 Sep 2014 23:06:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5C611442; Wed, 3 Sep 2014 23:06:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83N6MLi022330; Wed, 3 Sep 2014 23:06:22 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83N6M7l022329; Wed, 3 Sep 2014 23:06:22 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201409032306.s83N6M7l022329@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 3 Sep 2014 23:06:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r271059 - stable/9/sbin/camcontrol X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 23:06:23 -0000 Author: gavin Date: Wed Sep 3 23:06:22 2014 New Revision: 271059 URL: http://svnweb.freebsd.org/changeset/base/271059 Log: Merge 270872 from head: Fix character case in examples for "camcontrol security" - should be "-U user" not "-u user". PR: 193179 Submitted by: milios ccsys com Modified: stable/9/sbin/camcontrol/camcontrol.8 Directory Properties: stable/9/sbin/camcontrol/ (props changed) Modified: stable/9/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/9/sbin/camcontrol/camcontrol.8 Wed Sep 3 23:04:23 2014 (r271058) +++ stable/9/sbin/camcontrol/camcontrol.8 Wed Sep 3 23:06:22 2014 (r271059) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 24, 2013 +.Dd August 31, 2014 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -1580,12 +1580,12 @@ camcontrol security ada0 .Pp Report security support and settings for ada0 .Bd -literal -offset indent -camcontrol security ada0 -u user -s MyPass +camcontrol security ada0 -U user -s MyPass .Ed .Pp Enable security on device ada0 with the password MyPass .Bd -literal -offset indent -camcontrol security ada0 -u user -e MyPass +camcontrol security ada0 -U user -e MyPass .Ed .Pp Secure erase ada0 which has had security enabled with user password MyPass From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 23:08:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5D8068B; Wed, 3 Sep 2014 23:08:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C17991474; Wed, 3 Sep 2014 23:08:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83N8LY3022732; Wed, 3 Sep 2014 23:08:21 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83N8LGv022731; Wed, 3 Sep 2014 23:08:21 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201409032308.s83N8LGv022731@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 3 Sep 2014 23:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271060 - stable/10/sys/dev/pccbb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 23:08:22 -0000 Author: gavin Date: Wed Sep 3 23:08:21 2014 New Revision: 271060 URL: http://svnweb.freebsd.org/changeset/base/271060 Log: Merge r269488 from head: For reasons which are not clear, r254263 broke some PCMCIA and CardBus bridges in strange ways, either rendering them unable to detect insertion and removal events, or possibly unable to read from the device behind the bridge. This fixes at least one laptop, a Toshiba Tecra M5 with a Texas Instruments PCxx12 (d=0x8039 v=0c104c) bridge. The very similar Tecra M9 has the same bridge, but worked fine without this change. The bridge chip has no I/O port BAR, and there is nothing in the spec to suggest I/O decoding should be enabled; however enabling it fixes the issue. Add an XXX comment to this effect. Discussed with: jhb, imp Modified: stable/10/sys/dev/pccbb/pccbb_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- stable/10/sys/dev/pccbb/pccbb_pci.c Wed Sep 3 23:06:22 2014 (r271059) +++ stable/10/sys/dev/pccbb/pccbb_pci.c Wed Sep 3 23:08:21 2014 (r271060) @@ -472,6 +472,8 @@ cbb_chipinit(struct cbb_softc *sc) /* Enable memory access */ pci_enable_busmaster(sc->dev); + /* XXX: This should not be necessary, but some chipsets require it */ + PCI_MASK_CONFIG(sc->dev, PCIR_COMMAND, | PCIM_CMD_PORTEN, 2); /* disable Legacy IO */ switch (sc->chipset) { From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 23:08:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3BBC7D0; Wed, 3 Sep 2014 23:08:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF62D1483; Wed, 3 Sep 2014 23:08:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83N8mHU022830; Wed, 3 Sep 2014 23:08:48 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83N8mab022829; Wed, 3 Sep 2014 23:08:48 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201409032308.s83N8mab022829@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 3 Sep 2014 23:08:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r271061 - stable/9/sys/dev/pccbb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 23:08:49 -0000 Author: gavin Date: Wed Sep 3 23:08:48 2014 New Revision: 271061 URL: http://svnweb.freebsd.org/changeset/base/271061 Log: Merge r269488 from head: For reasons which are not clear, r254263 broke some PCMCIA and CardBus bridges in strange ways, either rendering them unable to detect insertion and removal events, or possibly unable to read from the device behind the bridge. This fixes at least one laptop, a Toshiba Tecra M5 with a Texas Instruments PCxx12 (d=0x8039 v=0c104c) bridge. The very similar Tecra M9 has the same bridge, but worked fine without this change. The bridge chip has no I/O port BAR, and there is nothing in the spec to suggest I/O decoding should be enabled; however enabling it fixes the issue. Add an XXX comment to this effect. Discussed with: jhb, imp Modified: stable/9/sys/dev/pccbb/pccbb_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- stable/9/sys/dev/pccbb/pccbb_pci.c Wed Sep 3 23:08:21 2014 (r271060) +++ stable/9/sys/dev/pccbb/pccbb_pci.c Wed Sep 3 23:08:48 2014 (r271061) @@ -472,6 +472,8 @@ cbb_chipinit(struct cbb_softc *sc) /* Enable memory access */ pci_enable_busmaster(sc->dev); + /* XXX: This should not be necessary, but some chipsets require it */ + PCI_MASK_CONFIG(sc->dev, PCIR_COMMAND, | PCIM_CMD_PORTEN, 2); /* disable Legacy IO */ switch (sc->chipset) { From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 23:11:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF36394A; Wed, 3 Sep 2014 23:11:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA8BB1560; Wed, 3 Sep 2014 23:11:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83NBd3J026738; Wed, 3 Sep 2014 23:11:39 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83NBdX4026737; Wed, 3 Sep 2014 23:11:39 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201409032311.s83NBdX4026737@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 3 Sep 2014 23:11:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271062 - stable/10/share/man/man3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 23:11:40 -0000 Author: gavin Date: Wed Sep 3 23:11:39 2014 New Revision: 271062 URL: http://svnweb.freebsd.org/changeset/base/271062 Log: Merge r269871 from head: Clarify descriptions of pthread_cond_wait() and pthread_cond_timedwait() Submitted by: Malcolm Douglas via freebsd-doc Reviewed by: jhb Modified: stable/10/share/man/man3/pthread.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man3/pthread.3 ============================================================================== --- stable/10/share/man/man3/pthread.3 Wed Sep 3 23:08:48 2014 (r271061) +++ stable/10/share/man/man3/pthread.3 Wed Sep 3 23:11:39 2014 (r271062) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2010 +.Dd August 12, 2014 .Dt PTHREAD 3 .Os .Sh NAME @@ -344,13 +344,13 @@ Unblock at least one of the threads bloc .Fa "const struct timespec *abstime" .Fc .Xc -Wait no longer than the specified time for a condition -and lock the specified mutex. +Unlock the specified mutex, wait no longer than the specified time for +a condition, and then relock the mutex. .It Xo .Ft int .Fn pthread_cond_wait "pthread_cond_t *" "pthread_mutex_t *mutex" .Xc -Wait for a condition and lock the specified mutex. +Unlock the specified mutex, wait for a condition, and relock the mutex. .El .Ss Read/Write Lock Routines .Bl -tag -width indent From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 23:11:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0B5FA27; Wed, 3 Sep 2014 23:11:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC8C01561; Wed, 3 Sep 2014 23:11:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83NBfHC026780; Wed, 3 Sep 2014 23:11:41 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83NBfFb026779; Wed, 3 Sep 2014 23:11:41 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201409032311.s83NBfFb026779@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 3 Sep 2014 23:11:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r271063 - stable/9/share/man/man3 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 23:11:41 -0000 Author: gavin Date: Wed Sep 3 23:11:41 2014 New Revision: 271063 URL: http://svnweb.freebsd.org/changeset/base/271063 Log: Merge r269871 from head: Clarify descriptions of pthread_cond_wait() and pthread_cond_timedwait() Submitted by: Malcolm Douglas via freebsd-doc Reviewed by: jhb Modified: stable/9/share/man/man3/pthread.3 Directory Properties: stable/9/share/man/man3/ (props changed) Modified: stable/9/share/man/man3/pthread.3 ============================================================================== --- stable/9/share/man/man3/pthread.3 Wed Sep 3 23:11:39 2014 (r271062) +++ stable/9/share/man/man3/pthread.3 Wed Sep 3 23:11:41 2014 (r271063) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 8, 2010 +.Dd August 12, 2014 .Dt PTHREAD 3 .Os .Sh NAME @@ -344,13 +344,13 @@ Unblock at least one of the threads bloc .Fa "const struct timespec *abstime" .Fc .Xc -Wait no longer than the specified time for a condition -and lock the specified mutex. +Unlock the specified mutex, wait no longer than the specified time for +a condition, and then relock the mutex. .It Xo .Ft int .Fn pthread_cond_wait "pthread_cond_t *" "pthread_mutex_t *mutex" .Xc -Wait for a condition and lock the specified mutex. +Unlock the specified mutex, wait for a condition, and relock the mutex. .El .Ss Read/Write Lock Routines .Bl -tag -width indent From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 23:14:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8AC60BD2; Wed, 3 Sep 2014 23:14:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 763C7158C; Wed, 3 Sep 2014 23:14:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83NERxo027197; Wed, 3 Sep 2014 23:14:27 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83NER2R027196; Wed, 3 Sep 2014 23:14:27 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201409032314.s83NER2R027196@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 3 Sep 2014 23:14:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271064 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 23:14:27 -0000 Author: gavin Date: Wed Sep 3 23:14:26 2014 New Revision: 271064 URL: http://svnweb.freebsd.org/changeset/base/271064 Log: Merge r270251 from head: Fix return type of callout_init_rm() and add return type to callout_deactivate(). PR: 192520 Submitted by: ngie Modified: stable/10/share/man/man9/timeout.9 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/timeout.9 ============================================================================== --- stable/10/share/man/man9/timeout.9 Wed Sep 3 23:11:41 2014 (r271063) +++ stable/10/share/man/man9/timeout.9 Wed Sep 3 23:14:26 2014 (r271064) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 23, 2013 +.Dd August 21, 2014 .Dt TIMEOUT 9 .Os .Sh NAME @@ -74,7 +74,7 @@ struct callout_handle handle = CALLOUT_H .Fn callout_init "struct callout *c" "int mpsafe" .Ft void .Fn callout_init_mtx "struct callout *c" "struct mtx *mtx" "int flags" -.Fn void +.Ft void .Fn callout_init_rm "struct callout *c" "struct rmlock *rm" "int flags" .Ft void .Fn callout_init_rw "struct callout *c" "struct rwlock *rw" "int flags" @@ -103,6 +103,7 @@ struct callout_handle handle = CALLOUT_H .Fn callout_pending "struct callout *c" .Ft int .Fn callout_active "struct callout *c" +.Ft void .Fn callout_deactivate "struct callout *c" .Sh DESCRIPTION The function From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 23:15:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9E87D47; Wed, 3 Sep 2014 23:15:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5AA415BA; Wed, 3 Sep 2014 23:15:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83NFsCS027471; Wed, 3 Sep 2014 23:15:54 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83NFsgt027470; Wed, 3 Sep 2014 23:15:54 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201409032315.s83NFsgt027470@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 3 Sep 2014 23:15:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271065 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 23:15:54 -0000 Author: gavin Date: Wed Sep 3 23:15:54 2014 New Revision: 271065 URL: http://svnweb.freebsd.org/changeset/base/271065 Log: Merge r270259 from head: Add a missing brace to callout_init_rm() to fix syntax. Modified: stable/10/sys/sys/callout.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/callout.h ============================================================================== --- stable/10/sys/sys/callout.h Wed Sep 3 23:14:26 2014 (r271064) +++ stable/10/sys/sys/callout.h Wed Sep 3 23:15:54 2014 (r271065) @@ -72,7 +72,7 @@ void _callout_init_lock(struct callout * _callout_init_lock((c), ((mtx) != NULL) ? &(mtx)->lock_object : \ NULL, (flags)) #define callout_init_rm(c, rm, flags) \ - _callout_init_lock((c), ((rm != NULL) ? &(rm)->lock_object : \ + _callout_init_lock((c), ((rm) != NULL) ? &(rm)->lock_object : \ NULL, (flags)) #define callout_init_rw(c, rw, flags) \ _callout_init_lock((c), ((rw) != NULL) ? &(rw)->lock_object : \ From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 23:18:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C4D9ED7; Wed, 3 Sep 2014 23:18:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7807E172B; Wed, 3 Sep 2014 23:18:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83NI9Jr027818; Wed, 3 Sep 2014 23:18:09 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83NI9JZ027817; Wed, 3 Sep 2014 23:18:09 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201409032318.s83NI9JZ027817@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 3 Sep 2014 23:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r271066 - stable/9/etc/pam.d X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 23:18:09 -0000 Author: gavin Date: Wed Sep 3 23:18:08 2014 New Revision: 271066 URL: http://svnweb.freebsd.org/changeset/base/271066 Log: Merge r270677 from head: Fix xref, pam(8) -> pam(3) PR: 193045 Submitted by: rsimmons0 gmail com Modified: stable/9/etc/pam.d/README Directory Properties: stable/9/etc/pam.d/ (props changed) Modified: stable/9/etc/pam.d/README ============================================================================== --- stable/9/etc/pam.d/README Wed Sep 3 23:15:54 2014 (r271065) +++ stable/9/etc/pam.d/README Wed Sep 3 23:18:08 2014 (r271066) @@ -8,7 +8,7 @@ particular service, the /etc/pam.d/other file does not exist, /etc/pam.conf is searched for entries matching the specified service or, failing that, the "other" service. -See the pam(8) manual page for an explanation of the workings of the +See the pam(3) manual page for an explanation of the workings of the PAM library and descriptions of the various files and modules. Below is a summary of the format for the pam.conf and /etc/pam.d/* files. From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 23:18:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5DF1A2; Wed, 3 Sep 2014 23:18:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 917341731; Wed, 3 Sep 2014 23:18:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83NIDOI027885; Wed, 3 Sep 2014 23:18:13 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83NID1x027884; Wed, 3 Sep 2014 23:18:13 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201409032318.s83NID1x027884@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 3 Sep 2014 23:18:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271067 - stable/10/etc/pam.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 23:18:13 -0000 Author: gavin Date: Wed Sep 3 23:18:13 2014 New Revision: 271067 URL: http://svnweb.freebsd.org/changeset/base/271067 Log: Merge r270677 from head: Fix xref, pam(8) -> pam(3) PR: 193045 Submitted by: rsimmons0 gmail com Modified: stable/10/etc/pam.d/README Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/pam.d/README ============================================================================== --- stable/10/etc/pam.d/README Wed Sep 3 23:18:08 2014 (r271066) +++ stable/10/etc/pam.d/README Wed Sep 3 23:18:13 2014 (r271067) @@ -8,7 +8,7 @@ particular service, the /etc/pam.d/other file does not exist, /etc/pam.conf is searched for entries matching the specified service or, failing that, the "other" service. -See the pam(8) manual page for an explanation of the workings of the +See the pam(3) manual page for an explanation of the workings of the PAM library and descriptions of the various files and modules. Below is a summary of the format for the pam.conf and /etc/pam.d/* files. From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 23:29:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 214195B4; Wed, 3 Sep 2014 23:29:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6E77185F; Wed, 3 Sep 2014 23:29:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83NT13Z032838; Wed, 3 Sep 2014 23:29:01 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83NT19l032835; Wed, 3 Sep 2014 23:29:01 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201409032329.s83NT19l032835@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 3 Sep 2014 23:29:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r271068 - stable/9/sys/dev/asmc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 23:29:02 -0000 Author: gavin Date: Wed Sep 3 23:29:01 2014 New Revision: 271068 URL: http://svnweb.freebsd.org/changeset/base/271068 Log: Merge r268303 from head: Add support to asmc(4) for Macmini 3,1. PR: 190195 Submitted by: fbsdbugs2 sentry.org Relnotes: yes Modified: stable/9/sys/dev/asmc/asmc.c stable/9/sys/dev/asmc/asmcvar.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/asmc/asmc.c ============================================================================== --- stable/9/sys/dev/asmc/asmc.c Wed Sep 3 23:18:13 2014 (r271067) +++ stable/9/sys/dev/asmc/asmc.c Wed Sep 3 23:29:01 2014 (r271068) @@ -206,6 +206,15 @@ struct asmc_model asmc_models[] = { ASMC_MM_TEMPS, ASMC_MM_TEMPNAMES, ASMC_MM_TEMPDESCS }, + /* The Mac Mini 3,1 has no SMS */ + { + "Macmini3,1", "Apple SMC Mac Mini 3,1", + NULL, NULL, NULL, + ASMC_FAN_FUNCS, + NULL, NULL, NULL, + ASMC_MM31_TEMPS, ASMC_MM31_TEMPNAMES, ASMC_MM31_TEMPDESCS + }, + /* Idem for the MacPro */ { "MacPro2", "Apple SMC Mac Pro (8-core)", Modified: stable/9/sys/dev/asmc/asmcvar.h ============================================================================== --- stable/9/sys/dev/asmc/asmcvar.h Wed Sep 3 23:18:13 2014 (r271067) +++ stable/9/sys/dev/asmc/asmcvar.h Wed Sep 3 23:29:01 2014 (r271068) @@ -180,6 +180,25 @@ struct asmc_softc { #define ASMC_MM_TEMPDESCS { "Northbridge Point 1", \ "Northbridge Point 2" } +#define ASMC_MM31_TEMPS { "TC0D", "TC0H", \ + "TC0P", "TH0P", \ + "TN0D", "TN0P", \ + "TW0P", NULL } + +#define ASMC_MM31_TEMPNAMES { "cpu0_die", "cpu0_heatsink", \ + "cpu0_proximity", "hdd_bay", \ + "northbridge_die", \ + "northbridge_proximity", \ + "wireless_module", } + +#define ASMC_MM31_TEMPDESCS { "CPU0 Die Core Temperature", \ + "CPU0 Heatsink Temperature", \ + "CPU0 Proximity Temperature", \ + "HDD Bay Temperature", \ + "Northbridge Die Core Temperature", \ + "Northbridge Proximity Temperature", \ + "Wireless Module Temperature", } + #define ASMC_MP_TEMPS { "TA0P", "TCAG", "TCAH", "TCBG", "TCBH", \ "TC0C", "TC0D", "TC0P", "TC1C", "TC1D", \ "TC2C", "TC2D", "TC3C", "TC3D", "THTG", \ From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 23:29:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02F1C6E7; Wed, 3 Sep 2014 23:29:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA5031861; Wed, 3 Sep 2014 23:29:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s83NT63K032906; Wed, 3 Sep 2014 23:29:06 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s83NT65p032903; Wed, 3 Sep 2014 23:29:06 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201409032329.s83NT65p032903@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 3 Sep 2014 23:29:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271069 - stable/10/sys/dev/asmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 23:29:07 -0000 Author: gavin Date: Wed Sep 3 23:29:06 2014 New Revision: 271069 URL: http://svnweb.freebsd.org/changeset/base/271069 Log: Merge r268303 from head: Add support to asmc(4) for Macmini 3,1. PR: 190195 Submitted by: fbsdbugs2 sentry.org Relnotes: yes Modified: stable/10/sys/dev/asmc/asmc.c stable/10/sys/dev/asmc/asmcvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/asmc/asmc.c ============================================================================== --- stable/10/sys/dev/asmc/asmc.c Wed Sep 3 23:29:01 2014 (r271068) +++ stable/10/sys/dev/asmc/asmc.c Wed Sep 3 23:29:06 2014 (r271069) @@ -206,6 +206,15 @@ struct asmc_model asmc_models[] = { ASMC_MM_TEMPS, ASMC_MM_TEMPNAMES, ASMC_MM_TEMPDESCS }, + /* The Mac Mini 3,1 has no SMS */ + { + "Macmini3,1", "Apple SMC Mac Mini 3,1", + NULL, NULL, NULL, + ASMC_FAN_FUNCS, + NULL, NULL, NULL, + ASMC_MM31_TEMPS, ASMC_MM31_TEMPNAMES, ASMC_MM31_TEMPDESCS + }, + /* Idem for the MacPro */ { "MacPro2", "Apple SMC Mac Pro (8-core)", Modified: stable/10/sys/dev/asmc/asmcvar.h ============================================================================== --- stable/10/sys/dev/asmc/asmcvar.h Wed Sep 3 23:29:01 2014 (r271068) +++ stable/10/sys/dev/asmc/asmcvar.h Wed Sep 3 23:29:06 2014 (r271069) @@ -180,6 +180,25 @@ struct asmc_softc { #define ASMC_MM_TEMPDESCS { "Northbridge Point 1", \ "Northbridge Point 2" } +#define ASMC_MM31_TEMPS { "TC0D", "TC0H", \ + "TC0P", "TH0P", \ + "TN0D", "TN0P", \ + "TW0P", NULL } + +#define ASMC_MM31_TEMPNAMES { "cpu0_die", "cpu0_heatsink", \ + "cpu0_proximity", "hdd_bay", \ + "northbridge_die", \ + "northbridge_proximity", \ + "wireless_module", } + +#define ASMC_MM31_TEMPDESCS { "CPU0 Die Core Temperature", \ + "CPU0 Heatsink Temperature", \ + "CPU0 Proximity Temperature", \ + "HDD Bay Temperature", \ + "Northbridge Die Core Temperature", \ + "Northbridge Proximity Temperature", \ + "Wireless Module Temperature", } + #define ASMC_MP_TEMPS { "TA0P", "TCAG", "TCAH", "TCBG", "TCBH", \ "TC0C", "TC0D", "TC0P", "TC1C", "TC1D", \ "TC2C", "TC2D", "TC3C", "TC3D", "THTG", \ From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 00:10:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C71FA344; Thu, 4 Sep 2014 00:10:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B324E1CA8; Thu, 4 Sep 2014 00:10:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s840A6Hm052682; Thu, 4 Sep 2014 00:10:06 GMT (envelope-from benno@FreeBSD.org) Received: (from benno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s840A6Jf052681; Thu, 4 Sep 2014 00:10:06 GMT (envelope-from benno@FreeBSD.org) Message-Id: <201409040010.s840A6Jf052681@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: benno set sender to benno@FreeBSD.org using -f From: Benno Rice Date: Thu, 4 Sep 2014 00:10:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271070 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 00:10:06 -0000 Author: benno Date: Thu Sep 4 00:10:06 2014 New Revision: 271070 URL: http://svnweb.freebsd.org/changeset/base/271070 Log: Add KASSERTs to catch the case where a developer may have forgotten to set bo_bsize on a bufobj. This is a slight modification of the patch provided. PR: 193146 Submitted by: Conrad Meyer Sponsored by: EMC Isilon Storage Division Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Wed Sep 3 23:29:06 2014 (r271069) +++ head/sys/kern/vfs_bio.c Thu Sep 4 00:10:06 2014 (r271070) @@ -2971,6 +2971,7 @@ bp_unmapped_get_kva(struct buf *bp, dadd * if the buffer was mapped. */ bsize = vn_isdisk(bp->b_vp, NULL) ? DEV_BSIZE : bp->b_bufobj->bo_bsize; + KASSERT(bsize != 0, ("bsize == 0, check bo->bo_bsize")); offset = blkno * bsize; maxsize = size + (offset & PAGE_MASK); maxsize = imax(maxsize, bsize); @@ -3220,6 +3221,7 @@ loop: return NULL; bsize = vn_isdisk(vp, NULL) ? DEV_BSIZE : bo->bo_bsize; + KASSERT(bsize != 0, ("bsize == 0, check bo->bo_bsize")); offset = blkno * bsize; vmio = vp->v_object != NULL; if (vmio) { From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 00:40:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7269C995; Thu, 4 Sep 2014 00:40:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D5EF1FA4; Thu, 4 Sep 2014 00:40:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s840egmn067675; Thu, 4 Sep 2014 00:40:42 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s840efgO067671; Thu, 4 Sep 2014 00:40:41 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201409040040.s840efgO067671@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 4 Sep 2014 00:40:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271071 - in stable/10/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 00:40:42 -0000 Author: pfg Date: Thu Sep 4 00:40:41 2014 New Revision: 271071 URL: http://svnweb.freebsd.org/changeset/base/271071 Log: MFC r270844: Minor space/tab cleanups. Most of them were ripped from the GSoC 2104 SMAP + kpatch project (but unrelated). Only cosmetic changes. Taken from: Oliver Pinter (op@) Modified: stable/10/sys/amd64/amd64/support.S stable/10/sys/i386/i386/db_disasm.c stable/10/sys/i386/i386/support.s Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/support.S ============================================================================== --- stable/10/sys/amd64/amd64/support.S Thu Sep 4 00:10:06 2014 (r271070) +++ stable/10/sys/amd64/amd64/support.S Thu Sep 4 00:40:41 2014 (r271071) @@ -59,7 +59,7 @@ ENTRY(bzero) stosb ret END(bzero) - + /* Address: %rdi */ ENTRY(pagezero) movq $-PAGE_SIZE,%rdx @@ -137,7 +137,7 @@ ENTRY(bcopy) cld ret END(bcopy) - + /* * Note: memcpy does not support overlapping copies */ @@ -181,10 +181,10 @@ ENTRY(pagecopy) ret END(pagecopy) -/* fillw(pat, base, cnt) */ +/* fillw(pat, base, cnt) */ /* %rdi,%rsi, %rdx */ ENTRY(fillw) - movq %rdi,%rax + movq %rdi,%rax movq %rsi,%rdi movq %rdx,%rcx cld @@ -388,7 +388,7 @@ ENTRY(fuword) movq (%rdi),%rax movq $0,PCB_ONFAULT(%rcx) ret -END(fuword64) +END(fuword64) END(fuword) ENTRY(fuword32) Modified: stable/10/sys/i386/i386/db_disasm.c ============================================================================== --- stable/10/sys/i386/i386/db_disasm.c Thu Sep 4 00:10:06 2014 (r271070) +++ stable/10/sys/i386/i386/db_disasm.c Thu Sep 4 00:40:41 2014 (r271071) @@ -782,7 +782,7 @@ static const struct inst db_inst_table[2 /*c7*/ { "mov", TRUE, LONG, op2(I, E), 0 }, /*c8*/ { "enter", FALSE, NONE, op2(Iw, Ib), 0 }, -/*c9*/ { "leave", FALSE, NONE, 0, 0 }, +/*c9*/ { "leave", FALSE, NONE, 0, 0 }, /*ca*/ { "lret", FALSE, NONE, op1(Iw), 0 }, /*cb*/ { "lret", FALSE, NONE, 0, 0 }, /*cc*/ { "int", FALSE, NONE, op1(o3), 0 }, @@ -1266,7 +1266,7 @@ db_disasm(loc, altfmt) case 0xc8: i_name = "monitor"; i_size = NONE; - i_mode = 0; + i_mode = 0; break; case 0xc9: i_name = "mwait"; Modified: stable/10/sys/i386/i386/support.s ============================================================================== --- stable/10/sys/i386/i386/support.s Thu Sep 4 00:10:06 2014 (r271070) +++ stable/10/sys/i386/i386/support.s Thu Sep 4 00:40:41 2014 (r271071) @@ -62,8 +62,8 @@ ENTRY(bzero) stosb popl %edi ret -END(bzero) - +END(bzero) + ENTRY(sse2_pagezero) pushl %ebx movl 8(%esp),%ecx @@ -694,7 +694,7 @@ ENTRY(lgdt) movl 4(%esp),%eax lgdt (%eax) #endif - + /* flush the prefetch q */ jmp 1f nop @@ -740,13 +740,13 @@ END(ssdtosd) /* void reset_dbregs() */ ENTRY(reset_dbregs) - movl $0,%eax - movl %eax,%dr7 /* disable all breapoints first */ - movl %eax,%dr0 - movl %eax,%dr1 - movl %eax,%dr2 - movl %eax,%dr3 - movl %eax,%dr6 + movl $0,%eax + movl %eax,%dr7 /* disable all breakpoints first */ + movl %eax,%dr0 + movl %eax,%dr1 + movl %eax,%dr2 + movl %eax,%dr3 + movl %eax,%dr6 ret END(reset_dbregs) From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 00:43:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78AF2AD2; Thu, 4 Sep 2014 00:43:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63CAD1FBB; Thu, 4 Sep 2014 00:43:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s840hS3O070316; Thu, 4 Sep 2014 00:43:28 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s840hRAO070311; Thu, 4 Sep 2014 00:43:27 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201409040043.s840hRAO070311@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 4 Sep 2014 00:43:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r271072 - in stable/9/sys: amd64/amd64 i386/i386 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 00:43:28 -0000 Author: pfg Date: Thu Sep 4 00:43:27 2014 New Revision: 271072 URL: http://svnweb.freebsd.org/changeset/base/271072 Log: MFC r270844: Minor space/tab cleanups. Most of them were ripped from the GSoC 2104 SMAP + kpatch project (but unrelated). Only cosmetic changes. Taken from: Oliver Pinter (op@) Modified: stable/9/sys/amd64/amd64/support.S stable/9/sys/i386/i386/db_disasm.c stable/9/sys/i386/i386/support.s Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/support.S ============================================================================== --- stable/9/sys/amd64/amd64/support.S Thu Sep 4 00:40:41 2014 (r271071) +++ stable/9/sys/amd64/amd64/support.S Thu Sep 4 00:43:27 2014 (r271072) @@ -59,7 +59,7 @@ ENTRY(bzero) stosb ret END(bzero) - + /* Address: %rdi */ ENTRY(pagezero) movq $-PAGE_SIZE,%rdx @@ -137,7 +137,7 @@ ENTRY(bcopy) cld ret END(bcopy) - + /* * Note: memcpy does not support overlapping copies */ @@ -181,10 +181,10 @@ ENTRY(pagecopy) ret END(pagecopy) -/* fillw(pat, base, cnt) */ +/* fillw(pat, base, cnt) */ /* %rdi,%rsi, %rdx */ ENTRY(fillw) - movq %rdi,%rax + movq %rdi,%rax movq %rsi,%rdi movq %rdx,%rcx cld @@ -388,7 +388,7 @@ ENTRY(fuword) movq (%rdi),%rax movq $0,PCB_ONFAULT(%rcx) ret -END(fuword64) +END(fuword64) END(fuword) ENTRY(fuword32) Modified: stable/9/sys/i386/i386/db_disasm.c ============================================================================== --- stable/9/sys/i386/i386/db_disasm.c Thu Sep 4 00:40:41 2014 (r271071) +++ stable/9/sys/i386/i386/db_disasm.c Thu Sep 4 00:43:27 2014 (r271072) @@ -782,7 +782,7 @@ static const struct inst db_inst_table[2 /*c7*/ { "mov", TRUE, LONG, op2(I, E), 0 }, /*c8*/ { "enter", FALSE, NONE, op2(Iw, Ib), 0 }, -/*c9*/ { "leave", FALSE, NONE, 0, 0 }, +/*c9*/ { "leave", FALSE, NONE, 0, 0 }, /*ca*/ { "lret", FALSE, NONE, op1(Iw), 0 }, /*cb*/ { "lret", FALSE, NONE, 0, 0 }, /*cc*/ { "int", FALSE, NONE, op1(o3), 0 }, @@ -1266,7 +1266,7 @@ db_disasm(loc, altfmt) case 0xc8: i_name = "monitor"; i_size = NONE; - i_mode = 0; + i_mode = 0; break; case 0xc9: i_name = "mwait"; Modified: stable/9/sys/i386/i386/support.s ============================================================================== --- stable/9/sys/i386/i386/support.s Thu Sep 4 00:40:41 2014 (r271071) +++ stable/9/sys/i386/i386/support.s Thu Sep 4 00:43:27 2014 (r271072) @@ -62,8 +62,8 @@ ENTRY(bzero) stosb popl %edi ret -END(bzero) - +END(bzero) + ENTRY(sse2_pagezero) pushl %ebx movl 8(%esp),%ecx @@ -694,7 +694,7 @@ ENTRY(lgdt) movl 4(%esp),%eax lgdt (%eax) #endif - + /* flush the prefetch q */ jmp 1f nop @@ -740,13 +740,13 @@ END(ssdtosd) /* void reset_dbregs() */ ENTRY(reset_dbregs) - movl $0,%eax - movl %eax,%dr7 /* disable all breapoints first */ - movl %eax,%dr0 - movl %eax,%dr1 - movl %eax,%dr2 - movl %eax,%dr3 - movl %eax,%dr6 + movl $0,%eax + movl %eax,%dr7 /* disable all breakpoints first */ + movl %eax,%dr0 + movl %eax,%dr1 + movl %eax,%dr2 + movl %eax,%dr3 + movl %eax,%dr6 ret END(reset_dbregs) From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 01:04:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20A20192; Thu, 4 Sep 2014 01:04:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7A2E1239; Thu, 4 Sep 2014 01:04:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8414bBB079686; Thu, 4 Sep 2014 01:04:37 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8414bar079685; Thu, 4 Sep 2014 01:04:37 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201409040104.s8414bar079685@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Thu, 4 Sep 2014 01:04:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271073 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 01:04:38 -0000 Author: yongari Date: Thu Sep 4 01:04:37 2014 New Revision: 271073 URL: http://svnweb.freebsd.org/changeset/base/271073 Log: Do not blindly announce 1000baseT half-duplex capability in autonegotiation. Some controllers like cgem(4) do not support half-duplex at gigabit speeds. Modified: head/sys/dev/mii/e1000phy.c Modified: head/sys/dev/mii/e1000phy.c ============================================================================== --- head/sys/dev/mii/e1000phy.c Thu Sep 4 00:43:27 2014 (r271072) +++ head/sys/dev/mii/e1000phy.c Thu Sep 4 01:04:37 2014 (r271073) @@ -169,8 +169,12 @@ e1000phy_attach(device_t dev) PHY_RESET(sc); sc->mii_capabilities = PHY_READ(sc, MII_BMSR) & sc->mii_capmask; - if (sc->mii_capabilities & BMSR_EXTSTAT) + if (sc->mii_capabilities & BMSR_EXTSTAT) { sc->mii_extcapabilities = PHY_READ(sc, MII_EXTSR); + if ((sc->mii_extcapabilities & + (EXTSR_1000TFDX | EXTSR_1000THDX)) != 0) + sc->mii_flags |= MIIF_HAVE_GTCR; + } device_printf(dev, " "); mii_phy_add_media(sc); printf("\n"); @@ -319,8 +323,7 @@ e1000phy_service(struct mii_softc *sc, s speed = 0; switch (IFM_SUBTYPE(ife->ifm_media)) { case IFM_1000_T: - if ((sc->mii_extcapabilities & - (EXTSR_1000TFDX | EXTSR_1000THDX)) == 0) + if ((sc->mii_flags & MIIF_HAVE_GTCR) == 0) return (EINVAL); speed = E1000_CR_SPEED_1000; break; @@ -357,10 +360,9 @@ e1000phy_service(struct mii_softc *sc, s if (IFM_SUBTYPE(ife->ifm_media) == IFM_1000_T) { gig |= E1000_1GCR_MS_ENABLE; - if ((ife->ifm_media & IFM_ETH_MASTER) != 0) + if ((ife->ifm_media & IFM_ETH_MASTER) != 0) gig |= E1000_1GCR_MS_VALUE; - } else if ((sc->mii_extcapabilities & - (EXTSR_1000TFDX | EXTSR_1000THDX)) != 0) + } else if ((sc->mii_flags & MIIF_HAVE_GTCR) != 0) gig = 0; PHY_WRITE(sc, E1000_1GCR, gig); PHY_WRITE(sc, E1000_AR, E1000_AR_SELECTOR_FIELD); @@ -485,9 +487,14 @@ e1000phy_mii_phy_auto(struct mii_softc * PHY_WRITE(sc, E1000_AR, reg | E1000_AR_SELECTOR_FIELD); } else PHY_WRITE(sc, E1000_AR, E1000_FA_1000X_FD | E1000_FA_1000X); - if ((sc->mii_extcapabilities & (EXTSR_1000TFDX | EXTSR_1000THDX)) != 0) - PHY_WRITE(sc, E1000_1GCR, - E1000_1GCR_1000T_FD | E1000_1GCR_1000T); + if ((sc->mii_flags & MIIF_HAVE_GTCR) != 0) { + reg = 0; + if ((sc->mii_extcapabilities & EXTSR_1000TFDX) != 0) + reg |= E1000_1GCR_1000T_FD; + if ((sc->mii_extcapabilities & EXTSR_1000THDX) != 0) + reg |= E1000_1GCR_1000T; + PHY_WRITE(sc, E1000_1GCR, reg); + } PHY_WRITE(sc, E1000_CR, E1000_CR_AUTO_NEG_ENABLE | E1000_CR_RESTART_AUTO_NEG); From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 01:18:42 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13B54565; Thu, 4 Sep 2014 01:18:42 +0000 (UTC) Received: from smtp1.multiplay.co.uk (smtp1.multiplay.co.uk [85.236.96.35]) by mx1.freebsd.org (Postfix) with ESMTP id A01011335; Thu, 4 Sep 2014 01:18:41 +0000 (UTC) Received: by smtp1.multiplay.co.uk (Postfix, from userid 65534) id 2614C20E7088A; Thu, 4 Sep 2014 01:18:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.multiplay.co.uk X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=8.0 tests=AWL,BAYES_00,DOS_OE_TO_MX, FSL_HELO_NON_FQDN_1,RDNS_DYNAMIC,STOX_REPLY_TYPE,TVD_FINGER_02 autolearn=no version=3.3.1 Received: from r2d2 (82-69-141-170.dsl.in-addr.zen.co.uk [82.69.141.170]) by smtp1.multiplay.co.uk (Postfix) with ESMTPS id 734B020E70885; Thu, 4 Sep 2014 01:18:31 +0000 (UTC) Message-ID: <86292055B4114529874B693EEB441CB6@multiplay.co.uk> From: "Steven Hartland" To: "Andriy Gapon" , "Nikolai Lifanov" , "John Baldwin" References: <201408281950.s7SJo90I047213@svn.freebsd.org> <169C94ED141B435BACEADB04A4824717@multiplay.co.uk> <54072E20.10802@mail.lifanov.com> <2230377.GgKARkJyaG@ralph.baldwin.cx> <540778A2.3080809@mail.lifanov.com> <5407816B.9000401@FreeBSD.org> Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm Date: Thu, 4 Sep 2014 02:18:33 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="Windows-1252"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Mailman-Approved-At: Thu, 04 Sep 2014 01:19:46 +0000 Cc: src-committers@FreeBSD.org, Peter Wemm , Alan Cox , svn-src-all@FreeBSD.org, Dmitry Morozovsky , "Matthew D. Fuller" , svn-src-head@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 01:18:42 -0000 ----- Original Message ----- From: "Andriy Gapon" > on 03/09/2014 23:22 Nikolai Lifanov said the following: >> On 09/03/14 15:22, John Baldwin wrote: >>> On Wednesday, September 03, 2014 11:05:04 AM Nikolai Lifanov wrote: >>>> On 09/03/14 04:09, Steven Hartland wrote: >>>>> I'm looking to MFC this change so wanted to check if >>>>> anyone had an final feedback / objections? >>>>> >>>>> I know we currently have Alan's feedback on changing >>>>> the #ifdef __i386__ to #ifndef UMA_MD_SMALL_ALLOC >>>>> which sounds sensible but waiting Peter to comment on. >>>>> >>>>> Regards >>>>> Steve >>>> >>>> I have no technical input, but this change improves ARC usefulness for >>>> me quite a bit. I would like to see the improvement in 10-STABLE. >>> >>> Can you verify that the current 10-STABLE (as of today) with all the various >>> pagedaemon fixes still has ARC issues for your workload? >>> >> >> It doesn't have any issues, but I noticed the improvement on CURRENT. I >> observed that just after this change, my package builder is much more >> likely to retain MFU and not evict useful things from there (the port >> tree) after large builds. >> However, I run a lot more 10.0-RELEASE than CURRENT and I would like to >> see this improvement release-bound. >> >> I would be happy to test this on 10-STABLE if you think that this is >> relevant. > > > As noted before, unfortunately, this commit (plus its fixups) contains at least > two related but distinct changes. So, to separate the wheat from the chaff, > could you please try to comment out the following block in > sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c, function arc_reclaim_needed: > > if (kmem_free_count() < zfs_arc_free_target) { > DTRACE_PROBE2(arc__reclaim_freetarget, uint64_t, > kmem_free_count(), uint64_t, zfs_arc_free_target); > return (1); > } > > Alternatively, I think that the same effect can be achieved by setting sysctl > vfs.zfs.arc_free_target to the same value as vm.stats.vm.v_free_min. Thats correct that would achieve the same thing. > It's interesting to me whether you would still see the better performance or if > that improvement would be undone. Indeed that would be interesting, but we might find that its quite memory size dependent given the scaling so confirming HW details would be nice too. I'd also be interested to know who wins the free race between the VM and ARC when using that value. For those following this thread but not the review, I've added some additional information there which you might be interested in: https://reviews.freebsd.org/D702 Regards Steve From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 01:21:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFD2A6BC; Thu, 4 Sep 2014 01:21:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBD4A13CD; Thu, 4 Sep 2014 01:21:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s841LXMS088087; Thu, 4 Sep 2014 01:21:33 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s841LXRq088086; Thu, 4 Sep 2014 01:21:33 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201409040121.s841LXRq088086@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 4 Sep 2014 01:21:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271074 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 01:21:34 -0000 Author: mjg Date: Thu Sep 4 01:21:33 2014 New Revision: 271074 URL: http://svnweb.freebsd.org/changeset/base/271074 Log: Plug a hypothetical use after free in sysctl kern.proc.groups. MFC after: 1 week Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Thu Sep 4 01:04:37 2014 (r271073) +++ head/sys/kern/kern_proc.c Thu Sep 4 01:21:33 2014 (r271074) @@ -2508,6 +2508,7 @@ sysctl_kern_proc_groups(SYSCTL_HANDLER_A return (EINVAL); if (*pidp == -1) { /* -1 means this process */ p = req->td->td_proc; + PROC_LOCK(p); } else { error = pget(*pidp, PGET_CANSEE, &p); if (error != 0) @@ -2515,8 +2516,7 @@ sysctl_kern_proc_groups(SYSCTL_HANDLER_A } cred = crhold(p->p_ucred); - if (*pidp != -1) - PROC_UNLOCK(p); + PROC_UNLOCK(p); error = SYSCTL_OUT(req, cred->cr_groups, cred->cr_ngroups * sizeof(gid_t)); From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 01:38:32 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A4C58C4; Thu, 4 Sep 2014 01:38:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF9D51512; Thu, 4 Sep 2014 01:38:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s841cVhc093948; Thu, 4 Sep 2014 01:38:31 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s841cVWl093945; Thu, 4 Sep 2014 01:38:31 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201409040138.s841cVWl093945@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Thu, 4 Sep 2014 01:38:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271075 - in stable/10: sbin/mksnap_ffs sbin/shutdown usr.sbin/ppp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 01:38:32 -0000 Author: neel Date: Thu Sep 4 01:38:31 2014 New Revision: 271075 URL: http://svnweb.freebsd.org/changeset/base/271075 Log: MFC r270289: Change file permissions for some setuid executables so they are "o+r". The executable itself doesn't contain any privileged information. An example of where this is useful is when makefs(8) is creating an image that includes /sbin/shutdown. This can now be done without root privileges. Modified: stable/10/sbin/mksnap_ffs/Makefile stable/10/sbin/shutdown/Makefile stable/10/usr.sbin/ppp/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/mksnap_ffs/Makefile ============================================================================== --- stable/10/sbin/mksnap_ffs/Makefile Thu Sep 4 01:21:33 2014 (r271074) +++ stable/10/sbin/mksnap_ffs/Makefile Thu Sep 4 01:38:31 2014 (r271075) @@ -10,9 +10,9 @@ WARNS?= 2 CFLAGS+=-I${.CURDIR}/../mount .if defined(NOSUID) -BINMODE=550 +BINMODE=554 .else -BINMODE=4550 +BINMODE=4554 BINOWN= root .endif BINGRP= operator Modified: stable/10/sbin/shutdown/Makefile ============================================================================== --- stable/10/sbin/shutdown/Makefile Thu Sep 4 01:21:33 2014 (r271074) +++ stable/10/sbin/shutdown/Makefile Thu Sep 4 01:38:31 2014 (r271075) @@ -8,6 +8,6 @@ MLINKS= shutdown.8 poweroff.8 BINOWN= root BINGRP= operator -BINMODE=4550 +BINMODE=4554 .include Modified: stable/10/usr.sbin/ppp/Makefile ============================================================================== --- stable/10/usr.sbin/ppp/Makefile Thu Sep 4 01:21:33 2014 (r271074) +++ stable/10/usr.sbin/ppp/Makefile Thu Sep 4 01:38:31 2014 (r271075) @@ -33,9 +33,9 @@ PPP_NO_PAM= .endif .if defined(PPP_NO_SUID) -BINMODE=550 +BINMODE=554 .else -BINMODE=4550 +BINMODE=4554 BINOWN= root .endif BINGRP= network From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 01:46:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49464B1D; Thu, 4 Sep 2014 01:46:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29449173B; Thu, 4 Sep 2014 01:46:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s841k9iA098250; Thu, 4 Sep 2014 01:46:09 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s841k7uo098240; Thu, 4 Sep 2014 01:46:07 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409040146.s841k7uo098240@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 4 Sep 2014 01:46:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 01:46:09 -0000 Author: jhb Date: Thu Sep 4 01:46:06 2014 New Revision: 271076 URL: http://svnweb.freebsd.org/changeset/base/271076 Log: - Move prototypes for various functions into out of C files and into . - Move some CPU-related variables out of i386/i386/identcpu.c to initcpu.c to match amd64. - Move the declaration of has_f00f_hack out of identcpu.c to machdep.c. - Remove a misleading comment from i386/i386/initcpu.c (locore zeros the BSS before it calls identify_cpu()) and remove explicit zero assignments to reduce the diff with amd64. Modified: head/sys/amd64/amd64/identcpu.c head/sys/amd64/amd64/machdep.c head/sys/amd64/include/md_var.h head/sys/i386/i386/identcpu.c head/sys/i386/i386/initcpu.c head/sys/i386/i386/machdep.c head/sys/i386/i386/trap.c head/sys/i386/include/md_var.h head/sys/pc98/pc98/machdep.c Modified: head/sys/amd64/amd64/identcpu.c ============================================================================== --- head/sys/amd64/amd64/identcpu.c Thu Sep 4 01:38:31 2014 (r271075) +++ head/sys/amd64/amd64/identcpu.c Thu Sep 4 01:46:06 2014 (r271076) @@ -64,15 +64,8 @@ __FBSDID("$FreeBSD$"); #include #include -/* XXX - should be in header file: */ -void printcpuinfo(void); -void identify_cpu(void); -void earlysetcpuclass(void); -void panicifcpuunsupported(void); - static u_int find_cpu_vendor_id(void); static void print_AMD_info(void); -static void print_AMD_assoc(int i); static void print_via_padlock_info(void); static void print_vmx_info(void); Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Thu Sep 4 01:38:31 2014 (r271075) +++ head/sys/amd64/amd64/machdep.c Thu Sep 4 01:46:06 2014 (r271076) @@ -151,10 +151,6 @@ CTASSERT(offsetof(struct pcpu, pc_curthr extern u_int64_t hammer_time(u_int64_t, u_int64_t); -extern void printcpuinfo(void); /* XXX header file */ -extern void identify_cpu(void); -extern void panicifcpuunsupported(void); - #define CS_SECURE(cs) (ISPL(cs) == SEL_UPL) #define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) Modified: head/sys/amd64/include/md_var.h ============================================================================== --- head/sys/amd64/include/md_var.h Thu Sep 4 01:38:31 2014 (r271075) +++ head/sys/amd64/include/md_var.h Thu Sep 4 01:46:06 2014 (r271076) @@ -105,14 +105,17 @@ void fsbase_load_fault(void) __asm(__STR void gsbase_load_fault(void) __asm(__STRING(gsbase_load_fault)); void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); +void identify_cpu(void); void initializecpu(void); void initializecpucache(void); void fillw(int /*u_short*/ pat, void *base, size_t cnt); void fpstate_drop(struct thread *td); int is_physical_memory(vm_paddr_t addr); int isa_nmi(int cd); +void panicifcpuunsupported(void); void pagecopy(void *from, void *to); void pagezero(void *addr); +void printcpuinfo(void); void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int ist); int user_dbreg_trap(void); void minidumpsys(struct dumperinfo *); Modified: head/sys/i386/i386/identcpu.c ============================================================================== --- head/sys/i386/i386/identcpu.c Thu Sep 4 01:38:31 2014 (r271075) +++ head/sys/i386/i386/identcpu.c Thu Sep 4 01:46:06 2014 (r271076) @@ -64,30 +64,16 @@ __FBSDID("$FreeBSD$"); #define IDENTBLUE_IBMCPU 1 #define IDENTBLUE_CYRIXM2 2 -/* XXX - should be in header file: */ -void printcpuinfo(void); -void finishidentcpu(void); -void earlysetcpuclass(void); -#if defined(I586_CPU) && defined(CPU_WT_ALLOC) -void enable_K5_wt_alloc(void); -void enable_K6_wt_alloc(void); -void enable_K6_2_wt_alloc(void); -#endif -void panicifcpuunsupported(void); - static void identifycyrix(void); static void init_exthigh(void); static u_int find_cpu_vendor_id(void); static void print_AMD_info(void); static void print_INTEL_info(void); static void print_INTEL_TLB(u_int data); -static void print_AMD_assoc(int i); static void print_transmeta_info(void); static void print_via_padlock_info(void); int cpu_class; -u_int cpu_exthigh; /* Highest arg to extended CPUID */ -u_int cyrix_did; /* Device ID of Cyrix CPU */ char machine[] = MACHINE; SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, "Machine class"); @@ -161,10 +147,6 @@ static struct { #endif }; -#if defined(I586_CPU) && !defined(NO_F00F_HACK) -int has_f00f_bug = 0; /* Initialized so that it can be patched. */ -#endif - static void init_exthigh(void) { Modified: head/sys/i386/i386/initcpu.c ============================================================================== --- head/sys/i386/i386/initcpu.c Thu Sep 4 01:38:31 2014 (r271075) +++ head/sys/i386/i386/initcpu.c Thu Sep 4 01:46:06 2014 (r271076) @@ -48,12 +48,6 @@ __FBSDID("$FreeBSD$"); #define CPU_ENABLE_SSE #endif -#if defined(I586_CPU) && defined(CPU_WT_ALLOC) -void enable_K5_wt_alloc(void); -void enable_K6_wt_alloc(void); -void enable_K6_2_wt_alloc(void); -#endif - #ifdef I486_CPU static void init_5x86(void); static void init_bluelightning(void); @@ -81,36 +75,36 @@ SYSCTL_INT(_hw, OID_AUTO, instruction_ss */ static int hw_clflush_disable = -1; -/* Must *NOT* be BSS or locore will bzero these after setting them */ -int cpu = 0; /* Are we 386, 386sx, 486, etc? */ -u_int cpu_feature = 0; /* Feature flags */ -u_int cpu_feature2 = 0; /* Feature flags */ -u_int amd_feature = 0; /* AMD feature flags */ -u_int amd_feature2 = 0; /* AMD feature flags */ -u_int amd_pminfo = 0; /* AMD advanced power management info */ -u_int via_feature_rng = 0; /* VIA RNG features */ -u_int via_feature_xcrypt = 0; /* VIA ACE features */ -u_int cpu_high = 0; /* Highest arg to CPUID */ -u_int cpu_id = 0; /* Stepping ID */ -u_int cpu_procinfo = 0; /* HyperThreading Info / Brand Index / CLFUSH */ -u_int cpu_procinfo2 = 0; /* Multicore info */ -char cpu_vendor[20] = ""; /* CPU Origin code */ -u_int cpu_vendor_id = 0; /* CPU vendor ID */ +int cpu; /* Are we 386, 386sx, 486, etc? */ +u_int cpu_feature; /* Feature flags */ +u_int cpu_feature2; /* Feature flags */ +u_int amd_feature; /* AMD feature flags */ +u_int amd_feature2; /* AMD feature flags */ +u_int amd_pminfo; /* AMD advanced power management info */ +u_int via_feature_rng; /* VIA RNG features */ +u_int via_feature_xcrypt; /* VIA ACE features */ +u_int cpu_high; /* Highest arg to CPUID */ +u_int cpu_exthigh; /* Highest arg to extended CPUID */ +u_int cpu_id; /* Stepping ID */ +u_int cpu_procinfo; /* HyperThreading Info / Brand Index / CLFUSH */ +u_int cpu_procinfo2; /* Multicore info */ +char cpu_vendor[20]; /* CPU Origin code */ +u_int cpu_vendor_id; /* CPU vendor ID */ +#ifdef CPU_ENABLE_SSE +u_int cpu_fxsr; /* SSE enabled */ +u_int cpu_mxcsr_mask; /* Valid bits in mxcsr */ +#endif u_int cpu_clflush_line_size = 32; u_int cpu_mon_mwait_flags; /* MONITOR/MWAIT flags (CPUID.05H.ECX) */ u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */ u_int cpu_mon_max_size; /* MONITOR minimum range size, bytes */ +u_int cyrix_did; /* Device ID of Cyrix CPU */ SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD, &via_feature_rng, 0, "VIA RNG feature available in CPU"); SYSCTL_UINT(_hw, OID_AUTO, via_feature_xcrypt, CTLFLAG_RD, &via_feature_xcrypt, 0, "VIA xcrypt feature available in CPU"); -#ifdef CPU_ENABLE_SSE -u_int cpu_fxsr; /* SSE enabled */ -u_int cpu_mxcsr_mask; /* valid bits in mxcsr */ -#endif - #ifdef I486_CPU /* * IBM Blue Lightning Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Thu Sep 4 01:38:31 2014 (r271075) +++ head/sys/i386/i386/machdep.c Thu Sep 4 01:46:06 2014 (r271076) @@ -180,10 +180,6 @@ CTASSERT(offsetof(struct pcpu, pc_curthr extern void init386(int first); extern void dblfault_handler(void); -extern void printcpuinfo(void); /* XXX header file */ -extern void finishidentcpu(void); -extern void panicifcpuunsupported(void); - #define CS_SECURE(cs) (ISPL(cs) == SEL_UPL) #define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) @@ -1665,10 +1661,6 @@ struct gate_descriptor *idt = &idt0[0]; struct region_descriptor r_gdt, r_idt; /* table descriptors */ struct mtx dt_lock; /* lock for GDT and LDT */ -#if defined(I586_CPU) && !defined(NO_F00F_HACK) -extern int has_f00f_bug; -#endif - static struct i386tss dblfault_tss; static char dblfault_stack[PAGE_SIZE]; Modified: head/sys/i386/i386/trap.c ============================================================================== --- head/sys/i386/i386/trap.c Thu Sep 4 01:38:31 2014 (r271075) +++ head/sys/i386/i386/trap.c Thu Sep 4 01:46:06 2014 (r271076) @@ -153,7 +153,7 @@ static char *trap_msg[] = { }; #if defined(I586_CPU) && !defined(NO_F00F_HACK) -extern int has_f00f_bug; +int has_f00f_bug = 0; /* Initialized so that it can be patched. */ #endif #ifdef KDB Modified: head/sys/i386/include/md_var.h ============================================================================== --- head/sys/i386/include/md_var.h Thu Sep 4 01:38:31 2014 (r271075) +++ head/sys/i386/include/md_var.h Thu Sep 4 01:46:06 2014 (r271076) @@ -56,10 +56,13 @@ extern u_int cpu_procinfo; extern u_int cpu_procinfo2; extern char cpu_vendor[]; extern u_int cpu_vendor_id; -extern u_int cyrix_did; extern u_int cpu_mon_mwait_flags; extern u_int cpu_mon_min_size; extern u_int cpu_mon_max_size; +extern u_int cyrix_did; +#if defined(I586_CPU) && !defined(NO_F00F_HACK) +extern int has_f00f_bug; +#endif extern char kstack[]; extern char sigcode[]; extern int szsigcode; @@ -94,15 +97,23 @@ void doreti_popl_fs(void) __asm(__STRING void doreti_popl_fs_fault(void) __asm(__STRING(doreti_popl_fs_fault)); void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); -void initializecpu(void); +void finishidentcpu(void); +#if defined(I586_CPU) && defined(CPU_WT_ALLOC) +void enable_K5_wt_alloc(void); +void enable_K6_wt_alloc(void); +void enable_K6_2_wt_alloc(void); +#endif void enable_sse(void); void fillw(int /*u_short*/ pat, void *base, size_t cnt); +void initializecpu(void); void i686_pagezero(void *addr); void sse2_pagezero(void *addr); void init_AMD_Elan_sc520(void); int is_physical_memory(vm_paddr_t addr); int isa_nmi(int cd); vm_paddr_t kvtop(void *addr); +void panicifcpuunsupported(void); +void printcpuinfo(void); void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int selec); int user_dbreg_trap(void); void minidumpsys(struct dumperinfo *); Modified: head/sys/pc98/pc98/machdep.c ============================================================================== --- head/sys/pc98/pc98/machdep.c Thu Sep 4 01:38:31 2014 (r271075) +++ head/sys/pc98/pc98/machdep.c Thu Sep 4 01:46:06 2014 (r271076) @@ -149,10 +149,6 @@ CTASSERT(offsetof(struct pcpu, pc_curthr extern void init386(int first); extern void dblfault_handler(void); -extern void printcpuinfo(void); /* XXX header file */ -extern void finishidentcpu(void); -extern void panicifcpuunsupported(void); - #define CS_SECURE(cs) (ISPL(cs) == SEL_UPL) #define EFL_SECURE(ef, oef) ((((ef) ^ (oef)) & ~PSL_USERCHANGE) == 0) From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 01:56:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00F93CC1; Thu, 4 Sep 2014 01:56:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0D8D1811; Thu, 4 Sep 2014 01:56:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s841uFNS002930; Thu, 4 Sep 2014 01:56:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s841uFl5002928; Thu, 4 Sep 2014 01:56:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409040156.s841uFl5002928@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 4 Sep 2014 01:56:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271077 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 01:56:16 -0000 Author: jhb Date: Thu Sep 4 01:56:15 2014 New Revision: 271077 URL: http://svnweb.freebsd.org/changeset/base/271077 Log: Remove trailing whitespace. Modified: head/sys/amd64/amd64/identcpu.c head/sys/i386/i386/identcpu.c Modified: head/sys/amd64/amd64/identcpu.c ============================================================================== --- head/sys/amd64/amd64/identcpu.c Thu Sep 4 01:46:06 2014 (r271076) +++ head/sys/amd64/amd64/identcpu.c Thu Sep 4 01:56:15 2014 (r271077) @@ -97,11 +97,11 @@ SYSCTL_PROC(_hw, HW_MACHINE, machine, CT NULL, 0, sysctl_hw_machine, "A", "Machine class"); static char cpu_model[128]; -SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, cpu_model, 0, "Machine model"); static int hw_clockrate; -SYSCTL_INT(_hw, OID_AUTO, clockrate, CTLFLAG_RD, +SYSCTL_INT(_hw, OID_AUTO, clockrate, CTLFLAG_RD, &hw_clockrate, 0, "CPU instruction clock rate"); static eventhandler_tag tsc_post_tag; @@ -686,15 +686,15 @@ print_AMD_info(void) printf("L2 unified cache: %d kbytes", regs[2] >> 16); printf(", %d bytes/line", regs[2] & 0xff); printf(", %d lines/tag", (regs[2] >> 8) & 0x0f); - print_AMD_l2_assoc((regs[2] >> 12) & 0x0f); + print_AMD_l2_assoc((regs[2] >> 12) & 0x0f); } /* - * Opteron Rev E shows a bug as in very rare occasions a read memory - * barrier is not performed as expected if it is followed by a - * non-atomic read-modify-write instruction. + * Opteron Rev E shows a bug as in very rare occasions a read memory + * barrier is not performed as expected if it is followed by a + * non-atomic read-modify-write instruction. * As long as that bug pops up very rarely (intensive machine usage - * on other operating systems generally generates one unexplainable + * on other operating systems generally generates one unexplainable * crash any 2 months) and as long as a model specific fix would be * impratical at this stage, print out a warning string if the broken * model and family are identified. @@ -910,7 +910,7 @@ print_vmx_info(void) "\012single" /* INVVPID single-context type */ "\013all" /* INVVPID all-context type */ /* INVVPID single-context-retaining-globals type */ - "\014single-globals" + "\014single-globals" ); } } Modified: head/sys/i386/i386/identcpu.c ============================================================================== --- head/sys/i386/i386/identcpu.c Thu Sep 4 01:46:06 2014 (r271076) +++ head/sys/i386/i386/identcpu.c Thu Sep 4 01:56:15 2014 (r271077) @@ -75,15 +75,15 @@ static void print_via_padlock_info(void) int cpu_class; char machine[] = MACHINE; -SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, +SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, machine, 0, "Machine class"); static char cpu_model[128]; -SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, +SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, cpu_model, 0, "Machine model"); static int hw_clockrate; -SYSCTL_INT(_hw, OID_AUTO, clockrate, CTLFLAG_RD, +SYSCTL_INT(_hw, OID_AUTO, clockrate, CTLFLAG_RD, &hw_clockrate, 0, "CPU instruction clock rate"); static eventhandler_tag tsc_post_tag; @@ -1270,7 +1270,7 @@ print_AMD_info(void) printf("L2 internal cache: %d kbytes", regs[2] >> 16); printf(", %d bytes/line", regs[2] & 0xff); printf(", %d lines/tag", (regs[2] >> 8) & 0x0f); - print_AMD_assoc((regs[2] >> 12) & 0x0f); + print_AMD_assoc((regs[2] >> 12) & 0x0f); } } if (((cpu_id & 0xf00) == 0x500) From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 02:06:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6751F91; Thu, 4 Sep 2014 02:06:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C28FC18E8; Thu, 4 Sep 2014 02:06:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8426XIO007619; Thu, 4 Sep 2014 02:06:33 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8426Xp3007618; Thu, 4 Sep 2014 02:06:33 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409040206.s8426Xp3007618@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 4 Sep 2014 02:06:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271078 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 02:06:34 -0000 Author: gjb Date: Thu Sep 4 02:06:33 2014 New Revision: 271078 URL: http://svnweb.freebsd.org/changeset/base/271078 Log: Fix typo: s/_maske/_mask/ MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/etc/rc.d/jail Modified: head/etc/rc.d/jail ============================================================================== --- head/etc/rc.d/jail Thu Sep 4 01:56:15 2014 (r271077) +++ head/etc/rc.d/jail Thu Sep 4 02:06:33 2014 (r271078) @@ -319,7 +319,7 @@ jail_extract_address() _mask=${_mask:-/32} elif [ "${_type}" = "inet6" ]; then - # In case _maske is not set for IPv6, use /128. + # In case _mask is not set for IPv6, use /128. _mask=${_mask:-/128} warn "$_type $_addr: an IPv6 address should always be " \ "specified with a prefix length. /128 is used." From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 02:14:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD4C92B4; Thu, 4 Sep 2014 02:14:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8F2919C2; Thu, 4 Sep 2014 02:14:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s842Etpa012164; Thu, 4 Sep 2014 02:14:55 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s842EtSn012163; Thu, 4 Sep 2014 02:14:55 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409040214.s842EtSn012163@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 4 Sep 2014 02:14:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271080 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 02:14:56 -0000 Author: gjb Date: Thu Sep 4 02:14:55 2014 New Revision: 271080 URL: http://svnweb.freebsd.org/changeset/base/271080 Log: Document r264438, mdconfig(8) rc.conf(5) listing is no longer required to be sequential. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 4 02:14:53 2014 (r271079) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 4 02:14:55 2014 (r271080) @@ -1212,6 +1212,10 @@ &os; 10.0-RELEASE that would prevent proper IPv6 allocation via the &man.jail.8; &man.rc.8; startup script has been fixed. + + The &man.rc.8; restriction requiring + &man.mdconfig.8; devices defined in &man.rc.conf.5; to be + listed sequentially has been removed. From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 02:14:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EEA4E1DE; Thu, 4 Sep 2014 02:14:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9DA919C1; Thu, 4 Sep 2014 02:14:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s842ErWD012119; Thu, 4 Sep 2014 02:14:53 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s842ErBX012118; Thu, 4 Sep 2014 02:14:53 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409040214.s842ErBX012118@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 4 Sep 2014 02:14:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271079 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 02:14:54 -0000 Author: gjb Date: Thu Sep 4 02:14:53 2014 New Revision: 271079 URL: http://svnweb.freebsd.org/changeset/base/271079 Log: Document r259141, jail(8) ipv6 allocation startup bug. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 4 02:06:33 2014 (r271078) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 4 02:14:53 2014 (r271079) @@ -1207,6 +1207,11 @@ The &man.service.8; utility has been updated to check that the &man.rc.d.8; directory exists before traversing the directory. + + A regression introduced in + &os; 10.0-RELEASE that would prevent proper IPv6 + allocation via the &man.jail.8; &man.rc.8; startup script + has been fixed. From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 02:14:57 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE39B3DB; Thu, 4 Sep 2014 02:14:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA30119C3; Thu, 4 Sep 2014 02:14:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s842EvoL012210; Thu, 4 Sep 2014 02:14:57 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s842Evg9012209; Thu, 4 Sep 2014 02:14:57 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409040214.s842Evg9012209@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 4 Sep 2014 02:14:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271081 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 02:14:57 -0000 Author: gjb Date: Thu Sep 4 02:14:57 2014 New Revision: 271081 URL: http://svnweb.freebsd.org/changeset/base/271081 Log: Document r262566, sshd(8) startup script creates ed25519 keys if ENOENT on startup. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 4 02:14:55 2014 (r271080) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 4 02:14:57 2014 (r271081) @@ -1216,6 +1216,11 @@ The &man.rc.8; restriction requiring &man.mdconfig.8; devices defined in &man.rc.conf.5; to be listed sequentially has been removed. + + The &man.sshd.8; &man.rc.d.8; startup + script now generates ED25519 &man.sshd.8; + host keys if keys do not already exist when + ssh_keygen_alg() is invoked. From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 02:26:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C22CA6A5; Thu, 4 Sep 2014 02:26:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADCE51ACC; Thu, 4 Sep 2014 02:26:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s842Q0rv016946; Thu, 4 Sep 2014 02:26:00 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s842Q0VE016942; Thu, 4 Sep 2014 02:26:00 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409040226.s842Q0VE016942@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 4 Sep 2014 02:26:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271082 - in head/sys: i386/i386 x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 02:26:00 -0000 Author: jhb Date: Thu Sep 4 02:25:59 2014 New Revision: 271082 URL: http://svnweb.freebsd.org/changeset/base/271082 Log: - Move blacklists of broken TSCs out of the printcpuinfo() function and into the TSC probe routine. - Initialize cpu_exthigh once in finishidentcpu() which is called before printcpuinfo() (and matches the behavior on amd64). Modified: head/sys/i386/i386/identcpu.c head/sys/x86/x86/tsc.c Modified: head/sys/i386/i386/identcpu.c ============================================================================== --- head/sys/i386/i386/identcpu.c Thu Sep 4 02:14:57 2014 (r271081) +++ head/sys/i386/i386/identcpu.c Thu Sep 4 02:25:59 2014 (r271082) @@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$"); #define IDENTBLUE_CYRIXM2 2 static void identifycyrix(void); -static void init_exthigh(void); static u_int find_cpu_vendor_id(void); static void print_AMD_info(void); static void print_INTEL_info(void); @@ -147,28 +146,6 @@ static struct { #endif }; -static void -init_exthigh(void) -{ - static int done = 0; - u_int regs[4]; - - if (done == 0) { - if (cpu_high > 0 && - (cpu_vendor_id == CPU_VENDOR_INTEL || - cpu_vendor_id == CPU_VENDOR_AMD || - cpu_vendor_id == CPU_VENDOR_TRANSMETA || - cpu_vendor_id == CPU_VENDOR_CENTAUR || - cpu_vendor_id == CPU_VENDOR_NSC)) { - do_cpuid(0x80000000, regs); - if (regs[0] >= 0x80000000) - cpu_exthigh = regs[0]; - } - - done = 1; - } -} - void printcpuinfo(void) { @@ -180,7 +157,6 @@ printcpuinfo(void) strncpy(cpu_model, i386_cpus[cpu].cpu_name, sizeof (cpu_model)); /* Check for extended CPUID information and a processor name. */ - init_exthigh(); if (cpu_exthigh >= 0x80000004) { brand = cpu_brand; for (i = 0x80000002; i < 0x80000005; i++) { @@ -354,7 +330,6 @@ printcpuinfo(void) break; case 0x500: strcat(cpu_model, "K5 model 0"); - tsc_freq = 0; break; case 0x510: strcat(cpu_model, "K5 model 1"); @@ -553,13 +528,6 @@ printcpuinfo(void) switch (cpu_id & 0xff0) { case 0x540: strcpy(cpu_model, "IDT WinChip C6"); - /* - * http://www.centtech.com/c6_data_sheet.pdf - * - * I-12 RDTSC may return incoherent values in EDX:EAX - * I-13 RDTSC hangs when certain event counters are used - */ - tsc_freq = 0; break; case 0x580: strcpy(cpu_model, "IDT WinChip 2"); @@ -599,8 +567,6 @@ printcpuinfo(void) case 0x540: strcpy(cpu_model, "Geode SC1100"); cpu = CPU_GEODE1100; - if ((cpu_id & CPUID_STEPPING) == 0) - tsc_freq = 0; break; default: strcpy(cpu_model, "Geode/NSC unknown"); @@ -1110,10 +1076,20 @@ finishidentcpu(void) cpu_mon_max_size = regs[1] & CPUID5_MON_MAX_SIZE; } + if (cpu_high > 0 && + (cpu_vendor_id == CPU_VENDOR_INTEL || + cpu_vendor_id == CPU_VENDOR_AMD || + cpu_vendor_id == CPU_VENDOR_TRANSMETA || + cpu_vendor_id == CPU_VENDOR_CENTAUR || + cpu_vendor_id == CPU_VENDOR_NSC)) { + do_cpuid(0x80000000, regs); + if (regs[0] >= 0x80000000) + cpu_exthigh = regs[0]; + } + /* Detect AMD features (PTE no-execute bit, 3dnow, 64 bit mode etc) */ if (cpu_vendor_id == CPU_VENDOR_INTEL || cpu_vendor_id == CPU_VENDOR_AMD) { - init_exthigh(); if (cpu_exthigh >= 0x80000001) { do_cpuid(0x80000001, regs); amd_feature = regs[3] & ~(cpu_feature & 0x0183f3ff); @@ -1128,7 +1104,6 @@ finishidentcpu(void) cpu_procinfo2 = regs[2]; } } else if (cpu_vendor_id == CPU_VENDOR_CENTAUR) { - init_exthigh(); if (cpu_exthigh >= 0x80000001) { do_cpuid(0x80000001, regs); amd_feature = regs[3] & ~(cpu_feature & 0x0183f3ff); Modified: head/sys/x86/x86/tsc.c ============================================================================== --- head/sys/x86/x86/tsc.c Thu Sep 4 02:14:57 2014 (r271081) +++ head/sys/x86/x86/tsc.c Thu Sep 4 02:25:59 2014 (r271082) @@ -324,6 +324,39 @@ init_TSC(void) if ((cpu_feature & CPUID_TSC) == 0 || tsc_disabled) return; +#ifdef __i386__ + /* The TSC is known to be broken on certain CPUs. */ + switch (cpu_vendor_id) { + case CPU_VENDOR_AMD: + switch (cpu_id & 0xFF0) { + case 0x500: + /* K5 Model 0 */ + return; + } + break; + case CPU_VENDOR_CENTAUR: + switch (cpu_id & 0xff0) { + case 0x540: + /* + * http://www.centtech.com/c6_data_sheet.pdf + * + * I-12 RDTSC may return incoherent values in EDX:EAX + * I-13 RDTSC hangs when certain event counters are used + */ + return; + } + break; + case CPU_VENDOR_NSC: + switch (cpu_id & 0xff0) { + case 0x540: + if ((cpu_id & CPUID_STEPPING) == 0) + return; + break; + } + break; + } +#endif + probe_tsc_freq(); /* From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 02:28:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89EF0888; Thu, 4 Sep 2014 02:28:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 678A71AE5; Thu, 4 Sep 2014 02:28:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s842SIp9017273; Thu, 4 Sep 2014 02:28:18 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s842SIdk017272; Thu, 4 Sep 2014 02:28:18 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409040228.s842SIdk017272@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 4 Sep 2014 02:28:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271083 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 02:28:18 -0000 Author: jhb Date: Thu Sep 4 02:28:17 2014 New Revision: 271083 URL: http://svnweb.freebsd.org/changeset/base/271083 Log: Remove a stray blank line from the Intel cache and TLB info. Modified: head/sys/i386/i386/identcpu.c Modified: head/sys/i386/i386/identcpu.c ============================================================================== --- head/sys/i386/i386/identcpu.c Thu Sep 4 02:25:59 2014 (r271082) +++ head/sys/i386/i386/identcpu.c Thu Sep 4 02:28:17 2014 (r271083) @@ -1327,11 +1327,9 @@ print_INTEL_info(void) nway = 1 << (nwaycode / 2); else nway = 0; - printf("\nL2 cache: %u kbytes, %u-way associative, %u bytes/line", + printf("L2 cache: %u kbytes, %u-way associative, %u bytes/line\n", (regs[2] >> 16) & 0xffff, nway, regs[2] & 0xff); } - - printf("\n"); } static void @@ -1343,160 +1341,160 @@ print_INTEL_TLB(u_int data) default: break; case 0x1: - printf("\nInstruction TLB: 4 KB pages, 4-way set associative, 32 entries"); + printf("Instruction TLB: 4 KB pages, 4-way set associative, 32 entries\n"); break; case 0x2: - printf("\nInstruction TLB: 4 MB pages, fully associative, 2 entries"); + printf("Instruction TLB: 4 MB pages, fully associative, 2 entries\n"); break; case 0x3: - printf("\nData TLB: 4 KB pages, 4-way set associative, 64 entries"); + printf("Data TLB: 4 KB pages, 4-way set associative, 64 entries\n"); break; case 0x4: - printf("\nData TLB: 4 MB Pages, 4-way set associative, 8 entries"); + printf("Data TLB: 4 MB Pages, 4-way set associative, 8 entries\n"); break; case 0x6: - printf("\n1st-level instruction cache: 8 KB, 4-way set associative, 32 byte line size"); + printf("1st-level instruction cache: 8 KB, 4-way set associative, 32 byte line size\n"); break; case 0x8: - printf("\n1st-level instruction cache: 16 KB, 4-way set associative, 32 byte line size"); + printf("1st-level instruction cache: 16 KB, 4-way set associative, 32 byte line size\n"); break; case 0xa: - printf("\n1st-level data cache: 8 KB, 2-way set associative, 32 byte line size"); + printf("1st-level data cache: 8 KB, 2-way set associative, 32 byte line size\n"); break; case 0xc: - printf("\n1st-level data cache: 16 KB, 4-way set associative, 32 byte line size"); + printf("1st-level data cache: 16 KB, 4-way set associative, 32 byte line size\n"); break; case 0x22: - printf("\n3rd-level cache: 512 KB, 4-way set associative, sectored cache, 64 byte line size"); + printf("3rd-level cache: 512 KB, 4-way set associative, sectored cache, 64 byte line size\n"); break; case 0x23: - printf("\n3rd-level cache: 1 MB, 8-way set associative, sectored cache, 64 byte line size"); + printf("3rd-level cache: 1 MB, 8-way set associative, sectored cache, 64 byte line size\n"); break; case 0x25: - printf("\n3rd-level cache: 2 MB, 8-way set associative, sectored cache, 64 byte line size"); + printf("3rd-level cache: 2 MB, 8-way set associative, sectored cache, 64 byte line size\n"); break; case 0x29: - printf("\n3rd-level cache: 4 MB, 8-way set associative, sectored cache, 64 byte line size"); + printf("3rd-level cache: 4 MB, 8-way set associative, sectored cache, 64 byte line size\n"); break; case 0x2c: - printf("\n1st-level data cache: 32 KB, 8-way set associative, 64 byte line size"); + printf("1st-level data cache: 32 KB, 8-way set associative, 64 byte line size\n"); break; case 0x30: - printf("\n1st-level instruction cache: 32 KB, 8-way set associative, 64 byte line size"); + printf("1st-level instruction cache: 32 KB, 8-way set associative, 64 byte line size\n"); break; case 0x39: - printf("\n2nd-level cache: 128 KB, 4-way set associative, sectored cache, 64 byte line size"); + printf("2nd-level cache: 128 KB, 4-way set associative, sectored cache, 64 byte line size\n"); break; case 0x3b: - printf("\n2nd-level cache: 128 KB, 2-way set associative, sectored cache, 64 byte line size"); + printf("2nd-level cache: 128 KB, 2-way set associative, sectored cache, 64 byte line size\n"); break; case 0x3c: - printf("\n2nd-level cache: 256 KB, 4-way set associative, sectored cache, 64 byte line size"); + printf("2nd-level cache: 256 KB, 4-way set associative, sectored cache, 64 byte line size\n"); break; case 0x41: - printf("\n2nd-level cache: 128 KB, 4-way set associative, 32 byte line size"); + printf("2nd-level cache: 128 KB, 4-way set associative, 32 byte line size\n"); break; case 0x42: - printf("\n2nd-level cache: 256 KB, 4-way set associative, 32 byte line size"); + printf("2nd-level cache: 256 KB, 4-way set associative, 32 byte line size\n"); break; case 0x43: - printf("\n2nd-level cache: 512 KB, 4-way set associative, 32 byte line size"); + printf("2nd-level cache: 512 KB, 4-way set associative, 32 byte line size\n"); break; case 0x44: - printf("\n2nd-level cache: 1 MB, 4-way set associative, 32 byte line size"); + printf("2nd-level cache: 1 MB, 4-way set associative, 32 byte line size\n"); break; case 0x45: - printf("\n2nd-level cache: 2 MB, 4-way set associative, 32 byte line size"); + printf("2nd-level cache: 2 MB, 4-way set associative, 32 byte line size\n"); break; case 0x46: - printf("\n3rd-level cache: 4 MB, 4-way set associative, 64 byte line size"); + printf("3rd-level cache: 4 MB, 4-way set associative, 64 byte line size\n"); break; case 0x47: - printf("\n3rd-level cache: 8 MB, 8-way set associative, 64 byte line size"); + printf("3rd-level cache: 8 MB, 8-way set associative, 64 byte line size\n"); break; case 0x50: - printf("\nInstruction TLB: 4 KB, 2 MB or 4 MB pages, fully associative, 64 entries"); + printf("Instruction TLB: 4 KB, 2 MB or 4 MB pages, fully associative, 64 entries\n"); break; case 0x51: - printf("\nInstruction TLB: 4 KB, 2 MB or 4 MB pages, fully associative, 128 entries"); + printf("Instruction TLB: 4 KB, 2 MB or 4 MB pages, fully associative, 128 entries\n"); break; case 0x52: - printf("\nInstruction TLB: 4 KB, 2 MB or 4 MB pages, fully associative, 256 entries"); + printf("Instruction TLB: 4 KB, 2 MB or 4 MB pages, fully associative, 256 entries\n"); break; case 0x5b: - printf("\nData TLB: 4 KB or 4 MB pages, fully associative, 64 entries"); + printf("Data TLB: 4 KB or 4 MB pages, fully associative, 64 entries\n"); break; case 0x5c: - printf("\nData TLB: 4 KB or 4 MB pages, fully associative, 128 entries"); + printf("Data TLB: 4 KB or 4 MB pages, fully associative, 128 entries\n"); break; case 0x5d: - printf("\nData TLB: 4 KB or 4 MB pages, fully associative, 256 entries"); + printf("Data TLB: 4 KB or 4 MB pages, fully associative, 256 entries\n"); break; case 0x60: - printf("\n1st-level data cache: 16 KB, 8-way set associative, sectored cache, 64 byte line size"); + printf("1st-level data cache: 16 KB, 8-way set associative, sectored cache, 64 byte line size\n"); break; case 0x66: - printf("\n1st-level data cache: 8 KB, 4-way set associative, sectored cache, 64 byte line size"); + printf("1st-level data cache: 8 KB, 4-way set associative, sectored cache, 64 byte line size\n"); break; case 0x67: - printf("\n1st-level data cache: 16 KB, 4-way set associative, sectored cache, 64 byte line size"); + printf("1st-level data cache: 16 KB, 4-way set associative, sectored cache, 64 byte line size\n"); break; case 0x68: - printf("\n1st-level data cache: 32 KB, 4 way set associative, sectored cache, 64 byte line size"); + printf("1st-level data cache: 32 KB, 4 way set associative, sectored cache, 64 byte line size\n"); break; case 0x70: - printf("\nTrace cache: 12K-uops, 8-way set associative"); + printf("Trace cache: 12K-uops, 8-way set associative\n"); break; case 0x71: - printf("\nTrace cache: 16K-uops, 8-way set associative"); + printf("Trace cache: 16K-uops, 8-way set associative\n"); break; case 0x72: - printf("\nTrace cache: 32K-uops, 8-way set associative"); + printf("Trace cache: 32K-uops, 8-way set associative\n"); break; case 0x78: - printf("\n2nd-level cache: 1 MB, 4-way set associative, 64-byte line size"); + printf("2nd-level cache: 1 MB, 4-way set associative, 64-byte line size\n"); break; case 0x79: - printf("\n2nd-level cache: 128 KB, 8-way set associative, sectored cache, 64 byte line size"); + printf("2nd-level cache: 128 KB, 8-way set associative, sectored cache, 64 byte line size\n"); break; case 0x7a: - printf("\n2nd-level cache: 256 KB, 8-way set associative, sectored cache, 64 byte line size"); + printf("2nd-level cache: 256 KB, 8-way set associative, sectored cache, 64 byte line size\n"); break; case 0x7b: - printf("\n2nd-level cache: 512 KB, 8-way set associative, sectored cache, 64 byte line size"); + printf("2nd-level cache: 512 KB, 8-way set associative, sectored cache, 64 byte line size\n"); break; case 0x7c: - printf("\n2nd-level cache: 1 MB, 8-way set associative, sectored cache, 64 byte line size"); + printf("2nd-level cache: 1 MB, 8-way set associative, sectored cache, 64 byte line size\n"); break; case 0x7d: - printf("\n2nd-level cache: 2-MB, 8-way set associative, 64-byte line size"); + printf("2nd-level cache: 2-MB, 8-way set associative, 64-byte line size\n"); break; case 0x7f: - printf("\n2nd-level cache: 512-KB, 2-way set associative, 64-byte line size"); + printf("2nd-level cache: 512-KB, 2-way set associative, 64-byte line size\n"); break; case 0x82: - printf("\n2nd-level cache: 256 KB, 8-way set associative, 32 byte line size"); + printf("2nd-level cache: 256 KB, 8-way set associative, 32 byte line size\n"); break; case 0x83: - printf("\n2nd-level cache: 512 KB, 8-way set associative, 32 byte line size"); + printf("2nd-level cache: 512 KB, 8-way set associative, 32 byte line size\n"); break; case 0x84: - printf("\n2nd-level cache: 1 MB, 8-way set associative, 32 byte line size"); + printf("2nd-level cache: 1 MB, 8-way set associative, 32 byte line size\n"); break; case 0x85: - printf("\n2nd-level cache: 2 MB, 8-way set associative, 32 byte line size"); + printf("2nd-level cache: 2 MB, 8-way set associative, 32 byte line size\n"); break; case 0x86: - printf("\n2nd-level cache: 512 KB, 4-way set associative, 64 byte line size"); + printf("2nd-level cache: 512 KB, 4-way set associative, 64 byte line size\n"); break; case 0x87: - printf("\n2nd-level cache: 1 MB, 8-way set associative, 64 byte line size"); + printf("2nd-level cache: 1 MB, 8-way set associative, 64 byte line size\n"); break; case 0xb0: - printf("\nInstruction TLB: 4 KB Pages, 4-way set associative, 128 entries"); + printf("Instruction TLB: 4 KB Pages, 4-way set associative, 128 entries\n"); break; case 0xb3: - printf("\nData TLB: 4 KB Pages, 4-way set associative, 128 entries"); + printf("Data TLB: 4 KB Pages, 4-way set associative, 128 entries\n"); break; } } From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 02:37:34 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 152A8A7F; Thu, 4 Sep 2014 02:37:34 +0000 (UTC) Received: from gw.catspoiler.org (cl-1657.chi-02.us.sixxs.net [IPv6:2001:4978:f:678::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C63A1BDC; Thu, 4 Sep 2014 02:37:33 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id s842bLJn092072; Wed, 3 Sep 2014 19:37:25 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <201409040237.s842bLJn092072@gw.catspoiler.org> Date: Wed, 3 Sep 2014 19:37:21 -0700 (PDT) From: Don Lewis Subject: Re: svn commit: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 To: jhb@FreeBSD.org In-Reply-To: <201409040146.s841k7uo098240@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 02:37:34 -0000 On 4 Sep, John Baldwin wrote: > Author: jhb > Date: Thu Sep 4 01:46:06 2014 > New Revision: 271076 > URL: http://svnweb.freebsd.org/changeset/base/271076 > > Log: > - Move the declaration of has_f00f_hack out of identcpu.c to machdep.c. That certainly brings back memories ... From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 03:04:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0457E143; Thu, 4 Sep 2014 03:04:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E426B1F0F; Thu, 4 Sep 2014 03:04:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8434bBR036083; Thu, 4 Sep 2014 03:04:37 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8434b3m036081; Thu, 4 Sep 2014 03:04:37 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409040304.s8434b3m036081@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 4 Sep 2014 03:04:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271084 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 03:04:38 -0000 Author: ian Date: Thu Sep 4 03:04:37 2014 New Revision: 271084 URL: http://svnweb.freebsd.org/changeset/base/271084 Log: The imx5x and imx6 chips have an onboard IOMUX device which also contains a few "general purpose registers" whose values control chip behavior in ways that have nothing to do with IO pin mux control. Define a simple API that other soc-specific code can use to read and write the registers, and provide the imx51 implementation of them. Added: head/sys/arm/freescale/imx/imx_iomuxvar.h (contents, props changed) Modified: head/sys/arm/freescale/imx/imx51_iomux.c Modified: head/sys/arm/freescale/imx/imx51_iomux.c ============================================================================== --- head/sys/arm/freescale/imx/imx51_iomux.c Thu Sep 4 02:28:17 2014 (r271083) +++ head/sys/arm/freescale/imx/imx51_iomux.c Thu Sep 4 03:04:37 2014 (r271084) @@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -216,6 +217,41 @@ iomux_input_config(const struct iomux_in } #endif +uint32_t +imx_iomux_gpr_get(u_int regnum) +{ + + KASSERT(iomuxsc != NULL, ("imx_iomux_gpr_get() called before attach")); + KASSERT(regnum >= 0 && renum <= 1, + ("imx_iomux_gpr_get bad regnum %u", regnum)); + return (IOMUX_READ(iomuxsc, IOMUXC_GPR0 + regnum)); +} + +void +imx_iomux_gpr_set(u_int regnum, uint32_t val) +{ + + KASSERT(iomuxsc != NULL, ("imx_iomux_gpr_set() called before attach")); + KASSERT(regnum >= 0 && renum <= 1, + ("imx_iomux_gpr_set bad regnum %u", regnum)); + IOMUX_WRITE(iomuxsc, IOMUXC_GPR0 + regnum, val); +} + +void +imx_iomux_gpr_set_masked(u_int regnum, uint32_t clrbits, uint32_t setbits) +{ + uint32_t val; + + KASSERT(iomuxsc != NULL, + ("imx_iomux_gpr_set_masked called before attach")); + KASSERT(regnum >= 0 && renum <= 1, + ("imx_iomux_gpr_set_masked bad regnum %u", regnum)); + + val = IOMUX_READ(iomuxsc, IOMUXC_GPR0 + regnum); + val = (val & ~clrbits) | setbits; + IOMUX_WRITE(iomuxsc, IOMUXC_GPR0 + regnum, val); +} + static device_method_t imx_iomux_methods[] = { DEVMETHOD(device_probe, iomux_probe), DEVMETHOD(device_attach, iomux_attach), Added: head/sys/arm/freescale/imx/imx_iomuxvar.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/imx_iomuxvar.h Thu Sep 4 03:04:37 2014 (r271084) @@ -0,0 +1,42 @@ +/*- + * Copyright (c) 2014 Ian Lepore + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef IMX_IOMUXVAR_H +#define IMX_IOMUXVAR_H + +/* + * The IOMUX Controller device has a small set of "general purpose registers" + * which control various aspects of SoC operation that really have nothing to do + * with IO pin assignments or pad control. These functions let other soc level + * code manipulate these values. + */ +uint32_t imx_iomux_gpr_get(u_int regnum); +void imx_iomux_gpr_set(u_int regnum, uint32_t val); +void imx_iomux_gpr_set_masked(u_int regnum, uint32_t clrbits, uint32_t setbits); + +#endif From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 03:31:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2591699; Thu, 4 Sep 2014 03:31:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8483A12C0; Thu, 4 Sep 2014 03:31:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s843VnsT048906; Thu, 4 Sep 2014 03:31:49 GMT (envelope-from benno@FreeBSD.org) Received: (from benno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s843Vn5c048905; Thu, 4 Sep 2014 03:31:49 GMT (envelope-from benno@FreeBSD.org) Message-Id: <201409040331.s843Vn5c048905@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: benno set sender to benno@FreeBSD.org using -f From: Benno Rice Date: Thu, 4 Sep 2014 03:31:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271085 - head/lib/libgeom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 03:31:49 -0000 Author: benno Date: Thu Sep 4 03:31:48 2014 New Revision: 271085 URL: http://svnweb.freebsd.org/changeset/base/271085 Log: Systems with lots of geom providers can end up with a kern.geom.confxml value too large for the buffer allocated. Work around this by retrying a few times with larger buffer sizes. Submitted by: Scott Ferris Reviewed by: mlaier, ngie Sponsored by: EMC Isilon Storage Division Modified: head/lib/libgeom/geom_getxml.c Modified: head/lib/libgeom/geom_getxml.c ============================================================================== --- head/lib/libgeom/geom_getxml.c Thu Sep 4 03:04:37 2014 (r271084) +++ head/lib/libgeom/geom_getxml.c Thu Sep 4 03:31:48 2014 (r271085) @@ -31,10 +31,23 @@ #include #include +#include #include #include #include "libgeom.h" +/* + * Amount of extra space we allocate to try and anticipate the size of + * confxml. + */ +#define GEOM_GETXML_SLACK 4096 + +/* + * Number of times to retry in the face of the size of confxml exceeding + * that of our buffer. + */ +#define GEOM_GETXML_RETRIES 4 + char * geom_getxml(void) { @@ -42,19 +55,33 @@ geom_getxml(void) size_t l = 0; int mib[3]; size_t sizep; + int retries; sizep = sizeof(mib) / sizeof(*mib); if (sysctlnametomib("kern.geom.confxml", mib, &sizep) != 0) return (NULL); if (sysctl(mib, sizep, NULL, &l, NULL, 0) != 0) return (NULL); - l += 4096; - p = malloc(l); - if (p == NULL) - return (NULL); - if (sysctl(mib, sizep, p, &l, NULL, 0) != 0) { + l += GEOM_GETXML_SLACK; + + for (retries = 0; retries < GEOM_GETXML_RETRIES; retries++) { + p = malloc(l); + if (p == NULL) + return (NULL); + if (sysctl(mib, sizep, p, &l, NULL, 0) == 0) + return (reallocf(p, strlen(p) + 1)); + free(p); - return (NULL); + + if (errno != ENOMEM) + return (NULL); + + /* + * Our buffer wasn't big enough. Make it bigger and + * try again. + */ + l *= 2; } - return (reallocf(p, strlen(p) + 1)); + + return (NULL); } From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 09:05:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C1F28E6; Thu, 4 Sep 2014 09:05:34 +0000 (UTC) Received: from mail.made4.biz (mail.made4.biz [IPv6:2001:41d0:2:c018::1:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29392194A; Thu, 4 Sep 2014 09:05:34 +0000 (UTC) Received: from 2a02-8428-011b-e000-0290-f5ff-fe9d-b78c.rev.sfr.net ([2a02:8428:11b:e000:290:f5ff:fe9d:b78c] helo=magellan.dumbbell.fr) by mail.made4.biz with esmtpsa (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.83 (FreeBSD)) (envelope-from ) id 1XPSyy-000AJE-9H; Thu, 04 Sep 2014 11:05:32 +0200 Message-ID: <54082B57.6070007@FreeBSD.org> Date: Thu, 04 Sep 2014 11:05:27 +0200 From: =?windows-1252?Q?Jean-S=E9bastien_P=E9dron?= User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Alexey Dokuchaev , Ed Maste Subject: Re: svn commit: r271023 - stable/10/sys/dev/vt References: <201409031400.s83E0bK6049810@svn.freebsd.org> <20140903140757.GA7494@FreeBSD.org> <20140903145753.GA25935@FreeBSD.org> In-Reply-To: <20140903145753.GA25935@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="DK2vAneQ59WJfRLHsfdJusUX13K0lB5vh" Cc: svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 09:05:34 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --DK2vAneQ59WJfRLHsfdJusUX13K0lB5vh Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 03.09.2014 16:57, Alexey Dokuchaev wrote: >> The VGA vt(4) issues all stem from the relatively complex and arcane >> VGA hardware and a somewhat limited vt_vga implementation. >=20 > Can you elaborate a bit on the technical side of things? Particularly,= it > looks strange that syscons(4) was able to work just fine on "relatively= > complex and arcane VGA hardware", while more modern vt(4) is fighting w= ith > problems. VGA requires that you write 8 pixels at a time (8 pixels stored in one byte). To update one pixel, the previous version of vt_vga would read one byte so that the 8 pixels are loaded in special registers (called "latches"), then would write a new byte to the video memory. The VGA hardware would process the new byte and the content of the latches to compute the final data. That's how one pixel out of eight could be modifi= ed. Unfortunately, reading from the video memory is very expensive. The new version of vt_vga never reads from the video memory. Instead, it uses the console history to know what those 8 pixels should look like and write one byte which doesn't need further processing. One bug in vt(4) was that the mouse cursor position, even if it was invisible before moused(8) starts, was always considered "dirty" and required a redraw. The default position being [0;0], each new character written would trigger a full refresh of the screen from [0;0] to the position of this character. Those two problems combined explain the slownness of vt(4), especially with discrete GPU and virtual machines; i915 users were mostly spared. Regarding the incorrect refresh when vt-switching, it was caused by a race between the redraw thread and the switch. The redraw thread was not stopped during a switch. Therefore, if the thread ran while the switch was in progress, it could mark the screen as "up-to-date" even though it displayed the wrong data. One change did reduce the vt-switch time specifically: in vt_vga, a switch triggers a clear of the video memory. The loop did read from the video memory, then wrote 8 black pixels. The useless read was removed. --=20 Jean-S=E9bastien P=E9dron --DK2vAneQ59WJfRLHsfdJusUX13K0lB5vh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJUCCtbXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NzA4N0ZEMUFFQUUwRTEyREJDNkE2RjAz OUU5OTc2MUE1RkQ5NENDAAoJEDnpl2Gl/ZTMgQEP/068sb1oqO5Ei0IBR2hSs4qn NFlOEIiwhKQpHDiVfdLARtzCZKBRamhVGEFwJN6vbVQg4kBWmvi55gwyail6kM2Y boykexLupH1zmhJ+7sqLlbhdGyhOVffRzaGBZ7moJBdRqRn8yRLpBPjw/SSCGwxb xJw27/9lAWrAtyqhI0egZXywQEUegRKlWPjCAxkM3DAjYQexgj26Yjz+MbH4SDRa m5eKFJeQ6CM+nLHa7mepxvNFewlG45Gq/XpoRQJ3TnPH9S4+TuD3qDWwcc7RKQyh g/ctE/7Tgf8Gi0ONtrQFLCSSfBO1YD+D+RCrLYzANah2fTcgYgON8PbFKS1f6pRg kWIG2wobUGyocmblktbmzggTby/UFyxc/EvwAQyIWlR2KpBcWMH/C13wcfNncrkW GSMOpzWEsNzTYMqC/2W+HG1dXrquqi+8Y5duyxDWVolU2LNOrcmkJUnBtwwnBS2D gfBlVQTC0RLq1ftaJRm4QKJJspMlfiJiZwUkSuKkTJ9vO8l75fw+cqL0X4REx7Zr JkGJN6BZGVFlIgfDKlnNbo4fzUVUOmUd1Qcsqtpv543P2DR3OJQoB/GDQhLUqXJM eQPuwCieCIMgyzOM0HD6BnfPXa2cOMxY6JvN87dLeyBOlwqK8NeDL0TDwubnan63 UackK2RHnPvSui5FZwNu =KngB -----END PGP SIGNATURE----- --DK2vAneQ59WJfRLHsfdJusUX13K0lB5vh-- From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 09:07:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D622CA75; Thu, 4 Sep 2014 09:07:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1616196E; Thu, 4 Sep 2014 09:07:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8497EdK000778; Thu, 4 Sep 2014 09:07:14 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8497Emt000776; Thu, 4 Sep 2014 09:07:14 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409040907.s8497Emt000776@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 4 Sep 2014 09:07:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271088 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 09:07:14 -0000 Author: glebius Date: Thu Sep 4 09:07:14 2014 New Revision: 271088 URL: http://svnweb.freebsd.org/changeset/base/271088 Log: Provide m_catpkt(), a wrapper around m_cat() that deals with M_PKTHDR mbufs. Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/kern/uipc_mbuf.c head/sys/sys/mbuf.h Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Thu Sep 4 06:07:32 2014 (r271087) +++ head/sys/kern/uipc_mbuf.c Thu Sep 4 09:07:14 2014 (r271088) @@ -990,6 +990,22 @@ m_cat(struct mbuf *m, struct mbuf *n) } } +/* + * Concatenate two pkthdr mbuf chains. + */ +void +m_catpkt(struct mbuf *m, struct mbuf *n) +{ + + M_ASSERTPKTHDR(m); + M_ASSERTPKTHDR(n); + + m->m_pkthdr.len += n->m_pkthdr.len; + m_demote(n, 1); + + m_cat(m, n); +} + void m_adj(struct mbuf *mp, int req_len) { Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Thu Sep 4 06:07:32 2014 (r271087) +++ head/sys/sys/mbuf.h Thu Sep 4 09:07:14 2014 (r271088) @@ -915,6 +915,7 @@ int m_apply(struct mbuf *, int, int, int (*)(void *, void *, u_int), void *); int m_append(struct mbuf *, int, c_caddr_t); void m_cat(struct mbuf *, struct mbuf *); +void m_catpkt(struct mbuf *, struct mbuf *); int m_extadd(struct mbuf *, caddr_t, u_int, void (*)(struct mbuf *, void *, void *), void *, void *, int, int, int); From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 09:15:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0B19E39; Thu, 4 Sep 2014 09:15:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C4EF1A4A; Thu, 4 Sep 2014 09:15:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s849Fi9M005616; Thu, 4 Sep 2014 09:15:44 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s849FiTT005615; Thu, 4 Sep 2014 09:15:44 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409040915.s849FiTT005615@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 4 Sep 2014 09:15:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271089 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 09:15:44 -0000 Author: glebius Date: Thu Sep 4 09:15:44 2014 New Revision: 271089 URL: http://svnweb.freebsd.org/changeset/base/271089 Log: Improve r265338. When inserting mbufs into TCP reassembly queue, try to collapse adjacent pieces using m_catpkt(). In best case scenario it copies data and frees mbufs, making mbuf exhaustion attack harder. Suggested by: Jonathan Looney Security: Hardens against remote mbuf exhaustion attack. Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/netinet/tcp_reass.c Modified: head/sys/netinet/tcp_reass.c ============================================================================== --- head/sys/netinet/tcp_reass.c Thu Sep 4 09:07:14 2014 (r271088) +++ head/sys/netinet/tcp_reass.c Thu Sep 4 09:15:44 2014 (r271089) @@ -214,16 +214,29 @@ tcp_reass(struct tcpcb *tp, struct tcphd mq = nq; } - /* Insert the new segment queue entry into place. */ + /* + * Insert the new segment queue entry into place. Try to collapse + * mbuf chains if segments are adjacent. + */ if (mp) { - m->m_nextpkt = mp->m_nextpkt; - mp->m_nextpkt = m; + if (M_TCPHDR(mp)->th_seq + mp->m_pkthdr.len == th->th_seq) + m_catpkt(mp, m); + else { + m->m_nextpkt = mp->m_nextpkt; + mp->m_nextpkt = m; + m->m_pkthdr.pkt_tcphdr = th; + } } else { - m->m_nextpkt = tp->t_segq; - tp->t_segq = m ; + mq = tp->t_segq; + tp->t_segq = m; + if (mq && th->th_seq + *tlenp == M_TCPHDR(mq)->th_seq) { + m->m_nextpkt = mq->m_nextpkt; + m_catpkt(m, mq); + } else + m->m_nextpkt = mq; + m->m_pkthdr.pkt_tcphdr = th; } - m->m_pkthdr.pkt_tcphdr = th; - tp->t_segqlen += m->m_pkthdr.len; + tp->t_segqlen += *tlenp; present: /* From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 09:18:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA19FFCA; Thu, 4 Sep 2014 09:18:48 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 58A301A69; Thu, 4 Sep 2014 09:18:47 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s849IiGC011171 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 4 Sep 2014 13:18:44 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s849IiCh011170; Thu, 4 Sep 2014 13:18:44 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 4 Sep 2014 13:18:44 +0400 From: Gleb Smirnoff To: John-Mark Gurney Subject: Re: svn commit: r270999 - head/sys/kern Message-ID: <20140904091844.GC7693@FreeBSD.org> References: <201409030814.s838E7A2084257@svn.freebsd.org> <20140903085523.GB13871@dft-labs.eu> <20140903094916.GO7693@FreeBSD.org> <20140903191028.GG71691@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140903191028.GG71691@funkthat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Mateusz Guzik , kib@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 09:18:49 -0000 On Wed, Sep 03, 2014 at 12:10:28PM -0700, John-Mark Gurney wrote: J> > M> > + if (p->p_pptr) { J> > M> > kp->ki_ppid = proc_realparent(p)->p_pid; J> > M> > - if (p->p_flag & P_TRACED) J> > M> > - kp->ki_tracer = p->p_pptr->p_pid; J> > M> > + if (p->p_flag & P_TRACED) J> > M> > + kp->ki_tracer = p->p_pptr->p_pid; J> > M> > + } J> > M> > } J> > M> > J> > M> > /* J> > M> > J> > M> J> > M> p_pptr must be non-NULL if P_TRACED is set. If there is no way to J> > M> annotate it for coverity, this change deserves a comment in the code J> > M> (and in retrospect previous code should have had appropriate comment as J> > M> well). J> > J> > Thanks for explanation. J> > J> > I'd suggest to leave the change in, since now it is a micro-micro-optimization :) J> J> If you must leave it in, then at least compare the pointer against J> NULL, and collapse two if statements into one... J> J> We should never introduce new pointer checks that aren't against NULL... I don't see how two if statements can be collapsed? We need to assign ki_ppid regardless of P_TRACED flag. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 09:42:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 762F86AC; Thu, 4 Sep 2014 09:42:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 609AA1CFD; Thu, 4 Sep 2014 09:42:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s849gbqW019013; Thu, 4 Sep 2014 09:42:37 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s849gbjH019012; Thu, 4 Sep 2014 09:42:37 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201409040942.s849gbjH019012@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Thu, 4 Sep 2014 09:42:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271090 - stable/10/sys/dev/drm2/radeon X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 09:42:37 -0000 Author: dumbbell Date: Thu Sep 4 09:42:36 2014 New Revision: 271090 URL: http://svnweb.freebsd.org/changeset/base/271090 Log: drm/radeon: Fix a memory leak when radeonkms is unloaded This an MFC of r270750. Modified: stable/10/sys/dev/drm2/radeon/radeon_fb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/drm2/radeon/radeon_fb.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/radeon_fb.c Thu Sep 4 09:15:44 2014 (r271089) +++ stable/10/sys/dev/drm2/radeon/radeon_fb.c Thu Sep 4 09:42:36 2014 (r271090) @@ -291,6 +291,7 @@ static int radeon_fbdev_destroy(struct d if (rfbdev->helper.fbdev) { info = rfbdev->helper.fbdev; + free(info->fb_priv, DRM_MEM_KMS); free(info, DRM_MEM_KMS); } From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 09:49:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0EE398B1; Thu, 4 Sep 2014 09:49:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED7E51D48; Thu, 4 Sep 2014 09:49:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s849nLfZ019938; Thu, 4 Sep 2014 09:49:21 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s849nLkW019937; Thu, 4 Sep 2014 09:49:21 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201409040949.s849nLkW019937@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Thu, 4 Sep 2014 09:49:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r271091 - stable/9/sys/dev/drm2/radeon X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 09:49:22 -0000 Author: dumbbell Date: Thu Sep 4 09:49:21 2014 New Revision: 271091 URL: http://svnweb.freebsd.org/changeset/base/271091 Log: drm/radeon: Fix a memory leak when radeonkms is unloaded This an MFC of r270750. Modified: stable/9/sys/dev/drm2/radeon/radeon_fb.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/radeon/radeon_fb.c ============================================================================== --- stable/9/sys/dev/drm2/radeon/radeon_fb.c Thu Sep 4 09:42:36 2014 (r271090) +++ stable/9/sys/dev/drm2/radeon/radeon_fb.c Thu Sep 4 09:49:21 2014 (r271091) @@ -291,6 +291,7 @@ static int radeon_fbdev_destroy(struct d if (rfbdev->helper.fbdev) { info = rfbdev->helper.fbdev; + free(info->fb_priv, DRM_MEM_KMS); free(info, DRM_MEM_KMS); } From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 11:15:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 927D7D06; Thu, 4 Sep 2014 11:15:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D3DE18AF; Thu, 4 Sep 2014 11:15:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84BFc6T061713; Thu, 4 Sep 2014 11:15:38 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84BFcsb061712; Thu, 4 Sep 2014 11:15:38 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409041115.s84BFcsb061712@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 4 Sep 2014 11:15:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271092 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 11:15:38 -0000 Author: gjb Date: Thu Sep 4 11:15:38 2014 New Revision: 271092 URL: http://svnweb.freebsd.org/changeset/base/271092 Log: Document r271069, Mac Mini 3,1 support added to asmc(4). Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 4 09:49:21 2014 (r271091) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Sep 4 11:15:38 2014 (r271092) @@ -194,6 +194,9 @@ has been updated to implement fast path for the page fault handler. + The &man.asmc.4; driver has been updated + to support the &apple; Mac Mini 3,1. + Virtualization Support From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 11:20:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7AD33F32 for ; Thu, 4 Sep 2014 11:20:15 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 400E418E4 for ; Thu, 4 Sep 2014 11:20:15 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by gateway2.nyi.internal (Postfix) with ESMTP id D1B0E20BF1 for ; Thu, 4 Sep 2014 07:20:12 -0400 (EDT) Received: from web6 ([10.202.2.216]) by compute3.internal (MEProxy); Thu, 04 Sep 2014 07:20:12 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h= message-id:from:to:cc:mime-version:content-transfer-encoding :content-type:subject:date:in-reply-to:references; s=mesmtp; bh= //Bga8PE9VdsDfjYfFHl+fLWBS4=; b=lUxOQYtCx+dS1vMOjvXtxla8Iz16TP5U HrfOC4mXthYE3NxrmhZ18F4w1p0JqzwWsXyX5l43WGSaU5g99Xa73dW+JBost6/m DIBjgsqupP9nEUkmDWP3Fg8qKCR2u/ka0nz804rV0NTifOblW2uatBwyKrjhZb2R 6ojLCjyn278= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:cc:mime-version :content-transfer-encoding:content-type:subject:date:in-reply-to :references; s=smtpout; bh=//Bga8PE9VdsDfjYfFHl+fLWBS4=; b=OaujB cObefwLdyvemW5vBkkBWGDv/hnyAMaAzMPs17fa2RLByoPYkxvn8sctHN7kY0VM8 pVkhzEr9JJOpJ4ZhQVxnt9WfiYpUNyQOHkAx3ZcMGc6Q0/BV5Mx679sKGrpynDpB 8qIw55HWpPdmWwYgLosK+gGpHkqF1NblpZzu+k= Received: by web6.nyi.internal (Postfix, from userid 99) id D101E941CE3; Thu, 4 Sep 2014 07:20:11 -0400 (EDT) Message-Id: <1409829611.1620282.163554161.0056EA09@webmail.messagingengine.com> X-Sasl-Enc: 1QUA5Df2qSQonsUHQl7yKDFGDhXvrwxb8c1v/IDYDPcg 1409829611 From: Bruce Simpson To: =?ISO-8859-1?Q?Jean-S=E9bastien=20P=E9dron?= , Alexey Dokuchaev , Ed Maste MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: MessagingEngine.com Webmail Interface - ajax-a219acad Subject: Re: svn commit: r271023 - stable/10/sys/dev/vt Date: Thu, 04 Sep 2014 12:20:11 +0100 In-Reply-To: <54082B57.6070007@FreeBSD.org> References: <201409031400.s83E0bK6049810@svn.freebsd.org> <20140903140757.GA7494@FreeBSD.org> <20140903145753.GA25935@FreeBSD.org> <54082B57.6070007@FreeBSD.org> Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 11:20:15 -0000 On Thu, 4 Sep 2014, at 10:05, Jean-S=E9bastien P=E9dron wrote: > Unfortunately, reading from the video memory is very expensive. The new > version of vt_vga never reads from the video memory. Instead, it uses > the console history to know what those 8 pixels should look like and > write one byte which doesn't need further processing. ...=20 > Those two problems combined explain the slownness of vt(4), especially > with discrete GPU and virtual machines; i915 users were mostly spared. It may be a good idea to monitor the performance of vt(4) under virtual KVM systems (e.g. Supermicro IPMI, VMware VNC, Cisco UCS etc.) for the following reasons: 1) users of FreeBSD are likely to rely on them for operations, 2) many of these systems already work along similar principles (i.e. delta compression), 3) to be sure that cascaded updates don't cause additional display latency. --=20 BMS (sent via webmail) From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 12:44:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59781F0; Thu, 4 Sep 2014 12:44:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42E1C1180; Thu, 4 Sep 2014 12:44:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84CigWH003354; Thu, 4 Sep 2014 12:44:42 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84Cieb4003342; Thu, 4 Sep 2014 12:44:40 GMT (envelope-from br@FreeBSD.org) Message-Id: <201409041244.s84Cieb4003342@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 4 Sep 2014 12:44:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271093 - in head/sys: arm/altera arm/altera/socfpga arm/conf boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 12:44:42 -0000 Author: br Date: Thu Sep 4 12:44:40 2014 New Revision: 271093 URL: http://svnweb.freebsd.org/changeset/base/271093 Log: Add initial support for Altera SOCFPGA (heterogeneous ARM/FPGA) SoC family. Include board configuration for Terasic SoCKit (Altera Cyclone V). Sponsored by: DARPA, AFRL Added: head/sys/arm/altera/ head/sys/arm/altera/socfpga/ head/sys/arm/altera/socfpga/files.socfpga (contents, props changed) head/sys/arm/altera/socfpga/socfpga_common.c (contents, props changed) head/sys/arm/altera/socfpga/socfpga_machdep.c (contents, props changed) head/sys/arm/altera/socfpga/std.socfpga (contents, props changed) head/sys/arm/conf/SOCKIT (contents, props changed) head/sys/boot/fdt/dts/arm/socfpga-sockit.dts (contents, props changed) head/sys/boot/fdt/dts/arm/socfpga.dtsi (contents, props changed) Added: head/sys/arm/altera/socfpga/files.socfpga ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/altera/socfpga/files.socfpga Thu Sep 4 12:44:40 2014 (r271093) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +kern/kern_clocksource.c standard + +arm/arm/bus_space_generic.c standard +arm/arm/bus_space_asm_generic.S standard +arm/arm/cpufunc_asm_armv5.S standard +arm/arm/cpufunc_asm_arm10.S standard +arm/arm/cpufunc_asm_arm11.S standard +arm/arm/cpufunc_asm_armv7.S standard + +arm/arm/bus_space-v6.c standard +arm/arm/gic.c standard +arm/arm/mpcore_timer.c standard + +arm/altera/socfpga/socfpga_common.c standard +arm/altera/socfpga/socfpga_machdep.c standard Added: head/sys/arm/altera/socfpga/socfpga_common.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/altera/socfpga/socfpga_common.c Thu Sep 4 12:44:40 2014 (r271093) @@ -0,0 +1,83 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include + +#include +#include + +#define RESMAN_BASE 0xFFD05000 +#define RESMAN_CTRL 0x4 +#define SWWARMRSTREQ (1 << 1) + +void +cpu_reset(void) +{ + bus_addr_t vaddr; + + if (bus_space_map(fdtbus_bs_tag, RESMAN_BASE, 0x10, 0, &vaddr) == 0) { + bus_space_write_4(fdtbus_bs_tag, vaddr, + RESMAN_CTRL, SWWARMRSTREQ); + } + + while (1); +} + +struct fdt_fixup_entry fdt_fixup_table[] = { + { NULL, NULL } +}; + +static int +fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, + int *pol) +{ + + if (!fdt_is_compatible(node, "arm,gic")) + return (ENXIO); + + *interrupt = fdt32_to_cpu(intr[0]); + *trig = INTR_TRIGGER_CONFORM; + *pol = INTR_POLARITY_CONFORM; + return (0); +} + +fdt_pic_decode_t fdt_pic_table[] = { + &fdt_pic_decode_ic, + NULL +}; Added: head/sys/arm/altera/socfpga/socfpga_machdep.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/altera/socfpga/socfpga_machdep.c Thu Sep 4 12:44:40 2014 (r271093) @@ -0,0 +1,107 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "opt_ddb.h" +#include "opt_platform.h" + +#include +__FBSDID("$FreeBSD$"); + +#define _ARM32_BUS_DMA_PRIVATE +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +vm_offset_t +platform_lastaddr(void) +{ + + return (arm_devmap_lastaddr()); +} + +void +platform_probe_and_attach(void) +{ + +} + +void +platform_gpio_init(void) +{ + +} + +void +platform_late_init(void) +{ + +} + +int +platform_devmap_init(void) +{ + + /* UART */ + arm_devmap_add_entry(0xffc00000, 0x100000); + + /* + * USB OTG + * + * We use static device map for USB due to some bug in the Altera + * which throws Translation Fault (P) exception on high load. + * It might be caused due to some power save options being turned + * on or something else. + */ + arm_devmap_add_entry(0xffb00000, 0x100000); + + return (0); +} + +struct arm32_dma_range * +bus_dma_get_range(void) +{ + + return (NULL); +} + +int +bus_dma_get_range_nb(void) +{ + + return (0); +} Added: head/sys/arm/altera/socfpga/std.socfpga ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/altera/socfpga/std.socfpga Thu Sep 4 12:44:40 2014 (r271093) @@ -0,0 +1,21 @@ +# $FreeBSD$ + +makeoption ARM_LITTLE_ENDIAN + +cpu CPU_CORTEXA +machine arm armv6 + +options PHYSADDR=0x00000000 + +makeoptions KERNPHYSADDR=0x00f00000 +options KERNPHYSADDR=0x00f00000 + +makeoptions KERNVIRTADDR=0xc0f00000 +options KERNVIRTADDR=0xc0f00000 + +options ARM_L2_PIPT + +options IPI_IRQ_START=0 +options IPI_IRQ_END=15 + +files "../altera/socfpga/files.socfpga" Added: head/sys/arm/conf/SOCKIT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/conf/SOCKIT Thu Sep 4 12:44:40 2014 (r271093) @@ -0,0 +1,136 @@ +# Kernel configuration for Terasic SoCKit (Altera Cyclone V SoC). +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +ident SOCKIT +include "../altera/socfpga/std.socfpga" + +makeoptions MODULES_OVERRIDE="" + +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +makeoptions WERROR="-Werror" + +options HZ=100 +options SCHED_4BSD # 4BSD scheduler +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options GEOM_PART_GPT # GUID partition tables +options TMPFS # Efficient memory filesystem +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions +options KBD_INSTALL_CDEV +options PREEMPTION +options FREEBSD_BOOT_LOADER +options VFP # vfp/neon + +#options SMP + +# Debugging +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options BREAK_TO_DEBUGGER +#options VERBOSE_SYSINIT # Enable verbose sysinit messages +options KDB +options DDB # Enable the kernel debugger +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options DIAGNOSTIC + +# NFS support +options NFSCL # Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCLIENT + +# Uncomment this for NFS root +#options NFS_ROOT # NFS usable as /, requires NFSCL +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=ue0 + +device mmc # mmc/sd bus +device mmcsd # mmc/sd flash cards +device sdhci # generic sdhci + +options ROOTDEVNAME=\"ufs:/dev/da0\" + +# Pseudo devices + +device loop +device random +device pty +device md +device gpio + +# USB support +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. +device usb +options USB_DEBUG +#options USB_REQ_DEBUG +#options USB_VERBOSE +#device musb +device dwcotg + +device umass +device scbus # SCSI bus (required for ATA/SCSI) +device da # Direct Access (disks) +device pass + +# Serial ports +device uart +device uart_ns8250 + +# I2C (TWSI) +device iic +device iicbus + +# SPI +device spibus + +# Ethernet +device ether +device mii +device smsc +device smscphy + +# USB ethernet support, requires miibus +device miibus +device axe # ASIX Electronics USB Ethernet +device bpf # Berkeley packet filter + +#FDT +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=socfpga-sockit.dts Added: head/sys/boot/fdt/dts/arm/socfpga-sockit.dts ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/arm/socfpga-sockit.dts Thu Sep 4 12:44:40 2014 (r271093) @@ -0,0 +1,61 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/dts-v1/; + +/include/ "socfpga.dtsi" + +/ { + model = "Terasic SoCKit"; + compatible = "altr,socfpga-cyclone5", "altr,socfpga"; + + memory { + device_type = "memory"; + reg = < 0x00000000 0x40000000 >; /* 1G RAM */ + }; + + SOC: socfpga { + serial0: serial@ffc02000 { + status = "okay"; + }; + + usb1: usb@ffb40000 { + status = "okay"; + }; + }; + + chosen { + bootargs = "-v"; + stdin = "serial0"; + stdout = "serial0"; + }; +}; Added: head/sys/boot/fdt/dts/arm/socfpga.dtsi ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/arm/socfpga.dtsi Thu Sep 4 12:44:40 2014 (r271093) @@ -0,0 +1,111 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/ { + compatible = "altr,socfpga"; + #address-cells = <1>; + #size-cells = <1>; + + interrupt-parent = <&GIC>; + + aliases { + soc = &SOC; + serial0 = &serial0; + serial1 = &serial1; + }; + + SOC: socfpga { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges; + bus-frequency = <0>; + + GIC: interrupt-controller@fffed000 { + compatible = "arm,gic"; + reg = < 0xfffed000 0x1000 >, /* Distributor */ + < 0xfffec100 0x100 >; /* CPU Interface */ + interrupt-controller; + #interrupt-cells = <1>; + }; + + mp_tmr@40002100 { + compatible = "arm,mpcore-timers"; + clock-frequency = <200000000>; + #address-cells = <1>; + #size-cells = <0>; + reg = < 0xfffec200 0x100 >, /* Global Timer */ + < 0xfffec600 0x100 >; /* Private Timer */ + interrupts = < 27 29 >; + interrupt-parent = < &GIC >; + }; + + serial0: serial@ffc02000 { + compatible = "ns16550"; + reg = <0xffc02000 0x1000>; + reg-shift = <2>; + interrupts = <194>; + interrupt-parent = <&GIC>; + current-speed = <115200>; + clock-frequency = < 100000000 >; + status = "disabled"; + }; + + serial1: serial@ffc03000 { + compatible = "ns16550"; + reg = <0xffc03000 0x1000>; + reg-shift = <2>; + interrupts = <195>; + interrupt-parent = <&GIC>; + current-speed = <115200>; + clock-frequency = < 100000000 >; + status = "disabled"; + }; + + usb0: usb@ffb00000 { + compatible = "synopsys,designware-hs-otg2"; + reg = <0xffb00000 0xffff>; + interrupts = <157>; + interrupt-parent = <&GIC>; + status = "disabled"; + }; + + usb1: usb@ffb40000 { + compatible = "synopsys,designware-hs-otg2"; + reg = <0xffb40000 0xffff>; + interrupts = <160>; + interrupt-parent = <&GIC>; + dr_mode = "host"; + status = "disabled"; + }; + }; +}; From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 13:13:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9B008A0; Thu, 4 Sep 2014 13:13:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D511B1547; Thu, 4 Sep 2014 13:13:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84DDglk017512; Thu, 4 Sep 2014 13:13:42 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84DDgl0017511; Thu, 4 Sep 2014 13:13:42 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409041313.s84DDgl0017511@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 4 Sep 2014 13:13:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271094 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 13:13:43 -0000 Author: ian Date: Thu Sep 4 13:13:42 2014 New Revision: 271094 URL: http://svnweb.freebsd.org/changeset/base/271094 Log: Fix typo in variable name. Modified: head/sys/arm/freescale/imx/imx51_iomux.c Modified: head/sys/arm/freescale/imx/imx51_iomux.c ============================================================================== --- head/sys/arm/freescale/imx/imx51_iomux.c Thu Sep 4 12:44:40 2014 (r271093) +++ head/sys/arm/freescale/imx/imx51_iomux.c Thu Sep 4 13:13:42 2014 (r271094) @@ -222,7 +222,7 @@ imx_iomux_gpr_get(u_int regnum) { KASSERT(iomuxsc != NULL, ("imx_iomux_gpr_get() called before attach")); - KASSERT(regnum >= 0 && renum <= 1, + KASSERT(regnum >= 0 && regnum <= 1, ("imx_iomux_gpr_get bad regnum %u", regnum)); return (IOMUX_READ(iomuxsc, IOMUXC_GPR0 + regnum)); } @@ -232,7 +232,7 @@ imx_iomux_gpr_set(u_int regnum, uint32_t { KASSERT(iomuxsc != NULL, ("imx_iomux_gpr_set() called before attach")); - KASSERT(regnum >= 0 && renum <= 1, + KASSERT(regnum >= 0 && regnum <= 1, ("imx_iomux_gpr_set bad regnum %u", regnum)); IOMUX_WRITE(iomuxsc, IOMUXC_GPR0 + regnum, val); } @@ -244,7 +244,7 @@ imx_iomux_gpr_set_masked(u_int regnum, u KASSERT(iomuxsc != NULL, ("imx_iomux_gpr_set_masked called before attach")); - KASSERT(regnum >= 0 && renum <= 1, + KASSERT(regnum >= 0 && regnum <= 1, ("imx_iomux_gpr_set_masked bad regnum %u", regnum)); val = IOMUX_READ(iomuxsc, IOMUXC_GPR0 + regnum); From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 13:45:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BF2E432; Thu, 4 Sep 2014 13:45:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFC5C1A33; Thu, 4 Sep 2014 13:45:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84DjKXf032032; Thu, 4 Sep 2014 13:45:20 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84DjGBA032005; Thu, 4 Sep 2014 13:45:16 GMT (envelope-from se@FreeBSD.org) Message-Id: <201409041345.s84DjGBA032005@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Thu, 4 Sep 2014 13:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271095 - in stable/10: etc/defaults etc/rc.d sbin/conscontrol share/man/man4 share/man/man5 share/man/man7 share/man/man8 tools/tools/vt/keymaps usr.bin/lock usr.sbin/bsdconfig usr.sbi... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 13:45:21 -0000 Author: se Date: Thu Sep 4 13:45:16 2014 New Revision: 271095 URL: http://svnweb.freebsd.org/changeset/base/271095 Log: MFC r270647: Add references to vt(4) and the configuration files in /usr/sha MFC r270653: Update man-pages to correctly refer to changed pathes and namin MFC r270657: More man pages that need to know about vt in addition to syscon MFC r270659: (by pluknet@) Missed comma. MFC r270660: Back-out the references to vt(4) from this man-page. It appears MFC r270933: Add references to vt(4) to further man-pages. MFC r270934: Final patches to the tools used to convert syscons keymaps for MFC r270935: Add vt(4) support to the console initialisation script, specifi Second batch of MFCs to add support for Unicode keymaps for use with vt(4). It contains the following changes: - Add references to vt(4) to relevant man-pages. - Update comment in defaults/rc.conf to mention vt - Update rc.d/syscons to warn about syscons keymaps used under vt. An attempt is made to identify the vt keymap to load instead. - Minor changes to the conversion tool based on mail comments on keymaps. Relnotes: yes Modified: stable/10/etc/defaults/rc.conf stable/10/etc/rc.d/syscons stable/10/sbin/conscontrol/conscontrol.8 stable/10/share/man/man4/atkbd.4 stable/10/share/man/man4/kbdmux.4 stable/10/share/man/man4/ukbd.4 stable/10/share/man/man4/vkbd.4 stable/10/share/man/man4/vt.4 stable/10/share/man/man5/rc.conf.5 stable/10/share/man/man7/hier.7 stable/10/share/man/man8/nanobsd.8 stable/10/tools/tools/vt/keymaps/KBDFILES.map stable/10/tools/tools/vt/keymaps/convert-keymap.pl stable/10/usr.bin/lock/lock.1 stable/10/usr.sbin/bsdconfig/bsdconfig.8 stable/10/usr.sbin/bsdinstall/bsdinstall.8 stable/10/usr.sbin/kbdcontrol/kbdcontrol.1 stable/10/usr.sbin/kbdcontrol/kbdmap.5 stable/10/usr.sbin/kbdmap/kbdmap.1 stable/10/usr.sbin/vidcontrol/vidcontrol.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/defaults/rc.conf ============================================================================== --- stable/10/etc/defaults/rc.conf Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/etc/defaults/rc.conf Thu Sep 4 13:45:16 2014 (r271095) @@ -524,15 +524,15 @@ ip6addrctl_policy="AUTO" # A pre-defined ############################################################## keyboard="" # keyboard device to use (default /dev/kbd0). -keymap="NO" # keymap in /usr/share/syscons/keymaps/* (or NO). +keymap="NO" # keymap in /usr/share/{syscons,vt}/keymaps/* (or NO). keyrate="NO" # keyboard rate to: slow, normal, fast (or NO). keybell="NO" # See kbdcontrol(1) for options. Use "off" to disable. keychange="NO" # function keys default values (or NO). cursor="NO" # cursor type {normal|blink|destructive} (or NO). scrnmap="NO" # screen map in /usr/share/syscons/scrnmaps/* (or NO). -font8x16="NO" # font 8x16 from /usr/share/syscons/fonts/* (or NO). -font8x14="NO" # font 8x14 from /usr/share/syscons/fonts/* (or NO). -font8x8="NO" # font 8x8 from /usr/share/syscons/fonts/* (or NO). +font8x16="NO" # font 8x16 from /usr/share/{syscons,vt}/fonts/* (or NO). +font8x14="NO" # font 8x14 from /usr/share/{syscons,vt}/fonts/* (or NO). +font8x8="NO" # font 8x8 from /usr/share/{syscons,vt}/fonts/* (or NO). blanktime="300" # blank time (in seconds) or "NO" to turn it off. saver="NO" # screen saver: Uses /boot/kernel/${saver}_saver.ko moused_nondefault_enable="YES" # Treat non-default mice as enabled unless Modified: stable/10/etc/rc.d/syscons ============================================================================== --- stable/10/etc/rc.d/syscons Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/etc/rc.d/syscons Thu Sep 4 13:45:16 2014 (r271095) @@ -45,16 +45,122 @@ stop_cmd=":" kbddev=/dev/ttyv0 viddev=/dev/ttyv0 -_sc_config="syscons" +_sc_config= +_sc_console= _sc_initdone= +_sc_keymap_msg= sc_init() { if [ -z "${_sc_initdone}" ]; then + if [ -z "${_sc_console}" ]; then + if [ x`sysctl -n kern.vty` = x"vt" ]; then + _sc_console="vt" + else + _sc_console="syscons" + fi + _sc_config="${_sc_console}" + fi echo -n "Configuring ${_sc_config}:" _sc_initdone=yes fi } +# syscons to vt migration helper +lookup_keymap_for_vt() +{ + keymap=`basename $1 .kbd` + case $keymap in +hy.armscii-8) echo am;; +be.iso.acc) echo be.acc;; +be.iso) echo be;; +bg.bds.ctrlcaps) echo bg.bds;; +bg.phonetic.ctrlcaps) echo bg.phonetic;; +br275.iso.acc) echo br;; +br275.*) echo br.noacc;; +by.*) echo by;; +fr_CA.iso.acc) echo ca-fr;; +swissgerman.macbook.acc) echo ch.macbook.acc;; +swissgerman.iso.acc) echo ch.acc;; +swissgerman.*) echo ch;; +swissfrench.iso.acc) echo ch-fr.acc;; +swissfrench.*) echo ch-fr;; +ce.iso2) echo centraleuropean.qwerty;; +colemak.iso15.acc) echo colemak.acc;; +cs.*|cz.*) echo cz;; +german.iso.acc) echo de.acc;; +german.*) echo de;; +danish.iso.acc) echo dk.acc;; +danish.iso.macbook) echo dk.macbook;; +danish.*) echo dk;; +estonian.*) echo ee;; +spanish.dvorak) echo es.dvorak;; +spanish.iso*.acc) echo es.acc;; +spanish.iso) echo es;; +finnish.*) echo fi;; +fr.macbook.acc) echo fr.macbook;; +fr.iso.acc) echo fr.acc;; +fr.iso) echo fr;; +el.iso07) echo gr;; +gr.us101.acc) echo gr.101.acc;; +hr.iso) echo hr;; +hu.iso2.101keys) echo hu.101;; +hu.iso2.102keys) echo hu.102;; +iw.iso8) echo il;; +icelandic.iso.acc) echo is.acc;; +icelandic.iso) echo is;; +it.iso) echo it;; +jp.106x) echo jp.capsctrl;; +jp.106) echo jp;; +#?? jp.pc98.iso) echo jp.pc98;; +kk.pt154.io) echo kz.io;; +kk.pt154.kst) echo kz.kst;; +latinamerican.iso.acc) echo latinamerican.acc;; +lt.iso4) echo lt;; +norwegian.iso) echo no;; +norwegian.dvorak) echo no.dvorak;; +dutch.iso.acc) echo nl;; +eee_nordic) echo nordic.asus-eee;; +pl_PL.dvorak) echo pl.dvorak;; +pl_PL.ISO8859-2) echo pl;; +pt.iso.acc) echo pt.acc;; +pt.iso) echo pt;; +ru.koi8-r.shift) echo ru.shift;; +ru.koi8-r.win) echo ru.win;; +ru.*) echo ru;; +swedish.*) echo se;; +si.iso) echo si;; +sk.iso2) echo sk;; +tr.iso9.q) echo tr;; +ua.koi8-u.shift.alt) echo ua.shift.alt;; +ua.*) echo ua;; +uk.*-ctrl) echo uk.capsctrl;; +uk.dvorak) echo uk.dvorak;; +uk.*) echo uk;; +us.iso.acc) echo us.acc;; +us.pc-ctrl) echo us.ctrl;; +us.iso) echo us;; + esac +} + +kbdcontrol_load_keymap() +{ + errmsg=`kbdcontrol < ${kbddev} -l ${keymap} 2>&1` + if [ -n "${errmsg}" -a "${_sc_console}" = "vt" ]; then + _sc_keymap_msg="${errmsg}" + keymap_vt=`lookup_keymap_for_vt ${keymap}` + if [ -n "${keymap_vt}" ]; then + errmsg=`kbdcontrol < ${kbddev} -l ${keymap_vt} 2>&1` + if [ -z "${errmsg}" ]; then + _sc_keymap_msg="New keymap: In /etc/rc.conf replace 'keymap=${keymap}' by 'keymap=${keymap_vt}'" + fi + else + _sc_keymap_msg="No replacement found for keymap '${keymap}'. +You may try to convert your keymap file using 'convert-keymap.pl', which is +part of the system sources and located in /usr/src/tools/tools/vt/keymaps/" + fi + fi +} + # helper syscons_configure_keyboard() { @@ -65,7 +171,7 @@ syscons_configure_keyboard() ;; *) sc_init - echo -n ' keymap'; kbdcontrol < ${kbddev} -l ${keymap} + echo -n ' keymap'; kbdcontrol_load_keymap ;; esac @@ -139,10 +245,9 @@ syscons_setkeyboard() # if [ -n "${_sc_initdone}" ]; then echo '.' - _sc_config="syscons" + _sc_config="${_sc_console}" _sc_initdone= fi - } syscons_precmd() @@ -256,6 +361,12 @@ syscons_start() fi [ -n "${_sc_initdone}" ] && echo '.' + if [ -n "${_sc_keymap_msg}" ]; then + echo + echo "WARNING:" + echo "${_sc_keymap_msg}." + echo + fi } load_rc_config $name Modified: stable/10/sbin/conscontrol/conscontrol.8 ============================================================================== --- stable/10/sbin/conscontrol/conscontrol.8 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/sbin/conscontrol/conscontrol.8 Thu Sep 4 13:45:16 2014 (r271095) @@ -104,6 +104,7 @@ This is an interface to the tty ioctl .Xr sio 4 , .Xr syscons 4 , .Xr tty 4 , +.Xr vt 4 , .Xr boot 8 , .Xr loader 8 .Sh HISTORY Modified: stable/10/share/man/man4/atkbd.4 ============================================================================== --- stable/10/share/man/man4/atkbd.4 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/share/man/man4/atkbd.4 Thu Sep 4 13:45:16 2014 (r271095) @@ -51,7 +51,9 @@ driver, provides access to the AT 84 key which is connected to the AT keyboard controller. .Pp This driver is required for the console driver -.Xr syscons 4 . +.Xr syscons 4 +or +.Xr vt 4 . .Pp There can be only one .Nm @@ -211,6 +213,7 @@ In both cases, you also need to have fol .Xr atkbdc 4 , .Xr psm 4 , .Xr syscons 4 , +.Xr vt 4 , .Xr kbdmap 5 , .Xr loader 8 .Sh HISTORY Modified: stable/10/share/man/man4/kbdmux.4 ============================================================================== --- stable/10/share/man/man4/kbdmux.4 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/share/man/man4/kbdmux.4 Thu Sep 4 13:45:16 2014 (r271095) @@ -34,7 +34,8 @@ utility. .Xr kbdcontrol 1 , .Xr atkbd 4 , .Xr syscons 4 , -.Xr ukbd 4 +.Xr ukbd 4 , +.Xr vt 4 .Sh HISTORY The .Nm Modified: stable/10/share/man/man4/ukbd.4 ============================================================================== --- stable/10/share/man/man4/ukbd.4 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/share/man/man4/ukbd.4 Thu Sep 4 13:45:16 2014 (r271095) @@ -127,7 +127,9 @@ Make the keyboards available through a c The above lines will put the French ISO keymap in the ukbd driver. You can specify any keymap in .Pa /usr/share/syscons/keymaps -with this option. +or +.Pa /usr/share/vt/keymaps +(depending on the console driver being used) with this option. .Pp .D1 Cd "options KBD_DISABLE_KEYMAP_LOADING" .Pp @@ -151,6 +153,7 @@ driver to the kernel. .Xr syscons 4 , .Xr uhci 4 , .Xr usb 4 , +.Xr vt 4 , .Xr config 8 .Sh AUTHORS .An -nosplit Modified: stable/10/share/man/man4/vkbd.4 ============================================================================== --- stable/10/share/man/man4/vkbd.4 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/share/man/man4/vkbd.4 Thu Sep 4 13:45:16 2014 (r271095) @@ -129,7 +129,8 @@ All queued scan codes are thrown away. .Xr kbdcontrol 1 , .Xr atkbdc 4 , .Xr psm 4 , -.Xr syscons 4 +.Xr syscons 4 , +.Xr vt 4 .Sh HISTORY The .Nm Modified: stable/10/share/man/man4/vt.4 ============================================================================== --- stable/10/share/man/man4/vt.4 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/share/man/man4/vt.4 Thu Sep 4 13:45:16 2014 (r271095) @@ -197,13 +197,17 @@ If this value is not set, is used. .El .Sh FILES -.Bl -tag -width /usr/share/syscons/keymaps/* -compact +.Bl -tag -width /usr/share/vt/keymaps/* -compact .It Pa /dev/console .It Pa /dev/consolectl .It Pa /dev/ttyv* virtual terminals .It Pa /etc/ttys terminal initialization information +.It Pa /usr/share/vt/fonts/*.fnt +console fonts +.It Pa /usr/share/vt/keymaps/*.kbd +keyboard layouts .El .Sh EXAMPLES This example changes the default color of normal text to green on a @@ -229,7 +233,6 @@ on a black background, or black on a bri .Xr splash 4 , .Xr syscons 4 , .Xr ukbd 4 , -.Xr vga 4 , .Xr kbdmap 5 , .Xr rc.conf 5 , .Xr ttys 5 , Modified: stable/10/share/man/man5/rc.conf.5 ============================================================================== --- stable/10/share/man/man5/rc.conf.5 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/share/man/man5/rc.conf.5 Thu Sep 4 13:45:16 2014 (r271095) @@ -3120,8 +3120,13 @@ set to this device. If set to .Dq Li NO , no keymap is installed, otherwise the value is used to install -the keymap file in -.Pa /usr/share/syscons/keymaps/ Ns Ao Ar value Ac Ns Pa .kbd . +the keymap file found in +.Pa /usr/share/syscons/keymaps/ Ns Ao Ar value Ac Ns Pa .kbd +(if using +.Xr syscons 4 ) or +.Pa /usr/share/vt/keymaps/ Ns Ao Ar value Ac Ns Pa .kbd +(if using +.Xr vt 4 ) . .It Va keyrate .Pq Vt str The keyboard repeat speed. @@ -3156,6 +3161,9 @@ If set to no screen map is installed, otherwise the value is used to install the screen map file in .Pa /usr/share/syscons/scrnmaps/ Ns Aq Ar value . +This parameter is ignored when using +.Xr vt 4 +as the console driver. .It Va font8x16 .Pq Vt str If set to @@ -3163,7 +3171,9 @@ If set to the default 8x16 font value is used for screen size requests, otherwise the value in .Pa /usr/share/syscons/fonts/ Ns Aq Ar value -is used. +or +.Pa /usr/share/vt/fonts/ Ns Aq Ar value +is used (depending on the console driver being used). .It Va font8x14 .Pq Vt str If set to @@ -3171,7 +3181,9 @@ If set to the default 8x14 font value is used for screen size requests, otherwise the value in .Pa /usr/share/syscons/fonts/ Ns Aq Ar value -is used. +or +.Pa /usr/share/vt/fonts/ Ns Aq Ar value +is used (depending on the console driver being used). .It Va font8x8 .Pq Vt str If set to @@ -3179,7 +3191,9 @@ If set to the default 8x8 font value is used for screen size requests, otherwise the value in .Pa /usr/share/syscons/fonts/ Ns Aq Ar value -is used. +or +.Pa /usr/share/vt/fonts/ Ns Aq Ar value +is used (depending on the console driver being used). .It Va blanktime .Pq Vt int If set to @@ -3386,6 +3400,8 @@ For example, .Dq Fl h Li 200 will set the .Xr syscons 4 +or +.Xr vt 4 scrollback (history) buffer to 200 lines. .It Va cron_enable .Pq Vt bool Modified: stable/10/share/man/man7/hier.7 ============================================================================== --- stable/10/share/man/man7/hier.7 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/share/man/man7/hier.7 Thu Sep 4 13:45:16 2014 (r271095) @@ -640,6 +640,26 @@ timezone configuration information; see .Xr tzfile 5 .El +.It Pa vt/ +files used by vt; +see +.Xr vt 4 +.Bl -tag -width ".Pa scrnmaps/" -compact +.It Pa fonts/ +console fonts; +see +.Xr vidcontrol 1 +and +.Xr vidfont 1 +.It Pa keymaps/ +console keyboard maps; +see +.Xr kbdcontrol 1 +and +.Xr kbdmap 1 +.\" .It Pa scrnmaps/ +.\" console screen maps +.El .It Pa src/ .Bx , third-party, and/or local source files Modified: stable/10/share/man/man8/nanobsd.8 ============================================================================== --- stable/10/share/man/man8/nanobsd.8 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/share/man/man8/nanobsd.8 Thu Sep 4 13:45:16 2014 (r271095) @@ -277,6 +277,8 @@ Disables .Xr getty 8 on the virtual .Xr syscons 4 +or +.Xr vt 4 terminals .Pq Pa /dev/ttyv* and enables the use of the first serial port as the system Modified: stable/10/tools/tools/vt/keymaps/KBDFILES.map ============================================================================== --- stable/10/tools/tools/vt/keymaps/KBDFILES.map Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/tools/tools/vt/keymaps/KBDFILES.map Thu Sep 4 13:45:16 2014 (r271095) @@ -144,6 +144,6 @@ ISO8859-1 us.emacs.kbd us.emacs.kbd ISO8859-1 us.pc-ctrl.kbd us.ctrl.kbd ISO8859-1 us.unix.kbd us.unix.kbd -ISO8859-5 ua.iso5.kbd ua.kbd.from-iso5 +#ISO8859-5 ua.iso5.kbd ua.kbd.from-iso5 KOI8-U ua.koi8-u.kbd ua.kbd KOI8-U ua.koi8-u.shift.alt.kbd ua.shift.alt.kbd Modified: stable/10/tools/tools/vt/keymaps/convert-keymap.pl ============================================================================== --- stable/10/tools/tools/vt/keymaps/convert-keymap.pl Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/tools/tools/vt/keymaps/convert-keymap.pl Thu Sep 4 13:45:16 2014 (r271095) @@ -7,7 +7,7 @@ use strict; use utf8; # command line parsing -die "Usage: $0 filename.kbd CHARSET [EURO]" +die "Usage: $0 filename.kbd charset [EURO|YEN]\n" unless ($ARGV[1]); my $inputfile = shift; # first command argument @@ -60,8 +60,8 @@ sub local_to_UCS_code $ucs_char = 0xa5 # replace with Jap. Yen character on PC kbd if $ucs_char == ord('\\') and $use_yen and $current_scancode == 125; - $ucs_char = 0xa5 # replace with Jap. Yen character on PC98x1 kbd - if $ucs_char == ord('\\') and $use_yen and $current_scancode == 13; +# $ucs_char = 0xa5 # replace with Jap. Yen character on PC98x1 kbd +# if $ucs_char == ord('\\') and $use_yen and $current_scancode == 13; return prettyprint_token($ucs_char); } Modified: stable/10/usr.bin/lock/lock.1 ============================================================================== --- stable/10/usr.bin/lock/lock.1 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/usr.bin/lock/lock.1 Thu Sep 4 13:45:16 2014 (r271095) @@ -69,11 +69,14 @@ option of and thus has the same restrictions. It is only available if the terminal in question is a .Xr syscons 4 +or +.Xr vt 4 virtual terminal. .El .Sh SEE ALSO .Xr vidcontrol 1 , -.Xr syscons 4 +.Xr syscons 4 , +.Xr vt 4 .Sh HISTORY The .Nm Modified: stable/10/usr.sbin/bsdconfig/bsdconfig.8 ============================================================================== --- stable/10/usr.sbin/bsdconfig/bsdconfig.8 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/usr.sbin/bsdconfig/bsdconfig.8 Thu Sep 4 13:45:16 2014 (r271095) @@ -172,16 +172,27 @@ Shortcut to the Delete menu under the Vi (startup_rcconf) of startup. .It Cm startup_rcvar Shortcut to the Toggle Startup Services menu under startup. +.\" use neutral name, e.g. console_keymap instead of syscons_keymap? +.\" font (encoding) selection not applicable to vt(4)! .It Cm syscons_font Shortcut to the Font menu under console. +.\" .It Cm console_keymap +.\" Shortcut to the Keymap menu under console. .It Cm syscons_keymap Shortcut to the Keymap menu under console. +.\" .It Cm vt_repeat +.\" Shortcut to the Repeat menu under console. .It Cm syscons_repeat Shortcut to the Repeat menu under console. +.\" .It Cm vt_saver +.\" Shortcut to the Saver menu under console. .It Cm syscons_saver Shortcut to the Saver menu under console. +.\" screenmap (encoding) selection not applicable to vt(4)! .It Cm syscons_screenmap Shortcut to the Screenmap menu under console. +.\" .It Cm vt_syscons_ttys +.\" Shortcut to the Ttys menu under console. .It Cm syscons_ttys Shortcut to the Ttys menu under console. .It Cm timezone Modified: stable/10/usr.sbin/bsdinstall/bsdinstall.8 ============================================================================== --- stable/10/usr.sbin/bsdinstall/bsdinstall.8 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/usr.sbin/bsdinstall/bsdinstall.8 Thu Sep 4 13:45:16 2014 (r271095) @@ -95,6 +95,8 @@ for more information on this target. .It Cm keymap If the current controlling TTY is a .Xr syscons 4 +or +.Xr vt 4 console, asks the user to set the current keymap, and saves the result to the new system's .Pa rc.conf . Modified: stable/10/usr.sbin/kbdcontrol/kbdcontrol.1 ============================================================================== --- stable/10/usr.sbin/kbdcontrol/kbdcontrol.1 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/usr.sbin/kbdcontrol/kbdcontrol.1 Thu Sep 4 13:45:16 2014 (r271095) @@ -1,5 +1,5 @@ .\" -.\" kbdcontrol - a utility for manipulating the syscons keyboard driver section +.\" kbdcontrol - a utility for manipulating the syscons or vt keyboard driver section .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -41,6 +41,8 @@ The .Nm command is used to set various keyboard related options for the .Xr syscons 4 +or +.Xr vt 4 console driver and the keyboard drivers, such as key map, keyboard repeat and delay rates, bell characteristics etc. @@ -213,7 +215,9 @@ for details. .Sh FILES .Bl -tag -width /usr/share/syscons/keymaps/foo_bar -compact .It Pa /usr/share/syscons/keymaps/* -keyboard map files +keyboard map files for syscons +.It Pa /usr/share/vt/keymaps/* +keyboard map files for vt .El .Sh EXAMPLES The following command will load the keyboard map file @@ -222,9 +226,19 @@ The following command will load the keyb .Dl kbdcontrol -l /usr/share/syscons/keymaps/ru.koi8-r.kbd .Pp So long as the keyboard map file resides in -.Pa /usr/share/syscons/keymaps , +.Pa /usr/share/syscons/keymaps +(if using +.Xr syscons 4 ) or +.Pa /usr/share/vt/keymaps +(if using +.Xr vt 4 ) , you may abbreviate the file name as .Pa ru.koi8-r . +Since +.Xr vt 4 +uses Unicode, the corresponding keyboard file names omit the encoding +and typically are just a country code, e.g.\& +.Pa ru . .Pp .Dl kbdcontrol -l ru.koi8-r .Pp @@ -268,6 +282,7 @@ kbdcontrol -k /dev/kbdmux0 < /dev/consol .Xr screen 4 , .Xr syscons 4 , .Xr ukbd 4 , +.Xr vt 4 , .Xr kbdmap 5 , .Xr rc.conf 5 .Sh AUTHORS Modified: stable/10/usr.sbin/kbdcontrol/kbdmap.5 ============================================================================== --- stable/10/usr.sbin/kbdcontrol/kbdmap.5 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/usr.sbin/kbdcontrol/kbdmap.5 Thu Sep 4 13:45:16 2014 (r271095) @@ -313,13 +313,16 @@ for that vowel with a grave accent. .Sh FILES .Bl -tag -width /usr/share/syscons/keymaps/* -compact .It Pa /usr/share/syscons/keymaps/* -standard keyboard map files +standard keyboard map files for syscons +.It Pa /usr/share/vt/keymaps/* +standard keyboard map files for vt .El .Sh SEE ALSO .Xr kbdcontrol 1 , .Xr kbdmap 1 , .Xr keyboard 4 , .Xr syscons 4 , +.Xr vt 4 , .Xr ascii 7 .Sh HISTORY This manual page first appeared in Modified: stable/10/usr.sbin/kbdmap/kbdmap.1 ============================================================================== --- stable/10/usr.sbin/kbdmap/kbdmap.1 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/usr.sbin/kbdmap/kbdmap.1 Thu Sep 4 13:45:16 2014 (r271095) @@ -29,7 +29,7 @@ .Sh NAME .Nm kbdmap , .Nm vidfont -.Nd front end for syscons +.Nd front end for syscons and vt .Sh SYNOPSIS .Nm .Op Fl K @@ -106,8 +106,10 @@ preferred language .Sh FILES .Bl -tag -width ".Pa /usr/share/syscons/keymaps/INDEX.keymaps" -compact .It Pa /usr/share/syscons/keymaps/INDEX.keymaps +.It Pa /usr/share/vt/keymaps/INDEX.keymaps database for keymaps .It Pa /usr/share/syscons/fonts/INDEX.fonts +.It Pa /usr/share/vt/fonts/INDEX.fonts database for fonts .It Pa /etc/rc.conf default font @@ -120,6 +122,8 @@ values .Xr dialog 1 , .Xr kbdcontrol 1 , .Xr vidcontrol 1 , +.Xr syscons 4 , +.Xr vt 4 , .Xr kbdmap 5 , .Xr rc.conf 5 .Sh HISTORY Modified: stable/10/usr.sbin/vidcontrol/vidcontrol.1 ============================================================================== --- stable/10/usr.sbin/vidcontrol/vidcontrol.1 Thu Sep 4 13:13:42 2014 (r271094) +++ stable/10/usr.sbin/vidcontrol/vidcontrol.1 Thu Sep 4 13:45:16 2014 (r271095) @@ -1,5 +1,5 @@ .\" -.\" vidcontrol - a utility for manipulating the syscons video driver +.\" vidcontrol - a utility for manipulating the syscons or vt video driver .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -48,9 +48,15 @@ The .Nm utility is used to set various options for the .Xr syscons 4 +or +.Xr vt 4 console driver, such as video mode, colors, cursor shape, screen output map, font and screen saver timeout. +Only a small subset of options is supported by +.Xr vt 4 . +Unsupported options lead to error messages, typically including +the text "Inappropriate ioctl for device". .Pp The following command line options are supported: .Bl -tag -width indent @@ -158,8 +164,11 @@ See also .Sx Video Mode Support and .Sx EXAMPLES -below and the man page for -.Xr syscons 4 . +below and the man page for either +.Xr syscons 4 +or +.Xr vt 4 +(depending on which driver you use). .It Fl g Ar geometry Set the .Ar geometry @@ -185,7 +194,10 @@ Shows the possible video modes with the Install screen output map file from .Ar screen_map . See also -.Xr syscons 4 . +.Xr syscons 4 +or +.Xr vt 4 +(depending on which driver you use). .It Fl L Install default screen output map. .It Fl M Ar char @@ -307,12 +319,18 @@ kernel with the option. See .Xr syscons 4 +or +.Xr vt 4 +(depending on which driver you use) for more details on this kernel option. .Ss Format of Video Buffer Dump The .Nm utility uses the .Xr syscons 4 +.\" is it supported on vt(4)??? +or +.Xr vt 4 .Dv CONS_SCRSHOT .Xr ioctl 2 to capture the current contents of the video buffer. @@ -453,9 +471,12 @@ for details. .Sh FILES .Bl -tag -width /usr/share/syscons/scrnmaps/foo-bar -compact .It Pa /usr/share/syscons/fonts/* +.It Pa /usr/share/vt/fonts/* font files. .It Pa /usr/share/syscons/scrnmaps/* -screen output map files. +screen output map files (relevant for +.Xr syscons 4 +only). .El .Sh EXAMPLES If you want to load @@ -467,7 +488,10 @@ as: .Dl vidcontrol -f 8x16 /usr/share/syscons/fonts/iso-8x16.fnt .Pp So long as the font file is in -.Pa /usr/share/syscons/fonts , +.Pa /usr/share/syscons/fonts +(if using syscons) or +.Pa /usr/share/vt/fonts +(if using vt), you may abbreviate the file name as .Pa iso-8x16 : .Pp @@ -521,6 +545,7 @@ to the standard output in the human read .Xr screen 4 , .Xr syscons 4 , .Xr vga 4 , +.Xr vt 4 , .Xr rc.conf 5 , .Xr kldload 8 , .Xr moused 8 , From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 13:47:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 531A75A7; Thu, 4 Sep 2014 13:47:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DE781A59; Thu, 4 Sep 2014 13:47:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84DlucB032403; Thu, 4 Sep 2014 13:47:56 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84Dlu6a032402; Thu, 4 Sep 2014 13:47:56 GMT (envelope-from se@FreeBSD.org) Message-Id: <201409041347.s84Dlu6a032402@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Thu, 4 Sep 2014 13:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271096 - stable/10/usr.sbin/smbmsg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 13:47:56 -0000 Author: se Date: Thu Sep 4 13:47:55 2014 New Revision: 271096 URL: http://svnweb.freebsd.org/changeset/base/271096 Log: MFC r270931: Fix typo ("by" -> "be"). Modified: stable/10/usr.sbin/smbmsg/smbmsg.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/smbmsg/smbmsg.8 ============================================================================== --- stable/10/usr.sbin/smbmsg/smbmsg.8 Thu Sep 4 13:45:16 2014 (r271095) +++ stable/10/usr.sbin/smbmsg/smbmsg.8 Thu Sep 4 13:47:55 2014 (r271096) @@ -59,7 +59,7 @@ The first form shown in the synopsis can the devices on the SMBus. This is done by sending each valid device address one receive byte, and one quick read message, respectively. -Devices that respond to these requests will by displayed +Devices that respond to these requests will be displayed by their device address, followed by the strings .Ql r , .Ql w , From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 14:25:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3647B488; Thu, 4 Sep 2014 14:25:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2026C1EBF; Thu, 4 Sep 2014 14:25:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84EPWi2054175; Thu, 4 Sep 2014 14:25:32 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84EPW6i054170; Thu, 4 Sep 2014 14:25:32 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409041425.s84EPW6i054170@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 4 Sep 2014 14:25:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271097 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 14:25:33 -0000 Author: ian Date: Thu Sep 4 14:25:32 2014 New Revision: 271097 URL: http://svnweb.freebsd.org/changeset/base/271097 Log: Add a basic iomux driver for imx6. Submitted by: bsam@ Added: head/sys/arm/freescale/imx/imx6_iomux.c (contents, props changed) head/sys/arm/freescale/imx/imx6_iomuxreg.h (contents, props changed) Modified: head/sys/arm/freescale/imx/files.imx6 head/sys/arm/freescale/imx/imx_iomuxvar.h Modified: head/sys/arm/freescale/imx/files.imx6 ============================================================================== --- head/sys/arm/freescale/imx/files.imx6 Thu Sep 4 13:47:55 2014 (r271096) +++ head/sys/arm/freescale/imx/files.imx6 Thu Sep 4 14:25:32 2014 (r271097) @@ -19,11 +19,12 @@ arm/arm/bus_space-v6.c standard arm/arm/mpcore_timer.c standard arm/freescale/fsl_ocotp.c standard arm/freescale/imx/imx6_anatop.c standard -arm/freescale/imx/imx_common.c standard arm/freescale/imx/imx6_ccm.c standard +arm/freescale/imx/imx6_iomux.c standard arm/freescale/imx/imx6_machdep.c standard arm/freescale/imx/imx6_mp.c optional smp arm/freescale/imx/imx6_pl310.c standard +arm/freescale/imx/imx_common.c standard arm/freescale/imx/imx_machdep.c standard arm/freescale/imx/imx_gpt.c standard arm/freescale/imx/imx_gpio.c optional gpio Added: head/sys/arm/freescale/imx/imx6_iomux.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/imx6_iomux.c Thu Sep 4 14:25:32 2014 (r271097) @@ -0,0 +1,189 @@ +/*- + * Copyright (c) 2014 Boris Samorodov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include "imx6_iomuxreg.h" + +#define IOMUX_WRITE(_sc, _r, _v) \ + bus_write_4((_sc)->sc_res, (_r), (_v)) +#define IOMUX_READ(_sc, _r) \ + bus_read_4((_sc)->sc_res, (_r)) +#define IOMUX_SET(_sc, _r, _m) \ + IOMUX_WRITE((_sc), (_r), IOMUX_READ((_sc), (_r)) | (_m)) +#define IOMUX_CLEAR(_sc, _r, _m) \ + IOMUX_WRITE((_sc), (_r), IOMUX_READ((_sc), (_r)) & ~(_m)) + +struct imx6_iomux_softc { + struct resource *sc_res; + device_t sc_dev; +}; + +static struct imx6_iomux_softc *iomuxsc = NULL; + +static struct resource_spec imx6_iomux_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { -1, 0 } +}; + +static int +imx6_iomux_probe(device_t dev) +{ + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "fsl,imx6-iomux")) + return (ENXIO); + + device_set_desc(dev, "Freescale i.MX6 IO pins multiplexor"); + return (BUS_PROBE_DEFAULT); + +} + +static int +imx6_iomux_attach(device_t dev) +{ + struct imx6_iomux_softc * sc; + + sc = device_get_softc(dev); + + if (bus_alloc_resources(dev, imx6_iomux_spec, &sc->sc_res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + iomuxsc = sc; + + /* + * XXX: place to fetch all info about pinmuxing from loader data + * (FDT blob) and apply. Loader (1st one) must care about + * device-to-device difference. + */ + + return (0); +} + +static int +imx6_iomux_detach(device_t dev) +{ + + /* IOMUX registers are always accessible. */ + return (EBUSY); +} + +static void +iomux_set_pad_sub(struct imx6_iomux_softc *sc, uint32_t pin, uint32_t config) +{ + bus_size_t pad_ctl_reg = IOMUX_PIN_TO_PAD_ADDRESS(pin); + + if (pad_ctl_reg != IOMUX_PAD_NONE) + IOMUX_WRITE(sc, pad_ctl_reg, config); +} + +void +iomux_set_pad(unsigned int pin, unsigned int config) +{ + + if (iomuxsc == NULL) + return; + iomux_set_pad_sub(iomuxsc, pin, config); +} + +static void +iomux_set_function_sub(struct imx6_iomux_softc *sc, uint32_t pin, uint32_t fn) +{ + bus_size_t mux_ctl_reg = IOMUX_PIN_TO_MUX_ADDRESS(pin); + + if (mux_ctl_reg != IOMUX_MUX_NONE) + IOMUX_WRITE(sc, mux_ctl_reg, fn); +} + +void +iomux_set_function(unsigned int pin, unsigned int fn) +{ + + if (iomuxsc == NULL) + return; + iomux_set_function_sub(iomuxsc, pin, fn); +} + +static uint32_t +iomux_get_pad_config_sub(struct imx6_iomux_softc *sc, uint32_t pin) +{ + bus_size_t pad_reg = IOMUX_PIN_TO_PAD_ADDRESS(pin); + uint32_t result; + + result = IOMUX_READ(sc, pad_reg); + + return(result); +} + +unsigned int +iomux_get_pad_config(unsigned int pin) +{ + + return(iomux_get_pad_config_sub(iomuxsc, pin)); +} + +static device_method_t imx6_iomux_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, imx6_iomux_probe), + DEVMETHOD(device_attach, imx6_iomux_attach), + DEVMETHOD(device_detach, imx6_iomux_detach), + + DEVMETHOD_END +}; + +static driver_t imx6_iomux_driver = { + "imx6_iomux", + imx6_iomux_methods, + sizeof(struct imx6_iomux_softc), +}; + +static devclass_t imx6_iomux_devclass; + +EARLY_DRIVER_MODULE(imx6_iomux, simplebus, imx6_iomux_driver, + imx6_iomux_devclass, 0, 0, BUS_PASS_CPU + BUS_PASS_ORDER_LATE); + + Added: head/sys/arm/freescale/imx/imx6_iomuxreg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/imx6_iomuxreg.h Thu Sep 4 14:25:32 2014 (r271097) @@ -0,0 +1,798 @@ +/*- + * Copyright (c) 2014 Boris Samorodov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * Pad : pin ("pin" is used at electric schemes, + * while at HW SOC it's named "pad"). + * Drive strength : the current that can be drawn with + * appropriate voltage (varies inversely with + * the supply impedance of the output pin). + * Drive strength enable (DSE) : The value of the current the pin uses. + * HiZ (HYZ) : high input impedance value. + * Daisy chain (DAISY) : the one after another interconnection of + * devices. + * On die termination (ODT) : the termination resistor for impedance + * matching. + * Software input on (SION) : the value to force the pin to be an input + * one (i.e. to force the pin state reading). + * Hysteresis (HYS) : Controls if the value of the input pin + * remains the same until a sufficient change + * is applied. + * Slow rate enable (SRE) : How slow the pin value changes (slow rate + * saves power). + * Open drain enable (ODE) : If the input pin drains on low input or + * goes down. + * Pull/keep enable (PKE) : Enables pull/keep functionality. + * PUll/keep select (PUE) : Selects if the pin is pullup/pulldown one + * or remains it's previous role. + * A note: I'm not sure why it's not PKS... + * Pullup (Pic.1)/pulldown (Pic.2): the pin's resistor connected to VCC (GND) + * to prevent random value drai. + * Pullup/pulldown select (PUS) : Selects the value of pullup/pulldown + * resistor. + * Open drain (Pic.3) : the output signal is applied to the base + * of a transistor whose collector is used + * as a pin. + * + * VCC o VCC o Open drain + * | | ----> pin + * +++ o| / + * | | R | Switch / + * +++ pullup o| .---. + * | | / |/ \ + * >---+------> Pin >---+------> Pin >---{--| ) + * | | \ |\ / + * o| +++ `--v' + * | Switch | | R \ + * o| +++ pulldown | + * | | | + * ----- ----- ----- + * --- --- --- + * - - - + * + * Pic.1 Pic.2 Pic.3 + */ + +#ifndef IMX6_IOMUXREG_H +#define IMX6_IOMUXREG_H + +/* + * Multiplex control + */ +#define IOMUXC_MUX_CTL 0x004c +#define IOMUX_CONFIG_SION (1<<4) +#define IOMUX_CONFIG_ALT0 0 +#define IOMUX_CONFIG_ALT1 1 +#define IOMUX_CONFIG_ALT2 2 +#define IOMUX_CONFIG_ALT3 3 +#define IOMUX_CONFIG_ALT4 4 +#define IOMUX_CONFIG_ALT5 5 +#define IOMUX_CONFIG_ALT6 6 +#define IOMUX_CONFIG_ALT7 7 + +/* + * Pad control + */ +#define IOMUXC_PAD_CTL 0x0360 + /* DDR Select Field */ +#define PAD_CTL_DDR_SEL_0 (0x0<<18) +#define PAD_CTL_DDR_SEL_1 (0x1<<18) +#define PAD_CTL_DDR_SEL_2 (0x2<<18) +#define PAD_CTL_DDR_SEL_3 (0x3<<18) +#define PAD_CTL_DDR_INPUT (0x1<<17) /* DDR/CMOS Input Mode Field */ +#define PAD_CTL_HYS (1<<16) /* Hysteresis Enable Field */ + /* PullUp/Down Config Field: */ +#define PAD_CTL_PUS_100K_PD (0x0<<14) /* 100K Ohm Pull Down */ +#define PAD_CTL_PUS_47K_PU (0x1<<14) /* 47K Ohn Pull Up */ +#define PAD_CTL_PUS_100K_PU (0x2<<14) /* 100K Ohm Pull Up */ +#define PAD_CTL_PUS_22K_PU (0x3<<14) /* 22K Ohm Pull Up */ +#define PAD_CTL_PUE (1<<13) /* Pull/Keep Select Field */ +#define PAD_CTL_PKE (1<<12) /* Pull/Keep Enable Field */ +#define PAD_CTL_ODE (1<<11) /* Open Drain Enable Field */ + /* On Die Termination Field: */ +#define PAD_CTL_ODT_DISABLED (0x0<<8) /* Disabled */ +#define PAD_CTL_ODT_1 (0x1<<8) +#define PAD_CTL_ODT_2 (0x2<<8) +#define PAD_CTL_ODT_3 (0x3<<8) +#define PAD_CTL_ODT_4 (0x4<<8) +#define PAD_CTL_ODT_5 (0x5<<8) +#define PAD_CTL_ODT_6 (0x6<<8) +#define PAD_CTL_ODT_7 (0x7<<8) + /* Speed Field: */ +#define PAD_CTL_SPEED_RESERVED0 (0x0<<6) /* RESERVED */ +#define PAD_CTL_SPEED_50_MHZ (0x1<<6) /* 50 MHz */ +#define PAD_CTL_SPEED_100_MHZ (0x2<<6) /* 100 MHz */ +#define PAD_CTL_SPEED_200_MHZ (0x3<<6) /* 200 MHz */ + /* Drive Strength Field */ +#define PAD_CTL_DSE_HIZ (0x0<<3) /* HI-Z */ +#define PAD_CTL_DSE_1 (0x1<<3) +#define PAD_CTL_DSE_2 (0x2<<3) +#define PAD_CTL_DSE_3 (0x3<<3) +#define PAD_CTL_DSE_4 (0x4<<3) +#define PAD_CTL_DSE_5 (0x5<<3) +#define PAD_CTL_DSE_6 (0x6<<3) +#define PAD_CTL_DSE_7 (0x7<<3) +#define PAD_CTL_SRE (0x1<<0) /* Slew rate Field */ + +/* + * Input control + */ +#define IOMUXC_INPUT_CTL 0x07b0 /* input control */ +#define INPUT_DAISY_0 0 +#define INPUT_DAISY_1 1 +#define INPUT_DAISY_2 2 +#define INPUT_DAISY_3 3 +#define INPUT_DAISY_4 4 +#define INPUT_DAISY_5 5 +#define INPUT_DAISY_6 6 +#define INPUT_DAISY_7 7 + +/* + * IOMUX index + */ +#define IOMUX_PIN_TO_MUX_ADDRESS(pin) (((pin) >> 16) & 0xffff) +#define IOMUX_PIN_TO_PAD_ADDRESS(pin) (((pin) >> 0) & 0xffff) +#define IOMUX_PIN(mux_adr, pad_adr) \ + (((mux_adr) << 16) | (((pad_adr) << 0))) +#define IOMUX_MUX_NONE 0xffff +#define IOMUX_PAD_NONE 0xffff + +/* + * MUX & PAD Control + */ +#define MUX_PIN(name) \ + IOMUX_PIN(IOMUXC_SW_MUX_CTL_PAD_##name, \ + IOMUXC_SW_PAD_CTL_PAD_##name) + +#define MUX_PIN_MUX(name) \ + IOMUX_PIN(IOMUXC_SW_MUX_CTL_PAD_##name, IOMUX_PAD_NONE) + +#define MUX_PIN_PAD(name) \ + IOMUX_PIN(IOMUX_MUX_NONE, IOMUXC_SW_PAD_CTL_PAD_##name) + +#define MUX_PIN_GRP(name) \ + IOMUX_PIN(IOMUX_MUX_NONE, IOMUXC_SW_PAD_CTL_GRP_##name) + +#define MUX_PIN_PATH(name) \ + IOMUX_PIN(IOMUXC_##name##_SELECT_INPUT, IOMUX_MUX_NONE) + +/* + * INPUT Control + */ +#define MUX_SELECT(name) (name##_SELECT_INPUT) + +/* + * Register names, offset addresses (and reset values for reference) + * from Chapter 36 IOMUX Controller (IOMUXC), IMX6DQRM, Rev.1, 04/2013 + * + * General Purpose Registers + */ +#define IOMUXC_GPR0 0x0000 /* 0x00000000 */ +#define IOMUXC_GPR1 0x0004 /* 0x48400005 */ +#define IOMUXC_GPR2 0x0008 /* 0x00000000 */ +#define IOMUXC_GPR3 0x000c /* 0x01e00000 */ +#define IOMUXC_GPR4 0x0010 /* 0x00000000 */ +#define IOMUXC_GPR5 0x0014 /* 0x00000000 */ +#define IOMUXC_GPR6 0x0018 /* 0x22222222 */ +#define IOMUXC_GPR7 0x001c /* 0x22222222 */ +#define IOMUXC_GPR8 0x0020 /* 0x00000000 */ +#define IOMUXC_GPR9 0x0024 /* 0x00000000 */ +#define IOMUXC_GPR10 0x0028 /* 0x00003800 */ +#define IOMUXC_GPR11 0x002c /* 0x00003800 */ +#define IOMUXC_GPR12 0x0030 /* 0x0f000000 */ +#define IOMUXC_GPR13 0x0034 /* 0x059124c4 */ +/* + * Pad Mux Registers + */ +#define IOMUXC_SW_MUX_CTL_PAD_SD2_DATA1 0x004c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD2_DATA2 0x0050 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD2_DATA0 0x0054 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_RGMII_TXC 0x0058 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_RGMII_TD0 0x005c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_RGMII_TD1 0x0060 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_RGMII_TD2 0x0064 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_RGMII_TD3 0x0068 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_RGMII_RX_CTL 0x006c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_RGMII_RD0 0x0070 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_RGMII_TX_CTL 0x0074 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_RGMII_RD1 0x0078 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_RGMII_RD2 0x007c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_RGMII_RD3 0x0080 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_RGMII_RXC 0x0084 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_ADDR25 0x0088 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_EB2_B 0x008c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_DATA16 0x0090 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_DATA17 0x0094 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_DATA18 0x0098 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_DATA19 0x009c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_DATA20 0x00a0 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_DATA21 0x00a4 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_DATA22 0x00a8 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_DATA23 0x00ac /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_EB3_B 0x00b0 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_DATA24 0x00b4 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_DATA25 0x00b8 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_DATA26 0x00bc /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_DATA27 0x00c0 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_DATA28 0x00c4 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_DATA29 0x00c8 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_DATA30 0x00cc /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_DATA31 0x00d0 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_ADDR24 0x00d4 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_ADDR23 0x00d8 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_ADDR22 0x00dc /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_ADDR21 0x00e0 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_ADDR20 0x00e4 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_ADDR19 0x00e8 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_ADDR18 0x00ec /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_ADDR17 0x00f0 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_ADDR16 0x00f4 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_CS0_B 0x00f8 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_CS1_B 0x00fc /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_OE_B 0x0100 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_RW 0x0104 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_LBA_B 0x0108 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_EB0_B 0x010c /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_EB1_B 0x0110 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_AD00 0x0114 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_AD01 0x0118 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_AD02 0x011c /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_AD03 0x0120 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_AD04 0x0124 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_AD05 0x0128 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_AD06 0x012c /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_AD07 0x0130 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_AD08 0x0134 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_AD09 0x0138 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_AD10 0x013c /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_AD11 0x0140 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_AD12 0x0144 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_AD13 0x0148 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_AD14 0x014c /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_AD15 0x0150 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_WAIT_B 0x0154 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_EIM_BCLK 0x0158 /* 0x00000000 */ +#define IOMUXC_SW_MUX_CTL_PAD_DI0_DISP_CLK 0x015c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DI0_PIN15 0x0160 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DI0_PIN02 0x0164 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DI0_PIN03 0x0168 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DI0_PIN04 0x016c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA00 0x0170 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA01 0x0174 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA02 0x0178 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA03 0x017c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA04 0x0180 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA05 0x0184 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA06 0x0188 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA07 0x018c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA08 0x0190 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA09 0x0194 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA10 0x0198 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA11 0x019c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA12 0x01a0 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA13 0x01a4 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA14 0x01a8 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA15 0x01ac /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA16 0x01b0 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA17 0x01b4 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA18 0x01b8 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA19 0x01bc /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA20 0x01c0 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA21 0x01c4 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA22 0x01c8 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_DISP0_DATA23 0x01cc /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_ENET_MDIO 0x01d0 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_ENET_REF_CLK 0x01d4 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_ENET_RX_ER 0x01d8 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_ENET_CRS_DV 0x01dc /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_ENET_RX_DATA1 0x01e0 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_ENET_RX_DATA0 0x01e4 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_ENET_TX_EN 0x01e8 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_ENET_TX_DATA1 0x01ec /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_ENET_TX_DATA0 0x01f0 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_ENET_MDC 0x01f4 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_KEY_COL0 0x01f8 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_KEY_ROW0 0x01fc /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_KEY_COL1 0x0200 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_KEY_ROW1 0x0204 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_KEY_COL2 0x0208 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_KEY_ROW2 0x020c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_KEY_COL3 0x0210 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_KEY_ROW3 0x0214 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_KEY_COL4 0x0218 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_KEY_ROW4 0x021c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_GPIO00 0x0220 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_GPIO01 0x0224 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_GPIO09 0x0228 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_GPIO03 0x022c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_GPIO06 0x0230 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_GPIO02 0x0234 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_GPIO04 0x0238 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_GPIO05 0x023c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_GPIO07 0x0240 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_GPIO08 0x0244 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_GPIO16 0x0248 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_GPIO17 0x024c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_GPIO18 0x0250 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_GPIO19 0x0254 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_CSI0_PIXCLK 0x0258 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_CSI0_HSYNC 0x025c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_CSI0_DATA_EN 0x0260 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_CSI0_VSYNC 0x0264 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_CSI0_DATA04 0x0268 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_CSI0_DATA05 0x026c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_CSI0_DATA06 0x0270 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_CSI0_DATA07 0x0274 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_CSI0_DATA08 0x0278 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_CSI0_DATA09 0x027c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_CSI0_DATA10 0x0280 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_CSI0_DATA11 0x0284 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_CSI0_DATA12 0x0288 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_CSI0_DATA13 0x028c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_CSI0_DATA14 0x0290 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_CSI0_DATA15 0x0294 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_CSI0_DATA16 0x0298 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_CSI0_DATA17 0x029c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_CSI0_DATA18 0x02a0 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_CSI0_DATA19 0x02a4 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD3_DATA7 0x02a8 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD3_DATA6 0x02ac /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD3_DATA5 0x02b0 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD3_DATA4 0x02b4 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD3_CMD 0x02b8 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD3_CLK 0x02bc /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD3_DATA0 0x02c0 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD3_DATA1 0x02c4 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD3_DATA2 0x02c8 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD3_DATA3 0x02cc /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD3_RESET 0x02d0 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_NAND_CLE 0x02d4 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_NAND_ALE 0x02d8 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_NAND_WP_B 0x02dc /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_NAND_READY_B 0x02e0 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_NAND_CS0_B 0x02e4 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_NAND_CS1_B 0x02e8 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_NAND_CS2_B 0x02ec /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_NAND_CS3_B 0x02f0 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD4_CMD 0x02f4 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD4_CLK 0x02f8 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_NAND_DATA00 0x02fc /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_NAND_DATA01 0x0300 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_NAND_DATA02 0x0304 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_NAND_DATA03 0x0308 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_NAND_DATA04 0x030c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_NAND_DATA05 0x0310 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_NAND_DATA06 0x0314 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_NAND_DATA07 0x0318 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD4_DATA0 0x031c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD4_DATA1 0x0320 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD4_DATA2 0x0324 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD4_DATA3 0x0328 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD4_DATA4 0x032c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD4_DATA5 0x0330 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD4_DATA6 0x0334 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD4_DATA7 0x0338 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD1_DATA1 0x033c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD1_DATA0 0x0340 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD1_DATA3 0x0344 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD1_CMD 0x0348 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD1_DATA2 0x034c /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD1_CLK 0x0350 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD2_CLK 0x0354 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD2_CMD 0x0358 /* 0x00000005 */ +#define IOMUXC_SW_MUX_CTL_PAD_SD2_DATA3 0x035c /* 0x00000005 */ +/* + * Pad Control registers + */ +#define IOMUXC_SW_PAD_CTL_PAD_SD2_DATA1 0x0360 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD2_DATA2 0x0364 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD2_DATA0 0x0368 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_RGMII_TXC 0x036c /* 0x00013030 */ +#define IOMUXC_SW_PAD_CTL_PAD_RGMII_TD0 0x0370 /* 0x0001b030 */ +#define IOMUXC_SW_PAD_CTL_PAD_RGMII_TD1 0x0374 /* 0x0001b030 */ +#define IOMUXC_SW_PAD_CTL_PAD_RGMII_TD2 0x0378 /* 0x0001b030 */ +#define IOMUXC_SW_PAD_CTL_PAD_RGMII_TD3 0x037c /* 0x0001b030 */ +#define IOMUXC_SW_PAD_CTL_PAD_RGMII_RX_CTL 0x0380 /* 0x00013030 */ +#define IOMUXC_SW_PAD_CTL_PAD_RGMII_RD0 0x0384 /* 0x0001b030 */ +#define IOMUXC_SW_PAD_CTL_PAD_RGMII_TX_CTL 0x0388 /* 0x00013030 */ +#define IOMUXC_SW_PAD_CTL_PAD_RGMII_RD1 0x038c /* 0x0001b030 */ +#define IOMUXC_SW_PAD_CTL_PAD_RGMII_RD2 0x0390 /* 0x0001b030 */ +#define IOMUXC_SW_PAD_CTL_PAD_RGMII_RD3 0x0394 /* 0x0001b030 */ +#define IOMUXC_SW_PAD_CTL_PAD_RGMII_RXC 0x0398 /* 0x00013030 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_ADDR25 0x039c /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_EB2_B 0x03a0 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_DATA16 0x03a4 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_DATA17 0x03a8 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_DATA18 0x03ac /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_DATA19 0x03b0 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_DATA20 0x03b4 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_DATA21 0x03b8 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_DATA22 0x03bc /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_DATA23 0x03c0 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_EB3_B 0x03c4 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_DATA24 0x03c8 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_DATA25 0x03cc /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_DATA26 0x03d0 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_DATA27 0x03d4 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_DATA28 0x03d8 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_DATA29 0x03dc /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_DATA30 0x03e0 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_DATA31 0x03e4 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_ADDR24 0x03e8 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_ADDR23 0x03ec /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_ADDR22 0x03f0 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_ADDR21 0x03f4 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_ADDR20 0x03f8 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_ADDR19 0x03fc /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_ADDR18 0x0400 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_ADDR17 0x0404 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_ADDR16 0x0408 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_CS0_B 0x040c /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_CS1_B 0x0410 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_OE_B 0x0414 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_RW 0x0418 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_LBA_B 0x041c /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_EB0_B 0x0420 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_EB1_B 0x0424 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_AD00 0x0428 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_AD01 0x042c /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_AD02 0x0430 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_AD03 0x0434 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_AD04 0x0438 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_AD05 0x043c /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_AD06 0x0440 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_AD07 0x0444 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_AD08 0x0448 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_AD09 0x044c /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_AD10 0x0450 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_AD11 0x0454 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_AD12 0x0458 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_AD13 0x045c /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_AD14 0x0460 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_AD15 0x0464 /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_WAIT_B 0x0468 /* 0x0000b060 */ +#define IOMUXC_SW_PAD_CTL_PAD_EIM_BCLK 0x046c /* 0x0000b0b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_DI0_DISP_CLK 0x0470 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DI0_PIN15 0x0474 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DI0_PIN02 0x0478 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DI0_PIN03 0x047c /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DI0_PIN04 0x0480 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA00 0x0484 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA01 0x0488 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA02 0x048c /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA03 0x0490 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA04 0x0494 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA05 0x0498 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA06 0x049c /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA07 0x04a0 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA08 0x04a4 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA09 0x04a8 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA10 0x04ac /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA11 0x04b0 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA12 0x04b4 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA13 0x04b8 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA14 0x04bc /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA15 0x04c0 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA16 0x04c4 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA17 0x04c8 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA18 0x04cc /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA19 0x04d0 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA20 0x04d4 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA21 0x04d8 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA22 0x04dc /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DISP0_DATA23 0x04e0 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_ENET_MDIO 0x04e4 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_ENET_REF_CLK 0x04e8 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_ENET_RX_ER 0x04ec /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_ENET_CRS_DV 0x04f0 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_ENET_RX_DATA1 0x04f4 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_ENET_RX_DATA0 0x04f8 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_ENET_TX_EN 0x04fc /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_ENET_TX_DATA1 0x0500 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_ENET_TX_DATA0 0x0504 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_ENET_MDC 0x0508 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS5_P 0x050c /* 0x00002030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_DQM5 0x0510 /* 0x00008030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_DQM4 0x0514 /* 0x00008030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS4_P 0x0518 /* 0x00002030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS3_P 0x051c /* 0x00002030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_DQM3 0x0520 /* 0x00008030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS2_P 0x0524 /* 0x00002030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_DQM2 0x0528 /* 0x00008030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_ADDR00 0x052c /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_ADDR01 0x0530 /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_ADDR02 0x0534 /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_ADDR03 0x0538 /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_ADDR04 0x053c /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_ADDR05 0x0540 /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_ADDR06 0x0544 /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_ADDR07 0x0548 /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_ADDR08 0x054c /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_ADDR09 0x0550 /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_ADDR10 0x0554 /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_ADDR11 0x0558 /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_ADDR12 0x055c /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_ADDR13 0x0560 /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_ADDR14 0x0564 /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_ADDR15 0x0568 /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_CAS_B 0x056c /* 0x00008030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_CS0_B 0x0570 /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_CS1_B 0x0574 /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_RAS_B 0x0578 /* 0x00008030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_RESET 0x057c /* 0x00083030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDBA0 0x0580 /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDBA1 0x0584 /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDCLK0_P 0x0588 /* 0x00008030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDBA2 0x058c /* 0x0000b000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDCKE0 0x0590 /* 0x00003000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDCLK1_P 0x0594 /* 0x00008030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDCKE1 0x0598 /* 0x00003000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_ODT0 0x059c /* 0x00003030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_ODT1 0x05a0 /* 0x00003030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDWE_B 0x05a4 /* 0x00008000 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS0_P 0x05a8 /* 0x00002030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_DQM0 0x05ac /* 0x00008030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS1_P 0x05b0 /* 0x00002030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_DQM1 0x05b4 /* 0x00008030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS6_P 0x05b8 /* 0x00002030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_DQM6 0x05bc /* 0x00008030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_SDQS7_P 0x05c0 /* 0x00002030 */ +#define IOMUXC_SW_PAD_CTL_PAD_DRAM_DQM7 0x05c4 /* 0x00008030 */ +#define IOMUXC_SW_PAD_CTL_PAD_KEY_COL0 0x05c8 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_KEY_ROW0 0x05cc /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_KEY_COL1 0x05d0 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_KEY_ROW1 0x05d4 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_KEY_COL2 0x05d8 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_KEY_ROW2 0x05dc /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_KEY_COL3 0x05e0 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_KEY_ROW3 0x05e4 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_KEY_COL4 0x05e8 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_KEY_ROW4 0x05ec /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_GPIO00 0x05f0 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_GPIO01 0x05f4 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_GPIO09 0x05f8 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_GPIO03 0x05fc /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_GPIO06 0x0600 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_GPIO02 0x0604 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_GPIO04 0x0608 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_GPIO05 0x060c /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_GPIO07 0x0610 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_GPIO08 0x0614 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_GPIO16 0x0618 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_GPIO17 0x061c /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_GPIO18 0x0620 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_GPIO19 0x0624 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_CSI0_PIXCLK 0x0628 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_CSI0_HSYNC 0x062c /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_CSI0_DATA_EN 0x0630 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_CSI0_VSYNC 0x0634 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_CSI0_DATA04 0x0638 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_CSI0_DATA05 0x063c /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_CSI0_DATA06 0x0640 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_CSI0_DATA07 0x0644 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_CSI0_DATA08 0x0648 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_CSI0_DATA09 0x064c /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_CSI0_DATA10 0x0650 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_CSI0_DATA11 0x0654 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_CSI0_DATA12 0x0658 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_CSI0_DATA13 0x065c /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_CSI0_DATA14 0x0660 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_CSI0_DATA15 0x0664 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_CSI0_DATA16 0x0668 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_CSI0_DATA17 0x066c /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_CSI0_DATA18 0x0670 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_CSI0_DATA19 0x0674 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_JTAG_TMS 0x0678 /* 0x00007060 */ +#define IOMUXC_SW_PAD_CTL_PAD_JTAG_MOD 0x067c /* 0x0000b060 */ +#define IOMUXC_SW_PAD_CTL_PAD_JTAG_TRSTB 0x0680 /* 0x00007060 */ +#define IOMUXC_SW_PAD_CTL_PAD_JTAG_TDI 0x0684 /* 0x00007060 */ +#define IOMUXC_SW_PAD_CTL_PAD_JTAG_TCK 0x0688 /* 0x00007060 */ +#define IOMUXC_SW_PAD_CTL_PAD_JTAG_TDO 0x068c /* 0x000090b1 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD3_DATA7 0x0690 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD3_DATA6 0x0694 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD3_DATA5 0x0698 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD3_DATA4 0x069c /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD3_CMD 0x06a0 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD3_CLK 0x06a4 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD3_DATA0 0x06a8 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD3_DATA1 0x06ac /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD3_DATA2 0x06b0 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD3_DATA3 0x06b4 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD3_RESET 0x06b8 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_NAND_CLE 0x06bc /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_NAND_ALE 0x06c0 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_NAND_WP_B 0x06c4 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_NAND_READY_B 0x06c8 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_NAND_CS0_B 0x06cc /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_NAND_CS1_B 0x06d0 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_NAND_CS2_B 0x06d4 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_NAND_CS3_B 0x06d8 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD4_CMD 0x06dc /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD4_CLK 0x06e0 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_NAND_DATA00 0x06e4 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_NAND_DATA01 0x06e8 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_NAND_DATA02 0x06ec /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_NAND_DATA03 0x06f0 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_NAND_DATA04 0x06f4 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_NAND_DATA05 0x06f8 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_NAND_DATA06 0x06fc /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_NAND_DATA07 0x0700 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD4_DATA0 0x0704 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD4_DATA1 0x0708 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD4_DATA2 0x070c /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD4_DATA3 0x0710 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD4_DATA4 0x0714 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD4_DATA5 0x0718 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD4_DATA6 0x071c /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD4_DATA7 0x0720 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD1_DATA1 0x0724 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD1_DATA0 0x0728 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD1_DATA3 0x072c /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD1_CMD 0x0730 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD1_DATA2 0x0734 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD1_CLK 0x0738 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD2_CLK 0x073c /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD2_CMD 0x0740 /* 0x0001b0b0 */ +#define IOMUXC_SW_PAD_CTL_PAD_SD2_DATA3 0x0744 /* 0x0001b0b0 */ +/* + * Pad Group Control Registers + */ +#define IOMUXC_SW_PAD_CTL_GRP_B7DS 0x0748 /* 0x00000030 */ +#define IOMUXC_SW_PAD_CTL_GRP_ADDDS 0x074c /* 0x00000030 */ +#define IOMUXC_SW_PAD_CTL_GRP_DDRMODE_CTL 0x0750 /* 0x00000000 */ +#define IOMUXC_SW_PAD_CTL_GRP_TERM_CTL0 0x0754 /* 0x00000000 */ +#define IOMUXC_SW_PAD_CTL_GRP_DDRPKE 0x0758 /* 0x00001000 */ +#define IOMUXC_SW_PAD_CTL_GRP_TERM_CTL1 0x075c /* 0x00000000 */ +#define IOMUXC_SW_PAD_CTL_GRP_TERM_CTL2 0x0760 /* 0x00000000 */ +#define IOMUXC_SW_PAD_CTL_GRP_TERM_CTL3 0x0764 /* 0x00000000 */ +#define IOMUXC_SW_PAD_CTL_GRP_DDRPK 0x0768 /* 0x00002000 */ +#define IOMUXC_SW_PAD_CTL_GRP_TERM_CTL4 0x076c /* 0x00000000 */ +#define IOMUXC_SW_PAD_CTL_GRP_DDRHYS 0x0770 /* 0x00000000 */ +#define IOMUXC_SW_PAD_CTL_GRP_DDRMODE 0x0774 /* 0x00000000 */ +#define IOMUXC_SW_PAD_CTL_GRP_TERM_CTL5 0x0778 /* 0x00000000 */ +#define IOMUXC_SW_PAD_CTL_GRP_TERM_CTL6 0x077c /* 0x00000000 */ +#define IOMUXC_SW_PAD_CTL_GRP_TERM_CTL7 0x0780 /* 0x00000000 */ +#define IOMUXC_SW_PAD_CTL_GRP_B0DS 0x0784 /* 0x00000030 */ +#define IOMUXC_SW_PAD_CTL_GRP_B1DS 0x0788 /* 0x00000030 */ +#define IOMUXC_SW_PAD_CTL_GRP_CTLDS 0x078c /* 0x00000030 */ +#define IOMUXC_SW_PAD_CTL_GRP_DDR_TYPE_RGMII 0x0790 /* 0x00080000 */ +#define IOMUXC_SW_PAD_CTL_GRP_B2DS 0x0794 /* 0x00000030 */ +#define IOMUXC_SW_PAD_CTL_GRP_DDR_TYPE 0x0798 /* 0x00080000 */ +#define IOMUXC_SW_PAD_CTL_GRP_B3DS 0x079c /* 0x00000030 */ +#define IOMUXC_SW_PAD_CTL_GRP_B4DS 0x07a0 /* 0x00000030 */ +#define IOMUXC_SW_PAD_CTL_GRP_B5DS 0x07a4 /* 0x00000030 */ +#define IOMUXC_SW_PAD_CTL_GRP_B6DS 0x07a8 /* 0x00000030 */ +#define IOMUXC_SW_PAD_CTL_GRP_RGMII_TERM 0x07ac /* 0x00000000 */ +/* + * Select Input Registers + */ +#define IOMUXC_ASRC_ASRCK_CLOCK_6_SELECT_INPUT 0x07b0 /* 0x00000000 */ +#define IOMUXC_AUD4_INPUT_DA_AMX_SELECT_INPUT 0x07b4 /* 0x00000000 */ +#define IOMUXC_AUD4_INPUT_DB_AMX_SELECT_INPUT 0x07b8 /* 0x00000000 */ +#define IOMUXC_AUD4_INPUT_RXCLK_AMX_SELECT_INPUT 0x07bc /* 0x00000000 */ +#define IOMUXC_AUD4_INPUT_RXFS_AMX_SELECT_INPUT 0x07c0 /* 0x00000000 */ +#define IOMUXC_AUD4_INPUT_TXCLK_AMX_SELECT_INPUT 0x07c4 /* 0x00000000 */ +#define IOMUXC_AUD4_INPUT_TXFS_AMX_SELECT_INPUT 0x07c8 /* 0x00000000 */ +#define IOMUXC_AUD5_INPUT_DA_AMX_SELECT_INPUT 0x07cc /* 0x00000000 */ +#define IOMUXC_AUD5_INPUT_DB_AMX_SELECT_INPUT 0x07d0 /* 0x00000000 */ +#define IOMUXC_AUD5_INPUT_RXCLK_AMX_SELECT_INPUT 0x07d4 /* 0x00000000 */ +#define IOMUXC_AUD5_INPUT_RXFS_AMX_SELECT_INPUT 0x07d8 /* 0x00000000 */ +#define IOMUXC_AUD5_INPUT_TXCLK_AMX_SELECT_INPUT 0x07dc /* 0x00000000 */ +#define IOMUXC_AUD5_INPUT_TXFS_AMX_SELECT_INPUT 0x07e0 /* 0x00000000 */ +#define IOMUXC_FLEXCAN1_RX_SELECT_INPUT 0x07e4 /* 0x00000000 */ +#define IOMUXC_FLEXCAN2_RX_SELECT_INPUT 0x07e8 /* 0x00000000 */ +#define IOMUXC_CCM_PMIC_READY_SELECT_INPUT 0x07f0 /* 0x00000000 */ +#define IOMUXC_ECSPI1_CSPI_CLK_IN_SELECT_INPUT 0x07f4 /* 0x00000000 */ +#define IOMUXC_ECSPI1_MISO_SELECT_INPUT 0x07f8 /* 0x00000000 */ +#define IOMUXC_ECSPI1_MOSI_SELECT_INPUT 0x07fc /* 0x00000000 */ +#define IOMUXC_ECSPI1_SS0_SELECT_INPUT 0x0800 /* 0x00000000 */ +#define IOMUXC_ECSPI1_SS1_SELECT_INPUT 0x0804 /* 0x00000000 */ +#define IOMUXC_ECSPI1_SS2_SELECT_INPUT 0x0808 /* 0x00000000 */ +#define IOMUXC_ECSPI1_SS3_SELECT_INPUT 0x080c /* 0x00000000 */ +#define IOMUXC_ECSPI2_CSPI_CLK_IN_SELECT_INPUT 0x0810 /* 0x00000000 */ +#define IOMUXC_ECSPI2_MISO_SELECT_INPUT 0x0814 /* 0x00000000 */ +#define IOMUXC_ECSPI2_MOSI_SELECT_INPUT 0x0818 /* 0x00000000 */ +#define IOMUXC_ECSPI2_SS0_SELECT_INPUT 0x081c /* 0x00000000 */ +#define IOMUXC_ECSPI2_SS1_SELECT_INPUT 0x0820 /* 0x00000000 */ +#define IOMUXC_ECSPI4_SS0_SELECT_INPUT 0x0824 /* 0x00000000 */ +#define IOMUXC_ECSPI5_CSPI_CLK_IN_SELECT_INPUT 0x0828 /* 0x00000000 */ +#define IOMUXC_ECSPI5_MISO_SELECT_INPUT 0x082c /* 0x00000000 */ +#define IOMUXC_ECSPI5_MOSI_SELECT_INPUT 0x0830 /* 0x00000000 */ +#define IOMUXC_ECSPI5_SS0_SELECT_INPUT 0x0834 /* 0x00000000 */ +#define IOMUXC_ECSPI5_SS1_SELECT_INPUT 0x0838 /* 0x00000000 */ +#define IOMUXC_ENET_REF_CLK_SELECT_INPUT 0x083c /* 0x00000000 */ +#define IOMUXC_ENET_MAC0_MDIO_SELECT_INPUT 0x0840 /* 0x00000000 */ +#define IOMUXC_ENET_MAC0_RX_CLK_SELECT_INPUT 0x0844 /* 0x00000000 */ +#define IOMUXC_ENET_MAC0_RX_DATA0_SELECT_INPUT 0x0848 /* 0x00000000 */ +#define IOMUXC_ENET_MAC0_RX_DATA1_SELECT_INPUT 0x084c /* 0x00000000 */ +#define IOMUXC_ENET_MAC0_RX_DATA2_SELECT_INPUT 0x0850 /* 0x00000000 */ +#define IOMUXC_ENET_MAC0_RX_DATA3_SELECT_INPUT 0x0854 /* 0x00000000 */ +#define IOMUXC_ENET_MAC0_RX_EN_SELECT_INPUT 0x0858 /* 0x00000000 */ +#define IOMUXC_ESAI_RX_FS_SELECT_INPUT 0x085c /* 0x00000000 */ +#define IOMUXC_ESAI_TX_FS_SELECT_INPUT 0x0860 /* 0x00000000 */ +#define IOMUXC_ESAI_RX_HF_CLK_SELECT_INPUT 0x0864 /* 0x00000000 */ +#define IOMUXC_ESAI_TX_HF_CLK_SELECT_INPUT 0x0868 /* 0x00000000 */ +#define IOMUXC_ESAI_RX_CLK_SELECT_INPUT 0x086c /* 0x00000000 */ +#define IOMUXC_ESAI_TX_CLK_SELECT_INPUT 0x0870 /* 0x00000000 */ +#define IOMUXC_ESAI_SDO0_SELECT_INPUT 0x0874 /* 0x00000000 */ +#define IOMUXC_ESAI_SDO1_SELECT_INPUT 0x0878 /* 0x00000000 */ +#define IOMUXC_ESAI_SDO2_SDI3_SELECT_INPUT 0x087c /* 0x00000000 */ +#define IOMUXC_ESAI_SDO3_SDI2_SELECT_INPUT 0x0880 /* 0x00000000 */ +#define IOMUXC_ESAI_SDO4_SDI1_SELECT_INPUT 0x0884 /* 0x00000000 */ +#define IOMUXC_ESAI_SDO5_SDI0_SELECT_INPUT 0x0888 /* 0x00000000 */ +#define IOMUXC_HDMI_ICECIN_SELECT_INPUT 0x088c /* 0x00000000 */ +#define IOMUXC_HDMI_II2C_CLKIN_SELECT_INPUT 0x0890 /* 0x00000000 */ +#define IOMUXC_HDMI_II2C_DATAIN_SELECT_INPUT 0x0894 /* 0x00000000 */ +#define IOMUXC_I2C1_SCL_IN_SELECT_INPUT 0x0898 /* 0x00000000 */ +#define IOMUXC_I2C1_SDA_IN_SELECT_INPUT 0x089c /* 0x00000000 */ +#define IOMUXC_I2C2_SCL_IN_SELECT_INPUT 0x08a0 /* 0x00000000 */ +#define IOMUXC_I2C2_SDA_IN_SELECT_INPUT 0x08a4 /* 0x00000000 */ +#define IOMUXC_I2C3_SCL_IN_SELECT_INPUT 0x08a8 /* 0x00000000 */ +#define IOMUXC_I2C3_SDA_IN_SELECT_INPUT 0x08ac /* 0x00000000 */ +#define IOMUXC_IPU2_SENS1_DATA10_SELECT_INPUT 0x08b0 /* 0x00000000 */ +#define IOMUXC_IPU2_SENS1_DATA11_SELECT_INPUT 0x08b4 /* 0x00000000 */ +#define IOMUXC_IPU2_SENS1_DATA12_SELECT_INPUT 0x08b8 /* 0x00000000 */ +#define IOMUXC_IPU2_SENS1_DATA13_SELECT_INPUT 0x08bc /* 0x00000000 */ +#define IOMUXC_IPU2_SENS1_DATA14_SELECT_INPUT 0x08c0 /* 0x00000000 */ +#define IOMUXC_IPU2_SENS1_DATA15_SELECT_INPUT 0x08c4 /* 0x00000000 */ +#define IOMUXC_IPU2_SENS1_DATA16_SELECT_INPUT 0x08c8 /* 0x00000000 */ +#define IOMUXC_IPU2_SENS1_DATA17_SELECT_INPUT 0x08cc /* 0x00000000 */ +#define IOMUXC_IPU2_SENS1_DATA18_SELECT_INPUT 0x08d0 /* 0x00000000 */ +#define IOMUXC_IPU2_SENS1_DATA19_SELECT_INPUT 0x08d4 /* 0x00000000 */ +#define IOMUXC_IPU2_SENS1_DATA_EN_SELECT_INPUT 0x08d8 /* 0x00000000 */ +#define IOMUXC_IPU2_SENS1_HSYNC_SELECT_INPUT 0x08dc /* 0x00000000 */ +#define IOMUXC_IPU2_SENS1_PIX_CLK_SELECT_INPUT 0x08e0 /* 0x00000000 */ +#define IOMUXC_IPU2_SENS1_VSYNC_SELECT_INPUT 0x08e4 /* 0x00000000 */ +#define IOMUXC_KEY_COL5_SELECT_INPUT 0x08e8 /* 0x00000000 */ +#define IOMUXC_KEY_COL6_SELECT_INPUT 0x08ec /* 0x00000000 */ +#define IOMUXC_KEY_COL7_SELECT_INPUT 0x08f0 /* 0x00000000 */ +#define IOMUXC_KEY_ROW5_SELECT_INPUT 0x08f4 /* 0x00000000 */ +#define IOMUXC_KEY_ROW6_SELECT_INPUT 0x08f8 /* 0x00000000 */ +#define IOMUXC_KEY_ROW7_SELECT_INPUT 0x08fc /* 0x00000000 */ +#define IOMUXC_MLB_MLB_CLK_IN_SELECT_INPUT 0x0900 /* 0x00000000 */ +#define IOMUXC_MLB_MLB_DATA_IN_SELECT_INPUT 0x0904 /* 0x00000000 */ +#define IOMUXC_MLB_MLB_SIG_IN_SELECT_INPUT 0x0908 /* 0x00000000 */ +#define IOMUXC_SDMA_EVENTS14_SELECT_INPUT 0x090c /* 0x00000000 */ +#define IOMUXC_SDMA_EVENTS15_SELECT_INPUT 0x0910 /* 0x00000000 */ +#define IOMUXC_SPDIF_SPDIF_IN1_SELECT_INPUT 0x0914 /* 0x00000000 */ +#define IOMUXC_SPDIF_TX_CLK2_SELECT_INPUT 0x0918 /* 0x00000000 */ +#define IOMUXC_UART1_UART_RTS_B_SELECT_INPUT 0x091c /* 0x00000000 */ +#define IOMUXC_UART1_UART_RX_DATA_SELECT_INPUT 0x0920 /* 0x00000000 */ +#define IOMUXC_UART2_UART_RTS_B_SELECT_INPUT 0x0924 /* 0x00000000 */ +#define IOMUXC_UART2_UART_RX_DATA_SELECT_INPUT 0x0928 /* 0x00000000 */ +#define IOMUXC_UART3_UART_RTS_B_SELECT_INPUT 0x092c /* 0x00000000 */ +#define IOMUXC_UART3_UART_RX_DATA_SELECT_INPUT 0x0930 /* 0x00000000 */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 14:26:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB0F45CD; Thu, 4 Sep 2014 14:26:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B51321ECC; Thu, 4 Sep 2014 14:26:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84EQQTd054349; Thu, 4 Sep 2014 14:26:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84EQPSS054343; Thu, 4 Sep 2014 14:26:25 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409041426.s84EQPSS054343@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 4 Sep 2014 14:26:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271098 - in head/sys: amd64/amd64 conf i386/i386 i386/include x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 14:26:26 -0000 Author: jhb Date: Thu Sep 4 14:26:25 2014 New Revision: 271098 URL: http://svnweb.freebsd.org/changeset/base/271098 Log: Merge the amd64 and i386 identcpu.c into a single x86 implementation. This brings the structured extended features mask and VT-x reporting to i386 and Intel cache and TLB info (under bootverbose) to amd64. Added: head/sys/x86/x86/identcpu.c - copied, changed from r271083, head/sys/amd64/amd64/identcpu.c Deleted: head/sys/amd64/amd64/identcpu.c head/sys/i386/i386/identcpu.c Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.pc98 head/sys/i386/i386/initcpu.c head/sys/i386/include/md_var.h Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Thu Sep 4 14:25:32 2014 (r271097) +++ head/sys/conf/files.amd64 Thu Sep 4 14:26:25 2014 (r271098) @@ -103,7 +103,6 @@ amd64/amd64/elf_machdep.c standard amd64/amd64/exception.S standard amd64/amd64/fpu.c standard amd64/amd64/gdb_machdep.c optional gdb -amd64/amd64/identcpu.c standard amd64/amd64/in_cksum.c optional inet | inet6 amd64/amd64/initcpu.c standard amd64/amd64/io.c optional io @@ -542,6 +541,7 @@ x86/x86/busdma_bounce.c standard x86/x86/busdma_machdep.c standard x86/x86/dump_machdep.c standard x86/x86/fdt_machdep.c optional fdt +x86/x86/identcpu.c standard x86/x86/intr_machdep.c standard x86/x86/io_apic.c standard x86/x86/legacy.c standard Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Thu Sep 4 14:25:32 2014 (r271097) +++ head/sys/conf/files.i386 Thu Sep 4 14:26:25 2014 (r271098) @@ -443,7 +443,6 @@ i386/xen/exception.s optional xen i386/i386/gdb_machdep.c optional gdb i386/i386/geode.c optional cpu_geode i386/i386/i686_mem.c optional mem -i386/i386/identcpu.c standard i386/i386/in_cksum.c optional inet | inet6 i386/i386/initcpu.c standard i386/i386/io.c optional io @@ -581,6 +580,7 @@ x86/x86/busdma_bounce.c standard x86/x86/busdma_machdep.c standard x86/x86/dump_machdep.c standard x86/x86/fdt_machdep.c optional fdt +x86/x86/identcpu.c standard x86/x86/intr_machdep.c standard x86/x86/io_apic.c optional apic x86/x86/legacy.c optional native Modified: head/sys/conf/files.pc98 ============================================================================== --- head/sys/conf/files.pc98 Thu Sep 4 14:25:32 2014 (r271097) +++ head/sys/conf/files.pc98 Thu Sep 4 14:26:25 2014 (r271098) @@ -140,7 +140,6 @@ i386/i386/elf_machdep.c standard i386/i386/exception.s standard i386/i386/gdb_machdep.c optional gdb i386/i386/i686_mem.c optional mem -i386/i386/identcpu.c standard i386/i386/in_cksum.c optional inet | inet6 i386/i386/initcpu.c standard i386/i386/io.c optional io @@ -248,6 +247,7 @@ x86/pci/pci_bus.c optional pci x86/x86/busdma_bounce.c standard x86/x86/busdma_machdep.c standard x86/x86/dump_machdep.c standard +x86/x86/identcpu.c standard x86/x86/intr_machdep.c standard x86/x86/io_apic.c optional apic x86/x86/legacy.c standard Modified: head/sys/i386/i386/initcpu.c ============================================================================== --- head/sys/i386/i386/initcpu.c Thu Sep 4 14:25:32 2014 (r271097) +++ head/sys/i386/i386/initcpu.c Thu Sep 4 14:26:25 2014 (r271098) @@ -95,6 +95,7 @@ u_int cpu_fxsr; /* SSE enabled */ u_int cpu_mxcsr_mask; /* Valid bits in mxcsr */ #endif u_int cpu_clflush_line_size = 32; +u_int cpu_stdext_feature; u_int cpu_mon_mwait_flags; /* MONITOR/MWAIT flags (CPUID.05H.ECX) */ u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */ u_int cpu_mon_max_size; /* MONITOR minimum range size, bytes */ Modified: head/sys/i386/include/md_var.h ============================================================================== --- head/sys/i386/include/md_var.h Thu Sep 4 14:25:32 2014 (r271097) +++ head/sys/i386/include/md_var.h Thu Sep 4 14:26:25 2014 (r271098) @@ -48,6 +48,7 @@ extern u_int amd_pminfo; extern u_int via_feature_rng; extern u_int via_feature_xcrypt; extern u_int cpu_clflush_line_size; +extern u_int cpu_stdext_feature; extern u_int cpu_fxsr; extern u_int cpu_high; extern u_int cpu_id; Copied and modified: head/sys/x86/x86/identcpu.c (from r271083, head/sys/amd64/amd64/identcpu.c) ============================================================================== --- head/sys/amd64/amd64/identcpu.c Thu Sep 4 02:28:17 2014 (r271083, copy source) +++ head/sys/x86/x86/identcpu.c Thu Sep 4 14:26:25 2014 (r271098) @@ -57,21 +57,32 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include -#include #include #include +#ifdef __i386__ +#define IDENTBLUE_CYRIX486 0 +#define IDENTBLUE_IBMCPU 1 +#define IDENTBLUE_CYRIXM2 2 + +static void identifycyrix(void); +static void print_transmeta_info(void); +#endif static u_int find_cpu_vendor_id(void); static void print_AMD_info(void); +static void print_INTEL_info(void); +static void print_INTEL_TLB(u_int data); static void print_via_padlock_info(void); static void print_vmx_info(void); int cpu_class; -char machine[] = "amd64"; +char machine[] = MACHINE; +#ifdef __amd64__ #ifdef SCTL_MASK32 extern int adaptive_machine_arch; #endif @@ -95,6 +106,10 @@ sysctl_hw_machine(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_hw, HW_MACHINE, machine, CTLTYPE_STRING | CTLFLAG_RD, NULL, 0, sysctl_hw_machine, "A", "Machine class"); +#else +SYSCTL_STRING(_hw, HW_MACHINE, machine, CTLFLAG_RD, + machine, 0, "Machine class"); +#endif static char cpu_model[128]; SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, @@ -108,12 +123,48 @@ static eventhandler_tag tsc_post_tag; static char cpu_brand[48]; +#ifdef __i386__ +#define MAX_BRAND_INDEX 8 + +static const char *cpu_brandtable[MAX_BRAND_INDEX + 1] = { + NULL, /* No brand */ + "Intel Celeron", + "Intel Pentium III", + "Intel Pentium III Xeon", + NULL, + NULL, + NULL, + NULL, + "Intel Pentium 4" +}; +#endif + static struct { char *cpu_name; int cpu_class; -} amd64_cpus[] = { +} cpus[] = { +#ifdef __i386__ + { "Intel 80286", CPUCLASS_286 }, /* CPU_286 */ + { "i386SX", CPUCLASS_386 }, /* CPU_386SX */ + { "i386DX", CPUCLASS_386 }, /* CPU_386 */ + { "i486SX", CPUCLASS_486 }, /* CPU_486SX */ + { "i486DX", CPUCLASS_486 }, /* CPU_486 */ + { "Pentium", CPUCLASS_586 }, /* CPU_586 */ + { "Cyrix 486", CPUCLASS_486 }, /* CPU_486DLC */ + { "Pentium Pro", CPUCLASS_686 }, /* CPU_686 */ + { "Cyrix 5x86", CPUCLASS_486 }, /* CPU_M1SC */ + { "Cyrix 6x86", CPUCLASS_486 }, /* CPU_M1 */ + { "Blue Lightning", CPUCLASS_486 }, /* CPU_BLUE */ + { "Cyrix 6x86MX", CPUCLASS_686 }, /* CPU_M2 */ + { "NexGen 586", CPUCLASS_386 }, /* CPU_NX586 (XXX) */ + { "Cyrix 486S/DX", CPUCLASS_486 }, /* CPU_CY486DX */ + { "Pentium II", CPUCLASS_686 }, /* CPU_PII */ + { "Pentium III", CPUCLASS_686 }, /* CPU_PIII */ + { "Pentium 4", CPUCLASS_686 }, /* CPU_P4 */ +#else { "Clawhammer", CPUCLASS_K8 }, /* CPU_CLAWHAMMER */ { "Sledgehammer", CPUCLASS_K8 }, /* CPU_SLEDGEHAMMER */ +#endif }; static struct { @@ -123,18 +174,30 @@ static struct { { INTEL_VENDOR_ID, CPU_VENDOR_INTEL }, /* GenuineIntel */ { AMD_VENDOR_ID, CPU_VENDOR_AMD }, /* AuthenticAMD */ { CENTAUR_VENDOR_ID, CPU_VENDOR_CENTAUR }, /* CentaurHauls */ +#ifdef __i386__ + { NSC_VENDOR_ID, CPU_VENDOR_NSC }, /* Geode by NSC */ + { CYRIX_VENDOR_ID, CPU_VENDOR_CYRIX }, /* CyrixInstead */ + { TRANSMETA_VENDOR_ID, CPU_VENDOR_TRANSMETA }, /* GenuineTMx86 */ + { SIS_VENDOR_ID, CPU_VENDOR_SIS }, /* SiS SiS SiS */ + { UMC_VENDOR_ID, CPU_VENDOR_UMC }, /* UMC UMC UMC */ + { NEXGEN_VENDOR_ID, CPU_VENDOR_NEXGEN }, /* NexGenDriven */ + { RISE_VENDOR_ID, CPU_VENDOR_RISE }, /* RiseRiseRise */ +#if 0 + /* XXX CPUID 8000_0000h and 8086_0000h, not 0000_0000h */ + { "TransmetaCPU", CPU_VENDOR_TRANSMETA }, +#endif +#endif }; - void printcpuinfo(void) { u_int regs[4], i; char *brand; - cpu_class = amd64_cpus[cpu].cpu_class; + cpu_class = cpus[cpu].cpu_class; printf("CPU: "); - strncpy(cpu_model, amd64_cpus[cpu].cpu_name, sizeof (cpu_model)); + strncpy(cpu_model, cpus[cpu].cpu_name, sizeof (cpu_model)); /* Check for extended CPUID information and a processor name. */ if (cpu_exthigh >= 0x80000004) { @@ -148,8 +211,143 @@ printcpuinfo(void) switch (cpu_vendor_id) { case CPU_VENDOR_INTEL: +#ifdef __i386__ + if ((cpu_id & 0xf00) > 0x300) { + u_int brand_index; + + cpu_model[0] = '\0'; + + switch (cpu_id & 0x3000) { + case 0x1000: + strcpy(cpu_model, "Overdrive "); + break; + case 0x2000: + strcpy(cpu_model, "Dual "); + break; + } + + switch (cpu_id & 0xf00) { + case 0x400: + strcat(cpu_model, "i486 "); + /* Check the particular flavor of 486 */ + switch (cpu_id & 0xf0) { + case 0x00: + case 0x10: + strcat(cpu_model, "DX"); + break; + case 0x20: + strcat(cpu_model, "SX"); + break; + case 0x30: + strcat(cpu_model, "DX2"); + break; + case 0x40: + strcat(cpu_model, "SL"); + break; + case 0x50: + strcat(cpu_model, "SX2"); + break; + case 0x70: + strcat(cpu_model, + "DX2 Write-Back Enhanced"); + break; + case 0x80: + strcat(cpu_model, "DX4"); + break; + } + break; + case 0x500: + /* Check the particular flavor of 586 */ + strcat(cpu_model, "Pentium"); + switch (cpu_id & 0xf0) { + case 0x00: + strcat(cpu_model, " A-step"); + break; + case 0x10: + strcat(cpu_model, "/P5"); + break; + case 0x20: + strcat(cpu_model, "/P54C"); + break; + case 0x30: + strcat(cpu_model, "/P24T"); + break; + case 0x40: + strcat(cpu_model, "/P55C"); + break; + case 0x70: + strcat(cpu_model, "/P54C"); + break; + case 0x80: + strcat(cpu_model, "/P55C (quarter-micron)"); + break; + default: + /* nothing */ + break; + } +#if defined(I586_CPU) && !defined(NO_F00F_HACK) + /* + * XXX - If/when Intel fixes the bug, this + * should also check the version of the + * CPU, not just that it's a Pentium. + */ + has_f00f_bug = 1; +#endif + break; + case 0x600: + /* Check the particular flavor of 686 */ + switch (cpu_id & 0xf0) { + case 0x00: + strcat(cpu_model, "Pentium Pro A-step"); + break; + case 0x10: + strcat(cpu_model, "Pentium Pro"); + break; + case 0x30: + case 0x50: + case 0x60: + strcat(cpu_model, + "Pentium II/Pentium II Xeon/Celeron"); + cpu = CPU_PII; + break; + case 0x70: + case 0x80: + case 0xa0: + case 0xb0: + strcat(cpu_model, + "Pentium III/Pentium III Xeon/Celeron"); + cpu = CPU_PIII; + break; + default: + strcat(cpu_model, "Unknown 80686"); + break; + } + break; + case 0xf00: + strcat(cpu_model, "Pentium 4"); + cpu = CPU_P4; + break; + default: + strcat(cpu_model, "unknown"); + break; + } + + /* + * If we didn't get a brand name from the extended + * CPUID, try to look it up in the brand table. + */ + if (cpu_high > 0 && *cpu_brand == '\0') { + brand_index = cpu_procinfo & CPUID_BRAND_INDEX; + if (brand_index <= MAX_BRAND_INDEX && + cpu_brandtable[brand_index] != NULL) + strcpy(cpu_brand, + cpu_brandtable[brand_index]); + } + } +#else /* Please make up your mind folks! */ strcat(cpu_model, "EM64T"); +#endif break; case CPU_VENDOR_AMD: /* @@ -158,18 +356,297 @@ printcpuinfo(void) * (also describes ``Features'' encodings. */ strcpy(cpu_model, "AMD "); +#ifdef __i386__ + switch (cpu_id & 0xFF0) { + case 0x410: + strcat(cpu_model, "Standard Am486DX"); + break; + case 0x430: + strcat(cpu_model, "Enhanced Am486DX2 Write-Through"); + break; + case 0x470: + strcat(cpu_model, "Enhanced Am486DX2 Write-Back"); + break; + case 0x480: + strcat(cpu_model, "Enhanced Am486DX4/Am5x86 Write-Through"); + break; + case 0x490: + strcat(cpu_model, "Enhanced Am486DX4/Am5x86 Write-Back"); + break; + case 0x4E0: + strcat(cpu_model, "Am5x86 Write-Through"); + break; + case 0x4F0: + strcat(cpu_model, "Am5x86 Write-Back"); + break; + case 0x500: + strcat(cpu_model, "K5 model 0"); + break; + case 0x510: + strcat(cpu_model, "K5 model 1"); + break; + case 0x520: + strcat(cpu_model, "K5 PR166 (model 2)"); + break; + case 0x530: + strcat(cpu_model, "K5 PR200 (model 3)"); + break; + case 0x560: + strcat(cpu_model, "K6"); + break; + case 0x570: + strcat(cpu_model, "K6 266 (model 1)"); + break; + case 0x580: + strcat(cpu_model, "K6-2"); + break; + case 0x590: + strcat(cpu_model, "K6-III"); + break; + case 0x5a0: + strcat(cpu_model, "Geode LX"); + /* + * Make sure the TSC runs through suspension, + * otherwise we can't use it as timecounter + */ + wrmsr(0x1900, rdmsr(0x1900) | 0x20ULL); + break; + default: + strcat(cpu_model, "Unknown"); + break; + } +#if defined(I586_CPU) && defined(CPU_WT_ALLOC) + if ((cpu_id & 0xf00) == 0x500) { + if (((cpu_id & 0x0f0) > 0) + && ((cpu_id & 0x0f0) < 0x60) + && ((cpu_id & 0x00f) > 3)) + enable_K5_wt_alloc(); + else if (((cpu_id & 0x0f0) > 0x80) + || (((cpu_id & 0x0f0) == 0x80) + && (cpu_id & 0x00f) > 0x07)) + enable_K6_2_wt_alloc(); + else if ((cpu_id & 0x0f0) > 0x50) + enable_K6_wt_alloc(); + } +#endif +#else if ((cpu_id & 0xf00) == 0xf00) strcat(cpu_model, "AMD64 Processor"); else strcat(cpu_model, "Unknown"); +#endif + break; +#ifdef __i386__ + case CPU_VENDOR_CYRIX: + strcpy(cpu_model, "Cyrix "); + switch (cpu_id & 0xff0) { + case 0x440: + strcat(cpu_model, "MediaGX"); + break; + case 0x520: + strcat(cpu_model, "6x86"); + break; + case 0x540: + cpu_class = CPUCLASS_586; + strcat(cpu_model, "GXm"); + break; + case 0x600: + strcat(cpu_model, "6x86MX"); + break; + default: + /* + * Even though CPU supports the cpuid + * instruction, it can be disabled. + * Therefore, this routine supports all Cyrix + * CPUs. + */ + switch (cyrix_did & 0xf0) { + case 0x00: + switch (cyrix_did & 0x0f) { + case 0x00: + strcat(cpu_model, "486SLC"); + break; + case 0x01: + strcat(cpu_model, "486DLC"); + break; + case 0x02: + strcat(cpu_model, "486SLC2"); + break; + case 0x03: + strcat(cpu_model, "486DLC2"); + break; + case 0x04: + strcat(cpu_model, "486SRx"); + break; + case 0x05: + strcat(cpu_model, "486DRx"); + break; + case 0x06: + strcat(cpu_model, "486SRx2"); + break; + case 0x07: + strcat(cpu_model, "486DRx2"); + break; + case 0x08: + strcat(cpu_model, "486SRu"); + break; + case 0x09: + strcat(cpu_model, "486DRu"); + break; + case 0x0a: + strcat(cpu_model, "486SRu2"); + break; + case 0x0b: + strcat(cpu_model, "486DRu2"); + break; + default: + strcat(cpu_model, "Unknown"); + break; + } + break; + case 0x10: + switch (cyrix_did & 0x0f) { + case 0x00: + strcat(cpu_model, "486S"); + break; + case 0x01: + strcat(cpu_model, "486S2"); + break; + case 0x02: + strcat(cpu_model, "486Se"); + break; + case 0x03: + strcat(cpu_model, "486S2e"); + break; + case 0x0a: + strcat(cpu_model, "486DX"); + break; + case 0x0b: + strcat(cpu_model, "486DX2"); + break; + case 0x0f: + strcat(cpu_model, "486DX4"); + break; + default: + strcat(cpu_model, "Unknown"); + break; + } + break; + case 0x20: + if ((cyrix_did & 0x0f) < 8) + strcat(cpu_model, "6x86"); /* Where did you get it? */ + else + strcat(cpu_model, "5x86"); + break; + case 0x30: + strcat(cpu_model, "6x86"); + break; + case 0x40: + if ((cyrix_did & 0xf000) == 0x3000) { + cpu_class = CPUCLASS_586; + strcat(cpu_model, "GXm"); + } else + strcat(cpu_model, "MediaGX"); + break; + case 0x50: + strcat(cpu_model, "6x86MX"); + break; + case 0xf0: + switch (cyrix_did & 0x0f) { + case 0x0d: + strcat(cpu_model, "Overdrive CPU"); + break; + case 0x0e: + strcpy(cpu_model, "Texas Instruments 486SXL"); + break; + case 0x0f: + strcat(cpu_model, "486SLC/DLC"); + break; + default: + strcat(cpu_model, "Unknown"); + break; + } + break; + default: + strcat(cpu_model, "Unknown"); + break; + } + break; + } + break; + case CPU_VENDOR_RISE: + strcpy(cpu_model, "Rise "); + switch (cpu_id & 0xff0) { + case 0x500: /* 6401 and 6441 (Kirin) */ + case 0x520: /* 6510 (Lynx) */ + strcat(cpu_model, "mP6"); + break; + default: + strcat(cpu_model, "Unknown"); + } break; +#endif case CPU_VENDOR_CENTAUR: +#ifdef __i386__ + switch (cpu_id & 0xff0) { + case 0x540: + strcpy(cpu_model, "IDT WinChip C6"); + break; + case 0x580: + strcpy(cpu_model, "IDT WinChip 2"); + break; + case 0x590: + strcpy(cpu_model, "IDT WinChip 3"); + break; + case 0x660: + strcpy(cpu_model, "VIA C3 Samuel"); + break; + case 0x670: + if (cpu_id & 0x8) + strcpy(cpu_model, "VIA C3 Ezra"); + else + strcpy(cpu_model, "VIA C3 Samuel 2"); + break; + case 0x680: + strcpy(cpu_model, "VIA C3 Ezra-T"); + break; + case 0x690: + strcpy(cpu_model, "VIA C3 Nehemiah"); + break; + case 0x6a0: + case 0x6d0: + strcpy(cpu_model, "VIA C7 Esther"); + break; + case 0x6f0: + strcpy(cpu_model, "VIA Nano"); + break; + default: + strcpy(cpu_model, "VIA/IDT Unknown"); + } +#else strcpy(cpu_model, "VIA "); if ((cpu_id & 0xff0) == 0x6f0) strcat(cpu_model, "Nano Processor"); else strcat(cpu_model, "Unknown"); +#endif + break; +#ifdef __i386__ + case CPU_VENDOR_IBM: + strcpy(cpu_model, "Blue Lightning CPU"); break; + case CPU_VENDOR_NSC: + switch (cpu_id & 0xff0) { + case 0x540: + strcpy(cpu_model, "Geode SC1100"); + cpu = CPU_GEODE1100; + break; + default: + strcpy(cpu_model, "Geode/NSC unknown"); + break; + } + break; +#endif default: strcat(cpu_model, "Unknown"); break; @@ -186,16 +663,40 @@ printcpuinfo(void) strcpy(cpu_model, brand); printf("%s (", cpu_model); + if (tsc_freq != 0) { + hw_clockrate = (tsc_freq + 5000) / 1000000; + printf("%jd.%02d-MHz ", + (intmax_t)(tsc_freq + 4999) / 1000000, + (u_int)((tsc_freq + 4999) / 10000) % 100); + } switch(cpu_class) { +#ifdef __i386__ + case CPUCLASS_286: + printf("286"); + break; + case CPUCLASS_386: + printf("386"); + break; +#if defined(I486_CPU) + case CPUCLASS_486: + printf("486"); + break; +#endif +#if defined(I586_CPU) + case CPUCLASS_586: + printf("586"); + break; +#endif +#if defined(I686_CPU) + case CPUCLASS_686: + printf("686"); + break; +#endif +#else case CPUCLASS_K8: - if (tsc_freq != 0) { - hw_clockrate = (tsc_freq + 5000) / 1000000; - printf("%jd.%02d-MHz ", - (intmax_t)(tsc_freq + 4999) / 1000000, - (u_int)((tsc_freq + 4999) / 10000) % 100); - } printf("K8"); break; +#endif default: printf("Unknown"); /* will panic below... */ } @@ -207,10 +708,21 @@ printcpuinfo(void) if (cpu_vendor_id == CPU_VENDOR_INTEL || cpu_vendor_id == CPU_VENDOR_AMD || - cpu_vendor_id == CPU_VENDOR_CENTAUR) { + cpu_vendor_id == CPU_VENDOR_CENTAUR || +#ifdef __i386__ + cpu_vendor_id == CPU_VENDOR_TRANSMETA || + cpu_vendor_id == CPU_VENDOR_RISE || + cpu_vendor_id == CPU_VENDOR_NSC || + (cpu_vendor_id == CPU_VENDOR_CYRIX && ((cpu_id & 0xf00) > 0x500)) || +#endif + 0) { printf(" Family=0x%x", CPUID_TO_FAMILY(cpu_id)); printf(" Model=0x%x", CPUID_TO_MODEL(cpu_id)); printf(" Stepping=%u", cpu_id & CPUID_STEPPING); +#ifdef __i386__ + if (cpu_vendor_id == CPU_VENDOR_CYRIX) + printf("\n DIR=0x%04x", cyrix_did); +#endif /* * AMD CPUID Specification @@ -441,7 +953,18 @@ printcpuinfo(void) } } +#ifdef __i386__ + } else if (cpu_vendor_id == CPU_VENDOR_CYRIX) { + printf(" DIR=0x%04x", cyrix_did); + printf(" Stepping=%u", (cyrix_did & 0xf000) >> 12); + printf(" Revision=%u", (cyrix_did & 0x0f00) >> 8); +#ifndef CYRIX_CACHE_REALLY_WORKS + if (cpu == CPU_M1 && (cyrix_did & 0xff00) < 0x1700) + printf("\n CPU cache: write-through mode"); +#endif +#endif } + /* Avoid ugly blank lines: only print newline when we have to. */ if (*cpu_vendor || cpu_id) printf("\n"); @@ -451,30 +974,189 @@ printcpuinfo(void) if (cpu_vendor_id == CPU_VENDOR_AMD) print_AMD_info(); + else if (cpu_vendor_id == CPU_VENDOR_INTEL) + print_INTEL_info(); +#ifdef __i386__ + else if (cpu_vendor_id == CPU_VENDOR_TRANSMETA) + print_transmeta_info(); +#endif } void panicifcpuunsupported(void) { +#ifdef __i386__ +#if !defined(lint) +#if !defined(I486_CPU) && !defined(I586_CPU) && !defined(I686_CPU) +#error This kernel is not configured for one of the supported CPUs +#endif +#else /* lint */ +#endif /* lint */ +#else /* __amd64__ */ #ifndef HAMMER #error "You need to specify a cpu type" #endif +#endif /* * Now that we have told the user what they have, * let them know if that machine type isn't configured. */ switch (cpu_class) { +#ifdef __i386__ + case CPUCLASS_286: /* a 286 should not make it this far, anyway */ + case CPUCLASS_386: +#if !defined(I486_CPU) + case CPUCLASS_486: +#endif +#if !defined(I586_CPU) + case CPUCLASS_586: +#endif +#if !defined(I686_CPU) + case CPUCLASS_686: +#endif +#else /* __amd64__ */ case CPUCLASS_X86: #ifndef HAMMER case CPUCLASS_K8: #endif +#endif panic("CPU class not configured"); default: break; } } +#ifdef __i386__ +static volatile u_int trap_by_rdmsr; + +/* + * Special exception 6 handler. + * The rdmsr instruction generates invalid opcodes fault on 486-class + * Cyrix CPU. Stacked eip register points the rdmsr instruction in the + * function identblue() when this handler is called. Stacked eip should + * be advanced. + */ +inthand_t bluetrap6; +#ifdef __GNUCLIKE_ASM +__asm +(" \n\ + .text \n\ + .p2align 2,0x90 \n\ + .type " __XSTRING(CNAME(bluetrap6)) ",@function \n\ +" __XSTRING(CNAME(bluetrap6)) ": \n\ + ss \n\ + movl $0xa8c1d," __XSTRING(CNAME(trap_by_rdmsr)) " \n\ + addl $2, (%esp) /* rdmsr is a 2-byte instruction */ \n\ + iret \n\ +"); +#endif + +/* + * Special exception 13 handler. + * Accessing non-existent MSR generates general protection fault. + */ +inthand_t bluetrap13; +#ifdef __GNUCLIKE_ASM +__asm +(" \n\ + .text \n\ + .p2align 2,0x90 \n\ + .type " __XSTRING(CNAME(bluetrap13)) ",@function \n\ +" __XSTRING(CNAME(bluetrap13)) ": \n\ + ss \n\ + movl $0xa89c4," __XSTRING(CNAME(trap_by_rdmsr)) " \n\ + popl %eax /* discard error code */ \n\ + addl $2, (%esp) /* rdmsr is a 2-byte instruction */ \n\ + iret \n\ +"); +#endif + +/* + * Distinguish IBM Blue Lightning CPU from Cyrix CPUs that does not + * support cpuid instruction. This function should be called after + * loading interrupt descriptor table register. + * + * I don't like this method that handles fault, but I couldn't get + * information for any other methods. Does blue giant know? + */ +static int +identblue(void) +{ + + trap_by_rdmsr = 0; + + /* + * Cyrix 486-class CPU does not support rdmsr instruction. + * The rdmsr instruction generates invalid opcode fault, and exception + * will be trapped by bluetrap6() on Cyrix 486-class CPU. The + * bluetrap6() set the magic number to trap_by_rdmsr. + */ + setidt(IDT_UD, bluetrap6, SDT_SYS386TGT, SEL_KPL, + GSEL(GCODE_SEL, SEL_KPL)); + + /* + * Certain BIOS disables cpuid instruction of Cyrix 6x86MX CPU. + * In this case, rdmsr generates general protection fault, and + * exception will be trapped by bluetrap13(). + */ + setidt(IDT_GP, bluetrap13, SDT_SYS386TGT, SEL_KPL, + GSEL(GCODE_SEL, SEL_KPL)); + + rdmsr(0x1002); /* Cyrix CPU generates fault. */ + + if (trap_by_rdmsr == 0xa8c1d) + return IDENTBLUE_CYRIX486; + else if (trap_by_rdmsr == 0xa89c4) + return IDENTBLUE_CYRIXM2; + return IDENTBLUE_IBMCPU; +} + + +/* + * identifycyrix() set lower 16 bits of cyrix_did as follows: + * + * F E D C B A 9 8 7 6 5 4 3 2 1 0 + * +-------+-------+---------------+ + * | SID | RID | Device ID | + * | (DIR 1) | (DIR 0) | + * +-------+-------+---------------+ + */ +static void +identifycyrix(void) +{ + register_t saveintr; + int ccr2_test = 0, dir_test = 0; + u_char ccr2, ccr3; + + saveintr = intr_disable(); + + ccr2 = read_cyrix_reg(CCR2); + write_cyrix_reg(CCR2, ccr2 ^ CCR2_LOCK_NW); + read_cyrix_reg(CCR2); + if (read_cyrix_reg(CCR2) != ccr2) + ccr2_test = 1; + write_cyrix_reg(CCR2, ccr2); + + ccr3 = read_cyrix_reg(CCR3); + write_cyrix_reg(CCR3, ccr3 ^ CCR3_MAPEN3); + read_cyrix_reg(CCR3); + if (read_cyrix_reg(CCR3) != ccr3) + dir_test = 1; /* CPU supports DIRs. */ + write_cyrix_reg(CCR3, ccr3); + + if (dir_test) { + /* Device ID registers are available. */ + cyrix_did = read_cyrix_reg(DIR1) << 8; + cyrix_did += read_cyrix_reg(DIR0); + } else if (ccr2_test) + cyrix_did = 0x0010; /* 486S A-step */ + else + cyrix_did = 0x00ff; /* Old 486SLC/DLC and TI486SXLC/SXL */ + + intr_restore(saveintr); +} +#endif /* Update TSC freq with the value indicated by the caller. */ static void @@ -505,24 +1187,35 @@ SYSINIT(hook_tsc_freq, SI_SUB_CONFIGURE, /* * Final stage of CPU identification. */ +#ifdef __i386__ +void +finishidentcpu(void) +#else void identify_cpu(void) +#endif { u_int regs[4], cpu_stdext_disable; +#ifdef __i386__ + u_char ccr3; +#endif +#ifdef __amd64__ do_cpuid(0, regs); cpu_high = regs[0]; ((u_int *)&cpu_vendor)[0] = regs[1]; ((u_int *)&cpu_vendor)[1] = regs[3]; ((u_int *)&cpu_vendor)[2] = regs[2]; cpu_vendor[12] = '\0'; - cpu_vendor_id = find_cpu_vendor_id(); do_cpuid(1, regs); cpu_id = regs[0]; cpu_procinfo = regs[1]; cpu_feature = regs[3]; cpu_feature2 = regs[2]; +#endif + + cpu_vendor_id = find_cpu_vendor_id(); /* * Clear "Limit CPUID Maxval" bit and get the largest standard CPUID @@ -530,7 +1223,9 @@ identify_cpu(void) * for probing correct CPU topology later. * XXX This is only done on the BSP package. */ - if (cpu_vendor_id == CPU_VENDOR_INTEL && cpu_high > 0 && cpu_high < 4) { + if (cpu_vendor_id == CPU_VENDOR_INTEL && cpu_high > 0 && cpu_high < 4 && + ((CPUID_TO_FAMILY(cpu_id) == 0xf && CPUID_TO_MODEL(cpu_id) >= 0x3) || + (CPUID_TO_FAMILY(cpu_id) == 0x6 && CPUID_TO_MODEL(cpu_id) >= 0xe))) { uint64_t msr; msr = rdmsr(MSR_IA32_MISC_ENABLE); if ((msr & 0x400000ULL) != 0) { @@ -566,12 +1261,25 @@ identify_cpu(void) cpu_stdext_feature &= ~cpu_stdext_disable; } +#ifdef __i386__ + if (cpu_high > 0 && + (cpu_vendor_id == CPU_VENDOR_INTEL || + cpu_vendor_id == CPU_VENDOR_AMD || + cpu_vendor_id == CPU_VENDOR_TRANSMETA || + cpu_vendor_id == CPU_VENDOR_CENTAUR || + cpu_vendor_id == CPU_VENDOR_NSC)) { + do_cpuid(0x80000000, regs); + if (regs[0] >= 0x80000000) + cpu_exthigh = regs[0]; + } +#else if (cpu_vendor_id == CPU_VENDOR_INTEL || cpu_vendor_id == CPU_VENDOR_AMD || cpu_vendor_id == CPU_VENDOR_CENTAUR) { do_cpuid(0x80000000, regs); cpu_exthigh = regs[0]; } +#endif if (cpu_exthigh >= 0x80000001) { do_cpuid(0x80000001, regs); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 14:53:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A155A271 for ; Thu, 4 Sep 2014 14:53:10 +0000 (UTC) Received: from vfemail.net (nine.vfemail.net [108.76.175.9]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 445561304 for ; Thu, 4 Sep 2014 14:53:09 +0000 (UTC) Received: (qmail 79503 invoked by uid 89); 4 Sep 2014 14:53:02 -0000 Received: from localhost (HELO freequeue.vfemail.net) (127.0.0.1) by localhost with (DHE-RSA-AES256-SHA encrypted) SMTP; 4 Sep 2014 14:53:02 -0000 Received: (qmail 79420 invoked by uid 89); 4 Sep 2014 14:52:44 -0000 Received: by simscan 1.3.1 ppid: 79412, pid: 79416, t: 0.1044s scanners:none Received: from unknown (HELO smtp102-2.vfemail.net) (172.16.100.62) by FreeQueue with SMTP; 4 Sep 2014 14:52:44 -0000 Received: (qmail 18342 invoked by uid 89); 4 Sep 2014 14:52:44 -0000 Received: by simscan 1.4.0 ppid: 18313, pid: 18328, t: 0.9655s scanners:none Received: from unknown (HELO nil) (amJlaWNoQHZmZW1haWwubmV0@172.16.100.27) by 172.16.100.62 with ESMTPA; 4 Sep 2014 14:52:43 -0000 From: Jan Beich To: Stefan Esser Subject: Re: svn commit: r270232 - head/tools/tools/vt/keymaps References: <201408201707.s7KH7gtX009303@svn.freebsd.org> Date: Thu, 04 Sep 2014 16:52:38 +0200 In-Reply-To: <201408201707.s7KH7gtX009303@svn.freebsd.org> (Stefan Esser's message of "Wed, 20 Aug 2014 17:07:42 +0000 (UTC)") Message-ID: MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 14:53:10 -0000 Stefan Esser writes: > Author: se > Date: Wed Aug 20 17:07:41 2014 > New Revision: 270232 > URL: http://svnweb.freebsd.org/changeset/base/270232 > > Log: > The conversion tools have been further improved and some erroneous > conversions have been detected and fixed. [...] > sub local_to_UCS_code > { > my ($char) = @_; > > - return prettyprint_token(ord(Encode::decode("UTF-8", local_to_UCS_string($char)))); > + my $ucs_char = ord(Encode::decode("UTF-8", local_to_UCS_string($char))); > + > + $current_char = lc(chr($ucs_char)), print("SETCUR: $ucs_char\n") > + if $current_char eq ""; The script now emits |SETCUR: 123| lines that kbdcontrol(1) doesn't like. Either removing debug |print| or adding STDERR seems to fix. $ perl tools/tools/vt/keymaps/convert-keymap.pl \ share/vt/keymaps/us.kbd ASCII >foo.kbd $ kbdcontrol -l ./foo.kbd Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D24F95A6; Thu, 4 Sep 2014 14:56:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE0A61332; Thu, 4 Sep 2014 14:56:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84EuOKb068914; Thu, 4 Sep 2014 14:56:24 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84EuOEU068913; Thu, 4 Sep 2014 14:56:24 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201409041456.s84EuOEU068913@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Thu, 4 Sep 2014 14:56:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271099 - head/sys/dev/xen/blkfront X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 14:56:24 -0000 Author: royger Date: Thu Sep 4 14:56:24 2014 New Revision: 271099 URL: http://svnweb.freebsd.org/changeset/base/271099 Log: Revert r269814: blkfront: add support for unmapped IO Current busdma code for unmapped bios will not properly align the segment size, causing corruption on blkfront devices. Revert the commit until busdma code is fixed. Reported by: mav MFC after: 1 day Modified: head/sys/dev/xen/blkfront/blkfront.c Modified: head/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- head/sys/dev/xen/blkfront/blkfront.c Thu Sep 4 14:26:25 2014 (r271098) +++ head/sys/dev/xen/blkfront/blkfront.c Thu Sep 4 14:56:24 2014 (r271099) @@ -272,12 +272,8 @@ xbd_queue_request(struct xbd_softc *sc, { int error; - if (cm->cm_bp != NULL) - error = bus_dmamap_load_bio(sc->xbd_io_dmat, cm->cm_map, - cm->cm_bp, xbd_queue_cb, cm, 0); - else - error = bus_dmamap_load(sc->xbd_io_dmat, cm->cm_map, - cm->cm_data, cm->cm_datalen, xbd_queue_cb, cm, 0); + error = bus_dmamap_load(sc->xbd_io_dmat, cm->cm_map, cm->cm_data, + cm->cm_datalen, xbd_queue_cb, cm, 0); if (error == EINPROGRESS) { /* * Maintain queuing order by freezing the queue. The next @@ -337,6 +333,8 @@ xbd_bio_command(struct xbd_softc *sc) } cm->cm_bp = bp; + cm->cm_data = bp->bio_data; + cm->cm_datalen = bp->bio_bcount; cm->cm_sector_number = (blkif_sector_t)bp->bio_pblkno; switch (bp->bio_cmd) { @@ -995,7 +993,7 @@ xbd_instance_create(struct xbd_softc *sc sc->xbd_disk->d_mediasize = sectors * sector_size; sc->xbd_disk->d_maxsize = sc->xbd_max_request_size; - sc->xbd_disk->d_flags = DISKFLAG_UNMAPPED_BIO; + sc->xbd_disk->d_flags = 0; if ((sc->xbd_flags & (XBDF_FLUSH|XBDF_BARRIER)) != 0) { sc->xbd_disk->d_flags |= DISKFLAG_CANFLUSHCACHE; device_printf(sc->xbd_dev, From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 14:57:05 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0ED88C1; Thu, 4 Sep 2014 14:57:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C62E1359; Thu, 4 Sep 2014 14:57:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84Ev5PK069214; Thu, 4 Sep 2014 14:57:05 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84Ev4ll069209; Thu, 4 Sep 2014 14:57:04 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409041457.s84Ev4ll069209@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 4 Sep 2014 14:57:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271100 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 14:57:05 -0000 Author: ian Date: Thu Sep 4 14:57:04 2014 New Revision: 271100 URL: http://svnweb.freebsd.org/changeset/base/271100 Log: Implement the same public interface in imx51 and imx6 iomux; use the common header file for both. Remove some unused code from imx51_iomux. The iomux drivers are required, not optional, adjust the files.* entries accordingly. Deleted: head/sys/arm/freescale/imx/imx51_iomuxvar.h Modified: head/sys/arm/freescale/imx/files.imx51 head/sys/arm/freescale/imx/files.imx53 head/sys/arm/freescale/imx/files.imx6 head/sys/arm/freescale/imx/imx51_iomux.c Modified: head/sys/arm/freescale/imx/files.imx51 ============================================================================== --- head/sys/arm/freescale/imx/files.imx51 Thu Sep 4 14:56:24 2014 (r271099) +++ head/sys/arm/freescale/imx/files.imx51 Thu Sep 4 14:57:04 2014 (r271100) @@ -19,7 +19,7 @@ arm/arm/bus_space-v6.c standard arm/freescale/imx/tzic.c standard # IOMUX - external pins multiplexor -arm/freescale/imx/imx51_iomux.c optional iomux +arm/freescale/imx/imx51_iomux.c standard # GPIO arm/freescale/imx/imx_gpio.c optional gpio Modified: head/sys/arm/freescale/imx/files.imx53 ============================================================================== --- head/sys/arm/freescale/imx/files.imx53 Thu Sep 4 14:56:24 2014 (r271099) +++ head/sys/arm/freescale/imx/files.imx53 Thu Sep 4 14:57:04 2014 (r271100) @@ -22,7 +22,7 @@ dev/uart/uart_dev_imx.c optional uart arm/freescale/imx/tzic.c standard # IOMUX - external pins multiplexor -arm/freescale/imx/imx51_iomux.c optional iomux +arm/freescale/imx/imx51_iomux.c standard # GPIO arm/freescale/imx/imx_gpio.c optional gpio Modified: head/sys/arm/freescale/imx/files.imx6 ============================================================================== --- head/sys/arm/freescale/imx/files.imx6 Thu Sep 4 14:56:24 2014 (r271099) +++ head/sys/arm/freescale/imx/files.imx6 Thu Sep 4 14:57:04 2014 (r271100) @@ -52,6 +52,4 @@ arm/freescale/imx/imx6_usbphy.c optiona # # Not ready yet... # -#arm/freescale/imx/imx51_iomux.c optional iomux -#dev/ata/chipsets/ata-fsl.c optional imxata #arm/freescale/imx/imx51_ipuv3.c optional sc Modified: head/sys/arm/freescale/imx/imx51_iomux.c ============================================================================== --- head/sys/arm/freescale/imx/imx51_iomux.c Thu Sep 4 14:56:24 2014 (r271099) +++ head/sys/arm/freescale/imx/imx51_iomux.c Thu Sep 4 14:57:04 2014 (r271100) @@ -75,8 +75,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include +#include "imx51_iomuxreg.h" #define IOMUX_WRITE(_sc, _r, _v) \ @@ -177,45 +176,23 @@ iomux_set_pad(unsigned int pin, unsigned iomux_set_pad_sub(iomuxsc, pin, config); } -#ifdef notyet -void -iomux_set_input(unsigned int input, unsigned int config) +static uint32_t +iomux_get_pad_config_sub(struct iomux_softc *sc, uint32_t pin) { - bus_size_t input_ctl_reg = input; - - bus_space_write_4(iomuxsc->iomux_memt, iomuxsc->iomux_memh, - input_ctl_reg, config); -} -#endif + bus_size_t pad_reg = IOMUX_PIN_TO_PAD_ADDRESS(pin); + uint32_t result; -void -iomux_mux_config(const struct iomux_conf *conflist) -{ - int i; + result = IOMUX_READ(sc, pad_reg); - if (iomuxsc == NULL) - return; - for (i = 0; conflist[i].pin != IOMUX_CONF_EOT; i++) { - iomux_set_pad_sub(iomuxsc, conflist[i].pin, conflist[i].pad); - iomux_set_function_sub(iomuxsc, conflist[i].pin, - conflist[i].mux); - } + return(result); } -#ifdef notyet -void -iomux_input_config(const struct iomux_input_conf *conflist) +unsigned int +iomux_get_pad_config(unsigned int pin) { - int i; - if (iomuxsc == NULL) - return; - for (i = 0; conflist[i].inout != -1; i++) { - iomux_set_inout(iomuxsc, conflist[i].inout, - conflist[i].inout_mode); - } + return(iomux_get_pad_config_sub(iomuxsc, pin)); } -#endif uint32_t imx_iomux_gpr_get(u_int regnum) @@ -268,5 +245,5 @@ static driver_t imx_iomux_driver = { static devclass_t imx_iomux_devclass; EARLY_DRIVER_MODULE(imx_iomux, simplebus, imx_iomux_driver, - imx_iomux_devclass, 0, 0, BUS_PASS_BUS - 1); + imx_iomux_devclass, 0, 0, BUS_PASS_CPU + BUS_PASS_ORDER_LATE); From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 14:59:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8DD5B67; Thu, 4 Sep 2014 14:59:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BAFC3137A; Thu, 4 Sep 2014 14:59:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84ExScB069704; Thu, 4 Sep 2014 14:59:28 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84ExRXr069699; Thu, 4 Sep 2014 14:59:27 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409041459.s84ExRXr069699@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 4 Sep 2014 14:59:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271101 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 14:59:29 -0000 Author: ian Date: Thu Sep 4 14:59:27 2014 New Revision: 271101 URL: http://svnweb.freebsd.org/changeset/base/271101 Log: The iomux driver is no longer optional, all imx platforms have it as standard now, so remove it from kernel configs. Modified: head/sys/arm/conf/DIGI-CCWMX53 head/sys/arm/conf/EFIKA_MX head/sys/arm/conf/IMX53-QSB head/sys/arm/conf/IMX6 Modified: head/sys/arm/conf/DIGI-CCWMX53 ============================================================================== --- head/sys/arm/conf/DIGI-CCWMX53 Thu Sep 4 14:57:04 2014 (r271100) +++ head/sys/arm/conf/DIGI-CCWMX53 Thu Sep 4 14:59:27 2014 (r271101) @@ -120,8 +120,6 @@ device atapci # Only for helper funct device imxata options ATA_STATIC_ID # Static device numbering -device iomux # IO Multiplexor - device gpio device gpioled Modified: head/sys/arm/conf/EFIKA_MX ============================================================================== --- head/sys/arm/conf/EFIKA_MX Thu Sep 4 14:57:04 2014 (r271100) +++ head/sys/arm/conf/EFIKA_MX Thu Sep 4 14:59:27 2014 (r271101) @@ -116,8 +116,6 @@ device atapci # Only for helper funct device imxata options ATA_STATIC_ID # Static device numbering -device iomux # IO Multiplexor - device gpio device gpioled Modified: head/sys/arm/conf/IMX53-QSB ============================================================================== --- head/sys/arm/conf/IMX53-QSB Thu Sep 4 14:57:04 2014 (r271100) +++ head/sys/arm/conf/IMX53-QSB Thu Sep 4 14:59:27 2014 (r271101) @@ -119,8 +119,6 @@ options ALT_BREAK_TO_DEBUGGER #device imxata #options ATA_STATIC_ID # Static device numbering -device iomux # IO Multiplexor - device gpio device gpioled Modified: head/sys/arm/conf/IMX6 ============================================================================== --- head/sys/arm/conf/IMX6 Thu Sep 4 14:57:04 2014 (r271100) +++ head/sys/arm/conf/IMX6 Thu Sep 4 14:59:27 2014 (r271101) @@ -80,7 +80,6 @@ device md # Memory "disks" device ether # Ethernet support device miibus # Required for ethernet device bpf # Berkeley packet filter (required for DHCP) -#device iomux # IO Multiplexor # General-purpose input/output device gpio From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 14:59:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F127CA0; Thu, 4 Sep 2014 14:59:36 +0000 (UTC) Received: from mail-we0-x233.google.com (mail-we0-x233.google.com [IPv6:2a00:1450:400c:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 05460137C; Thu, 4 Sep 2014 14:59:34 +0000 (UTC) Received: by mail-we0-f179.google.com with SMTP id t60so10273201wes.38 for ; Thu, 04 Sep 2014 07:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=WlUf4QtExXxuzCgG4OgCOewyY32pi5j3OMOlziHnsA0=; b=UsE1G7dDxhxfo4BBfREuzRn5GEtJLcYqllMnhkxV+irsrEsq8zNpRmNj5bmLm5JGRx JBqqpc3cq97l3aZxVxaYno19J0HGiDEfDG+B0Cdcj0GZeINDgH5qUN61m7HjYamOrbC5 MYs+1soPLhBmgixCnA/pW7JuYW/NNQ162j4awSWCwMU0bWXIftoufo/o9L9+H86RnWPU Tt4FEyWS/0ZeE9/Uf4DR/BgYVs0TLgLCogQ44ZSvTmoMQw2A0AXHfWTr5iTWCxVqNMgy Weln9m8uPZKhXu0qWN3fVDensd6nRrdzu8Deqn2X7xk/3k0u1vOZP5xA6W6Q0V4cVs+r MAsw== X-Received: by 10.180.102.130 with SMTP id fo2mr6553087wib.29.1409842772586; Thu, 04 Sep 2014 07:59:32 -0700 (PDT) Received: from [172.16.1.30] (124.Red-83-33-238.dynamicIP.rima-tde.net. [83.33.238.124]) by mx.google.com with ESMTPSA id kw2sm19681177wjb.30.2014.09.04.07.59.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Sep 2014 07:59:31 -0700 (PDT) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Message-ID: <54087E4B.7070405@FreeBSD.org> Date: Thu, 04 Sep 2014 16:59:23 +0200 From: =?windows-1252?Q?Roger_Pau_Monn=E9?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: Alexander Motin , John-Mark Gurney Subject: Re: svn commit: r269814 - head/sys/dev/xen/blkfront References: <53e8e31e.2179.30c1c657@svn.freebsd.org> <53FF7386.3050804@FreeBSD.org> <20140828184515.GV71691@funkthat.com> <53FF7BC4.6050801@FreeBSD.org> <5400BDC7.7020902@FreeBSD.org> <54058E1E.4050907@FreeBSD.org> <20140902171841.GX71691@funkthat.com> <5407385B.1000005@FreeBSD.org> <54073BC2.1000703@FreeBSD.org> In-Reply-To: <54073BC2.1000703@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, scottl@FreeBSD.org, cperciva@FreeBSD.org, svn-src-head@FreeBSD.org, gibbs@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 14:59:36 -0000 El 03/09/14 a les 18.03, Alexander Motin ha escrit: > On 03.09.2014 18:48, Roger Pau Monné wrote: >> El 02/09/14 a les 19.18, John-Mark Gurney ha escrit: >>> Roger Pau Monn wrote this message on Tue, Sep 02, 2014 at 11:30 +0200: >>>> El 29/08/14 a les 19.52, Roger Pau Monné ha escrit: >>>>> El 28/08/14 a les 20.58, Alexander Motin ha escrit: >>>>>> On 28.08.2014 21:45, John-Mark Gurney wrote: >>>>>>> Alexander Motin wrote this message on Thu, Aug 28, 2014 at 21:23 +0300: >>>>>>>> Hi, Roger. >>>>>>>> >>>>>>>> It looks to me like this commit does not work as it should. I got >>>>>>>> problem when I just tried `newfs /dev/ada0 ; mount /dev/ada0 /mnt`. >>>>>>>> Somehow newfs does not produce valid filesystem. Problem is reliably >>>>>>>> repeatable and reverting this commit fixes it. >>>>>>>> >>>>>>>> I found at least one possible cause there: If original data buffer is >>>>>>>> unmapped, misaligned and not physically contiguous, then present x86 >>>>>>>> bus_dmamap_load_bio() implementation will process each physically >>>>>>>> contiguous segment separately. Due to the misalignment first and last >>>>>>>> physical segments may have size not multiple to 512 bytes. Since each >>>>>>>> segment processed separately, they are not joined together, and >>>>>>>> xbd_queue_cb() is getting segments not multiple to 512 bytes. Attempt to >>>>>>>> convert them to exact number of sectors in the driver cause data corruption. >>>>>>> >>>>>>> Are you sure this isn't a problem w/ the tag not properly specifying >>>>>>> the correct alignement? >>>>>> >>>>>> I don't know how to specify it stronger then this: >>>>>> error = bus_dma_tag_create( >>>>>> bus_get_dma_tag(sc->xbd_dev), /* parent */ >>>>>> 512, PAGE_SIZE, /* algnmnt, boundary */ >>>>>> BUS_SPACE_MAXADDR, /* lowaddr */ >>>>>> BUS_SPACE_MAXADDR, /* highaddr */ >>>>>> NULL, NULL, /* filter, filterarg */ >>>>>> sc->xbd_max_request_size, >>>>>> sc->xbd_max_request_segments, >>>>>> PAGE_SIZE, /* maxsegsize */ >>>>>> BUS_DMA_ALLOCNOW, /* flags */ >>>>>> busdma_lock_mutex, /* lockfunc */ >>>>>> &sc->xbd_io_lock, /* lockarg */ >>>>>> &sc->xbd_io_dmat); >>>>>> >>>>>>> Also, I don't think there is a way for busdma >>>>>>> to say that you MUST have a segment be a multiple of 512, though you >>>>>>> could use a 512 boundary, but that would force all segments to only be >>>>>>> 512 bytes... >>>>>> >>>>>> As I understand, that is mandatory requirement for this "hardware". >>>>>> Alike 4K alignment requirement also exist at least for SDHCI, and IIRC >>>>>> UHCI/OHCI hardware. Even AHCI requires both segment addresses and >>>>>> lengths to be even. >>>>>> >>>>>> I may be wrong, but I think it is quite likely that hardware that >>>>>> requires segment address alignment quite likely will have the same >>>>>> requirements for segments length. >>>> >>>> Hello, >>>> >>>> I have the following fix, which makes sure the total length and the >>>> size of each segment is aligned. I'm not very knowledgeable of the >>>> busdma code, so someone has to review it. >>> >>> I feel that this alignment should only be enforced via a new option on >>> the tag... I don't see how alignment and segment size should be >>> conflated... I could totally see a device that requires an alignement >>> of 8 bytes, but has a segment size of 16, or vice versa, and requiring >>> them to be the same means we will bounce unnecesarily... >>> >>> cc'd scottl since he knows this code better than I... and cperciva as >>> he touched it for similar reasons.. >>> >>> Oh, I just found PR 152818, where cperciva did a similar fix to >>> bounce_bus_dmamap_load_buffer for the exact same reason... It was >>> committed in r216194... >> >> Since Xen blkfront seems to be the only driver to have such segment >> size requirements, > > No, it is not. I've already posted other examples I can recall: SDHCI, > UHCI/OHCI and AHCI. Their limitations are different and less strict, but > still may need handling. For SDHCI, since it is quite slow and has many > other bugs, I practically implemented custom buffer bouncing. AHCI I > suppose works only because limitation is only for even addresses, and > odd ones happen extremely rarely (does not happen). For USB I am not > sure, but at least umass driver does not support unmapped I/O. > >> it might be best to just fix blkfront to always >> roundup segment size to 512, like the following: > > I think some coffee is needed here. ;) Rounding addresses won't make > data properly aligned. Some copy is unavoidable in such cases. It would > be good if it was done properly by default buffer bouncer. I've just reverted the commit, will look into fixing busdma when I'm back from vacations :). I really wanted to get this into 10.1 because it makes a noticeable speed improvement, but I think it's going to miss the release. Roger. From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 15:11:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39CEE646; Thu, 4 Sep 2014 15:11:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25A85174D; Thu, 4 Sep 2014 15:11:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84FBw6u078743; Thu, 4 Sep 2014 15:11:58 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84FBwt4078742; Thu, 4 Sep 2014 15:11:58 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409041511.s84FBwt4078742@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 4 Sep 2014 15:11:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271102 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 15:11:58 -0000 Author: ian Date: Thu Sep 4 15:11:57 2014 New Revision: 271102 URL: http://svnweb.freebsd.org/changeset/base/271102 Log: Implement the imx_iomux_get/set_gpr() interface for imx6. Modified: head/sys/arm/freescale/imx/imx6_iomux.c Modified: head/sys/arm/freescale/imx/imx6_iomux.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_iomux.c Thu Sep 4 14:59:27 2014 (r271101) +++ head/sys/arm/freescale/imx/imx6_iomux.c Thu Sep 4 15:11:57 2014 (r271102) @@ -166,6 +166,42 @@ iomux_get_pad_config(unsigned int pin) return(iomux_get_pad_config_sub(iomuxsc, pin)); } + +uint32_t +imx_iomux_gpr_get(u_int regnum) +{ + + KASSERT(iomuxsc != NULL, ("imx_iomux_gpr_get() called before attach")); + KASSERT(regnum >= 0 && regnum <= 13, + ("imx_iomux_gpr_get bad regnum %u", regnum)); + return (IOMUX_READ(iomuxsc, IOMUXC_GPR0 + regnum)); +} + +void +imx_iomux_gpr_set(u_int regnum, uint32_t val) +{ + + KASSERT(iomuxsc != NULL, ("imx_iomux_gpr_set() called before attach")); + KASSERT(regnum >= 0 && regnum <= 13, + ("imx_iomux_gpr_set bad regnum %u", regnum)); + IOMUX_WRITE(iomuxsc, IOMUXC_GPR0 + regnum, val); +} + +void +imx_iomux_gpr_set_masked(u_int regnum, uint32_t clrbits, uint32_t setbits) +{ + uint32_t val; + + KASSERT(iomuxsc != NULL, + ("imx_iomux_gpr_set_masked called before attach")); + KASSERT(regnum >= 0 && regnum <= 13, + ("imx_iomux_gpr_set_masked bad regnum %u", regnum)); + + val = IOMUX_READ(iomuxsc, IOMUXC_GPR0 + regnum); + val = (val & ~clrbits) | setbits; + IOMUX_WRITE(iomuxsc, IOMUXC_GPR0 + regnum, val); +} + static device_method_t imx6_iomux_methods[] = { /* Device interface */ DEVMETHOD(device_probe, imx6_iomux_probe), From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 14:49:14 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C027EEC; Thu, 4 Sep 2014 14:49:14 +0000 (UTC) Received: from mail.lifanov.com (mail.lifanov.com [206.125.175.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24D84123F; Thu, 4 Sep 2014 14:49:13 +0000 (UTC) Received: by mail.lifanov.com (Postfix, from userid 58) id 345B11B30EA; Thu, 4 Sep 2014 10:49:13 -0400 (EDT) Received: from [127.0.0.1] (vnat004.nandomedia.com [166.108.31.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.lifanov.com (Postfix) with ESMTPSA id B73481B30E5; Thu, 4 Sep 2014 10:49:09 -0400 (EDT) Message-ID: <54087BE4.6030601@mail.lifanov.com> Date: Thu, 04 Sep 2014 10:49:08 -0400 From: Nikolai Lifanov User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Steven Hartland , Andriy Gapon , John Baldwin Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm References: <201408281950.s7SJo90I047213@svn.freebsd.org> <169C94ED141B435BACEADB04A4824717@multiplay.co.uk> <54072E20.10802@mail.lifanov.com> <2230377.GgKARkJyaG@ralph.baldwin.cx> <540778A2.3080809@mail.lifanov.com> <5407816B.9000401@FreeBSD.org> <86292055B4114529874B693EEB441CB6@multiplay.co.uk> In-Reply-To: <86292055B4114529874B693EEB441CB6@multiplay.co.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 04 Sep 2014 15:35:39 +0000 Cc: src-committers@FreeBSD.org, Peter Wemm , Alan Cox , svn-src-all@FreeBSD.org, Dmitry Morozovsky , "Matthew D. Fuller" , svn-src-head@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 14:49:14 -0000 On 09/03/14 21:18, Steven Hartland wrote: > > ----- Original Message ----- From: "Andriy Gapon" > > >> on 03/09/2014 23:22 Nikolai Lifanov said the following: >>> On 09/03/14 15:22, John Baldwin wrote: >>>> On Wednesday, September 03, 2014 11:05:04 AM Nikolai Lifanov wrote: >>>>> On 09/03/14 04:09, Steven Hartland wrote: >>>>>> I'm looking to MFC this change so wanted to check if >>>>>> anyone had an final feedback / objections? >>>>>> >>>>>> I know we currently have Alan's feedback on changing >>>>>> the #ifdef __i386__ to #ifndef UMA_MD_SMALL_ALLOC >>>>>> which sounds sensible but waiting Peter to comment on. >>>>>> >>>>>> Regards >>>>>> Steve >>>>> >>>>> I have no technical input, but this change improves ARC usefulness for >>>>> me quite a bit. I would like to see the improvement in 10-STABLE. >>>> >>>> Can you verify that the current 10-STABLE (as of today) with all the >>>> various pagedaemon fixes still has ARC issues for your workload? >>>> >>> >>> It doesn't have any issues, but I noticed the improvement on CURRENT. I >>> observed that just after this change, my package builder is much more >>> likely to retain MFU and not evict useful things from there (the port >>> tree) after large builds. >>> However, I run a lot more 10.0-RELEASE than CURRENT and I would like to >>> see this improvement release-bound. >>> >>> I would be happy to test this on 10-STABLE if you think that this is >>> relevant. >> >> >> As noted before, unfortunately, this commit (plus its fixups) contains >> at least >> two related but distinct changes. So, to separate the wheat from the >> chaff, >> could you please try to comment out the following block in >> sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c, function >> arc_reclaim_needed: >> >> if (kmem_free_count() < zfs_arc_free_target) { >> DTRACE_PROBE2(arc__reclaim_freetarget, uint64_t, >> kmem_free_count(), uint64_t, zfs_arc_free_target); >> return (1); >> } >> >> Alternatively, I think that the same effect can be achieved by setting >> sysctl >> vfs.zfs.arc_free_target to the same value as vm.stats.vm.v_free_min. > > Thats correct that would achieve the same thing. > >> It's interesting to me whether you would still see the better >> performance or if >> that improvement would be undone. > > Indeed that would be interesting, but we might find that its quite > memory size > dependent given the scaling so confirming HW details would be nice too. > > I'd also be interested to know who wins the free race between the VM and > ARC > when using that value. > > For those following this thread but not the review, I've added some > additional > information there which you might be interested in: > https://reviews.freebsd.org/D702 > > Regards > Steve Just an update: I'm in the middle of testing this. I have to finish a large bulk build to observe the behavior one way or another. I have 32G of physical memory and 2x16G dedicated swap SSDs (L2ARC wasn't very useful, but I should probably retest this) on this machine. My ARC is usually at 14G with ~5G of MFU full of things I benefit from keeping there (port trees, base jails). Builds themselves happen in tmpfs and I usually have around 1.5G - 4G "Free" memory (unless building something like pypy). - Nikolai Lifanov From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 15:56:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC405514; Thu, 4 Sep 2014 15:56:11 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A593E1CF6; Thu, 4 Sep 2014 15:56:11 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 845D9B95E; Thu, 4 Sep 2014 11:56:10 -0400 (EDT) From: John Baldwin To: Benno Rice Subject: Re: svn commit: r271085 - head/lib/libgeom Date: Thu, 04 Sep 2014 09:51:53 -0400 Message-ID: <3000146.5OWvozVApa@ralph.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/10.0-STABLE; KDE/4.10.5; amd64; ; ) In-Reply-To: <201409040331.s843Vn5c048905@svn.freebsd.org> References: <201409040331.s843Vn5c048905@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 04 Sep 2014 11:56:10 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 15:56:12 -0000 On Thursday, September 04, 2014 03:31:49 AM Benno Rice wrote: > Author: benno > Date: Thu Sep 4 03:31:48 2014 > New Revision: 271085 > URL: http://svnweb.freebsd.org/changeset/base/271085 > > Log: > Systems with lots of geom providers can end up with a kern.geom.confxml > value too large for the buffer allocated. Work around this by retrying > a few times with larger buffer sizes. Are these systems having lots of changes to the GEOM tree while the sysctl handler is being invoked? If the tree is static, the first call with an old of NULL should return the correct length in 'l' regardless of the size as it generates the entire buffer and SYSCTL_OUT's it. (It doesn't do it piecemeal and fail on ENOMEM part way through the way some other broken sysctl handlers do.) -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 15:56:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EC87644A; Thu, 4 Sep 2014 15:56:10 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C43FD1CF4; Thu, 4 Sep 2014 15:56:10 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id BD358B9C9; Thu, 4 Sep 2014 11:56:09 -0400 (EDT) From: John Baldwin To: Don Lewis Subject: Re: svn commit: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 Date: Thu, 04 Sep 2014 09:56:05 -0400 Message-ID: <4450256.opGGntPoIk@ralph.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/10.0-STABLE; KDE/4.10.5; amd64; ; ) In-Reply-To: <201409040237.s842bLJn092072@gw.catspoiler.org> References: <201409040237.s842bLJn092072@gw.catspoiler.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 04 Sep 2014 11:56:09 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 15:56:11 -0000 On Wednesday, September 03, 2014 07:37:21 PM Don Lewis wrote: > On 4 Sep, John Baldwin wrote: > > Author: jhb > > Date: Thu Sep 4 01:46:06 2014 > > New Revision: 271076 > > URL: http://svnweb.freebsd.org/changeset/base/271076 > > > > Log: > > - Move the declaration of has_f00f_hack out of identcpu.c to machdep.c. > > That certainly brings back memories ... Hopefully not too traumatic. :-P -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 15:56:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D46216AD; Thu, 4 Sep 2014 15:56:12 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 885DD1CF8; Thu, 4 Sep 2014 15:56:12 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 94505B96C; Thu, 4 Sep 2014 11:56:11 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Subject: Re: svn commit: r271082 - in head/sys: i386/i386 x86/x86 Date: Thu, 04 Sep 2014 09:46:43 -0400 Message-ID: <2864186.iHqG44B5Un@ralph.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/10.0-STABLE; KDE/4.10.5; amd64; ; ) In-Reply-To: <201409040226.s842Q0VE016942@svn.freebsd.org> References: <201409040226.s842Q0VE016942@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 04 Sep 2014 11:56:11 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 15:56:13 -0000 On Thursday, September 04, 2014 02:26:00 AM John Baldwin wrote: > Author: jhb > Date: Thu Sep 4 02:25:59 2014 > New Revision: 271082 > URL: http://svnweb.freebsd.org/changeset/base/271082 > > Log: > - Move blacklists of broken TSCs out of the printcpuinfo() function > and into the TSC probe routine. I believe the previous code that set tsc_freq to 0 didn't fully work since the ticker was still set to use the TSC in init_TC(). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 16:05:13 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12557E1F; Thu, 4 Sep 2014 16:05:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E67D91E2E; Thu, 4 Sep 2014 16:05:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84G5CUG002944; Thu, 4 Sep 2014 16:05:12 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84G5Ctf002943; Thu, 4 Sep 2014 16:05:12 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201409041605.s84G5Ctf002943@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Thu, 4 Sep 2014 16:05:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271103 - stable/10/contrib/binutils/ld/emultempl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 16:05:13 -0000 Author: tijl Date: Thu Sep 4 16:05:12 2014 New Revision: 271103 URL: http://svnweb.freebsd.org/changeset/base/271103 Log: MFC r270757: In r253839 the default behaviour of ld(1) was changed such that all libraries that need to be linked into an executable or library have to be listed on the command line explicitly. This commit fixes a bug in ld(1) where it would scan dependencies of the libraries on the command line and link them if needed if they were also found in ld.so.cache. The important bit of the patch is the initialisation of needed.by such that libraries found by scanning dependencies are marked as such and not used in the link. The patch is a backport of binutils git commit d5c8b1f8561426b41aa5330ed60f578178fe6be2 The author gave permission to use it under GPLv2 terms. PR: 192062 Modified: stable/10/contrib/binutils/ld/emultempl/elf32.em Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/binutils/ld/emultempl/elf32.em ============================================================================== --- stable/10/contrib/binutils/ld/emultempl/elf32.em Thu Sep 4 15:11:57 2014 (r271102) +++ stable/10/contrib/binutils/ld/emultempl/elf32.em Thu Sep 4 16:05:12 2014 (r271103) @@ -541,7 +541,8 @@ EOF #endif static bfd_boolean -gld${EMULATION_NAME}_check_ld_elf_hints (const char *name, int force) +gld${EMULATION_NAME}_check_ld_elf_hints (const struct bfd_link_needed_list *l, + int force) { static bfd_boolean initialized; static char *ld_elf_hints; @@ -584,10 +585,9 @@ gld${EMULATION_NAME}_check_ld_elf_hints if (ld_elf_hints == NULL) return FALSE; - needed.by = NULL; - needed.name = name; - return gld${EMULATION_NAME}_search_needed (ld_elf_hints, & needed, - force); + needed.by = l->by; + needed.name = l->name; + return gld${EMULATION_NAME}_search_needed (ld_elf_hints, &needed, force); } EOF # FreeBSD @@ -759,7 +759,8 @@ gld${EMULATION_NAME}_parse_ld_so_conf } static bfd_boolean -gld${EMULATION_NAME}_check_ld_so_conf (const char *name, int force) +gld${EMULATION_NAME}_check_ld_so_conf (const struct bfd_link_needed_list *l, + int force) { static bfd_boolean initialized; static char *ld_so_conf; @@ -794,8 +795,8 @@ gld${EMULATION_NAME}_check_ld_so_conf (c return FALSE; - needed.by = NULL; - needed.name = name; + needed.by = l->by; + needed.name = l->name; return gld${EMULATION_NAME}_search_needed (ld_so_conf, &needed, force); } @@ -1037,7 +1038,7 @@ if [ "x${USE_LIBPATH}" = xyes ] ; then case ${target} in *-*-freebsd* | *-*-dragonfly*) cat >>e${EMULATION_NAME}.c <name, force)) + if (gld${EMULATION_NAME}_check_ld_elf_hints (l, force)) break; EOF # FreeBSD @@ -1046,7 +1047,7 @@ EOF *-*-linux-* | *-*-k*bsd*-*) # Linux cat >>e${EMULATION_NAME}.c <name, force)) + if (gld${EMULATION_NAME}_check_ld_so_conf (l, force)) break; EOF From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 16:24:19 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73C6667F; Thu, 4 Sep 2014 16:24:19 +0000 (UTC) Received: from gw.catspoiler.org (gw.catspoiler.org [75.1.14.242]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5505F10B7; Thu, 4 Sep 2014 16:24:19 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id s84GMm0g093821; Thu, 4 Sep 2014 09:22:52 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <201409041622.s84GMm0g093821@gw.catspoiler.org> Date: Thu, 4 Sep 2014 09:22:48 -0700 (PDT) From: Don Lewis Subject: Re: svn commit: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 To: jhb@FreeBSD.org In-Reply-To: <4450256.opGGntPoIk@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 16:24:19 -0000 On 4 Sep, John Baldwin wrote: > On Wednesday, September 03, 2014 07:37:21 PM Don Lewis wrote: >> On 4 Sep, John Baldwin wrote: >> > Author: jhb >> > Date: Thu Sep 4 01:46:06 2014 >> > New Revision: 271076 >> > URL: http://svnweb.freebsd.org/changeset/base/271076 >> > >> > Log: >> > - Move the declaration of has_f00f_hack out of identcpu.c to machdep.c. >> >> That certainly brings back memories ... > > Hopefully not too traumatic. :-P Not really. I remember the general sense of panic when the vulnerability was announced and then the sense of relief when the workaround was found. After that, I got lots of reminders because of the boot message. I've still got the old hardware and am often tempted to see if it will run a recent version of FreeBSD. I don't think I want to know how long it would take to run buildworld post-clang. From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 16:29:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E3F09FD for ; Thu, 4 Sep 2014 16:29:29 +0000 (UTC) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 592A3114D for ; Thu, 4 Sep 2014 16:29:29 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by gateway2.nyi.internal (Postfix) with ESMTP id 80DF420949 for ; Thu, 4 Sep 2014 12:29:27 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Thu, 04 Sep 2014 12:29:27 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id :references:to; s=smtpout; bh=oVzTDre9eLFBF/xtAkRfzhyxBgU=; b=it fypXgCIc3QqM16ujzFXW4i2C2HO0r7ZN/ubPGvLijXFQCO+Q6t/mLmBM0u6Jz1Pf iGACwtCJ2qnX4N53UysYJdAB95LKuH2qqntz3aGqsf9+RS2KQWiTqbMX4Eyvt7Zj NOzyfEjGSTgJNo5TigsQfXvHaLy1wnVBDAilvEC0Y= X-Sasl-enc: 1FZvFKuIm0OXMseHBmaOC0dF3JIQQhpfjcvhC26Q7Jlf 1409848167 Received: from mitterweile2.jeamland.net (unknown [67.182.141.248]) by mail.messagingengine.com (Postfix) with ESMTPA id 4269668008D; Thu, 4 Sep 2014 12:29:26 -0400 (EDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r271085 - head/lib/libgeom From: Benno Rice In-Reply-To: <3000146.5OWvozVApa@ralph.baldwin.cx> Date: Thu, 4 Sep 2014 09:29:24 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <10BDD3FC-EED9-4A47-BAF4-8F3C2925A3E3@FreeBSD.org> References: <201409040331.s843Vn5c048905@svn.freebsd.org> <3000146.5OWvozVApa@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 16:29:29 -0000 On Sep 4, 2014, at 6:51 AM, John Baldwin wrote: > On Thursday, September 04, 2014 03:31:49 AM Benno Rice wrote: >> Author: benno >> Date: Thu Sep 4 03:31:48 2014 >> New Revision: 271085 >> URL: http://svnweb.freebsd.org/changeset/base/271085 >>=20 >> Log: >> Systems with lots of geom providers can end up with a = kern.geom.confxml >> value too large for the buffer allocated. Work around this by = retrying >> a few times with larger buffer sizes. >=20 > Are these systems having lots of changes to the GEOM tree while the = sysctl=20 > handler is being invoked? If the tree is static, the first call with = an old=20 > of NULL should return the correct length in 'l' regardless of the size = as it=20 > generates the entire buffer and SYSCTL_OUT's it. (It doesn't do it = piecemeal=20 > and fail on ENOMEM part way through the way some other broken sysctl = handlers=20 > do.) These systems have a lot of drives in them and around the time when = we=92re trying to enumerate there can be lots of activity. In the case = where the tree hasn=92t changed we=92re not doing that much extra work = here and it saves us having to retry everything that happens around the = geom_getxml calls inside libgeom when the tree does change.= From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 16:40:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99659B0; Thu, 4 Sep 2014 16:40:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 853581352; Thu, 4 Sep 2014 16:40:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84Gesu1018828; Thu, 4 Sep 2014 16:40:54 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84GesmM018827; Thu, 4 Sep 2014 16:40:54 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201409041640.s84GesmM018827@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 4 Sep 2014 16:40:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271104 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 16:40:54 -0000 Author: imp Date: Thu Sep 4 16:40:54 2014 New Revision: 271104 URL: http://svnweb.freebsd.org/changeset/base/271104 Log: Wrap some long lines. Modified: head/sys/arm/at91/at91_pinctrl.c Modified: head/sys/arm/at91/at91_pinctrl.c ============================================================================== --- head/sys/arm/at91/at91_pinctrl.c Thu Sep 4 16:05:12 2014 (r271103) +++ head/sys/arm/at91/at91_pinctrl.c Thu Sep 4 16:40:54 2014 (r271104) @@ -138,8 +138,8 @@ at91_pinctrl_setup_dinfo(device_t dev, p } if (OF_searchencprop(OF_node_from_xref(iparent), "#interrupt-cells", &icells, sizeof(icells)) == -1) { - device_printf(dev, "Missing #interrupt-cells property, " - "assuming <1>\n"); + device_printf(dev, "Missing #interrupt-cells property," + " assuming <1>\n"); icells = 1; } if (icells < 1 || icells > nintr) { @@ -388,19 +388,22 @@ pinctrl_walk_tree(device_t bus, phandle_ OF_getprop(node, "status", status, sizeof(status)); OF_getprop(node, "name", name, sizeof(name)); if (strcmp(status, "okay") != 0) { -// printf("pinctrl: omitting node %s since it isn't active\n", name); +// printf("pinctrl: skipping node %s status %s\n", name, +// status); continue; } len = OF_getencprop(node, "pinctrl-0", pinctrl, sizeof(pinctrl)); if (len <= 0) { -// printf("pinctrl: no pinctrl-0 property for node %s, omitting\n", name); +// printf("pinctrl: skipping node %s no pinctrl-0\n", +// name, status); continue; } len /= sizeof(phandle_t); printf("pinctrl: Found active node %s\n", name); for (i = 0; i < len; i++) { scratch = OF_node_from_xref(pinctrl[i]); - npins = OF_getencprop(scratch, "atmel,pins", pins, sizeof(pins)); + npins = OF_getencprop(scratch, "atmel,pins", pins, + sizeof(pins)); if (npins <= 0) { printf("We're doing it wrong %s\n", name); continue; @@ -408,29 +411,40 @@ pinctrl_walk_tree(device_t bus, phandle_ memset(name, 0, sizeof(name)); OF_getprop(scratch, "name", name, sizeof(name)); npins /= (4 * 4); - printf("----> need to cope with %d more pins for %s\n", npins, name); + printf("----> need to cope with %d more pins for %s\n", + npins, name); for (j = 0; j < npins; j++) { uint32_t unit = pins[j * 4]; uint32_t pin = pins[j * 4 + 1]; uint32_t periph = pins[j * 4 + 2]; uint32_t flags = pins[j * 4 + 3]; - uint32_t pio = (0xfffffff & sc->ranges[0].bus) + 0x200 * unit; - printf("P%c%d %s %#x\n", unit + 'A', pin, periphs[periph], - flags); + uint32_t pio; + + pio = (0xfffffff & sc->ranges[0].bus) + + 0x200 * unit; + printf("P%c%d %s %#x\n", unit + 'A', pin, + periphs[periph], flags); switch (periph) { case 0: at91_pio_use_gpio(pio, 1u << pin); - at91_pio_gpio_pullup(pio, 1u << pin, !!(flags & 1)); - at91_pio_gpio_high_z(pio, 1u << pin, !!(flags & 2)); - at91_pio_gpio_set_deglitch(pio, 1u << pin, !!(flags & 4)); - // at91_pio_gpio_pulldown(pio, 1u << pin, !!(flags & 8)); - // at91_pio_gpio_dis_schmidt(pio, 1u << pin, !!(flags & 16)); + at91_pio_gpio_pullup(pio, 1u << pin, + !!(flags & 1)); + at91_pio_gpio_high_z(pio, 1u << pin, + !!(flags & 2)); + at91_pio_gpio_set_deglitch(pio, + 1u << pin, !!(flags & 4)); +// at91_pio_gpio_pulldown(pio, 1u << pin, +// !!(flags & 8)); +// at91_pio_gpio_dis_schmidt(pio, +// 1u << pin, !!(flags & 16)); break; case 1: - at91_pio_use_periph_a(pio, 1u << pin, flags); + at91_pio_use_periph_a(pio, 1u << pin, + flags); break; case 2: - at91_pio_use_periph_b(pio, 1u << pin, flags); + at91_pio_use_periph_b(pio, 1u << pin, + flags); break; } } @@ -493,8 +507,8 @@ static driver_t at91_pinctrl_driver = { static devclass_t at91_pinctrl_devclass; -EARLY_DRIVER_MODULE(at91_pinctrl, simplebus, at91_pinctrl_driver, at91_pinctrl_devclass, - NULL, NULL, BUS_PASS_BUS); +EARLY_DRIVER_MODULE(at91_pinctrl, simplebus, at91_pinctrl_driver, + at91_pinctrl_devclass, NULL, NULL, BUS_PASS_BUS); /* * dummy driver to force pass BUS_PASS_PINMUX to happen. @@ -520,5 +534,5 @@ static driver_t at91_pingroup_driver = { static devclass_t at91_pingroup_devclass; -EARLY_DRIVER_MODULE(at91_pingroup, at91_pinctrl, at91_pingroup_driver, at91_pingroup_devclass, - NULL, NULL, BUS_PASS_PINMUX); +EARLY_DRIVER_MODULE(at91_pingroup, at91_pinctrl, at91_pingroup_driver, + at91_pingroup_devclass, NULL, NULL, BUS_PASS_PINMUX); From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 16:51:43 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 5D1B7454; Thu, 4 Sep 2014 16:51:43 +0000 (UTC) Date: Thu, 4 Sep 2014 16:51:43 +0000 From: Alexey Dokuchaev To: Don Lewis Subject: Re: svn commit: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 Message-ID: <20140904165143.GA81805@FreeBSD.org> References: <4450256.opGGntPoIk@ralph.baldwin.cx> <201409041622.s84GMm0g093821@gw.catspoiler.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201409041622.s84GMm0g093821@gw.catspoiler.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, jhb@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 16:51:43 -0000 On Thu, Sep 04, 2014 at 09:22:48AM -0700, Don Lewis wrote: > I've still got the old hardware and am often tempted to see if it will > run a recent version of FreeBSD. I don't think I want to know how long > it would take to run buildworld post-clang. My router machine at home is Mendocino-based, runs 9-STABLE flawlessly, not sure how long does it take to do buildworld (I don't disable Clang). I have a couple of P55-based mobos, but never bothered to install our fresh -CURRENT on them. I guess I should, just to see if we still rock. ;-) ./danfe From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 16:51:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 596B8577; Thu, 4 Sep 2014 16:51:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C6BF14BD; Thu, 4 Sep 2014 16:51:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84Gpk7e027330; Thu, 4 Sep 2014 16:51:46 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84Gpj3s027328; Thu, 4 Sep 2014 16:51:45 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409041651.s84Gpj3s027328@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 16:51:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271105 - stable/10/sys/dev/fb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 16:51:46 -0000 Author: emaste Date: Thu Sep 4 16:51:45 2014 New Revision: 271105 URL: http://svnweb.freebsd.org/changeset/base/271105 Log: MFC r260047: Clean up license text - Renumber Regents clauses - Remove clause 3 and 4 from TNF license, following upstream change Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/fb/boot_font.c stable/10/sys/dev/fb/gallant12x22.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/fb/boot_font.c ============================================================================== --- stable/10/sys/dev/fb/boot_font.c Thu Sep 4 16:40:54 2014 (r271104) +++ stable/10/sys/dev/fb/boot_font.c Thu Sep 4 16:51:45 2014 (r271105) @@ -13,13 +13,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED Modified: stable/10/sys/dev/fb/gallant12x22.c ============================================================================== --- stable/10/sys/dev/fb/gallant12x22.c Thu Sep 4 16:40:54 2014 (r271104) +++ stable/10/sys/dev/fb/gallant12x22.c Thu Sep 4 16:51:45 2014 (r271105) @@ -17,7 +17,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 16:55:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FCDC89C; Thu, 4 Sep 2014 16:55:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AD241511; Thu, 4 Sep 2014 16:55:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84Gt2Z3027847; Thu, 4 Sep 2014 16:55:02 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84Gt2QI027846; Thu, 4 Sep 2014 16:55:02 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201409041655.s84Gt2QI027846@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Thu, 4 Sep 2014 16:55:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271106 - stable/10/share/examples/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 16:55:02 -0000 Author: rodrigc Date: Thu Sep 4 16:55:01 2014 New Revision: 271106 URL: http://svnweb.freebsd.org/changeset/base/271106 Log: MFC r270512 r270513 r270754 - add comments which describe exit status codes of /usr/sbin/bhyve - move bhyvectl --destroy outside of the while loop - Use "file -s" so that we can run vmrun.sh against special devces such as /dev/md memory files systems or zvols Modified: stable/10/share/examples/bhyve/vmrun.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/share/examples/bhyve/vmrun.sh ============================================================================== --- stable/10/share/examples/bhyve/vmrun.sh Thu Sep 4 16:51:45 2014 (r271105) +++ stable/10/share/examples/bhyve/vmrun.sh Thu Sep 4 16:55:01 2014 (r271106) @@ -173,13 +173,14 @@ echo "Launching virtual machine \"$vmnam virtio_diskdev="$disk_dev0" +${BHYVECTL} --vm=${vmname} --destroy > /dev/null 2>&1 + while [ 1 ]; do - ${BHYVECTL} --vm=${vmname} --destroy > /dev/null 2>&1 - file ${virtio_diskdev} | grep "boot sector" > /dev/null + file -s ${virtio_diskdev} | grep "boot sector" > /dev/null rc=$? if [ $rc -ne 0 ]; then - file ${virtio_diskdev} | grep ": Unix Fast File sys" > /dev/null + file -s ${virtio_diskdev} | grep ": Unix Fast File sys" > /dev/null rc=$? fi if [ $rc -ne 0 ]; then @@ -237,6 +238,14 @@ while [ 1 ]; do -l com1,${console} \ ${installer_opt} \ ${vmname} + + # bhyve returns the following status codes: + # 0 - VM has been reset + # 1 - VM has been powered off + # 2 - VM has been halted + # 3 - VM generated a triple fault + # all other non-zero status codes are errors + # if [ $? -ne 0 ]; then break fi From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 17:05:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D640DCA; Thu, 4 Sep 2014 17:05:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 19429179D; Thu, 4 Sep 2014 17:05:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84H5v6w032741; Thu, 4 Sep 2014 17:05:57 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84H5vsE032740; Thu, 4 Sep 2014 17:05:57 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409041705.s84H5vsE032740@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 4 Sep 2014 17:05:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271107 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 17:05:58 -0000 Author: glebius Date: Thu Sep 4 17:05:57 2014 New Revision: 271107 URL: http://svnweb.freebsd.org/changeset/base/271107 Log: Fixes for tcp_respond() comment. Modified: head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Thu Sep 4 16:55:01 2014 (r271106) +++ head/sys/netinet/tcp_subr.c Thu Sep 4 17:05:57 2014 (r271107) @@ -539,16 +539,16 @@ tcpip_maketemplate(struct inpcb *inp) /* * Send a single message to the TCP at address specified by * the given TCP/IP header. If m == NULL, then we make a copy - * of the tcpiphdr at ti and send directly to the addressed host. + * of the tcpiphdr at th and send directly to the addressed host. * This is used to force keep alive messages out using the TCP * template for a connection. If flags are given then we send - * a message back to the TCP which originated the * segment ti, + * a message back to the TCP which originated the segment th, * and discard the mbuf containing it and any other attached mbufs. * * In any case the ack and sequence number of the transmitted * segment are as specified by the parameters. * - * NOTE: If m != NULL, then ti must point to *inside* the mbuf. + * NOTE: If m != NULL, then th must point to *inside* the mbuf. */ void tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m, From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 17:11:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACCFA203; Thu, 4 Sep 2014 17:11:53 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6C5F918A9; Thu, 4 Sep 2014 17:11:53 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s84HBqJV099263 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 4 Sep 2014 10:11:52 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s84HBq1W099262; Thu, 4 Sep 2014 10:11:52 -0700 (PDT) (envelope-from jmg) Date: Thu, 4 Sep 2014 10:11:52 -0700 From: John-Mark Gurney To: Gleb Smirnoff Subject: Re: svn commit: r270999 - head/sys/kern Message-ID: <20140904171151.GF82175@funkthat.com> References: <201409030814.s838E7A2084257@svn.freebsd.org> <20140903085523.GB13871@dft-labs.eu> <20140903094916.GO7693@FreeBSD.org> <20140903191028.GG71691@funkthat.com> <20140904091844.GC7693@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140904091844.GC7693@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Thu, 04 Sep 2014 10:11:52 -0700 (PDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Mateusz Guzik , kib@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 17:11:53 -0000 Gleb Smirnoff wrote this message on Thu, Sep 04, 2014 at 13:18 +0400: > On Wed, Sep 03, 2014 at 12:10:28PM -0700, John-Mark Gurney wrote: > J> > M> > + if (p->p_pptr) { > J> > M> > kp->ki_ppid = proc_realparent(p)->p_pid; > J> > M> > - if (p->p_flag & P_TRACED) > J> > M> > - kp->ki_tracer = p->p_pptr->p_pid; > J> > M> > + if (p->p_flag & P_TRACED) > J> > M> > + kp->ki_tracer = p->p_pptr->p_pid; > J> > M> > + } > J> > M> > } > J> > M> > > J> > M> > /* > J> > M> > > J> > M> > J> > M> p_pptr must be non-NULL if P_TRACED is set. If there is no way to > J> > M> annotate it for coverity, this change deserves a comment in the code > J> > M> (and in retrospect previous code should have had appropriate comment as > J> > M> well). > J> > > J> > Thanks for explanation. > J> > > J> > I'd suggest to leave the change in, since now it is a micro-micro-optimization :) > J> > J> If you must leave it in, then at least compare the pointer against > J> NULL, and collapse two if statements into one... > J> > J> We should never introduce new pointer checks that aren't against NULL... > > I don't see how two if statements can be collapsed? We need to assign > ki_ppid regardless of P_TRACED flag. Sorry, misread the diff, you are correct... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 17:19:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95826631; Thu, 4 Sep 2014 17:19:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81E5C192C; Thu, 4 Sep 2014 17:19:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84HJGfX038116; Thu, 4 Sep 2014 17:19:16 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84HJGYi038115; Thu, 4 Sep 2014 17:19:16 GMT (envelope-from se@FreeBSD.org) Message-Id: <201409041719.s84HJGYi038115@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Thu, 4 Sep 2014 17:19:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271108 - head/tools/tools/vt/keymaps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 17:19:16 -0000 Author: se Date: Thu Sep 4 17:19:16 2014 New Revision: 271108 URL: http://svnweb.freebsd.org/changeset/base/271108 Log: Fix debug output that has erroneously been committed with the last update. Obtained from: Jan Beich MFC after: 3 days Modified: head/tools/tools/vt/keymaps/convert-keymap.pl Modified: head/tools/tools/vt/keymaps/convert-keymap.pl ============================================================================== --- head/tools/tools/vt/keymaps/convert-keymap.pl Thu Sep 4 17:05:57 2014 (r271107) +++ head/tools/tools/vt/keymaps/convert-keymap.pl Thu Sep 4 17:19:16 2014 (r271108) @@ -51,7 +51,7 @@ sub local_to_UCS_code my $ucs_char = ord(Encode::decode("UTF-8", local_to_UCS_string($char))); - $current_char = lc(chr($ucs_char)), print("SETCUR: $ucs_char\n") + $current_char = lc(chr($ucs_char)) if $current_char eq ""; $ucs_char = 0x20ac # replace with Euro character From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 17:19:47 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C36B67AB; Thu, 4 Sep 2014 17:19:47 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 859451940; Thu, 4 Sep 2014 17:19:47 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s84HJkc1099374 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 4 Sep 2014 10:19:46 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s84HJkqQ099373; Thu, 4 Sep 2014 10:19:46 -0700 (PDT) (envelope-from jmg) Date: Thu, 4 Sep 2014 10:19:46 -0700 From: John-Mark Gurney To: Don Lewis Subject: Re: svn commit: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 Message-ID: <20140904171946.GG82175@funkthat.com> References: <4450256.opGGntPoIk@ralph.baldwin.cx> <201409041622.s84GMm0g093821@gw.catspoiler.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201409041622.s84GMm0g093821@gw.catspoiler.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Thu, 04 Sep 2014 10:19:46 -0700 (PDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, jhb@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 17:19:47 -0000 Don Lewis wrote this message on Thu, Sep 04, 2014 at 09:22 -0700: > On 4 Sep, John Baldwin wrote: > > On Wednesday, September 03, 2014 07:37:21 PM Don Lewis wrote: > >> On 4 Sep, John Baldwin wrote: > >> > Author: jhb > >> > Date: Thu Sep 4 01:46:06 2014 > >> > New Revision: 271076 > >> > URL: http://svnweb.freebsd.org/changeset/base/271076 > >> > > >> > Log: > >> > - Move the declaration of has_f00f_hack out of identcpu.c to machdep.c. > >> > >> That certainly brings back memories ... > > > > Hopefully not too traumatic. :-P > > Not really. I remember the general sense of panic when the > vulnerability was announced and then the sense of relief when the > workaround was found. After that, I got lots of reminders because > of the boot message. > > I've still got the old hardware and am often tempted to see if it will > run a recent version of FreeBSD. I don't think I want to know how long > it would take to run buildworld post-clang. Almost as old: FreeBSD 11.0-CURRENT #0 r266964:267061M: Wed Jun 11 15:35:27 PDT 2014 jmg@carbon.funkthat.com:/usr/obj/i386.i386/usr/src/sys/serbox i386 FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 CPU: AMD-K6tm w/ multimedia extensions (200.46-MHz 586-class CPU) Origin="AuthenticAMD" Id=0x562 Family=0x5 Model=0x6 Stepping=2 Features=0x8001bf AMD Features=0x400<> Works great... :) Though I'll admit I didn't buildworld on this, but another newer machine and then dd'd an image onto a CF card.. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 17:21:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7324FA18; Thu, 4 Sep 2014 17:21:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E82719FB; Thu, 4 Sep 2014 17:21:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84HLt6U041840; Thu, 4 Sep 2014 17:21:55 GMT (envelope-from se@FreeBSD.org) Received: (from se@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84HLt6r041839; Thu, 4 Sep 2014 17:21:55 GMT (envelope-from se@FreeBSD.org) Message-Id: <201409041721.s84HLt6r041839@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: se set sender to se@FreeBSD.org using -f From: Stefan Esser Date: Thu, 4 Sep 2014 17:21:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271109 - stable/10/tools/tools/vt/keymaps X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 17:21:55 -0000 Author: se Date: Thu Sep 4 17:21:54 2014 New Revision: 271109 URL: http://svnweb.freebsd.org/changeset/base/271109 Log: Fix debug output that has erroneously been committed with the last update. Obtained from: Jan Beich Modified: stable/10/tools/tools/vt/keymaps/convert-keymap.pl Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/tools/vt/keymaps/convert-keymap.pl ============================================================================== --- stable/10/tools/tools/vt/keymaps/convert-keymap.pl Thu Sep 4 17:19:16 2014 (r271108) +++ stable/10/tools/tools/vt/keymaps/convert-keymap.pl Thu Sep 4 17:21:54 2014 (r271109) @@ -51,7 +51,7 @@ sub local_to_UCS_code my $ucs_char = ord(Encode::decode("UTF-8", local_to_UCS_string($char))); - $current_char = lc(chr($ucs_char)), print("SETCUR: $ucs_char\n") + $current_char = lc(chr($ucs_char)) if $current_char eq ""; $ucs_char = 0x20ac # replace with Euro character From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 17:22:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 316EAB5A; Thu, 4 Sep 2014 17:22:52 +0000 (UTC) Received: from mailout02.t-online.de (mailout02.t-online.de [194.25.134.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6A1DB1A0E; Thu, 4 Sep 2014 17:22:51 +0000 (UTC) Received: from fwd03.aul.t-online.de (fwd03.aul.t-online.de [172.20.27.148]) by mailout02.t-online.de (Postfix) with SMTP id 31F9840E502; Thu, 4 Sep 2014 19:22:43 +0200 (CEST) Received: from [192.168.119.33] (VyC95ZZYZhvspndnCSeyqB1zwNcDQvO6SGYscLGaFjXdo60v3WZnbuGlzAop1cWw4t@[84.154.101.219]) by fwd03.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1XPak0-3K8d7I0; Thu, 4 Sep 2014 19:22:36 +0200 Message-ID: <54089FD4.9030002@freebsd.org> Date: Thu, 04 Sep 2014 19:22:28 +0200 From: Stefan Esser User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: Jan Beich Subject: Re: svn commit: r270232 - head/tools/tools/vt/keymaps References: <201408201707.s7KH7gtX009303@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-ID: VyC95ZZYZhvspndnCSeyqB1zwNcDQvO6SGYscLGaFjXdo60v3WZnbuGlzAop1cWw4t X-TOI-MSGID: 267dcd3f-7457-46c1-8b49-67ae1781ae1e Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 17:22:52 -0000 Am 04.09.2014 um 16:52 schrieb Jan Beich: > Stefan Esser writes: > >> Author: se >> Date: Wed Aug 20 17:07:41 2014 >> New Revision: 270232 >> URL: http://svnweb.freebsd.org/changeset/base/270232 >> >> Log: >> The conversion tools have been further improved and some erroneous >> conversions have been detected and fixed. > [...] >> sub local_to_UCS_code >> { >> my ($char) = @_; >> >> - return prettyprint_token(ord(Encode::decode("UTF-8", local_to_UCS_string($char)))); >> + my $ucs_char = ord(Encode::decode("UTF-8", local_to_UCS_string($char))); >> + >> + $current_char = lc(chr($ucs_char)), print("SETCUR: $ucs_char\n") >> + if $current_char eq ""; > > The script now emits |SETCUR: 123| lines that kbdcontrol(1) doesn't like. > Either removing debug |print| or adding STDERR seems to fix. Hi Jan, this is (obviously) a left-over from some tests, which I have now removed again. Thanks for reporting! Best regards, STefan From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 17:31:38 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A09827B; Thu, 4 Sep 2014 17:31:38 +0000 (UTC) Received: from gw.catspoiler.org (cl-1657.chi-02.us.sixxs.net [IPv6:2001:4978:f:678::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47F061AB2; Thu, 4 Sep 2014 17:31:38 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id s84HVOv8093974; Thu, 4 Sep 2014 10:31:28 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <201409041731.s84HVOv8093974@gw.catspoiler.org> Date: Thu, 4 Sep 2014 10:31:24 -0700 (PDT) From: Don Lewis Subject: Re: svn commit: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 To: danfe@FreeBSD.org In-Reply-To: <20140904165143.GA81805@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, jhb@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 17:31:38 -0000 On 4 Sep, Alexey Dokuchaev wrote: > On Thu, Sep 04, 2014 at 09:22:48AM -0700, Don Lewis wrote: >> I've still got the old hardware and am often tempted to see if it will >> run a recent version of FreeBSD. I don't think I want to know how long >> it would take to run buildworld post-clang. > > My router machine at home is Mendocino-based, runs 9-STABLE flawlessly, not > sure how long does it take to do buildworld (I don't disable Clang). My first home machine had a Pentium II CPU. I've got a fair amount of retired Pentium III hardware around still, mostly socket 370 (both Coppermine and Tualatin), but there might be some slot 1 stuff as well. My firewall is still running on a Via C3 CPU in a socket 370, but I don't run buildworld on it. I just use PXE to reinstall for upgrades. > I have a couple of P55-based mobos, but never bothered to install our fresh > -CURRENT on them. I guess I should, just to see if we still rock. ;-) RAM size is the probably the biggest issue. Also, I think all of my boards use the Dallas RTC chip with builtin battery. These boards are approaching twenty years old and Li battery shelf life is only about ten years. Unfortunately this chip is soldered to the motherboard, which makes either the chip replacement or the battery replacement hack more difficult. From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 17:36:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93419553; Thu, 4 Sep 2014 17:36:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F9A31BAF; Thu, 4 Sep 2014 17:36:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84HaMUY047390; Thu, 4 Sep 2014 17:36:22 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84HaMBc047389; Thu, 4 Sep 2014 17:36:22 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201409041736.s84HaMBc047389@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 4 Sep 2014 17:36:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271110 - head/lib/libc/locale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 17:36:22 -0000 Author: pfg Date: Thu Sep 4 17:36:21 2014 New Revision: 271110 URL: http://svnweb.freebsd.org/changeset/base/271110 Log: libc/locale: Remove a wrong comma. This only had some effect when debugging. Obtained from: DragonflyBSD MFC after: 3 days Modified: head/lib/libc/locale/lmonetary.c Modified: head/lib/libc/locale/lmonetary.c ============================================================================== --- head/lib/libc/locale/lmonetary.c Thu Sep 4 17:21:54 2014 (r271109) +++ head/lib/libc/locale/lmonetary.c Thu Sep 4 17:36:21 2014 (r271110) @@ -192,7 +192,7 @@ printf( "int_curr_symbol = %s\n" "n_cs_precedes = %d\n" "n_sep_by_space = %d\n" "p_sign_posn = %d\n" - "n_sign_posn = %d\n", + "n_sign_posn = %d\n" "int_p_cs_precedes = %d\n" "int_p_sep_by_space = %d\n" "int_n_cs_precedes = %d\n" From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 17:41:41 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD2058F9; Thu, 4 Sep 2014 17:41:41 +0000 (UTC) Received: from gw.catspoiler.org (cl-1657.chi-02.us.sixxs.net [IPv6:2001:4978:f:678::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49DF81CAD; Thu, 4 Sep 2014 17:41:41 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id s84HfTZd093999; Thu, 4 Sep 2014 10:41:33 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <201409041741.s84HfTZd093999@gw.catspoiler.org> Date: Thu, 4 Sep 2014 10:41:29 -0700 (PDT) From: Don Lewis Subject: Re: svn commit: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 To: jmg@funkthat.com In-Reply-To: <20140904171946.GG82175@funkthat.com> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, jhb@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 17:41:41 -0000 On 4 Sep, John-Mark Gurney wrote: > Don Lewis wrote this message on Thu, Sep 04, 2014 at 09:22 -0700: >> On 4 Sep, John Baldwin wrote: >> > On Wednesday, September 03, 2014 07:37:21 PM Don Lewis wrote: >> >> On 4 Sep, John Baldwin wrote: >> >> > Author: jhb >> >> > Date: Thu Sep 4 01:46:06 2014 >> >> > New Revision: 271076 >> >> > URL: http://svnweb.freebsd.org/changeset/base/271076 >> >> > >> >> > Log: >> >> > - Move the declaration of has_f00f_hack out of identcpu.c to machdep.c. >> >> >> >> That certainly brings back memories ... >> > >> > Hopefully not too traumatic. :-P >> >> Not really. I remember the general sense of panic when the >> vulnerability was announced and then the sense of relief when the >> workaround was found. After that, I got lots of reminders because >> of the boot message. >> >> I've still got the old hardware and am often tempted to see if it will >> run a recent version of FreeBSD. I don't think I want to know how long >> it would take to run buildworld post-clang. > > Almost as old: > FreeBSD 11.0-CURRENT #0 r266964:267061M: Wed Jun 11 15:35:27 PDT 2014 > jmg@carbon.funkthat.com:/usr/obj/i386.i386/usr/src/sys/serbox i386 > FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 > CPU: AMD-K6tm w/ multimedia extensions (200.46-MHz 586-class CPU) > Origin="AuthenticAMD" Id=0x562 Family=0x5 Model=0x6 Stepping=2 > Features=0x8001bf > AMD Features=0x400<> > > Works great... :) > > Though I'll admit I didn't buildworld on this, but another newer > machine and then dd'd an image onto a CF card.. How much RAM? I think my boards are using 16 MB DIMMs. Some have two and some have four. It's even ECC RAM. I suspect that ZFS is out of the question, though ... From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 18:13:44 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: by hub.freebsd.org (Postfix, from userid 1033) id F067A57A; Thu, 4 Sep 2014 18:13:44 +0000 (UTC) Date: Thu, 4 Sep 2014 18:13:44 +0000 From: Alexey Dokuchaev To: Don Lewis Subject: Re: svn commit: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 Message-ID: <20140904181344.GA8688@FreeBSD.org> References: <20140904165143.GA81805@FreeBSD.org> <201409041731.s84HVOv8093974@gw.catspoiler.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201409041731.s84HVOv8093974@gw.catspoiler.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, jhb@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:13:45 -0000 On Thu, Sep 04, 2014 at 10:31:24AM -0700, Don Lewis wrote: > On 4 Sep, Alexey Dokuchaev wrote: > > I have a couple of P55-based mobos, but never bothered to install our > > fresh -CURRENT on them. I guess I should, just to see if we still rock. > > RAM size is the probably the biggest issue. [...] Moments like this I thank that FreeBSD is pretty much the same from the user POV, be it now or 15 years ago. It's still the same console-based install process, with no one pouring full X11 stack on you by default. Not sure how much RAM is required these days to boot into single user and gpart && untar the kernel+base distsets to obtain a minimal working system, but should not be too much. Did anyone try to find out the minimum? 16MB? 32MB? ./danfe P.S. ZFS, well yes, is probably out of question. But UFS is very good FS even by modern standards (no pun intended). From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 18:15:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72C126D6; Thu, 4 Sep 2014 18:15:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C66D109F; Thu, 4 Sep 2014 18:15:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84IFbfs067084; Thu, 4 Sep 2014 18:15:37 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84IFawj067081; Thu, 4 Sep 2014 18:15:36 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409041815.s84IFawj067081@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 18:15:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271111 - in stable/10/sys: conf powerpc/conf powerpc/ps3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:15:37 -0000 Author: emaste Date: Thu Sep 4 18:15:36 2014 New Revision: 271111 URL: http://svnweb.freebsd.org/changeset/base/271111 Log: MFC PS3 vt(4) console support r265871 (nwhitehorn): Move the PS3 framebuffer console to use vt instead of syscons and adjust GENERIC64 for PowerPC to use vt with it. Much to my chagrin, PS3 support seems to have bitrotted somewhat since the last time I tried it. ehci panics on attach and interrupt handling seems to be faulty. This should be fixed soon... r269783 (dumbbell): Fix two files forgotten in r269783 (vt_generate_cons_palette) r268895 (nwhitehorn): Enable X11 via xf86-video-scfb on the Playstation 3. This commit made from an xterm running for the first time on said Playstation. Approved by: nwhitehorn Relnotes: yes Modified: stable/10/sys/conf/files.powerpc stable/10/sys/powerpc/conf/GENERIC64 stable/10/sys/powerpc/ps3/ps3_syscons.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files.powerpc ============================================================================== --- stable/10/sys/conf/files.powerpc Thu Sep 4 17:36:21 2014 (r271110) +++ stable/10/sys/conf/files.powerpc Thu Sep 4 18:15:36 2014 (r271111) @@ -221,8 +221,8 @@ powerpc/ps3/ps3bus.c optional ps3 powerpc/ps3/ps3cdrom.c optional ps3 scbus powerpc/ps3/ps3disk.c optional ps3 powerpc/ps3/ps3pic.c optional ps3 -powerpc/ps3/ps3_syscons.c optional ps3 sc -powerpc/ps3/ps3-hvcall.S optional ps3 sc +powerpc/ps3/ps3_syscons.c optional ps3 vt +powerpc/ps3/ps3-hvcall.S optional ps3 powerpc/pseries/phyp-hvcall.S optional pseries powerpc64 powerpc/pseries/mmu_phyp.c optional pseries powerpc64 powerpc/pseries/phyp_console.c optional pseries powerpc64 uart Modified: stable/10/sys/powerpc/conf/GENERIC64 ============================================================================== --- stable/10/sys/powerpc/conf/GENERIC64 Thu Sep 4 17:36:21 2014 (r271110) +++ stable/10/sys/powerpc/conf/GENERIC64 Thu Sep 4 18:15:36 2014 (r271111) @@ -111,12 +111,9 @@ device sa # Sequential Access (tape et device cd # CD device pass # Passthrough device (direct ATA/SCSI access) -# syscons is the default console driver, resembling an SCO console -device sc +# vt is the default console driver, resembling an SCO console +device vt # Core console driver device kbdmux -options SC_OFWFB # OFW frame buffer -options SC_DFLT_FONT # compile font in -makeoptions SC_DFLT_FONT=cp437 # Serial (COM) ports device scc Modified: stable/10/sys/powerpc/ps3/ps3_syscons.c ============================================================================== --- stable/10/sys/powerpc/ps3/ps3_syscons.c Thu Sep 4 17:36:21 2014 (r271110) +++ stable/10/sys/powerpc/ps3/ps3_syscons.c Thu Sep 4 18:15:36 2014 (r271111) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2003 Peter Grehan + * Copyright (c) 2011-2014 Nathan Whitehorn * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,31 +29,22 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include #include #include #include #include -#include -#include -#include #include -#include #include #include -#include -#include #include #include -#include - -#include -#include +#include +#include +#include #include "ps3-hvcall.h" @@ -65,62 +56,12 @@ __FBSDID("$FreeBSD$"); #define L1GPU_DISPLAY_SYNC_VSYNC 2 #define L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP 0x0102 -extern u_char dflt_font_16[]; -extern u_char dflt_font_14[]; -extern u_char dflt_font_8[]; - -static int ps3fb_configure(int flags); +static vd_init_t ps3fb_init; +static vd_probe_t ps3fb_probe; void ps3fb_remap(void); -static vi_probe_t ps3fb_probe; -static vi_init_t ps3fb_init; -static vi_get_info_t ps3fb_get_info; -static vi_query_mode_t ps3fb_query_mode; -static vi_set_mode_t ps3fb_set_mode; -static vi_save_font_t ps3fb_save_font; -static vi_load_font_t ps3fb_load_font; -static vi_show_font_t ps3fb_show_font; -static vi_save_palette_t ps3fb_save_palette; -static vi_load_palette_t ps3fb_load_palette; -static vi_set_border_t ps3fb_set_border; -static vi_save_state_t ps3fb_save_state; -static vi_load_state_t ps3fb_load_state; -static vi_set_win_org_t ps3fb_set_win_org; -static vi_read_hw_cursor_t ps3fb_read_hw_cursor; -static vi_set_hw_cursor_t ps3fb_set_hw_cursor; -static vi_set_hw_cursor_shape_t ps3fb_set_hw_cursor_shape; -static vi_blank_display_t ps3fb_blank_display; -static vi_mmap_t ps3fb_mmap; -static vi_ioctl_t ps3fb_ioctl; -static vi_clear_t ps3fb_clear; -static vi_fill_rect_t ps3fb_fill_rect; -static vi_bitblt_t ps3fb_bitblt; -static vi_diag_t ps3fb_diag; -static vi_save_cursor_palette_t ps3fb_save_cursor_palette; -static vi_load_cursor_palette_t ps3fb_load_cursor_palette; -static vi_copy_t ps3fb_copy; -static vi_putp_t ps3fb_putp; -static vi_putc_t ps3fb_putc; -static vi_puts_t ps3fb_puts; -static vi_putm_t ps3fb_putm; - struct ps3fb_softc { - video_adapter_t sc_va; - struct cdev *sc_si; - int sc_console; - - intptr_t sc_addr; - int sc_height; - int sc_width; - int sc_stride; - int sc_ncol; - int sc_nrow; - - int sc_xmargin; - int sc_ymargin; - - u_char *sc_font; - int sc_font_height; + struct fb_info fb_info; uint64_t sc_fbhandle; uint64_t sc_fbcontext; @@ -130,106 +71,24 @@ struct ps3fb_softc { uint64_t sc_reports_size; }; -static video_switch_t ps3fbvidsw = { - .probe = ps3fb_probe, - .init = ps3fb_init, - .get_info = ps3fb_get_info, - .query_mode = ps3fb_query_mode, - .set_mode = ps3fb_set_mode, - .save_font = ps3fb_save_font, - .load_font = ps3fb_load_font, - .show_font = ps3fb_show_font, - .save_palette = ps3fb_save_palette, - .load_palette = ps3fb_load_palette, - .set_border = ps3fb_set_border, - .save_state = ps3fb_save_state, - .load_state = ps3fb_load_state, - .set_win_org = ps3fb_set_win_org, - .read_hw_cursor = ps3fb_read_hw_cursor, - .set_hw_cursor = ps3fb_set_hw_cursor, - .set_hw_cursor_shape = ps3fb_set_hw_cursor_shape, - .blank_display = ps3fb_blank_display, - .mmap = ps3fb_mmap, - .ioctl = ps3fb_ioctl, - .clear = ps3fb_clear, - .fill_rect = ps3fb_fill_rect, - .bitblt = ps3fb_bitblt, - .diag = ps3fb_diag, - .save_cursor_palette = ps3fb_save_cursor_palette, - .load_cursor_palette = ps3fb_load_cursor_palette, - .copy = ps3fb_copy, - .putp = ps3fb_putp, - .putc = ps3fb_putc, - .puts = ps3fb_puts, - .putm = ps3fb_putm, -}; - -VIDEO_DRIVER(ps3fb, ps3fbvidsw, ps3fb_configure); - -extern sc_rndr_sw_t txtrndrsw; -RENDERER(ps3fb, 0, txtrndrsw, gfb_set); - -RENDERER_MODULE(ps3fb, gfb_set); - -/* - * Define the iso6429-1983 colormap - */ -static struct { - uint8_t red; - uint8_t green; - uint8_t blue; -} ps3fb_cmap[16] = { /* # R G B Color */ - /* - - - - ----- */ - { 0x00, 0x00, 0x00 }, /* 0 0 0 0 Black */ - { 0x00, 0x00, 0xaa }, /* 1 0 0 2/3 Blue */ - { 0x00, 0xaa, 0x00 }, /* 2 0 2/3 0 Green */ - { 0x00, 0xaa, 0xaa }, /* 3 0 2/3 2/3 Cyan */ - { 0xaa, 0x00, 0x00 }, /* 4 2/3 0 0 Red */ - { 0xaa, 0x00, 0xaa }, /* 5 2/3 0 2/3 Magenta */ - { 0xaa, 0x55, 0x00 }, /* 6 2/3 1/3 0 Brown */ - { 0xaa, 0xaa, 0xaa }, /* 7 2/3 2/3 2/3 White */ - { 0x55, 0x55, 0x55 }, /* 8 1/3 1/3 1/3 Gray */ - { 0x55, 0x55, 0xff }, /* 9 1/3 1/3 1 Bright Blue */ - { 0x55, 0xff, 0x55 }, /* 10 1/3 1 1/3 Bright Green */ - { 0x55, 0xff, 0xff }, /* 11 1/3 1 1 Bright Cyan */ - { 0xff, 0x55, 0x55 }, /* 12 1 1/3 1/3 Bright Red */ - { 0xff, 0x55, 0xff }, /* 13 1 1/3 1 Bright Magenta */ - { 0xff, 0xff, 0x80 }, /* 14 1 1 1/3 Bright Yellow */ - { 0xff, 0xff, 0xff } /* 15 1 1 1 Bright White */ +static struct vt_driver vt_ps3fb_driver = { + .vd_name = "ps3fb", + .vd_probe = ps3fb_probe, + .vd_init = ps3fb_init, + .vd_blank = vt_fb_blank, + .vd_bitbltchr = vt_fb_bitbltchr, + .vd_maskbitbltchr = vt_fb_maskbitbltchr, + .vd_fb_ioctl = vt_fb_ioctl, + .vd_fb_mmap = vt_fb_mmap, + /* Better than VGA, but still generic driver. */ + .vd_priority = VD_PRIORITY_GENERIC + 1, }; -#define TODO printf("%s: unimplemented\n", __func__) - -static u_int16_t ps3fb_static_window[ROW*COL]; - +VT_DRIVER_DECLARE(vt_ps3fb, vt_ps3fb_driver); static struct ps3fb_softc ps3fb_softc; -static __inline int -ps3fb_background(uint8_t attr) -{ - return (attr >> 4); -} - -static __inline int -ps3fb_foreground(uint8_t attr) -{ - return (attr & 0x0f); -} - -static u_int -ps3fb_pix32(int attr) -{ - u_int retval; - - retval = (ps3fb_cmap[attr].red << 16) | - (ps3fb_cmap[attr].green << 8) | - ps3fb_cmap[attr].blue; - - return (retval); -} - static int -ps3fb_configure(int flags) +ps3fb_probe(struct vt_device *vd) { struct ps3fb_softc *sc; int disable; @@ -237,17 +96,12 @@ ps3fb_configure(int flags) #if 0 phandle_t root; #endif - static int done = 0; disable = 0; TUNABLE_INT_FETCH("hw.syscons.disable", &disable); if (disable != 0) return (0); - if (done != 0) - return (0); - done = 1; - sc = &ps3fb_softc; #if 0 @@ -260,24 +114,10 @@ ps3fb_configure(int flags) #else TUNABLE_STR_FETCH("hw.platform", compatible, sizeof(compatible)); if (strcmp(compatible, "ps3") != 0) - return (0); + return (CN_DEAD); #endif - sc->sc_console = 1; - - /* XXX: get from HV repository */ - sc->sc_height = 480; - sc->sc_width = 720; - sc->sc_stride = sc->sc_width*4; - - /* - * The loader puts the FB at 0x10000000, so use that for now. - */ - - sc->sc_addr = 0x10000000; - ps3fb_init(0, &sc->sc_va, 0); - - return (0); + return (CN_INTERNAL); } void @@ -299,474 +139,62 @@ ps3fb_remap(void) 0,L1GPU_DISPLAY_SYNC_VSYNC,0,0); lv1_gpu_context_attribute(0, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_SYNC, 1,L1GPU_DISPLAY_SYNC_VSYNC,0,0); - lv1_gpu_memory_allocate(PS3FB_SIZE, 0, 0, 0, 0, &sc->sc_fbhandle, &fb_paddr); - lv1_gpu_context_allocate(sc->sc_fbhandle, 0, &sc->sc_fbcontext, &sc->sc_dma_control, - &sc->sc_driver_info, &sc->sc_reports, &sc->sc_reports_size); + lv1_gpu_memory_allocate(PS3FB_SIZE, 0, 0, 0, 0, &sc->sc_fbhandle, + &fb_paddr); + lv1_gpu_context_allocate(sc->sc_fbhandle, 0, &sc->sc_fbcontext, + &sc->sc_dma_control, &sc->sc_driver_info, &sc->sc_reports, + &sc->sc_reports_size); lv1_gpu_context_attribute(sc->sc_fbcontext, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 0, 0, 0, 0); lv1_gpu_context_attribute(sc->sc_fbcontext, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 1, 0, 0, 0); + sc->fb_info.fb_pbase = fb_paddr; for (va = 0; va < PS3FB_SIZE; va += PAGE_SIZE) pmap_kenter_attr(0x10000000 + va, fb_paddr + va, VM_MEMATTR_WRITE_COMBINING); } static int -ps3fb_probe(int unit, video_adapter_t **adp, void *arg, int flags) -{ - TODO; - return (0); -} - -static int -ps3fb_init(int unit, video_adapter_t *adp, int flags) +ps3fb_init(struct vt_device *vd) { struct ps3fb_softc *sc; - video_info_t *vi; - int cxborder, cyborder; - int font_height; - - sc = (struct ps3fb_softc *)adp; - vi = &adp->va_info; - - vid_init_struct(adp, "ps3fb", -1, unit); - - /* The default font size can be overridden by loader */ - font_height = 16; - TUNABLE_INT_FETCH("hw.syscons.fsize", &font_height); - if (font_height == 8) { - sc->sc_font = dflt_font_8; - sc->sc_font_height = 8; - } else if (font_height == 14) { - sc->sc_font = dflt_font_14; - sc->sc_font_height = 14; - } else { - /* default is 8x16 */ - sc->sc_font = dflt_font_16; - sc->sc_font_height = 16; - } - - /* The user can set a border in chars - default is 1 char width */ - cxborder = 8; - cyborder = 2; - TUNABLE_INT_FETCH("hw.syscons.xborder", &cxborder); - TUNABLE_INT_FETCH("hw.syscons.yborder", &cyborder); - - vi->vi_cheight = sc->sc_font_height; - vi->vi_width = sc->sc_width/8 - 2*cxborder; - vi->vi_height = sc->sc_height/sc->sc_font_height - 2*cyborder; - vi->vi_cwidth = 8; - - /* - * Clamp width/height to syscons maximums - */ - if (vi->vi_width > COL) - vi->vi_width = COL; - if (vi->vi_height > ROW) - vi->vi_height = ROW; - sc->sc_xmargin = (sc->sc_width - (vi->vi_width * vi->vi_cwidth)) / 2; - sc->sc_ymargin = (sc->sc_height - (vi->vi_height * vi->vi_cheight))/2; + /* Init softc */ + vd->vd_softc = sc = &ps3fb_softc; - /* - * Avoid huge amounts of conditional code in syscons by - * defining a dummy h/w text display buffer. - */ - adp->va_window = (vm_offset_t) ps3fb_static_window; + /* XXX: get from HV repository */ + sc->fb_info.fb_depth = 32; + sc->fb_info.fb_height = 480; + sc->fb_info.fb_width = 720; + sc->fb_info.fb_stride = sc->fb_info.fb_width*4; + sc->fb_info.fb_size = sc->fb_info.fb_height * sc->fb_info.fb_stride; + sc->fb_info.fb_bpp = sc->fb_info.fb_stride / sc->fb_info.fb_width * 8; /* - * Enable future font-loading and flag color support, as well as - * adding V_ADP_MODECHANGE so that we ps3fb_set_mode() gets called - * when the X server shuts down. This enables us to get the console - * back when X disappears. + * The loader puts the FB at 0x10000000, so use that for now. */ - adp->va_flags |= V_ADP_FONT | V_ADP_COLOR | V_ADP_MODECHANGE; - - ps3fb_set_mode(&sc->sc_va, 0); - vid_register(&sc->sc_va); - - return (0); -} - -static int -ps3fb_get_info(video_adapter_t *adp, int mode, video_info_t *info) -{ - bcopy(&adp->va_info, info, sizeof(*info)); - return (0); -} - -static int -ps3fb_query_mode(video_adapter_t *adp, video_info_t *info) -{ - TODO; - return (0); -} -static int -ps3fb_set_mode(video_adapter_t *adp, int mode) -{ - struct ps3fb_softc *sc; + sc->fb_info.fb_vbase = 0x10000000; - sc = (struct ps3fb_softc *)adp; - - /* XXX: no real mode setting at the moment */ - - ps3fb_blank_display(&sc->sc_va, V_DISPLAY_ON); + /* 32-bit VGA palette */ + vt_generate_cons_palette(sc->fb_info.fb_cmap, COLOR_FORMAT_RGB, + 255, 0, 255, 8, 255, 16); + /* Set correct graphics context */ lv1_gpu_context_attribute(sc->sc_fbcontext, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 0, 0, 0, 0); lv1_gpu_context_attribute(sc->sc_fbcontext, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 1, 0, 0, 0); - return (0); -} - -static int -ps3fb_save_font(video_adapter_t *adp, int page, int size, int width, - u_char *data, int c, int count) -{ - TODO; - return (0); -} - -static int -ps3fb_load_font(video_adapter_t *adp, int page, int size, int width, - u_char *data, int c, int count) -{ - struct ps3fb_softc *sc; - - sc = (struct ps3fb_softc *)adp; - - /* - * syscons code has already determined that current width/height - * are unchanged for this new font - */ - sc->sc_font = data; - return (0); -} - -static int -ps3fb_show_font(video_adapter_t *adp, int page) -{ - - return (0); -} - -static int -ps3fb_save_palette(video_adapter_t *adp, u_char *palette) -{ - /* TODO; */ - return (0); -} - -static int -ps3fb_load_palette(video_adapter_t *adp, u_char *palette) -{ - /* TODO; */ - return (0); -} - -static int -ps3fb_set_border(video_adapter_t *adp, int border) -{ - /* XXX Be lazy for now and blank entire screen */ - return (ps3fb_blank_display(adp, border)); -} - -static int -ps3fb_save_state(video_adapter_t *adp, void *p, size_t size) -{ - TODO; - return (0); -} - -static int -ps3fb_load_state(video_adapter_t *adp, void *p) -{ - TODO; - return (0); -} - -static int -ps3fb_set_win_org(video_adapter_t *adp, off_t offset) -{ - TODO; - return (0); -} + fb_probe(&sc->fb_info); + sc->fb_info.fb_flags &= ~FB_FLAG_NOMMAP; /* Set wrongly by fb_probe */ + vt_fb_init(vd); -static int -ps3fb_read_hw_cursor(video_adapter_t *adp, int *col, int *row) -{ - *col = 0; - *row = 0; - - return (0); -} - -static int -ps3fb_set_hw_cursor(video_adapter_t *adp, int col, int row) -{ - - return (0); -} - -static int -ps3fb_set_hw_cursor_shape(video_adapter_t *adp, int base, int height, - int celsize, int blink) -{ - return (0); -} - -static int -ps3fb_blank_display(video_adapter_t *adp, int mode) -{ - struct ps3fb_softc *sc; - int i; - uint32_t *addr; - - sc = (struct ps3fb_softc *)adp; - addr = (uint32_t *) sc->sc_addr; - - for (i = 0; i < (sc->sc_stride/4)*sc->sc_height; i++) - *(addr + i) = ps3fb_pix32(ps3fb_background(SC_NORM_ATTR)); - - return (0); -} - -static int -ps3fb_mmap(video_adapter_t *adp, vm_ooffset_t offset, vm_paddr_t *paddr, - int prot, vm_memattr_t *memattr) -{ - struct ps3fb_softc *sc; - - sc = (struct ps3fb_softc *)adp; - - /* - * This might be a legacy VGA mem request: if so, just point it at the - * framebuffer, since it shouldn't be touched - */ - if (offset < sc->sc_stride*sc->sc_height) { - *paddr = sc->sc_addr + offset; - return (0); - } - - return (EINVAL); -} - -static int -ps3fb_ioctl(video_adapter_t *adp, u_long cmd, caddr_t data) -{ - - return (0); -} - -static int -ps3fb_clear(video_adapter_t *adp) -{ - TODO; - return (0); -} - -static int -ps3fb_fill_rect(video_adapter_t *adp, int val, int x, int y, int cx, int cy) -{ - TODO; - return (0); -} - -static int -ps3fb_bitblt(video_adapter_t *adp, ...) -{ - TODO; - return (0); -} - -static int -ps3fb_diag(video_adapter_t *adp, int level) -{ - TODO; - return (0); -} - -static int -ps3fb_save_cursor_palette(video_adapter_t *adp, u_char *palette) -{ - TODO; - return (0); -} - -static int -ps3fb_load_cursor_palette(video_adapter_t *adp, u_char *palette) -{ - TODO; - return (0); -} - -static int -ps3fb_copy(video_adapter_t *adp, vm_offset_t src, vm_offset_t dst, int n) -{ - TODO; - return (0); -} - -static int -ps3fb_putp(video_adapter_t *adp, vm_offset_t off, uint32_t p, uint32_t a, - int size, int bpp, int bit_ltor, int byte_ltor) -{ - TODO; - return (0); -} - -static int -ps3fb_putc(video_adapter_t *adp, vm_offset_t off, uint8_t c, uint8_t a) -{ - struct ps3fb_softc *sc; - int row; - int col; - int i, j, k; - uint32_t *addr; - u_char *p; - - sc = (struct ps3fb_softc *)adp; - row = (off / adp->va_info.vi_width) * adp->va_info.vi_cheight; - col = (off % adp->va_info.vi_width) * adp->va_info.vi_cwidth; - p = sc->sc_font + c*sc->sc_font_height; - addr = (uint32_t *)sc->sc_addr - + (row + sc->sc_ymargin)*(sc->sc_stride/4) - + col + sc->sc_xmargin; - - for (i = 0; i < sc->sc_font_height; i++) { - for (j = 0, k = 7; j < 8; j++, k--) { - if ((p[i] & (1 << k)) == 0) - *(addr + j) = ps3fb_pix32(ps3fb_background(a)); - else - *(addr + j) = ps3fb_pix32(ps3fb_foreground(a)); - } - addr += (sc->sc_stride/4); - } - - return (0); -} - -static int -ps3fb_puts(video_adapter_t *adp, vm_offset_t off, u_int16_t *s, int len) -{ - int i; - - for (i = 0; i < len; i++) { - ps3fb_putc(adp, off + i, s[i] & 0xff, (s[i] & 0xff00) >> 8); - } - return (0); -} - -static int -ps3fb_putm(video_adapter_t *adp, int x, int y, uint8_t *pixel_image, - uint32_t pixel_mask, int size, int width) -{ - struct ps3fb_softc *sc; - int i, j, k; - uint32_t fg, bg; - uint32_t *addr; - - sc = (struct ps3fb_softc *)adp; - addr = (uint32_t *)sc->sc_addr - + (y + sc->sc_ymargin)*(sc->sc_stride/4) - + x + sc->sc_xmargin; - - fg = ps3fb_pix32(ps3fb_foreground(SC_NORM_ATTR)); - bg = ps3fb_pix32(ps3fb_background(SC_NORM_ATTR)); - - for (i = 0; i < size && i+y < sc->sc_height - 2*sc->sc_ymargin; i++) { - for (j = 0, k = width; j < 8; j++, k--) { - if (x + j >= sc->sc_width - 2*sc->sc_xmargin) - continue; - - if (pixel_image[i] & (1 << k)) - *(addr + j) = (*(addr + j) == fg) ? bg : fg; - } - addr += (sc->sc_stride/4); - } - - return (0); -} - -/* - * Define the syscons nexus device attachment - */ -static void -ps3fb_scidentify(driver_t *driver, device_t parent) -{ - device_t child; - - /* - * Add with a priority guaranteed to make it last on - * the device list - */ - if (strcmp(installed_platform(), "ps3") == 0) - child = BUS_ADD_CHILD(parent, INT_MAX, SC_DRIVER_NAME, 0); -} - -static int -ps3fb_scprobe(device_t dev) -{ - int error; - - if (strcmp(installed_platform(), "ps3") != 0) - return (ENXIO); - - device_set_desc(dev, "System console"); - - error = sc_probe_unit(device_get_unit(dev), - device_get_flags(dev) | SC_AUTODETECT_KBD); - if (error != 0) - return (error); - - /* This is a fake device, so make sure we added it ourselves */ - return (BUS_PROBE_NOWILDCARD); -} - -static int -ps3fb_scattach(device_t dev) -{ - return (sc_attach_unit(device_get_unit(dev), - device_get_flags(dev) | SC_AUTODETECT_KBD)); -} - -static device_method_t ps3fb_sc_methods[] = { - DEVMETHOD(device_identify, ps3fb_scidentify), - DEVMETHOD(device_probe, ps3fb_scprobe), - DEVMETHOD(device_attach, ps3fb_scattach), - { 0, 0 } -}; - -static driver_t ps3fb_sc_driver = { - SC_DRIVER_NAME, - ps3fb_sc_methods, - sizeof(sc_softc_t), -}; - -static devclass_t sc_devclass; - -DRIVER_MODULE(ps3fb, nexus, ps3fb_sc_driver, sc_devclass, 0, 0); - -/* - * Define a stub keyboard driver in case one hasn't been - * compiled into the kernel - */ -#include -#include - -static int dummy_kbd_configure(int flags); - -keyboard_switch_t ps3dummysw; - -static int -dummy_kbd_configure(int flags) -{ + /* Clear the screen. */ + vt_fb_blank(vd, TC_BLACK); - return (0); + return (CN_INTERNAL); } -KEYBOARD_DRIVER(ps3dummy, ps3dummysw, dummy_kbd_configure); From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 18:18:30 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14363A33; Thu, 4 Sep 2014 18:18:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D91F5111D; Thu, 4 Sep 2014 18:18:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84IITGV067508; Thu, 4 Sep 2014 18:18:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84IITS8067506; Thu, 4 Sep 2014 18:18:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409041818.s84IITS8067506@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 18:18:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271112 - in stable/10/sys: conf dev/fb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:18:30 -0000 Author: emaste Date: Thu Sep 4 18:18:29 2014 New Revision: 271112 URL: http://svnweb.freebsd.org/changeset/base/271112 Log: MFC vt(4) driver for Sun creator(4) framebuffers r269601 (nwhitehorn): Add a simple unaccelerated vt(4) framebuffer driver for Sun framebuffers handled by creator(4) (Sun Creator 3D, Elite 3D, etc.). This provides vt(4) consoles on all devices currently supported by syscons on sparc64. The driver should also be easily adaptable to support newer Sun framebuffers such as the XVR-500 and higher. Many thanks to dumbbell@ (Jean-Sebastien Pedron) for testing this remotely during development. r269783 (dumbbell): vt(4): Colors are indexed against a console palette, not a VGA palette Sponsored by: The FreeBSD Foundation Added: stable/10/sys/dev/fb/creator_vt.c - copied, changed from r269601, head/sys/dev/fb/creator_vt.c Modified: stable/10/sys/conf/files.sparc64 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/files.sparc64 ============================================================================== --- stable/10/sys/conf/files.sparc64 Thu Sep 4 18:15:36 2014 (r271111) +++ stable/10/sys/conf/files.sparc64 Thu Sep 4 18:18:29 2014 (r271112) @@ -35,6 +35,7 @@ dev/atkbdc/psm.c optional psm atkbdc dev/auxio/auxio.c optional auxio sbus | auxio ebus dev/esp/esp_sbus.c optional esp sbus dev/fb/creator.c optional creator sc +dev/fb/creator_vt.c optional creator vt dev/fb/fb.c optional sc dev/fb/gallant12x22.c optional sc dev/fb/machfb.c optional machfb sc Copied and modified: stable/10/sys/dev/fb/creator_vt.c (from r269601, head/sys/dev/fb/creator_vt.c) ============================================================================== --- head/sys/dev/fb/creator_vt.c Tue Aug 5 18:19:51 2014 (r269601, copy source) +++ stable/10/sys/dev/fb/creator_vt.c Thu Sep 4 18:18:29 2014 (r271112) @@ -152,8 +152,9 @@ creatorfb_init(struct vt_device *vd) sc->memh = sparc64_fake_bustag(space, phys, &sc->memt[0]); /* 32-bit VGA palette */ - vt_generate_vga_palette(sc->fb.fb_cmap, COLOR_FORMAT_RGB, - 255, 16, 255, 8, 255, 0); + vt_generate_cons_palette(sc->fb.fb_cmap, COLOR_FORMAT_RGB, + 255, 0, 255, 8, 255, 16); + sc->fb.fb_cmsize = 16; vt_fb_init(vd); From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 18:24:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B167FF8; Thu, 4 Sep 2014 18:24:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D03B1257; Thu, 4 Sep 2014 18:24:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84IOmin072435; Thu, 4 Sep 2014 18:24:48 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84IOlKi072433; Thu, 4 Sep 2014 18:24:47 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201409041824.s84IOlKi072433@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Thu, 4 Sep 2014 18:24:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271113 - in stable/10/sys/powerpc: aim powerpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:24:48 -0000 Author: nwhitehorn Date: Thu Sep 4 18:24:47 2014 New Revision: 271113 URL: http://svnweb.freebsd.org/changeset/base/271113 Log: MFC r268880: Allow mappings of memory not previously direct-mapped by the kernel when calling mmap on /dev/mem and add a handler for the possible userland machine checks that may result. Remove some pointless and wrong copy/paste that has been in here for a decade as well. This results in a /dev/mem with identical semantics to the x86 version. Modified: stable/10/sys/powerpc/aim/trap.c stable/10/sys/powerpc/powerpc/mem.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/aim/trap.c ============================================================================== --- stable/10/sys/powerpc/aim/trap.c Thu Sep 4 18:18:29 2014 (r271112) +++ stable/10/sys/powerpc/aim/trap.c Thu Sep 4 18:24:47 2014 (r271113) @@ -269,6 +269,15 @@ trap(struct trapframe *frame) } break; + case EXC_MCHK: + /* + * Note that this may not be recoverable for the user + * process, depending on the type of machine check, + * but it at least prevents the kernel from dying. + */ + sig = SIGBUS; + break; + default: trap_fatal(frame); } Modified: stable/10/sys/powerpc/powerpc/mem.c ============================================================================== --- stable/10/sys/powerpc/powerpc/mem.c Thu Sep 4 18:18:29 2014 (r271112) +++ stable/10/sys/powerpc/powerpc/mem.c Thu Sep 4 18:24:47 2014 (r271113) @@ -179,22 +179,13 @@ memmmap(struct cdev *dev, vm_ooffset_t o { int i; - /* - * /dev/mem is the only one that makes sense through this - * interface. For /dev/kmem any physaddr we return here - * could be transient and hence incorrect or invalid at - * a later time. - */ - if (dev2unit(dev) != CDEV_MINOR_MEM) - return (-1); - - /* Only direct-mapped addresses. */ - if (mem_valid(offset, 0) - && pmap_dev_direct_mapped(offset, 0)) + if (dev2unit(dev) == CDEV_MINOR_MEM) + *paddr = offset; + else if (dev2unit(dev) == CDEV_MINOR_KMEM) + *paddr = vtophys(offset); + else return (EFAULT); - *paddr = offset; - for (i = 0; i < mem_range_softc.mr_ndesc; i++) { if (!(mem_range_softc.mr_desc[i].mr_flags & MDF_ACTIVE)) continue; @@ -231,9 +222,7 @@ ppc_mrinit(struct mem_range_softc *sc) sc->mr_cap = 0; sc->mr_ndesc = 8; /* XXX: Should be dynamically expandable */ sc->mr_desc = malloc(sc->mr_ndesc * sizeof(struct mem_range_desc), - M_MEMDESC, M_NOWAIT | M_ZERO); - if (sc->mr_desc == NULL) - panic("%s: malloc returns NULL", __func__); + M_MEMDESC, M_WAITOK | M_ZERO); } static int @@ -328,3 +317,4 @@ memioctl(struct cdev *dev __unused, u_lo } return (error); } + From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 18:28:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 033C2493; Thu, 4 Sep 2014 18:28:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D716E1294; Thu, 4 Sep 2014 18:28:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84ISUhG073421; Thu, 4 Sep 2014 18:28:30 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84ISUi2073419; Thu, 4 Sep 2014 18:28:30 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201409041828.s84ISUi2073419@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Thu, 4 Sep 2014 18:28:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271114 - stable/10/sys/powerpc/ps3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:28:31 -0000 Author: nwhitehorn Date: Thu Sep 4 18:28:30 2014 New Revision: 271114 URL: http://svnweb.freebsd.org/changeset/base/271114 Log: MFC r265883,268898: Repair bitrot in PS3 memory and interrupt allocation. Modified: stable/10/sys/powerpc/ps3/platform_ps3.c stable/10/sys/powerpc/ps3/ps3bus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/ps3/platform_ps3.c ============================================================================== --- stable/10/sys/powerpc/ps3/platform_ps3.c Thu Sep 4 18:24:47 2014 (r271113) +++ stable/10/sys/powerpc/ps3/platform_ps3.c Thu Sep 4 18:28:30 2014 (r271114) @@ -110,14 +110,6 @@ ps3_probe(platform_t plat) static int ps3_attach(platform_t plat) { - uint64_t junk; - int count; - struct mem_region avail_regions[2]; - - ps3_mem_regions(plat, NULL, NULL, avail_regions, &count); - - lv1_allocate_memory(avail_regions[1].mr_size, 24 /* 16 MB pages */, - 0, 0x04 /* any address */, &avail_regions[1].mr_start, &junk); pmap_mmu_install("mmu_ps3", BUS_PROBE_SPECIFIC); cpu_idle_hook = ps3_cpu_idle; @@ -152,6 +144,11 @@ ps3_mem_regions(platform_t plat, struct /* Convert to maximum amount we can allocate in 16 MB pages */ avail_regions[1].mr_size -= avail_regions[0].mr_size; avail_regions[1].mr_size -= avail_regions[1].mr_size % (16*1024*1024); + + /* Allocate extended memory region */ + lv1_allocate_memory(avail_regions[1].mr_size, 24 /* 16 MB pages */, + 0, 0x04 /* any address */, &avail_regions[1].mr_start, &junk); + *availsz = 2; if (phys != NULL) { Modified: stable/10/sys/powerpc/ps3/ps3bus.c ============================================================================== --- stable/10/sys/powerpc/ps3/ps3bus.c Thu Sep 4 18:24:47 2014 (r271113) +++ stable/10/sys/powerpc/ps3/ps3bus.c Thu Sep 4 18:28:30 2014 (r271114) @@ -127,6 +127,7 @@ static device_method_t ps3bus_methods[] struct ps3bus_softc { struct rman sc_mem_rman; + struct rman sc_intr_rman; struct mem_region *regions; int rcount; }; @@ -328,7 +329,11 @@ ps3bus_attach(device_t self) sc = device_get_softc(self); sc->sc_mem_rman.rm_type = RMAN_ARRAY; sc->sc_mem_rman.rm_descr = "PS3Bus Memory Mapped I/O"; + sc->sc_intr_rman.rm_type = RMAN_ARRAY; + sc->sc_intr_rman.rm_descr = "PS3Bus Interrupts"; rman_init(&sc->sc_mem_rman); + rman_init(&sc->sc_intr_rman); + rman_manage_region(&sc->sc_intr_rman, 0, ~0); /* Get memory regions for DMA */ mem_regions(&sc->regions, &sc->rcount, &sc->regions, &sc->rcount); @@ -562,8 +567,13 @@ ps3bus_alloc_resource(device_t bus, devi rm = &sc->sc_mem_rman; break; case SYS_RES_IRQ: - return (resource_list_alloc(&dinfo->resources, bus, child, - type, rid, start, end, count, flags)); + rle = resource_list_find(&dinfo->resources, SYS_RES_IRQ, + *rid); + rm = &sc->sc_intr_rman; + adjstart = rle->start; + adjcount = ulmax(count, rle->count); + adjend = ulmax(rle->end, rle->start + adjcount - 1); + break; default: device_printf(bus, "unknown resource request from %s\n", device_get_nameunit(child)); From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 18:30:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5593A7D2; Thu, 4 Sep 2014 18:30:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4011A12B2; Thu, 4 Sep 2014 18:30:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84IUYXQ074182; Thu, 4 Sep 2014 18:30:34 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84IUYRQ074181; Thu, 4 Sep 2014 18:30:34 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409041830.s84IUYRQ074181@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 18:30:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271115 - stable/10/sys/dev/vt/hw/ofwfb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:30:34 -0000 Author: emaste Date: Thu Sep 4 18:30:33 2014 New Revision: 271115 URL: http://svnweb.freebsd.org/changeset/base/271115 Log: MFC r268350 (nwhitehorn): Use common vt_fb parts in ofwfb as far as we are able without sacrificing performance. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 18:28:30 2014 (r271114) +++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 18:30:33 2014 (r271115) @@ -30,8 +30,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include @@ -47,24 +49,17 @@ __FBSDID("$FreeBSD$"); #include struct ofwfb_softc { + struct fb_info fb; + phandle_t sc_node; + bus_space_tag_t sc_memt; struct ofw_pci_register sc_pciaddrs[8]; int sc_num_pciaddrs; - - - intptr_t sc_addr; - int sc_depth; - int sc_stride; - - bus_space_tag_t sc_memt; - - uint32_t sc_colormap[16]; }; static vd_probe_t ofwfb_probe; static vd_init_t ofwfb_init; -static vd_blank_t ofwfb_blank; static vd_bitbltchr_t ofwfb_bitbltchr; static vd_fb_mmap_t ofwfb_mmap; @@ -72,7 +67,7 @@ static const struct vt_driver vt_ofwfb_d .vd_name = "ofwfb", .vd_probe = ofwfb_probe, .vd_init = ofwfb_init, - .vd_blank = ofwfb_blank, + .vd_blank = vt_fb_blank, .vd_bitbltchr = ofwfb_bitbltchr, .vd_maskbitbltchr = ofwfb_bitbltchr, .vd_fb_mmap = ofwfb_mmap, @@ -108,36 +103,11 @@ ofwfb_probe(struct vt_device *vd) } static void -ofwfb_blank(struct vt_device *vd, term_color_t color) -{ - struct ofwfb_softc *sc = vd->vd_softc; - u_int ofs, size; - uint32_t c; - - size = sc->sc_stride * vd->vd_height; - switch (sc->sc_depth) { - case 8: - c = (color << 24) | (color << 16) | (color << 8) | color; - for (ofs = 0; ofs < size/4; ofs++) - *(uint32_t *)(sc->sc_addr + 4*ofs) = c; - break; - case 32: - c = sc->sc_colormap[color]; - for (ofs = 0; ofs < size; ofs++) - *(uint32_t *)(sc->sc_addr + 4*ofs) = c; - break; - default: - /* panic? */ - break; - } -} - -static void ofwfb_bitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, unsigned int height, term_color_t fg, term_color_t bg) { - struct ofwfb_softc *sc = vd->vd_softc; + struct fb_info *sc = vd->vd_softc; u_long line; uint32_t fgc, bgc; int c; @@ -147,8 +117,8 @@ ofwfb_bitbltchr(struct vt_device *vd, co uint8_t c[4]; } ch1, ch2; - fgc = sc->sc_colormap[fg]; - bgc = sc->sc_colormap[bg]; + fgc = sc->fb_cmap[fg]; + bgc = sc->fb_cmap[bg]; b = m = 0; /* Don't try to put off screen pixels */ @@ -156,8 +126,8 @@ ofwfb_bitbltchr(struct vt_device *vd, co vd->vd_height)) return; - line = (sc->sc_stride * top) + left * sc->sc_depth/8; - if (mask == NULL && sc->sc_depth == 8 && (width % 8 == 0)) { + line = (sc->fb_stride * top) + left * sc->fb_bpp/8; + if (mask == NULL && sc->fb_bpp == 8 && (width % 8 == 0)) { for (; height > 0; height--) { for (c = 0; c < width; c += 8) { b = *src++; @@ -183,11 +153,11 @@ ofwfb_bitbltchr(struct vt_device *vd, co if (b & 0x02) ch2.c[2] = fg; if (b & 0x01) ch2.c[3] = fg; - *(uint32_t *)(sc->sc_addr + line + c) = ch1.l; - *(uint32_t *)(sc->sc_addr + line + c + 4) = + *(uint32_t *)(sc->fb_vbase + line + c) = ch1.l; + *(uint32_t *)(sc->fb_vbase + line + c + 4) = ch2.l; } - line += sc->sc_stride; + line += sc->fb_stride; } } else { for (; height > 0; height--) { @@ -205,13 +175,13 @@ ofwfb_bitbltchr(struct vt_device *vd, co if ((m & 0x80) == 0) continue; } - switch(sc->sc_depth) { + switch(sc->fb_bpp) { case 8: - *(uint8_t *)(sc->sc_addr + line + c) = + *(uint8_t *)(sc->fb_vbase + line + c) = b & 0x80 ? fg : bg; break; case 32: - *(uint32_t *)(sc->sc_addr + line + 4*c) + *(uint32_t *)(sc->fb_vbase + line + 4*c) = (b & 0x80) ? fgc : bgc; break; default: @@ -219,7 +189,7 @@ ofwfb_bitbltchr(struct vt_device *vd, co break; } } - line += sc->sc_stride; + line += sc->fb_stride; } } } @@ -243,16 +213,16 @@ ofwfb_initialize(struct vt_device *vd) * Set up the color map */ - switch (sc->sc_depth) { + switch (sc->fb.fb_bpp) { case 8: - vt_generate_cons_palette(sc->sc_colormap, COLOR_FORMAT_RGB, 255, + vt_generate_cons_palette(sc->fb.fb_cmap, COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); for (i = 0; i < 16; i++) { OF_call_method("color!", ih, 4, 1, - (cell_t)((sc->sc_colormap[i] >> 16) & 0xff), - (cell_t)((sc->sc_colormap[i] >> 8) & 0xff), - (cell_t)((sc->sc_colormap[i] >> 0) & 0xff), + (cell_t)((sc->fb.fb_cmap[i] >> 16) & 0xff), + (cell_t)((sc->fb.fb_cmap[i] >> 8) & 0xff), + (cell_t)((sc->fb.fb_cmap[i] >> 0) & 0xff), (cell_t)i, &retval); } break; @@ -265,24 +235,23 @@ ofwfb_initialize(struct vt_device *vd) * endianness slightly different. Figure out the host-view * endianness of the frame buffer. */ - oldpix = bus_space_read_4(sc->sc_memt, sc->sc_addr, 0); - bus_space_write_4(sc->sc_memt, sc->sc_addr, 0, 0xff000000); - if (*(uint8_t *)(sc->sc_addr) == 0xff) - vt_generate_cons_palette(sc->sc_colormap, + oldpix = bus_space_read_4(sc->sc_memt, sc->fb.fb_vbase, 0); + bus_space_write_4(sc->sc_memt, sc->fb.fb_vbase, 0, 0xff000000); + if (*(uint8_t *)(sc->fb.fb_vbase) == 0xff) + vt_generate_cons_palette(sc->fb.fb_cmap, COLOR_FORMAT_RGB, 255, 0, 255, 8, 255, 16); else - vt_generate_cons_palette(sc->sc_colormap, + vt_generate_cons_palette(sc->fb.fb_cmap, COLOR_FORMAT_RGB, 255, 16, 255, 8, 255, 0); - bus_space_write_4(sc->sc_memt, sc->sc_addr, 0, oldpix); + bus_space_write_4(sc->sc_memt, sc->fb.fb_vbase, 0, oldpix); break; default: - panic("Unknown color space depth %d", sc->sc_depth); + panic("Unknown color space depth %d", sc->fb.fb_bpp); break; } - /* Clear the screen. */ - ofwfb_blank(vd, TC_BLACK); + sc->fb.fb_cmsize = 16; } static int @@ -293,7 +262,7 @@ ofwfb_init(struct vt_device *vd) phandle_t chosen; ihandle_t stdout; phandle_t node; - uint32_t depth, height, width; + uint32_t depth, height, width, stride; uint32_t fb_phys; int i, len; #ifdef __sparc64__ @@ -326,21 +295,23 @@ ofwfb_init(struct vt_device *vd) if (OF_getproplen(node, "height") != sizeof(height) || OF_getproplen(node, "width") != sizeof(width) || OF_getproplen(node, "depth") != sizeof(depth) || - OF_getproplen(node, "linebytes") != sizeof(sc->sc_stride)) + OF_getproplen(node, "linebytes") != sizeof(sc->fb.fb_stride)) return (CN_DEAD); /* Only support 8 and 32-bit framebuffers */ OF_getprop(node, "depth", &depth, sizeof(depth)); if (depth != 8 && depth != 32) return (CN_DEAD); - sc->sc_depth = depth; + sc->fb.fb_bpp = depth; OF_getprop(node, "height", &height, sizeof(height)); OF_getprop(node, "width", &width, sizeof(width)); - OF_getprop(node, "linebytes", &sc->sc_stride, sizeof(sc->sc_stride)); + OF_getprop(node, "linebytes", &stride, sizeof(stride)); - vd->vd_height = height; - vd->vd_width = width; + sc->fb.fb_height = height; + sc->fb.fb_width = width; + sc->fb.fb_stride = stride; + sc->fb.fb_size = sc->fb.fb_height * sc->fb.fb_stride; /* * Get the PCI addresses of the adapter, if present. The node may be the @@ -368,12 +339,13 @@ ofwfb_init(struct vt_device *vd) #if defined(__powerpc__) sc->sc_memt = &bs_be_tag; - bus_space_map(sc->sc_memt, fb_phys, height * sc->sc_stride, - BUS_SPACE_MAP_PREFETCHABLE, &sc->sc_addr); + bus_space_map(sc->sc_memt, fb_phys, height * sc->fb.fb_stride, + BUS_SPACE_MAP_PREFETCHABLE, &sc->fb.fb_vbase); #elif defined(__sparc64__) OF_decode_addr(node, 0, &space, &phys); sc->sc_memt = &ofwfb_memt[0]; - sc->sc_addr = sparc64_fake_bustag(space, fb_phys, sc->sc_memt); + sc->fb.fb_vbase = + sparc64_fake_bustag(space, fb_phys, sc->sc_memt); #else #error Unsupported platform! #endif @@ -388,7 +360,8 @@ ofwfb_init(struct vt_device *vd) fb_phys = sc->sc_num_pciaddrs; for (i = 0; i < sc->sc_num_pciaddrs; i++) { /* If it is too small, not the framebuffer */ - if (sc->sc_pciaddrs[i].size_lo < sc->sc_stride*height) + if (sc->sc_pciaddrs[i].size_lo < + sc->fb.fb_stride * height) continue; /* If it is not memory, it isn't either */ if (!(sc->sc_pciaddrs[i].phys_hi & @@ -408,7 +381,7 @@ ofwfb_init(struct vt_device *vd) return (CN_DEAD); #if defined(__powerpc__) - OF_decode_addr(node, fb_phys, &sc->sc_memt, &sc->sc_addr); + OF_decode_addr(node, fb_phys, &sc->sc_memt, &sc->fb.fb_vbase); #elif defined(__sparc64__) OF_decode_addr(node, fb_phys, &space, &phys); sc->sc_memt = &ofwfb_memt[0]; @@ -416,7 +389,11 @@ ofwfb_init(struct vt_device *vd) #endif } + sc->fb.fb_pbase = fb_phys; + ofwfb_initialize(vd); + fb_probe(&sc->fb); + vt_fb_init(vd); return (CN_INTERNAL); } @@ -436,6 +413,7 @@ ofwfb_mmap(struct vt_device *vd, vm_ooff if (offset >= sc->sc_pciaddrs[i].phys_lo && offset < (sc->sc_pciaddrs[i].phys_lo + sc->sc_pciaddrs[i].size_lo)) { +#ifdef VM_MEMATTR_WRITE_COMBINING /* * If this is a prefetchable BAR, we can (and should) * enable write-combining. @@ -443,6 +421,7 @@ ofwfb_mmap(struct vt_device *vd, vm_ooff if (sc->sc_pciaddrs[i].phys_hi & OFW_PCI_PHYS_HI_PREFETCHABLE) *memattr = VM_MEMATTR_WRITE_COMBINING; +#endif *paddr = offset; return (0); From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 18:34:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 231DDA48; Thu, 4 Sep 2014 18:34:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 040881360; Thu, 4 Sep 2014 18:34:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84IYMSp078130; Thu, 4 Sep 2014 18:34:22 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84IYM6F078129; Thu, 4 Sep 2014 18:34:22 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409041834.s84IYM6F078129@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 18:34:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271116 - stable/10/sys/dev/vt/hw/ofwfb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:34:23 -0000 Author: emaste Date: Thu Sep 4 18:34:22 2014 New Revision: 271116 URL: http://svnweb.freebsd.org/changeset/base/271116 Log: MFC r269278 (nwhitehorn): Make mmap() of the console device when using ofwfb work like other supported framebuffer drivers. This lets ofwfb work with xf86-video-scfb and makes the driver much more generic and less PCI-centric. This changes some user-visible behavior and will require updates to the xorg-server port on PowerPC when using ATI graphics cards. Relnotes: Yes Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 18:30:33 2014 (r271115) +++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 18:34:22 2014 (r271116) @@ -52,16 +52,13 @@ struct ofwfb_softc { struct fb_info fb; phandle_t sc_node; + ihandle_t sc_handle; bus_space_tag_t sc_memt; - - struct ofw_pci_register sc_pciaddrs[8]; - int sc_num_pciaddrs; }; static vd_probe_t ofwfb_probe; static vd_init_t ofwfb_init; static vd_bitbltchr_t ofwfb_bitbltchr; -static vd_fb_mmap_t ofwfb_mmap; static const struct vt_driver vt_ofwfb_driver = { .vd_name = "ofwfb", @@ -70,7 +67,8 @@ static const struct vt_driver vt_ofwfb_d .vd_blank = vt_fb_blank, .vd_bitbltchr = ofwfb_bitbltchr, .vd_maskbitbltchr = ofwfb_bitbltchr, - .vd_fb_mmap = ofwfb_mmap, + .vd_fb_ioctl = vt_fb_ioctl, + .vd_fb_mmap = vt_fb_mmap, .vd_priority = VD_PRIORITY_GENERIC+1, }; @@ -198,17 +196,10 @@ static void ofwfb_initialize(struct vt_device *vd) { struct ofwfb_softc *sc = vd->vd_softc; - char name[64]; - ihandle_t ih; int i; cell_t retval; uint32_t oldpix; - /* Open display device, thereby initializing it */ - memset(name, 0, sizeof(name)); - OF_package_to_path(sc->sc_node, name, sizeof(name)); - ih = OF_open(name); - /* * Set up the color map */ @@ -219,7 +210,7 @@ ofwfb_initialize(struct vt_device *vd) 16, 255, 8, 255, 0); for (i = 0; i < 16; i++) { - OF_call_method("color!", ih, 4, 1, + OF_call_method("color!", sc->sc_handle, 4, 1, (cell_t)((sc->fb.fb_cmap[i] >> 16) & 0xff), (cell_t)((sc->fb.fb_cmap[i] >> 8) & 0xff), (cell_t)((sc->fb.fb_cmap[i] >> 0) & 0xff), @@ -260,7 +251,6 @@ ofwfb_init(struct vt_device *vd) struct ofwfb_softc *sc; char type[64]; phandle_t chosen; - ihandle_t stdout; phandle_t node; uint32_t depth, height, width, stride; uint32_t fb_phys; @@ -275,14 +265,15 @@ ofwfb_init(struct vt_device *vd) vd->vd_softc = sc = &ofwfb_conssoftc; chosen = OF_finddevice("/chosen"); - OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)); - node = OF_instance_to_package(stdout); + OF_getprop(chosen, "stdout", &sc->sc_handle, sizeof(ihandle_t)); + node = OF_instance_to_package(sc->sc_handle); if (node == -1) { /* * The "/chosen/stdout" does not exist try * using "screen" directly. */ node = OF_finddevice("screen"); + sc->sc_handle = OF_open("screen"); } OF_getprop(node, "device_type", type, sizeof(type)); if (strcmp(type, "display") != 0) @@ -291,6 +282,13 @@ ofwfb_init(struct vt_device *vd) /* Keep track of the OF node */ sc->sc_node = node; + /* + * Try to use a 32-bit framebuffer if possible. This may be + * unimplemented and fail. That's fine -- it just means we are + * stuck with the defaults. + */ + OF_call_method("set-depth", sc->sc_handle, 1, 1, (cell_t)32, &i); + /* Make sure we have needed properties */ if (OF_getproplen(node, "height") != sizeof(height) || OF_getproplen(node, "width") != sizeof(width) || @@ -302,7 +300,7 @@ ofwfb_init(struct vt_device *vd) OF_getprop(node, "depth", &depth, sizeof(depth)); if (depth != 8 && depth != 32) return (CN_DEAD); - sc->fb.fb_bpp = depth; + sc->fb.fb_bpp = sc->fb.fb_depth = depth; OF_getprop(node, "height", &height, sizeof(height)); OF_getprop(node, "width", &width, sizeof(width)); @@ -314,21 +312,6 @@ ofwfb_init(struct vt_device *vd) sc->fb.fb_size = sc->fb.fb_height * sc->fb.fb_stride; /* - * Get the PCI addresses of the adapter, if present. The node may be the - * child of the PCI device: in that case, try the parent for - * the assigned-addresses property. - */ - len = OF_getprop(node, "assigned-addresses", sc->sc_pciaddrs, - sizeof(sc->sc_pciaddrs)); - if (len == -1) { - len = OF_getprop(OF_parent(node), "assigned-addresses", - sc->sc_pciaddrs, sizeof(sc->sc_pciaddrs)); - } - if (len == -1) - len = 0; - sc->sc_num_pciaddrs = len / sizeof(struct ofw_pci_register); - - /* * Grab the physical address of the framebuffer, and then map it * into our memory space. If the MMU is not yet up, it will be * remapped for us when relocation turns on. @@ -339,13 +322,18 @@ ofwfb_init(struct vt_device *vd) #if defined(__powerpc__) sc->sc_memt = &bs_be_tag; - bus_space_map(sc->sc_memt, fb_phys, height * sc->fb.fb_stride, + bus_space_map(sc->sc_memt, fb_phys, sc->fb.fb_size, BUS_SPACE_MAP_PREFETCHABLE, &sc->fb.fb_vbase); #elif defined(__sparc64__) OF_decode_addr(node, 0, &space, &phys); sc->sc_memt = &ofwfb_memt[0]; sc->fb.fb_vbase = sparc64_fake_bustag(space, fb_phys, sc->sc_memt); + #elif defined(__arm__) + sc->sc_memt = fdtbus_bs_tag; + bus_space_map(sc->sc_memt, sc->fb.fb_pbase, sc->fb.fb_size, + BUS_SPACE_MAP_PREFETCHABLE, + (bus_space_handle_t *)&sc->fb.fb_vbase); #else #error Unsupported platform! #endif @@ -357,14 +345,31 @@ ofwfb_init(struct vt_device *vd) * Linux does the same thing. */ - fb_phys = sc->sc_num_pciaddrs; - for (i = 0; i < sc->sc_num_pciaddrs; i++) { + struct ofw_pci_register pciaddrs[8]; + int num_pciaddrs = 0; + + /* + * Get the PCI addresses of the adapter, if present. The node + * may be the child of the PCI device: in that case, try the + * parent for the assigned-addresses property. + */ + len = OF_getprop(node, "assigned-addresses", pciaddrs, + sizeof(pciaddrs)); + if (len == -1) { + len = OF_getprop(OF_parent(node), "assigned-addresses", + pciaddrs, sizeof(pciaddrs)); + } + if (len == -1) + len = 0; + num_pciaddrs = len / sizeof(struct ofw_pci_register); + + fb_phys = num_pciaddrs; + for (i = 0; i < num_pciaddrs; i++) { /* If it is too small, not the framebuffer */ - if (sc->sc_pciaddrs[i].size_lo < - sc->fb.fb_stride * height) + if (pciaddrs[i].size_lo < sc->fb.fb_stride * height) continue; /* If it is not memory, it isn't either */ - if (!(sc->sc_pciaddrs[i].phys_hi & + if (!(pciaddrs[i].phys_hi & OFW_PCI_PHYS_HI_SPACE_MEM32)) continue; @@ -372,12 +377,11 @@ ofwfb_init(struct vt_device *vd) fb_phys = i; /* If it is prefetchable, it certainly is */ - if (sc->sc_pciaddrs[i].phys_hi & - OFW_PCI_PHYS_HI_PREFETCHABLE) + if (pciaddrs[i].phys_hi & OFW_PCI_PHYS_HI_PREFETCHABLE) break; } - if (fb_phys == sc->sc_num_pciaddrs) /* No candidates found */ + if (fb_phys == num_pciaddrs) /* No candidates found */ return (CN_DEAD); #if defined(__powerpc__) @@ -385,7 +389,10 @@ ofwfb_init(struct vt_device *vd) #elif defined(__sparc64__) OF_decode_addr(node, fb_phys, &space, &phys); sc->sc_memt = &ofwfb_memt[0]; - sc->sc_addr = sparc64_fake_bustag(space, phys, sc->sc_memt); + sc->fb.fb_vbase = sparc64_fake_bustag(space, phys, sc->sc_memt); + #else + /* No ability to interpret assigned-addresses otherwise */ + return (CN_DEAD); #endif } @@ -398,39 +405,3 @@ ofwfb_init(struct vt_device *vd) return (CN_INTERNAL); } -static int -ofwfb_mmap(struct vt_device *vd, vm_ooffset_t offset, vm_paddr_t *paddr, - int prot, vm_memattr_t *memattr) -{ - struct ofwfb_softc *sc = vd->vd_softc; - int i; - - /* - * Make sure the requested address lies within the PCI device's - * assigned addrs - */ - for (i = 0; i < sc->sc_num_pciaddrs; i++) - if (offset >= sc->sc_pciaddrs[i].phys_lo && - offset < (sc->sc_pciaddrs[i].phys_lo + sc->sc_pciaddrs[i].size_lo)) - { -#ifdef VM_MEMATTR_WRITE_COMBINING - /* - * If this is a prefetchable BAR, we can (and should) - * enable write-combining. - */ - if (sc->sc_pciaddrs[i].phys_hi & - OFW_PCI_PHYS_HI_PREFETCHABLE) - *memattr = VM_MEMATTR_WRITE_COMBINING; -#endif - - *paddr = offset; - return (0); - } - - /* - * Hack for Radeon... - */ - *paddr = offset; - return (0); -} - From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 18:43:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BCEE6E14; Thu, 4 Sep 2014 18:43:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B7A714B1; Thu, 4 Sep 2014 18:43:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84Ihgxm082866; Thu, 4 Sep 2014 18:43:42 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84IheSV082855; Thu, 4 Sep 2014 18:43:40 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409041843.s84IheSV082855@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 18:43:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271117 - in stable/10/sys: dev/fb dev/vt/hw/efifb dev/vt/hw/fb dev/vt/hw/ofwfb powerpc/ps3 sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:43:43 -0000 Author: emaste Date: Thu Sep 4 18:43:40 2014 New Revision: 271117 URL: http://svnweb.freebsd.org/changeset/base/271117 Log: MFC fbd(4) and vt_fb disentanglement: r268472 (ray): Should check fb_read method presence instead of double check for fb_write. r269620 (nwhitehorn): Retire various intertwined bits of fbd(4) and vt_fb, in particular the pixel modification indirection. No actual drivers use it and those that might (e.g. creatorfb) use custom implementations of vd_bitbltchr(). Relnotes: No Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/fb/fbd.c stable/10/sys/dev/vt/hw/efifb/efifb.c stable/10/sys/dev/vt/hw/fb/vt_early_fb.c stable/10/sys/dev/vt/hw/fb/vt_fb.c stable/10/sys/dev/vt/hw/fb/vt_fb.h stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c stable/10/sys/powerpc/ps3/ps3_syscons.c stable/10/sys/sys/fbio.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/fb/fbd.c ============================================================================== --- stable/10/sys/dev/fb/fbd.c Thu Sep 4 18:34:22 2014 (r271116) +++ stable/10/sys/dev/fb/fbd.c Thu Sep 4 18:43:40 2014 (r271117) @@ -165,6 +165,10 @@ fb_mmap(struct cdev *dev, vm_ooffset_t o struct fb_info *info; info = dev->si_drv1; + + if ((info->fb_flags & FB_FLAG_NOMMAP) || info->fb_pbase == 0) + return (ENODEV); + if (offset < info->fb_size) { *paddr = info->fb_pbase + offset; return (0); @@ -172,103 +176,6 @@ fb_mmap(struct cdev *dev, vm_ooffset_t o return (EINVAL); } - -static void -vt_fb_mem_wr1(struct fb_info *sc, uint32_t o, uint8_t v) -{ - - KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); - *(uint8_t *)(sc->fb_vbase + o) = v; -} - -static void -vt_fb_mem_wr2(struct fb_info *sc, uint32_t o, uint16_t v) -{ - - KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); - *(uint16_t *)(sc->fb_vbase + o) = v; -} - -static void -vt_fb_mem_wr4(struct fb_info *sc, uint32_t o, uint32_t v) -{ - - KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); - *(uint32_t *)(sc->fb_vbase + o) = v; -} - -static void -vt_fb_mem_copy(struct fb_info *sc, uint32_t offset_to, uint32_t offset_from, - uint32_t size) -{ - - memmove((void *)(sc->fb_vbase + offset_to), (void *)(sc->fb_vbase + - offset_from), size); -} - -static void -vt_fb_indir_wr1(struct fb_info *sc, uint32_t o, uint8_t v) -{ - - KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); - sc->fb_write(sc->fb_priv, o, &v, 1); -} - -static void -vt_fb_indir_wr2(struct fb_info *sc, uint32_t o, uint16_t v) -{ - - KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); - sc->fb_write(sc->fb_priv, o, &v, 2); -} - -static void -vt_fb_indir_wr4(struct fb_info *sc, uint32_t o, uint32_t v) -{ - - KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); - sc->fb_write(sc->fb_priv, o, &v, 4); -} - -static void -vt_fb_indir_copy(struct fb_info *sc, uint32_t offset_to, uint32_t offset_from, - uint32_t size) -{ - - sc->copy(sc->fb_priv, offset_to, offset_from, size); -} - -int -fb_probe(struct fb_info *info) -{ - - if (info->fb_size == 0) - return (ENXIO); - - if (info->fb_write != NULL) { - if (info->fb_write == NULL) { - return (EINVAL); - } - info->fb_flags |= FB_FLAG_NOMMAP; - info->wr1 = &vt_fb_indir_wr1; - info->wr2 = &vt_fb_indir_wr2; - info->wr4 = &vt_fb_indir_wr4; - info->copy = &vt_fb_indir_copy; - } else if (info->fb_vbase != 0) { - if (info->fb_pbase == 0) { - info->fb_flags |= FB_FLAG_NOMMAP; - } - info->wr1 = &vt_fb_mem_wr1; - info->wr2 = &vt_fb_mem_wr2; - info->wr4 = &vt_fb_mem_wr4; - info->copy = &vt_fb_mem_copy; - } else - return (ENXIO); - - return (0); -} - - static int fb_init(struct fb_list_entry *entry, int unit) { @@ -329,10 +236,6 @@ fbd_register(struct fb_info* info) return (0); } - err = fb_probe(info); - if (err) - return (err); - entry = malloc(sizeof(struct fb_list_entry), M_DEVBUF, M_WAITOK|M_ZERO); entry->fb_info = info; @@ -342,8 +245,10 @@ fbd_register(struct fb_info* info) if (err) return (err); - if (first) - vt_fb_attach(info); + if (first) { + if (vt_fb_attach(info) == CN_DEAD) + return (ENXIO); + } return (0); } Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- stable/10/sys/dev/vt/hw/efifb/efifb.c Thu Sep 4 18:34:22 2014 (r271116) +++ stable/10/sys/dev/vt/hw/efifb/efifb.c Thu Sep 4 18:43:40 2014 (r271117) @@ -154,12 +154,8 @@ vt_efifb_init(struct vt_device *vd) info->fb_width = MIN(info->fb_width, VT_FB_DEFAULT_WIDTH); info->fb_height = MIN(info->fb_height, VT_FB_DEFAULT_HEIGHT); - fb_probe(info); vt_fb_init(vd); - /* Clear the screen. */ - vt_fb_blank(vd, TC_BLACK); - return (CN_INTERNAL); } Modified: stable/10/sys/dev/vt/hw/fb/vt_early_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_early_fb.c Thu Sep 4 18:34:22 2014 (r271116) +++ stable/10/sys/dev/vt/hw/fb/vt_early_fb.c Thu Sep 4 18:43:40 2014 (r271117) @@ -296,7 +296,6 @@ vt_efb_init(struct vt_device *vd) #else vt_efb_initialize(info); #endif - fb_probe(info); vt_fb_init(vd); return (CN_INTERNAL); Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.c Thu Sep 4 18:34:22 2014 (r271116) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.c Thu Sep 4 18:43:40 2014 (r271117) @@ -61,6 +61,30 @@ static struct vt_driver vt_fb_driver = { VT_DRIVER_DECLARE(vt_fb, vt_fb_driver); +static void +vt_fb_mem_wr1(struct fb_info *sc, uint32_t o, uint8_t v) +{ + + KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); + *(uint8_t *)(sc->fb_vbase + o) = v; +} + +static void +vt_fb_mem_wr2(struct fb_info *sc, uint32_t o, uint16_t v) +{ + + KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); + *(uint16_t *)(sc->fb_vbase + o) = v; +} + +static void +vt_fb_mem_wr4(struct fb_info *sc, uint32_t o, uint32_t v) +{ + + KASSERT((o < sc->fb_size), ("Offset %#08x out of fb size", o)); + *(uint32_t *)(sc->fb_vbase + o) = v; +} + int vt_fb_ioctl(struct vt_device *vd, u_long cmd, caddr_t data, struct thread *td) { @@ -134,20 +158,22 @@ vt_fb_setpixel(struct vt_device *vd, int c = info->fb_cmap[color]; o = info->fb_stride * y + x * FBTYPE_GET_BYTESPP(info); + KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); + switch (FBTYPE_GET_BYTESPP(info)) { case 1: - info->wr1(info, o, c); + vt_fb_mem_wr1(info, o, c); break; case 2: - info->wr2(info, o, c); + vt_fb_mem_wr2(info, o, c); break; case 3: - info->wr1(info, o, (c >> 16) & 0xff); - info->wr1(info, o + 1, (c >> 8) & 0xff); - info->wr1(info, o + 2, c & 0xff); + vt_fb_mem_wr1(info, o, (c >> 16) & 0xff); + vt_fb_mem_wr1(info, o + 1, (c >> 8) & 0xff); + vt_fb_mem_wr1(info, o + 2, c & 0xff); break; case 4: - info->wr4(info, o, c); + vt_fb_mem_wr4(info, o, c); break; default: /* panic? */ @@ -183,32 +209,34 @@ vt_fb_blank(struct vt_device *vd, term_c info = vd->vd_softc; c = info->fb_cmap[color]; + KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); + switch (FBTYPE_GET_BYTESPP(info)) { case 1: for (h = 0; h < info->fb_height; h++) for (o = 0; o < info->fb_stride; o++) - info->wr1(info, h*info->fb_stride + o, c); + vt_fb_mem_wr1(info, h*info->fb_stride + o, c); break; case 2: for (h = 0; h < info->fb_height; h++) for (o = 0; o < info->fb_stride; o += 2) - info->wr2(info, h*info->fb_stride + o, c); + vt_fb_mem_wr2(info, h*info->fb_stride + o, c); break; case 3: for (h = 0; h < info->fb_height; h++) for (o = 0; o < info->fb_stride; o += 3) { - info->wr1(info, h*info->fb_stride + o, + vt_fb_mem_wr1(info, h*info->fb_stride + o, (c >> 16) & 0xff); - info->wr1(info, h*info->fb_stride + o + 1, + vt_fb_mem_wr1(info, h*info->fb_stride + o + 1, (c >> 8) & 0xff); - info->wr1(info, h*info->fb_stride + o + 2, + vt_fb_mem_wr1(info, h*info->fb_stride + o + 2, c & 0xff); } break; case 4: for (h = 0; h < info->fb_height; h++) for (o = 0; o < info->fb_stride; o += 4) - info->wr4(info, h*info->fb_stride + o, c); + vt_fb_mem_wr4(info, h*info->fb_stride + o, c); break; default: /* panic? */ @@ -241,6 +269,8 @@ vt_fb_bitbltchr(struct vt_device *vd, co info->fb_height)) return; + KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); + line = (info->fb_stride * top) + (left * bpp); for (l = 0; l < height; l++) { ch = src; @@ -254,19 +284,19 @@ vt_fb_bitbltchr(struct vt_device *vd, co switch(bpp) { case 1: - info->wr1(info, o, cc); + vt_fb_mem_wr1(info, o, cc); break; case 2: - info->wr2(info, o, cc); + vt_fb_mem_wr2(info, o, cc); break; case 3: /* Packed mode, so unaligned. Byte access. */ - info->wr1(info, o, (cc >> 16) & 0xff); - info->wr1(info, o + 1, (cc >> 8) & 0xff); - info->wr1(info, o + 2, cc & 0xff); + vt_fb_mem_wr1(info, o, (cc >> 16) & 0xff); + vt_fb_mem_wr1(info, o + 1, (cc >> 8) & 0xff); + vt_fb_mem_wr1(info, o + 2, cc & 0xff); break; case 4: - info->wr4(info, o, cc); + vt_fb_mem_wr4(info, o, cc); break; default: /* panic? */ @@ -303,6 +333,8 @@ vt_fb_maskbitbltchr(struct vt_device *vd info->fb_height)) return; + KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); + line = (info->fb_stride * top) + (left * bpp); for (l = 0; l < height; l++) { ch = src; @@ -325,19 +357,19 @@ vt_fb_maskbitbltchr(struct vt_device *vd switch(bpp) { case 1: - info->wr1(info, o, cc); + vt_fb_mem_wr1(info, o, cc); break; case 2: - info->wr2(info, o, cc); + vt_fb_mem_wr2(info, o, cc); break; case 3: /* Packed mode, so unaligned. Byte access. */ - info->wr1(info, o, (cc >> 16) & 0xff); - info->wr1(info, o + 1, (cc >> 8) & 0xff); - info->wr1(info, o + 2, cc & 0xff); + vt_fb_mem_wr1(info, o, (cc >> 16) & 0xff); + vt_fb_mem_wr1(info, o + 1, (cc >> 8) & 0xff); + vt_fb_mem_wr1(info, o + 2, cc & 0xff); break; case 4: - info->wr4(info, o, cc); + vt_fb_mem_wr4(info, o, cc); break; default: /* panic? */ @@ -393,6 +425,12 @@ vt_fb_init(struct vt_device *vd) vd->vd_height = info->fb_height; vd->vd_width = info->fb_width; + if (info->fb_size == 0) + return (CN_DEAD); + + if (info->fb_pbase == 0) + info->fb_flags |= FB_FLAG_NOMMAP; + if (info->fb_cmsize <= 0) { err = vt_fb_init_cmap(info->fb_cmap, FBTYPE_GET_BPP(info)); if (err) Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.h ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.h Thu Sep 4 18:34:22 2014 (r271116) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.h Thu Sep 4 18:43:40 2014 (r271117) @@ -36,8 +36,6 @@ int vt_fb_attach(struct fb_info *info); void vt_fb_resume(void); void vt_fb_suspend(void); -int fb_probe(struct fb_info *info); - vd_init_t vt_fb_init; vd_blank_t vt_fb_blank; vd_bitbltchr_t vt_fb_bitbltchr; Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 18:34:22 2014 (r271116) +++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 18:43:40 2014 (r271117) @@ -399,7 +399,6 @@ ofwfb_init(struct vt_device *vd) sc->fb.fb_pbase = fb_phys; ofwfb_initialize(vd); - fb_probe(&sc->fb); vt_fb_init(vd); return (CN_INTERNAL); Modified: stable/10/sys/powerpc/ps3/ps3_syscons.c ============================================================================== --- stable/10/sys/powerpc/ps3/ps3_syscons.c Thu Sep 4 18:34:22 2014 (r271116) +++ stable/10/sys/powerpc/ps3/ps3_syscons.c Thu Sep 4 18:43:40 2014 (r271117) @@ -188,12 +188,8 @@ ps3fb_init(struct vt_device *vd) lv1_gpu_context_attribute(sc->sc_fbcontext, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 1, 0, 0, 0); - fb_probe(&sc->fb_info); - sc->fb_info.fb_flags &= ~FB_FLAG_NOMMAP; /* Set wrongly by fb_probe */ vt_fb_init(vd); - - /* Clear the screen. */ - vt_fb_blank(vd, TC_BLACK); + sc->fb_info.fb_flags &= ~FB_FLAG_NOMMAP; /* Set wrongly by vt_fb_init */ return (CN_INTERNAL); } Modified: stable/10/sys/sys/fbio.h ============================================================================== --- stable/10/sys/sys/fbio.h Thu Sep 4 18:34:22 2014 (r271116) +++ stable/10/sys/sys/fbio.h Thu Sep 4 18:43:40 2014 (r271117) @@ -115,19 +115,6 @@ struct fb_info; typedef int fb_enter_t(void *priv); typedef int fb_leave_t(void *priv); -typedef int fb_write_t(void *priv, int offset, void *data, int size); -typedef int fb_read_t(void *priv, int offset, void *data, int size); - -/* XXX: should use priv instead of fb_info too. */ -typedef void fb_copy_t(struct fb_info *sc, uint32_t offset_to, uint32_t offset_from, - uint32_t size); -typedef void fb_wr1_t(struct fb_info *sc, uint32_t offset, uint8_t value); -typedef void fb_wr2_t(struct fb_info *sc, uint32_t offset, uint16_t value); -typedef void fb_wr4_t(struct fb_info *sc, uint32_t offset, uint32_t value); - -typedef int fb_ioctl_t(struct cdev *, u_long, caddr_t, int, struct thread *); -typedef int fb_mmap_t(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, - int prot, vm_memattr_t *memattr); struct fb_info { /* Raw copy of fbtype. Do not change. */ @@ -138,16 +125,8 @@ struct fb_info { int fb_cmsize; /* size of color map (entries) */ int fb_size; /* total size in bytes */ - /* Methods. */ - fb_write_t *fb_write; /* if NULL, direct mem write. */ - fb_read_t *fb_read; /* if NULL, direct mem read. */ - struct cdev *fb_cdev; - fb_wr1_t *wr1; - fb_wr2_t *wr2; - fb_wr4_t *wr4; - fb_copy_t *copy; fb_enter_t *enter; fb_leave_t *leave; From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 18:54:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7122C1C3; Thu, 4 Sep 2014 18:54:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C31A15DA; Thu, 4 Sep 2014 18:54:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84Is14O087749; Thu, 4 Sep 2014 18:54:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84Is1KC087748; Thu, 4 Sep 2014 18:54:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409041854.s84Is1KC087748@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 18:54:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271118 - stable/10/sys/dev/vt/hw/ofwfb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:54:02 -0000 Author: emaste Date: Thu Sep 4 18:54:01 2014 New Revision: 271118 URL: http://svnweb.freebsd.org/changeset/base/271118 Log: MFC r269636 by nwhitehorn: Set fb_pbase properly on PowerPC in the case where we have to guess at the right register bank for the framebuffer. Disable the assigned- addresses path on SPARC since it is just a hack for IBM PPC systems and was neither relevant for nor worked on SPARC anyway. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 18:43:40 2014 (r271117) +++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 18:54:01 2014 (r271118) @@ -337,6 +337,8 @@ ofwfb_init(struct vt_device *vd) #else #error Unsupported platform! #endif + + sc->fb.fb_pbase = fb_phys; } else { /* * Some IBM systems don't have an address property. Try to @@ -386,17 +388,13 @@ ofwfb_init(struct vt_device *vd) #if defined(__powerpc__) OF_decode_addr(node, fb_phys, &sc->sc_memt, &sc->fb.fb_vbase); - #elif defined(__sparc64__) - OF_decode_addr(node, fb_phys, &space, &phys); - sc->sc_memt = &ofwfb_memt[0]; - sc->fb.fb_vbase = sparc64_fake_bustag(space, phys, sc->sc_memt); + sc->fb.fb_pbase = sc->fb.fb_vbase; /* 1:1 mapped */ #else /* No ability to interpret assigned-addresses otherwise */ return (CN_DEAD); #endif } - sc->fb.fb_pbase = fb_phys; ofwfb_initialize(vd); vt_fb_init(vd); From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 18:54:16 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3AB002EE; Thu, 4 Sep 2014 18:54:16 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E839915DF; Thu, 4 Sep 2014 18:54:15 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s84IsECj001473 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 4 Sep 2014 11:54:14 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s84IsER4001472; Thu, 4 Sep 2014 11:54:14 -0700 (PDT) (envelope-from jmg) Date: Thu, 4 Sep 2014 11:54:14 -0700 From: John-Mark Gurney To: Don Lewis Subject: Re: svn commit: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98 Message-ID: <20140904185414.GL82175@funkthat.com> References: <20140904171946.GG82175@funkthat.com> <201409041741.s84HfTZd093999@gw.catspoiler.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="tjCHc7DPkfUGtrlw" Content-Disposition: inline In-Reply-To: <201409041741.s84HfTZd093999@gw.catspoiler.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Thu, 04 Sep 2014 11:54:14 -0700 (PDT) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, jhb@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:54:16 -0000 --tjCHc7DPkfUGtrlw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Don Lewis wrote this message on Thu, Sep 04, 2014 at 10:41 -0700: > On 4 Sep, John-Mark Gurney wrote: > > Don Lewis wrote this message on Thu, Sep 04, 2014 at 09:22 -0700: > >> On 4 Sep, John Baldwin wrote: > >> > On Wednesday, September 03, 2014 07:37:21 PM Don Lewis wrote: > >> >> On 4 Sep, John Baldwin wrote: > >> >> > Author: jhb > >> >> > Date: Thu Sep 4 01:46:06 2014 > >> >> > New Revision: 271076 > >> >> > URL: http://svnweb.freebsd.org/changeset/base/271076 > >> >> > > >> >> > Log: > >> >> > - Move the declaration of has_f00f_hack out of identcpu.c to machdep.c. > >> >> > >> >> That certainly brings back memories ... > >> > > >> > Hopefully not too traumatic. :-P > >> > >> Not really. I remember the general sense of panic when the > >> vulnerability was announced and then the sense of relief when the > >> workaround was found. After that, I got lots of reminders because > >> of the boot message. > >> > >> I've still got the old hardware and am often tempted to see if it will > >> run a recent version of FreeBSD. I don't think I want to know how long > >> it would take to run buildworld post-clang. > > > > Almost as old: > > FreeBSD 11.0-CURRENT #0 r266964:267061M: Wed Jun 11 15:35:27 PDT 2014 > > jmg@carbon.funkthat.com:/usr/obj/i386.i386/usr/src/sys/serbox i386 > > FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 > > CPU: AMD-K6tm w/ multimedia extensions (200.46-MHz 586-class CPU) > > Origin="AuthenticAMD" Id=0x562 Family=0x5 Model=0x6 Stepping=2 > > Features=0x8001bf > > AMD Features=0x400<> > > > > Works great... :) > > > > Though I'll admit I didn't buildworld on this, but another newer > > machine and then dd'd an image onto a CF card.. > > How much RAM? I think my boards are using 16 MB DIMMs. Some have two > and some have four. It's even ECC RAM. I suspect that ZFS is out of > the question, though ... It has 128MB... I think I have sticks that I could up it 256MB iirc, but for it's needs (serial terminal server), it doesn't need that much ram... I've attached /var/run/dmesg.boot... The other nice thing is that USB finally works on this thing.. :) -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." --tjCHc7DPkfUGtrlw Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="dmesg.boot" Copyright (c) 1992-2014 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 11.0-CURRENT #0 r266964:267061M: Wed Jun 11 15:35:27 PDT 2014 jmg@carbon.funkthat.com:/usr/obj/i386.i386/usr/src/sys/serbox i386 FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 CPU: AMD-K6tm w/ multimedia extensions (200.46-MHz 586-class CPU) Origin="AuthenticAMD" Id=0x562 Family=0x5 Model=0x6 Stepping=2 Features=0x8001bf AMD Features=0x400<> real memory = 134217728 (128 MB) avail memory = 120770560 (115 MB) random: initialized kbd1 at kbdmux0 ACPI BIOS Error (bug): A valid RSDP was not found (20130823/tbxfroot-223) ACPI: Table initialisation failed: AE_NOT_FOUND ACPI: Try disabling either ACPI or apic support. pcib0 pcibus 0 on motherboard pir0: on motherboard pci0: on pcib0 $PIR: No matching entry for 0.7.INTD isab0: at device 7.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x6000-0x600f at device 7.1 on pci0 ata0: at channel 0 on atapci0 ata1: at channel 1 on atapci0 uhci0: port 0x6400-0x641f irq 10 at device 7.2 on pci0 usbus0 on uhci0 fxp0: port 0x6800-0x683f mem 0xe0100000-0xe0100fff,0xe0000000-0xe00fffff irq 11 at device 10.0 on pci0 miibus0: on fxp0 inphy0: PHY 1 on miibus0 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow fxp0: Ethernet address: 00:d0:b7:90:17:c9 cpu0 on motherboard attimer0: at port 0x40-0x43 irq 0 pnpid PNP0100 on isa0 Timecounter "i8254" frequency 1193182 Hz quality 0 Event timer "i8254" frequency 1193182 Hz quality 100 atrtc0: at port 0x70-0x71 irq 8 pnpid PNP0b00 on isa0 Event timer "RTC" frequency 32768 Hz quality 0 atkbdc0: at port 0x60,0x64 irq 1 pnpid PNP0303 on isa0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] unknown: can't assign resources (memory) uart0: <16550 or compatible> at port 0x3f8-0x3ff irq 4 flags 0x10 pnpid PNP0501 on isa0 fdc0: at port 0x3f2-0x3f3,0x3f4-0x3f5,0x3f7 irq 6 drq 2 pnpid PNP0700 on isa0 ppc0: at port 0x378-0x37f,0x778-0x77b irq 7 pnpid PNP0400 on isa0 ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode ppbus0: on ppc0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 uart1: <16550 or compatible> at port 0x2f8-0x2ff irq 3 pnpid PNP0501 on isa0 orm0: at iomem 0xc0000-0xc7fff,0xc8000-0xc8fff pnpid ORM0000 on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 unknown: can't assign resources (memory) Timecounters tick every 1.000 msec usbus0: 12Mbps Full Speed USB v1.0 ugen0.1: at usbus0 uhub0: on usbus0 ada0 at ata0 bus 0 scbus0 target 0 lun 0 ada0: ATA-0 device ada0: Serial Number 0 0011B1EA ada0: 16.700MB/s transfers (PIO4, PIO 512bytes) ada0: 15296MB (31326208 512 byte sectors: 15H 63S/T 16383C) ada0: Previously was known as ad0 random: unblocking device. Timecounter "TSC" frequency 200460356 Hz quality 800 uhub0: 2 ports with 2 removable, self powered Root mount waiting for: usbus0 usb_alloc_device: set address 2 failed (USB_ERR_IOERROR, ignored) Root mount waiting for: usbus0 usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR Root mount waiting for: usbus0 usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_IOERROR, ignored) Root mount waiting for: usbus0 Root mount waiting for: usbus0 usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR Root mount waiting for: usbus0 usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_IOERROR, ignored) Root mount waiting for: usbus0 Root mount waiting for: usbus0 usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_IOERROR, ignored) Root mount waiting for: usbus0 Root mount waiting for: usbus0 usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR Root mount waiting for: usbus0 usbd_req_re_enumerate: addr=2, set address failed! (USB_ERR_IOERROR, ignored) Root mount waiting for: usbus0 Root mount waiting for: usbus0 usbd_setup_device_desc: getting device descriptor at addr 2 failed, USB_ERR_IOERROR ugen0.2: at usbus0 (disconnected) uhub_reattach_port: could not allocate new device Root mount waiting for: usbus0 ugen0.2: at usbus0 Trying to mount root from ufs:/dev/ada0s1a [rw]... ugen0.3: at usbus0 uhub1: on usbus0 uhub1: 4 ports with 4 removable, self powered ugen0.4: at usbus0 uhub2: on usbus0 uhub2: 4 ports with 4 removable, self powered ugen0.5: at usbus0 ugen0.6: at usbus0 uplcom0: on usbus0 uplcom1: on usbus0 uplcom2: on usbus0 --tjCHc7DPkfUGtrlw-- From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 18:57:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 42325579; Thu, 4 Sep 2014 18:57:24 +0000 (UTC) Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26E61174A; Thu, 4 Sep 2014 18:57:23 +0000 (UTC) Received: from zeppelin.tachypleus.net (airbears2-136-152-142-27.AirBears2.Berkeley.EDU [136.152.142.27]) (authenticated bits=0) by c.mail.sonic.net (8.14.9/8.14.9) with ESMTP id s84IksGp026155 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Thu, 4 Sep 2014 11:46:55 -0700 Message-ID: <5408B39E.7030003@freebsd.org> Date: Thu, 04 Sep 2014 11:46:54 -0700 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r271116 - stable/10/sys/dev/vt/hw/ofwfb References: <201409041834.s84IYM6F078129@svn.freebsd.org> In-Reply-To: <201409041834.s84IYM6F078129@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVaRrpOMcp5whByEjR5rwdOlOdIyk9ey2FQlYOGu7pdOfUNlZhzGmItRTDjaS00/mscmsooH8b9XQKSt5RtvNWQNAqWYrkTmIzU= X-Sonic-ID: C;/ptM12M05BGiu0pcoK8kYw== M;Vt3V12M05BGiu0pcoK8kYw== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 18:57:24 -0000 There's an UPDATING entry with this commit. Could you please MFC that too? Thanks for following all of this. -Nathan On 09/04/14 11:34, Ed Maste wrote: > Author: emaste > Date: Thu Sep 4 18:34:22 2014 > New Revision: 271116 > URL: http://svnweb.freebsd.org/changeset/base/271116 > > Log: > MFC r269278 (nwhitehorn): > > Make mmap() of the console device when using ofwfb work like other > supported framebuffer drivers. This lets ofwfb work with > xf86-video-scfb and makes the driver much more generic and less > PCI-centric. This changes some user-visible behavior and will require > updates to the xorg-server port on PowerPC when using ATI graphics > cards. > > Relnotes: Yes > Sponsored by: The FreeBSD Foundation > > Modified: > stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c > ============================================================================== > --- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 18:30:33 2014 (r271115) > +++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 18:34:22 2014 (r271116) > @@ -52,16 +52,13 @@ struct ofwfb_softc { > struct fb_info fb; > > phandle_t sc_node; > + ihandle_t sc_handle; > bus_space_tag_t sc_memt; > - > - struct ofw_pci_register sc_pciaddrs[8]; > - int sc_num_pciaddrs; > }; > > static vd_probe_t ofwfb_probe; > static vd_init_t ofwfb_init; > static vd_bitbltchr_t ofwfb_bitbltchr; > -static vd_fb_mmap_t ofwfb_mmap; > > static const struct vt_driver vt_ofwfb_driver = { > .vd_name = "ofwfb", > @@ -70,7 +67,8 @@ static const struct vt_driver vt_ofwfb_d > .vd_blank = vt_fb_blank, > .vd_bitbltchr = ofwfb_bitbltchr, > .vd_maskbitbltchr = ofwfb_bitbltchr, > - .vd_fb_mmap = ofwfb_mmap, > + .vd_fb_ioctl = vt_fb_ioctl, > + .vd_fb_mmap = vt_fb_mmap, > .vd_priority = VD_PRIORITY_GENERIC+1, > }; > > @@ -198,17 +196,10 @@ static void > ofwfb_initialize(struct vt_device *vd) > { > struct ofwfb_softc *sc = vd->vd_softc; > - char name[64]; > - ihandle_t ih; > int i; > cell_t retval; > uint32_t oldpix; > > - /* Open display device, thereby initializing it */ > - memset(name, 0, sizeof(name)); > - OF_package_to_path(sc->sc_node, name, sizeof(name)); > - ih = OF_open(name); > - > /* > * Set up the color map > */ > @@ -219,7 +210,7 @@ ofwfb_initialize(struct vt_device *vd) > 16, 255, 8, 255, 0); > > for (i = 0; i < 16; i++) { > - OF_call_method("color!", ih, 4, 1, > + OF_call_method("color!", sc->sc_handle, 4, 1, > (cell_t)((sc->fb.fb_cmap[i] >> 16) & 0xff), > (cell_t)((sc->fb.fb_cmap[i] >> 8) & 0xff), > (cell_t)((sc->fb.fb_cmap[i] >> 0) & 0xff), > @@ -260,7 +251,6 @@ ofwfb_init(struct vt_device *vd) > struct ofwfb_softc *sc; > char type[64]; > phandle_t chosen; > - ihandle_t stdout; > phandle_t node; > uint32_t depth, height, width, stride; > uint32_t fb_phys; > @@ -275,14 +265,15 @@ ofwfb_init(struct vt_device *vd) > vd->vd_softc = sc = &ofwfb_conssoftc; > > chosen = OF_finddevice("/chosen"); > - OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)); > - node = OF_instance_to_package(stdout); > + OF_getprop(chosen, "stdout", &sc->sc_handle, sizeof(ihandle_t)); > + node = OF_instance_to_package(sc->sc_handle); > if (node == -1) { > /* > * The "/chosen/stdout" does not exist try > * using "screen" directly. > */ > node = OF_finddevice("screen"); > + sc->sc_handle = OF_open("screen"); > } > OF_getprop(node, "device_type", type, sizeof(type)); > if (strcmp(type, "display") != 0) > @@ -291,6 +282,13 @@ ofwfb_init(struct vt_device *vd) > /* Keep track of the OF node */ > sc->sc_node = node; > > + /* > + * Try to use a 32-bit framebuffer if possible. This may be > + * unimplemented and fail. That's fine -- it just means we are > + * stuck with the defaults. > + */ > + OF_call_method("set-depth", sc->sc_handle, 1, 1, (cell_t)32, &i); > + > /* Make sure we have needed properties */ > if (OF_getproplen(node, "height") != sizeof(height) || > OF_getproplen(node, "width") != sizeof(width) || > @@ -302,7 +300,7 @@ ofwfb_init(struct vt_device *vd) > OF_getprop(node, "depth", &depth, sizeof(depth)); > if (depth != 8 && depth != 32) > return (CN_DEAD); > - sc->fb.fb_bpp = depth; > + sc->fb.fb_bpp = sc->fb.fb_depth = depth; > > OF_getprop(node, "height", &height, sizeof(height)); > OF_getprop(node, "width", &width, sizeof(width)); > @@ -314,21 +312,6 @@ ofwfb_init(struct vt_device *vd) > sc->fb.fb_size = sc->fb.fb_height * sc->fb.fb_stride; > > /* > - * Get the PCI addresses of the adapter, if present. The node may be the > - * child of the PCI device: in that case, try the parent for > - * the assigned-addresses property. > - */ > - len = OF_getprop(node, "assigned-addresses", sc->sc_pciaddrs, > - sizeof(sc->sc_pciaddrs)); > - if (len == -1) { > - len = OF_getprop(OF_parent(node), "assigned-addresses", > - sc->sc_pciaddrs, sizeof(sc->sc_pciaddrs)); > - } > - if (len == -1) > - len = 0; > - sc->sc_num_pciaddrs = len / sizeof(struct ofw_pci_register); > - > - /* > * Grab the physical address of the framebuffer, and then map it > * into our memory space. If the MMU is not yet up, it will be > * remapped for us when relocation turns on. > @@ -339,13 +322,18 @@ ofwfb_init(struct vt_device *vd) > > #if defined(__powerpc__) > sc->sc_memt = &bs_be_tag; > - bus_space_map(sc->sc_memt, fb_phys, height * sc->fb.fb_stride, > + bus_space_map(sc->sc_memt, fb_phys, sc->fb.fb_size, > BUS_SPACE_MAP_PREFETCHABLE, &sc->fb.fb_vbase); > #elif defined(__sparc64__) > OF_decode_addr(node, 0, &space, &phys); > sc->sc_memt = &ofwfb_memt[0]; > sc->fb.fb_vbase = > sparc64_fake_bustag(space, fb_phys, sc->sc_memt); > + #elif defined(__arm__) > + sc->sc_memt = fdtbus_bs_tag; > + bus_space_map(sc->sc_memt, sc->fb.fb_pbase, sc->fb.fb_size, > + BUS_SPACE_MAP_PREFETCHABLE, > + (bus_space_handle_t *)&sc->fb.fb_vbase); > #else > #error Unsupported platform! > #endif > @@ -357,14 +345,31 @@ ofwfb_init(struct vt_device *vd) > * Linux does the same thing. > */ > > - fb_phys = sc->sc_num_pciaddrs; > - for (i = 0; i < sc->sc_num_pciaddrs; i++) { > + struct ofw_pci_register pciaddrs[8]; > + int num_pciaddrs = 0; > + > + /* > + * Get the PCI addresses of the adapter, if present. The node > + * may be the child of the PCI device: in that case, try the > + * parent for the assigned-addresses property. > + */ > + len = OF_getprop(node, "assigned-addresses", pciaddrs, > + sizeof(pciaddrs)); > + if (len == -1) { > + len = OF_getprop(OF_parent(node), "assigned-addresses", > + pciaddrs, sizeof(pciaddrs)); > + } > + if (len == -1) > + len = 0; > + num_pciaddrs = len / sizeof(struct ofw_pci_register); > + > + fb_phys = num_pciaddrs; > + for (i = 0; i < num_pciaddrs; i++) { > /* If it is too small, not the framebuffer */ > - if (sc->sc_pciaddrs[i].size_lo < > - sc->fb.fb_stride * height) > + if (pciaddrs[i].size_lo < sc->fb.fb_stride * height) > continue; > /* If it is not memory, it isn't either */ > - if (!(sc->sc_pciaddrs[i].phys_hi & > + if (!(pciaddrs[i].phys_hi & > OFW_PCI_PHYS_HI_SPACE_MEM32)) > continue; > > @@ -372,12 +377,11 @@ ofwfb_init(struct vt_device *vd) > fb_phys = i; > > /* If it is prefetchable, it certainly is */ > - if (sc->sc_pciaddrs[i].phys_hi & > - OFW_PCI_PHYS_HI_PREFETCHABLE) > + if (pciaddrs[i].phys_hi & OFW_PCI_PHYS_HI_PREFETCHABLE) > break; > } > > - if (fb_phys == sc->sc_num_pciaddrs) /* No candidates found */ > + if (fb_phys == num_pciaddrs) /* No candidates found */ > return (CN_DEAD); > > #if defined(__powerpc__) > @@ -385,7 +389,10 @@ ofwfb_init(struct vt_device *vd) > #elif defined(__sparc64__) > OF_decode_addr(node, fb_phys, &space, &phys); > sc->sc_memt = &ofwfb_memt[0]; > - sc->sc_addr = sparc64_fake_bustag(space, phys, sc->sc_memt); > + sc->fb.fb_vbase = sparc64_fake_bustag(space, phys, sc->sc_memt); > + #else > + /* No ability to interpret assigned-addresses otherwise */ > + return (CN_DEAD); > #endif > } > > @@ -398,39 +405,3 @@ ofwfb_init(struct vt_device *vd) > return (CN_INTERNAL); > } > > -static int > -ofwfb_mmap(struct vt_device *vd, vm_ooffset_t offset, vm_paddr_t *paddr, > - int prot, vm_memattr_t *memattr) > -{ > - struct ofwfb_softc *sc = vd->vd_softc; > - int i; > - > - /* > - * Make sure the requested address lies within the PCI device's > - * assigned addrs > - */ > - for (i = 0; i < sc->sc_num_pciaddrs; i++) > - if (offset >= sc->sc_pciaddrs[i].phys_lo && > - offset < (sc->sc_pciaddrs[i].phys_lo + sc->sc_pciaddrs[i].size_lo)) > - { > -#ifdef VM_MEMATTR_WRITE_COMBINING > - /* > - * If this is a prefetchable BAR, we can (and should) > - * enable write-combining. > - */ > - if (sc->sc_pciaddrs[i].phys_hi & > - OFW_PCI_PHYS_HI_PREFETCHABLE) > - *memattr = VM_MEMATTR_WRITE_COMBINING; > -#endif > - > - *paddr = offset; > - return (0); > - } > - > - /* > - * Hack for Radeon... > - */ > - *paddr = offset; > - return (0); > -} > - > From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 19:09:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EC60A46; Thu, 4 Sep 2014 19:09:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A3F61896; Thu, 4 Sep 2014 19:09:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84J99to093320; Thu, 4 Sep 2014 19:09:09 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84J98oC093318; Thu, 4 Sep 2014 19:09:08 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409041909.s84J98oC093318@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 4 Sep 2014 19:09:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271119 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 19:09:09 -0000 Author: jhb Date: Thu Sep 4 19:09:08 2014 New Revision: 271119 URL: http://svnweb.freebsd.org/changeset/base/271119 Log: In tcp_input(), don't acquire the pcbinfo global write lock for SYN packets targeting a listening socket. Permit to reduce TCP input processing starvation in context of high SYN load (e.g. short-lived TCP connections or SYN flood). Submitted by: Julien Charbon Reviewed by: adrian, hiren, jhb, Mike Bentkofsky Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_syncache.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Thu Sep 4 18:54:01 2014 (r271118) +++ head/sys/netinet/tcp_input.c Thu Sep 4 19:09:08 2014 (r271119) @@ -748,12 +748,12 @@ tcp_input(struct mbuf **mp, int *offp, i /* * Locate pcb for segment; if we're likely to add or remove a - * connection then first acquire pcbinfo lock. There are two cases + * connection then first acquire pcbinfo lock. There are three cases * where we might discover later we need a write lock despite the - * flags: ACKs moving a connection out of the syncache, and ACKs for - * a connection in TIMEWAIT. + * flags: ACKs moving a connection out of the syncache, ACKs for a + * connection in TIMEWAIT and SYNs not targeting a listening socket. */ - if ((thflags & (TH_SYN | TH_FIN | TH_RST)) != 0) { + if ((thflags & (TH_FIN | TH_RST)) != 0) { INP_INFO_WLOCK(&V_tcbinfo); ti_locked = TI_WLOCKED; } else @@ -982,10 +982,11 @@ relocked: * now be in TIMEWAIT. */ #ifdef INVARIANTS - if ((thflags & (TH_SYN | TH_FIN | TH_RST)) != 0) + if ((thflags & (TH_FIN | TH_RST)) != 0) INP_INFO_WLOCK_ASSERT(&V_tcbinfo); #endif - if (tp->t_state != TCPS_ESTABLISHED) { + if (!((tp->t_state == TCPS_ESTABLISHED && (thflags & TH_SYN) == 0) || + (tp->t_state == TCPS_LISTEN && (thflags & TH_SYN)))) { if (ti_locked == TI_UNLOCKED) { if (INP_INFO_TRY_WLOCK(&V_tcbinfo) == 0) { in_pcbref(inp); @@ -1026,17 +1027,13 @@ relocked: /* * When the socket is accepting connections (the INPCB is in LISTEN * state) we look into the SYN cache if this is a new connection - * attempt or the completion of a previous one. Because listen - * sockets are never in TCPS_ESTABLISHED, the V_tcbinfo lock will be - * held in this case. + * attempt or the completion of a previous one. */ if (so->so_options & SO_ACCEPTCONN) { struct in_conninfo inc; KASSERT(tp->t_state == TCPS_LISTEN, ("%s: so accepting but " "tp not listening", __func__)); - INP_INFO_WLOCK_ASSERT(&V_tcbinfo); - bzero(&inc, sizeof(inc)); #ifdef INET6 if (isipv6) { @@ -1059,6 +1056,8 @@ relocked: * socket appended to the listen queue in SYN_RECEIVED state. */ if ((thflags & (TH_RST|TH_ACK|TH_SYN)) == TH_ACK) { + + INP_INFO_WLOCK_ASSERT(&V_tcbinfo); /* * Parse the TCP options here because * syncookies need access to the reflected @@ -1339,8 +1338,12 @@ relocked: syncache_add(&inc, &to, th, inp, &so, m, NULL, NULL); /* * Entry added to syncache and mbuf consumed. - * Everything already unlocked by syncache_add(). + * Only the listen socket is unlocked by syncache_add(). */ + if (ti_locked == TI_WLOCKED) { + INP_INFO_WUNLOCK(&V_tcbinfo); + ti_locked = TI_UNLOCKED; + } INP_INFO_UNLOCK_ASSERT(&V_tcbinfo); return (IPPROTO_DONE); } else if (tp->t_state == TCPS_LISTEN) { Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Thu Sep 4 18:54:01 2014 (r271118) +++ head/sys/netinet/tcp_syncache.c Thu Sep 4 19:09:08 2014 (r271119) @@ -1118,7 +1118,6 @@ syncache_add(struct in_conninfo *inc, st struct syncache scs; struct ucred *cred; - INP_INFO_WLOCK_ASSERT(&V_tcbinfo); INP_WLOCK_ASSERT(inp); /* listen socket */ KASSERT((th->th_flags & (TH_RST|TH_ACK|TH_SYN)) == TH_SYN, ("%s: unexpected tcp flags", __func__)); @@ -1149,13 +1148,11 @@ syncache_add(struct in_conninfo *inc, st #ifdef MAC if (mac_syncache_init(&maclabel) != 0) { INP_WUNLOCK(inp); - INP_INFO_WUNLOCK(&V_tcbinfo); goto done; } else mac_syncache_create(maclabel, inp); #endif INP_WUNLOCK(inp); - INP_INFO_WUNLOCK(&V_tcbinfo); /* * Remember the IP options, if any. From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 19:11:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1D30BCF; Thu, 4 Sep 2014 19:11:43 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88EB4193A; Thu, 4 Sep 2014 19:11:43 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 975C2B97F; Thu, 4 Sep 2014 15:11:42 -0400 (EDT) From: John Baldwin To: Benno Rice Subject: Re: svn commit: r271085 - head/lib/libgeom Date: Thu, 04 Sep 2014 13:49:51 -0400 Message-ID: <15042946.uzA1DvBfCL@ralph.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/10.0-STABLE; KDE/4.10.5; amd64; ; ) In-Reply-To: <10BDD3FC-EED9-4A47-BAF4-8F3C2925A3E3@FreeBSD.org> References: <201409040331.s843Vn5c048905@svn.freebsd.org> <3000146.5OWvozVApa@ralph.baldwin.cx> <10BDD3FC-EED9-4A47-BAF4-8F3C2925A3E3@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 04 Sep 2014 15:11:42 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 19:11:43 -0000 On Thursday, September 04, 2014 09:29:24 AM Benno Rice wrote: > On Sep 4, 2014, at 6:51 AM, John Baldwin wrote: > > On Thursday, September 04, 2014 03:31:49 AM Benno Rice wrote: > >> Author: benno > >> Date: Thu Sep 4 03:31:48 2014 > >> New Revision: 271085 > >> URL: http://svnweb.freebsd.org/changeset/base/271085 > >>=20 > >> Log: > >> Systems with lots of geom providers can end up with a kern.geom.c= onfxml > >> value too large for the buffer allocated. Work around this by ret= rying > >> a few times with larger buffer sizes. > >=20 > > Are these systems having lots of changes to the GEOM tree while the= sysctl > > handler is being invoked? If the tree is static, the first call wi= th an > > old of NULL should return the correct length in 'l' regardless of t= he > > size as it generates the entire buffer and SYSCTL_OUT's it. (It do= esn't > > do it piecemeal and fail on ENOMEM part way through the way some ot= her > > broken sysctl handlers do.) >=20 > These systems have a lot of drives in them and around the time when w= e=E2=80=99re > trying to enumerate there can be lots of activity. In the case where = the > tree hasn=E2=80=99t changed we=E2=80=99re not doing that much extra w= ork here and it saves > us having to retry everything that happens around the geom_getxml cal= ls > inside libgeom when the tree does change. I more meant that the commit message implied you needed this to handle = a large=20 buffer, but that shouldn't be true. You should only need this to handl= e large=20 changes in the size of the buffer. (I.e. it grows by more than 4k in b= etween=20 the first two sysctl() invocations.) Doubling the size on each iterati= on is=20 one approach (and is fine), another common one is to keep both sysctls = in the=20 loop so you fetch the new size in each iteration, e.g.: buf =3D NULL; for (;;) { sysctl(..., NULL, &len); buf =3D realloc(buf, len); sysctl(..., buf, &len); } --=20 John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 19:13:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47CF5E23; Thu, 4 Sep 2014 19:13:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CF38195D; Thu, 4 Sep 2014 19:13:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84JDAUq097268; Thu, 4 Sep 2014 19:13:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84JD8YR097259; Thu, 4 Sep 2014 19:13:08 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409041913.s84JD8YR097259@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 19:13:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271120 - in stable/10/sys: dev/fb dev/vt dev/vt/hw/efifb dev/vt/hw/fb dev/vt/hw/ofwfb dev/vt/hw/vga powerpc/ps3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 19:13:10 -0000 Author: emaste Date: Thu Sep 4 19:13:07 2014 New Revision: 271120 URL: http://svnweb.freebsd.org/changeset/base/271120 Log: MFC r269685 (nwhitehorn): Retire vd_maskbitbltchr. The same functionality can be obtained by testing for mask != NULL in vd_bitbltchr, which all implementations of vd_bitbltchr() were doing anyway. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/fb/creator_vt.c stable/10/sys/dev/vt/hw/efifb/efifb.c stable/10/sys/dev/vt/hw/fb/vt_fb.c stable/10/sys/dev/vt/hw/fb/vt_fb.h stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c stable/10/sys/dev/vt/hw/vga/vt_vga.c stable/10/sys/dev/vt/vt.h stable/10/sys/dev/vt/vt_core.c stable/10/sys/powerpc/ps3/ps3_syscons.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/fb/creator_vt.c ============================================================================== --- stable/10/sys/dev/fb/creator_vt.c Thu Sep 4 19:09:08 2014 (r271119) +++ stable/10/sys/dev/fb/creator_vt.c Thu Sep 4 19:13:07 2014 (r271120) @@ -53,7 +53,6 @@ static const struct vt_driver vt_creator .vd_init = creatorfb_init, .vd_blank = creatorfb_blank, .vd_bitbltchr = creatorfb_bitbltchr, - .vd_maskbitbltchr = creatorfb_bitbltchr, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, .vd_priority = VD_PRIORITY_SPECIFIC Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- stable/10/sys/dev/vt/hw/efifb/efifb.c Thu Sep 4 19:09:08 2014 (r271119) +++ stable/10/sys/dev/vt/hw/efifb/efifb.c Thu Sep 4 19:13:07 2014 (r271120) @@ -61,7 +61,6 @@ static struct vt_driver vt_efifb_driver .vd_init = vt_efifb_init, .vd_blank = vt_fb_blank, .vd_bitbltchr = vt_fb_bitbltchr, - .vd_maskbitbltchr = vt_fb_maskbitbltchr, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, /* Better than VGA, but still generic driver. */ Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.c Thu Sep 4 19:09:08 2014 (r271119) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.c Thu Sep 4 19:13:07 2014 (r271120) @@ -50,7 +50,6 @@ static struct vt_driver vt_fb_driver = { .vd_init = vt_fb_init, .vd_blank = vt_fb_blank, .vd_bitbltchr = vt_fb_bitbltchr, - .vd_maskbitbltchr = vt_fb_maskbitbltchr, .vd_drawrect = vt_fb_drawrect, .vd_setpixel = vt_fb_setpixel, .vd_postswitch = vt_fb_postswitch, @@ -253,70 +252,6 @@ vt_fb_bitbltchr(struct vt_device *vd, co uint32_t fgc, bgc, cc, o; int c, l, bpp; u_long line; - uint8_t b; - const uint8_t *ch; - - info = vd->vd_softc; - bpp = FBTYPE_GET_BYTESPP(info); - fgc = info->fb_cmap[fg]; - bgc = info->fb_cmap[bg]; - b = 0; - if (bpl == 0) - bpl = (width + 7) >> 3; /* Bytes per sorce line. */ - - /* Don't try to put off screen pixels */ - if (((left + width) > info->fb_width) || ((top + height) > - info->fb_height)) - return; - - KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); - - line = (info->fb_stride * top) + (left * bpp); - for (l = 0; l < height; l++) { - ch = src; - for (c = 0; c < width; c++) { - if (c % 8 == 0) - b = *ch++; - else - b <<= 1; - o = line + (c * bpp); - cc = b & 0x80 ? fgc : bgc; - - switch(bpp) { - case 1: - vt_fb_mem_wr1(info, o, cc); - break; - case 2: - vt_fb_mem_wr2(info, o, cc); - break; - case 3: - /* Packed mode, so unaligned. Byte access. */ - vt_fb_mem_wr1(info, o, (cc >> 16) & 0xff); - vt_fb_mem_wr1(info, o + 1, (cc >> 8) & 0xff); - vt_fb_mem_wr1(info, o + 2, cc & 0xff); - break; - case 4: - vt_fb_mem_wr4(info, o, cc); - break; - default: - /* panic? */ - break; - } - } - line += info->fb_stride; - src += bpl; - } -} - -void -vt_fb_maskbitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, - int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, - unsigned int height, term_color_t fg, term_color_t bg) -{ - struct fb_info *info; - uint32_t fgc, bgc, cc, o; - int c, l, bpp; - u_long line; uint8_t b, m; const uint8_t *ch; Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.h ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.h Thu Sep 4 19:09:08 2014 (r271119) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.h Thu Sep 4 19:13:07 2014 (r271120) @@ -39,7 +39,6 @@ void vt_fb_suspend(void); vd_init_t vt_fb_init; vd_blank_t vt_fb_blank; vd_bitbltchr_t vt_fb_bitbltchr; -vd_maskbitbltchr_t vt_fb_maskbitbltchr; vd_postswitch_t vt_fb_postswitch; vd_fb_ioctl_t vt_fb_ioctl; vd_fb_mmap_t vt_fb_mmap; Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 19:09:08 2014 (r271119) +++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 19:13:07 2014 (r271120) @@ -66,7 +66,6 @@ static const struct vt_driver vt_ofwfb_d .vd_init = ofwfb_init, .vd_blank = vt_fb_blank, .vd_bitbltchr = ofwfb_bitbltchr, - .vd_maskbitbltchr = ofwfb_bitbltchr, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, .vd_priority = VD_PRIORITY_GENERIC+1, Modified: stable/10/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- stable/10/sys/dev/vt/hw/vga/vt_vga.c Thu Sep 4 19:09:08 2014 (r271119) +++ stable/10/sys/dev/vt/hw/vga/vt_vga.c Thu Sep 4 19:13:07 2014 (r271120) @@ -75,7 +75,6 @@ static vd_probe_t vga_probe; static vd_init_t vga_init; static vd_blank_t vga_blank; static vd_bitbltchr_t vga_bitbltchr; -static vd_maskbitbltchr_t vga_maskbitbltchr; static vd_drawrect_t vga_drawrect; static vd_setpixel_t vga_setpixel; static vd_putchar_t vga_putchar; @@ -87,7 +86,6 @@ static const struct vt_driver vt_vga_dri .vd_init = vga_init, .vd_blank = vga_blank, .vd_bitbltchr = vga_bitbltchr, - .vd_maskbitbltchr = vga_maskbitbltchr, .vd_drawrect = vga_drawrect, .vd_setpixel = vga_setpixel, .vd_putchar = vga_putchar, Modified: stable/10/sys/dev/vt/vt.h ============================================================================== --- stable/10/sys/dev/vt/vt.h Thu Sep 4 19:09:08 2014 (r271119) +++ stable/10/sys/dev/vt/vt.h Thu Sep 4 19:13:07 2014 (r271120) @@ -286,9 +286,6 @@ typedef void vd_blank_t(struct vt_device typedef void vd_bitbltchr_t(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, unsigned int height, term_color_t fg, term_color_t bg); -typedef void vd_maskbitbltchr_t(struct vt_device *vd, const uint8_t *src, - const uint8_t *mask, int bpl, vt_axis_t top, vt_axis_t left, - unsigned int width, unsigned int height, term_color_t fg, term_color_t bg); typedef void vd_putchar_t(struct vt_device *vd, term_char_t, vt_axis_t top, vt_axis_t left, term_color_t fg, term_color_t bg); typedef int vd_fb_ioctl_t(struct vt_device *, u_long, caddr_t, struct thread *); @@ -307,7 +304,6 @@ struct vt_driver { /* Drawing. */ vd_blank_t *vd_blank; vd_bitbltchr_t *vd_bitbltchr; - vd_maskbitbltchr_t *vd_maskbitbltchr; vd_drawrect_t *vd_drawrect; vd_setpixel_t *vd_setpixel; Modified: stable/10/sys/dev/vt/vt_core.c ============================================================================== --- stable/10/sys/dev/vt/vt_core.c Thu Sep 4 19:09:08 2014 (r271119) +++ stable/10/sys/dev/vt/vt_core.c Thu Sep 4 19:13:07 2014 (r271120) @@ -946,7 +946,7 @@ vt_flush(struct vt_device *vd) if ((vd->vd_my + m->h) > (size.tp_row * vf->vf_height)) h = (size.tp_row * vf->vf_height) - vd->vd_my - 1; - vd->vd_driver->vd_maskbitbltchr(vd, m->map, m->mask, bpl, + vd->vd_driver->vd_bitbltchr(vd, m->map, m->mask, bpl, vd->vd_offset.tp_row + vd->vd_my, vd->vd_offset.tp_col + vd->vd_mx, w, h, TC_WHITE, TC_BLACK); @@ -2176,8 +2176,6 @@ vt_allocate(struct vt_driver *drv, void } vd = main_vd; VT_LOCK(vd); - if (drv->vd_maskbitbltchr == NULL) - drv->vd_maskbitbltchr = drv->vd_bitbltchr; if (vd->vd_flags & VDF_ASYNC) { /* Stop vt_flush periodic task. */ Modified: stable/10/sys/powerpc/ps3/ps3_syscons.c ============================================================================== --- stable/10/sys/powerpc/ps3/ps3_syscons.c Thu Sep 4 19:09:08 2014 (r271119) +++ stable/10/sys/powerpc/ps3/ps3_syscons.c Thu Sep 4 19:13:07 2014 (r271120) @@ -77,7 +77,6 @@ static struct vt_driver vt_ps3fb_driver .vd_init = ps3fb_init, .vd_blank = vt_fb_blank, .vd_bitbltchr = vt_fb_bitbltchr, - .vd_maskbitbltchr = vt_fb_maskbitbltchr, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, /* Better than VGA, but still generic driver. */ From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 19:22:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99FADF8; Thu, 4 Sep 2014 19:22:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84F661A5D; Thu, 4 Sep 2014 19:22:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84JM1C5001951; Thu, 4 Sep 2014 19:22:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84JM1kX001950; Thu, 4 Sep 2014 19:22:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409041922.s84JM1kX001950@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 19:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271121 - stable/10/sys/dev/vt/hw/vga X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 19:22:01 -0000 Author: emaste Date: Thu Sep 4 19:22:01 2014 New Revision: 271121 URL: http://svnweb.freebsd.org/changeset/base/271121 Log: MFC r270299 (dumbbell): vt_vga: When clearing video memory, don't read from it The goal is to clear the video memory, in case an application drew to it. So the content shouldn't be loaded in the latches, it can't be trusted anyway. This improves a bit the window switch speed. Sponsored by: The FreeBSD Foundation Modified: stable/10/sys/dev/vt/hw/vga/vt_vga.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- stable/10/sys/dev/vt/hw/vga/vt_vga.c Thu Sep 4 19:13:07 2014 (r271120) +++ stable/10/sys/dev/vt/hw/vga/vt_vga.c Thu Sep 4 19:22:01 2014 (r271121) @@ -609,7 +609,6 @@ vga_initialize(struct vt_device *vd, int * planes. */ for (ofs = 0; ofs < VT_VGA_MEMSIZE; ofs++) { - MEM_READ1(sc, ofs); MEM_WRITE1(sc, ofs, 0); } } From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 19:27:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44D7F606; Thu, 4 Sep 2014 19:27:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 305711AB6; Thu, 4 Sep 2014 19:27:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84JRVwI003846; Thu, 4 Sep 2014 19:27:31 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84JRVkn003845; Thu, 4 Sep 2014 19:27:31 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409041927.s84JRVkn003845@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 4 Sep 2014 19:27:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271122 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 19:27:31 -0000 Author: glebius Date: Thu Sep 4 19:27:30 2014 New Revision: 271122 URL: http://svnweb.freebsd.org/changeset/base/271122 Log: Change a very strange code in m_demote() to simple assertion. Sponsored by: Nginx, Inc. Modified: head/sys/kern/uipc_mbuf.c Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Thu Sep 4 19:22:01 2014 (r271121) +++ head/sys/kern/uipc_mbuf.c Thu Sep 4 19:27:30 2014 (r271122) @@ -393,17 +393,13 @@ m_demote(struct mbuf *m0, int all) struct mbuf *m; for (m = all ? m0 : m0->m_next; m != NULL; m = m->m_next) { + KASSERT(m->m_nextpkt == NULL, ("%s: m_nextpkt in m %p, m0 %p", + __func__, m, m0)); if (m->m_flags & M_PKTHDR) { m_tag_delete_chain(m, NULL); m->m_flags &= ~M_PKTHDR; bzero(&m->m_pkthdr, sizeof(struct pkthdr)); } - if (m != m0 && m->m_nextpkt != NULL) { - KASSERT(m->m_nextpkt == NULL, - ("%s: m_nextpkt not NULL", __func__)); - m_freem(m->m_nextpkt); - m->m_nextpkt = NULL; - } m->m_flags = m->m_flags & (M_EXT|M_RDONLY|M_NOFREE); } } From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 19:28:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68ED574F; Thu, 4 Sep 2014 19:28:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5456D1AC9; Thu, 4 Sep 2014 19:28:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84JS3UD003973; Thu, 4 Sep 2014 19:28:03 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84JS3Oo003972; Thu, 4 Sep 2014 19:28:03 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409041928.s84JS3Oo003972@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 4 Sep 2014 19:28:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271123 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 19:28:03 -0000 Author: glebius Date: Thu Sep 4 19:28:02 2014 New Revision: 271123 URL: http://svnweb.freebsd.org/changeset/base/271123 Log: Satisfy assertion in m_demote(). Sponsored by: Nginx, Inc. Modified: head/sys/netinet/tcp_reass.c Modified: head/sys/netinet/tcp_reass.c ============================================================================== --- head/sys/netinet/tcp_reass.c Thu Sep 4 19:27:30 2014 (r271122) +++ head/sys/netinet/tcp_reass.c Thu Sep 4 19:28:02 2014 (r271123) @@ -231,6 +231,7 @@ tcp_reass(struct tcpcb *tp, struct tcphd tp->t_segq = m; if (mq && th->th_seq + *tlenp == M_TCPHDR(mq)->th_seq) { m->m_nextpkt = mq->m_nextpkt; + mq->m_nextpkt = NULL; m_catpkt(m, mq); } else m->m_nextpkt = mq; From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 19:52:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4CCFE3F; Thu, 4 Sep 2014 19:52:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8742B1D7B; Thu, 4 Sep 2014 19:52:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84JqIrc017320; Thu, 4 Sep 2014 19:52:18 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84JqHfL017311; Thu, 4 Sep 2014 19:52:17 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409041952.s84JqHfL017311@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 4 Sep 2014 19:52:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271124 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 19:52:18 -0000 Author: ian Date: Thu Sep 4 19:52:17 2014 New Revision: 271124 URL: http://svnweb.freebsd.org/changeset/base/271124 Log: Stop setting the iomux device status to disabled, now that we have a driver. Modified: head/sys/boot/fdt/dts/arm/imx6.dtsi head/sys/boot/fdt/dts/arm/wandboard-dual.dts head/sys/boot/fdt/dts/arm/wandboard-quad.dts head/sys/boot/fdt/dts/arm/wandboard-solo.dts Modified: head/sys/boot/fdt/dts/arm/imx6.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/imx6.dtsi Thu Sep 4 19:28:02 2014 (r271123) +++ head/sys/boot/fdt/dts/arm/imx6.dtsi Thu Sep 4 19:52:17 2014 (r271124) @@ -134,7 +134,6 @@ reg = <0x020e0000 0x4000>; interrupt-parent = <&gic>; interrupts = <32>; - status = "disabled"; }; gpio1: gpio@0209c000 { Modified: head/sys/boot/fdt/dts/arm/wandboard-dual.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/wandboard-dual.dts Thu Sep 4 19:28:02 2014 (r271123) +++ head/sys/boot/fdt/dts/arm/wandboard-dual.dts Thu Sep 4 19:52:17 2014 (r271124) @@ -44,7 +44,6 @@ SOC: soc@00000000 { aips@02000000 { /* AIPS1 */ - iomux@020e0000 { status = "disabled"; }; gpio@0209c000 { status = "okay"; }; gpio@020a0000 { status = "okay"; }; gpio@020a4000 { status = "okay"; }; Modified: head/sys/boot/fdt/dts/arm/wandboard-quad.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/wandboard-quad.dts Thu Sep 4 19:28:02 2014 (r271123) +++ head/sys/boot/fdt/dts/arm/wandboard-quad.dts Thu Sep 4 19:52:17 2014 (r271124) @@ -44,7 +44,6 @@ SOC: soc@00000000 { aips@02000000 { /* AIPS1 */ - iomux@020e0000 { status = "disabled"; }; gpio@0209c000 { status = "okay"; }; gpio@020a0000 { status = "okay"; }; gpio@020a4000 { status = "okay"; }; Modified: head/sys/boot/fdt/dts/arm/wandboard-solo.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/wandboard-solo.dts Thu Sep 4 19:28:02 2014 (r271123) +++ head/sys/boot/fdt/dts/arm/wandboard-solo.dts Thu Sep 4 19:52:17 2014 (r271124) @@ -44,7 +44,6 @@ SOC: soc@00000000 { aips@02000000 { /* AIPS1 */ - iomux@020e0000 { status = "disabled"; }; gpio@0209c000 { status = "okay"; }; gpio@020a0000 { status = "okay"; }; gpio@020a4000 { status = "okay"; }; From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 20:02:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22A2C1A3; Thu, 4 Sep 2014 20:02:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DD821E63; Thu, 4 Sep 2014 20:02:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84K2Skd022405; Thu, 4 Sep 2014 20:02:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84K2SKQ022404; Thu, 4 Sep 2014 20:02:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409042002.s84K2SKQ022404@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 4 Sep 2014 20:02:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271125 - stable/10/gnu/lib/libgcc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 20:02:29 -0000 Author: ngie Date: Thu Sep 4 20:02:28 2014 New Revision: 271125 URL: http://svnweb.freebsd.org/changeset/base/271125 Log: MFC r270216: Add ${LIBC} to DPADD to fix "make checkdpadd" Phabric: D632 Approved by: jmmv (mentor) Modified: stable/10/gnu/lib/libgcc/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/gnu/lib/libgcc/Makefile ============================================================================== --- stable/10/gnu/lib/libgcc/Makefile Thu Sep 4 19:52:17 2014 (r271124) +++ stable/10/gnu/lib/libgcc/Makefile Thu Sep 4 20:02:28 2014 (r271125) @@ -28,6 +28,7 @@ CFLAGS+= -DIN_GCC -DIN_LIBGCC2 -D__GCC_F -I${.CURDIR}/../../usr.bin/cc/cc_tools LDFLAGS+= -nodefaultlibs +DPADD+= ${LIBC} LDADD+= -lc OBJS= # added to below in various ways depending on TARGET_CPUARCH From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 20:07:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88841370; Thu, 4 Sep 2014 20:07:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73CB41EA5; Thu, 4 Sep 2014 20:07:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84K7jpZ023217; Thu, 4 Sep 2014 20:07:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84K7jCA023216; Thu, 4 Sep 2014 20:07:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201409042007.s84K7jCA023216@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 4 Sep 2014 20:07:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r271126 - stable/9/sbin/hastd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 20:07:45 -0000 Author: ngie Date: Thu Sep 4 20:07:44 2014 New Revision: 271126 URL: http://svnweb.freebsd.org/changeset/base/271126 Log: MFC r270433: Garbage collect libl dependency The application links and runs without libl Approved by: rpaulo (mentor) Phabric: D673 Submitted by: trociny Modified: stable/9/sbin/hastd/Makefile Directory Properties: stable/9/ (props changed) stable/9/sbin/ (props changed) stable/9/sbin/hastd/ (props changed) Modified: stable/9/sbin/hastd/Makefile ============================================================================== --- stable/9/sbin/hastd/Makefile Thu Sep 4 20:02:28 2014 (r271125) +++ stable/9/sbin/hastd/Makefile Thu Sep 4 20:07:44 2014 (r271126) @@ -29,8 +29,8 @@ CFLAGS+=-DINET CFLAGS+=-DINET6 .endif -DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBL} ${LIBPTHREAD} ${LIBUTIL} -LDADD= -lgeom -lbsdxml -lsbuf -ll -lpthread -lutil +DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBPTHREAD} ${LIBUTIL} +LDADD= -lgeom -lbsdxml -lsbuf -lpthread -lutil .if ${MK_OPENSSL} != "no" DPADD+= ${LIBCRYPTO} LDADD+= -lcrypto From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 20:12:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C56650B; Thu, 4 Sep 2014 20:12:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62F291F5C; Thu, 4 Sep 2014 20:12:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84KCn3q027572; Thu, 4 Sep 2014 20:12:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84KCacX027491; Thu, 4 Sep 2014 20:12:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201409042012.s84KCacX027491@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 4 Sep 2014 20:12:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271127 - in stable/10/sys: contrib/rdma/krping dev/cxgb dev/cxgbe/iw_cxgbe modules/mlx4 modules/mlx4ib modules/mlxen ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/d... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 20:12:49 -0000 Author: hselasky Date: Thu Sep 4 20:12:36 2014 New Revision: 271127 URL: http://svnweb.freebsd.org/changeset/base/271127 Log: MFC r270710 and r270821: - Update the OFED Linux Emulation layer as a preparation for a hardware driver update from Mellanox Technologies. - Remove empty files from the OFED Linux Emulation layer. - Fix compile warnings related to printf() and the "%lld" and "%llx" format specifiers. - Add some missing 2-clause BSD copyrights. - Add "Mellanox Technologies, Ltd." to list of copyright holders. - Add some new compatibility files. - Fix order of uninit in the mlx4ib module to avoid crash at unload using the new module_exit_order() function. Sponsored by: Mellanox Technologies Added: stable/10/sys/ofed/include/linux/cache.h - copied unchanged from r270710, head/sys/ofed/include/linux/cache.h stable/10/sys/ofed/include/linux/etherdevice.h - copied unchanged from r270710, head/sys/ofed/include/linux/etherdevice.h stable/10/sys/ofed/include/linux/kmod.h - copied unchanged from r270710, head/sys/ofed/include/linux/kmod.h stable/10/sys/ofed/include/linux/ktime.h - copied unchanged from r270710, head/sys/ofed/include/linux/ktime.h stable/10/sys/ofed/include/linux/math64.h - copied unchanged from r270710, head/sys/ofed/include/linux/math64.h stable/10/sys/ofed/include/net/if_inet6.h - copied unchanged from r270710, head/sys/ofed/include/net/if_inet6.h Deleted: stable/10/sys/ofed/include/asm/current.h stable/10/sys/ofed/include/asm/semaphore.h stable/10/sys/ofed/include/asm/system.h stable/10/sys/ofed/include/linux/atomic.h stable/10/sys/ofed/include/linux/bitmap.h stable/10/sys/ofed/include/linux/ctype.h stable/10/sys/ofed/include/linux/init.h stable/10/sys/ofed/include/linux/rtnetlink.h stable/10/sys/ofed/include/linux/stddef.h stable/10/sys/ofed/include/net/addrconf.h stable/10/sys/ofed/include/net/arp.h stable/10/sys/ofed/include/net/ip6_route.h stable/10/sys/ofed/include/net/neighbour.h Modified: stable/10/sys/contrib/rdma/krping/krping.c stable/10/sys/dev/cxgb/cxgb_osdep.h stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c stable/10/sys/modules/mlx4/Makefile stable/10/sys/modules/mlx4ib/Makefile stable/10/sys/modules/mlxen/Makefile stable/10/sys/ofed/drivers/infiniband/core/addr.c stable/10/sys/ofed/drivers/infiniband/core/cm.c stable/10/sys/ofed/drivers/infiniband/core/device.c stable/10/sys/ofed/drivers/infiniband/core/iwcm.c stable/10/sys/ofed/drivers/infiniband/core/sa_query.c stable/10/sys/ofed/drivers/infiniband/core/sysfs.c stable/10/sys/ofed/drivers/infiniband/core/ucm.c stable/10/sys/ofed/drivers/infiniband/core/user_mad.c stable/10/sys/ofed/drivers/infiniband/core/uverbs_cmd.c stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c stable/10/sys/ofed/drivers/infiniband/hw/mlx4/alias_GUID.c stable/10/sys/ofed/drivers/infiniband/hw/mlx4/cm.c stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mr.c stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c stable/10/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_allocator.c stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_provider.c stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c stable/10/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c stable/10/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h stable/10/sys/ofed/drivers/net/mlx4/alloc.c stable/10/sys/ofed/drivers/net/mlx4/cmd.c stable/10/sys/ofed/drivers/net/mlx4/cq.c stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c stable/10/sys/ofed/drivers/net/mlx4/en_rx.c stable/10/sys/ofed/drivers/net/mlx4/eq.c stable/10/sys/ofed/drivers/net/mlx4/fw.c stable/10/sys/ofed/drivers/net/mlx4/main.c stable/10/sys/ofed/drivers/net/mlx4/mcg.c stable/10/sys/ofed/drivers/net/mlx4/mr.c stable/10/sys/ofed/drivers/net/mlx4/pd.c stable/10/sys/ofed/drivers/net/mlx4/qp.c stable/10/sys/ofed/drivers/net/mlx4/reset.c stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c stable/10/sys/ofed/drivers/net/mlx4/sense.c stable/10/sys/ofed/drivers/net/mlx4/srq.c stable/10/sys/ofed/drivers/net/mlx4/xrcd.c stable/10/sys/ofed/include/asm/atomic-long.h stable/10/sys/ofed/include/asm/atomic.h stable/10/sys/ofed/include/asm/byteorder.h stable/10/sys/ofed/include/asm/fcntl.h stable/10/sys/ofed/include/asm/io.h stable/10/sys/ofed/include/asm/page.h stable/10/sys/ofed/include/asm/pgtable.h stable/10/sys/ofed/include/asm/types.h stable/10/sys/ofed/include/asm/uaccess.h stable/10/sys/ofed/include/linux/bitops.h stable/10/sys/ofed/include/linux/cdev.h stable/10/sys/ofed/include/linux/clocksource.h stable/10/sys/ofed/include/linux/compat.h stable/10/sys/ofed/include/linux/compiler.h stable/10/sys/ofed/include/linux/completion.h stable/10/sys/ofed/include/linux/delay.h stable/10/sys/ofed/include/linux/device.h stable/10/sys/ofed/include/linux/dma-attrs.h stable/10/sys/ofed/include/linux/dma-mapping.h stable/10/sys/ofed/include/linux/dmapool.h stable/10/sys/ofed/include/linux/err.h stable/10/sys/ofed/include/linux/errno.h stable/10/sys/ofed/include/linux/ethtool.h stable/10/sys/ofed/include/linux/file.h stable/10/sys/ofed/include/linux/fs.h stable/10/sys/ofed/include/linux/gfp.h stable/10/sys/ofed/include/linux/hardirq.h stable/10/sys/ofed/include/linux/idr.h stable/10/sys/ofed/include/linux/if_arp.h stable/10/sys/ofed/include/linux/if_ether.h stable/10/sys/ofed/include/linux/if_vlan.h stable/10/sys/ofed/include/linux/in.h stable/10/sys/ofed/include/linux/in6.h stable/10/sys/ofed/include/linux/inet.h stable/10/sys/ofed/include/linux/inetdevice.h stable/10/sys/ofed/include/linux/interrupt.h stable/10/sys/ofed/include/linux/io-mapping.h stable/10/sys/ofed/include/linux/io.h stable/10/sys/ofed/include/linux/ioctl.h stable/10/sys/ofed/include/linux/jiffies.h stable/10/sys/ofed/include/linux/kdev_t.h stable/10/sys/ofed/include/linux/kernel.h stable/10/sys/ofed/include/linux/kobject.h stable/10/sys/ofed/include/linux/kref.h stable/10/sys/ofed/include/linux/kthread.h stable/10/sys/ofed/include/linux/linux_compat.c stable/10/sys/ofed/include/linux/linux_idr.c stable/10/sys/ofed/include/linux/linux_radix.c stable/10/sys/ofed/include/linux/list.h stable/10/sys/ofed/include/linux/lockdep.h stable/10/sys/ofed/include/linux/log2.h stable/10/sys/ofed/include/linux/miscdevice.h stable/10/sys/ofed/include/linux/mm.h stable/10/sys/ofed/include/linux/module.h stable/10/sys/ofed/include/linux/moduleparam.h stable/10/sys/ofed/include/linux/mount.h stable/10/sys/ofed/include/linux/mutex.h stable/10/sys/ofed/include/linux/net.h stable/10/sys/ofed/include/linux/netdevice.h stable/10/sys/ofed/include/linux/notifier.h stable/10/sys/ofed/include/linux/page.h stable/10/sys/ofed/include/linux/pci.h stable/10/sys/ofed/include/linux/poll.h stable/10/sys/ofed/include/linux/radix-tree.h stable/10/sys/ofed/include/linux/random.h stable/10/sys/ofed/include/linux/rbtree.h stable/10/sys/ofed/include/linux/rwlock.h stable/10/sys/ofed/include/linux/rwsem.h stable/10/sys/ofed/include/linux/scatterlist.h stable/10/sys/ofed/include/linux/sched.h stable/10/sys/ofed/include/linux/semaphore.h stable/10/sys/ofed/include/linux/slab.h stable/10/sys/ofed/include/linux/socket.h stable/10/sys/ofed/include/linux/spinlock.h stable/10/sys/ofed/include/linux/string.h stable/10/sys/ofed/include/linux/sysfs.h stable/10/sys/ofed/include/linux/timer.h stable/10/sys/ofed/include/linux/types.h stable/10/sys/ofed/include/linux/uaccess.h stable/10/sys/ofed/include/linux/vmalloc.h stable/10/sys/ofed/include/linux/wait.h stable/10/sys/ofed/include/linux/workqueue.h stable/10/sys/ofed/include/net/ip.h stable/10/sys/ofed/include/net/ipv6.h stable/10/sys/ofed/include/net/netevent.h stable/10/sys/ofed/include/net/tcp.h stable/10/sys/ofed/include/rdma/ib_umem.h stable/10/sys/ofed/include/rdma/ib_verbs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/contrib/rdma/krping/krping.c ============================================================================== --- stable/10/sys/contrib/rdma/krping/krping.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/contrib/rdma/krping/krping.c Thu Sep 4 20:12:36 2014 (r271127) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -46,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include Modified: stable/10/sys/dev/cxgb/cxgb_osdep.h ============================================================================== --- stable/10/sys/dev/cxgb/cxgb_osdep.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/dev/cxgb/cxgb_osdep.h Thu Sep 4 20:12:36 2014 (r271127) @@ -91,8 +91,6 @@ struct t3_mbuf_hdr { #endif #endif -#define __read_mostly __attribute__((__section__(".data.read_mostly"))) - /* * Workaround for weird Chelsio issue */ Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c Thu Sep 4 20:12:36 2014 (r271127) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c ============================================================================== --- stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c Thu Sep 4 20:12:36 2014 (r271127) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include Modified: stable/10/sys/modules/mlx4/Makefile ============================================================================== --- stable/10/sys/modules/mlx4/Makefile Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/modules/mlx4/Makefile Thu Sep 4 20:12:36 2014 (r271127) @@ -27,6 +27,7 @@ opt_inet6.h: .include CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS} +CFLAGS+= -fms-extensions CWARNFLAGS.mcg.c= -Wno-unused CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} Modified: stable/10/sys/modules/mlx4ib/Makefile ============================================================================== --- stable/10/sys/modules/mlx4ib/Makefile Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/modules/mlx4ib/Makefile Thu Sep 4 20:12:36 2014 (r271127) @@ -16,6 +16,7 @@ CFLAGS+= -I${.CURDIR}/../../ofed/drivers CFLAGS+= -I${.CURDIR}/../../ofed/include/ CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM CFLAGS+= -DINET6 -DINET -DOFED +CFLAGS+= -fms-extensions .if !defined(KERNBUILDDIR) .if ${MK_INET_SUPPORT} != "no" Modified: stable/10/sys/modules/mlxen/Makefile ============================================================================== --- stable/10/sys/modules/mlxen/Makefile Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/modules/mlxen/Makefile Thu Sep 4 20:12:36 2014 (r271127) @@ -10,6 +10,7 @@ SRCS += en_rx.c en_tx.c SRCS += opt_inet.h opt_inet6.h CFLAGS+= -I${.CURDIR}/../../ofed/drivers/net/mlx4 CFLAGS+= -I${.CURDIR}/../../ofed/include/ +CFLAGS+= -fms-extensions .if !defined(KERNBUILDDIR) .if ${MK_INET_SUPPORT} != "no" Modified: stable/10/sys/ofed/drivers/infiniband/core/addr.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/addr.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/core/addr.c Thu Sep 4 20:12:36 2014 (r271127) @@ -36,12 +36,8 @@ #include #include #include -#include -#include #include #include -#include -#include #include MODULE_AUTHOR("Sean Hefty"); Modified: stable/10/sys/ofed/drivers/infiniband/core/cm.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/cm.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/core/cm.c Thu Sep 4 20:12:36 2014 (r271127) @@ -45,6 +45,9 @@ #include #include #include +#include + +#include #include #include @@ -3890,5 +3893,5 @@ static void __exit ib_cm_cleanup(void) } module_init_order(ib_cm_init, SI_ORDER_SECOND); -module_exit(ib_cm_cleanup); +module_exit_order(ib_cm_cleanup, SI_ORDER_FIRST); Modified: stable/10/sys/ofed/drivers/infiniband/core/device.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/device.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/core/device.c Thu Sep 4 20:12:36 2014 (r271127) @@ -36,7 +36,6 @@ #include #include #include -#include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/core/iwcm.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/iwcm.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/core/iwcm.c Thu Sep 4 20:12:36 2014 (r271127) @@ -43,6 +43,7 @@ #include #include #include +#include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/core/sa_query.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/sa_query.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/core/sa_query.c Thu Sep 4 20:12:36 2014 (r271127) @@ -33,7 +33,6 @@ */ #include -#include #include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/core/sysfs.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/sysfs.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/core/sysfs.c Thu Sep 4 20:12:36 2014 (r271127) @@ -36,6 +36,7 @@ #include #include +#include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/core/ucm.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/ucm.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/core/ucm.c Thu Sep 4 20:12:36 2014 (r271127) @@ -32,7 +32,6 @@ */ #include -#include #include #include #include @@ -43,6 +42,7 @@ #include #include #include +#include #include @@ -1295,7 +1295,7 @@ static void ib_ucm_remove_one(struct ib_ device_unregister(&ucm_dev->dev); } -static ssize_t show_abi_version(struct class *class, char *buf) +static ssize_t show_abi_version(struct class *class, struct class_attribute *attr, char *buf) { return sprintf(buf, "%d\n", IB_USER_CM_ABI_VERSION); } Modified: stable/10/sys/ofed/drivers/infiniband/core/user_mad.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/user_mad.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/core/user_mad.c Thu Sep 4 20:12:36 2014 (r271127) @@ -34,7 +34,6 @@ */ #include -#include #include #include #include @@ -986,7 +985,7 @@ static ssize_t show_port(struct device * } static DEVICE_ATTR(port, S_IRUGO, show_port, NULL); -static ssize_t show_abi_version(struct class *class, char *buf) +static ssize_t show_abi_version(struct class *class, struct class_attribute *attr, char *buf) { return sprintf(buf, "%d\n", IB_USER_MAD_ABI_VERSION); } Modified: stable/10/sys/ofed/drivers/infiniband/core/uverbs_cmd.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/uverbs_cmd.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/core/uverbs_cmd.c Thu Sep 4 20:12:36 2014 (r271127) @@ -35,6 +35,7 @@ #include #include +#include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c Thu Sep 4 20:12:36 2014 (r271127) @@ -35,7 +35,6 @@ */ #include -#include #include #include #include @@ -565,8 +564,12 @@ struct file *ib_uverbs_alloc_event_file( * system call on a uverbs file, which will already have a * module reference. */ +#ifdef __linux__ filp = alloc_file(uverbs_event_mnt, dget(uverbs_event_mnt->mnt_root), FMODE_READ, fops_get(&uverbs_event_fops)); +#else + filp = alloc_file(FMODE_READ, fops_get(&uverbs_event_fops)); +#endif if (!filp) { ret = -ENFILE; goto err_fd; @@ -767,7 +770,7 @@ static ssize_t show_dev_abi_version(stru } static DEVICE_ATTR(abi_version, S_IRUGO, show_dev_abi_version, NULL); -static ssize_t show_abi_version(struct class *class, char *buf) +static ssize_t show_abi_version(struct class *class, struct class_attribute *attr, char *buf) { return sprintf(buf, "%d\n", IB_USER_VERBS_ABI_VERSION); } Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/alias_GUID.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/alias_GUID.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/alias_GUID.c Thu Sep 4 20:12:36 2014 (r271127) @@ -39,7 +39,6 @@ #include #include #include -#include #include #include #include @@ -81,7 +80,7 @@ void mlx4_ib_update_cache_on_guid_change guid_indexes = be64_to_cpu((__force __be64) dev->sriov.alias_guid. ports_guid[port_num - 1]. all_rec_per_port[block_num].guid_indexes); - pr_debug("port: %d, guid_indexes: 0x%llx\n", port_num, guid_indexes); + pr_debug("port: %d, guid_indexes: 0x%llx\n", port_num, (long long)guid_indexes); for (i = 0; i < NUM_ALIAS_GUID_IN_REC; i++) { /* The location of the specific index starts from bit number 4 @@ -145,7 +144,7 @@ void mlx4_ib_notify_slaves_on_guid_chang guid_indexes = be64_to_cpu((__force __be64) dev->sriov.alias_guid. ports_guid[port_num - 1]. all_rec_per_port[block_num].guid_indexes); - pr_debug("port: %d, guid_indexes: 0x%llx\n", port_num, guid_indexes); + pr_debug("port: %d, guid_indexes: 0x%llx\n", port_num, (long long)guid_indexes); /*calculate the slaves and notify them*/ for (i = 0; i < NUM_ALIAS_GUID_IN_REC; i++) { Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/cm.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/cm.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/cm.c Thu Sep 4 20:12:36 2014 (r271127) @@ -333,7 +333,7 @@ int mlx4_ib_demux_cm_handler(struct ib_d *slave = mlx4_ib_find_real_gid(ibdev, port, gid.global.interface_id); if (*slave < 0) { mlx4_ib_warn(ibdev, "failed matching slave_id by gid (0x%llx)\n", - gid.global.interface_id); + (long long)gid.global.interface_id); return -ENOENT; } return 0; Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c Thu Sep 4 20:12:36 2014 (r271127) @@ -1664,12 +1664,12 @@ static void mlx4_ib_tunnel_comp_worker(s (MLX4_NUM_TUNNEL_BUFS - 1)); if (ret) pr_err("Failed reposting tunnel " - "buf:%lld\n", wc.wr_id); + "buf:%lld\n", (long long)wc.wr_id); break; case IB_WC_SEND: pr_debug("received tunnel send completion:" "wrid=0x%llx, status=0x%x\n", - wc.wr_id, wc.status); + (long long)wc.wr_id, wc.status); ib_destroy_ah(tun_qp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah); tun_qp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah @@ -1685,7 +1685,7 @@ static void mlx4_ib_tunnel_comp_worker(s } else { pr_debug("mlx4_ib: completion error in tunnel: %d." " status = %d, wrid = 0x%llx\n", - ctx->slave, wc.status, wc.wr_id); + ctx->slave, wc.status, (long long)wc.wr_id); if (!MLX4_TUN_IS_RECV(wc.wr_id)) { ib_destroy_ah(tun_qp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah); @@ -1837,7 +1837,7 @@ static void mlx4_ib_sqp_comp_worker(stru if (mlx4_ib_post_pv_qp_buf(ctx, sqp, wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1))) pr_err("Failed reposting SQP " - "buf:%lld\n", wc.wr_id); + "buf:%lld\n", (long long)wc.wr_id); break; default: BUG_ON(1); @@ -1846,7 +1846,7 @@ static void mlx4_ib_sqp_comp_worker(stru } else { pr_debug("mlx4_ib: completion error in tunnel: %d." " status = %d, wrid = 0x%llx\n", - ctx->slave, wc.status, wc.wr_id); + ctx->slave, wc.status, (long long)wc.wr_id); if (!MLX4_TUN_IS_RECV(wc.wr_id)) { ib_destroy_ah(sqp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah); Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c Thu Sep 4 20:12:36 2014 (r271127) @@ -37,15 +37,14 @@ #include #endif -#include #include #include #include #include -#include #include #include #include +#include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h Thu Sep 4 20:12:36 2014 (r271127) @@ -38,6 +38,7 @@ #include #include #include +#include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mr.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mr.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mr.c Thu Sep 4 20:12:36 2014 (r271127) @@ -159,7 +159,7 @@ static int mlx4_ib_umem_write_mtt_block( if (len & (mtt_size-1ULL)) { WARN(1 , "write_block: len %llx is not aligned to mtt_size %llx\n", - len, mtt_size); + (long long)len, (long long)mtt_size); return -EINVAL; } @@ -416,7 +416,7 @@ int mlx4_ib_umem_calc_optimal_mtt_size(s WARN((total_len & ((1ULL<> block_shift; end: @@ -426,7 +426,7 @@ end: */ WARN(1, "mlx4_ib_umem_calc_optimal_mtt_size - unexpected shift %lld\n", - block_shift); + (long long)block_shift); block_shift = min_shift; } Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c Thu Sep 4 20:12:36 2014 (r271127) @@ -34,7 +34,6 @@ #include #include #include -#include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c Thu Sep 4 20:12:36 2014 (r271127) @@ -34,6 +34,7 @@ #include "mlx4_ib.h" #include #include +#include #include /*show_admin_alias_guid returns the administratively assigned value of that GUID. Modified: stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_allocator.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_allocator.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_allocator.c Thu Sep 4 20:12:36 2014 (r271127) @@ -32,7 +32,6 @@ #include #include -#include #include "mthca_dev.h" Modified: stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c Thu Sep 4 20:12:36 2014 (r271127) @@ -33,7 +33,6 @@ */ #include -#include #include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_provider.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_provider.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_provider.c Thu Sep 4 20:12:36 2014 (r271127) @@ -40,6 +40,7 @@ #include #include +#include #include "mthca_dev.h" #include "mthca_cmd.h" Modified: stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c Thu Sep 4 20:12:36 2014 (r271127) @@ -30,7 +30,6 @@ * SOFTWARE. */ -#include #include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Thu Sep 4 20:12:36 2014 (r271127) @@ -40,7 +40,6 @@ static int ipoib_resolvemulti(struct ifn #include -#include #include #include #include Modified: stable/10/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h ============================================================================== --- stable/10/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h Thu Sep 4 20:12:36 2014 (r271127) @@ -702,6 +702,7 @@ void sdp_do_posts(struct sdp_sock *ssk); void sdp_rx_comp_full(struct sdp_sock *ssk); /* sdp_zcopy.c */ +struct kiocb; int sdp_sendmsg_zcopy(struct kiocb *iocb, struct socket *sk, struct iovec *iov); int sdp_handle_srcavail(struct sdp_sock *ssk, struct sdp_srcah *srcah); void sdp_handle_sendsm(struct sdp_sock *ssk, u32 mseq_ack); Modified: stable/10/sys/ofed/drivers/net/mlx4/alloc.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/alloc.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/alloc.c Thu Sep 4 20:12:36 2014 (r271127) @@ -34,8 +34,7 @@ #include #include #include -//#include /* XXX SK probabaly not needed in freeBSD XXX */ -#include +#include #include #include Modified: stable/10/sys/ofed/drivers/net/mlx4/cmd.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/cmd.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/cmd.c Thu Sep 4 20:12:36 2014 (r271127) @@ -640,7 +640,7 @@ static int mlx4_ACCESS_MEM(struct mlx4_d (slave & ~0x7f) | (size & 0xff)) { mlx4_err(dev, "Bad access mem params - slave_addr:0x%llx " "master_addr:0x%llx slave_id:%d size:%d\n", - slave_addr, master_addr, slave, size); + (long long)slave_addr, (long long)master_addr, slave, size); return -EINVAL; } @@ -1553,7 +1553,7 @@ static int mlx4_master_activate_admin_st return err; } mlx4_dbg((&(priv->dev)), "alloc mac %llx idx %d slave %d port %d\n", - vp_oper->state.mac, vp_oper->mac_idx, slave, port); + (long long)vp_oper->state.mac, vp_oper->mac_idx, slave, port); } } return 0; @@ -2117,7 +2117,7 @@ int mlx4_set_vf_mac(struct mlx4_dev *dev s_info = &priv->mfunc.master.vf_admin[vf].vport[port]; s_info->mac = mlx4_mac_to_u64(mac); mlx4_info(dev, "default mac on vf %d port %d to %llX will take afect only after vf restart\n", - vf, port, s_info->mac); + vf, port, (long long)s_info->mac); return 0; } EXPORT_SYMBOL_GPL(mlx4_set_vf_mac); Modified: stable/10/sys/ofed/drivers/net/mlx4/cq.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/cq.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/cq.c Thu Sep 4 20:12:36 2014 (r271127) @@ -34,7 +34,6 @@ * SOFTWARE. */ -#include #include #include Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Thu Sep 4 20:12:36 2014 (r271127) @@ -1580,7 +1580,7 @@ int mlx4_en_init_netdev(struct mlx4_en_d if (ILLEGAL_MAC(priv->mac)) { en_err(priv, "Port: %d, invalid mac burned: 0x%llx, quiting\n", - priv->port, priv->mac); + priv->port, (long long)priv->mac); err = -EINVAL; goto out; } Modified: stable/10/sys/ofed/drivers/net/mlx4/en_rx.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/en_rx.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/en_rx.c Thu Sep 4 20:12:36 2014 (r271127) @@ -136,7 +136,7 @@ static void mlx4_en_free_rx_desc(struct frag_info = &priv->frag_info[nr]; dma = be64_to_cpu(rx_desc->data[nr].addr); - en_dbg(DRV, priv, "Unmaping buffer at dma:0x%llx\n", (u64) dma); + en_dbg(DRV, priv, "Unmaping buffer at dma:0x%llx\n", (long long) dma); pci_unmap_single(mdev->pdev, dma, frag_info->frag_size, PCI_DMA_FROMDEVICE); m_free(mb_list[nr]); Modified: stable/10/sys/ofed/drivers/net/mlx4/eq.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/eq.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/eq.c Thu Sep 4 20:12:36 2014 (r271127) @@ -31,7 +31,6 @@ * SOFTWARE. */ -#include #include #include #include Modified: stable/10/sys/ofed/drivers/net/mlx4/fw.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/fw.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/fw.c Thu Sep 4 20:12:36 2014 (r271127) @@ -1078,14 +1078,14 @@ int mlx4_QUERY_FW(struct mlx4_dev *dev) MLX4_GET(fw->comm_bar, outbox, QUERY_FW_COMM_BAR_OFFSET); fw->comm_bar = (fw->comm_bar >> 6) * 2; mlx4_dbg(dev, "Communication vector bar:%d offset:0x%llx\n", - fw->comm_bar, fw->comm_base); + fw->comm_bar, (long long)fw->comm_base); mlx4_dbg(dev, "FW size %d KB\n", fw->fw_pages >> 2); MLX4_GET(fw->clock_offset, outbox, QUERY_FW_CLOCK_OFFSET); MLX4_GET(fw->clock_bar, outbox, QUERY_FW_CLOCK_BAR); fw->clock_bar = (fw->clock_bar >> 6) * 2; mlx4_dbg(dev, "Internal clock bar:%d offset:0x%llx\n", - fw->comm_bar, fw->comm_base); + fw->comm_bar, (long long)fw->comm_base); /* * Round up number of system pages needed in case Modified: stable/10/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/main.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/main.c Thu Sep 4 20:12:36 2014 (r271127) @@ -34,7 +34,6 @@ */ #include -#include #include #include #include @@ -42,6 +41,7 @@ #include #include #include +#include #include #include Modified: stable/10/sys/ofed/drivers/net/mlx4/mcg.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/mcg.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/mcg.c Thu Sep 4 20:12:36 2014 (r271127) @@ -886,7 +886,7 @@ int mlx4_flow_detach(struct mlx4_dev *de err = mlx4_QP_FLOW_STEERING_DETACH(dev, reg_id); if (err) mlx4_err(dev, "Fail to detach network rule. registration id = 0x%llx\n", - reg_id); + (long long)reg_id); return err; } EXPORT_SYMBOL_GPL(mlx4_flow_detach); Modified: stable/10/sys/ofed/drivers/net/mlx4/mr.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/mr.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/mr.c Thu Sep 4 20:12:36 2014 (r271127) @@ -32,7 +32,6 @@ * SOFTWARE. */ -#include #include #include #include Modified: stable/10/sys/ofed/drivers/net/mlx4/pd.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/pd.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/pd.c Thu Sep 4 20:12:36 2014 (r271127) @@ -31,7 +31,6 @@ * SOFTWARE. */ -#include #include #include Modified: stable/10/sys/ofed/drivers/net/mlx4/qp.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/qp.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/qp.c Thu Sep 4 20:12:36 2014 (r271127) @@ -33,8 +33,6 @@ * SOFTWARE. */ -#include - #include #include Modified: stable/10/sys/ofed/drivers/net/mlx4/reset.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/reset.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/reset.c Thu Sep 4 20:12:36 2014 (r271127) @@ -31,7 +31,6 @@ * SOFTWARE. */ -#include #include #include #include Modified: stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c Thu Sep 4 20:12:36 2014 (r271127) @@ -1166,7 +1166,7 @@ static int qp_res_start_move_to(struct m switch (state) { case RES_QP_BUSY: mlx4_dbg(dev, "%s: failed RES_QP, 0x%llx\n", - __func__, r->com.res_id); + __func__, (long long)r->com.res_id); err = -EBUSY; break; @@ -1174,7 +1174,7 @@ static int qp_res_start_move_to(struct m if (r->com.state == RES_QP_MAPPED && !alloc) break; - mlx4_dbg(dev, "failed RES_QP, 0x%llx\n", r->com.res_id); + mlx4_dbg(dev, "failed RES_QP, 0x%llx\n", (long long)r->com.res_id); err = -EINVAL; break; @@ -1184,7 +1184,7 @@ static int qp_res_start_move_to(struct m break; else { mlx4_dbg(dev, "failed RES_QP, 0x%llx\n", - r->com.res_id); + (long long)r->com.res_id); err = -EINVAL; } @@ -3766,7 +3766,7 @@ static int _move_all_busy(struct mlx4_de mlx4_dbg(dev, "%s id 0x%llx is busy\n", ResourceType(type), - r->res_id); + (long long)r->res_id); ++busy; } else { r->from_state = r->state; Modified: stable/10/sys/ofed/drivers/net/mlx4/sense.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/sense.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/sense.c Thu Sep 4 20:12:36 2014 (r271127) @@ -53,7 +53,7 @@ int mlx4_SENSE_PORT(struct mlx4_dev *dev } if (out_param > 2) { - mlx4_err(dev, "Sense returned illegal value: 0x%llx\n", out_param); + mlx4_err(dev, "Sense returned illegal value: 0x%llx\n", (long long)out_param); return -EINVAL; } Modified: stable/10/sys/ofed/drivers/net/mlx4/srq.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/srq.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/srq.c Thu Sep 4 20:12:36 2014 (r271127) @@ -31,8 +31,6 @@ * SOFTWARE. */ -#include - #include #include Modified: stable/10/sys/ofed/drivers/net/mlx4/xrcd.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/xrcd.c Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/drivers/net/mlx4/xrcd.c Thu Sep 4 20:12:36 2014 (r271127) @@ -31,7 +31,6 @@ * SOFTWARE. */ -#include #include #include "mlx4.h" Modified: stable/10/sys/ofed/include/asm/atomic-long.h ============================================================================== --- stable/10/sys/ofed/include/asm/atomic-long.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/include/asm/atomic-long.h Thu Sep 4 20:12:36 2014 (r271127) @@ -2,6 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #ifndef _ATOMIC_LONG_H_ #define _ATOMIC_LONG_H_ Modified: stable/10/sys/ofed/include/asm/atomic.h ============================================================================== --- stable/10/sys/ofed/include/asm/atomic.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/include/asm/atomic.h Thu Sep 4 20:12:36 2014 (r271127) @@ -2,6 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,7 +33,6 @@ #include #include #include -#include typedef struct { volatile u_int counter; @@ -90,7 +90,6 @@ static inline int atomic_add_unless(atom for (;;) { if (unlikely(c == (u))) break; - // old = atomic_cmpxchg((v), c, c + (a)); /*Linux*/ old = atomic_cmpset_int(&v->counter, c, c + (a)); if (likely(old == c)) break; Modified: stable/10/sys/ofed/include/asm/byteorder.h ============================================================================== --- stable/10/sys/ofed/include/asm/byteorder.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/include/asm/byteorder.h Thu Sep 4 20:12:36 2014 (r271127) @@ -2,6 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #ifndef _ASM_BYTEORDER_H_ #define _ASM_BYTEORDER_H_ Modified: stable/10/sys/ofed/include/asm/fcntl.h ============================================================================== --- stable/10/sys/ofed/include/asm/fcntl.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/include/asm/fcntl.h Thu Sep 4 20:12:36 2014 (r271127) @@ -2,6 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/ofed/include/asm/io.h ============================================================================== --- stable/10/sys/ofed/include/asm/io.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/include/asm/io.h Thu Sep 4 20:12:36 2014 (r271127) @@ -1,7 +1,8 @@ -/*- +/* * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,4 +27,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef _ASM_IO_H_ +#define _ASM_IO_H_ + #include + +#endif /* _ASM_IO_H_ */ Modified: stable/10/sys/ofed/include/asm/page.h ============================================================================== --- stable/10/sys/ofed/include/asm/page.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/include/asm/page.h Thu Sep 4 20:12:36 2014 (r271127) @@ -2,6 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,4 +27,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef _ASM_PAGE_H_ +#define _ASM_PAGE_H_ + #include + +#endif /*_ASM_PAGE_H_*/ Modified: stable/10/sys/ofed/include/asm/pgtable.h ============================================================================== --- stable/10/sys/ofed/include/asm/pgtable.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/include/asm/pgtable.h Thu Sep 4 20:12:36 2014 (r271127) @@ -2,6 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: stable/10/sys/ofed/include/asm/types.h ============================================================================== --- stable/10/sys/ofed/include/asm/types.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/include/asm/types.h Thu Sep 4 20:12:36 2014 (r271127) @@ -2,6 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,43 +26,36 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #ifndef _ASM_TYPES_H_ #define _ASM_TYPES_H_ -typedef unsigned short umode_t; - -typedef signed char __s8; -typedef unsigned char __u8; - -typedef signed short __s16; -typedef unsigned short __u16; - -typedef signed int __s32; -typedef unsigned int __u32; - -#if defined(__GNUC__) // && !defined(__STRICT_ANSI__) -typedef signed long long __s64; -typedef unsigned long long __u64; -#endif - #ifdef _KERNEL -typedef signed char s8; -typedef unsigned char u8; - -typedef signed short s16; -typedef unsigned short u16; - -typedef signed int s32; -typedef unsigned int u32; - -typedef signed long long s64; -typedef unsigned long long u64; +typedef uint8_t u8; +typedef uint8_t __u8; +typedef uint16_t u16; +typedef uint16_t __u16; +typedef uint32_t u32; +typedef uint32_t __u32; +typedef uint64_t u64; +typedef uint64_t __u64; + +typedef int8_t s8; +typedef int8_t __s8; +typedef int16_t s16; +typedef int16_t __s16; +typedef int32_t s32; +typedef int32_t __s32; +typedef int64_t s64; +typedef int64_t __s64; /* DMA addresses come in generic and 64-bit flavours. */ typedef vm_paddr_t dma_addr_t; typedef vm_paddr_t dma64_addr_t; +typedef unsigned short umode_t; + #endif /* _KERNEL */ #endif /* _ASM_TYPES_H_ */ Modified: stable/10/sys/ofed/include/asm/uaccess.h ============================================================================== --- stable/10/sys/ofed/include/asm/uaccess.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/include/asm/uaccess.h Thu Sep 4 20:12:36 2014 (r271127) @@ -2,6 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,6 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #ifndef _ASM_UACCESS_H_ #define _ASM_UACCESS_H_ Modified: stable/10/sys/ofed/include/linux/bitops.h ============================================================================== --- stable/10/sys/ofed/include/linux/bitops.h Thu Sep 4 20:07:44 2014 (r271126) +++ stable/10/sys/ofed/include/linux/bitops.h Thu Sep 4 20:12:36 2014 (r271127) @@ -2,6 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,6 +38,8 @@ #define BITS_TO_LONGS(n) howmany((n), BITS_PER_LONG) #define BIT_WORD(nr) ((nr) / BITS_PER_LONG) +#define BITS_PER_BYTE 8 + static inline int __ffs(int mask) { @@ -463,6 +466,27 @@ bitmap_find_free_region(unsigned long *b } /** + * bitmap_allocate_region - allocate bitmap region + * @bitmap: array of unsigned longs corresponding to the bitmap + * @pos: beginning of bit region to allocate + * @order: region size (log base 2 of number of bits) to allocate + * + * Allocate (set bits in) a specified region of a bitmap. + * + * Return 0 on success, or %-EBUSY if specified region wasn't + * free (not all bits were zero). + */ + +static inline int +bitmap_allocate_region(unsigned long *bitmap, int pos, int order) +{ + if (!__reg_op(bitmap, pos, order, REG_OP_ISFREE)) + return -EBUSY; + __reg_op(bitmap, pos, order, REG_OP_ALLOC); + return 0; +} + +/** * bitmap_release_region - release allocated bitmap region * @bitmap: array of unsigned longs corresponding to the bitmap * @pos: beginning of bit region to release @@ -480,4 +504,9 @@ bitmap_release_region(unsigned long *bit } +#define for_each_set_bit(bit, addr, size) \ + for ((bit) = find_first_bit((addr), (size)); \ + (bit) < (size); \ + (bit) = find_next_bit((addr), (size), (bit) + 1)) + #endif /* _LINUX_BITOPS_H_ */ Copied: stable/10/sys/ofed/include/linux/cache.h (from r270710, head/sys/ofed/include/linux/cache.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/ofed/include/linux/cache.h Thu Sep 4 20:12:36 2014 (r271127, copy of r270710, head/sys/ofed/include/linux/cache.h) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2010 Isilon Systems, Inc. + * Copyright (c) 2010 iX Systems, Inc. + * Copyright (c) 2010 Panasas, Inc. + * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice unmodified, this list of conditions, and the following + * disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 20:18:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B18046F1; Thu, 4 Sep 2014 20:18:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99C541FB1; Thu, 4 Sep 2014 20:18:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84KIASX028451; Thu, 4 Sep 2014 20:18:10 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84KI9Pm028441; Thu, 4 Sep 2014 20:18:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409042018.s84KI9Pm028441@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 20:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271128 - in stable/10/sys: dev/fb dev/vt dev/vt/font dev/vt/hw/efifb dev/vt/hw/fb dev/vt/hw/ofwfb dev/vt/hw/vga powerpc/ps3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 20:18:10 -0000 Author: emaste Date: Thu Sep 4 20:18:08 2014 New Revision: 271128 URL: http://svnweb.freebsd.org/changeset/base/271128 Log: MFC vt(4) improvements / sync with HEAD These are largely dumbbell@'s changes. Most significantly they address the extreme performance degradation with VGA hardware. SVN revisions in this MFC: 269471 270290 270293 270322 270324 270329 270331 270336 270338 270340 270341 270342 270343 270388 270390 270404 270411 270412 270413 270431 270446 270448 270485 270587 270589 270613 270618 270620 270667 270702 270707 270708 270720 270721 270785 270786 Detailed commit list: r270290: Test if the cursor is shown only once Later, we just see if the "struct mouse_cursor" pointer is set. This avoids the need to mess with all the conditions several times; this has been error prone. While here, rename the variable "m" to a more meaningful "cursor", like it's done elsewhere in the code. r270293: Rename the "mouse_cursor" structure to "vt_mouse_cursor" At the same time, "w" and "h" members are now called "width" and "height". The goal is to have a more "public" structure, because it will soon be passed as argument to a new callback, replacing vd_bitbltchr_t. r269471 (ray): Fix vt_vga driver to draw not-8-bit-aligned fonts correctly. Still one bug here: mouse left some gaps on track when moving left. r270322: Add new vd_bitblt_text_t callback, and implement it for vt_vga Compared to the deprecated vd_bitbltchr_t callback, vd_bitblt_text_t receives: o the whole text buffer o the dirty area o the mouse cursor (map, position, colors) This allows the backend to perform optimization on how to draw things. The goal is to remove vd_bitbltchr_t and vd_putchar_t, once all driver are converted (only vt_vga is included in this commit). In vt_vga, this allows to draw the text and the cursor in one pass, without ever reading from video memory (because it has all the context). The main benefit is the speed improvement: no more slideshow during boot! Other bugs fixed in vt_vga are: o left-most characters are drawn properly (the left-most pixels were missing with bold characters and some wide letters such as 'm') o no more black square around the cursor o no cursor flickering when the text is scrolling There are still many problems to fix: the known issues are marked with "FIXME" inside the code. r270411: vt_fb: Implement vd_bitblt_text_t for vt_fb and derivatives r270412: creator_fb: Implement vd_bitblt_text_t r270413: ofwfb: Implement vd_bitblt_text_t r270324: vt_vga: Clip the draw area to never draw offscreen This fixes a bug when two windows use different fonts, but a longer- term solution is required. The dirty area should be stored as pixels, not character cells, because such coordinates don't have the same meaning in all windows, when using different fonts. r270329: Mark new mouse position as dirty only when it's actually displayed r270331: Store cursor bitmap & colors in struct vt_device This removes the need to specify them to each call to vd_bitblt_text_t and, therefore, simplifies the API. r270336: Give the window to vd_bitblt_text_t callback ... instead of both the buffer and the font. Again, this simplifies the API. r270338: The offset to center the text area is per-window now The previous global offset, based on the last loaded font, had no meaning for other windows. This caused a shifted text area, often partly out-of-screen. r270341: vt_vga: Remove a "FIXME" comment; the issue was solved in r270338 r270340: Don't run vt_set_border() and vt_flush() concurrently In the case of vt_vga, the two concurrent calls were writing to the same VGA registers, causing incorrect refresh of the screen. r270342: Use the actual size of the mouse when marking its position as dirty This fixes a bug where part of the cursor was not erased. r270343: Remove "FIXME" about multiple locking of vt_buf in vt_flush() After some testing, it appears that acquiring the lock once and keeping it longer is slower than taking it multiple times. While here, fix a typo in another comment. r270388: vt_vga: Give only the character part of term_char_t to vga_get_cp437() This fixes a bug where vga_get_cp437() was called with an invalid argument. The screen was then filled with '?' instead of the actual character. r270390: Fix a crash in vt_mark_mouse_position_as_dirty() when in textmode In textmode, no font is loaded, thus the page fault in vt_mark_mouse_position_as_dirty() when it wants the font width/height. For now, create a fake area for the textmode. This needs to be modified if vt_vga gains mouse support in textmode. While here, fix a build failure when SC_NO_CUTPASTE is defined: vt_mark_mouse_position_as_dirty() must not be included in this case. r270404: Fix cursor handling in vt_flush() There were situations where the cursor was not erased/redrawn or its position was marked as dirty even though it's not displayed. The code is now more straightforward. At the same, add a function to determine if the cursor covers a given area. This is used by backends to know if they need to draw the cursor. This new function should be paired with a new state in struct vt_device, called vd_mshown, which indicates if the cursor should be displayed. This again simplifies vd_bitblt_text_t callback's API. r270431: vt(4): Add vd_bitblt_bmp_t callback The code was already there in all backends, we just expose it. This is used to display the splash screen. r270446: Remove vd_bitbltchr_t It's replaced by vd_bitblt_text_t, which gives more context to the backend and allows it to perform more efficiently when redrawing a given area. r270448: Fix order of arguments (x <-> y) when showing the splash screen r270485: vt_vga: Fix the display of the splash screen r270587: Take font offset into account in vt_is_cursor_in_area() This fixes a "General protection fault" in vt_vga, where vt_is_cursor_in_area() erroneously reported that the cursor was over the text. This led to negative integers stored in "unsigned int" and chaos. r270589: The cursor coordinates are relative to the drawn area ... not the whole screen. Don't use font offsets in vt_mark_mouse_position_as_dirty(). This fixes a bug where the mouse position wasn't marked as dirty when approaching the borders of the drawn area. r270613: Store a rectangle for the drawable area, not just the top-left corner This allows backends to verify they do not draw outside of this area. This fixes a bug in vt_vga where the text was happily drawn over the right and bottom margins, when using the Gallant font. r270618: Intialize drawable area rectangle each time a font is loaded This also fixes a problem where early in boot, the area was zero, leading to nothing displayed for a few seconds. r270620: vt_vga: Use Write Mode 0 to draw group of 8 pixels using 3 or more colors This replaces the method based on Write Mode 3, which required reads from the video memory to load the latches. r270667: When creating a window buffer, fill it entirely ... not just the visible part. This fixes a bug where, when switching from eg. vt_vga to vt_fb (ie. the resolution goes up), the originally hidden, uninitialized area of the buffer is displayed on the screen. This leads to a missing text cursor when it's over an unitialized area. This was also visible when selecting text: the uninitialized area was not highlighted. Internally, this area was zeroed: characters were all 0x00000000, meaning the foreground and background color was black. Now, everything is filled with a space with a gray foreground color, like the visible area. While here, remove the check for the mute flag and always use TERMINAL_NORM_ATTR as the character attribute (ie. gray foreground, black background). r270702: Implement basic support for KDSETMODE ioctl With the current implementation, this allows an X11 server to tell the console it switches a particular window in "graphics mode". This information is used by the mouse handling code to ignore sysmouse events in the window taken by the X server: only him should receive those events. r270707: Pause the vt_flush() timer when the screen is up-to-date The timer is restarted whenever a window buffer is marked as dirty or the mouse cursor moves. There's still room for improvement. For instance, we should not mark a window buffer as dirty when this window isn't displayed. r270708: vt(4): Recompute the drawable area when the resolution changes This was only done when the font changed. r270720: vt(4): Fix mouse cursor handling in vt_fb/creator_vt/ofwfb There were two issues: 1. The area given to vt_is_cursor_in_area() was adding the drawable area offset, something already handled by this function. 2. The cursor was shifted on the screen by the offset of this area and thus was misplaced or not erased. Furthermore, when reaching the bottom or right borders, the cursor was either totally removed or not erased correctly. r270721: vt(4): If the terminal shrinks, make sure the mouse is inside the new area r270785: vt(4): Change vb_history_size from "int" to "unsigned int" CID: 1230002, 1230003 r270786: Indicate that KDSETRAD case falls through the next case CID: 1229953 Relnotes: Yes Modified: stable/10/sys/dev/fb/creator_vt.c stable/10/sys/dev/vt/font/vt_mouse_cursor.c stable/10/sys/dev/vt/hw/efifb/efifb.c stable/10/sys/dev/vt/hw/fb/vt_early_fb.c stable/10/sys/dev/vt/hw/fb/vt_fb.c stable/10/sys/dev/vt/hw/fb/vt_fb.h stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c stable/10/sys/dev/vt/hw/vga/vt_vga.c stable/10/sys/dev/vt/vt.h stable/10/sys/dev/vt/vt_buf.c stable/10/sys/dev/vt/vt_core.c stable/10/sys/powerpc/ps3/ps3_syscons.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/fb/creator_vt.c ============================================================================== --- stable/10/sys/dev/fb/creator_vt.c Thu Sep 4 20:12:36 2014 (r271127) +++ stable/10/sys/dev/fb/creator_vt.c Thu Sep 4 20:18:08 2014 (r271128) @@ -45,14 +45,16 @@ __FBSDID("$FreeBSD$"); static vd_probe_t creatorfb_probe; static vd_init_t creatorfb_init; static vd_blank_t creatorfb_blank; -static vd_bitbltchr_t creatorfb_bitbltchr; +static vd_bitblt_text_t creatorfb_bitblt_text; +static vd_bitblt_bmp_t creatorfb_bitblt_bitmap; static const struct vt_driver vt_creatorfb_driver = { .vd_name = "creatorfb", .vd_probe = creatorfb_probe, .vd_init = creatorfb_init, .vd_blank = creatorfb_blank, - .vd_bitbltchr = creatorfb_bitbltchr, + .vd_bitblt_text = creatorfb_bitblt_text, + .vd_bitblt_bmp = creatorfb_bitblt_bitmap, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, .vd_priority = VD_PRIORITY_SPECIFIC @@ -176,30 +178,30 @@ creatorfb_blank(struct vt_device *vd, te } static void -creatorfb_bitbltchr(struct vt_device *vd, const uint8_t *src, - const uint8_t *mask, int bpl, vt_axis_t top, vt_axis_t left, - unsigned int width, unsigned int height, term_color_t fg, term_color_t bg) +creatorfb_bitblt_bitmap(struct vt_device *vd, const struct vt_window *vw, + const uint8_t *pattern, const uint8_t *mask, + unsigned int width, unsigned int height, + unsigned int x, unsigned int y, term_color_t fg, term_color_t bg) { struct creatorfb_softc *sc = vd->vd_softc; u_long line; uint32_t fgc, bgc; - int c; + int c, l; uint8_t b, m; fgc = sc->fb.fb_cmap[fg]; bgc = sc->fb.fb_cmap[bg]; b = m = 0; - /* Don't try to put off screen pixels */ - if (((left + width) > vd->vd_width) || ((top + height) > - vd->vd_height)) - return; - - line = (sc->fb.fb_stride * top) + 4*left; - for (; height > 0; height--) { - for (c = 0; c < width; c++) { + line = (sc->fb.fb_stride * y) + 4*x; + for (l = 0; + l < height && y + l < vw->vw_draw_area.tr_end.tp_row; + l++) { + for (c = 0; + c < width && x + c < vw->vw_draw_area.tr_end.tp_col; + c++) { if (c % 8 == 0) - b = *src++; + b = *pattern++; else b <<= 1; if (mask != NULL) { @@ -218,3 +220,55 @@ creatorfb_bitbltchr(struct vt_device *vd } } +void +creatorfb_bitblt_text(struct vt_device *vd, const struct vt_window *vw, + const term_rect_t *area) +{ + unsigned int col, row, x, y; + struct vt_font *vf; + term_char_t c; + term_color_t fg, bg; + const uint8_t *pattern; + + vf = vw->vw_font; + + for (row = area->tr_begin.tp_row; row < area->tr_end.tp_row; ++row) { + for (col = area->tr_begin.tp_col; col < area->tr_end.tp_col; + ++col) { + x = col * vf->vf_width + + vw->vw_draw_area.tr_begin.tp_col; + y = row * vf->vf_height + + vw->vw_draw_area.tr_begin.tp_row; + + c = VTBUF_GET_FIELD(&vw->vw_buf, row, col); + pattern = vtfont_lookup(vf, c); + vt_determine_colors(c, + VTBUF_ISCURSOR(&vw->vw_buf, row, col), &fg, &bg); + + creatorfb_bitblt_bitmap(vd, vw, + pattern, NULL, vf->vf_width, vf->vf_height, + x, y, fg, bg); + } + } + +#ifndef SC_NO_CUTPASTE + if (!vd->vd_mshown) + return; + + term_rect_t drawn_area; + + drawn_area.tr_begin.tp_col = area->tr_begin.tp_col * vf->vf_width; + drawn_area.tr_begin.tp_row = area->tr_begin.tp_row * vf->vf_height; + drawn_area.tr_end.tp_col = area->tr_end.tp_col * vf->vf_width; + drawn_area.tr_end.tp_row = area->tr_end.tp_row * vf->vf_height; + + if (vt_is_cursor_in_area(vd, &drawn_area)) { + creatorfb_bitblt_bitmap(vd, vw, + vd->vd_mcursor->map, vd->vd_mcursor->mask, + vd->vd_mcursor->width, vd->vd_mcursor->height, + vd->vd_mx_drawn + vw->vw_draw_area.tr_begin.tp_col, + vd->vd_my_drawn + vw->vw_draw_area.tr_begin.tp_row, + vd->vd_mcursor_fg, vd->vd_mcursor_bg); + } +#endif +} Modified: stable/10/sys/dev/vt/font/vt_mouse_cursor.c ============================================================================== --- stable/10/sys/dev/vt/font/vt_mouse_cursor.c Thu Sep 4 20:12:36 2014 (r271127) +++ stable/10/sys/dev/vt/font/vt_mouse_cursor.c Thu Sep 4 20:18:08 2014 (r271128) @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$"); #include #ifndef SC_NO_CUTPASTE -struct mouse_cursor vt_default_mouse_pointer = { +struct vt_mouse_cursor vt_default_mouse_pointer = { .map = { 0x00, /* "__ " */ 0x40, /* "_*_ " */ @@ -64,7 +64,7 @@ struct mouse_cursor vt_default_mouse_poi 0x0f, /* " ____" */ 0x0f, /* " ____" */ }, - .w = 8, - .h = 13, + .width = 8, + .height = 13, }; #endif Modified: stable/10/sys/dev/vt/hw/efifb/efifb.c ============================================================================== --- stable/10/sys/dev/vt/hw/efifb/efifb.c Thu Sep 4 20:12:36 2014 (r271127) +++ stable/10/sys/dev/vt/hw/efifb/efifb.c Thu Sep 4 20:18:08 2014 (r271128) @@ -60,7 +60,8 @@ static struct vt_driver vt_efifb_driver .vd_probe = vt_efifb_probe, .vd_init = vt_efifb_init, .vd_blank = vt_fb_blank, - .vd_bitbltchr = vt_fb_bitbltchr, + .vd_bitblt_text = vt_fb_bitblt_text, + .vd_bitblt_bmp = vt_fb_bitblt_bitmap, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, /* Better than VGA, but still generic driver. */ Modified: stable/10/sys/dev/vt/hw/fb/vt_early_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_early_fb.c Thu Sep 4 20:12:36 2014 (r271127) +++ stable/10/sys/dev/vt/hw/fb/vt_early_fb.c Thu Sep 4 20:18:08 2014 (r271128) @@ -59,7 +59,8 @@ static struct vt_driver vt_fb_early_driv .vd_probe = vt_efb_probe, .vd_init = vt_efb_init, .vd_blank = vt_fb_blank, - .vd_bitbltchr = vt_fb_bitbltchr, + .vd_bitblt_text = vt_fb_bitblt_text, + .vd_bitblt_bmp = vt_fb_bitblt_bitmap, .vd_priority = VD_PRIORITY_GENERIC, }; Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.c ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.c Thu Sep 4 20:12:36 2014 (r271127) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.c Thu Sep 4 20:18:08 2014 (r271128) @@ -41,15 +41,15 @@ __FBSDID("$FreeBSD$"); #include #include -void vt_fb_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, - int fill, term_color_t color); -void vt_fb_setpixel(struct vt_device *vd, int x, int y, term_color_t color); +static vd_drawrect_t vt_fb_drawrect; +static vd_setpixel_t vt_fb_setpixel; static struct vt_driver vt_fb_driver = { .vd_name = "fb", .vd_init = vt_fb_init, .vd_blank = vt_fb_blank, - .vd_bitbltchr = vt_fb_bitbltchr, + .vd_bitblt_text = vt_fb_bitblt_text, + .vd_bitblt_bmp = vt_fb_bitblt_bitmap, .vd_drawrect = vt_fb_drawrect, .vd_setpixel = vt_fb_setpixel, .vd_postswitch = vt_fb_postswitch, @@ -146,7 +146,7 @@ vt_fb_mmap(struct vt_device *vd, vm_ooff return (EINVAL); } -void +static void vt_fb_setpixel(struct vt_device *vd, int x, int y, term_color_t color) { struct fb_info *info; @@ -181,7 +181,7 @@ vt_fb_setpixel(struct vt_device *vd, int } -void +static void vt_fb_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, int fill, term_color_t color) { @@ -244,13 +244,14 @@ vt_fb_blank(struct vt_device *vd, term_c } void -vt_fb_bitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, - int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, - unsigned int height, term_color_t fg, term_color_t bg) +vt_fb_bitblt_bitmap(struct vt_device *vd, const struct vt_window *vw, + const uint8_t *pattern, const uint8_t *mask, + unsigned int width, unsigned int height, + unsigned int x, unsigned int y, term_color_t fg, term_color_t bg) { struct fb_info *info; uint32_t fgc, bgc, cc, o; - int c, l, bpp; + int c, l, bpp, bpl; u_long line; uint8_t b, m; const uint8_t *ch; @@ -260,20 +261,18 @@ vt_fb_bitbltchr(struct vt_device *vd, co fgc = info->fb_cmap[fg]; bgc = info->fb_cmap[bg]; b = m = 0; - if (bpl == 0) - bpl = (width + 7) >> 3; /* Bytes per sorce line. */ - - /* Don't try to put off screen pixels */ - if (((left + width) > info->fb_width) || ((top + height) > - info->fb_height)) - return; + bpl = (width + 7) >> 3; /* Bytes per source line. */ KASSERT((info->fb_vbase != 0), ("Unmapped framebuffer")); - line = (info->fb_stride * top) + (left * bpp); - for (l = 0; l < height; l++) { - ch = src; - for (c = 0; c < width; c++) { + line = (info->fb_stride * y) + (x * bpp); + for (l = 0; + l < height && y + l < vw->vw_draw_area.tr_end.tp_row; + l++) { + ch = pattern; + for (c = 0; + c < width && x + c < vw->vw_draw_area.tr_end.tp_col; + c++) { if (c % 8 == 0) b = *ch++; else @@ -312,8 +311,61 @@ vt_fb_bitbltchr(struct vt_device *vd, co } } line += info->fb_stride; - src += bpl; + pattern += bpl; + } +} + +void +vt_fb_bitblt_text(struct vt_device *vd, const struct vt_window *vw, + const term_rect_t *area) +{ + unsigned int col, row, x, y; + struct vt_font *vf; + term_char_t c; + term_color_t fg, bg; + const uint8_t *pattern; + + vf = vw->vw_font; + + for (row = area->tr_begin.tp_row; row < area->tr_end.tp_row; ++row) { + for (col = area->tr_begin.tp_col; col < area->tr_end.tp_col; + ++col) { + x = col * vf->vf_width + + vw->vw_draw_area.tr_begin.tp_col; + y = row * vf->vf_height + + vw->vw_draw_area.tr_begin.tp_row; + + c = VTBUF_GET_FIELD(&vw->vw_buf, row, col); + pattern = vtfont_lookup(vf, c); + vt_determine_colors(c, + VTBUF_ISCURSOR(&vw->vw_buf, row, col), &fg, &bg); + + vt_fb_bitblt_bitmap(vd, vw, + pattern, NULL, vf->vf_width, vf->vf_height, + x, y, fg, bg); + } + } + +#ifndef SC_NO_CUTPASTE + if (!vd->vd_mshown) + return; + + term_rect_t drawn_area; + + drawn_area.tr_begin.tp_col = area->tr_begin.tp_col * vf->vf_width; + drawn_area.tr_begin.tp_row = area->tr_begin.tp_row * vf->vf_height; + drawn_area.tr_end.tp_col = area->tr_end.tp_col * vf->vf_width; + drawn_area.tr_end.tp_row = area->tr_end.tp_row * vf->vf_height; + + if (vt_is_cursor_in_area(vd, &drawn_area)) { + vt_fb_bitblt_bitmap(vd, vw, + vd->vd_mcursor->map, vd->vd_mcursor->mask, + vd->vd_mcursor->width, vd->vd_mcursor->height, + vd->vd_mx_drawn + vw->vw_draw_area.tr_begin.tp_col, + vd->vd_my_drawn + vw->vw_draw_area.tr_begin.tp_row, + vd->vd_mcursor_fg, vd->vd_mcursor_bg); } +#endif } void Modified: stable/10/sys/dev/vt/hw/fb/vt_fb.h ============================================================================== --- stable/10/sys/dev/vt/hw/fb/vt_fb.h Thu Sep 4 20:12:36 2014 (r271127) +++ stable/10/sys/dev/vt/hw/fb/vt_fb.h Thu Sep 4 20:18:08 2014 (r271128) @@ -36,11 +36,12 @@ int vt_fb_attach(struct fb_info *info); void vt_fb_resume(void); void vt_fb_suspend(void); -vd_init_t vt_fb_init; -vd_blank_t vt_fb_blank; -vd_bitbltchr_t vt_fb_bitbltchr; -vd_postswitch_t vt_fb_postswitch; -vd_fb_ioctl_t vt_fb_ioctl; -vd_fb_mmap_t vt_fb_mmap; +vd_init_t vt_fb_init; +vd_blank_t vt_fb_blank; +vd_bitblt_text_t vt_fb_bitblt_text; +vd_bitblt_bmp_t vt_fb_bitblt_bitmap; +vd_postswitch_t vt_fb_postswitch; +vd_fb_ioctl_t vt_fb_ioctl; +vd_fb_mmap_t vt_fb_mmap; #endif /* _DEV_VT_HW_FB_VT_FB_H_ */ Modified: stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c ============================================================================== --- stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 20:12:36 2014 (r271127) +++ stable/10/sys/dev/vt/hw/ofwfb/ofwfb.c Thu Sep 4 20:18:08 2014 (r271128) @@ -58,14 +58,16 @@ struct ofwfb_softc { static vd_probe_t ofwfb_probe; static vd_init_t ofwfb_init; -static vd_bitbltchr_t ofwfb_bitbltchr; +static vd_bitblt_text_t ofwfb_bitblt_text; +static vd_bitblt_bmp_t ofwfb_bitblt_bitmap; static const struct vt_driver vt_ofwfb_driver = { .vd_name = "ofwfb", .vd_probe = ofwfb_probe, .vd_init = ofwfb_init, .vd_blank = vt_fb_blank, - .vd_bitbltchr = ofwfb_bitbltchr, + .vd_bitblt_text = ofwfb_bitblt_text, + .vd_bitblt_bmp = ofwfb_bitblt_bitmap, .vd_fb_ioctl = vt_fb_ioctl, .vd_fb_mmap = vt_fb_mmap, .vd_priority = VD_PRIORITY_GENERIC+1, @@ -100,14 +102,15 @@ ofwfb_probe(struct vt_device *vd) } static void -ofwfb_bitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, - int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, - unsigned int height, term_color_t fg, term_color_t bg) +ofwfb_bitblt_bitmap(struct vt_device *vd, const struct vt_window *vw, + const uint8_t *pattern, const uint8_t *mask, + unsigned int width, unsigned int height, + unsigned int x, unsigned int y, term_color_t fg, term_color_t bg) { struct fb_info *sc = vd->vd_softc; u_long line; uint32_t fgc, bgc; - int c; + int c, l; uint8_t b, m; union { uint32_t l; @@ -118,16 +121,16 @@ ofwfb_bitbltchr(struct vt_device *vd, co bgc = sc->fb_cmap[bg]; b = m = 0; - /* Don't try to put off screen pixels */ - if (((left + width) > vd->vd_width) || ((top + height) > - vd->vd_height)) - return; - - line = (sc->fb_stride * top) + left * sc->fb_bpp/8; + line = (sc->fb_stride * y) + x * sc->fb_bpp/8; if (mask == NULL && sc->fb_bpp == 8 && (width % 8 == 0)) { + /* Don't try to put off screen pixels */ + if (((x + width) > vd->vd_width) || ((y + height) > + vd->vd_height)) + return; + for (; height > 0; height--) { for (c = 0; c < width; c += 8) { - b = *src++; + b = *pattern++; /* * Assume that there is more background than @@ -157,10 +160,14 @@ ofwfb_bitbltchr(struct vt_device *vd, co line += sc->fb_stride; } } else { - for (; height > 0; height--) { - for (c = 0; c < width; c++) { + for (l = 0; + l < height && y + l < vw->vw_draw_area.tr_end.tp_row; + l++) { + for (c = 0; + c < width && x + c < vw->vw_draw_area.tr_end.tp_col; + c++) { if (c % 8 == 0) - b = *src++; + b = *pattern++; else b <<= 1; if (mask != NULL) { @@ -191,6 +198,59 @@ ofwfb_bitbltchr(struct vt_device *vd, co } } +void +ofwfb_bitblt_text(struct vt_device *vd, const struct vt_window *vw, + const term_rect_t *area) +{ + unsigned int col, row, x, y; + struct vt_font *vf; + term_char_t c; + term_color_t fg, bg; + const uint8_t *pattern; + + vf = vw->vw_font; + + for (row = area->tr_begin.tp_row; row < area->tr_end.tp_row; ++row) { + for (col = area->tr_begin.tp_col; col < area->tr_end.tp_col; + ++col) { + x = col * vf->vf_width + + vw->vw_draw_area.tr_begin.tp_col; + y = row * vf->vf_height + + vw->vw_draw_area.tr_begin.tp_row; + + c = VTBUF_GET_FIELD(&vw->vw_buf, row, col); + pattern = vtfont_lookup(vf, c); + vt_determine_colors(c, + VTBUF_ISCURSOR(&vw->vw_buf, row, col), &fg, &bg); + + ofwfb_bitblt_bitmap(vd, vw, + pattern, NULL, vf->vf_width, vf->vf_height, + x, y, fg, bg); + } + } + +#ifndef SC_NO_CUTPASTE + if (!vd->vd_mshown) + return; + + term_rect_t drawn_area; + + drawn_area.tr_begin.tp_col = area->tr_begin.tp_col * vf->vf_width; + drawn_area.tr_begin.tp_row = area->tr_begin.tp_row * vf->vf_height; + drawn_area.tr_end.tp_col = area->tr_end.tp_col * vf->vf_width; + drawn_area.tr_end.tp_row = area->tr_end.tp_row * vf->vf_height; + + if (vt_is_cursor_in_area(vd, &drawn_area)) { + ofwfb_bitblt_bitmap(vd, vw, + vd->vd_mcursor->map, vd->vd_mcursor->mask, + vd->vd_mcursor->width, vd->vd_mcursor->height, + vd->vd_mx_drawn + vw->vw_draw_area.tr_begin.tp_col, + vd->vd_my_drawn + vw->vw_draw_area.tr_begin.tp_row, + vd->vd_mcursor_fg, vd->vd_mcursor_bg); + } +#endif +} + static void ofwfb_initialize(struct vt_device *vd) { Modified: stable/10/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- stable/10/sys/dev/vt/hw/vga/vt_vga.c Thu Sep 4 20:12:36 2014 (r271127) +++ stable/10/sys/dev/vt/hw/vga/vt_vga.c Thu Sep 4 20:18:08 2014 (r271128) @@ -54,7 +54,8 @@ struct vga_softc { bus_space_handle_t vga_fb_handle; bus_space_tag_t vga_reg_tag; bus_space_handle_t vga_reg_handle; - int vga_curcolor; + int vga_wmode; + term_color_t vga_curfg, vga_curbg; }; /* Convenience macros. */ @@ -71,13 +72,27 @@ struct vga_softc { #define VT_VGA_HEIGHT 480 #define VT_VGA_MEMSIZE (VT_VGA_WIDTH * VT_VGA_HEIGHT / 8) +/* + * VGA is designed to handle 8 pixels at a time (8 pixels in one byte of + * memory). + */ +#define VT_VGA_PIXELS_BLOCK 8 + +/* + * We use an off-screen addresses to: + * o store the background color; + * o store pixels pattern. + * Those addresses are then loaded in the latches once. + */ +#define VT_VGA_BGCOLOR_OFFSET VT_VGA_MEMSIZE + static vd_probe_t vga_probe; static vd_init_t vga_init; static vd_blank_t vga_blank; -static vd_bitbltchr_t vga_bitbltchr; +static vd_bitblt_text_t vga_bitblt_text; +static vd_bitblt_bmp_t vga_bitblt_bitmap; static vd_drawrect_t vga_drawrect; static vd_setpixel_t vga_setpixel; -static vd_putchar_t vga_putchar; static vd_postswitch_t vga_postswitch; static const struct vt_driver vt_vga_driver = { @@ -85,10 +100,10 @@ static const struct vt_driver vt_vga_dri .vd_probe = vga_probe, .vd_init = vga_init, .vd_blank = vga_blank, - .vd_bitbltchr = vga_bitbltchr, + .vd_bitblt_text = vga_bitblt_text, + .vd_bitblt_bmp = vga_bitblt_bitmap, .vd_drawrect = vga_drawrect, .vd_setpixel = vga_setpixel, - .vd_putchar = vga_putchar, .vd_postswitch = vga_postswitch, .vd_priority = VD_PRIORITY_GENERIC, }; @@ -101,158 +116,74 @@ static struct vga_softc vga_conssoftc; VT_DRIVER_DECLARE(vt_vga, vt_vga_driver); static inline void -vga_setcolor(struct vt_device *vd, term_color_t color) +vga_setwmode(struct vt_device *vd, int wmode) { struct vga_softc *sc = vd->vd_softc; - if (sc->vga_curcolor != color) { - REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_SET_RESET); - REG_WRITE1(sc, VGA_GC_DATA, color); - sc->vga_curcolor = color; - } -} + if (sc->vga_wmode == wmode) + return; -static void -vga_blank(struct vt_device *vd, term_color_t color) -{ - struct vga_softc *sc = vd->vd_softc; - u_int ofs; + REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_MODE); + REG_WRITE1(sc, VGA_GC_DATA, wmode); + sc->vga_wmode = wmode; - vga_setcolor(vd, color); - for (ofs = 0; ofs < VT_VGA_MEMSIZE; ofs++) - MEM_WRITE1(sc, ofs, 0xff); + switch (wmode) { + case 3: + /* Re-enable all plans. */ + REG_WRITE1(sc, VGA_SEQ_ADDRESS, VGA_SEQ_MAP_MASK); + REG_WRITE1(sc, VGA_SEQ_DATA, VGA_SEQ_MM_EM3 | VGA_SEQ_MM_EM2 | + VGA_SEQ_MM_EM1 | VGA_SEQ_MM_EM0); + break; + } } static inline void -vga_bitblt_put(struct vt_device *vd, u_long dst, term_color_t color, - uint8_t v) +vga_setfg(struct vt_device *vd, term_color_t color) { struct vga_softc *sc = vd->vd_softc; - /* Skip empty writes, in order to avoid palette changes. */ - if (v != 0x00) { - vga_setcolor(vd, color); - /* - * When this MEM_READ1() gets disabled, all sorts of - * artifacts occur. This is because this read loads the - * set of 8 pixels that are about to be changed. There - * is one scenario where we can avoid the read, namely - * if all pixels are about to be overwritten anyway. - */ - if (v != 0xff) - MEM_READ1(sc, dst); - MEM_WRITE1(sc, dst, v); - } -} - -static void -vga_setpixel(struct vt_device *vd, int x, int y, term_color_t color) -{ - - vga_bitblt_put(vd, (y * VT_VGA_WIDTH / 8) + (x / 8), color, - 0x80 >> (x % 8)); -} + vga_setwmode(vd, 3); -static void -vga_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, int fill, - term_color_t color) -{ - int x, y; + if (sc->vga_curfg == color) + return; - for (y = y1; y <= y2; y++) { - if (fill || (y == y1) || (y == y2)) { - for (x = x1; x <= x2; x++) - vga_setpixel(vd, x, y, color); - } else { - vga_setpixel(vd, x1, y, color); - vga_setpixel(vd, x2, y, color); - } - } + REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_SET_RESET); + REG_WRITE1(sc, VGA_GC_DATA, color); + sc->vga_curfg = color; } static inline void -vga_bitblt_draw(struct vt_device *vd, const uint8_t *src, - u_long ldst, uint8_t shift, unsigned int width, unsigned int height, - term_color_t color, int negate) -{ - u_long dst; - int w; - uint8_t b, r, out; - - for (; height > 0; height--) { - dst = ldst; - ldst += VT_VGA_WIDTH / 8; - r = 0; - for (w = width; w > 0; w -= 8) { - b = *src++; - if (negate) { - b = ~b; - /* Don't go too far. */ - if (w < 8) - b &= 0xff << (8 - w); - } - /* Reintroduce bits from previous column. */ - out = (b >> shift) | r; - r = b << (8 - shift); - vga_bitblt_put(vd, dst++, color, out); - } - /* Print the remainder. */ - vga_bitblt_put(vd, dst, color, r); - } -} - -static void -vga_bitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, - int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, - unsigned int height, term_color_t fg, term_color_t bg) +vga_setbg(struct vt_device *vd, term_color_t color) { - u_long dst, ldst; - int w; + struct vga_softc *sc = vd->vd_softc; - /* Don't try to put off screen pixels */ - if (((left + width) > VT_VGA_WIDTH) || ((top + height) > - VT_VGA_HEIGHT)) - return; + vga_setwmode(vd, 3); - dst = (VT_VGA_WIDTH * top + left) / 8; + if (sc->vga_curbg == color) + return; - for (; height > 0; height--) { - ldst = dst; - for (w = width; w > 0; w -= 8) { - vga_bitblt_put(vd, ldst, fg, *src); - vga_bitblt_put(vd, ldst, bg, ~*src); - ldst++; - src++; - } - dst += VT_VGA_WIDTH / 8; - } -} + REG_WRITE1(sc, VGA_GC_ADDRESS, VGA_GC_SET_RESET); + REG_WRITE1(sc, VGA_GC_DATA, color); -/* Bitblt with mask support. Slow. */ -static void -vga_maskbitbltchr(struct vt_device *vd, const uint8_t *src, const uint8_t *mask, - int bpl, vt_axis_t top, vt_axis_t left, unsigned int width, - unsigned int height, term_color_t fg, term_color_t bg) -{ - struct vga_softc *sc = vd->vd_softc; - u_long dst; - uint8_t shift; + /* + * Write 8 pixels using the background color to an off-screen + * byte in the video memory. + */ + MEM_WRITE1(sc, VT_VGA_BGCOLOR_OFFSET, 0xff); - dst = (VT_VGA_WIDTH * top + left) / 8; - shift = left % 8; + /* + * Read those 8 pixels back to load the background color in the + * latches register. + */ + MEM_READ1(sc, VT_VGA_BGCOLOR_OFFSET); - /* Don't try to put off screen pixels */ - if (((left + width) > VT_VGA_WIDTH) || ((top + height) > - VT_VGA_HEIGHT)) - return; + sc->vga_curbg = color; - if (sc->vga_curcolor == fg) { - vga_bitblt_draw(vd, src, dst, shift, width, height, fg, 0); - vga_bitblt_draw(vd, src, dst, shift, width, height, bg, 1); - } else { - vga_bitblt_draw(vd, src, dst, shift, width, height, bg, 1); - vga_bitblt_draw(vd, src, dst, shift, width, height, fg, 0); - } + /* + * The Set/Reset register doesn't contain the fg color anymore, + * store an invalid color. + */ + sc->vga_curfg = 0xff; } /* @@ -381,25 +312,635 @@ vga_get_cp437(term_char_t c) } static void -vga_putchar(struct vt_device *vd, term_char_t c, - vt_axis_t top, vt_axis_t left, term_color_t fg, term_color_t bg) +vga_blank(struct vt_device *vd, term_color_t color) { struct vga_softc *sc = vd->vd_softc; - uint8_t ch, attr; + u_int ofs; + + vga_setfg(vd, color); + for (ofs = 0; ofs < VT_VGA_MEMSIZE; ofs++) + MEM_WRITE1(sc, ofs, 0xff); +} + +static inline void +vga_bitblt_put(struct vt_device *vd, u_long dst, term_color_t color, + uint8_t v) +{ + struct vga_softc *sc = vd->vd_softc; + + /* Skip empty writes, in order to avoid palette changes. */ + if (v != 0x00) { + vga_setfg(vd, color); + /* + * When this MEM_READ1() gets disabled, all sorts of + * artifacts occur. This is because this read loads the + * set of 8 pixels that are about to be changed. There + * is one scenario where we can avoid the read, namely + * if all pixels are about to be overwritten anyway. + */ + if (v != 0xff) { + MEM_READ1(sc, dst); + + /* The bg color was trashed by the reads. */ + sc->vga_curbg = 0xff; + } + MEM_WRITE1(sc, dst, v); + } +} + +static void +vga_setpixel(struct vt_device *vd, int x, int y, term_color_t color) +{ + + vga_bitblt_put(vd, (y * VT_VGA_WIDTH / 8) + (x / 8), color, + 0x80 >> (x % 8)); +} + +static void +vga_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, int fill, + term_color_t color) +{ + int x, y; + + for (y = y1; y <= y2; y++) { + if (fill || (y == y1) || (y == y2)) { + for (x = x1; x <= x2; x++) + vga_setpixel(vd, x, y, color); + } else { + vga_setpixel(vd, x1, y, color); + vga_setpixel(vd, x2, y, color); + } + } +} + +static void +vga_compute_shifted_pattern(const uint8_t *src, unsigned int bytes, + unsigned int src_x, unsigned int x_count, unsigned int dst_x, + uint8_t *pattern, uint8_t *mask) +{ + unsigned int n; + + n = src_x / 8; + + /* + * This mask has bits set, where a pixel (ether 0 or 1) + * comes from the source bitmap. + */ + if (mask != NULL) { + *mask = (0xff + >> (8 - x_count)) + << (8 - x_count - dst_x); + } + + if (n == (src_x + x_count - 1) / 8) { + /* All the pixels we want are in the same byte. */ + *pattern = src[n]; + if (dst_x >= src_x) + *pattern >>= (dst_x - src_x % 8); + else + *pattern <<= (src_x % 8 - dst_x); + } else { + /* The pixels we want are split into two bytes. */ + if (dst_x >= src_x % 8) { + *pattern = + src[n] << (8 - dst_x - src_x % 8) | + src[n + 1] >> (dst_x - src_x % 8); + } else { + *pattern = + src[n] << (src_x % 8 - dst_x) | + src[n + 1] >> (8 - src_x % 8 - dst_x); + } + } +} + +static void +vga_copy_bitmap_portion(uint8_t *pattern_2colors, uint8_t *pattern_ncolors, + const uint8_t *src, const uint8_t *src_mask, unsigned int src_width, + unsigned int src_x, unsigned int dst_x, unsigned int x_count, + unsigned int src_y, unsigned int dst_y, unsigned int y_count, + term_color_t fg, term_color_t bg, int overwrite) +{ + unsigned int i, bytes; + uint8_t pattern, relevant_bits, mask; + + bytes = (src_width + 7) / 8; + + for (i = 0; i < y_count; ++i) { + vga_compute_shifted_pattern(src + (src_y + i) * bytes, + bytes, src_x, x_count, dst_x, &pattern, &relevant_bits); + + if (src_mask == NULL) { + /* + * No src mask. Consider that all wanted bits + * from the source are "authoritative". + */ + mask = relevant_bits; + } else { + /* + * There's an src mask. We shift it the same way + * we shifted the source pattern. + */ + vga_compute_shifted_pattern( + src_mask + (src_y + i) * bytes, + bytes, src_x, x_count, dst_x, + &mask, NULL); + + /* Now, only keep the wanted bits among them. */ + mask &= relevant_bits; + } + + /* + * Clear bits from the pattern which must be + * transparent, according to the source mask. + */ + pattern &= mask; + + /* Set the bits in the 2-colors array. */ + if (overwrite) + pattern_2colors[dst_y + i] &= ~mask; + pattern_2colors[dst_y + i] |= pattern; + + if (pattern_ncolors == NULL) + continue; + + /* + * Set the same bits in the n-colors array. This one + * supports transparency, when a given bit is cleared in + * all colors. + */ + if (overwrite) { + /* + * Ensure that the pixels used by this bitmap are + * cleared in other colors. + */ + for (int j = 0; j < 16; ++j) + pattern_ncolors[(dst_y + i) * 16 + j] &= + ~mask; + } + pattern_ncolors[(dst_y + i) * 16 + fg] |= pattern; + pattern_ncolors[(dst_y + i) * 16 + bg] |= (~pattern & mask); + } +} + +static void +vga_bitblt_pixels_block_2colors(struct vt_device *vd, const uint8_t *masks, + term_color_t fg, term_color_t bg, + unsigned int x, unsigned int y, unsigned int height) +{ + unsigned int i, offset; + struct vga_softc *sc; + + /* + * The great advantage of Write Mode 3 is that we just need + * to load the foreground in the Set/Reset register, load the + * background color in the latches register (this is done + * through a write in offscreen memory followed by a read of + * that data), then write the pattern to video memory. This + * pattern indicates if the pixel should use the foreground + * color (bit set) or the background color (bit cleared). + */ + + vga_setbg(vd, bg); + vga_setfg(vd, fg); + + sc = vd->vd_softc; + offset = (VT_VGA_WIDTH * y + x) / 8; + + for (i = 0; i < height; ++i, offset += VT_VGA_WIDTH / 8) { + MEM_WRITE1(sc, offset, masks[i]); + } +} + +static void +vga_bitblt_pixels_block_ncolors(struct vt_device *vd, const uint8_t *masks, + unsigned int x, unsigned int y, unsigned int height) +{ + unsigned int i, j, plan, color, offset; + struct vga_softc *sc; + uint8_t mask, plans[height * 4]; + + sc = vd->vd_softc; + + memset(plans, 0, sizeof(plans)); + + /* + * To write a group of pixels using 3 or more colors, we select + * Write Mode 0 and write one byte to each plan separately. + */ + + /* + * We first compute each byte: each plan contains one bit of the + * color code for each of the 8 pixels. + * + * For example, if the 8 pixels are like this: + * GBBBBBBY + * where: + * G (gray) = 0b0111 + * B (black) = 0b0000 + * Y (yellow) = 0b0011 + * + * The corresponding for bytes are: + * GBBBBBBY + * Plan 0: 10000001 = 0x81 + * Plan 1: 10000001 = 0x81 + * Plan 2: 10000000 = 0x80 + * Plan 3: 00000000 = 0x00 + * | | | + * | | +-> 0b0011 (Y) + * | +-----> 0b0000 (B) + * +--------> 0b0111 (G) + */ + + for (i = 0; i < height; ++i) { + for (color = 0; color < 16; ++color) { + mask = masks[i * 16 + color]; + if (mask == 0x00) + continue; + + for (j = 0; j < 8; ++j) { + if (!((mask >> (7 - j)) & 0x1)) + continue; + + /* The pixel "j" uses color "color". */ + for (plan = 0; plan < 4; ++plan) + plans[i * 4 + plan] |= + ((color >> plan) & 0x1) << (7 - j); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 20:21:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89D94875; Thu, 4 Sep 2014 20:21:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 747FE10B0; Thu, 4 Sep 2014 20:21:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84KLV87032299; Thu, 4 Sep 2014 20:21:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84KLV7s032298; Thu, 4 Sep 2014 20:21:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409042021.s84KLV7s032298@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 20:21:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271129 - stable/10/lib/libstand/powerpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 20:21:31 -0000 Author: emaste Date: Thu Sep 4 20:21:30 2014 New Revision: 271129 URL: http://svnweb.freebsd.org/changeset/base/271129 Log: MFC r261591 (nwhitehorn): Make libstand setjmp work for both 64- and 32-bit ABIs. Modified: stable/10/lib/libstand/powerpc/_setjmp.S Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libstand/powerpc/_setjmp.S ============================================================================== --- stable/10/lib/libstand/powerpc/_setjmp.S Thu Sep 4 20:18:08 2014 (r271128) +++ stable/10/lib/libstand/powerpc/_setjmp.S Thu Sep 4 20:21:30 2014 (r271129) @@ -1,36 +1,115 @@ -/* $NetBSD: _setjmp.S,v 1.1 1997/03/29 20:55:53 thorpej Exp $ */ +/* $FreeBSD$ */ +/* from: NetBSD: setjmp.S,v 1.1 1998/01/27 15:13:12 sakamoto Exp $ */ +/* from: OpenBSD: setjmp.S,v 1.2 1996/12/28 06:22:18 rahnds Exp */ +/* kernel version of this file, does not have signal goop */ +/* int setjmp(jmp_buf env) */ #include -#if (defined(LIBC_SCCS) || defined(LIBC_RCS)) && !defined(lint) - .text - .asciz "$FreeBSD$" +#ifdef __powerpc64__ +#define LD_REG ld +#define ST_REG std +#define REGWIDTH 8 +#else +#define LD_REG lwz +#define ST_REG stw +#define REGWIDTH 4 #endif -/* - * C library -- _setjmp, _longjmp - * - * _longjmp(a,v) - * will generate a "return(v?v:1)" from the last call to - * _setjmp(a) - * by restoring registers from the stack. - * The previous signal state is NOT restored. - */ - -ENTRY(_setjmp) - mflr 11 - mfcr 12 - mr 10,1 - mr 9,2 - stmw 9,8(3) - li 3,0 +#define JMP_r1 1*REGWIDTH +#define JMP_r2 2*REGWIDTH +#define JMP_r14 3*REGWIDTH +#define JMP_r15 4*REGWIDTH +#define JMP_r16 5*REGWIDTH +#define JMP_r17 6*REGWIDTH +#define JMP_r18 7*REGWIDTH +#define JMP_r19 8*REGWIDTH +#define JMP_r20 9*REGWIDTH +#define JMP_r21 10*REGWIDTH +#define JMP_r22 11*REGWIDTH +#define JMP_r23 12*REGWIDTH +#define JMP_r24 13*REGWIDTH +#define JMP_r25 14*REGWIDTH +#define JMP_r26 15*REGWIDTH +#define JMP_r27 16*REGWIDTH +#define JMP_r28 17*REGWIDTH +#define JMP_r29 18*REGWIDTH +#define JMP_r30 19*REGWIDTH +#define JMP_r31 20*REGWIDTH +#define JMP_lr 21*REGWIDTH +#define JMP_cr 22*REGWIDTH +#define JMP_ctr 23*REGWIDTH +#define JMP_xer 24*REGWIDTH +#define JMP_sig 25*REGWIDTH + +ASENTRY_NOPROF(setjmp) + ST_REG 31, JMP_r31(3) + /* r1, r2, r14-r30 */ + ST_REG 1, JMP_r1 (3) + ST_REG 2, JMP_r2 (3) + ST_REG 14, JMP_r14(3) + ST_REG 15, JMP_r15(3) + ST_REG 16, JMP_r16(3) + ST_REG 17, JMP_r17(3) + ST_REG 18, JMP_r18(3) + ST_REG 19, JMP_r19(3) + ST_REG 20, JMP_r20(3) + ST_REG 21, JMP_r21(3) + ST_REG 22, JMP_r22(3) + ST_REG 23, JMP_r23(3) + ST_REG 24, JMP_r24(3) + ST_REG 25, JMP_r25(3) + ST_REG 26, JMP_r26(3) + ST_REG 27, JMP_r27(3) + ST_REG 28, JMP_r28(3) + ST_REG 29, JMP_r29(3) + ST_REG 30, JMP_r30(3) + /* cr, lr, ctr, xer */ + mfcr 0 + ST_REG 0, JMP_cr(3) + mflr 0 + ST_REG 0, JMP_lr(3) + mfctr 0 + ST_REG 0, JMP_ctr(3) + mfxer 0 + ST_REG 0, JMP_xer(3) + /* f14-f31, fpscr */ + li 3, 0 blr -ENTRY(_longjmp) - lmw 9,8(3) - mtlr 11 - mtcr 12 - mr 2,9 - mr 1,10 - mr 3,4 + +.extern sigsetmask +ASENTRY_NOPROF(longjmp) + LD_REG 31, JMP_r31(3) + /* r1, r2, r14-r30 */ + LD_REG 1, JMP_r1 (3) + LD_REG 2, JMP_r2 (3) + LD_REG 14, JMP_r14(3) + LD_REG 15, JMP_r15(3) + LD_REG 16, JMP_r16(3) + LD_REG 17, JMP_r17(3) + LD_REG 18, JMP_r18(3) + LD_REG 19, JMP_r19(3) + LD_REG 20, JMP_r20(3) + LD_REG 21, JMP_r21(3) + LD_REG 22, JMP_r22(3) + LD_REG 23, JMP_r23(3) + LD_REG 24, JMP_r24(3) + LD_REG 25, JMP_r25(3) + LD_REG 26, JMP_r26(3) + LD_REG 27, JMP_r27(3) + LD_REG 28, JMP_r28(3) + LD_REG 29, JMP_r29(3) + LD_REG 30, JMP_r30(3) + /* cr, lr, ctr, xer */ + LD_REG 0, JMP_cr(3) + mtcr 0 + LD_REG 0, JMP_lr(3) + mtlr 0 + LD_REG 0, JMP_ctr(3) + mtctr 0 + LD_REG 0, JMP_xer(3) + mtxer 0 + /* f14-f31, fpscr */ + mr 3, 4 blr From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 20:35:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EFC6BF9; Thu, 4 Sep 2014 20:35:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77EE41257; Thu, 4 Sep 2014 20:35:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84KZuiu037645; Thu, 4 Sep 2014 20:35:56 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84KZskQ037633; Thu, 4 Sep 2014 20:35:54 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409042035.s84KZskQ037633@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 20:35:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271130 - in stable/10/sys/boot: . i386/efi i386/gptboot i386/gptzfsboot i386/loader i386/zfsboot libstand32 powerpc/ofw powerpc/ps3 powerpc/uboot X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 20:35:56 -0000 Author: emaste Date: Thu Sep 4 20:35:53 2014 New Revision: 271130 URL: http://svnweb.freebsd.org/changeset/base/271130 Log: r261567: Build a 32-bit libstand under sys/boot/ A 32-bit libstand is needed on 64-bit platforms for use by various bootloaders. Previously only the 32-bit version was built, installed as /usr/lib/libstand.a. A new 64-bit libstand consumer will arrive in the near future, so move the bootloader-specific 32-bit version to sys/boot/libstand32/. Explicitly link against this version in the 32-bit loaders. r261614: Build a 32-bit libstand under sys/boot/ for ppc64 This change is equivalent to r261567 for i386/amd64. Relnotes: Yes Sponsored by: The FreeBSD Foundation Added: stable/10/sys/boot/libstand32/ - copied from r261567, head/sys/boot/libstand32/ Modified: stable/10/sys/boot/Makefile.amd64 stable/10/sys/boot/Makefile.i386 stable/10/sys/boot/Makefile.powerpc stable/10/sys/boot/i386/efi/Makefile stable/10/sys/boot/i386/gptboot/Makefile stable/10/sys/boot/i386/gptzfsboot/Makefile stable/10/sys/boot/i386/loader/Makefile stable/10/sys/boot/i386/zfsboot/Makefile stable/10/sys/boot/powerpc/ofw/Makefile stable/10/sys/boot/powerpc/ps3/Makefile stable/10/sys/boot/powerpc/uboot/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/Makefile.amd64 ============================================================================== --- stable/10/sys/boot/Makefile.amd64 Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/Makefile.amd64 Thu Sep 4 20:35:53 2014 (r271130) @@ -1,5 +1,6 @@ # $FreeBSD$ SUBDIR+= efi +SUBDIR+= libstand32 SUBDIR+= zfs SUBDIR+= userboot Modified: stable/10/sys/boot/Makefile.i386 ============================================================================== --- stable/10/sys/boot/Makefile.i386 Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/Makefile.i386 Thu Sep 4 20:35:53 2014 (r271130) @@ -1,4 +1,5 @@ # $FreeBSD$ SUBDIR+= efi +SUBDIR+= libstand32 SUBDIR+= zfs Modified: stable/10/sys/boot/Makefile.powerpc ============================================================================== --- stable/10/sys/boot/Makefile.powerpc Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/Makefile.powerpc Thu Sep 4 20:35:53 2014 (r271130) @@ -4,5 +4,6 @@ SUBDIR+= fdt .endif +SUBDIR+= libstand32 SUBDIR+= ofw SUBDIR+= uboot Modified: stable/10/sys/boot/i386/efi/Makefile ============================================================================== --- stable/10/sys/boot/i386/efi/Makefile Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/i386/efi/Makefile Thu Sep 4 20:35:53 2014 (r271130) @@ -60,6 +60,7 @@ loader.efi: loader.sym --target=efi-app-ia32 ${.ALLSRC} ${.TARGET} LIBEFI= ${.OBJDIR}/../../efi/libefi/libefi.a +LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a CFLAGS+= -I${.CURDIR}/../libi386 CFLAGS+= -I${.CURDIR}/../btx/lib Modified: stable/10/sys/boot/i386/gptboot/Makefile ============================================================================== --- stable/10/sys/boot/i386/gptboot/Makefile Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/i386/gptboot/Makefile Thu Sep 4 20:35:53 2014 (r271130) @@ -41,6 +41,8 @@ CFLAGS.gcc+= --param max-inline-insns-si LD_FLAGS=-static -N --gc-sections +LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a + # Pick up ../Makefile.inc early. .include Modified: stable/10/sys/boot/i386/gptzfsboot/Makefile ============================================================================== --- stable/10/sys/boot/i386/gptzfsboot/Makefile Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/i386/gptzfsboot/Makefile Thu Sep 4 20:35:53 2014 (r271130) @@ -38,6 +38,8 @@ CFLAGS.gcc+= --param max-inline-insns-si LD_FLAGS=-static -N --gc-sections +LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a + # Pick up ../Makefile.inc early. .include Modified: stable/10/sys/boot/i386/loader/Makefile ============================================================================== --- stable/10/sys/boot/i386/loader/Makefile Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/i386/loader/Makefile Thu Sep 4 20:35:53 2014 (r271130) @@ -69,6 +69,8 @@ LDFLAGS= -static -Ttext 0x0 LIBI386= ${.OBJDIR}/../libi386/libi386.a CFLAGS+= -I${.CURDIR}/.. +LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a + # BTX components CFLAGS+= -I${.CURDIR}/../btx/lib Modified: stable/10/sys/boot/i386/zfsboot/Makefile ============================================================================== --- stable/10/sys/boot/i386/zfsboot/Makefile Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/i386/zfsboot/Makefile Thu Sep 4 20:35:53 2014 (r271130) @@ -35,6 +35,8 @@ CFLAGS.gcc+= --param max-inline-insns-si LD_FLAGS=-static -N --gc-sections +LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a + # Pick up ../Makefile.inc early. .include Modified: stable/10/sys/boot/powerpc/ofw/Makefile ============================================================================== --- stable/10/sys/boot/powerpc/ofw/Makefile Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/powerpc/ofw/Makefile Thu Sep 4 20:35:53 2014 (r271130) @@ -89,10 +89,11 @@ LIBOFW= ${.OBJDIR}/../../ofw/libofw/lib CFLAGS+= -I${.CURDIR}/../../ofw/libofw # where to get libstand from +LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBOFW} -lstand +LDADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} Modified: stable/10/sys/boot/powerpc/ps3/Makefile ============================================================================== --- stable/10/sys/boot/powerpc/ps3/Makefile Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/powerpc/ps3/Makefile Thu Sep 4 20:35:53 2014 (r271130) @@ -95,10 +95,11 @@ CFLAGS+= -Wa,-mppc64bridge #.include "${.CURDIR}/../../ofw/common/Makefile.inc" # where to get libstand from +LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBOFW} -lstand +LDADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} SC_DFLT_FONT=cp437 Modified: stable/10/sys/boot/powerpc/uboot/Makefile ============================================================================== --- stable/10/sys/boot/powerpc/uboot/Makefile Thu Sep 4 20:21:30 2014 (r271129) +++ stable/10/sys/boot/powerpc/uboot/Makefile Thu Sep 4 20:35:53 2014 (r271130) @@ -95,10 +95,11 @@ CFLAGS+= -I${.CURDIR}/../../uboot/lib CFLAGS+= -I${.OBJDIR}/../../uboot/lib # where to get libstand from +LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} -lstand +LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBSTAND} vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 20:44:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85766DF3; Thu, 4 Sep 2014 20:44:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70883132D; Thu, 4 Sep 2014 20:44:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84Kign7042159; Thu, 4 Sep 2014 20:44:42 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84KigO3042158; Thu, 4 Sep 2014 20:44:42 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409042044.s84KigO3042158@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 20:44:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271131 - stable/10/sys/boot/libstand32 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 20:44:42 -0000 Author: emaste Date: Thu Sep 4 20:44:41 2014 New Revision: 271131 URL: http://svnweb.freebsd.org/changeset/base/271131 Log: MFC libstand32 clean target fixes r269029 (sbruno): Update so that clean target in sys/boot will delete the symlink created for machine r269036 (sbruno): Delete the entire cleandepend/cleanmachine target thing now that its been cleared out in r269029 Modified: stable/10/sys/boot/libstand32/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/libstand32/Makefile ============================================================================== --- stable/10/sys/boot/libstand32/Makefile Thu Sep 4 20:35:53 2014 (r271130) +++ stable/10/sys/boot/libstand32/Makefile Thu Sep 4 20:44:41 2014 (r271131) @@ -186,11 +186,8 @@ SRCS+= nandfs.c .include .if ${MACHINE_CPUARCH} == "amd64" +CLEANFILES+= machine beforedepend ${OBJS}: machine -cleandepend: cleanmachine -cleanmachine: - rm -f machine - machine: - ln -s ${.CURDIR}/../../i386/include machine + ln -fs ${.CURDIR}/../../i386/include machine .endif From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 20:47:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2557F55; Thu, 4 Sep 2014 20:47:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1A761342; Thu, 4 Sep 2014 20:47:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84KlGPN042614; Thu, 4 Sep 2014 20:47:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84KlE1i042598; Thu, 4 Sep 2014 20:47:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409042047.s84KlE1i042598@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 20:47:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271132 - in stable/10/sys: boot/i386/efi boot/i386/libi386 boot/ia64/common boot/powerpc/ofw boot/powerpc/ps3 boot/sparc64/loader boot/uboot/common boot/userboot/userboot i386/xen sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 20:47:16 -0000 Author: emaste Date: Thu Sep 4 20:47:14 2014 New Revision: 271132 URL: http://svnweb.freebsd.org/changeset/base/271132 Log: MFC r263005 by royger: howto_names: unify declaration Added: stable/10/sys/sys/boot.h - copied unchanged from r263005, head/sys/sys/boot.h Modified: stable/10/sys/boot/i386/efi/bootinfo.c stable/10/sys/boot/i386/libi386/bootinfo.c stable/10/sys/boot/ia64/common/bootinfo.c stable/10/sys/boot/powerpc/ofw/metadata.c stable/10/sys/boot/powerpc/ps3/metadata.c stable/10/sys/boot/sparc64/loader/metadata.c stable/10/sys/boot/uboot/common/metadata.c stable/10/sys/boot/userboot/userboot/bootinfo.c stable/10/sys/i386/xen/xen_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/i386/efi/bootinfo.c ============================================================================== --- stable/10/sys/boot/i386/efi/bootinfo.c Thu Sep 4 20:44:41 2014 (r271131) +++ stable/10/sys/boot/i386/efi/bootinfo.c Thu Sep 4 20:47:14 2014 (r271132) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -41,29 +42,6 @@ __FBSDID("$FreeBSD$"); #include "libi386.h" #include -/* - * Return a 'boothowto' value corresponding to the kernel arguments in - * (kargs) and any relevant environment variables. - */ -static struct -{ - const char *ev; - int mask; -} howto_names[] = { - { "boot_askname", RB_ASKNAME}, - { "boot_cdrom", RB_CDROM}, - { "boot_ddb", RB_KDB}, - { "boot_dfltroot", RB_DFLTROOT}, - { "boot_gdb", RB_GDB}, - { "boot_multicons", RB_MULTIPLE}, - { "boot_mute", RB_MUTE}, - { "boot_pause", RB_PAUSE}, - { "boot_serial", RB_SERIAL}, - { "boot_single", RB_SINGLE}, - { "boot_verbose", RB_VERBOSE}, - { NULL, 0} -}; - static const char howto_switches[] = "aCdrgDmphsv"; static int howto_masks[] = { RB_ASKNAME, RB_CDROM, RB_KDB, RB_DFLTROOT, RB_GDB, RB_MULTIPLE, Modified: stable/10/sys/boot/i386/libi386/bootinfo.c ============================================================================== --- stable/10/sys/boot/i386/libi386/bootinfo.c Thu Sep 4 20:44:41 2014 (r271131) +++ stable/10/sys/boot/i386/libi386/bootinfo.c Thu Sep 4 20:47:14 2014 (r271132) @@ -31,33 +31,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "bootstrap.h" #include "libi386.h" #include "btxv86.h" -/* - * Return a 'boothowto' value corresponding to the kernel arguments in - * (kargs) and any relevant environment variables. - */ -static struct -{ - const char *ev; - int mask; -} howto_names[] = { - {"boot_askname", RB_ASKNAME}, - {"boot_cdrom", RB_CDROM}, - {"boot_ddb", RB_KDB}, - {"boot_dfltroot", RB_DFLTROOT}, - {"boot_gdb", RB_GDB}, - {"boot_multicons", RB_MULTIPLE}, - {"boot_mute", RB_MUTE}, - {"boot_pause", RB_PAUSE}, - {"boot_serial", RB_SERIAL}, - {"boot_single", RB_SINGLE}, - {"boot_verbose", RB_VERBOSE}, - {NULL, 0} -}; - int bi_getboothowto(char *kargs) { Modified: stable/10/sys/boot/ia64/common/bootinfo.c ============================================================================== --- stable/10/sys/boot/ia64/common/bootinfo.c Thu Sep 4 20:44:41 2014 (r271131) +++ stable/10/sys/boot/ia64/common/bootinfo.c Thu Sep 4 20:47:14 2014 (r271132) @@ -33,35 +33,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include "libia64.h" -/* - * Return a 'boothowto' value corresponding to the kernel arguments in - * (kargs) and any relevant environment variables. - */ -static struct -{ - const char *ev; - int mask; -} howto_names[] = { - { "boot_askname", RB_ASKNAME}, - { "boot_cdrom", RB_CDROM}, - { "boot_ddb", RB_KDB}, - { "boot_dfltroot", RB_DFLTROOT}, - { "boot_gdb", RB_GDB}, - { "boot_multicons", RB_MULTIPLE}, - { "boot_mute", RB_MUTE}, - { "boot_pause", RB_PAUSE}, - { "boot_serial", RB_SERIAL}, - { "boot_single", RB_SINGLE}, - { "boot_verbose", RB_VERBOSE}, - { NULL, 0} -}; - static const char howto_switches[] = "aCdrgDmphsv"; static int howto_masks[] = { RB_ASKNAME, RB_CDROM, RB_KDB, RB_DFLTROOT, RB_GDB, RB_MULTIPLE, Modified: stable/10/sys/boot/powerpc/ofw/metadata.c ============================================================================== --- stable/10/sys/boot/powerpc/ofw/metadata.c Thu Sep 4 20:44:41 2014 (r271131) +++ stable/10/sys/boot/powerpc/ofw/metadata.c Thu Sep 4 20:47:14 2014 (r271132) @@ -33,35 +33,13 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "bootstrap.h" #include "libofw.h" -/* - * Return a 'boothowto' value corresponding to the kernel arguments in - * (kargs) and any relevant environment variables. - */ -static struct -{ - const char *ev; - int mask; -} howto_names[] = { - {"boot_askname", RB_ASKNAME}, - {"boot_cdrom", RB_CDROM}, - {"boot_ddb", RB_KDB}, - {"boot_dfltroot", RB_DFLTROOT}, - {"boot_gdb", RB_GDB}, - {"boot_multicons", RB_MULTIPLE}, - {"boot_mute", RB_MUTE}, - {"boot_pause", RB_PAUSE}, - {"boot_serial", RB_SERIAL}, - {"boot_single", RB_SINGLE}, - {"boot_verbose", RB_VERBOSE}, - {NULL, 0} -}; - int md_getboothowto(char *kargs) { Modified: stable/10/sys/boot/powerpc/ps3/metadata.c ============================================================================== --- stable/10/sys/boot/powerpc/ps3/metadata.c Thu Sep 4 20:44:41 2014 (r271131) +++ stable/10/sys/boot/powerpc/ps3/metadata.c Thu Sep 4 20:47:14 2014 (r271132) @@ -33,34 +33,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "bootstrap.h" -/* - * Return a 'boothowto' value corresponding to the kernel arguments in - * (kargs) and any relevant environment variables. - */ -static struct -{ - const char *ev; - int mask; -} howto_names[] = { - {"boot_askname", RB_ASKNAME}, - {"boot_cdrom", RB_CDROM}, - {"boot_ddb", RB_KDB}, - {"boot_dfltroot", RB_DFLTROOT}, - {"boot_gdb", RB_GDB}, - {"boot_multicons", RB_MULTIPLE}, - {"boot_mute", RB_MUTE}, - {"boot_pause", RB_PAUSE}, - {"boot_serial", RB_SERIAL}, - {"boot_single", RB_SINGLE}, - {"boot_verbose", RB_VERBOSE}, - {NULL, 0} -}; - int md_getboothowto(char *kargs) { Modified: stable/10/sys/boot/sparc64/loader/metadata.c ============================================================================== --- stable/10/sys/boot/sparc64/loader/metadata.c Thu Sep 4 20:44:41 2014 (r271131) +++ stable/10/sys/boot/sparc64/loader/metadata.c Thu Sep 4 20:47:14 2014 (r271132) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -47,29 +48,6 @@ extern int itlb_slot; static int md_bootserial(void); -/* - * Return a 'boothowto' value corresponding to the kernel arguments in - * (kargs) and any relevant environment variables. - */ -static struct -{ - const char *ev; - int mask; -} howto_names[] = { - {"boot_askname", RB_ASKNAME}, - {"boot_cdrom", RB_CDROM}, - {"boot_ddb", RB_KDB}, - {"boot_dfltroot", RB_DFLTROOT}, - {"boot_gdb", RB_GDB}, - {"boot_multicons", RB_MULTIPLE}, - {"boot_mute", RB_MUTE}, - {"boot_pause", RB_PAUSE}, - {"boot_serial", RB_SERIAL}, - {"boot_single", RB_SINGLE}, - {"boot_verbose", RB_VERBOSE}, - {NULL, 0} -}; - int md_getboothowto(char *kargs) { Modified: stable/10/sys/boot/uboot/common/metadata.c ============================================================================== --- stable/10/sys/boot/uboot/common/metadata.c Thu Sep 4 20:44:41 2014 (r271131) +++ stable/10/sys/boot/uboot/common/metadata.c Thu Sep 4 20:47:14 2014 (r271132) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -45,29 +46,6 @@ __FBSDID("$FreeBSD$"); #include "libuboot.h" #endif -/* - * Return a 'boothowto' value corresponding to the kernel arguments in - * (kargs) and any relevant environment variables. - */ -static struct -{ - const char *ev; - int mask; -} howto_names[] = { - {"boot_askname", RB_ASKNAME}, - {"boot_cdrom", RB_CDROM}, - {"boot_ddb", RB_KDB}, - {"boot_dfltroot", RB_DFLTROOT}, - {"boot_gdb", RB_GDB}, - {"boot_multicons", RB_MULTIPLE}, - {"boot_mute", RB_MUTE}, - {"boot_pause", RB_PAUSE}, - {"boot_serial", RB_SERIAL}, - {"boot_single", RB_SINGLE}, - {"boot_verbose", RB_VERBOSE}, - {NULL, 0} -}; - static int md_getboothowto(char *kargs) { Modified: stable/10/sys/boot/userboot/userboot/bootinfo.c ============================================================================== --- stable/10/sys/boot/userboot/userboot/bootinfo.c Thu Sep 4 20:44:41 2014 (r271131) +++ stable/10/sys/boot/userboot/userboot/bootinfo.c Thu Sep 4 20:47:14 2014 (r271132) @@ -31,33 +31,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "bootstrap.h" #include "libuserboot.h" -/* - * Return a 'boothowto' value corresponding to the kernel arguments in - * (kargs) and any relevant environment variables. - */ -static struct -{ - const char *ev; - int mask; -} howto_names[] = { - {"boot_askname", RB_ASKNAME}, - {"boot_cdrom", RB_CDROM}, - {"boot_ddb", RB_KDB}, - {"boot_dfltroot", RB_DFLTROOT}, - {"boot_gdb", RB_GDB}, - {"boot_multicons", RB_MULTIPLE}, - {"boot_mute", RB_MUTE}, - {"boot_pause", RB_PAUSE}, - {"boot_serial", RB_SERIAL}, - {"boot_single", RB_SINGLE}, - {"boot_verbose", RB_VERBOSE}, - {NULL, 0} -}; - int bi_getboothowto(char *kargs) { Modified: stable/10/sys/i386/xen/xen_machdep.c ============================================================================== --- stable/10/sys/i386/xen/xen_machdep.c Thu Sep 4 20:44:41 2014 (r271131) +++ stable/10/sys/i386/xen/xen_machdep.c Thu Sep 4 20:47:14 2014 (r271132) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -155,24 +156,6 @@ xen_setbootenv(char *cmd_line) return cmd_line; } -static struct -{ - const char *ev; - int mask; -} howto_names[] = { - {"boot_askname", RB_ASKNAME}, - {"boot_single", RB_SINGLE}, - {"boot_nosync", RB_NOSYNC}, - {"boot_halt", RB_ASKNAME}, - {"boot_serial", RB_SERIAL}, - {"boot_cdrom", RB_CDROM}, - {"boot_gdb", RB_GDB}, - {"boot_gdb_pause", RB_RESERVED1}, - {"boot_verbose", RB_VERBOSE}, - {"boot_multicons", RB_MULTIPLE}, - {NULL, 0} -}; - int xen_boothowto(char *envp) { Copied: stable/10/sys/sys/boot.h (from r263005, head/sys/sys/boot.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/sys/boot.h Thu Sep 4 20:47:14 2014 (r271132, copy of r263005, head/sys/sys/boot.h) @@ -0,0 +1,55 @@ +/*- + * Copyright (c) 2014 Roger Pau Monné + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_BOOT_H_ +#define _SYS_BOOT_H_ + +/* + * Return a 'boothowto' value corresponding to the kernel arguments in + * (kargs) and any relevant environment variables. + */ +static struct +{ + const char *ev; + int mask; +} howto_names[] = { + { "boot_askname", RB_ASKNAME}, + { "boot_cdrom", RB_CDROM}, + { "boot_ddb", RB_KDB}, + { "boot_dfltroot", RB_DFLTROOT}, + { "boot_gdb", RB_GDB}, + { "boot_multicons", RB_MULTIPLE}, + { "boot_mute", RB_MUTE}, + { "boot_pause", RB_PAUSE}, + { "boot_serial", RB_SERIAL}, + { "boot_single", RB_SINGLE}, + { "boot_verbose", RB_VERBOSE}, + { NULL, 0} +}; + +#endif /* !_SYS_BOOT_H_ */ From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 20:48:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D50E11A; Thu, 4 Sep 2014 20:48:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 141BA1349; Thu, 4 Sep 2014 20:48:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84KmJFb042835; Thu, 4 Sep 2014 20:48:19 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84KmGsG042814; Thu, 4 Sep 2014 20:48:16 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201409042048.s84KmGsG042814@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 4 Sep 2014 20:48:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271133 - in head/sys/gnu/dts/include/dt-bindings: clk clock dma gpio input interrupt-controller mfd phy pinctrl pwm reset reset-controller soc sound spmi thermal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 20:48:19 -0000 Author: imp Date: Thu Sep 4 20:48:16 2014 New Revision: 271133 URL: http://svnweb.freebsd.org/changeset/base/271133 Log: Update bindings to latest vendor branch representing 3.17-rc2 level of Linux DTS API. Added: - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clk/ti-dra7-atl.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/at91.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/bcm21664.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/bcm281xx.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/berlin2.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/berlin2q.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/clps711x-clock.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/exynos-audss-clk.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/exynos3250.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/exynos5260-clk.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/exynos5410.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/hip04-clock.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/hix5hd2-clock.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/imx1-clock.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/imx21-clock.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/imx27-clock.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/imx6qdl-clock.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/imx6sx-clock.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/lsi,axm5516-clks.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-apq8084.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-ipq806x.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/qcom,mmcc-apq8084.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/r7s72100-clock.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/r8a7779-clock.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/rk3066a-cru.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/rk3188-cru-common.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/rk3188-cru.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/rk3288-cru.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/s3c2410.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/s3c2412.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/s3c2443.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/s5pv210-audss.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/s5pv210.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/stih415-clks.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/clock/stih416-clks.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/dma/nbpfaxi.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/mfd/palmas.h - copied from r270866, vendor/device-tree/dist/include/dt-bindings/phy/ - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/pinctrl/pinctrl-tegra-xusb.h - copied from r270866, vendor/device-tree/dist/include/dt-bindings/reset-controller/ - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/reset/altr,rst-mgr.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/reset/qcom,gcc-apq8084.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/reset/qcom,gcc-ipq806x.h - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/reset/qcom,mmcc-apq8084.h - copied from r270866, vendor/device-tree/dist/include/dt-bindings/soc/ - copied unchanged from r270866, vendor/device-tree/dist/include/dt-bindings/sound/tlv320aic31xx-micbias.h - copied from r270866, vendor/device-tree/dist/include/dt-bindings/spmi/ Directory Properties: head/sys/gnu/dts/include/dt-bindings/clk/ti-dra7-atl.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/at91.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/bcm21664.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/bcm281xx.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/berlin2.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/berlin2q.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/clps711x-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/exynos-audss-clk.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/exynos3250.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/exynos5260-clk.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/exynos5410.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/hip04-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/hix5hd2-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/imx1-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/imx21-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/imx27-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/imx6qdl-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/imx6sx-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/lsi,axm5516-clks.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-apq8084.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-ipq806x.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-apq8084.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r7s72100-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a7779-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/rk3066a-cru.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/rk3188-cru-common.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/rk3188-cru.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/rk3288-cru.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/s3c2410.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/s3c2412.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/s3c2443.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/s5pv210-audss.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/s5pv210.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/stih415-clks.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/stih416-clks.h (props changed) head/sys/gnu/dts/include/dt-bindings/dma/nbpfaxi.h (props changed) head/sys/gnu/dts/include/dt-bindings/mfd/palmas.h (props changed) head/sys/gnu/dts/include/dt-bindings/phy/ (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/pinctrl-tegra-xusb.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset-controller/ (props changed) head/sys/gnu/dts/include/dt-bindings/reset/altr,rst-mgr.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-apq8084.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-ipq806x.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/qcom,mmcc-apq8084.h (props changed) head/sys/gnu/dts/include/dt-bindings/soc/ (props changed) head/sys/gnu/dts/include/dt-bindings/sound/tlv320aic31xx-micbias.h (props changed) head/sys/gnu/dts/include/dt-bindings/spmi/ (props changed) Modified: head/sys/gnu/dts/include/dt-bindings/clock/exynos4.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/exynos5250.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/exynos5420.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/exynos5440.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/hi3620-clock.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/imx6sl-clock.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8960.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8974.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-msm8960.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a7790-clock.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/r8a7791-clock.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/tegra114-car.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/tegra124-car.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/clock/vf610-clock.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/mfd/as3722.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/am43xx.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/dra.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/omap.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-msm8960.h (contents, props changed) head/sys/gnu/dts/include/dt-bindings/reset/qcom,mmcc-msm8960.h (contents, props changed) Directory Properties: head/sys/gnu/dts/include/ (props changed) head/sys/gnu/dts/include/dt-bindings/ (props changed) head/sys/gnu/dts/include/dt-bindings/clk/ (props changed) head/sys/gnu/dts/include/dt-bindings/clk/at91.h (props changed) head/sys/gnu/dts/include/dt-bindings/clk/exynos-audss-clk.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/ (props changed) head/sys/gnu/dts/include/dt-bindings/clock/efm32-cmu.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/imx5-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/mpc512x-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8660.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-msm8974.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/samsung,s3c64xx-clock.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/tegra20-car.h (props changed) head/sys/gnu/dts/include/dt-bindings/clock/tegra30-car.h (props changed) head/sys/gnu/dts/include/dt-bindings/dma/ (props changed) head/sys/gnu/dts/include/dt-bindings/dma/at91.h (props changed) head/sys/gnu/dts/include/dt-bindings/gpio/ (props changed) head/sys/gnu/dts/include/dt-bindings/gpio/gpio.h (props changed) head/sys/gnu/dts/include/dt-bindings/gpio/tegra-gpio.h (props changed) head/sys/gnu/dts/include/dt-bindings/input/ (props changed) head/sys/gnu/dts/include/dt-bindings/input/input.h (props changed) head/sys/gnu/dts/include/dt-bindings/interrupt-controller/ (props changed) head/sys/gnu/dts/include/dt-bindings/interrupt-controller/arm-gic.h (props changed) head/sys/gnu/dts/include/dt-bindings/interrupt-controller/irq.h (props changed) head/sys/gnu/dts/include/dt-bindings/mfd/ (props changed) head/sys/gnu/dts/include/dt-bindings/mfd/dbx500-prcmu.h (props changed) head/sys/gnu/dts/include/dt-bindings/phy/phy-miphy365x.h (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/ (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/am33xx.h (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/at91.h (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/nomadik.h (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/pinctrl-tegra.h (props changed) head/sys/gnu/dts/include/dt-bindings/pinctrl/rockchip.h (props changed) head/sys/gnu/dts/include/dt-bindings/pwm/ (props changed) head/sys/gnu/dts/include/dt-bindings/pwm/pwm.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/ (props changed) head/sys/gnu/dts/include/dt-bindings/reset-controller/stih415-resets.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset-controller/stih416-resets.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-msm8660.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/qcom,gcc-msm8974.h (props changed) head/sys/gnu/dts/include/dt-bindings/reset/qcom,mmcc-msm8974.h (props changed) head/sys/gnu/dts/include/dt-bindings/soc/qcom,gsbi.h (props changed) head/sys/gnu/dts/include/dt-bindings/sound/ (props changed) head/sys/gnu/dts/include/dt-bindings/sound/fsl-imx-audmux.h (props changed) head/sys/gnu/dts/include/dt-bindings/spmi/spmi.h (props changed) head/sys/gnu/dts/include/dt-bindings/thermal/ (props changed) head/sys/gnu/dts/include/dt-bindings/thermal/thermal.h (props changed) Copied: head/sys/gnu/dts/include/dt-bindings/clk/ti-dra7-atl.h (from r270866, vendor/device-tree/dist/include/dt-bindings/clk/ti-dra7-atl.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/include/dt-bindings/clk/ti-dra7-atl.h Thu Sep 4 20:48:16 2014 (r271133, copy of r270866, vendor/device-tree/dist/include/dt-bindings/clk/ti-dra7-atl.h) @@ -0,0 +1,40 @@ +/* + * This header provides constants for DRA7 ATL (Audio Tracking Logic) + * + * The constants defined in this header are used in dts files + * + * Copyright (C) 2013 Texas Instruments, Inc. + * + * Peter Ujfalusi + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef _DT_BINDINGS_CLK_DRA7_ATL_H +#define _DT_BINDINGS_CLK_DRA7_ATL_H + +#define DRA7_ATL_WS_MCASP1_FSR 0 +#define DRA7_ATL_WS_MCASP1_FSX 1 +#define DRA7_ATL_WS_MCASP2_FSR 2 +#define DRA7_ATL_WS_MCASP2_FSX 3 +#define DRA7_ATL_WS_MCASP3_FSX 4 +#define DRA7_ATL_WS_MCASP4_FSX 5 +#define DRA7_ATL_WS_MCASP5_FSX 6 +#define DRA7_ATL_WS_MCASP6_FSX 7 +#define DRA7_ATL_WS_MCASP7_FSX 8 +#define DRA7_ATL_WS_MCASP8_FSX 9 +#define DRA7_ATL_WS_MCASP8_AHCLKX 10 +#define DRA7_ATL_WS_XREF_CLK3 11 +#define DRA7_ATL_WS_XREF_CLK0 12 +#define DRA7_ATL_WS_XREF_CLK1 13 +#define DRA7_ATL_WS_XREF_CLK2 14 +#define DRA7_ATL_WS_OSC1_X1 15 + +#endif Copied: head/sys/gnu/dts/include/dt-bindings/clock/at91.h (from r270866, vendor/device-tree/dist/include/dt-bindings/clock/at91.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/include/dt-bindings/clock/at91.h Thu Sep 4 20:48:16 2014 (r271133, copy of r270866, vendor/device-tree/dist/include/dt-bindings/clock/at91.h) @@ -0,0 +1,22 @@ +/* + * This header provides constants for AT91 pmc status. + * + * The constants defined in this header are being used in dts. + * + * Licensed under GPLv2 or later. + */ + +#ifndef _DT_BINDINGS_CLK_AT91_H +#define _DT_BINDINGS_CLK_AT91_H + +#define AT91_PMC_MOSCS 0 /* MOSCS Flag */ +#define AT91_PMC_LOCKA 1 /* PLLA Lock */ +#define AT91_PMC_LOCKB 2 /* PLLB Lock */ +#define AT91_PMC_MCKRDY 3 /* Master Clock */ +#define AT91_PMC_LOCKU 6 /* UPLL Lock */ +#define AT91_PMC_PCKRDY(id) (8 + (id)) /* Programmable Clock */ +#define AT91_PMC_MOSCSELS 16 /* Main Oscillator Selection */ +#define AT91_PMC_MOSCRCS 17 /* Main On-Chip RC */ +#define AT91_PMC_CFDEV 18 /* Clock Failure Detector Event */ + +#endif Copied: head/sys/gnu/dts/include/dt-bindings/clock/bcm21664.h (from r270866, vendor/device-tree/dist/include/dt-bindings/clock/bcm21664.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/include/dt-bindings/clock/bcm21664.h Thu Sep 4 20:48:16 2014 (r271133, copy of r270866, vendor/device-tree/dist/include/dt-bindings/clock/bcm21664.h) @@ -0,0 +1,62 @@ +/* + * Copyright (C) 2013 Broadcom Corporation + * Copyright 2013 Linaro Limited + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef _CLOCK_BCM21664_H +#define _CLOCK_BCM21664_H + +/* + * This file defines the values used to specify clocks provided by + * the clock control units (CCUs) on Broadcom BCM21664 family SoCs. + */ + +/* bcm21664 CCU device tree "compatible" strings */ +#define BCM21664_DT_ROOT_CCU_COMPAT "brcm,bcm21664-root-ccu" +#define BCM21664_DT_AON_CCU_COMPAT "brcm,bcm21664-aon-ccu" +#define BCM21664_DT_MASTER_CCU_COMPAT "brcm,bcm21664-master-ccu" +#define BCM21664_DT_SLAVE_CCU_COMPAT "brcm,bcm21664-slave-ccu" + +/* root CCU clock ids */ + +#define BCM21664_ROOT_CCU_FRAC_1M 0 +#define BCM21664_ROOT_CCU_CLOCK_COUNT 1 + +/* aon CCU clock ids */ + +#define BCM21664_AON_CCU_HUB_TIMER 0 +#define BCM21664_AON_CCU_CLOCK_COUNT 1 + +/* master CCU clock ids */ + +#define BCM21664_MASTER_CCU_SDIO1 0 +#define BCM21664_MASTER_CCU_SDIO2 1 +#define BCM21664_MASTER_CCU_SDIO3 2 +#define BCM21664_MASTER_CCU_SDIO4 3 +#define BCM21664_MASTER_CCU_SDIO1_SLEEP 4 +#define BCM21664_MASTER_CCU_SDIO2_SLEEP 5 +#define BCM21664_MASTER_CCU_SDIO3_SLEEP 6 +#define BCM21664_MASTER_CCU_SDIO4_SLEEP 7 +#define BCM21664_MASTER_CCU_CLOCK_COUNT 8 + +/* slave CCU clock ids */ + +#define BCM21664_SLAVE_CCU_UARTB 0 +#define BCM21664_SLAVE_CCU_UARTB2 1 +#define BCM21664_SLAVE_CCU_UARTB3 2 +#define BCM21664_SLAVE_CCU_BSC1 3 +#define BCM21664_SLAVE_CCU_BSC2 4 +#define BCM21664_SLAVE_CCU_BSC3 5 +#define BCM21664_SLAVE_CCU_BSC4 6 +#define BCM21664_SLAVE_CCU_CLOCK_COUNT 7 + +#endif /* _CLOCK_BCM21664_H */ Copied: head/sys/gnu/dts/include/dt-bindings/clock/bcm281xx.h (from r270866, vendor/device-tree/dist/include/dt-bindings/clock/bcm281xx.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/include/dt-bindings/clock/bcm281xx.h Thu Sep 4 20:48:16 2014 (r271133, copy of r270866, vendor/device-tree/dist/include/dt-bindings/clock/bcm281xx.h) @@ -0,0 +1,77 @@ +/* + * Copyright (C) 2013 Broadcom Corporation + * Copyright 2013 Linaro Limited + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation version 2. + * + * This program is distributed "as is" WITHOUT ANY WARRANTY of any + * kind, whether express or implied; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef _CLOCK_BCM281XX_H +#define _CLOCK_BCM281XX_H + +/* + * This file defines the values used to specify clocks provided by + * the clock control units (CCUs) on Broadcom BCM281XX family SoCs. + */ + +/* + * These are the bcm281xx CCU device tree "compatible" strings. + * We're stuck with using "bcm11351" in the string because wild + * cards aren't allowed, and that name was the first one defined + * in this family of devices. + */ +#define BCM281XX_DT_ROOT_CCU_COMPAT "brcm,bcm11351-root-ccu" +#define BCM281XX_DT_AON_CCU_COMPAT "brcm,bcm11351-aon-ccu" +#define BCM281XX_DT_HUB_CCU_COMPAT "brcm,bcm11351-hub-ccu" +#define BCM281XX_DT_MASTER_CCU_COMPAT "brcm,bcm11351-master-ccu" +#define BCM281XX_DT_SLAVE_CCU_COMPAT "brcm,bcm11351-slave-ccu" + +/* root CCU clock ids */ + +#define BCM281XX_ROOT_CCU_FRAC_1M 0 +#define BCM281XX_ROOT_CCU_CLOCK_COUNT 1 + +/* aon CCU clock ids */ + +#define BCM281XX_AON_CCU_HUB_TIMER 0 +#define BCM281XX_AON_CCU_PMU_BSC 1 +#define BCM281XX_AON_CCU_PMU_BSC_VAR 2 +#define BCM281XX_AON_CCU_CLOCK_COUNT 3 + +/* hub CCU clock ids */ + +#define BCM281XX_HUB_CCU_TMON_1M 0 +#define BCM281XX_HUB_CCU_CLOCK_COUNT 1 + +/* master CCU clock ids */ + +#define BCM281XX_MASTER_CCU_SDIO1 0 +#define BCM281XX_MASTER_CCU_SDIO2 1 +#define BCM281XX_MASTER_CCU_SDIO3 2 +#define BCM281XX_MASTER_CCU_SDIO4 3 +#define BCM281XX_MASTER_CCU_USB_IC 4 +#define BCM281XX_MASTER_CCU_HSIC2_48M 5 +#define BCM281XX_MASTER_CCU_HSIC2_12M 6 +#define BCM281XX_MASTER_CCU_CLOCK_COUNT 7 + +/* slave CCU clock ids */ + +#define BCM281XX_SLAVE_CCU_UARTB 0 +#define BCM281XX_SLAVE_CCU_UARTB2 1 +#define BCM281XX_SLAVE_CCU_UARTB3 2 +#define BCM281XX_SLAVE_CCU_UARTB4 3 +#define BCM281XX_SLAVE_CCU_SSP0 4 +#define BCM281XX_SLAVE_CCU_SSP2 5 +#define BCM281XX_SLAVE_CCU_BSC1 6 +#define BCM281XX_SLAVE_CCU_BSC2 7 +#define BCM281XX_SLAVE_CCU_BSC3 8 +#define BCM281XX_SLAVE_CCU_PWM 9 +#define BCM281XX_SLAVE_CCU_CLOCK_COUNT 10 + +#endif /* _CLOCK_BCM281XX_H */ Copied: head/sys/gnu/dts/include/dt-bindings/clock/berlin2.h (from r270866, vendor/device-tree/dist/include/dt-bindings/clock/berlin2.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/include/dt-bindings/clock/berlin2.h Thu Sep 4 20:48:16 2014 (r271133, copy of r270866, vendor/device-tree/dist/include/dt-bindings/clock/berlin2.h) @@ -0,0 +1,45 @@ +/* + * Berlin2 BG2/BG2CD clock tree IDs + */ + +#define CLKID_SYS 0 +#define CLKID_CPU 1 +#define CLKID_DRMFIGO 2 +#define CLKID_CFG 3 +#define CLKID_GFX 4 +#define CLKID_ZSP 5 +#define CLKID_PERIF 6 +#define CLKID_PCUBE 7 +#define CLKID_VSCOPE 8 +#define CLKID_NFC_ECC 9 +#define CLKID_VPP 10 +#define CLKID_APP 11 +#define CLKID_AUDIO0 12 +#define CLKID_AUDIO2 13 +#define CLKID_AUDIO3 14 +#define CLKID_AUDIO1 15 +#define CLKID_GFX3D_CORE 16 +#define CLKID_GFX3D_SYS 17 +#define CLKID_ARC 18 +#define CLKID_VIP 19 +#define CLKID_SDIO0XIN 20 +#define CLKID_SDIO1XIN 21 +#define CLKID_GFX3D_EXTRA 22 +#define CLKID_GC360 23 +#define CLKID_SDIO_DLLMST 24 +#define CLKID_GETH0 25 +#define CLKID_GETH1 26 +#define CLKID_SATA 27 +#define CLKID_AHBAPB 28 +#define CLKID_USB0 29 +#define CLKID_USB1 30 +#define CLKID_PBRIDGE 31 +#define CLKID_SDIO0 32 +#define CLKID_SDIO1 33 +#define CLKID_NFC 34 +#define CLKID_SMEMC 35 +#define CLKID_AUDIOHD 36 +#define CLKID_VIDEO0 37 +#define CLKID_VIDEO1 38 +#define CLKID_VIDEO2 39 +#define CLKID_TWD 40 Copied: head/sys/gnu/dts/include/dt-bindings/clock/berlin2q.h (from r270866, vendor/device-tree/dist/include/dt-bindings/clock/berlin2q.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/include/dt-bindings/clock/berlin2q.h Thu Sep 4 20:48:16 2014 (r271133, copy of r270866, vendor/device-tree/dist/include/dt-bindings/clock/berlin2q.h) @@ -0,0 +1,31 @@ +/* + * Berlin2 BG2Q clock tree IDs + */ + +#define CLKID_SYS 0 +#define CLKID_DRMFIGO 1 +#define CLKID_CFG 2 +#define CLKID_GFX2D 3 +#define CLKID_ZSP 4 +#define CLKID_PERIF 5 +#define CLKID_PCUBE 6 +#define CLKID_VSCOPE 7 +#define CLKID_NFC_ECC 8 +#define CLKID_VPP 9 +#define CLKID_APP 10 +#define CLKID_SDIO0XIN 11 +#define CLKID_SDIO1XIN 12 +#define CLKID_GFX2DAXI 13 +#define CLKID_GETH0 14 +#define CLKID_SATA 15 +#define CLKID_AHBAPB 16 +#define CLKID_USB0 17 +#define CLKID_USB1 18 +#define CLKID_USB2 19 +#define CLKID_USB3 20 +#define CLKID_PBRIDGE 21 +#define CLKID_SDIO 22 +#define CLKID_NFC 23 +#define CLKID_SMEMC 24 +#define CLKID_PCIE 25 +#define CLKID_TWD 26 Copied: head/sys/gnu/dts/include/dt-bindings/clock/clps711x-clock.h (from r270866, vendor/device-tree/dist/include/dt-bindings/clock/clps711x-clock.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/include/dt-bindings/clock/clps711x-clock.h Thu Sep 4 20:48:16 2014 (r271133, copy of r270866, vendor/device-tree/dist/include/dt-bindings/clock/clps711x-clock.h) @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2014 Alexander Shiyan + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#ifndef __DT_BINDINGS_CLOCK_CLPS711X_H +#define __DT_BINDINGS_CLOCK_CLPS711X_H + +#define CLPS711X_CLK_DUMMY 0 +#define CLPS711X_CLK_CPU 1 +#define CLPS711X_CLK_BUS 2 +#define CLPS711X_CLK_PLL 3 +#define CLPS711X_CLK_TIMERREF 4 +#define CLPS711X_CLK_TIMER1 5 +#define CLPS711X_CLK_TIMER2 6 +#define CLPS711X_CLK_PWM 7 +#define CLPS711X_CLK_SPIREF 8 +#define CLPS711X_CLK_SPI 9 +#define CLPS711X_CLK_UART 10 +#define CLPS711X_CLK_TICK 11 +#define CLPS711X_CLK_MAX 12 + +#endif Copied: head/sys/gnu/dts/include/dt-bindings/clock/exynos-audss-clk.h (from r270866, vendor/device-tree/dist/include/dt-bindings/clock/exynos-audss-clk.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/include/dt-bindings/clock/exynos-audss-clk.h Thu Sep 4 20:48:16 2014 (r271133, copy of r270866, vendor/device-tree/dist/include/dt-bindings/clock/exynos-audss-clk.h) @@ -0,0 +1,26 @@ +/* + * This header provides constants for Samsung audio subsystem + * clock controller. + * + * The constants defined in this header are being used in dts + * and exynos audss driver. + */ + +#ifndef _DT_BINDINGS_CLK_EXYNOS_AUDSS_H +#define _DT_BINDINGS_CLK_EXYNOS_AUDSS_H + +#define EXYNOS_MOUT_AUDSS 0 +#define EXYNOS_MOUT_I2S 1 +#define EXYNOS_DOUT_SRP 2 +#define EXYNOS_DOUT_AUD_BUS 3 +#define EXYNOS_DOUT_I2S 4 +#define EXYNOS_SRP_CLK 5 +#define EXYNOS_I2S_BUS 6 +#define EXYNOS_SCLK_I2S 7 +#define EXYNOS_PCM_BUS 8 +#define EXYNOS_SCLK_PCM 9 +#define EXYNOS_ADMA 10 + +#define EXYNOS_AUDSS_MAX_CLKS 11 + +#endif Copied: head/sys/gnu/dts/include/dt-bindings/clock/exynos3250.h (from r270866, vendor/device-tree/dist/include/dt-bindings/clock/exynos3250.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/include/dt-bindings/clock/exynos3250.h Thu Sep 4 20:48:16 2014 (r271133, copy of r270866, vendor/device-tree/dist/include/dt-bindings/clock/exynos3250.h) @@ -0,0 +1,258 @@ +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Author: Tomasz Figa + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Device Tree binding constants for Samsung Exynos3250 clock controllers. + */ + +#ifndef _DT_BINDINGS_CLOCK_SAMSUNG_EXYNOS3250_CLOCK_H +#define _DT_BINDINGS_CLOCK_SAMSUNG_EXYNOS3250_CLOCK_H + +/* + * Let each exported clock get a unique index, which is used on DT-enabled + * platforms to lookup the clock from a clock specifier. These indices are + * therefore considered an ABI and so must not be changed. This implies + * that new clocks should be added either in free spaces between clock groups + * or at the end. + */ + + +/* + * Main CMU + */ + +#define CLK_OSCSEL 1 +#define CLK_FIN_PLL 2 +#define CLK_FOUT_APLL 3 +#define CLK_FOUT_VPLL 4 +#define CLK_FOUT_UPLL 5 +#define CLK_FOUT_MPLL 6 + +/* Muxes */ +#define CLK_MOUT_MPLL_USER_L 16 +#define CLK_MOUT_GDL 17 +#define CLK_MOUT_MPLL_USER_R 18 +#define CLK_MOUT_GDR 19 +#define CLK_MOUT_EBI 20 +#define CLK_MOUT_ACLK_200 21 +#define CLK_MOUT_ACLK_160 22 +#define CLK_MOUT_ACLK_100 23 +#define CLK_MOUT_ACLK_266_1 24 +#define CLK_MOUT_ACLK_266_0 25 +#define CLK_MOUT_ACLK_266 26 +#define CLK_MOUT_VPLL 27 +#define CLK_MOUT_EPLL_USER 28 +#define CLK_MOUT_EBI_1 29 +#define CLK_MOUT_UPLL 30 +#define CLK_MOUT_ACLK_400_MCUISP_SUB 31 +#define CLK_MOUT_MPLL 32 +#define CLK_MOUT_ACLK_400_MCUISP 33 +#define CLK_MOUT_VPLLSRC 34 +#define CLK_MOUT_CAM1 35 +#define CLK_MOUT_CAM_BLK 36 +#define CLK_MOUT_MFC 37 +#define CLK_MOUT_MFC_1 38 +#define CLK_MOUT_MFC_0 39 +#define CLK_MOUT_G3D 40 +#define CLK_MOUT_G3D_1 41 +#define CLK_MOUT_G3D_0 42 +#define CLK_MOUT_MIPI0 43 +#define CLK_MOUT_FIMD0 44 +#define CLK_MOUT_UART_ISP 45 +#define CLK_MOUT_SPI1_ISP 46 +#define CLK_MOUT_SPI0_ISP 47 +#define CLK_MOUT_TSADC 48 +#define CLK_MOUT_MMC1 49 +#define CLK_MOUT_MMC0 50 +#define CLK_MOUT_UART1 51 +#define CLK_MOUT_UART0 52 +#define CLK_MOUT_SPI1 53 +#define CLK_MOUT_SPI0 54 +#define CLK_MOUT_AUDIO 55 +#define CLK_MOUT_MPLL_USER_C 56 +#define CLK_MOUT_HPM 57 +#define CLK_MOUT_CORE 58 +#define CLK_MOUT_APLL 59 +#define CLK_MOUT_ACLK_266_SUB 60 + +/* Dividers */ +#define CLK_DIV_GPL 64 +#define CLK_DIV_GDL 65 +#define CLK_DIV_GPR 66 +#define CLK_DIV_GDR 67 +#define CLK_DIV_MPLL_PRE 68 +#define CLK_DIV_ACLK_400_MCUISP 69 +#define CLK_DIV_EBI 70 +#define CLK_DIV_ACLK_200 71 +#define CLK_DIV_ACLK_160 72 +#define CLK_DIV_ACLK_100 73 +#define CLK_DIV_ACLK_266 74 +#define CLK_DIV_CAM1 75 +#define CLK_DIV_CAM_BLK 76 +#define CLK_DIV_MFC 77 +#define CLK_DIV_G3D 78 +#define CLK_DIV_MIPI0_PRE 79 +#define CLK_DIV_MIPI0 80 +#define CLK_DIV_FIMD0 81 +#define CLK_DIV_UART_ISP 82 +#define CLK_DIV_SPI1_ISP_PRE 83 +#define CLK_DIV_SPI1_ISP 84 +#define CLK_DIV_SPI0_ISP_PRE 85 +#define CLK_DIV_SPI0_ISP 86 +#define CLK_DIV_TSADC_PRE 87 +#define CLK_DIV_TSADC 88 +#define CLK_DIV_MMC1_PRE 89 +#define CLK_DIV_MMC1 90 +#define CLK_DIV_MMC0_PRE 91 +#define CLK_DIV_MMC0 92 +#define CLK_DIV_UART1 93 +#define CLK_DIV_UART0 94 +#define CLK_DIV_SPI1_PRE 95 +#define CLK_DIV_SPI1 96 +#define CLK_DIV_SPI0_PRE 97 +#define CLK_DIV_SPI0 98 +#define CLK_DIV_PCM 99 +#define CLK_DIV_AUDIO 100 +#define CLK_DIV_I2S 101 +#define CLK_DIV_CORE2 102 +#define CLK_DIV_APLL 103 +#define CLK_DIV_PCLK_DBG 104 +#define CLK_DIV_ATB 105 +#define CLK_DIV_COREM 106 +#define CLK_DIV_CORE 107 +#define CLK_DIV_HPM 108 +#define CLK_DIV_COPY 109 + +/* Gates */ +#define CLK_ASYNC_G3D 128 +#define CLK_ASYNC_MFCL 129 +#define CLK_PPMULEFT 130 +#define CLK_GPIO_LEFT 131 +#define CLK_ASYNC_ISPMX 132 +#define CLK_ASYNC_FSYSD 133 +#define CLK_ASYNC_LCD0X 134 +#define CLK_ASYNC_CAMX 135 +#define CLK_PPMURIGHT 136 +#define CLK_GPIO_RIGHT 137 +#define CLK_MONOCNT 138 +#define CLK_TZPC6 139 +#define CLK_PROVISIONKEY1 140 +#define CLK_PROVISIONKEY0 141 +#define CLK_CMU_ISPPART 142 +#define CLK_TMU_APBIF 143 +#define CLK_KEYIF 144 +#define CLK_RTC 145 +#define CLK_WDT 146 +#define CLK_MCT 147 +#define CLK_SECKEY 148 +#define CLK_TZPC5 149 +#define CLK_TZPC4 150 +#define CLK_TZPC3 151 +#define CLK_TZPC2 152 +#define CLK_TZPC1 153 +#define CLK_TZPC0 154 +#define CLK_CMU_COREPART 155 +#define CLK_CMU_TOPPART 156 +#define CLK_PMU_APBIF 157 +#define CLK_SYSREG 158 +#define CLK_CHIP_ID 159 +#define CLK_QEJPEG 160 +#define CLK_PIXELASYNCM1 161 +#define CLK_PIXELASYNCM0 162 +#define CLK_PPMUCAMIF 163 +#define CLK_QEM2MSCALER 164 +#define CLK_QEGSCALER1 165 +#define CLK_QEGSCALER0 166 +#define CLK_SMMUJPEG 167 +#define CLK_SMMUM2M2SCALER 168 +#define CLK_SMMUGSCALER1 169 +#define CLK_SMMUGSCALER0 170 +#define CLK_JPEG 171 +#define CLK_M2MSCALER 172 +#define CLK_GSCALER1 173 +#define CLK_GSCALER0 174 +#define CLK_QEMFC 175 +#define CLK_PPMUMFC_L 176 +#define CLK_SMMUMFC_L 177 +#define CLK_MFC 178 +#define CLK_SMMUG3D 179 +#define CLK_QEG3D 180 +#define CLK_PPMUG3D 181 +#define CLK_G3D 182 +#define CLK_QE_CH1_LCD 183 +#define CLK_QE_CH0_LCD 184 +#define CLK_PPMULCD0 185 +#define CLK_SMMUFIMD0 186 +#define CLK_DSIM0 187 +#define CLK_FIMD0 188 +#define CLK_CAM1 189 +#define CLK_UART_ISP_TOP 190 +#define CLK_SPI1_ISP_TOP 191 +#define CLK_SPI0_ISP_TOP 192 +#define CLK_TSADC 193 +#define CLK_PPMUFILE 194 +#define CLK_USBOTG 195 +#define CLK_USBHOST 196 +#define CLK_SROMC 197 +#define CLK_SDMMC1 198 +#define CLK_SDMMC0 199 +#define CLK_PDMA1 200 +#define CLK_PDMA0 201 +#define CLK_PWM 202 +#define CLK_PCM 203 +#define CLK_I2S 204 +#define CLK_SPI1 205 +#define CLK_SPI0 206 +#define CLK_I2C7 207 +#define CLK_I2C6 208 +#define CLK_I2C5 209 +#define CLK_I2C4 210 +#define CLK_I2C3 211 +#define CLK_I2C2 212 +#define CLK_I2C1 213 +#define CLK_I2C0 214 +#define CLK_UART1 215 +#define CLK_UART0 216 +#define CLK_BLOCK_LCD 217 +#define CLK_BLOCK_G3D 218 +#define CLK_BLOCK_MFC 219 +#define CLK_BLOCK_CAM 220 +#define CLK_SMIES 221 + +/* Special clocks */ +#define CLK_SCLK_JPEG 224 +#define CLK_SCLK_M2MSCALER 225 +#define CLK_SCLK_GSCALER1 226 +#define CLK_SCLK_GSCALER0 227 +#define CLK_SCLK_MFC 228 +#define CLK_SCLK_G3D 229 +#define CLK_SCLK_MIPIDPHY2L 230 +#define CLK_SCLK_MIPI0 231 +#define CLK_SCLK_FIMD0 232 +#define CLK_SCLK_CAM1 233 +#define CLK_SCLK_UART_ISP 234 +#define CLK_SCLK_SPI1_ISP 235 +#define CLK_SCLK_SPI0_ISP 236 +#define CLK_SCLK_UPLL 237 +#define CLK_SCLK_TSADC 238 +#define CLK_SCLK_EBI 239 +#define CLK_SCLK_MMC1 240 +#define CLK_SCLK_MMC0 241 +#define CLK_SCLK_I2S 242 +#define CLK_SCLK_PCM 243 +#define CLK_SCLK_SPI1 244 +#define CLK_SCLK_SPI0 245 +#define CLK_SCLK_UART1 246 +#define CLK_SCLK_UART0 247 + +/* + * Total number of clocks of main CMU. + * NOTE: Must be equal to last clock ID increased by one. + */ +#define CLK_NR_CLKS 248 + +#endif /* _DT_BINDINGS_CLOCK_SAMSUNG_EXYNOS3250_CLOCK_H */ Modified: head/sys/gnu/dts/include/dt-bindings/clock/exynos4.h ============================================================================== --- head/sys/gnu/dts/include/dt-bindings/clock/exynos4.h Thu Sep 4 20:47:14 2014 (r271132) +++ head/sys/gnu/dts/include/dt-bindings/clock/exynos4.h Thu Sep 4 20:48:16 2014 (r271133) @@ -1,6 +1,6 @@ /* * Copyright (c) 2013 Samsung Electronics Co., Ltd. - * Author: Andrzej Haja + * Author: Andrzej Hajda * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -33,6 +33,12 @@ #define CLK_MOUT_MPLL_USER_C 18 /* Exynos4x12 only */ #define CLK_MOUT_CORE 19 #define CLK_MOUT_APLL 20 +#define CLK_SCLK_HDMIPHY 22 +#define CLK_OUT_DMC 23 +#define CLK_OUT_TOP 24 +#define CLK_OUT_LEFTBUS 25 +#define CLK_OUT_RIGHTBUS 26 +#define CLK_OUT_CPU 27 /* gate for special clocks (sclk) */ #define CLK_SCLK_FIMC0 128 @@ -181,7 +187,6 @@ #define CLK_KEYIF 347 #define CLK_AUDSS 348 #define CLK_MIPI_HSI 349 /* Exynos4210 only */ -#define CLK_MDMA2 350 /* Exynos4210 only */ #define CLK_PIXELASYNCM0 351 #define CLK_PIXELASYNCM1 352 #define CLK_FIMC_LITE0 353 /* Exynos4x12 only */ @@ -230,6 +235,24 @@ #define CLK_MOUT_G3D 394 #define CLK_ACLK400_MCUISP 395 /* Exynos4x12 only */ +/* gate clocks - ppmu */ +#define CLK_PPMULEFT 400 +#define CLK_PPMURIGHT 401 +#define CLK_PPMUCAMIF 402 +#define CLK_PPMUTV 403 +#define CLK_PPMUMFC_L 404 +#define CLK_PPMUMFC_R 405 +#define CLK_PPMUG3D 406 +#define CLK_PPMUIMAGE 407 +#define CLK_PPMULCD0 408 +#define CLK_PPMULCD1 409 /* Exynos4210 only */ +#define CLK_PPMUFILE 410 +#define CLK_PPMUGPS 411 +#define CLK_PPMUDMC0 412 +#define CLK_PPMUDMC1 413 +#define CLK_PPMUCPU 414 +#define CLK_PPMUACP 415 + /* div clocks */ #define CLK_DIV_ISP0 450 /* Exynos4x12 only */ #define CLK_DIV_ISP1 451 /* Exynos4x12 only */ Modified: head/sys/gnu/dts/include/dt-bindings/clock/exynos5250.h ============================================================================== --- head/sys/gnu/dts/include/dt-bindings/clock/exynos5250.h Thu Sep 4 20:47:14 2014 (r271132) +++ head/sys/gnu/dts/include/dt-bindings/clock/exynos5250.h Thu Sep 4 20:48:16 2014 (r271133) @@ -1,6 +1,6 @@ /* * Copyright (c) 2013 Samsung Electronics Co., Ltd. - * Author: Andrzej Haja + * Author: Andrzej Hajda * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -150,11 +150,30 @@ #define CLK_G2D 345 #define CLK_MDMA0 346 #define CLK_SMMU_MDMA0 347 +#define CLK_SSS 348 +#define CLK_G3D 349 +#define CLK_SMMU_TV 350 +#define CLK_SMMU_FIMD1 351 +#define CLK_SMMU_2D 352 +#define CLK_SMMU_FIMC_ISP 353 +#define CLK_SMMU_FIMC_DRC 354 +#define CLK_SMMU_FIMC_SCC 355 +#define CLK_SMMU_FIMC_SCP 356 +#define CLK_SMMU_FIMC_FD 357 +#define CLK_SMMU_FIMC_MCU 358 +#define CLK_SMMU_FIMC_ODC 359 +#define CLK_SMMU_FIMC_DIS0 360 +#define CLK_SMMU_FIMC_DIS1 361 +#define CLK_SMMU_FIMC_3DNR 362 +#define CLK_SMMU_FIMC_LITE0 363 +#define CLK_SMMU_FIMC_LITE1 364 +#define CLK_CAMIF_TOP 365 /* mux clocks */ #define CLK_MOUT_HDMI 1024 +#define CLK_MOUT_GPLL 1025 /* must be greater than maximal clock id */ -#define CLK_NR_CLKS 1025 +#define CLK_NR_CLKS 1026 #endif /* _DT_BINDINGS_CLOCK_EXYNOS_5250_H */ Copied: head/sys/gnu/dts/include/dt-bindings/clock/exynos5260-clk.h (from r270866, vendor/device-tree/dist/include/dt-bindings/clock/exynos5260-clk.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/include/dt-bindings/clock/exynos5260-clk.h Thu Sep 4 20:48:16 2014 (r271133, copy of r270866, vendor/device-tree/dist/include/dt-bindings/clock/exynos5260-clk.h) @@ -0,0 +1,469 @@ +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * Author: Rahul Sharma + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Provides Constants for Exynos5260 clocks. +*/ + +#ifndef _DT_BINDINGS_CLK_EXYNOS5260_H +#define _DT_BINDINGS_CLK_EXYNOS5260_H + +/* Clock names: */ + +/* List Of Clocks For CMU_TOP */ + +#define TOP_FOUT_DISP_PLL 1 +#define TOP_FOUT_AUD_PLL 2 +#define TOP_MOUT_AUDTOP_PLL_USER 3 +#define TOP_MOUT_AUD_PLL 4 +#define TOP_MOUT_DISP_PLL 5 +#define TOP_MOUT_BUSTOP_PLL_USER 6 +#define TOP_MOUT_MEMTOP_PLL_USER 7 +#define TOP_MOUT_MEDIATOP_PLL_USER 8 +#define TOP_MOUT_DISP_DISP_333 9 +#define TOP_MOUT_ACLK_DISP_333 10 +#define TOP_MOUT_DISP_DISP_222 11 +#define TOP_MOUT_ACLK_DISP_222 12 +#define TOP_MOUT_DISP_MEDIA_PIXEL 13 +#define TOP_MOUT_FIMD1 14 +#define TOP_MOUT_SCLK_PERI_SPI0_CLK 15 +#define TOP_MOUT_SCLK_PERI_SPI1_CLK 16 +#define TOP_MOUT_SCLK_PERI_SPI2_CLK 17 +#define TOP_MOUT_SCLK_PERI_UART0_UCLK 18 +#define TOP_MOUT_SCLK_PERI_UART2_UCLK 19 +#define TOP_MOUT_SCLK_PERI_UART1_UCLK 20 +#define TOP_MOUT_BUS4_BUSTOP_100 21 +#define TOP_MOUT_BUS4_BUSTOP_400 22 +#define TOP_MOUT_BUS3_BUSTOP_100 23 +#define TOP_MOUT_BUS3_BUSTOP_400 24 +#define TOP_MOUT_BUS2_BUSTOP_400 25 +#define TOP_MOUT_BUS2_BUSTOP_100 26 +#define TOP_MOUT_BUS1_BUSTOP_100 27 +#define TOP_MOUT_BUS1_BUSTOP_400 28 +#define TOP_MOUT_SCLK_FSYS_USB 29 +#define TOP_MOUT_SCLK_FSYS_MMC0_SDCLKIN_A 30 +#define TOP_MOUT_SCLK_FSYS_MMC1_SDCLKIN_A 31 +#define TOP_MOUT_SCLK_FSYS_MMC2_SDCLKIN_A 32 +#define TOP_MOUT_SCLK_FSYS_MMC0_SDCLKIN_B 33 +#define TOP_MOUT_SCLK_FSYS_MMC1_SDCLKIN_B 34 +#define TOP_MOUT_SCLK_FSYS_MMC2_SDCLKIN_B 35 +#define TOP_MOUT_ACLK_ISP1_266 36 +#define TOP_MOUT_ISP1_MEDIA_266 37 +#define TOP_MOUT_ACLK_ISP1_400 38 +#define TOP_MOUT_ISP1_MEDIA_400 39 +#define TOP_MOUT_SCLK_ISP1_SPI0 40 +#define TOP_MOUT_SCLK_ISP1_SPI1 41 +#define TOP_MOUT_SCLK_ISP1_UART 42 +#define TOP_MOUT_SCLK_ISP1_SENSOR2 43 +#define TOP_MOUT_SCLK_ISP1_SENSOR1 44 +#define TOP_MOUT_SCLK_ISP1_SENSOR0 45 +#define TOP_MOUT_ACLK_MFC_333 46 +#define TOP_MOUT_MFC_BUSTOP_333 47 +#define TOP_MOUT_ACLK_G2D_333 48 +#define TOP_MOUT_G2D_BUSTOP_333 49 +#define TOP_MOUT_ACLK_GSCL_FIMC 50 +#define TOP_MOUT_GSCL_BUSTOP_FIMC 51 +#define TOP_MOUT_ACLK_GSCL_333 52 +#define TOP_MOUT_GSCL_BUSTOP_333 53 +#define TOP_MOUT_ACLK_GSCL_400 54 +#define TOP_MOUT_M2M_MEDIATOP_400 55 +#define TOP_DOUT_ACLK_MFC_333 56 +#define TOP_DOUT_ACLK_G2D_333 57 +#define TOP_DOUT_SCLK_ISP1_SENSOR2_A 58 +#define TOP_DOUT_SCLK_ISP1_SENSOR1_A 59 +#define TOP_DOUT_SCLK_ISP1_SENSOR0_A 60 +#define TOP_DOUT_ACLK_GSCL_FIMC 61 +#define TOP_DOUT_ACLK_GSCL_400 62 +#define TOP_DOUT_ACLK_GSCL_333 63 +#define TOP_DOUT_SCLK_ISP1_SPI0_B 64 +#define TOP_DOUT_SCLK_ISP1_SPI0_A 65 +#define TOP_DOUT_ACLK_ISP1_400 66 +#define TOP_DOUT_ACLK_ISP1_266 67 +#define TOP_DOUT_SCLK_ISP1_UART 68 +#define TOP_DOUT_SCLK_ISP1_SPI1_B 69 +#define TOP_DOUT_SCLK_ISP1_SPI1_A 70 +#define TOP_DOUT_SCLK_ISP1_SENSOR2_B 71 +#define TOP_DOUT_SCLK_ISP1_SENSOR1_B 72 +#define TOP_DOUT_SCLK_ISP1_SENSOR0_B 73 +#define TOP_DOUTTOP__SCLK_HPM_TARGETCLK 74 +#define TOP_DOUT_SCLK_DISP_PIXEL 75 +#define TOP_DOUT_ACLK_DISP_222 76 +#define TOP_DOUT_ACLK_DISP_333 77 +#define TOP_DOUT_ACLK_BUS4_100 78 +#define TOP_DOUT_ACLK_BUS4_400 79 +#define TOP_DOUT_ACLK_BUS3_100 80 +#define TOP_DOUT_ACLK_BUS3_400 81 +#define TOP_DOUT_ACLK_BUS2_100 82 +#define TOP_DOUT_ACLK_BUS2_400 83 +#define TOP_DOUT_ACLK_BUS1_100 84 +#define TOP_DOUT_ACLK_BUS1_400 85 +#define TOP_DOUT_SCLK_PERI_SPI1_B 86 +#define TOP_DOUT_SCLK_PERI_SPI1_A 87 +#define TOP_DOUT_SCLK_PERI_SPI0_B 88 +#define TOP_DOUT_SCLK_PERI_SPI0_A 89 +#define TOP_DOUT_SCLK_PERI_UART0 90 +#define TOP_DOUT_SCLK_PERI_UART2 91 +#define TOP_DOUT_SCLK_PERI_UART1 92 +#define TOP_DOUT_SCLK_PERI_SPI2_B 93 +#define TOP_DOUT_SCLK_PERI_SPI2_A 94 +#define TOP_DOUT_ACLK_PERI_AUD 95 +#define TOP_DOUT_ACLK_PERI_66 96 +#define TOP_DOUT_SCLK_FSYS_MMC0_SDCLKIN_B 97 +#define TOP_DOUT_SCLK_FSYS_MMC0_SDCLKIN_A 98 +#define TOP_DOUT_SCLK_FSYS_USBDRD30_SUSPEND_CLK 99 +#define TOP_DOUT_ACLK_FSYS_200 100 +#define TOP_DOUT_SCLK_FSYS_MMC2_SDCLKIN_B 101 +#define TOP_DOUT_SCLK_FSYS_MMC2_SDCLKIN_A 102 +#define TOP_DOUT_SCLK_FSYS_MMC1_SDCLKIN_B 103 +#define TOP_DOUT_SCLK_FSYS_MMC1_SDCLKIN_A 104 +#define TOP_SCLK_FIMD1 105 +#define TOP_SCLK_MMC2 106 +#define TOP_SCLK_MMC1 107 +#define TOP_SCLK_MMC0 108 +#define PHYCLK_DPTX_PHY_CH3_TXD_CLK 109 +#define PHYCLK_DPTX_PHY_CH2_TXD_CLK 110 +#define PHYCLK_DPTX_PHY_CH1_TXD_CLK 111 +#define PHYCLK_DPTX_PHY_CH0_TXD_CLK 112 +#define phyclk_hdmi_phy_tmds_clko 113 +#define PHYCLK_HDMI_PHY_PIXEL_CLKO 114 +#define PHYCLK_HDMI_LINK_O_TMDS_CLKHI 115 +#define PHYCLK_MIPI_DPHY_4L_M_TXBYTECLKHS 116 +#define PHYCLK_DPTX_PHY_O_REF_CLK_24M 117 +#define PHYCLK_DPTX_PHY_CLK_DIV2 118 +#define PHYCLK_MIPI_DPHY_4L_M_RXCLKESC0 119 +#define PHYCLK_USBHOST20_PHY_PHYCLOCK 120 +#define PHYCLK_USBHOST20_PHY_FREECLK 121 +#define PHYCLK_USBHOST20_PHY_CLK48MOHCI 122 +#define PHYCLK_USBDRD30_UDRD30_PIPE_PCLK 123 +#define PHYCLK_USBDRD30_UDRD30_PHYCLOCK 124 +#define TOP_NR_CLK 125 + + +/* List Of Clocks For CMU_EGL */ + +#define EGL_FOUT_EGL_PLL 1 +#define EGL_FOUT_EGL_DPLL 2 +#define EGL_MOUT_EGL_B 3 +#define EGL_MOUT_EGL_PLL 4 +#define EGL_DOUT_EGL_PLL 5 +#define EGL_DOUT_EGL_PCLK_DBG 6 +#define EGL_DOUT_EGL_ATCLK 7 +#define EGL_DOUT_PCLK_EGL 8 +#define EGL_DOUT_ACLK_EGL 9 +#define EGL_DOUT_EGL2 10 +#define EGL_DOUT_EGL1 11 +#define EGL_NR_CLK 12 + + +/* List Of Clocks For CMU_KFC */ + +#define KFC_FOUT_KFC_PLL 1 +#define KFC_MOUT_KFC_PLL 2 +#define KFC_MOUT_KFC 3 +#define KFC_DOUT_KFC_PLL 4 +#define KFC_DOUT_PCLK_KFC 5 +#define KFC_DOUT_ACLK_KFC 6 +#define KFC_DOUT_KFC_PCLK_DBG 7 +#define KFC_DOUT_KFC_ATCLK 8 +#define KFC_DOUT_KFC2 9 +#define KFC_DOUT_KFC1 10 +#define KFC_NR_CLK 11 + + +/* List Of Clocks For CMU_MIF */ + +#define MIF_FOUT_MEM_PLL 1 +#define MIF_FOUT_MEDIA_PLL 2 +#define MIF_FOUT_BUS_PLL 3 +#define MIF_MOUT_CLK2X_PHY 4 +#define MIF_MOUT_MIF_DREX2X 5 +#define MIF_MOUT_CLKM_PHY 6 +#define MIF_MOUT_MIF_DREX 7 +#define MIF_MOUT_MEDIA_PLL 8 +#define MIF_MOUT_BUS_PLL 9 +#define MIF_MOUT_MEM_PLL 10 +#define MIF_DOUT_ACLK_BUS_100 11 +#define MIF_DOUT_ACLK_BUS_200 12 +#define MIF_DOUT_ACLK_MIF_466 13 +#define MIF_DOUT_CLK2X_PHY 14 +#define MIF_DOUT_CLKM_PHY 15 +#define MIF_DOUT_BUS_PLL 16 +#define MIF_DOUT_MEM_PLL 17 +#define MIF_DOUT_MEDIA_PLL 18 +#define MIF_CLK_LPDDR3PHY_WRAP1 19 +#define MIF_CLK_LPDDR3PHY_WRAP0 20 +#define MIF_CLK_MONOCNT 21 +#define MIF_CLK_MIF_RTC 22 +#define MIF_CLK_DREX1 23 +#define MIF_CLK_DREX0 24 +#define MIF_CLK_INTMEM 25 +#define MIF_SCLK_LPDDR3PHY_WRAP_U1 26 +#define MIF_SCLK_LPDDR3PHY_WRAP_U0 27 +#define MIF_NR_CLK 28 + + +/* List Of Clocks For CMU_G3D */ + +#define G3D_FOUT_G3D_PLL 1 +#define G3D_MOUT_G3D_PLL 2 +#define G3D_DOUT_PCLK_G3D 3 +#define G3D_DOUT_ACLK_G3D 4 +#define G3D_CLK_G3D_HPM 5 +#define G3D_CLK_G3D 6 +#define G3D_NR_CLK 7 + + +/* List Of Clocks For CMU_AUD */ + +#define AUD_MOUT_SCLK_AUD_PCM 1 +#define AUD_MOUT_SCLK_AUD_I2S 2 +#define AUD_MOUT_AUD_PLL_USER 3 +#define AUD_DOUT_ACLK_AUD_131 4 +#define AUD_DOUT_SCLK_AUD_UART 5 +#define AUD_DOUT_SCLK_AUD_PCM 6 +#define AUD_DOUT_SCLK_AUD_I2S 7 +#define AUD_CLK_AUD_UART 8 +#define AUD_CLK_PCM 9 +#define AUD_CLK_I2S 10 +#define AUD_CLK_DMAC 11 +#define AUD_CLK_SRAMC 12 +#define AUD_SCLK_AUD_UART 13 +#define AUD_SCLK_PCM 14 +#define AUD_SCLK_I2S 15 +#define AUD_NR_CLK 16 + + +/* List Of Clocks For CMU_MFC */ + +#define MFC_MOUT_ACLK_MFC_333_USER 1 +#define MFC_DOUT_PCLK_MFC_83 2 +#define MFC_CLK_MFC 3 +#define MFC_CLK_SMMU2_MFCM1 4 +#define MFC_CLK_SMMU2_MFCM0 5 +#define MFC_NR_CLK 6 + + +/* List Of Clocks For CMU_GSCL */ + +#define GSCL_MOUT_ACLK_CSIS 1 +#define GSCL_MOUT_ACLK_GSCL_FIMC_USER 2 +#define GSCL_MOUT_ACLK_M2M_400_USER 3 +#define GSCL_MOUT_ACLK_GSCL_333_USER 4 +#define GSCL_DOUT_ACLK_CSIS_200 5 +#define GSCL_DOUT_PCLK_M2M_100 6 +#define GSCL_CLK_PIXEL_GSCL1 7 +#define GSCL_CLK_PIXEL_GSCL0 8 +#define GSCL_CLK_MSCL1 9 +#define GSCL_CLK_MSCL0 10 +#define GSCL_CLK_GSCL1 11 +#define GSCL_CLK_GSCL0 12 +#define GSCL_CLK_FIMC_LITE_D 13 +#define GSCL_CLK_FIMC_LITE_B 14 +#define GSCL_CLK_FIMC_LITE_A 15 +#define GSCL_CLK_CSIS1 16 +#define GSCL_CLK_CSIS0 17 +#define GSCL_CLK_SMMU3_LITE_D 18 +#define GSCL_CLK_SMMU3_LITE_B 19 +#define GSCL_CLK_SMMU3_LITE_A 20 +#define GSCL_CLK_SMMU3_GSCL0 21 +#define GSCL_CLK_SMMU3_GSCL1 22 +#define GSCL_CLK_SMMU3_MSCL0 23 +#define GSCL_CLK_SMMU3_MSCL1 24 +#define GSCL_SCLK_CSIS1_WRAP 25 +#define GSCL_SCLK_CSIS0_WRAP 26 +#define GSCL_NR_CLK 27 + + +/* List Of Clocks For CMU_FSYS */ + +#define FSYS_MOUT_PHYCLK_USBHOST20_PHYCLK_USER 1 +#define FSYS_MOUT_PHYCLK_USBHOST20_FREECLK_USER 2 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 20:49:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E197262; Thu, 4 Sep 2014 20:49:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0893C1352; Thu, 4 Sep 2014 20:49:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84KnB4N043083; Thu, 4 Sep 2014 20:49:11 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84KnBBl043081; Thu, 4 Sep 2014 20:49:11 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409042049.s84KnBBl043081@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 20:49:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271134 - stable/10/lib/libstand X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 20:49:12 -0000 Author: emaste Date: Thu Sep 4 20:49:11 2014 New Revision: 271134 URL: http://svnweb.freebsd.org/changeset/base/271134 Log: MFC r269077 (sbruno): libstand qdivrem warning fixes libstand's qdivrem.c assumes that sizeof(int) == sizeof(long), this is not true on amd64 I'm not quite positive this is the "correct" solution for this but it does seem to compile and shut up the spew of warnings when compiling libstand for userboot. Add two _Static_asserts() so that in the future somebody will get a compile failure if an architecture develops that violates the assumptions of this code. (strongly suggested by jmg) Change commetns to indicate int types instead of long. (noted by ian in phabric review) Phabric: https://phabric.freebsd.org/D443 Modified: stable/10/lib/libstand/qdivrem.c stable/10/lib/libstand/quad.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libstand/qdivrem.c ============================================================================== --- stable/10/lib/libstand/qdivrem.c Thu Sep 4 20:48:16 2014 (r271133) +++ stable/10/lib/libstand/qdivrem.c Thu Sep 4 20:49:11 2014 (r271134) @@ -46,14 +46,13 @@ __FBSDID("$FreeBSD$"); #define B (1 << HALF_BITS) /* digit base */ /* Combine two `digits' to make a single two-digit number. */ -#define COMBINE(a, b) (((u_long)(a) << HALF_BITS) | (b)) +#define COMBINE(a, b) (((u_int)(a) << HALF_BITS) | (b)) + +_Static_assert(sizeof(int) / 2 == sizeof(short), + "Bitwise functions in libstand are broken on this architecture\n"); /* select a type for digits in base B: use unsigned short if they fit */ -#if ULONG_MAX == 0xffffffff && USHRT_MAX >= 0xffff typedef unsigned short digit; -#else -typedef u_long digit; -#endif /* * Shift p[0]..p[len] left `sh' bits, ignoring any bits that @@ -74,7 +73,7 @@ shl(digit *p, int len, int sh) * __qdivrem(u, v, rem) returns u/v and, optionally, sets *rem to u%v. * * We do this in base 2-sup-HALF_BITS, so that all intermediate products - * fit within u_long. As a consequence, the maximum length dividend and + * fit within u_int. As a consequence, the maximum length dividend and * divisor are 4 `digits' in this base (they are shorter if they have * leading zeros). */ @@ -85,7 +84,7 @@ __qdivrem(uq, vq, arq) union uu tmp; digit *u, *v, *q; digit v1, v2; - u_long qhat, rhat, t; + u_int qhat, rhat, t; int m, n, d, j, i; digit uspace[5], vspace[5], qspace[5]; @@ -136,7 +135,7 @@ __qdivrem(uq, vq, arq) v[4] = LHALF(tmp.ul[L]); for (n = 4; v[1] == 0; v++) { if (--n == 1) { - u_long rbj; /* r*B+u[j] (not root boy jim) */ + u_int rbj; /* r*B+u[j] (not root boy jim) */ digit q1, q2, q3, q4; /* @@ -212,7 +211,7 @@ __qdivrem(uq, vq, arq) rhat = uj1; goto qhat_too_big; } else { - u_long nn = COMBINE(uj0, uj1); + u_int nn = COMBINE(uj0, uj1); qhat = nn / v1; rhat = nn % v1; } Modified: stable/10/lib/libstand/quad.h ============================================================================== --- stable/10/lib/libstand/quad.h Thu Sep 4 20:48:16 2014 (r271133) +++ stable/10/lib/libstand/quad.h Thu Sep 4 20:49:11 2014 (r271134) @@ -54,6 +54,9 @@ #include #include +_Static_assert(sizeof(quad_t) == sizeof(int) * 2, + "Bitwise function in libstand are broken on this architecture\n"); + /* * Depending on the desired operation, we view a `long long' (aka quad_t) in * one or more of the following formats. @@ -61,8 +64,8 @@ union uu { quad_t q; /* as a (signed) quad */ quad_t uq; /* as an unsigned quad */ - long sl[2]; /* as two signed longs */ - u_long ul[2]; /* as two unsigned longs */ + int sl[2]; /* as two signed ints */ + u_int ul[2]; /* as two unsigned ints */ }; /* @@ -77,8 +80,7 @@ union uu { * and assembly. */ #define QUAD_BITS (sizeof(quad_t) * CHAR_BIT) -#define LONG_BITS (sizeof(long) * CHAR_BIT) -#define HALF_BITS (sizeof(long) * CHAR_BIT / 2) +#define HALF_BITS (sizeof(int) * CHAR_BIT / 2) /* * Extract high and low shortwords from longword, and move low shortword of From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 21:01:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B8F061A; Thu, 4 Sep 2014 21:01:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32C8E14AC; Thu, 4 Sep 2014 21:01:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84L1GXV051684; Thu, 4 Sep 2014 21:01:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84L1BXg051652; Thu, 4 Sep 2014 21:01:11 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409042101.s84L1BXg051652@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 21:01:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271135 - in stable/10: lib/libstand sys/boot sys/boot/amd64 sys/boot/amd64/efi sys/boot/efi sys/boot/efi/include sys/boot/efi/include/amd64 sys/boot/efi/libefi sys/boot/ficl sys/boot/f... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 21:01:16 -0000 Author: emaste Date: Thu Sep 4 21:01:10 2014 New Revision: 271135 URL: http://svnweb.freebsd.org/changeset/base/271135 Log: MFC UEFI loader This MFC consists of the following SVN revisions: 258741 261568 261603 261668 263115 263117 263968 264078 264087 264088 264092 264095 264115 264132 264208 264261 264262 264263 264319 265028 265057 268974 Detailed commit messages: r258741: Note that libstand is 32-bit on amd64 and powerpc64 r261568: Build libstand as a 64-bit library on amd64 The 32-bit bootloaders now link against libstand.a in sys/boot/libstand32, so there is no need to force /usr/lib/libstand.a to be 32-bit. r261603: Don't force efi to a 32-bit build on amd64 r261668: Build libstand as a 64-bit library on ppc64 The 32-bit bootloaders now link against libstand.a in sys/boot/libstand32, so there is no need to force /usr/lib/libstand.a to be 32-bit. This is equivalent to r261568 for amd64. r263115: Add amd64 EFI headers r263117: Connect 64-bit boot ficl to the build It is not yet used, but this will ensure it doesn't get broken. r263968: Use EFI types for EFI values (silences warnings). EFI UINTN is actually a 64-bit type on 64-bit processors. r264078: Put each source file on a separate line This will simplify rebasing the amd64 UEFI patch set. r264087: Build boot/ficl as 64-bit library on amd64 The 32-bit bootloaders on amd64 now use the 32-bit version in ficl32, as is done with libstand32. The native 64-bit ficl will be used by the upcoming UEFI loader. r264088: Merge efilib changes from projects/uefi r247216: Add the ability for a device to have an "alias" handle. r247379: Fix network device registration. r247380: Adjust our load device when we boot from CD under UEFI. The process for booting from a CD under UEFI involves adding a FAT filesystem containing your loader code as an El Torito boot image. When UEFI detects this, it provides a block IO instance that points at the FAT filesystem as a child of the device that represents the CD itself. The problem being that the CD device is flagged as a "raw device" while the boot image is flagged as a "logical partition". The existing EFI partition code only looks for logical partitions and so the CD filesystem was rendered invisible. To fix this, check the type of each block IO device. If it's found to be a CD, and thus an El Torito boot image, look up its parent device and add that instead so that the loader will then load the kernel from the CD filesystem. This is done by using the handle for the boot filesystem as an alias. Something similar to this will be required for booting from other media as well as the loader will live in the EFI system partition, not on the partition containing the kernel. r247381: Remove a scatalogical debug printf that crept in. r264092: Add -fPIC for amd64 r264095: Support UEFI booting on amd64 via loader.efi This is largely the work from the projects/uefi branch, with some additional refinements. This is derived from (and replaces) the original i386 efi implementation; i386 support will be restored later. Specific revisions of note from projects/uefi: r247380: Adjust our load device when we boot from CD under UEFI. The process for booting from a CD under UEFI involves adding a FAT filesystem containing your loader code as an El Torito boot image. When UEFI detects this, it provides a block IO instance that points at the FAT filesystem as a child of the device that represents the CD itself. The problem being that the CD device is flagged as a "raw device" while the boot image is flagged as a "logical partition". The existing EFI partition code only looks for logical partitions and so the CD filesystem was rendered invisible. To fix this, check the type of each block IO device. If it's found to be a CD, and thus an El Torito boot image, look up its parent device and add that instead so that the loader will then load the kernel from the CD filesystem. This is done by using the handle for the boot filesystem as an alias. Something similar to this will be required for booting from other media as well as the loader will live in the EFI system partition, not on the partition containing the kernel. r246231: Add necessary code to hand off from loader to an amd64 kernel. r246335: Grab the EFI memory map and store it as module metadata on the kernel. This is the same approach used to provide the BIOS SMAP to the kernel. r246336: Pass the ACPI table metadata via hints so the kernel ACPI code can find them. r246608: Rework copy routines to ensure we always use memory allocated via EFI. The previous code assumed it could copy wherever it liked. This is not the case. The approach taken by this code is pretty ham-fisted in that it simply allocates a large (32MB) buffer area and stages into that, then copies the whole area into place when it's time to execute. A more elegant solution could be used but this works for now. r247214: Fix a number of problems preventing proper handover to the kernel. There were two issues at play here. Firstly, there was nothing preventing UEFI from placing the loader code above 1GB in RAM. This meant that when we switched in the page tables the kernel expects to be running on, we are suddenly unmapped and things no longer work. We solve this by making our trampoline code not dependent on being at any given position and simply copying it to a "safe" location before calling it. Secondly, UEFI could allocate our stack wherever it wants. As it happened on my PC, that was right where I was copying the kernel to. This did not cause happiness. The solution to this was to also switch to a temporary stack in a safe location before performing the final copy of the loaded kernel. r246231: Add necessary code to hand off from loader to an amd64 kernel. r246335: Grab the EFI memory map and store it as module metadata on the kernel. This is the same approach used to provide the BIOS SMAP to the kernel. r246336: Pass the ACPI table metadata via hints so the kernel ACPI code can find them. r246608: Rework copy routines to ensure we always use memory allocated via EFI. The previous code assumed it could copy wherever it liked. This is not the case. The approach taken by this code is pretty ham-fisted in that it simply allocates a large (32MB) buffer area and stages into that, then copies the whole area into place when it's time to execute. A more elegant solution could be used but this works for now. r247214: Fix a number of problems preventing proper handover to the kernel. There were two issues at play here. Firstly, there was nothing preventing UEFI from placing the loader code above 1GB in RAM. This meant that when we switched in the page tables the kernel expects to be running on, we are suddenly unmapped and things no longer work. We solve this by making our trampoline code not dependent on being at any given position and simply copying it to a "safe" location before calling it. Secondly, UEFI could allocate our stack wherever it wants. As it happened on my PC, that was right where I was copying the kernel to. This did not cause happiness. The solution to this was to also switch to a temporary stack in a safe location before performing the final copy of the loaded kernel. r247216: Use the UEFI Graphics Output Protocol to get the parameters of the framebuffer. r264115: Fix printf format mismatches r264132: Connect sys/boot/amd64 to the build r264208: Do not build the amd64 UEFI loader with GCC The UEFI loader causes buildworld to fail when building with (in-tree) GCC, due to a typedef redefinition. As it happens the in-tree GCC cannot successfully build the UEFI loader anyhow, as it does not support __attribute__((ms_abi)). Thus, just avoid trying to build it with GCC, rather than disconnecting it from the build until the underlying issue is fixed. r264261: Correct a variable's type for 64-bit Ficl FICL_INT is long. r264262: Fix printf args for 64-bit archs r264263: Add explicit casts to quiet warnings in libefi r264319: Fix EFI loader object tree creation on 9.x build hosts Previously ${COMPILER_TYPE} was checked in sys/boot/amd64, and the efi subdirectory was skipped altogether for gcc (since GCC does not support a required attribute). However, during the early buildworld stages ${COMPILER_TYPE} is the existing system compiler (i.e., gcc on 9.x build hosts), not the compiler that will eventually be used. This caused "make obj" to skip the efi subdirectory. In later build stages ${COMPILER_TYPE} is "clang", and then the efi loader would attempt to build in the source directory. r265028 (dteske): Disable the beastie menu for EFI console ... which doesn't support ANSI codes (so things like `at-xy', `clear', and other commands don't work making it impossible to generate a living menu). r265057 (nwhitehorn): Turn off various fancy instruction sets... as well as deduplicate some options. This makes the EFI loader build work with CPUTYPE=native in make.conf on my Core i5. r268974 (sbruno): Supress clang warning for FreeBSD printf %b and %D formats Relnotes: Yes Sponsored by: The FreeBSD Foundation Added: stable/10/sys/boot/amd64/ - copied from r264095, head/sys/boot/amd64/ stable/10/sys/boot/efi/include/amd64/ - copied from r263115, head/sys/boot/efi/include/amd64/ stable/10/sys/boot/efi/include/efigop.h - copied unchanged from r264095, head/sys/boot/efi/include/efigop.h stable/10/sys/boot/ficl32/ - copied from r264087, head/sys/boot/ficl32/ Deleted: stable/10/sys/boot/ficl64/ stable/10/sys/boot/i386/efi/Makefile stable/10/sys/boot/i386/efi/autoload.c stable/10/sys/boot/i386/efi/conf.c stable/10/sys/boot/i386/efi/devicename.c stable/10/sys/boot/i386/efi/ldscript.amd64 stable/10/sys/boot/i386/efi/main.c stable/10/sys/boot/i386/efi/version Modified: stable/10/lib/libstand/Makefile stable/10/sys/boot/Makefile stable/10/sys/boot/Makefile.amd64 stable/10/sys/boot/amd64/Makefile.inc stable/10/sys/boot/amd64/efi/Makefile stable/10/sys/boot/amd64/efi/copy.c stable/10/sys/boot/amd64/efi/elf64_freebsd.c stable/10/sys/boot/amd64/efi/main.c stable/10/sys/boot/efi/Makefile.inc stable/10/sys/boot/efi/include/efi.h stable/10/sys/boot/efi/include/efilib.h stable/10/sys/boot/efi/libefi/Makefile stable/10/sys/boot/efi/libefi/efinet.c stable/10/sys/boot/efi/libefi/efipart.c stable/10/sys/boot/efi/libefi/handles.c stable/10/sys/boot/ficl/Makefile stable/10/sys/boot/ficl/tools.c stable/10/sys/boot/ficl/words.c stable/10/sys/boot/forth/beastie.4th stable/10/sys/boot/forth/beastie.4th.8 stable/10/sys/boot/forth/loader.conf.5 stable/10/sys/boot/i386/libi386/Makefile stable/10/sys/boot/i386/loader/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libstand/Makefile ============================================================================== --- stable/10/lib/libstand/Makefile Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/lib/libstand/Makefile Thu Sep 4 21:01:10 2014 (r271135) @@ -21,18 +21,20 @@ CFLAGS+= -ffreestanding -Wformat CFLAGS+= -I${.CURDIR} .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" -CFLAGS.gcc+= -mpreferred-stack-boundary=2 CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float .endif +.if ${MACHINE_CPUARCH} == "i386" +CFLAGS.gcc+= -mpreferred-stack-boundary=2 +.endif +.if ${MACHINE_CPUARCH} == "amd64" +CFLAGS+= -fPIC +.endif .if ${MACHINE} == "pc98" CFLAGS+= -Os .endif .if ${MACHINE_CPUARCH} == "powerpc" CFLAGS+= -msoft-float -D_STANDALONE -DNETIF_DEBUG .endif -.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64" -CFLAGS+= -m32 -I. -.endif .if ${MACHINE_CPUARCH} == "arm" CFLAGS+= -msoft-float -D_STANDALONE .endif @@ -103,9 +105,7 @@ SRCS+= syncicache.c SRCS+= uuid_equal.c uuid_is_nil.c # _setjmp/_longjmp -.if ${MACHINE_CPUARCH} == "amd64" -.PATH: ${.CURDIR}/i386 -.elif ${MACHINE_ARCH} == "powerpc64" +.if ${MACHINE_ARCH} == "powerpc64" .PATH: ${.CURDIR}/powerpc .else .PATH: ${.CURDIR}/${MACHINE_CPUARCH} @@ -179,12 +179,3 @@ SRCS+= nandfs.c .include -.if ${MACHINE_CPUARCH} == "amd64" -beforedepend ${OBJS}: machine -cleandepend: cleanmachine -cleanmachine: - rm -f machine - -machine: - ln -s ${.CURDIR}/../../sys/i386/include machine -.endif Modified: stable/10/sys/boot/Makefile ============================================================================== --- stable/10/sys/boot/Makefile Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/Makefile Thu Sep 4 21:01:10 2014 (r271135) @@ -9,9 +9,12 @@ SUBDIR+= ficl .endif # Pick the machine-dependent subdir based on the target architecture. -ADIR= ${MACHINE:S/amd64/i386/:S/powerpc64/powerpc/} +ADIR= ${MACHINE:S/powerpc64/powerpc/} .if exists(${.CURDIR}/${ADIR}/.) SUBDIR+= ${ADIR} .endif +.if ${MACHINE} == "amd64" +SUBDIR+= i386 +.endif .include Modified: stable/10/sys/boot/Makefile.amd64 ============================================================================== --- stable/10/sys/boot/Makefile.amd64 Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/Makefile.amd64 Thu Sep 4 21:01:10 2014 (r271135) @@ -4,3 +4,7 @@ SUBDIR+= efi SUBDIR+= libstand32 SUBDIR+= zfs SUBDIR+= userboot + +.if ${MK_FORTH} != "no" +SUBDIR+= ficl32 +.endif Modified: stable/10/sys/boot/amd64/Makefile.inc ============================================================================== --- head/sys/boot/amd64/Makefile.inc Fri Apr 4 00:16:46 2014 (r264095) +++ stable/10/sys/boot/amd64/Makefile.inc Thu Sep 4 21:01:10 2014 (r271135) @@ -4,8 +4,9 @@ BINDIR?= /boot +# See conf/kern.mk for the correct set of these CFLAGS+= -ffreestanding -CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float +CFLAGS+= -mno-mmx -mno-sse -mno-aes -mno-avx -msoft-float LDFLAGS+= -nostdlib .include "../Makefile.inc" Modified: stable/10/sys/boot/amd64/efi/Makefile ============================================================================== --- head/sys/boot/amd64/efi/Makefile Fri Apr 4 00:16:46 2014 (r264095) +++ stable/10/sys/boot/amd64/efi/Makefile Thu Sep 4 21:01:10 2014 (r271135) @@ -3,6 +3,10 @@ NO_MAN= .include + +# In-tree GCC does not support __attribute__((ms_abi)). +.if ${COMPILER_TYPE} != "gcc" + MK_SSP= no PROG= loader.sym @@ -85,6 +89,8 @@ CFLAGS+= -I${.CURDIR}/../../common DPADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND} LDADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND} +.endif # ${COMPILER_TYPE} != "gcc" + .include beforedepend ${OBJS}: machine x86 Modified: stable/10/sys/boot/amd64/efi/copy.c ============================================================================== --- head/sys/boot/amd64/efi/copy.c Fri Apr 4 00:16:46 2014 (r264095) +++ stable/10/sys/boot/amd64/efi/copy.c Thu Sep 4 21:01:10 2014 (r271135) @@ -51,8 +51,8 @@ x86_efi_copy_init(void) status = BS->AllocatePages(AllocateAnyPages, EfiLoaderData, STAGE_PAGES, &staging); if (EFI_ERROR(status)) { - printf("failed to allocate staging area: %d\n", - status & EFI_ERROR_MASK); + printf("failed to allocate staging area: %lu\n", + (unsigned long)(status & EFI_ERROR_MASK)); return (status); } Modified: stable/10/sys/boot/amd64/efi/elf64_freebsd.c ============================================================================== --- head/sys/boot/amd64/efi/elf64_freebsd.c Fri Apr 4 00:16:46 2014 (r264095) +++ stable/10/sys/boot/amd64/efi/elf64_freebsd.c Thu Sep 4 21:01:10 2014 (r271135) @@ -101,7 +101,7 @@ elf64_exec(struct preloaded_file *fp) rsdp = efi_get_table(&acpi_guid); } if (rsdp != NULL) { - sprintf(buf, "0x%016llx", rsdp); + sprintf(buf, "0x%016llx", (unsigned long long)rsdp); setenv("hint.acpi.0.rsdp", buf, 1); revision = rsdp->Revision; if (revision == 0) @@ -115,7 +115,8 @@ elf64_exec(struct preloaded_file *fp) setenv("hint.acpi.0.rsdt", buf, 1); if (revision >= 2) { /* XXX extended checksum? */ - sprintf(buf, "0x%016llx", rsdp->XsdtPhysicalAddress); + sprintf(buf, "0x%016llx", + (unsigned long long)rsdp->XsdtPhysicalAddress); setenv("hint.acpi.0.xsdt", buf, 1); sprintf(buf, "%d", rsdp->Length); setenv("hint.acpi.0.xsdt_length", buf, 1); Modified: stable/10/sys/boot/amd64/efi/main.c ============================================================================== --- head/sys/boot/amd64/efi/main.c Fri Apr 4 00:16:46 2014 (r264095) +++ stable/10/sys/boot/amd64/efi/main.c Thu Sep 4 21:01:10 2014 (r271135) @@ -304,7 +304,7 @@ command_mode(int argc, char *argv[]) printf("couldn't set mode %d\n", mode); return (CMD_ERROR); } - sprintf(rowenv, "%d", rows); + sprintf(rowenv, "%u", (unsigned)rows); setenv("LINES", rowenv, 1); return (CMD_OK); @@ -314,7 +314,8 @@ command_mode(int argc, char *argv[]) status = conout->QueryMode(conout, i, &cols, &rows); if (EFI_ERROR(status)) break; - printf("Mode %d: %d columns, %d rows\n", i, cols, rows); + printf("Mode %d: %u columns, %u rows\n", i, (unsigned)cols, + (unsigned)rows); } if (i != 0) Modified: stable/10/sys/boot/efi/Makefile.inc ============================================================================== --- stable/10/sys/boot/efi/Makefile.inc Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/efi/Makefile.inc Thu Sep 4 21:01:10 2014 (r271135) @@ -2,17 +2,10 @@ BINDIR?= /boot -.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "i386" CFLAGS+= -march=i386 .endif -.if ${MACHINE_CPUARCH} == "amd64" -CFLAGS+= -m32 -ACFLAGS+= -m32 -LDFLAGS+= -m elf_i386_fbsd -AFLAGS+= --32 -.endif - # Options used when building app-specific efi components CFLAGS+= -ffreestanding -fshort-wchar -Wformat LDFLAGS+= -nostdlib Modified: stable/10/sys/boot/efi/include/efi.h ============================================================================== --- stable/10/sys/boot/efi/include/efi.h Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/efi/include/efi.h Thu Sep 4 21:01:10 2014 (r271135) @@ -52,6 +52,7 @@ Revision History #include "efiapi.h" #include "efifs.h" #include "efierr.h" +#include "efigop.h" #define EFI_STRINGIZE(a) #a #define EFI_PROTOCOL_DEFINITION(a) EFI_STRINGIZE(Protocol/a/a.h) Copied: stable/10/sys/boot/efi/include/efigop.h (from r264095, head/sys/boot/efi/include/efigop.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/efi/include/efigop.h Thu Sep 4 21:01:10 2014 (r271135, copy of r264095, head/sys/boot/efi/include/efigop.h) @@ -0,0 +1,122 @@ +/* $FreeBSD$ */ +/*++ + +Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved +This software and associated documentation (if any) is furnished +under a license and may only be used or copied in accordance +with the terms of the license. Except as permitted by such +license, no part of this software or documentation may be +reproduced, stored in a retrieval system, or transmitted in any +form or by any means without the express written consent of +Intel Corporation. + +Module Name: + + efigop.h + +Abstract: + Info about framebuffers + + + + +Revision History + +--*/ + +#ifndef _EFIGOP_H +#define _EFIGOP_H + +#define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \ + { 0x9042a9de, 0x23dc, 0x4a38, 0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, \ + 0x51, 0x6a } + +INTERFACE_DECL(_EFI_GRAPHICS_OUTPUT); + +typedef struct { + UINT32 RedMask; + UINT32 GreenMask; + UINT32 BlueMask; + UINT32 ReservedMask; +} EFI_PIXEL_BITMASK; + +typedef enum { + PixelRedGreenBlueReserved8BitPerColor, + PixelBlueGreenRedReserved8BitPerColor, + PixelBitMask, + PixelBltOnly, + PixelFormatMax, +} EFI_GRAPHICS_PIXEL_FORMAT; + +typedef struct { + UINT32 Version; + UINT32 HorizontalResolution; + UINT32 VerticalResolution; + EFI_GRAPHICS_PIXEL_FORMAT PixelFormat; + EFI_PIXEL_BITMASK PixelInformation; + UINT32 PixelsPerScanLine; +} EFI_GRAPHICS_OUTPUT_MODE_INFORMATION; + +typedef struct { + UINT32 MaxMode; + UINT32 Mode; + EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info; + UINTN SizeOfInfo; + EFI_PHYSICAL_ADDRESS FrameBufferBase; + UINTN FrameBufferSize; +} EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE; + +typedef +EFI_STATUS +(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE) ( + IN struct _EFI_GRAPHICS_OUTPUT *This, + IN UINT32 ModeNumber, + OUT UINTN *SizeOfInfo, + OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info + ); + +typedef +EFI_STATUS +(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE) ( + IN struct _EFI_GRAPHICS_OUTPUT *This, + IN UINT32 ModeNumber + ); + +typedef struct { + UINT8 Blue; + UINT8 Green; + UINT8 Red; + UINT8 Reserved; +} EFI_GRAPHICS_OUTPUT_BLT_PIXEL; + +typedef enum { + EfiBltVideoFill, + EfiBltVideoToBltBuffer, + EfiBltBufferToVideo, + EfiBltVideoToVideo, + EfiGraphcisOutputBltOperationMax, +} EFI_GRAPHICS_OUTPUT_BLT_OPERATION; + +typedef +EFI_STATUS +(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT) ( + IN struct _EFI_GRAPHICS_OUTPUT *This, + IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, + IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation, + IN UINTN SourceX, + IN UINTN SourceY, + IN UINTN DestinationX, + IN UINTN DestinationY, + IN UINTN Width, + IN UINTN Height, + IN UINTN Delta + ); + +typedef struct _EFI_GRAPHICS_OUTPUT { + EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE QueryMode; + EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE SetMode; + EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT Blt; + EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode; +} EFI_GRAPHICS_OUTPUT; + +#endif /* _EFIGOP_H */ Modified: stable/10/sys/boot/efi/include/efilib.h ============================================================================== --- stable/10/sys/boot/efi/include/efilib.h Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/efi/include/efilib.h Thu Sep 4 21:01:10 2014 (r271135) @@ -41,7 +41,7 @@ extern struct netif_driver efinetif; void *efi_get_table(EFI_GUID *tbl); void efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table); -int efi_register_handles(struct devsw *, EFI_HANDLE *, int); +int efi_register_handles(struct devsw *, EFI_HANDLE *, EFI_HANDLE *, int); EFI_HANDLE efi_find_handle(struct devsw *, int); int efi_handle_lookup(EFI_HANDLE, struct devsw **, int *); Modified: stable/10/sys/boot/efi/libefi/Makefile ============================================================================== --- stable/10/sys/boot/efi/libefi/Makefile Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/efi/libefi/Makefile Thu Sep 4 21:01:10 2014 (r271135) @@ -6,11 +6,18 @@ INTERNALLIB= SRCS= delay.c efi_console.c efinet.c efipart.c errno.c handles.c \ libefi.c time.c +.if ${MACHINE_ARCH} == "amd64" +CFLAGS+= -fPIC +.endif CFLAGS+= -I${.CURDIR}/../include -CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH:S/amd64/i386/} +CFLAGS+= -I${.CURDIR}/../include/${MACHINE_CPUARCH} CFLAGS+= -I${.CURDIR}/../../../../lib/libstand # Pick up the bootstrap header for some interface items CFLAGS+= -I${.CURDIR}/../../common + +# Suppress warning from clang for FreeBSD %b and %D formats +CFLAGS+= -fformat-extensions + .include Modified: stable/10/sys/boot/efi/libefi/efinet.c ============================================================================== --- stable/10/sys/boot/efi/libefi/efinet.c Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/efi/libefi/efinet.c Thu Sep 4 21:01:10 2014 (r271135) @@ -274,7 +274,7 @@ efinet_dev_init() if (EFI_ERROR(status)) return (efi_status_to_errno(status)); nifs = sz / sizeof(EFI_HANDLE); - err = efi_register_handles(&efinet_dev, handles, nifs); + err = efi_register_handles(&efinet_dev, handles, NULL, nifs); free(handles); if (err != 0) return (err); Modified: stable/10/sys/boot/efi/libefi/efipart.c ============================================================================== --- stable/10/sys/boot/efi/libefi/efipart.c Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/efi/libefi/efipart.c Thu Sep 4 21:01:10 2014 (r271135) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include static EFI_GUID blkio_guid = BLOCK_IO_PROTOCOL; +static EFI_GUID devpath_guid = DEVICE_PATH_PROTOCOL; static int efipart_init(void); static int efipart_strategy(void *, int, daddr_t, size_t, char *, size_t *); @@ -62,9 +63,11 @@ static int efipart_init(void) { EFI_BLOCK_IO *blkio; - EFI_HANDLE *hin, *hout; + EFI_DEVICE_PATH *devpath, *node; + EFI_HANDLE *hin, *hout, *aliases, handle; EFI_STATUS status; UINTN sz; + CHAR16 *path; u_int n, nin, nout; int err; @@ -72,7 +75,7 @@ efipart_init(void) hin = NULL; status = BS->LocateHandle(ByProtocol, &blkio_guid, 0, &sz, 0); if (status == EFI_BUFFER_TOO_SMALL) { - hin = (EFI_HANDLE *)malloc(sz * 2); + hin = (EFI_HANDLE *)malloc(sz * 3); status = BS->LocateHandle(ByProtocol, &blkio_guid, 0, &sz, hin); if (EFI_ERROR(status)) @@ -84,19 +87,50 @@ efipart_init(void) /* Filter handles to only include FreeBSD partitions. */ nin = sz / sizeof(EFI_HANDLE); hout = hin + nin; + aliases = hout + nin; nout = 0; + bzero(aliases, nin * sizeof(EFI_HANDLE)); + for (n = 0; n < nin; n++) { - status = BS->HandleProtocol(hin[n], &blkio_guid, &blkio); + status = BS->HandleProtocol(hin[n], &devpath_guid, + (void **)&devpath); + if (EFI_ERROR(status)) { + continue; + } + node = devpath; + while (!IsDevicePathEnd(NextDevicePathNode(node))) + node = NextDevicePathNode(node); + status = BS->HandleProtocol(hin[n], &blkio_guid, + (void**)&blkio); if (EFI_ERROR(status)) continue; if (!blkio->Media->LogicalPartition) continue; - hout[nout] = hin[n]; + + /* + * If we come across a logical partition of subtype CDROM + * it doesn't refer to the CD filesystem itself, but rather + * to any usable El Torito boot image on it. In this case + * we try to find the parent device and add that instead as + * that will be the CD filesystem. + */ + if (DevicePathType(node) == MEDIA_DEVICE_PATH && + DevicePathSubType(node) == MEDIA_CDROM_DP) { + node->Type = END_DEVICE_PATH_TYPE; + node->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE; + status = BS->LocateDevicePath(&blkio_guid, &devpath, + &handle); + if (EFI_ERROR(status)) + continue; + hout[nout] = handle; + aliases[nout] = hin[n]; + } else + hout[nout] = hin[n]; nout++; } - err = efi_register_handles(&efipart_dev, hout, nout); + err = efi_register_handles(&efipart_dev, hout, aliases, nout); free(hin); return (err); } @@ -115,7 +149,7 @@ efipart_print(int verbose) sprintf(line, " %s%d:", efipart_dev.dv_name, unit); pager_output(line); - status = BS->HandleProtocol(h, &blkio_guid, &blkio); + status = BS->HandleProtocol(h, &blkio_guid, (void **)&blkio); if (!EFI_ERROR(status)) { sprintf(line, " %llu blocks", (unsigned long long)(blkio->Media->LastBlock + 1)); @@ -144,7 +178,7 @@ efipart_open(struct open_file *f, ...) if (h == NULL) return (EINVAL); - status = BS->HandleProtocol(h, &blkio_guid, &blkio); + status = BS->HandleProtocol(h, &blkio_guid, (void **)&blkio); if (EFI_ERROR(status)) return (efi_status_to_errno(status)); Modified: stable/10/sys/boot/efi/libefi/handles.c ============================================================================== --- stable/10/sys/boot/efi/libefi/handles.c Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/efi/libefi/handles.c Thu Sep 4 21:01:10 2014 (r271135) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); struct entry { EFI_HANDLE handle; + EFI_HANDLE alias; struct devsw *dev; int unit; }; @@ -40,7 +41,8 @@ struct entry *entry; int nentries; int -efi_register_handles(struct devsw *sw, EFI_HANDLE *handles, int count) +efi_register_handles(struct devsw *sw, EFI_HANDLE *handles, + EFI_HANDLE *aliases, int count) { size_t sz; int idx, unit; @@ -51,6 +53,10 @@ efi_register_handles(struct devsw *sw, E entry = (entry == NULL) ? malloc(sz) : realloc(entry, sz); for (unit = 0; idx < nentries; idx++, unit++) { entry[idx].handle = handles[unit]; + if (aliases != NULL) + entry[idx].alias = aliases[unit]; + else + entry[idx].alias = NULL; entry[idx].dev = sw; entry[idx].unit = unit; } @@ -78,7 +84,7 @@ efi_handle_lookup(EFI_HANDLE h, struct d int idx; for (idx = 0; idx < nentries; idx++) { - if (entry[idx].handle != h) + if (entry[idx].handle != h && entry[idx].alias != h) continue; if (dev != NULL) *dev = entry[idx].dev; Modified: stable/10/sys/boot/ficl/Makefile ============================================================================== --- stable/10/sys/boot/ficl/Makefile Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/ficl/Makefile Thu Sep 4 21:01:10 2014 (r271135) @@ -3,7 +3,7 @@ FICLDIR?= ${.CURDIR} -.if !defined(FICL64) +.if defined(FICL32) .PATH: ${FICLDIR}/${MACHINE_CPUARCH:S/amd64/i386/} .else .PATH: ${FICLDIR}/${MACHINE_CPUARCH} @@ -14,11 +14,12 @@ BASE_SRCS= dict.c ficl.c fileaccess.c fl SRCS= ${BASE_SRCS} sysdep.c softcore.c CLEANFILES= softcore.c testmain testmain.o CFLAGS+= -ffreestanding -.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" -.if !defined(FICL64) +.if ${MACHINE_CPUARCH} == "i386" || \ + (${MACHINE_CPUARCH} == "amd64" && defined(FICL32)) CFLAGS+= -march=i386 CFLAGS.gcc+= -mpreferred-stack-boundary=2 .endif +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" CFLAGS+= -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float .endif .if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" @@ -48,22 +49,32 @@ SOFTWORDS= softcore.fr jhlocal.fr marker # Optional OO extension softwords #SOFTWORDS+= oo.fr classes.fr -.if ${MACHINE_CPUARCH} == "amd64" && !defined(FICL64) +.if ${MACHINE_CPUARCH} == "amd64" +.if defined(FICL32) CFLAGS+= -m32 -I. +.else +CFLAGS+= -fPIC +.endif .endif .if ${MACHINE_ARCH} == "powerpc64" CFLAGS+= -m32 -mcpu=powerpc -I. .endif -CFLAGS+= -I${FICLDIR} -I${FICLDIR}/${MACHINE_CPUARCH:S/amd64/i386/} \ +.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32) +FICL_CPUARCH= i386 +.else +FICL_CPUARCH= ${MACHINE_CPUARCH} +.endif + +CFLAGS+= -I${FICLDIR} -I${FICLDIR}/${FICL_CPUARCH} \ -I${FICLDIR}/../common softcore.c: ${SOFTWORDS} softcore.awk (cd ${FICLDIR}/softwords; cat ${SOFTWORDS} \ | awk -f softcore.awk -v datestamp="`LC_ALL=C date`") > ${.TARGET} -.if ${MACHINE_CPUARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" && defined(FICL32) .if !exists(machine) ${SRCS:M*.c:R:S/$/.o/g}: machine Modified: stable/10/sys/boot/ficl/tools.c ============================================================================== --- stable/10/sys/boot/ficl/tools.c Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/ficl/tools.c Thu Sep 4 21:01:10 2014 (r271135) @@ -201,7 +201,7 @@ static void seeColon(FICL_VM *pVM, CELL *cp++ = '>'; else *cp++ = ' '; - cp += sprintf(cp, "%3d ", pc-param0); + cp += sprintf(cp, "%3d ", (int)(pc-param0)); if (isAFiclWord(pd, pFW)) { @@ -239,40 +239,40 @@ static void seeColon(FICL_VM *pVM, CELL case IF: c = *++pc; if (c.i > 0) - sprintf(cp, "if / while (branch %d)", pc+c.i-param0); + sprintf(cp, "if / while (branch %d)", (int)(pc+c.i-param0)); else - sprintf(cp, "until (branch %d)", pc+c.i-param0); + sprintf(cp, "until (branch %d)", (int)(pc+c.i-param0)); break; case BRANCH: c = *++pc; if (c.i == 0) - sprintf(cp, "repeat (branch %d)", pc+c.i-param0); + sprintf(cp, "repeat (branch %d)", (int)(pc+c.i-param0)); else if (c.i == 1) - sprintf(cp, "else (branch %d)", pc+c.i-param0); + sprintf(cp, "else (branch %d)", (int)(pc+c.i-param0)); else - sprintf(cp, "endof (branch %d)", pc+c.i-param0); + sprintf(cp, "endof (branch %d)", (int)(pc+c.i-param0)); break; case OF: c = *++pc; - sprintf(cp, "of (branch %d)", pc+c.i-param0); + sprintf(cp, "of (branch %d)", (int)(pc+c.i-param0)); break; case QDO: c = *++pc; - sprintf(cp, "?do (leave %d)", (CELL *)c.p-param0); + sprintf(cp, "?do (leave %d)", (int)((CELL *)c.p-param0)); break; case DO: c = *++pc; - sprintf(cp, "do (leave %d)", (CELL *)c.p-param0); + sprintf(cp, "do (leave %d)", (int)((CELL *)c.p-param0)); break; case LOOP: c = *++pc; - sprintf(cp, "loop (branch %d)", pc+c.i-param0); + sprintf(cp, "loop (branch %d)", (int)(pc+c.i-param0)); break; case PLOOP: c = *++pc; - sprintf(cp, "+loop (branch %d)", pc+c.i-param0); + sprintf(cp, "+loop (branch %d)", (int)(pc+c.i-param0)); break; default: sprintf(cp, "%.*s", pFW->nName, pFW->name); Modified: stable/10/sys/boot/ficl/words.c ============================================================================== --- stable/10/sys/boot/ficl/words.c Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/ficl/words.c Thu Sep 4 21:01:10 2014 (r271135) @@ -2567,7 +2567,7 @@ static void setObjectFlag(FICL_VM *pVM) static void isObject(FICL_VM *pVM) { - int flag; + FICL_INT flag; FICL_WORD *pFW = (FICL_WORD *)stackPopPtr(pVM->pStack); flag = ((pFW != NULL) && (pFW->flags & FW_ISOBJECT)) ? FICL_TRUE : FICL_FALSE; Modified: stable/10/sys/boot/forth/beastie.4th ============================================================================== --- stable/10/sys/boot/forth/beastie.4th Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/forth/beastie.4th Thu Sep 4 21:01:10 2014 (r271135) @@ -242,6 +242,11 @@ variable logoY ; : beastie-start ( -- ) \ starts the menu + s" console" getenv dup -1 <> if + s" efi" 2swap contains? if + s" set beastie_disable=YES" evaluate + then + else drop then s" beastie_disable" getenv dup -1 <> if s" YES" compare-insensitive 0= if Modified: stable/10/sys/boot/forth/beastie.4th.8 ============================================================================== --- stable/10/sys/boot/forth/beastie.4th.8 Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/forth/beastie.4th.8 Thu Sep 4 21:01:10 2014 (r271135) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 16, 2011 +.Dd April 27, 2014 .Dt BEASTIE.4TH 8 .Os .Sh NAME @@ -119,6 +119,8 @@ Sets the desired row position of the log If set to .Dq YES , the beastie boot menu will be skipped. +The beastie boot menu is always skipped if booting UEFI or running non-x86 +hardware. .It Va loader_delay If set to a number higher than zero, introduces a delay before starting the beastie boot menu. During the delay the user can press either Ctrl-C to skip Modified: stable/10/sys/boot/forth/loader.conf.5 ============================================================================== --- stable/10/sys/boot/forth/loader.conf.5 Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/forth/loader.conf.5 Thu Sep 4 21:01:10 2014 (r271135) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd October 18, 2013 +.Dd April 27, 2014 .Dt LOADER.CONF 5 .Os .Sh NAME @@ -236,6 +236,8 @@ be displayed. If set to .Dq YES , the beastie boot menu will be skipped. +The beastie boot menu is always skipped if booting UEFI or running non-x86 +hardware. .It Va loader_logo Pq Dq Li orbbw Selects a desired logo in the beastie boot menu. Possible values are: Modified: stable/10/sys/boot/i386/libi386/Makefile ============================================================================== --- stable/10/sys/boot/i386/libi386/Makefile Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/i386/libi386/Makefile Thu Sep 4 21:01:10 2014 (r271135) @@ -52,6 +52,9 @@ CFLAGS+= -I${.CURDIR}/../../common -I${. # the location of libstand CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ +# Suppress warning from clang for FreeBSD %b and %D formats +CFLAGS+= -fformat-extensions + .if ${MACHINE_CPUARCH} == "amd64" CLEANFILES+= machine machine: Modified: stable/10/sys/boot/i386/loader/Makefile ============================================================================== --- stable/10/sys/boot/i386/loader/Makefile Thu Sep 4 20:49:11 2014 (r271134) +++ stable/10/sys/boot/i386/loader/Makefile Thu Sep 4 21:01:10 2014 (r271135) @@ -41,8 +41,12 @@ HAVE_ISABUS= yes # Enable BootForth BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386 +.if ${MACHINE_CPUARCH} == "amd64" +LIBFICL= ${.OBJDIR}/../../ficl32/libficl.a +.else LIBFICL= ${.OBJDIR}/../../ficl/libficl.a .endif +.endif .if defined(LOADER_BZIP2_SUPPORT) CFLAGS+= -DLOADER_BZIP2_SUPPORT From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 21:05:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D9627A2; Thu, 4 Sep 2014 21:05:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86DA0158B; Thu, 4 Sep 2014 21:05:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84L56Ei052203; Thu, 4 Sep 2014 21:05:06 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84L55Oa052196; Thu, 4 Sep 2014 21:05:05 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409042105.s84L55Oa052196@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 21:05:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271136 - in stable/10/sys/boot/amd64: . boot1.efi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 21:05:06 -0000 Author: emaste Date: Thu Sep 4 21:05:04 2014 New Revision: 271136 URL: http://svnweb.freebsd.org/changeset/base/271136 Log: MFC boot1.efi stub loader r264391 (nwhitehorn): Add a simple EFI stub loader. This is a quick and dirty of boot1.chrp from the PowerPC port with all the Open Firmware bits removed and replaced by their EFI counterparts. On the whole, I think I prefer Open Firmware. This code is supposed to be an immutable shim that sits on the EFI system partition, loads /boot/loader.efi from UFS and tells the real loader what disk/partition to look at. It finds the UFS root partition by the somewhat braindead approach of picking the first UFS partition it can find. Better approaches are called for, but this works for now. This shim loader will also be useful for secure boot in the future, which will require some rearchitecture. r264403 (nwhitehorn): Fix buildworld. I had some local bits in my build tree that caused this to work by accident. r264404 (nwhitehorn): Add my copyright here. Most of this is unmodified from the original sparc64 version, but at least some indication of changes that postdate the actual invention of EFI is probably a good idea. r264414 (nwhitehorn): Apparently some of the i386 boot blocks are so close to full that adding single lines to ufsread.c spills them over. Duplicate a whole bunch of code to get file sizes into boot1.efi/boot1.c rather than modifying ufsread.c. r264975 (nwhitehorn): Add generation of an EFI filesystem to hold boot1.efi. This is a near- exact copy of the code from boot1.chrp again. The resulting image is installed to /boot/boot1.efifat. If dd'ed to an 800K "efi" partition, it should result in a bootable system. r268975 (sbruno): Remove boot1.efi during clean target. Relnotes: Yes Sponsored by: The FreeBSD Foundation Added: stable/10/sys/boot/amd64/boot1.efi/ - copied from r264391, head/sys/boot/amd64/boot1.efi/ stable/10/sys/boot/amd64/boot1.efi/Makefile.fat - copied unchanged from r264975, head/sys/boot/amd64/boot1.efi/Makefile.fat stable/10/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu - copied unchanged from r264975, head/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu stable/10/sys/boot/amd64/boot1.efi/generate-fat.sh - copied unchanged from r264975, head/sys/boot/amd64/boot1.efi/generate-fat.sh Modified: stable/10/sys/boot/amd64/Makefile stable/10/sys/boot/amd64/boot1.efi/Makefile stable/10/sys/boot/amd64/boot1.efi/boot1.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/amd64/Makefile ============================================================================== --- stable/10/sys/boot/amd64/Makefile Thu Sep 4 21:01:10 2014 (r271135) +++ stable/10/sys/boot/amd64/Makefile Thu Sep 4 21:05:04 2014 (r271136) @@ -2,6 +2,6 @@ .include -SUBDIR= efi +SUBDIR= efi boot1.efi .include Modified: stable/10/sys/boot/amd64/boot1.efi/Makefile ============================================================================== --- head/sys/boot/amd64/boot1.efi/Makefile Sun Apr 13 01:14:25 2014 (r264391) +++ stable/10/sys/boot/amd64/boot1.efi/Makefile Thu Sep 4 21:05:04 2014 (r271136) @@ -22,11 +22,11 @@ CFLAGS+= -I${.CURDIR}/../../efi/include/ CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica/include CFLAGS+= -I${.CURDIR}/../../.. -# Always add MI sources -.PATH: ${.CURDIR}/../../common ../efi +# Always add MI sources and REGULAR efi loader bits +.PATH: ${.CURDIR}/../efi ${.CURDIR}/../../common CFLAGS+= -I${.CURDIR}/../../common -FILES= boot1.efi +FILES= boot1.efi boot1.efifat FILESMODE_boot1.efi= ${BINMODE} LDSCRIPT= ${.CURDIR}/../efi/ldscript.${MACHINE_CPUARCH} @@ -55,13 +55,29 @@ boot1.efi: loader.sym CFLAGS+= -I${.CURDIR}/../../common +boot1.o: ${.CURDIR}/../../common/ufsread.c + +# The following inserts out objects into a template FAT file system +# created by generate-fat.sh + +.include "${.CURDIR}/Makefile.fat" + +boot1.efifat: boot1.efi + echo ${.OBJDIR} + uudecode ${.CURDIR}/fat.tmpl.bz2.uu + mv fat.tmpl.bz2 ${.TARGET}.bz2 + bzip2 -f -d ${.TARGET}.bz2 + dd if=boot1.efi of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc + +CLEANFILES= boot1.efifat + .endif # ${COMPILER_TYPE} != "gcc" .include beforedepend ${OBJS}: machine x86 -CLEANFILES+= machine x86 +CLEANFILES+= machine x86 boot1.efi machine: ln -sf ${.CURDIR}/../../../amd64/include machine Copied: stable/10/sys/boot/amd64/boot1.efi/Makefile.fat (from r264975, head/sys/boot/amd64/boot1.efi/Makefile.fat) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/amd64/boot1.efi/Makefile.fat Thu Sep 4 21:05:04 2014 (r271136, copy of r264975, head/sys/boot/amd64/boot1.efi/Makefile.fat) @@ -0,0 +1,3 @@ +# This file autogenerated by generate-fat.sh - DO NOT EDIT +# $FreeBSD$ +BOOT1_OFFSET=0x2d Modified: stable/10/sys/boot/amd64/boot1.efi/boot1.c ============================================================================== --- head/sys/boot/amd64/boot1.efi/boot1.c Sun Apr 13 01:14:25 2014 (r264391) +++ stable/10/sys/boot/amd64/boot1.efi/boot1.c Thu Sep 4 21:05:04 2014 (r271136) @@ -3,6 +3,8 @@ * All rights reserved. * Copyright (c) 2001 Robert Drehmel * All rights reserved. + * Copyright (c) 2014 Nathan Whitehorn + * All rights reserved. * * Redistribution and use in source and binary forms are freely * permitted provided that the above copyright notice and this @@ -167,6 +169,88 @@ dskread(void *buf, u_int64_t lba, int nb #include "ufsread.c" +static ssize_t +fsstat(ufs_ino_t inode) +{ +#ifndef UFS2_ONLY + static struct ufs1_dinode dp1; + ufs1_daddr_t addr1; +#endif +#ifndef UFS1_ONLY + static struct ufs2_dinode dp2; +#endif + static struct fs fs; + static ufs_ino_t inomap; + char *blkbuf; + void *indbuf; + size_t n, nb, size, off, vboff; + ufs_lbn_t lbn; + ufs2_daddr_t addr2, vbaddr; + static ufs2_daddr_t blkmap, indmap; + u_int u; + + blkbuf = dmadat->blkbuf; + indbuf = dmadat->indbuf; + if (!dsk_meta) { + inomap = 0; + for (n = 0; sblock_try[n] != -1; n++) { + if (dskread(dmadat->sbbuf, sblock_try[n] / DEV_BSIZE, + SBLOCKSIZE / DEV_BSIZE)) + return -1; + memcpy(&fs, dmadat->sbbuf, sizeof(struct fs)); + if (( +#if defined(UFS1_ONLY) + fs.fs_magic == FS_UFS1_MAGIC +#elif defined(UFS2_ONLY) + (fs.fs_magic == FS_UFS2_MAGIC && + fs.fs_sblockloc == sblock_try[n]) +#else + fs.fs_magic == FS_UFS1_MAGIC || + (fs.fs_magic == FS_UFS2_MAGIC && + fs.fs_sblockloc == sblock_try[n]) +#endif + ) && + fs.fs_bsize <= MAXBSIZE && + fs.fs_bsize >= sizeof(struct fs)) + break; + } + if (sblock_try[n] == -1) { + printf("Not ufs\n"); + return -1; + } + dsk_meta++; + } else + memcpy(&fs, dmadat->sbbuf, sizeof(struct fs)); + if (!inode) + return 0; + if (inomap != inode) { + n = IPERVBLK(&fs); + if (dskread(blkbuf, INO_TO_VBA(&fs, n, inode), DBPERVBLK)) + return -1; + n = INO_TO_VBO(n, inode); +#if defined(UFS1_ONLY) + memcpy(&dp1, (struct ufs1_dinode *)blkbuf + n, + sizeof(struct ufs1_dinode)); +#elif defined(UFS2_ONLY) + memcpy(&dp2, (struct ufs2_dinode *)blkbuf + n, + sizeof(struct ufs2_dinode)); +#else + if (fs.fs_magic == FS_UFS1_MAGIC) + memcpy(&dp1, (struct ufs1_dinode *)blkbuf + n, + sizeof(struct ufs1_dinode)); + else + memcpy(&dp2, (struct ufs2_dinode *)blkbuf + n, + sizeof(struct ufs2_dinode)); +#endif + inomap = inode; + fs_off = 0; + blkmap = indmap = 0; + } + size = DIP(di_size); + n = size - fs_off; + return (n); +} + static struct dmadat __dmadat; static int @@ -201,7 +285,7 @@ load(const char *fname) return; } - bufsize = fsread(ino, NULL, -1); + bufsize = fsstat(ino); status = systab->BootServices->AllocatePool(EfiLoaderData, bufsize, &buffer); fsread(ino, buffer, bufsize); Copied: stable/10/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu (from r264975, head/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu Thu Sep 4 21:05:04 2014 (r271136, copy of r264975, head/sys/boot/amd64/boot1.efi/fat.tmpl.bz2.uu) @@ -0,0 +1,22 @@ +FAT template boot filesystem created by generate-fat.sh +DO NOT EDIT +$FreeBSD$ +begin 644 fat.tmpl.bz2 +M0EIH.3%!62936?1V`!$`&J7____[ZZKJJ_^N_ZO^Z_^[ON_\`4`00!0$#$$" +M0D)$6&(IZC3RGZH\B&$,U&AH#)B:,$8TAF@@]0T>IZF&A +M&GZID,1IZFAMO%FPGL0"(QIZV"3_!`$@N(@`DD$?C&$["`)`!)$6@#\HOB42 +M0`"2(X0FGX1#L"`'7E,'#-'HM!'QUD0\R,?9U,6ZE8F,Y6*L<9S<6PH)"%_" +MX'_PL4A),QB"(`B(=14*-"8,(QCG.(2$A(1J'010CB&R$(0B00FPP(0A"$)E +M#`A"$(1]LB&!"$(0B4&1#`A"$(14W<9J.:&A@8&!@8'`Z$(D(02@^L=UL>:+ +MBG:Q5+4&'[/P4@D2?M<,E!0&YBF8+],4^%$`4*%$N9MF:Z29-_VG2G7<$LJ-44RST& +MB53YE@H%(G5G$.FU;=L[DQVA]"(V4B1+%BP%.A<-10-%#R#NKR='@\'#"_'U +M'I36ZT:8QIN*3E$:HZIZRJ?$Y1L&<1'C)G(=8,E.L(KU<9X=%/NX.6\=@^IW +M\-PC$B&I"T\!(VI3"K!X:\%.01Y#X/83[SH.J*H5BH:ILFV1'X/D/V1$W6'\ +MFY>YE:*(I!.X@'D>H_(PY'(W1+B;:,Y?H8Y%(Q')!>DDE;\J1-DRXJJ/O(1@ +M'X/24=!+/V8S1)B(R:UE"0&&1:PUS(1`!$04``++GZ/8(CE5P1P8?^7QB[DB +(G"A(>CL`"(`` +` +end Copied: stable/10/sys/boot/amd64/boot1.efi/generate-fat.sh (from r264975, head/sys/boot/amd64/boot1.efi/generate-fat.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/amd64/boot1.efi/generate-fat.sh Thu Sep 4 21:05:04 2014 (r271136, copy of r264975, head/sys/boot/amd64/boot1.efi/generate-fat.sh) @@ -0,0 +1,54 @@ +#!/bin/sh + +# This script generates the dummy FAT filesystem used for the EFI boot +# blocks. It uses newfs_msdos to generate a template filesystem with the +# relevant interesting files. These are then found by grep, and the offsets +# written to a Makefile snippet. +# +# Because it requires root, and because it is overkill, we do not +# do this as part of the normal build. If makefs(8) grows workable FAT +# support, this should be revisited. + +# $FreeBSD$ + +FAT_SIZE=1600 #Size in 512-byte blocks of the produced image + +BOOT1_SIZE=64k + +# Generate 800K FAT image +OUTPUT_FILE=fat.tmpl + +dd if=/dev/zero of=$OUTPUT_FILE bs=512 count=$FAT_SIZE +DEVICE=`mdconfig -a -f $OUTPUT_FILE` +newfs_msdos -F 12 $DEVICE +mkdir stub +mount -t msdosfs /dev/$DEVICE stub + +# Create and bless a directory for the boot loader +mkdir -p stub/efi/boot + +# Make a dummy file for boot1 +echo 'Boot1 START' | dd of=stub/efi/boot/BOOTx64.efi cbs=$BOOT1_SIZE count=1 conv=block + +umount stub +mdconfig -d -u $DEVICE +rmdir stub + +# Locate the offsets of the two fake files +BOOT1_OFFSET=$(hd $OUTPUT_FILE | grep 'Boot1 START' | cut -f 1 -d ' ') + +# Convert to numbers of blocks +BOOT1_OFFSET=$(echo 0x$BOOT1_OFFSET | awk '{printf("%x\n",$1/512);}') + +echo '# This file autogenerated by generate-fat.sh - DO NOT EDIT' > Makefile.fat +echo '# $FreeBSD$' >> Makefile.fat +echo "BOOT1_OFFSET=0x$BOOT1_OFFSET" >> Makefile.fat + +bzip2 $OUTPUT_FILE +echo 'FAT template boot filesystem created by generate-fat.sh' > $OUTPUT_FILE.bz2.uu +echo 'DO NOT EDIT' >> $OUTPUT_FILE.bz2.uu +echo '$FreeBSD$' >> $OUTPUT_FILE.bz2.uu + +uuencode $OUTPUT_FILE.bz2 $OUTPUT_FILE.bz2 >> $OUTPUT_FILE.bz2.uu +rm $OUTPUT_FILE.bz2 + From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 21:06:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5FF448E0; Thu, 4 Sep 2014 21:06:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3185D15A6; Thu, 4 Sep 2014 21:06:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84L6Yha052441; Thu, 4 Sep 2014 21:06:34 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84L6XIb052438; Thu, 4 Sep 2014 21:06:33 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201409042106.s84L6XIb052438@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 4 Sep 2014 21:06:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271137 - in head/sys: amd64/conf conf i386/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 21:06:34 -0000 Author: markj Date: Thu Sep 4 21:06:33 2014 New Revision: 271137 URL: http://svnweb.freebsd.org/changeset/base/271137 Log: Add mrsas(4) to GENERIC for i386 and amd64. Approved by: ambrisko, kadesai MFC after: 3 days Modified: head/sys/amd64/conf/GENERIC head/sys/conf/NOTES head/sys/i386/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Thu Sep 4 21:05:04 2014 (r271136) +++ head/sys/amd64/conf/GENERIC Thu Sep 4 21:06:33 2014 (r271137) @@ -164,6 +164,7 @@ device aacraid # Adaptec by PMC RAID device ida # Compaq Smart RAID device mfi # LSI MegaRAID SAS device mlx # Mylex DAC960 family +device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s #XXX pointer/int warnings #device pst # Promise Supertrak SX6000 device twe # 3ware ATA RAID Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Thu Sep 4 21:05:04 2014 (r271136) +++ head/sys/conf/NOTES Thu Sep 4 21:06:33 2014 (r271137) @@ -1677,6 +1677,7 @@ device amrp # SCSI Passthrough interfa device mfi # LSI MegaRAID SAS device mfip # LSI MegaRAID SAS passthrough, requires CAM options MFI_DEBUG +device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s # # 3ware ATA RAID Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Thu Sep 4 21:05:04 2014 (r271136) +++ head/sys/i386/conf/GENERIC Thu Sep 4 21:06:33 2014 (r271137) @@ -168,6 +168,7 @@ device aacraid # Adaptec by PMC RAID device ida # Compaq Smart RAID device mfi # LSI MegaRAID SAS device mlx # Mylex DAC960 family +device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s device pst # Promise Supertrak SX6000 device twe # 3ware ATA RAID From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 21:10:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 482B0A6B; Thu, 4 Sep 2014 21:10:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33BD215D5; Thu, 4 Sep 2014 21:10:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84LAP6v053197; Thu, 4 Sep 2014 21:10:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84LAPmh053196; Thu, 4 Sep 2014 21:10:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409042110.s84LAPmh053196@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 4 Sep 2014 21:10:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271138 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 21:10:25 -0000 Author: emaste Date: Thu Sep 4 21:10:24 2014 New Revision: 271138 URL: http://svnweb.freebsd.org/changeset/base/271138 Log: Add UPDATING entry for r271116 Noticed by: nwhitehorn Modified: stable/10/UPDATING Modified: stable/10/UPDATING ============================================================================== --- stable/10/UPDATING Thu Sep 4 21:06:33 2014 (r271137) +++ stable/10/UPDATING Thu Sep 4 21:10:24 2014 (r271138) @@ -16,6 +16,13 @@ from older versions of FreeBSD, try WITH stable/10, and then rebuild without this option. The bootstrap process from older version of current is a bit fragile. +20140904: + The ofwfb driver, used to provide a graphics console on PowerPC when + using vt(4), no longer allows mmap() of all of physical memory. This + will prevent Xorg on PowerPC with some ATI graphics cards from + initializing properly unless x11-servers/xorg-server is updated to + 1.12.4_8 or newer. + 20140831: The libatf-c and libatf-c++ major versions were downgraded to 0 and 1 respectively to match the upstream numbers. They were out of From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 21:26:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94EA0390; Thu, 4 Sep 2014 21:26:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D20818FC; Thu, 4 Sep 2014 21:26:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84LQZpE062269; Thu, 4 Sep 2014 21:26:35 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84LQZpn062268; Thu, 4 Sep 2014 21:26:35 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201409042126.s84LQZpn062268@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 4 Sep 2014 21:26:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r271139 - in vendor/device-tree/dist/src: arc arm arm64 c6x metag microblaze mips openrisc powerpc x86 xtensa X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 21:26:35 -0000 Author: imp Date: Thu Sep 4 21:26:34 2014 New Revision: 271139 URL: http://svnweb.freebsd.org/changeset/base/271139 Log: Properly trim the vendor tree to include only those files that we want merged into FreeBSD. Cherry picking from a full vendor tree was too hard and lead to undestirable svn results. Note: We only tim the dts* files, we don't trim the dt-bindings tree, since having all of them causes no problems and the benefit to trimming there is far out weighed by the cost of doing the trim each time. Deleted: vendor/device-tree/dist/src/arc/ vendor/device-tree/dist/src/arm/aks-cdu.dts vendor/device-tree/dist/src/arm/am335x-base0033.dts vendor/device-tree/dist/src/arm/am335x-bone-common.dtsi vendor/device-tree/dist/src/arm/am335x-bone.dts vendor/device-tree/dist/src/arm/am335x-boneblack.dts vendor/device-tree/dist/src/arm/am335x-evm.dts vendor/device-tree/dist/src/arm/am335x-evmsk.dts vendor/device-tree/dist/src/arm/am335x-igep0033.dtsi vendor/device-tree/dist/src/arm/am335x-nano.dts vendor/device-tree/dist/src/arm/am335x-pepper.dts vendor/device-tree/dist/src/arm/am33xx-clocks.dtsi vendor/device-tree/dist/src/arm/am33xx.dtsi vendor/device-tree/dist/src/arm/am3517-craneboard.dts vendor/device-tree/dist/src/arm/am3517-evm.dts vendor/device-tree/dist/src/arm/am3517.dtsi vendor/device-tree/dist/src/arm/am3517_mt_ventoux.dts vendor/device-tree/dist/src/arm/am35xx-clocks.dtsi vendor/device-tree/dist/src/arm/am4372.dtsi vendor/device-tree/dist/src/arm/am437x-gp-evm.dts vendor/device-tree/dist/src/arm/am437x-sk-evm.dts vendor/device-tree/dist/src/arm/am43x-epos-evm.dts vendor/device-tree/dist/src/arm/am43xx-clocks.dtsi vendor/device-tree/dist/src/arm/armada-370-db.dts vendor/device-tree/dist/src/arm/armada-370-mirabox.dts vendor/device-tree/dist/src/arm/armada-370-netgear-rn102.dts vendor/device-tree/dist/src/arm/armada-370-netgear-rn104.dts vendor/device-tree/dist/src/arm/armada-370-rd.dts vendor/device-tree/dist/src/arm/armada-370-xp.dtsi vendor/device-tree/dist/src/arm/armada-370.dtsi vendor/device-tree/dist/src/arm/armada-375-db.dts vendor/device-tree/dist/src/arm/armada-375.dtsi vendor/device-tree/dist/src/arm/armada-380.dtsi vendor/device-tree/dist/src/arm/armada-385-db.dts vendor/device-tree/dist/src/arm/armada-385-rd.dts vendor/device-tree/dist/src/arm/armada-385.dtsi vendor/device-tree/dist/src/arm/armada-38x.dtsi vendor/device-tree/dist/src/arm/armada-xp-axpwifiap.dts vendor/device-tree/dist/src/arm/armada-xp-db.dts vendor/device-tree/dist/src/arm/armada-xp-gp.dts vendor/device-tree/dist/src/arm/armada-xp-lenovo-ix4-300d.dts vendor/device-tree/dist/src/arm/armada-xp-matrix.dts vendor/device-tree/dist/src/arm/armada-xp-mv78230.dtsi vendor/device-tree/dist/src/arm/armada-xp-mv78260.dtsi vendor/device-tree/dist/src/arm/armada-xp-mv78460.dtsi vendor/device-tree/dist/src/arm/armada-xp-netgear-rn2120.dts vendor/device-tree/dist/src/arm/armada-xp-openblocks-ax3-4.dts vendor/device-tree/dist/src/arm/armada-xp.dtsi vendor/device-tree/dist/src/arm/armv7-m.dtsi vendor/device-tree/dist/src/arm/atlas6-evb.dts vendor/device-tree/dist/src/arm/atlas6.dtsi vendor/device-tree/dist/src/arm/axm5516-amarillo.dts vendor/device-tree/dist/src/arm/axm5516-cpus.dtsi vendor/device-tree/dist/src/arm/axm55xx.dtsi vendor/device-tree/dist/src/arm/bcm11351-brt.dts vendor/device-tree/dist/src/arm/bcm11351.dtsi vendor/device-tree/dist/src/arm/bcm21664-garnet.dts vendor/device-tree/dist/src/arm/bcm21664.dtsi vendor/device-tree/dist/src/arm/bcm28155-ap.dts vendor/device-tree/dist/src/arm/bcm2835-rpi-b.dts vendor/device-tree/dist/src/arm/bcm2835.dtsi vendor/device-tree/dist/src/arm/bcm4708-netgear-r6250.dts vendor/device-tree/dist/src/arm/bcm4708.dtsi vendor/device-tree/dist/src/arm/bcm5301x.dtsi vendor/device-tree/dist/src/arm/bcm59056.dtsi vendor/device-tree/dist/src/arm/bcm7445-bcm97445svmb.dts vendor/device-tree/dist/src/arm/bcm7445.dtsi vendor/device-tree/dist/src/arm/berlin2-sony-nsz-gs7.dts vendor/device-tree/dist/src/arm/berlin2.dtsi vendor/device-tree/dist/src/arm/berlin2cd-google-chromecast.dts vendor/device-tree/dist/src/arm/berlin2cd.dtsi vendor/device-tree/dist/src/arm/berlin2q-marvell-dmp.dts vendor/device-tree/dist/src/arm/berlin2q.dtsi vendor/device-tree/dist/src/arm/cros-ec-keyboard.dtsi vendor/device-tree/dist/src/arm/da850-enbw-cmc.dts vendor/device-tree/dist/src/arm/da850-evm.dts vendor/device-tree/dist/src/arm/da850.dtsi vendor/device-tree/dist/src/arm/dove-cm-a510.dts vendor/device-tree/dist/src/arm/dove-cubox-es.dts vendor/device-tree/dist/src/arm/dove-cubox.dts vendor/device-tree/dist/src/arm/dove-d2plug.dts vendor/device-tree/dist/src/arm/dove-d3plug.dts vendor/device-tree/dist/src/arm/dove-dove-db.dts vendor/device-tree/dist/src/arm/dove.dtsi vendor/device-tree/dist/src/arm/dra7-evm.dts vendor/device-tree/dist/src/arm/dra7.dtsi vendor/device-tree/dist/src/arm/dra72-evm.dts vendor/device-tree/dist/src/arm/dra72x.dtsi vendor/device-tree/dist/src/arm/dra74x.dtsi vendor/device-tree/dist/src/arm/dra7xx-clocks.dtsi vendor/device-tree/dist/src/arm/ea3250.dts vendor/device-tree/dist/src/arm/ecx-2000.dts vendor/device-tree/dist/src/arm/ecx-common.dtsi vendor/device-tree/dist/src/arm/efm32gg-dk3750.dts vendor/device-tree/dist/src/arm/efm32gg.dtsi vendor/device-tree/dist/src/arm/elpida_ecb240abacn.dtsi vendor/device-tree/dist/src/arm/emev2-kzm9d.dts vendor/device-tree/dist/src/arm/emev2.dtsi vendor/device-tree/dist/src/arm/exynos3250-pinctrl.dtsi vendor/device-tree/dist/src/arm/exynos3250.dtsi vendor/device-tree/dist/src/arm/exynos4.dtsi vendor/device-tree/dist/src/arm/exynos4210-origen.dts vendor/device-tree/dist/src/arm/exynos4210-pinctrl.dtsi vendor/device-tree/dist/src/arm/exynos4210-smdkv310.dts vendor/device-tree/dist/src/arm/exynos4210-trats.dts vendor/device-tree/dist/src/arm/exynos4210-universal_c210.dts vendor/device-tree/dist/src/arm/exynos4210.dtsi vendor/device-tree/dist/src/arm/exynos4212.dtsi vendor/device-tree/dist/src/arm/exynos4412-odroid-common.dtsi vendor/device-tree/dist/src/arm/exynos4412-odroidu3.dts vendor/device-tree/dist/src/arm/exynos4412-odroidx.dts vendor/device-tree/dist/src/arm/exynos4412-odroidx2.dts vendor/device-tree/dist/src/arm/exynos4412-origen.dts vendor/device-tree/dist/src/arm/exynos4412-smdk4412.dts vendor/device-tree/dist/src/arm/exynos4412-tiny4412.dts vendor/device-tree/dist/src/arm/exynos4412-trats2.dts vendor/device-tree/dist/src/arm/exynos4412.dtsi vendor/device-tree/dist/src/arm/exynos4x12-pinctrl.dtsi vendor/device-tree/dist/src/arm/exynos4x12.dtsi vendor/device-tree/dist/src/arm/exynos5.dtsi vendor/device-tree/dist/src/arm/exynos5250-arndale.dts vendor/device-tree/dist/src/arm/exynos5250-cros-common.dtsi vendor/device-tree/dist/src/arm/exynos5250-pinctrl.dtsi vendor/device-tree/dist/src/arm/exynos5250-smdk5250.dts vendor/device-tree/dist/src/arm/exynos5250-snow.dts vendor/device-tree/dist/src/arm/exynos5250.dtsi vendor/device-tree/dist/src/arm/exynos5260-pinctrl.dtsi vendor/device-tree/dist/src/arm/exynos5260-xyref5260.dts vendor/device-tree/dist/src/arm/exynos5260.dtsi vendor/device-tree/dist/src/arm/exynos5410-smdk5410.dts vendor/device-tree/dist/src/arm/exynos5410.dtsi vendor/device-tree/dist/src/arm/exynos5420-arndale-octa.dts vendor/device-tree/dist/src/arm/exynos5420-peach-pit.dts vendor/device-tree/dist/src/arm/exynos5420-pinctrl.dtsi vendor/device-tree/dist/src/arm/exynos5420-smdk5420.dts vendor/device-tree/dist/src/arm/exynos5420.dtsi vendor/device-tree/dist/src/arm/exynos5440-sd5v1.dts vendor/device-tree/dist/src/arm/exynos5440-ssdk5440.dts vendor/device-tree/dist/src/arm/exynos5440.dtsi vendor/device-tree/dist/src/arm/exynos5800-peach-pi.dts vendor/device-tree/dist/src/arm/exynos5800.dtsi vendor/device-tree/dist/src/arm/hi3620-hi4511.dts vendor/device-tree/dist/src/arm/hi3620.dtsi vendor/device-tree/dist/src/arm/highbank.dts vendor/device-tree/dist/src/arm/hisi-x5hd2-dkb.dts vendor/device-tree/dist/src/arm/hisi-x5hd2.dtsi vendor/device-tree/dist/src/arm/imx23-evk.dts vendor/device-tree/dist/src/arm/imx23-olinuxino.dts vendor/device-tree/dist/src/arm/imx23-pinfunc.h vendor/device-tree/dist/src/arm/imx23-stmp378x_devb.dts vendor/device-tree/dist/src/arm/imx23.dtsi vendor/device-tree/dist/src/arm/imx25-eukrea-cpuimx25.dtsi vendor/device-tree/dist/src/arm/imx25-eukrea-mbimxsd25-baseboard-cmo-qvga.dts vendor/device-tree/dist/src/arm/imx25-eukrea-mbimxsd25-baseboard-dvi-svga.dts vendor/device-tree/dist/src/arm/imx25-eukrea-mbimxsd25-baseboard-dvi-vga.dts vendor/device-tree/dist/src/arm/imx25-eukrea-mbimxsd25-baseboard.dts vendor/device-tree/dist/src/arm/imx25-karo-tx25.dts vendor/device-tree/dist/src/arm/imx25-pdk.dts vendor/device-tree/dist/src/arm/imx25-pinfunc.h vendor/device-tree/dist/src/arm/imx25.dtsi vendor/device-tree/dist/src/arm/imx27-apf27.dts vendor/device-tree/dist/src/arm/imx27-apf27dev.dts vendor/device-tree/dist/src/arm/imx27-eukrea-cpuimx27.dtsi vendor/device-tree/dist/src/arm/imx27-eukrea-mbimxsd27-baseboard.dts vendor/device-tree/dist/src/arm/imx27-pdk.dts vendor/device-tree/dist/src/arm/imx27-phytec-phycard-s-rdk.dts vendor/device-tree/dist/src/arm/imx27-phytec-phycard-s-som.dts vendor/device-tree/dist/src/arm/imx27-phytec-phycard-s-som.dtsi vendor/device-tree/dist/src/arm/imx27-phytec-phycore-rdk.dts vendor/device-tree/dist/src/arm/imx27-phytec-phycore-som.dts vendor/device-tree/dist/src/arm/imx27-phytec-phycore-som.dtsi vendor/device-tree/dist/src/arm/imx27-pinfunc.h vendor/device-tree/dist/src/arm/imx27.dtsi vendor/device-tree/dist/src/arm/imx28-apf28.dts vendor/device-tree/dist/src/arm/imx28-apf28dev.dts vendor/device-tree/dist/src/arm/imx28-apx4devkit.dts vendor/device-tree/dist/src/arm/imx28-cfa10036.dts vendor/device-tree/dist/src/arm/imx28-cfa10037.dts vendor/device-tree/dist/src/arm/imx28-cfa10049.dts vendor/device-tree/dist/src/arm/imx28-cfa10055.dts vendor/device-tree/dist/src/arm/imx28-cfa10056.dts vendor/device-tree/dist/src/arm/imx28-cfa10057.dts vendor/device-tree/dist/src/arm/imx28-cfa10058.dts vendor/device-tree/dist/src/arm/imx28-duckbill.dts vendor/device-tree/dist/src/arm/imx28-eukrea-mbmx283lc.dts vendor/device-tree/dist/src/arm/imx28-eukrea-mbmx287lc.dts vendor/device-tree/dist/src/arm/imx28-eukrea-mbmx28lc.dtsi vendor/device-tree/dist/src/arm/imx28-evk.dts vendor/device-tree/dist/src/arm/imx28-m28.dtsi vendor/device-tree/dist/src/arm/imx28-m28cu3.dts vendor/device-tree/dist/src/arm/imx28-m28evk.dts vendor/device-tree/dist/src/arm/imx28-pinfunc.h vendor/device-tree/dist/src/arm/imx28-sps1.dts vendor/device-tree/dist/src/arm/imx28-tx28.dts vendor/device-tree/dist/src/arm/imx28.dtsi vendor/device-tree/dist/src/arm/imx31-bug.dts vendor/device-tree/dist/src/arm/imx31.dtsi vendor/device-tree/dist/src/arm/imx35-eukrea-cpuimx35.dtsi vendor/device-tree/dist/src/arm/imx35-eukrea-mbimxsd35-baseboard.dts vendor/device-tree/dist/src/arm/imx35-pdk.dts vendor/device-tree/dist/src/arm/imx35-pinfunc.h vendor/device-tree/dist/src/arm/imx35.dtsi vendor/device-tree/dist/src/arm/imx50-evk.dts vendor/device-tree/dist/src/arm/imx50-pinfunc.h vendor/device-tree/dist/src/arm/imx50.dtsi vendor/device-tree/dist/src/arm/imx51-pinfunc.h vendor/device-tree/dist/src/arm/imx53-pinfunc.h vendor/device-tree/dist/src/arm/imx6dl-pinfunc.h vendor/device-tree/dist/src/arm/imx6q-pinfunc.h vendor/device-tree/dist/src/arm/imx6qdl-microsom-ar8035.dtsi vendor/device-tree/dist/src/arm/imx6qdl-microsom.dtsi vendor/device-tree/dist/src/arm/imx6qdl-phytec-pbab01.dtsi vendor/device-tree/dist/src/arm/imx6sl-pinfunc.h vendor/device-tree/dist/src/arm/imx6sx-pinfunc.h vendor/device-tree/dist/src/arm/integrator.dtsi vendor/device-tree/dist/src/arm/integratorap.dts vendor/device-tree/dist/src/arm/integratorcp.dts vendor/device-tree/dist/src/arm/k2e-clocks.dtsi vendor/device-tree/dist/src/arm/k2e-evm.dts vendor/device-tree/dist/src/arm/k2e.dtsi vendor/device-tree/dist/src/arm/k2hk-clocks.dtsi vendor/device-tree/dist/src/arm/k2hk-evm.dts vendor/device-tree/dist/src/arm/k2hk.dtsi vendor/device-tree/dist/src/arm/k2l-clocks.dtsi vendor/device-tree/dist/src/arm/k2l-evm.dts vendor/device-tree/dist/src/arm/k2l.dtsi vendor/device-tree/dist/src/arm/keystone-clocks.dtsi vendor/device-tree/dist/src/arm/keystone.dtsi vendor/device-tree/dist/src/arm/kirkwood-6192.dtsi vendor/device-tree/dist/src/arm/kirkwood-6281.dtsi vendor/device-tree/dist/src/arm/kirkwood-6282.dtsi vendor/device-tree/dist/src/arm/kirkwood-98dx4122.dtsi vendor/device-tree/dist/src/arm/kirkwood-b3.dts vendor/device-tree/dist/src/arm/kirkwood-cloudbox.dts vendor/device-tree/dist/src/arm/kirkwood-d2net.dts vendor/device-tree/dist/src/arm/kirkwood-db-88f6281.dts vendor/device-tree/dist/src/arm/kirkwood-db-88f6282.dts vendor/device-tree/dist/src/arm/kirkwood-db.dtsi vendor/device-tree/dist/src/arm/kirkwood-dns320.dts vendor/device-tree/dist/src/arm/kirkwood-dns325.dts vendor/device-tree/dist/src/arm/kirkwood-dnskw.dtsi vendor/device-tree/dist/src/arm/kirkwood-dockstar.dts vendor/device-tree/dist/src/arm/kirkwood-dreamplug.dts vendor/device-tree/dist/src/arm/kirkwood-ds109.dts vendor/device-tree/dist/src/arm/kirkwood-ds110jv10.dts vendor/device-tree/dist/src/arm/kirkwood-ds111.dts vendor/device-tree/dist/src/arm/kirkwood-ds112.dts vendor/device-tree/dist/src/arm/kirkwood-ds209.dts vendor/device-tree/dist/src/arm/kirkwood-ds210.dts vendor/device-tree/dist/src/arm/kirkwood-ds212.dts vendor/device-tree/dist/src/arm/kirkwood-ds212j.dts vendor/device-tree/dist/src/arm/kirkwood-ds409.dts vendor/device-tree/dist/src/arm/kirkwood-ds409slim.dts vendor/device-tree/dist/src/arm/kirkwood-ds411.dts vendor/device-tree/dist/src/arm/kirkwood-ds411j.dts vendor/device-tree/dist/src/arm/kirkwood-ds411slim.dts vendor/device-tree/dist/src/arm/kirkwood-goflexnet.dts vendor/device-tree/dist/src/arm/kirkwood-guruplug-server-plus.dts vendor/device-tree/dist/src/arm/kirkwood-ib62x0.dts vendor/device-tree/dist/src/arm/kirkwood-iconnect.dts vendor/device-tree/dist/src/arm/kirkwood-iomega_ix2_200.dts vendor/device-tree/dist/src/arm/kirkwood-is2.dts vendor/device-tree/dist/src/arm/kirkwood-km_common.dtsi vendor/device-tree/dist/src/arm/kirkwood-km_fixedeth.dts vendor/device-tree/dist/src/arm/kirkwood-km_kirkwood.dts vendor/device-tree/dist/src/arm/kirkwood-laplug.dts vendor/device-tree/dist/src/arm/kirkwood-lschlv2.dts vendor/device-tree/dist/src/arm/kirkwood-lsxhl.dts vendor/device-tree/dist/src/arm/kirkwood-lsxl.dtsi vendor/device-tree/dist/src/arm/kirkwood-mplcec4.dts vendor/device-tree/dist/src/arm/kirkwood-mv88f6281gtw-ge.dts vendor/device-tree/dist/src/arm/kirkwood-net2big.dts vendor/device-tree/dist/src/arm/kirkwood-net5big.dts vendor/device-tree/dist/src/arm/kirkwood-netgear_readynas_duo_v2.dts vendor/device-tree/dist/src/arm/kirkwood-netgear_readynas_nv+_v2.dts vendor/device-tree/dist/src/arm/kirkwood-netxbig.dtsi vendor/device-tree/dist/src/arm/kirkwood-ns2-common.dtsi vendor/device-tree/dist/src/arm/kirkwood-ns2.dts vendor/device-tree/dist/src/arm/kirkwood-ns2lite.dts vendor/device-tree/dist/src/arm/kirkwood-ns2max.dts vendor/device-tree/dist/src/arm/kirkwood-ns2mini.dts vendor/device-tree/dist/src/arm/kirkwood-nsa310-common.dtsi vendor/device-tree/dist/src/arm/kirkwood-nsa310.dts vendor/device-tree/dist/src/arm/kirkwood-nsa310a.dts vendor/device-tree/dist/src/arm/kirkwood-nsa320.dts vendor/device-tree/dist/src/arm/kirkwood-nsa3x0-common.dtsi vendor/device-tree/dist/src/arm/kirkwood-openblocks_a6.dts vendor/device-tree/dist/src/arm/kirkwood-openblocks_a7.dts vendor/device-tree/dist/src/arm/kirkwood-openrd-base.dts vendor/device-tree/dist/src/arm/kirkwood-openrd-client.dts vendor/device-tree/dist/src/arm/kirkwood-openrd-ultimate.dts vendor/device-tree/dist/src/arm/kirkwood-openrd.dtsi vendor/device-tree/dist/src/arm/kirkwood-rd88f6192.dts vendor/device-tree/dist/src/arm/kirkwood-rd88f6281-a0.dts vendor/device-tree/dist/src/arm/kirkwood-rd88f6281-a1.dts vendor/device-tree/dist/src/arm/kirkwood-rd88f6281.dtsi vendor/device-tree/dist/src/arm/kirkwood-rs212.dts vendor/device-tree/dist/src/arm/kirkwood-rs409.dts vendor/device-tree/dist/src/arm/kirkwood-rs411.dts vendor/device-tree/dist/src/arm/kirkwood-sheevaplug-common.dtsi vendor/device-tree/dist/src/arm/kirkwood-sheevaplug-esata.dts vendor/device-tree/dist/src/arm/kirkwood-sheevaplug.dts vendor/device-tree/dist/src/arm/kirkwood-synology.dtsi vendor/device-tree/dist/src/arm/kirkwood-t5325.dts vendor/device-tree/dist/src/arm/kirkwood-topkick.dts vendor/device-tree/dist/src/arm/kirkwood-ts219-6281.dts vendor/device-tree/dist/src/arm/kirkwood-ts219-6282.dts vendor/device-tree/dist/src/arm/kirkwood-ts219.dtsi vendor/device-tree/dist/src/arm/kirkwood-ts419-6281.dts vendor/device-tree/dist/src/arm/kirkwood-ts419-6282.dts vendor/device-tree/dist/src/arm/kirkwood-ts419.dtsi vendor/device-tree/dist/src/arm/kirkwood.dtsi vendor/device-tree/dist/src/arm/lpc32xx.dtsi vendor/device-tree/dist/src/arm/marco-evb.dts vendor/device-tree/dist/src/arm/marco.dtsi vendor/device-tree/dist/src/arm/mmp2-brownstone.dts vendor/device-tree/dist/src/arm/mmp2.dtsi vendor/device-tree/dist/src/arm/moxart-uc7112lx.dts vendor/device-tree/dist/src/arm/moxart.dtsi vendor/device-tree/dist/src/arm/mt6589-aquaris5.dts vendor/device-tree/dist/src/arm/mt6589.dtsi vendor/device-tree/dist/src/arm/mxs-pinfunc.h vendor/device-tree/dist/src/arm/nspire-classic.dtsi vendor/device-tree/dist/src/arm/nspire-clp.dts vendor/device-tree/dist/src/arm/nspire-cx.dts vendor/device-tree/dist/src/arm/nspire-tp.dts vendor/device-tree/dist/src/arm/nspire.dtsi vendor/device-tree/dist/src/arm/omap-gpmc-smsc911x.dtsi vendor/device-tree/dist/src/arm/omap-gpmc-smsc9221.dtsi vendor/device-tree/dist/src/arm/omap-zoom-common.dtsi vendor/device-tree/dist/src/arm/omap2.dtsi vendor/device-tree/dist/src/arm/omap2420-clocks.dtsi vendor/device-tree/dist/src/arm/omap2420-h4.dts vendor/device-tree/dist/src/arm/omap2420-n800.dts vendor/device-tree/dist/src/arm/omap2420-n810-wimax.dts vendor/device-tree/dist/src/arm/omap2420-n810.dts vendor/device-tree/dist/src/arm/omap2420-n8x0-common.dtsi vendor/device-tree/dist/src/arm/omap2420.dtsi vendor/device-tree/dist/src/arm/omap2430-clocks.dtsi vendor/device-tree/dist/src/arm/omap2430-sdp.dts vendor/device-tree/dist/src/arm/omap2430.dtsi vendor/device-tree/dist/src/arm/omap24xx-clocks.dtsi vendor/device-tree/dist/src/arm/omap3-beagle-xm-ab.dts vendor/device-tree/dist/src/arm/omap3-beagle-xm.dts vendor/device-tree/dist/src/arm/omap3-beagle.dts vendor/device-tree/dist/src/arm/omap3-cm-t3517.dts vendor/device-tree/dist/src/arm/omap3-cm-t3530.dts vendor/device-tree/dist/src/arm/omap3-cm-t3730.dts vendor/device-tree/dist/src/arm/omap3-cm-t3x.dtsi vendor/device-tree/dist/src/arm/omap3-cm-t3x30.dtsi vendor/device-tree/dist/src/arm/omap3-devkit8000.dts vendor/device-tree/dist/src/arm/omap3-evm-37xx.dts vendor/device-tree/dist/src/arm/omap3-evm-common.dtsi vendor/device-tree/dist/src/arm/omap3-evm.dts vendor/device-tree/dist/src/arm/omap3-gta04.dts vendor/device-tree/dist/src/arm/omap3-igep.dtsi vendor/device-tree/dist/src/arm/omap3-igep0020.dts vendor/device-tree/dist/src/arm/omap3-igep0030.dts vendor/device-tree/dist/src/arm/omap3-ldp.dts vendor/device-tree/dist/src/arm/omap3-lilly-a83x.dtsi vendor/device-tree/dist/src/arm/omap3-lilly-dbb056.dts vendor/device-tree/dist/src/arm/omap3-n9.dts vendor/device-tree/dist/src/arm/omap3-n900.dts vendor/device-tree/dist/src/arm/omap3-n950-n9.dtsi vendor/device-tree/dist/src/arm/omap3-n950.dts vendor/device-tree/dist/src/arm/omap3-overo-alto35-common.dtsi vendor/device-tree/dist/src/arm/omap3-overo-alto35.dts vendor/device-tree/dist/src/arm/omap3-overo-base.dtsi vendor/device-tree/dist/src/arm/omap3-overo-chestnut43-common.dtsi vendor/device-tree/dist/src/arm/omap3-overo-chestnut43.dts vendor/device-tree/dist/src/arm/omap3-overo-common-dvi.dtsi vendor/device-tree/dist/src/arm/omap3-overo-common-lcd35.dtsi vendor/device-tree/dist/src/arm/omap3-overo-common-lcd43.dtsi vendor/device-tree/dist/src/arm/omap3-overo-common-peripherals.dtsi vendor/device-tree/dist/src/arm/omap3-overo-gallop43-common.dtsi vendor/device-tree/dist/src/arm/omap3-overo-gallop43.dts vendor/device-tree/dist/src/arm/omap3-overo-palo43-common.dtsi vendor/device-tree/dist/src/arm/omap3-overo-palo43.dts vendor/device-tree/dist/src/arm/omap3-overo-storm-alto35.dts vendor/device-tree/dist/src/arm/omap3-overo-storm-chestnut43.dts vendor/device-tree/dist/src/arm/omap3-overo-storm-gallop43.dts vendor/device-tree/dist/src/arm/omap3-overo-storm-palo43.dts vendor/device-tree/dist/src/arm/omap3-overo-storm-summit.dts vendor/device-tree/dist/src/arm/omap3-overo-storm-tobi.dts vendor/device-tree/dist/src/arm/omap3-overo-storm.dtsi vendor/device-tree/dist/src/arm/omap3-overo-summit-common.dtsi vendor/device-tree/dist/src/arm/omap3-overo-summit.dts vendor/device-tree/dist/src/arm/omap3-overo-tobi-common.dtsi vendor/device-tree/dist/src/arm/omap3-overo-tobi.dts vendor/device-tree/dist/src/arm/omap3-overo.dtsi vendor/device-tree/dist/src/arm/omap3-panel-sharp-ls037v7dw01.dtsi vendor/device-tree/dist/src/arm/omap3-sb-t35.dtsi vendor/device-tree/dist/src/arm/omap3-sbc-t3517.dts vendor/device-tree/dist/src/arm/omap3-sbc-t3530.dts vendor/device-tree/dist/src/arm/omap3-sbc-t3730.dts vendor/device-tree/dist/src/arm/omap3-zoom3.dts vendor/device-tree/dist/src/arm/omap3.dtsi vendor/device-tree/dist/src/arm/omap3430-sdp.dts vendor/device-tree/dist/src/arm/omap3430es1-clocks.dtsi vendor/device-tree/dist/src/arm/omap34xx-hs.dtsi vendor/device-tree/dist/src/arm/omap34xx-omap36xx-clocks.dtsi vendor/device-tree/dist/src/arm/omap34xx.dtsi vendor/device-tree/dist/src/arm/omap36xx-am35xx-omap3430es2plus-clocks.dtsi vendor/device-tree/dist/src/arm/omap36xx-clocks.dtsi vendor/device-tree/dist/src/arm/omap36xx-hs.dtsi vendor/device-tree/dist/src/arm/omap36xx-omap3430es2plus-clocks.dtsi vendor/device-tree/dist/src/arm/omap36xx.dtsi vendor/device-tree/dist/src/arm/omap3xxx-clocks.dtsi vendor/device-tree/dist/src/arm/omap4-cpu-thermal.dtsi vendor/device-tree/dist/src/arm/omap4-duovero-parlor.dts vendor/device-tree/dist/src/arm/omap4-duovero.dtsi vendor/device-tree/dist/src/arm/omap4-panda-a4.dts vendor/device-tree/dist/src/arm/omap4-panda-common.dtsi vendor/device-tree/dist/src/arm/omap4-panda-es.dts vendor/device-tree/dist/src/arm/omap4-panda.dts vendor/device-tree/dist/src/arm/omap4-sdp-es23plus.dts vendor/device-tree/dist/src/arm/omap4-sdp.dts vendor/device-tree/dist/src/arm/omap4-var-dvk-om44.dts vendor/device-tree/dist/src/arm/omap4-var-om44customboard.dtsi vendor/device-tree/dist/src/arm/omap4-var-som-om44-wlan.dtsi vendor/device-tree/dist/src/arm/omap4-var-som-om44.dtsi vendor/device-tree/dist/src/arm/omap4-var-som.dts vendor/device-tree/dist/src/arm/omap4-var-stk-om44.dts vendor/device-tree/dist/src/arm/omap4.dtsi vendor/device-tree/dist/src/arm/omap443x-clocks.dtsi vendor/device-tree/dist/src/arm/omap443x.dtsi vendor/device-tree/dist/src/arm/omap4460.dtsi vendor/device-tree/dist/src/arm/omap446x-clocks.dtsi vendor/device-tree/dist/src/arm/omap44xx-clocks.dtsi vendor/device-tree/dist/src/arm/omap5-cm-t54.dts vendor/device-tree/dist/src/arm/omap5-core-thermal.dtsi vendor/device-tree/dist/src/arm/omap5-gpu-thermal.dtsi vendor/device-tree/dist/src/arm/omap5-sbc-t54.dts vendor/device-tree/dist/src/arm/omap5-uevm.dts vendor/device-tree/dist/src/arm/omap5.dtsi vendor/device-tree/dist/src/arm/omap54xx-clocks.dtsi vendor/device-tree/dist/src/arm/orion5x-lacie-d2-network.dts vendor/device-tree/dist/src/arm/orion5x-lacie-ethernet-disk-mini-v2.dts vendor/device-tree/dist/src/arm/orion5x-maxtor-shared-storage-2.dts vendor/device-tree/dist/src/arm/orion5x-mv88f5182.dtsi vendor/device-tree/dist/src/arm/orion5x-rd88f5182-nas.dts vendor/device-tree/dist/src/arm/orion5x.dtsi vendor/device-tree/dist/src/arm/phy3250.dts vendor/device-tree/dist/src/arm/picoxcell-pc3x2.dtsi vendor/device-tree/dist/src/arm/picoxcell-pc3x3.dtsi vendor/device-tree/dist/src/arm/picoxcell-pc7302-pc3x2.dts vendor/device-tree/dist/src/arm/picoxcell-pc7302-pc3x3.dts vendor/device-tree/dist/src/arm/prima2-evb.dts vendor/device-tree/dist/src/arm/prima2.dtsi vendor/device-tree/dist/src/arm/pxa168-aspenite.dts vendor/device-tree/dist/src/arm/pxa168.dtsi vendor/device-tree/dist/src/arm/pxa27x.dtsi vendor/device-tree/dist/src/arm/pxa2xx.dtsi vendor/device-tree/dist/src/arm/pxa3xx.dtsi vendor/device-tree/dist/src/arm/pxa910-dkb.dts vendor/device-tree/dist/src/arm/pxa910.dtsi vendor/device-tree/dist/src/arm/qcom-apq8064-ifc6410.dts vendor/device-tree/dist/src/arm/qcom-apq8064-v2.0.dtsi vendor/device-tree/dist/src/arm/qcom-apq8064.dtsi vendor/device-tree/dist/src/arm/qcom-apq8074-dragonboard.dts vendor/device-tree/dist/src/arm/qcom-apq8084-mtp.dts vendor/device-tree/dist/src/arm/qcom-apq8084.dtsi vendor/device-tree/dist/src/arm/qcom-msm8660-surf.dts vendor/device-tree/dist/src/arm/qcom-msm8660.dtsi vendor/device-tree/dist/src/arm/qcom-msm8960-cdp.dts vendor/device-tree/dist/src/arm/qcom-msm8960.dtsi vendor/device-tree/dist/src/arm/qcom-msm8974.dtsi vendor/device-tree/dist/src/arm/r7s72100-genmai-reference.dts vendor/device-tree/dist/src/arm/r7s72100-genmai.dts vendor/device-tree/dist/src/arm/r7s72100.dtsi vendor/device-tree/dist/src/arm/r8a73a4-ape6evm-reference.dts vendor/device-tree/dist/src/arm/r8a73a4-ape6evm.dts vendor/device-tree/dist/src/arm/r8a73a4.dtsi vendor/device-tree/dist/src/arm/r8a7740-armadillo800eva-reference.dts vendor/device-tree/dist/src/arm/r8a7740-armadillo800eva.dts vendor/device-tree/dist/src/arm/r8a7740.dtsi vendor/device-tree/dist/src/arm/r8a7778-bockw-reference.dts vendor/device-tree/dist/src/arm/r8a7778-bockw.dts vendor/device-tree/dist/src/arm/r8a7778.dtsi vendor/device-tree/dist/src/arm/r8a7779-marzen-reference.dts vendor/device-tree/dist/src/arm/r8a7779-marzen.dts vendor/device-tree/dist/src/arm/r8a7779.dtsi vendor/device-tree/dist/src/arm/r8a7790-lager.dts vendor/device-tree/dist/src/arm/r8a7790.dtsi vendor/device-tree/dist/src/arm/r8a7791-henninger.dts vendor/device-tree/dist/src/arm/r8a7791-koelsch-reference.dts vendor/device-tree/dist/src/arm/r8a7791-koelsch.dts vendor/device-tree/dist/src/arm/r8a7791.dtsi vendor/device-tree/dist/src/arm/rk3066a-bqcurie2.dts vendor/device-tree/dist/src/arm/rk3066a-clocks.dtsi vendor/device-tree/dist/src/arm/rk3066a.dtsi vendor/device-tree/dist/src/arm/rk3188-clocks.dtsi vendor/device-tree/dist/src/arm/rk3188-radxarock.dts vendor/device-tree/dist/src/arm/rk3188.dtsi vendor/device-tree/dist/src/arm/rk3288-evb-act8846.dts vendor/device-tree/dist/src/arm/rk3288-evb-rk808.dts vendor/device-tree/dist/src/arm/rk3288-evb.dtsi vendor/device-tree/dist/src/arm/rk3288.dtsi vendor/device-tree/dist/src/arm/rk3xxx.dtsi vendor/device-tree/dist/src/arm/s3c2416-pinctrl.dtsi vendor/device-tree/dist/src/arm/s3c2416-smdk2416.dts vendor/device-tree/dist/src/arm/s3c2416.dtsi vendor/device-tree/dist/src/arm/s3c24xx.dtsi vendor/device-tree/dist/src/arm/s3c6400.dtsi vendor/device-tree/dist/src/arm/s3c6410-mini6410.dts vendor/device-tree/dist/src/arm/s3c6410-smdk6410.dts vendor/device-tree/dist/src/arm/s3c6410.dtsi vendor/device-tree/dist/src/arm/s3c64xx-pinctrl.dtsi vendor/device-tree/dist/src/arm/s3c64xx.dtsi vendor/device-tree/dist/src/arm/s5pv210-aquila.dts vendor/device-tree/dist/src/arm/s5pv210-goni.dts vendor/device-tree/dist/src/arm/s5pv210-pinctrl.dtsi vendor/device-tree/dist/src/arm/s5pv210-smdkc110.dts vendor/device-tree/dist/src/arm/s5pv210-smdkv210.dts vendor/device-tree/dist/src/arm/s5pv210-torbreck.dts vendor/device-tree/dist/src/arm/s5pv210.dtsi vendor/device-tree/dist/src/arm/samsung_k3pe0e000b.dtsi vendor/device-tree/dist/src/arm/sh7372-mackerel.dts vendor/device-tree/dist/src/arm/sh7372.dtsi vendor/device-tree/dist/src/arm/sh73a0-kzm9g-reference.dts vendor/device-tree/dist/src/arm/sh73a0-kzm9g.dts vendor/device-tree/dist/src/arm/sh73a0.dtsi vendor/device-tree/dist/src/arm/socfpga.dtsi vendor/device-tree/dist/src/arm/socfpga_arria5.dtsi vendor/device-tree/dist/src/arm/socfpga_arria5_socdk.dts vendor/device-tree/dist/src/arm/socfpga_cyclone5.dtsi vendor/device-tree/dist/src/arm/socfpga_cyclone5_socdk.dts vendor/device-tree/dist/src/arm/socfpga_cyclone5_sockit.dts vendor/device-tree/dist/src/arm/socfpga_cyclone5_socrates.dts vendor/device-tree/dist/src/arm/socfpga_vt.dts vendor/device-tree/dist/src/arm/spear1310-evb.dts vendor/device-tree/dist/src/arm/spear1310.dtsi vendor/device-tree/dist/src/arm/spear1340-evb.dts vendor/device-tree/dist/src/arm/spear1340.dtsi vendor/device-tree/dist/src/arm/spear13xx.dtsi vendor/device-tree/dist/src/arm/spear300-evb.dts vendor/device-tree/dist/src/arm/spear300.dtsi vendor/device-tree/dist/src/arm/spear310-evb.dts vendor/device-tree/dist/src/arm/spear310.dtsi vendor/device-tree/dist/src/arm/spear320-evb.dts vendor/device-tree/dist/src/arm/spear320-hmi.dts vendor/device-tree/dist/src/arm/spear320.dtsi vendor/device-tree/dist/src/arm/spear3xx.dtsi vendor/device-tree/dist/src/arm/spear600-evb.dts vendor/device-tree/dist/src/arm/spear600.dtsi vendor/device-tree/dist/src/arm/st-pincfg.h vendor/device-tree/dist/src/arm/ste-ccu8540-pinctrl.dtsi vendor/device-tree/dist/src/arm/ste-ccu8540.dts vendor/device-tree/dist/src/arm/ste-ccu9540.dts vendor/device-tree/dist/src/arm/ste-dbx5x0.dtsi vendor/device-tree/dist/src/arm/ste-href-ab8500.dtsi vendor/device-tree/dist/src/arm/ste-href-ab8505.dtsi vendor/device-tree/dist/src/arm/ste-href-family-pinctrl.dtsi vendor/device-tree/dist/src/arm/ste-href-stuib.dtsi vendor/device-tree/dist/src/arm/ste-href-tvk1281618.dtsi vendor/device-tree/dist/src/arm/ste-href.dtsi vendor/device-tree/dist/src/arm/ste-hrefprev60-stuib.dts vendor/device-tree/dist/src/arm/ste-hrefprev60-tvk.dts vendor/device-tree/dist/src/arm/ste-hrefprev60.dtsi vendor/device-tree/dist/src/arm/ste-hrefv60plus-stuib.dts vendor/device-tree/dist/src/arm/ste-hrefv60plus-tvk.dts vendor/device-tree/dist/src/arm/ste-hrefv60plus.dtsi vendor/device-tree/dist/src/arm/ste-nomadik-pinctrl.dtsi vendor/device-tree/dist/src/arm/ste-nomadik-s8815.dts vendor/device-tree/dist/src/arm/ste-nomadik-stn8815.dtsi vendor/device-tree/dist/src/arm/ste-snowball.dts vendor/device-tree/dist/src/arm/ste-u300.dts vendor/device-tree/dist/src/arm/stih407-b2120.dts vendor/device-tree/dist/src/arm/stih407-clock.dtsi vendor/device-tree/dist/src/arm/stih407-pinctrl.dtsi vendor/device-tree/dist/src/arm/stih407.dtsi vendor/device-tree/dist/src/arm/stih415-b2000.dts vendor/device-tree/dist/src/arm/stih415-b2020.dts vendor/device-tree/dist/src/arm/stih415-clock.dtsi vendor/device-tree/dist/src/arm/stih415-pinctrl.dtsi vendor/device-tree/dist/src/arm/stih415.dtsi vendor/device-tree/dist/src/arm/stih416-b2000.dts vendor/device-tree/dist/src/arm/stih416-b2020.dts vendor/device-tree/dist/src/arm/stih416-b2020e.dts vendor/device-tree/dist/src/arm/stih416-clock.dtsi vendor/device-tree/dist/src/arm/stih416-pinctrl.dtsi vendor/device-tree/dist/src/arm/stih416.dtsi vendor/device-tree/dist/src/arm/stih41x-b2000.dtsi vendor/device-tree/dist/src/arm/stih41x-b2020.dtsi vendor/device-tree/dist/src/arm/stih41x-b2020x.dtsi vendor/device-tree/dist/src/arm/stih41x.dtsi vendor/device-tree/dist/src/arm/sun4i-a10-a1000.dts vendor/device-tree/dist/src/arm/sun4i-a10-ba10-tvbox.dts vendor/device-tree/dist/src/arm/sun4i-a10-cubieboard.dts vendor/device-tree/dist/src/arm/sun4i-a10-hackberry.dts vendor/device-tree/dist/src/arm/sun4i-a10-inet97fv2.dts vendor/device-tree/dist/src/arm/sun4i-a10-mini-xplus.dts vendor/device-tree/dist/src/arm/sun4i-a10-olinuxino-lime.dts vendor/device-tree/dist/src/arm/sun4i-a10-pcduino.dts vendor/device-tree/dist/src/arm/sun4i-a10.dtsi vendor/device-tree/dist/src/arm/sun5i-a10s-olinuxino-micro.dts vendor/device-tree/dist/src/arm/sun5i-a10s-r7-tv-dongle.dts vendor/device-tree/dist/src/arm/sun5i-a10s.dtsi vendor/device-tree/dist/src/arm/sun5i-a13-olinuxino-micro.dts vendor/device-tree/dist/src/arm/sun5i-a13-olinuxino.dts vendor/device-tree/dist/src/arm/sun5i-a13.dtsi vendor/device-tree/dist/src/arm/sun6i-a31-app4-evb1.dts vendor/device-tree/dist/src/arm/sun6i-a31-colombus.dts vendor/device-tree/dist/src/arm/sun6i-a31-hummingbird.dts vendor/device-tree/dist/src/arm/sun6i-a31-m9.dts vendor/device-tree/dist/src/arm/sun6i-a31.dtsi vendor/device-tree/dist/src/arm/sun7i-a20-cubieboard2.dts vendor/device-tree/dist/src/arm/sun7i-a20-cubietruck.dts vendor/device-tree/dist/src/arm/sun7i-a20-i12-tvbox.dts vendor/device-tree/dist/src/arm/sun7i-a20-olinuxino-micro.dts vendor/device-tree/dist/src/arm/sun7i-a20-pcduino3.dts vendor/device-tree/dist/src/arm/sun7i-a20.dtsi vendor/device-tree/dist/src/arm/sun8i-a23-ippo-q8h-v5.dts vendor/device-tree/dist/src/arm/sun8i-a23.dtsi vendor/device-tree/dist/src/arm/sunxi-common-regulators.dtsi vendor/device-tree/dist/src/arm/tegra114-dalmore.dts vendor/device-tree/dist/src/arm/tegra114-roth.dts vendor/device-tree/dist/src/arm/tegra114-tn7.dts vendor/device-tree/dist/src/arm/tegra114.dtsi vendor/device-tree/dist/src/arm/tegra124-jetson-tk1.dts vendor/device-tree/dist/src/arm/tegra124-venice2.dts vendor/device-tree/dist/src/arm/tegra124.dtsi vendor/device-tree/dist/src/arm/tegra20-colibri-512.dtsi vendor/device-tree/dist/src/arm/tegra20-harmony.dts vendor/device-tree/dist/src/arm/tegra20-iris-512.dts vendor/device-tree/dist/src/arm/tegra20-medcom-wide.dts vendor/device-tree/dist/src/arm/tegra20-paz00.dts vendor/device-tree/dist/src/arm/tegra20-plutux.dts vendor/device-tree/dist/src/arm/tegra20-seaboard.dts vendor/device-tree/dist/src/arm/tegra20-tamonten.dtsi vendor/device-tree/dist/src/arm/tegra20-tec.dts vendor/device-tree/dist/src/arm/tegra20-trimslice.dts vendor/device-tree/dist/src/arm/tegra20-ventana.dts vendor/device-tree/dist/src/arm/tegra20-whistler.dts vendor/device-tree/dist/src/arm/tegra20.dtsi vendor/device-tree/dist/src/arm/tegra30-apalis-eval.dts vendor/device-tree/dist/src/arm/tegra30-apalis.dtsi vendor/device-tree/dist/src/arm/tegra30-beaver.dts vendor/device-tree/dist/src/arm/tegra30-cardhu-a02.dts vendor/device-tree/dist/src/arm/tegra30-cardhu-a04.dts vendor/device-tree/dist/src/arm/tegra30-cardhu.dtsi vendor/device-tree/dist/src/arm/tegra30-colibri-eval-v3.dts vendor/device-tree/dist/src/arm/tegra30-colibri.dtsi vendor/device-tree/dist/src/arm/tegra30.dtsi vendor/device-tree/dist/src/arm/tps6507x.dtsi vendor/device-tree/dist/src/arm/tps65217.dtsi vendor/device-tree/dist/src/arm/tps65910.dtsi vendor/device-tree/dist/src/arm/twl4030.dtsi vendor/device-tree/dist/src/arm/twl4030_omap3.dtsi vendor/device-tree/dist/src/arm/twl6030.dtsi vendor/device-tree/dist/src/arm/twl6030_omap4.dtsi vendor/device-tree/dist/src/arm/usb_a9g20-dab-mmx.dtsi vendor/device-tree/dist/src/arm/versatile-ab.dts vendor/device-tree/dist/src/arm/versatile-pb.dts vendor/device-tree/dist/src/arm/vexpress-v2m-rs1.dtsi vendor/device-tree/dist/src/arm/vexpress-v2m.dtsi vendor/device-tree/dist/src/arm/vexpress-v2p-ca15-tc1.dts vendor/device-tree/dist/src/arm/vexpress-v2p-ca15_a7.dts vendor/device-tree/dist/src/arm/vexpress-v2p-ca5s.dts vendor/device-tree/dist/src/arm/vexpress-v2p-ca9.dts vendor/device-tree/dist/src/arm/vf610-colibri.dts vendor/device-tree/dist/src/arm/vf610-cosmic.dts vendor/device-tree/dist/src/arm/vf610-pinfunc.h vendor/device-tree/dist/src/arm/vf610-twr.dts vendor/device-tree/dist/src/arm/vt8500-bv07.dts vendor/device-tree/dist/src/arm/vt8500.dtsi vendor/device-tree/dist/src/arm/wm8505-ref.dts vendor/device-tree/dist/src/arm/wm8505.dtsi vendor/device-tree/dist/src/arm/wm8650-mid.dts vendor/device-tree/dist/src/arm/wm8650.dtsi vendor/device-tree/dist/src/arm/wm8750-apc8750.dts vendor/device-tree/dist/src/arm/wm8750.dtsi vendor/device-tree/dist/src/arm/wm8850-w70v2.dts vendor/device-tree/dist/src/arm/wm8850.dtsi vendor/device-tree/dist/src/arm/xenvm-4.2.dts vendor/device-tree/dist/src/arm/zynq-7000.dtsi vendor/device-tree/dist/src/arm/zynq-parallella.dts vendor/device-tree/dist/src/arm/zynq-zc702.dts vendor/device-tree/dist/src/arm/zynq-zc706.dts vendor/device-tree/dist/src/arm/zynq-zed.dts vendor/device-tree/dist/src/arm64/ vendor/device-tree/dist/src/c6x/ vendor/device-tree/dist/src/metag/ vendor/device-tree/dist/src/microblaze/ vendor/device-tree/dist/src/mips/ vendor/device-tree/dist/src/openrisc/ vendor/device-tree/dist/src/powerpc/ vendor/device-tree/dist/src/x86/ vendor/device-tree/dist/src/xtensa/ From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 21:28:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C87C753F; Thu, 4 Sep 2014 21:28:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A3EB1918; Thu, 4 Sep 2014 21:28:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84LSPmk062545; Thu, 4 Sep 2014 21:28:25 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84LSPkF062544; Thu, 4 Sep 2014 21:28:25 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201409042128.s84LSPkF062544@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 4 Sep 2014 21:28:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271140 - head/sys/gnu/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 21:28:25 -0000 Author: imp Date: Thu Sep 4 21:28:25 2014 New Revision: 271140 URL: http://svnweb.freebsd.org/changeset/base/271140 Log: Delete old arm dts tree. This was created by cherry picking from a full vendor tree. This worked great until it was time to update, but now it is time to update. Hit the rest button by removing this branch and re-adding it by a full copy of whatever is in the vendor tree. Deleted: head/sys/gnu/dts/arm/ From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 21:31:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4AB1F6BE; Thu, 4 Sep 2014 21:31:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B112194D; Thu, 4 Sep 2014 21:31:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84LVQmS065501; Thu, 4 Sep 2014 21:31:26 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84LVPh3065497; Thu, 4 Sep 2014 21:31:25 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201409042131.s84LVPh3065497@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 4 Sep 2014 21:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271141 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 21:31:26 -0000 Author: sbruno Date: Thu Sep 4 21:31:25 2014 New Revision: 271141 URL: http://svnweb.freebsd.org/changeset/base/271141 Log: Allow multiple image activators to run on the same execution by changing imgp->interpreted to a bitmask instead of, functionally, a bool. Each imgactivator now requires its own flag in interpreted to indicate whether or not it has already examined argv[0]. Change imgp->interpreted to an unsigned char to add one extra bit for future use. With this change, one can execute a shell script from a 64bit host native make and still get the binmisc image activator to fire for the script interpreter. Prior to this, execution would fail. Phabric: https://reviews.freebsd.org/D696 Reviewed by: jhb@ MFC after: 4 weeks Modified: head/sys/kern/imgact_binmisc.c head/sys/kern/imgact_shell.c head/sys/sys/imgact.h Modified: head/sys/kern/imgact_binmisc.c ============================================================================== --- head/sys/kern/imgact_binmisc.c Thu Sep 4 21:28:25 2014 (r271140) +++ head/sys/kern/imgact_binmisc.c Thu Sep 4 21:31:25 2014 (r271141) @@ -600,12 +600,12 @@ imgact_binmisc_exec(struct image_params } /* No interpreter nesting allowed. */ - if (imgp->interpreted) { + if (imgp->interpreted & IMGACT_BINMISC) { mtx_unlock(&interp_list_mtx); return (ENOEXEC); } - imgp->interpreted = 1; + imgp->interpreted |= IMGACT_BINMISC; if (imgp->args->fname != NULL) { fname = imgp->args->fname; Modified: head/sys/kern/imgact_shell.c ============================================================================== --- head/sys/kern/imgact_shell.c Thu Sep 4 21:28:25 2014 (r271140) +++ head/sys/kern/imgact_shell.c Thu Sep 4 21:31:25 2014 (r271141) @@ -115,10 +115,10 @@ exec_shell_imgact(imgp) * Don't allow a shell script to be the shell for a shell * script. :-) */ - if (imgp->interpreted) + if (imgp->interpreted & IMGACT_SHELL) return (ENOEXEC); - imgp->interpreted = 1; + imgp->interpreted |= IMGACT_SHELL; /* * At this point we have the first page of the file mapped. Modified: head/sys/sys/imgact.h ============================================================================== --- head/sys/sys/imgact.h Thu Sep 4 21:28:25 2014 (r271140) +++ head/sys/sys/imgact.h Thu Sep 4 21:31:25 2014 (r271141) @@ -61,7 +61,9 @@ struct image_params { unsigned long entry_addr; /* entry address of target executable */ unsigned long reloc_base; /* load address of image */ char vmspace_destroyed; /* flag - we've blown away original vm space */ - char interpreted; /* flag - this executable is interpreted */ +#define IMGACT_SHELL 0x1 +#define IMGACT_BINMISC 0x2 + unsigned char interpreted; /* mask of interpreters that have run */ char opened; /* flag - we have opened executable vnode */ char *interpreter_name; /* name of the interpreter */ void *auxargs; /* ELF Auxinfo structure pointer */ From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 21:44:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B88AA82; Thu, 4 Sep 2014 21:44:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 271611AFB; Thu, 4 Sep 2014 21:44:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84LiiM6071585; Thu, 4 Sep 2014 21:44:44 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84LiiEV071583; Thu, 4 Sep 2014 21:44:44 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409042144.s84LiiEV071583@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 4 Sep 2014 21:44:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r271142 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 21:44:45 -0000 Author: gjb Date: Thu Sep 4 21:44:44 2014 New Revision: 271142 URL: http://svnweb.freebsd.org/changeset/base/271142 Log: Require explicit re@ approval for commits to stable/10 as, the code freeze for 10.1-RELEASE is now in effect. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Thu Sep 4 21:31:25 2014 (r271141) +++ svnadmin/conf/approvers Thu Sep 4 21:44:44 2014 (r271142) @@ -17,7 +17,7 @@ # $FreeBSD$ # #^head/ re -#^stable/10/ re +^stable/10/ re #^stable/9/ re #^stable/8/ re #^stable/7/ re From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 21:48:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EABB0C36; Thu, 4 Sep 2014 21:48:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC9641B23; Thu, 4 Sep 2014 21:48:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84LmX5D072267; Thu, 4 Sep 2014 21:48:33 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84LmXrC072266; Thu, 4 Sep 2014 21:48:33 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201409042148.s84LmXrC072266@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 4 Sep 2014 21:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271143 - head/sys/gnu/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 21:48:34 -0000 Author: imp Date: Thu Sep 4 21:48:33 2014 New Revision: 271143 URL: http://svnweb.freebsd.org/changeset/base/271143 Log: Reimport dts files from vendor repo now that it has been properly trimmed. Added: head/sys/gnu/dts/arm/ - copied from r271142, vendor/device-tree/dist/src/arm/ From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 21:48:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D954C37; Thu, 4 Sep 2014 21:48:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78AFE1B24; Thu, 4 Sep 2014 21:48:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84LmYjn072287; Thu, 4 Sep 2014 21:48:34 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84LmYe7072285; Thu, 4 Sep 2014 21:48:34 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201409042148.s84LmYe7072285@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Thu, 4 Sep 2014 21:48:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271144 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 21:48:34 -0000 Author: jilles Date: Thu Sep 4 21:48:33 2014 New Revision: 271144 URL: http://svnweb.freebsd.org/changeset/base/271144 Log: sh: Allow enabling job control without a tty in non-interactive mode. If no tty is available, 'set -m' is still useful to put jobs in their own process groups. Modified: head/bin/sh/jobs.c head/bin/sh/sh.1 Modified: head/bin/sh/jobs.c ============================================================================== --- head/bin/sh/jobs.c Thu Sep 4 21:48:33 2014 (r271143) +++ head/bin/sh/jobs.c Thu Sep 4 21:48:33 2014 (r271144) @@ -118,6 +118,24 @@ static void showjob(struct job *, int); static int jobctl; #if JOBS +static void +jobctl_notty(void) +{ + if (ttyfd >= 0) { + close(ttyfd); + ttyfd = -1; + } + if (!iflag) { + setsignal(SIGTSTP); + setsignal(SIGTTOU); + setsignal(SIGTTIN); + jobctl = 1; + return; + } + out2fmt_flush("sh: can't access tty; job control turned off\n"); + mflag = 0; +} + void setjobctl(int on) { @@ -133,8 +151,10 @@ setjobctl(int on) while (i <= 2 && !isatty(i)) i++; if (i > 2 || - (ttyfd = fcntl(i, F_DUPFD_CLOEXEC, 10)) < 0) - goto out; + (ttyfd = fcntl(i, F_DUPFD_CLOEXEC, 10)) < 0) { + jobctl_notty(); + return; + } } if (ttyfd < 10) { /* @@ -142,9 +162,8 @@ setjobctl(int on) * the user's redirections. */ if ((i = fcntl(ttyfd, F_DUPFD_CLOEXEC, 10)) < 0) { - close(ttyfd); - ttyfd = -1; - goto out; + jobctl_notty(); + return; } close(ttyfd); ttyfd = i; @@ -152,11 +171,15 @@ setjobctl(int on) do { /* while we are in the background */ initialpgrp = tcgetpgrp(ttyfd); if (initialpgrp < 0) { -out: out2fmt_flush("sh: can't access tty; job control turned off\n"); - mflag = 0; + jobctl_notty(); return; } if (initialpgrp != getpgrp()) { + if (!iflag) { + initialpgrp = -1; + jobctl_notty(); + return; + } kill(0, SIGTTIN); continue; } @@ -168,9 +191,11 @@ out: out2fmt_flush("sh: can't access tcsetpgrp(ttyfd, rootpid); } else { /* turning job control off */ setpgid(0, initialpgrp); - tcsetpgrp(ttyfd, initialpgrp); - close(ttyfd); - ttyfd = -1; + if (ttyfd >= 0) { + tcsetpgrp(ttyfd, initialpgrp); + close(ttyfd); + ttyfd = -1; + } setsignal(SIGTSTP); setsignal(SIGTTOU); setsignal(SIGTTIN); @@ -195,7 +220,8 @@ fgcmd(int argc __unused, char **argv __u printjobcmd(jp); flushout(&output); pgrp = jp->ps[0].pid; - tcsetpgrp(ttyfd, pgrp); + if (ttyfd >= 0) + tcsetpgrp(ttyfd, pgrp); restartjob(jp); jp->foreground = 1; INTOFF; @@ -847,7 +873,8 @@ forkshell(struct job *jp, union node *n, pgrp = getpid(); else pgrp = jp->ps[0].pid; - if (setpgid(0, pgrp) == 0 && mode == FORK_FG) { + if (setpgid(0, pgrp) == 0 && mode == FORK_FG && + ttyfd >= 0) { /*** this causes superfluous TIOCSPGRPS ***/ if (tcsetpgrp(ttyfd, pgrp) < 0) error("tcsetpgrp failed, errno=%d", errno); @@ -1007,7 +1034,7 @@ waitforjob(struct job *jp, int *origstat dotrap(); #if JOBS if (jp->jobctl) { - if (tcsetpgrp(ttyfd, rootpid) < 0) + if (ttyfd >= 0 && tcsetpgrp(ttyfd, rootpid) < 0) error("tcsetpgrp failed, errno=%d\n", errno); } if (jp->state == JOBSTOPPED) Modified: head/bin/sh/sh.1 ============================================================================== --- head/bin/sh/sh.1 Thu Sep 4 21:48:33 2014 (r271143) +++ head/bin/sh/sh.1 Thu Sep 4 21:48:33 2014 (r271144) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd January 26, 2014 +.Dd September 4, 2014 .Dt SH 1 .Os .Sh NAME @@ -259,6 +259,12 @@ from input when in interactive mode. Force the shell to behave interactively. .It Fl m Li monitor Turn on job control (set automatically when interactive). +A new process group is created for each pipeline (called a job). +It is possible to suspend jobs or to have them run in the foreground or +in the background. +In a non-interactive shell, +this option can be set even if no terminal is available +and is useful to place processes in separate process groups. .It Fl n Li noexec If not interactive, read commands but do not execute them. From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 22:00:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6565C1D6; Thu, 4 Sep 2014 22:00:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5111B1CBA; Thu, 4 Sep 2014 22:00:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84M0r33078355; Thu, 4 Sep 2014 22:00:53 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84M0rX5078354; Thu, 4 Sep 2014 22:00:53 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201409042200.s84M0rX5078354@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Thu, 4 Sep 2014 22:00:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271145 - head/etc/rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 22:00:53 -0000 Author: hrs Date: Thu Sep 4 22:00:52 2014 New Revision: 271145 URL: http://svnweb.freebsd.org/changeset/base/271145 Log: Fix a bug which prevented mount.fstab parameter from being converted when jail_JID_devfs_enable=NO. Spotted by: peter Modified: head/etc/rc.d/jail Modified: head/etc/rc.d/jail ============================================================================== --- head/etc/rc.d/jail Thu Sep 4 21:48:33 2014 (r271144) +++ head/etc/rc.d/jail Thu Sep 4 22:00:52 2014 (r271145) @@ -207,6 +207,10 @@ parse_options() extract_var $_j consolelog exec.consolelog - \ /var/log/jail_${_j}_console.log + if [ -r $_fstab ]; then + echo " mount.fstab = \"$_fstab\";" + fi + eval : \${jail_${_j}_devfs_enable:=${jail_devfs_enable:-NO}} if checkyesno jail_${_j}_devfs_enable; then echo " mount.devfs;" @@ -222,11 +226,7 @@ parse_options() ;; *) warn "devfs_ruleset must be an integer." ;; esac - if [ -r $_fstab ]; then - echo " mount.fstab = \"$_fstab\";" - fi fi - eval : \${jail_${_j}_fdescfs_enable:=${jail_fdescfs_enable:-NO}} if checkyesno jail_${_j}_fdescfs_enable; then echo " mount.fdescfs;" From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 22:22:54 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E75B5CD; Thu, 4 Sep 2014 22:22:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8880F1EB6; Thu, 4 Sep 2014 22:22:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84MMsnO090671; Thu, 4 Sep 2014 22:22:54 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84MMrsP090666; Thu, 4 Sep 2014 22:22:53 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201409042222.s84MMrsP090666@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 4 Sep 2014 22:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271146 - in head/sys: conf dev/ahci modules/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 22:22:54 -0000 Author: imp Date: Thu Sep 4 22:22:53 2014 New Revision: 271146 URL: http://svnweb.freebsd.org/changeset/base/271146 Log: Separate out PCI attachment from the main AHCI driver. Move checks of PCI IDs into quirks, which mostly fit (though you'd get no argument from me that AHCI_Q_SATA1_UNIT0 is oddly specific). Set these quirks in the PCI attachment. Make some shared functions public so that PCI and possibly other bus attachments can use them. The split isn't perfect yet, but it is functional. The split will be perfected as other bus attachments for AHCI are written. Sponsored by: Netflix Reviewed by: kan, mav Differential Revision: https://reviews.freebsd.org/D699 Added: head/sys/dev/ahci/ahci_pci.c - copied, changed from r271145, head/sys/dev/ahci/ahci.c Modified: head/sys/conf/files head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci.h head/sys/modules/ahci/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Sep 4 22:00:52 2014 (r271145) +++ head/sys/conf/files Thu Sep 4 22:22:53 2014 (r271146) @@ -622,8 +622,9 @@ dev/aha/aha.c optional aha dev/aha/aha_isa.c optional aha isa dev/aha/aha_mca.c optional aha mca dev/ahb/ahb.c optional ahb eisa -dev/ahci/ahci.c optional ahci pci -dev/ahci/ahciem.c optional ahci pci +dev/ahci/ahci.c optional ahci +dev/ahci/ahciem.c optional ahci +dev/ahci/ahci_pci.c optional ahci pci dev/aic/aic.c optional aic dev/aic/aic_pccard.c optional aic pccard dev/aic7xxx/ahc_eisa.c optional ahc eisa Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Thu Sep 4 22:00:52 2014 (r271145) +++ head/sys/dev/ahci/ahci.c Thu Sep 4 22:22:53 2014 (r271146) @@ -41,8 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include #include "ahci.h" #include @@ -52,12 +50,9 @@ __FBSDID("$FreeBSD$"); #include /* local prototypes */ -static int ahci_setup_interrupt(device_t dev); static void ahci_intr(void *data); static void ahci_intr_one(void *data); static void ahci_intr_one_edge(void *data); -static int ahci_suspend(device_t dev); -static int ahci_resume(device_t dev); static int ahci_ch_init(device_t dev); static int ahci_ch_deinit(device_t dev); static int ahci_ch_suspend(device_t dev); @@ -66,8 +61,6 @@ static void ahci_ch_pm(void *arg); static void ahci_ch_intr(void *arg); static void ahci_ch_intr_direct(void *arg); static void ahci_ch_intr_main(struct ahci_channel *ch, uint32_t istatus); -static int ahci_ctlr_reset(device_t dev); -static int ahci_ctlr_setup(device_t dev); static void ahci_begin_transaction(device_t dev, union ccb *ccb); static void ahci_dmasetprd(void *arg, bus_dma_segment_t *segs, int nsegs, int error); static void ahci_execute_transaction(struct ahci_slot *slot); @@ -99,366 +92,76 @@ static void ahcipoll(struct cam_sim *sim static MALLOC_DEFINE(M_AHCI, "AHCI driver", "AHCI driver data buffers"); -static struct { - uint32_t id; - uint8_t rev; - const char *name; - int quirks; -#define AHCI_Q_NOFORCE 1 -#define AHCI_Q_NOPMP 2 -#define AHCI_Q_NONCQ 4 -#define AHCI_Q_1CH 8 -#define AHCI_Q_2CH 16 -#define AHCI_Q_4CH 32 -#define AHCI_Q_EDGEIS 64 -#define AHCI_Q_SATA2 128 -#define AHCI_Q_NOBSYRES 256 -#define AHCI_Q_NOAA 512 -#define AHCI_Q_NOCOUNT 1024 -#define AHCI_Q_ALTSIG 2048 -#define AHCI_Q_NOMSI 4096 - -#define AHCI_Q_BIT_STRING \ - "\020" \ - "\001NOFORCE" \ - "\002NOPMP" \ - "\003NONCQ" \ - "\0041CH" \ - "\0052CH" \ - "\0064CH" \ - "\007EDGEIS" \ - "\010SATA2" \ - "\011NOBSYRES" \ - "\012NOAA" \ - "\013NOCOUNT" \ - "\014ALTSIG" \ - "\015NOMSI" -} ahci_ids[] = { - {0x43801002, 0x00, "AMD SB600", AHCI_Q_NOMSI}, - {0x43901002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0}, - {0x43911002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0}, - {0x43921002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0}, - {0x43931002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0}, - {0x43941002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0}, - {0x43951002, 0x00, "AMD SB8x0/SB9x0", 0}, - {0x78001022, 0x00, "AMD Hudson-2", 0}, - {0x78011022, 0x00, "AMD Hudson-2", 0}, - {0x78021022, 0x00, "AMD Hudson-2", 0}, - {0x78031022, 0x00, "AMD Hudson-2", 0}, - {0x78041022, 0x00, "AMD Hudson-2", 0}, - {0x06111b21, 0x00, "ASMedia ASM2106", 0}, - {0x06121b21, 0x00, "ASMedia ASM1061", 0}, - {0x26528086, 0x00, "Intel ICH6", AHCI_Q_NOFORCE}, - {0x26538086, 0x00, "Intel ICH6M", AHCI_Q_NOFORCE}, - {0x26818086, 0x00, "Intel ESB2", 0}, - {0x26828086, 0x00, "Intel ESB2", 0}, - {0x26838086, 0x00, "Intel ESB2", 0}, - {0x27c18086, 0x00, "Intel ICH7", 0}, - {0x27c38086, 0x00, "Intel ICH7", 0}, - {0x27c58086, 0x00, "Intel ICH7M", 0}, - {0x27c68086, 0x00, "Intel ICH7M", 0}, - {0x28218086, 0x00, "Intel ICH8", 0}, - {0x28228086, 0x00, "Intel ICH8", 0}, - {0x28248086, 0x00, "Intel ICH8", 0}, - {0x28298086, 0x00, "Intel ICH8M", 0}, - {0x282a8086, 0x00, "Intel ICH8M", 0}, - {0x29228086, 0x00, "Intel ICH9", 0}, - {0x29238086, 0x00, "Intel ICH9", 0}, - {0x29248086, 0x00, "Intel ICH9", 0}, - {0x29258086, 0x00, "Intel ICH9", 0}, - {0x29278086, 0x00, "Intel ICH9", 0}, - {0x29298086, 0x00, "Intel ICH9M", 0}, - {0x292a8086, 0x00, "Intel ICH9M", 0}, - {0x292b8086, 0x00, "Intel ICH9M", 0}, - {0x292c8086, 0x00, "Intel ICH9M", 0}, - {0x292f8086, 0x00, "Intel ICH9M", 0}, - {0x294d8086, 0x00, "Intel ICH9", 0}, - {0x294e8086, 0x00, "Intel ICH9M", 0}, - {0x3a058086, 0x00, "Intel ICH10", 0}, - {0x3a228086, 0x00, "Intel ICH10", 0}, - {0x3a258086, 0x00, "Intel ICH10", 0}, - {0x3b228086, 0x00, "Intel 5 Series/3400 Series", 0}, - {0x3b238086, 0x00, "Intel 5 Series/3400 Series", 0}, - {0x3b258086, 0x00, "Intel 5 Series/3400 Series", 0}, - {0x3b298086, 0x00, "Intel 5 Series/3400 Series", 0}, - {0x3b2c8086, 0x00, "Intel 5 Series/3400 Series", 0}, - {0x3b2f8086, 0x00, "Intel 5 Series/3400 Series", 0}, - {0x1c028086, 0x00, "Intel Cougar Point", 0}, - {0x1c038086, 0x00, "Intel Cougar Point", 0}, - {0x1c048086, 0x00, "Intel Cougar Point", 0}, - {0x1c058086, 0x00, "Intel Cougar Point", 0}, - {0x1d028086, 0x00, "Intel Patsburg", 0}, - {0x1d048086, 0x00, "Intel Patsburg", 0}, - {0x1d068086, 0x00, "Intel Patsburg", 0}, - {0x28268086, 0x00, "Intel Patsburg (RAID)", 0}, - {0x1e028086, 0x00, "Intel Panther Point", 0}, - {0x1e038086, 0x00, "Intel Panther Point", 0}, - {0x1e048086, 0x00, "Intel Panther Point (RAID)", 0}, - {0x1e058086, 0x00, "Intel Panther Point (RAID)", 0}, - {0x1e068086, 0x00, "Intel Panther Point (RAID)", 0}, - {0x1e078086, 0x00, "Intel Panther Point (RAID)", 0}, - {0x1e0e8086, 0x00, "Intel Panther Point (RAID)", 0}, - {0x1e0f8086, 0x00, "Intel Panther Point (RAID)", 0}, - {0x1f228086, 0x00, "Intel Avoton", 0}, - {0x1f238086, 0x00, "Intel Avoton", 0}, - {0x1f248086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f258086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f268086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f278086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f2e8086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f2f8086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f328086, 0x00, "Intel Avoton", 0}, - {0x1f338086, 0x00, "Intel Avoton", 0}, - {0x1f348086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f358086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f368086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f378086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f3e8086, 0x00, "Intel Avoton (RAID)", 0}, - {0x1f3f8086, 0x00, "Intel Avoton (RAID)", 0}, - {0x23a38086, 0x00, "Intel Coleto Creek", 0}, - {0x28238086, 0x00, "Intel Wellsburg (RAID)", 0}, - {0x28278086, 0x00, "Intel Wellsburg (RAID)", 0}, - {0x8c028086, 0x00, "Intel Lynx Point", 0}, - {0x8c038086, 0x00, "Intel Lynx Point", 0}, - {0x8c048086, 0x00, "Intel Lynx Point (RAID)", 0}, - {0x8c058086, 0x00, "Intel Lynx Point (RAID)", 0}, - {0x8c068086, 0x00, "Intel Lynx Point (RAID)", 0}, - {0x8c078086, 0x00, "Intel Lynx Point (RAID)", 0}, - {0x8c0e8086, 0x00, "Intel Lynx Point (RAID)", 0}, - {0x8c0f8086, 0x00, "Intel Lynx Point (RAID)", 0}, - {0x8d028086, 0x00, "Intel Wellsburg", 0}, - {0x8d048086, 0x00, "Intel Wellsburg (RAID)", 0}, - {0x8d068086, 0x00, "Intel Wellsburg (RAID)", 0}, - {0x8d628086, 0x00, "Intel Wellsburg", 0}, - {0x8d648086, 0x00, "Intel Wellsburg (RAID)", 0}, - {0x8d668086, 0x00, "Intel Wellsburg (RAID)", 0}, - {0x8d6e8086, 0x00, "Intel Wellsburg (RAID)", 0}, - {0x9c028086, 0x00, "Intel Lynx Point-LP", 0}, - {0x9c038086, 0x00, "Intel Lynx Point-LP", 0}, - {0x9c048086, 0x00, "Intel Lynx Point-LP (RAID)", 0}, - {0x9c058086, 0x00, "Intel Lynx Point-LP (RAID)", 0}, - {0x9c068086, 0x00, "Intel Lynx Point-LP (RAID)", 0}, - {0x9c078086, 0x00, "Intel Lynx Point-LP (RAID)", 0}, - {0x9c0e8086, 0x00, "Intel Lynx Point-LP (RAID)", 0}, - {0x9c0f8086, 0x00, "Intel Lynx Point-LP (RAID)", 0}, - {0x23238086, 0x00, "Intel DH89xxCC", 0}, - {0x2360197b, 0x00, "JMicron JMB360", 0}, - {0x2361197b, 0x00, "JMicron JMB361", AHCI_Q_NOFORCE}, - {0x2362197b, 0x00, "JMicron JMB362", 0}, - {0x2363197b, 0x00, "JMicron JMB363", AHCI_Q_NOFORCE}, - {0x2365197b, 0x00, "JMicron JMB365", AHCI_Q_NOFORCE}, - {0x2366197b, 0x00, "JMicron JMB366", AHCI_Q_NOFORCE}, - {0x2368197b, 0x00, "JMicron JMB368", AHCI_Q_NOFORCE}, - {0x611111ab, 0x00, "Marvell 88SE6111", AHCI_Q_NOFORCE | AHCI_Q_1CH | - AHCI_Q_EDGEIS}, - {0x612111ab, 0x00, "Marvell 88SE6121", AHCI_Q_NOFORCE | AHCI_Q_2CH | - AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, - {0x614111ab, 0x00, "Marvell 88SE6141", AHCI_Q_NOFORCE | AHCI_Q_4CH | - AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, - {0x614511ab, 0x00, "Marvell 88SE6145", AHCI_Q_NOFORCE | AHCI_Q_4CH | - AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, - {0x91201b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_NOBSYRES}, - {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES}, - {0x91251b4b, 0x00, "Marvell 88SE9125", AHCI_Q_NOBSYRES}, - {0x91281b4b, 0x00, "Marvell 88SE9128", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x91301b4b, 0x00, "Marvell 88SE9130", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x91721b4b, 0x00, "Marvell 88SE9172", AHCI_Q_NOBSYRES}, - {0x91821b4b, 0x00, "Marvell 88SE9182", AHCI_Q_NOBSYRES}, - {0x91831b4b, 0x00, "Marvell 88SS9183", AHCI_Q_NOBSYRES}, - {0x91a01b4b, 0x00, "Marvell 88SE91Ax", AHCI_Q_NOBSYRES}, - {0x92151b4b, 0x00, "Marvell 88SE9215", AHCI_Q_NOBSYRES}, - {0x92201b4b, 0x00, "Marvell 88SE9220", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x92301b4b, 0x00, "Marvell 88SE9230", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x92351b4b, 0x00, "Marvell 88SE9235", AHCI_Q_NOBSYRES}, - {0x06201103, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, - {0x06201b4b, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, - {0x06221103, 0x00, "HighPoint RocketRAID 622", AHCI_Q_NOBSYRES}, - {0x06221b4b, 0x00, "HighPoint RocketRAID 622", AHCI_Q_NOBSYRES}, - {0x06401103, 0x00, "HighPoint RocketRAID 640", AHCI_Q_NOBSYRES}, - {0x06401b4b, 0x00, "HighPoint RocketRAID 640", AHCI_Q_NOBSYRES}, - {0x06441103, 0x00, "HighPoint RocketRAID 644", AHCI_Q_NOBSYRES}, - {0x06441b4b, 0x00, "HighPoint RocketRAID 644", AHCI_Q_NOBSYRES}, - {0x06411103, 0x00, "HighPoint RocketRAID 640L", AHCI_Q_NOBSYRES}, - {0x06421103, 0x00, "HighPoint RocketRAID 642L", AHCI_Q_NOBSYRES}, - {0x06451103, 0x00, "HighPoint RocketRAID 644L", AHCI_Q_NOBSYRES}, - {0x044c10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, - {0x044d10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, - {0x044e10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, - {0x044f10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, - {0x045c10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, - {0x045d10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, - {0x045e10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, - {0x045f10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, - {0x055010de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055110de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055210de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055310de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055410de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055510de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055610de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055710de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055810de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055910de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055A10de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x055B10de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x058410de, 0x00, "NVIDIA MCP67", AHCI_Q_NOAA}, - {0x07f010de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07f110de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07f210de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07f310de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07f410de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07f510de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07f610de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07f710de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07f810de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07f910de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07fa10de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x07fb10de, 0x00, "NVIDIA MCP73", AHCI_Q_NOAA}, - {0x0ad010de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ad110de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ad210de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ad310de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ad410de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ad510de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ad610de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ad710de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ad810de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ad910de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ada10de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0adb10de, 0x00, "NVIDIA MCP77", AHCI_Q_NOAA}, - {0x0ab410de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0ab510de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0ab610de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0ab710de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0ab810de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0ab910de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0aba10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0abb10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0abc10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0abd10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0abe10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0abf10de, 0x00, "NVIDIA MCP79", AHCI_Q_NOAA}, - {0x0d8410de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x0d8510de, 0x00, "NVIDIA MCP89", AHCI_Q_NOFORCE|AHCI_Q_NOAA}, - {0x0d8610de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x0d8710de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x0d8810de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x0d8910de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x0d8a10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x0d8b10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x0d8c10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x0d8d10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x0d8e10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x0d8f10de, 0x00, "NVIDIA MCP89", AHCI_Q_NOAA}, - {0x33491106, 0x00, "VIA VT8251", AHCI_Q_NOPMP|AHCI_Q_NONCQ}, - {0x62871106, 0x00, "VIA VT8251", AHCI_Q_NOPMP|AHCI_Q_NONCQ}, - {0x11841039, 0x00, "SiS 966", 0}, - {0x11851039, 0x00, "SiS 968", 0}, - {0x01861039, 0x00, "SiS 968", 0}, - {0x00000000, 0x00, NULL, 0} -}; - #define recovery_type spriv_field0 #define RECOVERY_NONE 0 #define RECOVERY_READ_LOG 1 #define RECOVERY_REQUEST_SENSE 2 #define recovery_slot spriv_field1 -static int force_ahci = 1; -TUNABLE_INT("hw.ahci.force", &force_ahci); - -static int -ahci_probe(device_t dev) +int +ahci_ctlr_setup(device_t dev) { - char buf[64]; - int i, valid = 0; - uint32_t devid = pci_get_devid(dev); - uint8_t revid = pci_get_revid(dev); - - /* - * Ensure it is not a PCI bridge (some vendors use - * the same PID and VID in PCI bridge and AHCI cards). - */ - if (pci_get_class(dev) == PCIC_BRIDGE) - return (ENXIO); - - /* Is this a possible AHCI candidate? */ - if (pci_get_class(dev) == PCIC_STORAGE && - pci_get_subclass(dev) == PCIS_STORAGE_SATA && - pci_get_progif(dev) == PCIP_STORAGE_SATA_AHCI_1_0) - valid = 1; - /* Is this a known AHCI chip? */ - for (i = 0; ahci_ids[i].id != 0; i++) { - if (ahci_ids[i].id == devid && - ahci_ids[i].rev <= revid && - (valid || (force_ahci == 1 && - !(ahci_ids[i].quirks & AHCI_Q_NOFORCE)))) { - /* Do not attach JMicrons with single PCI function. */ - if (pci_get_vendor(dev) == 0x197b && - (pci_read_config(dev, 0xdf, 1) & 0x40) == 0) - return (ENXIO); - snprintf(buf, sizeof(buf), "%s AHCI SATA controller", - ahci_ids[i].name); - device_set_desc_copy(dev, buf); - return (BUS_PROBE_VENDOR); + struct ahci_controller *ctlr = device_get_softc(dev); + /* Clear interrupts */ + ATA_OUTL(ctlr->r_mem, AHCI_IS, ATA_INL(ctlr->r_mem, AHCI_IS)); + /* Configure CCC */ + if (ctlr->ccc) { + ATA_OUTL(ctlr->r_mem, AHCI_CCCP, ATA_INL(ctlr->r_mem, AHCI_PI)); + ATA_OUTL(ctlr->r_mem, AHCI_CCCC, + (ctlr->ccc << AHCI_CCCC_TV_SHIFT) | + (4 << AHCI_CCCC_CC_SHIFT) | + AHCI_CCCC_EN); + ctlr->cccv = (ATA_INL(ctlr->r_mem, AHCI_CCCC) & + AHCI_CCCC_INT_MASK) >> AHCI_CCCC_INT_SHIFT; + if (bootverbose) { + device_printf(dev, + "CCC with %dms/4cmd enabled on vector %d\n", + ctlr->ccc, ctlr->cccv); } } - if (!valid) - return (ENXIO); - device_set_desc_copy(dev, "AHCI SATA controller"); - return (BUS_PROBE_VENDOR); + /* Enable AHCI interrupts */ + ATA_OUTL(ctlr->r_mem, AHCI_GHC, + ATA_INL(ctlr->r_mem, AHCI_GHC) | AHCI_GHC_IE); + return (0); } -static int -ahci_ata_probe(device_t dev) +int +ahci_ctlr_reset(device_t dev) { - char buf[64]; - int i; - uint32_t devid = pci_get_devid(dev); - uint8_t revid = pci_get_revid(dev); + struct ahci_controller *ctlr = device_get_softc(dev); + int timeout; - if ((intptr_t)device_get_ivars(dev) >= 0) - return (ENXIO); - /* Is this a known AHCI chip? */ - for (i = 0; ahci_ids[i].id != 0; i++) { - if (ahci_ids[i].id == devid && - ahci_ids[i].rev <= revid) { - snprintf(buf, sizeof(buf), "%s AHCI SATA controller", - ahci_ids[i].name); - device_set_desc_copy(dev, buf); - return (BUS_PROBE_VENDOR); - } + /* Enable AHCI mode */ + ATA_OUTL(ctlr->r_mem, AHCI_GHC, AHCI_GHC_AE); + /* Reset AHCI controller */ + ATA_OUTL(ctlr->r_mem, AHCI_GHC, AHCI_GHC_AE|AHCI_GHC_HR); + for (timeout = 1000; timeout > 0; timeout--) { + DELAY(1000); + if ((ATA_INL(ctlr->r_mem, AHCI_GHC) & AHCI_GHC_HR) == 0) + break; } - device_set_desc_copy(dev, "AHCI SATA controller"); - return (BUS_PROBE_VENDOR); + if (timeout == 0) { + device_printf(dev, "AHCI controller reset failure\n"); + return ENXIO; + } + /* Reenable AHCI mode */ + ATA_OUTL(ctlr->r_mem, AHCI_GHC, AHCI_GHC_AE); + return (0); } -static int + +int ahci_attach(device_t dev) { struct ahci_controller *ctlr = device_get_softc(dev); - device_t child; - int error, unit, speed, i; - u_int u; - uint32_t devid = pci_get_devid(dev); - uint8_t revid = pci_get_revid(dev); + int error, i, u, speed, unit; u_int32_t version; + device_t child; ctlr->dev = dev; - i = 0; - while (ahci_ids[i].id != 0 && - (ahci_ids[i].id != devid || - ahci_ids[i].rev > revid)) - i++; - ctlr->quirks = ahci_ids[i].quirks; resource_int_value(device_get_name(dev), device_get_unit(dev), "ccc", &ctlr->ccc); - /* if we have a memory BAR(5) we are likely on an AHCI part */ - ctlr->r_rid = PCIR_BAR(5); - if (!(ctlr->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &ctlr->r_rid, RF_ACTIVE))) - return ENXIO; + /* Setup our own memory management for channels. */ ctlr->sc_iomem.rm_start = rman_get_start(ctlr->r_mem); ctlr->sc_iomem.rm_end = rman_get_end(ctlr->r_mem); @@ -474,13 +177,6 @@ ahci_attach(device_t dev) rman_fini(&ctlr->sc_iomem); return (error); } - pci_enable_busmaster(dev); - /* Reset controller */ - if ((error = ahci_ctlr_reset(dev)) != 0) { - bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem); - rman_fini(&ctlr->sc_iomem); - return (error); - }; /* Get the HW capabilities */ version = ATA_INL(ctlr->r_mem, AHCI_VS); ctlr->caps = ATA_INL(ctlr->r_mem, AHCI_CAP); @@ -533,13 +229,7 @@ ahci_attach(device_t dev) } ahci_ctlr_setup(dev); - /* Setup interrupts. */ - if (ahci_setup_interrupt(dev)) { - bus_dma_tag_destroy(ctlr->dma_tag); - bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem); - rman_fini(&ctlr->sc_iomem); - return ENXIO; - } + i = 0; for (u = ctlr->ichannels; u != 0; u >>= 1) i += (u & 1); @@ -619,7 +309,7 @@ ahci_attach(device_t dev) return 0; } -static int +int ahci_detach(device_t dev) { struct ahci_controller *ctlr = device_get_softc(dev); @@ -637,7 +327,6 @@ ahci_detach(device_t dev) ctlr->irqs[i].r_irq_rid, ctlr->irqs[i].r_irq); } } - pci_release_msi(dev); bus_dma_tag_destroy(ctlr->dma_tag); /* Free memory. */ rman_fini(&ctlr->sc_iomem); @@ -646,109 +335,12 @@ ahci_detach(device_t dev) return (0); } -static int -ahci_ctlr_reset(device_t dev) -{ - struct ahci_controller *ctlr = device_get_softc(dev); - int timeout; - - if (pci_read_config(dev, PCIR_DEVVENDOR, 4) == 0x28298086 && - (pci_read_config(dev, 0x92, 1) & 0xfe) == 0x04) - pci_write_config(dev, 0x92, 0x01, 1); - /* Enable AHCI mode */ - ATA_OUTL(ctlr->r_mem, AHCI_GHC, AHCI_GHC_AE); - /* Reset AHCI controller */ - ATA_OUTL(ctlr->r_mem, AHCI_GHC, AHCI_GHC_AE|AHCI_GHC_HR); - for (timeout = 1000; timeout > 0; timeout--) { - DELAY(1000); - if ((ATA_INL(ctlr->r_mem, AHCI_GHC) & AHCI_GHC_HR) == 0) - break; - } - if (timeout == 0) { - device_printf(dev, "AHCI controller reset failure\n"); - return ENXIO; - } - /* Reenable AHCI mode */ - ATA_OUTL(ctlr->r_mem, AHCI_GHC, AHCI_GHC_AE); - return (0); -} - -static int -ahci_ctlr_setup(device_t dev) -{ - struct ahci_controller *ctlr = device_get_softc(dev); - /* Clear interrupts */ - ATA_OUTL(ctlr->r_mem, AHCI_IS, ATA_INL(ctlr->r_mem, AHCI_IS)); - /* Configure CCC */ - if (ctlr->ccc) { - ATA_OUTL(ctlr->r_mem, AHCI_CCCP, ATA_INL(ctlr->r_mem, AHCI_PI)); - ATA_OUTL(ctlr->r_mem, AHCI_CCCC, - (ctlr->ccc << AHCI_CCCC_TV_SHIFT) | - (4 << AHCI_CCCC_CC_SHIFT) | - AHCI_CCCC_EN); - ctlr->cccv = (ATA_INL(ctlr->r_mem, AHCI_CCCC) & - AHCI_CCCC_INT_MASK) >> AHCI_CCCC_INT_SHIFT; - if (bootverbose) { - device_printf(dev, - "CCC with %dms/4cmd enabled on vector %d\n", - ctlr->ccc, ctlr->cccv); - } - } - /* Enable AHCI interrupts */ - ATA_OUTL(ctlr->r_mem, AHCI_GHC, - ATA_INL(ctlr->r_mem, AHCI_GHC) | AHCI_GHC_IE); - return (0); -} - -static int -ahci_suspend(device_t dev) -{ - struct ahci_controller *ctlr = device_get_softc(dev); - - bus_generic_suspend(dev); - /* Disable interupts, so the state change(s) doesn't trigger */ - ATA_OUTL(ctlr->r_mem, AHCI_GHC, - ATA_INL(ctlr->r_mem, AHCI_GHC) & (~AHCI_GHC_IE)); - return 0; -} - -static int -ahci_resume(device_t dev) -{ - int res; - - if ((res = ahci_ctlr_reset(dev)) != 0) - return (res); - ahci_ctlr_setup(dev); - return (bus_generic_resume(dev)); -} - -static int +int ahci_setup_interrupt(device_t dev) { struct ahci_controller *ctlr = device_get_softc(dev); int i; - ctlr->msi = 2; - /* Process hints. */ - if (ctlr->quirks & AHCI_Q_NOMSI) - ctlr->msi = 0; - resource_int_value(device_get_name(dev), - device_get_unit(dev), "msi", &ctlr->msi); - ctlr->numirqs = 1; - if (ctlr->msi < 0) - ctlr->msi = 0; - else if (ctlr->msi == 1) - ctlr->msi = min(1, pci_msi_count(dev)); - else if (ctlr->msi > 1) { - ctlr->msi = 2; - ctlr->numirqs = pci_msi_count(dev); - } - /* Allocate MSI if needed/present. */ - if (ctlr->msi && pci_alloc_msi(dev, &ctlr->numirqs) != 0) { - ctlr->msi = 0; - ctlr->numirqs = 1; - } /* Check for single MSI vector fallback. */ if (ctlr->numirqs > 1 && (ATA_INL(ctlr->r_mem, AHCI_GHC) & AHCI_GHC_MRSM) != 0) { @@ -864,9 +456,9 @@ ahci_intr_one_edge(void *data) ctlr->interrupt[unit].function(arg); } -static struct resource * +struct resource * ahci_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + u_long start, u_long end, u_long count, u_int flags) { struct ahci_controller *ctlr = device_get_softc(dev); struct resource *res; @@ -915,9 +507,9 @@ ahci_alloc_resource(device_t dev, device return (res); } -static int +int ahci_release_resource(device_t dev, device_t child, int type, int rid, - struct resource *r) + struct resource *r) { switch (type) { @@ -932,10 +524,10 @@ ahci_release_resource(device_t dev, devi return (EINVAL); } -static int +int ahci_setup_intr(device_t dev, device_t child, struct resource *irq, - int flags, driver_filter_t *filter, driver_intr_t *function, - void *argument, void **cookiep) + int flags, driver_filter_t *filter, driver_intr_t *function, + void *argument, void **cookiep) { struct ahci_controller *ctlr = device_get_softc(dev); int unit = (intptr_t)device_get_ivars(child); @@ -949,9 +541,9 @@ ahci_setup_intr(device_t dev, device_t c return (0); } -static int +int ahci_teardown_intr(device_t dev, device_t child, struct resource *irq, - void *cookie) + void *cookie) { struct ahci_controller *ctlr = device_get_softc(dev); int unit = (intptr_t)device_get_ivars(child); @@ -961,7 +553,7 @@ ahci_teardown_intr(device_t dev, device_ return (0); } -static int +int ahci_print_child(device_t dev, device_t child) { int retval, channel; @@ -974,7 +566,7 @@ ahci_print_child(device_t dev, device_t return (retval); } -static int +int ahci_child_location_str(device_t dev, device_t child, char *buf, size_t buflen) { @@ -986,7 +578,7 @@ ahci_child_location_str(device_t dev, de return (0); } -static bus_dma_tag_t +bus_dma_tag_t ahci_get_dma_tag(device_t dev, device_t child) { struct ahci_controller *ctlr = device_get_softc(dev); @@ -994,51 +586,6 @@ ahci_get_dma_tag(device_t dev, device_t return (ctlr->dma_tag); } -devclass_t ahci_devclass; -static device_method_t ahci_methods[] = { - DEVMETHOD(device_probe, ahci_probe), - DEVMETHOD(device_attach, ahci_attach), - DEVMETHOD(device_detach, ahci_detach), - DEVMETHOD(device_suspend, ahci_suspend), - DEVMETHOD(device_resume, ahci_resume), - DEVMETHOD(bus_print_child, ahci_print_child), - DEVMETHOD(bus_alloc_resource, ahci_alloc_resource), - DEVMETHOD(bus_release_resource, ahci_release_resource), - DEVMETHOD(bus_setup_intr, ahci_setup_intr), - DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), - DEVMETHOD(bus_child_location_str, ahci_child_location_str), - DEVMETHOD(bus_get_dma_tag, ahci_get_dma_tag), - { 0, 0 } -}; -static driver_t ahci_driver = { - "ahci", - ahci_methods, - sizeof(struct ahci_controller) -}; -DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, 0, 0); -static device_method_t ahci_ata_methods[] = { - DEVMETHOD(device_probe, ahci_ata_probe), - DEVMETHOD(device_attach, ahci_attach), - DEVMETHOD(device_detach, ahci_detach), - DEVMETHOD(device_suspend, ahci_suspend), - DEVMETHOD(device_resume, ahci_resume), - DEVMETHOD(bus_print_child, ahci_print_child), - DEVMETHOD(bus_alloc_resource, ahci_alloc_resource), - DEVMETHOD(bus_release_resource, ahci_release_resource), - DEVMETHOD(bus_setup_intr, ahci_setup_intr), - DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), - DEVMETHOD(bus_child_location_str, ahci_child_location_str), - { 0, 0 } -}; -static driver_t ahci_ata_driver = { - "ahci", - ahci_ata_methods, - sizeof(struct ahci_controller) -}; -DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, 0, 0); -MODULE_VERSION(ahci, 1); -MODULE_DEPEND(ahci, cam, 1, 1, 1); - static int ahci_ch_probe(device_t dev) { @@ -1061,6 +608,10 @@ ahci_ch_attach(device_t dev) ch->caps = ctlr->caps; ch->caps2 = ctlr->caps2; ch->quirks = ctlr->quirks; + ch->vendorid = ctlr->vendorid; + ch->deviceid = ctlr->deviceid; + ch->subvendorid = ctlr->subvendorid; + ch->subdeviceid = ctlr->subdeviceid; ch->numslots = ((ch->caps & AHCI_CAP_NCS) >> AHCI_CAP_NCS_SHIFT) + 1; mtx_init(&ch->mtx, "AHCI channel lock", NULL, MTX_DEF); resource_int_value(device_get_name(dev), @@ -1069,12 +620,8 @@ ahci_ch_attach(device_t dev) if (ch->pm_level > 3) callout_init_mtx(&ch->pm_timer, &ch->mtx, 0); callout_init_mtx(&ch->reset_timer, &ch->mtx, 0); - /* Limit speed for my onboard JMicron external port. - * It is not eSATA really. */ - if (pci_get_devid(ctlr->dev) == 0x2363197b && - pci_get_subvendor(ctlr->dev) == 0x1043 && - pci_get_subdevice(ctlr->dev) == 0x81e4 && - ch->unit == 0) + /* JMicron external ports (0) sometimes limited */ + if ((ctlr->quirks & AHCI_Q_SATA1_UNIT0) && ch->unit == 0) sata_rev = 1; if (ch->quirks & AHCI_Q_SATA2) sata_rev = 2; @@ -1979,7 +1526,7 @@ ahci_execute_transaction(struct ahci_slo } /* Workaround for ATI SB600/SB700 chipsets. */ if (ccb->ccb_h.target_id == 15 && - pci_get_vendor(device_get_parent(dev)) == 0x1002 && + (ch->quirks & AHCI_Q_ATI_PMP_BUG) && (ATA_INL(ch->r_mem, AHCI_P_IS) & AHCI_P_IX_IPM)) { et = AHCI_ERR_TIMEOUT; break; @@ -3085,12 +2632,12 @@ ahciaction(struct cam_sim *sim, union cc cpi->protocol_version = PROTO_VERSION_UNSPECIFIED; cpi->maxio = MAXPHYS; /* ATI SB600 can't handle 256 sectors with FPDMA (NCQ). */ - if (pci_get_devid(parent) == 0x43801002) + if (ch->quirks & AHCI_Q_MAXIO_64K) cpi->maxio = min(cpi->maxio, 128 * 512); - cpi->hba_vendor = pci_get_vendor(parent); - cpi->hba_device = pci_get_device(parent); - cpi->hba_subvendor = pci_get_subvendor(parent); - cpi->hba_subdevice = pci_get_subdevice(parent); + cpi->hba_vendor = ch->vendorid; + cpi->hba_device = ch->deviceid; + cpi->hba_subvendor = ch->subvendorid; + cpi->hba_subdevice = ch->subdeviceid; cpi->ccb_h.status = CAM_REQ_CMP; break; } @@ -3117,3 +2664,5 @@ ahcipoll(struct cam_sim *sim) ahci_reset_to(ch->dev); } } +MODULE_VERSION(ahci, 1); +MODULE_DEPEND(ahci, cam, 1, 1, 1); Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Thu Sep 4 22:00:52 2014 (r271145) +++ head/sys/dev/ahci/ahci.h Thu Sep 4 22:22:53 2014 (r271146) @@ -415,6 +415,10 @@ struct ahci_channel { uint32_t caps2; /* Controller capabilities */ uint32_t chcaps; /* Channel capabilities */ uint32_t chscaps; /* Channel sleep capabilities */ + uint16_t vendorid; /* Vendor ID from the bus */ + uint16_t deviceid; /* Device ID from the bus */ + uint16_t subvendorid; /* Subvendor ID from the bus */ + uint16_t subdeviceid; /* Subdevice ID from the bus */ int quirks; int numslots; /* Number of present slots */ int pm_level; /* power management level */ @@ -474,6 +478,10 @@ struct ahci_controller { device_t dev; bus_dma_tag_t dma_tag; int r_rid; + uint16_t vendorid; /* Vendor ID from the bus */ + uint16_t deviceid; /* Device ID from the bus */ + uint16_t subvendorid; /* Subvendor ID from the bus */ + uint16_t subdeviceid; /* Subdevice ID from the bus */ struct resource *r_mem; struct rman sc_iomem; struct ahci_controller_irq { @@ -544,3 +552,59 @@ enum ahci_err_type { bus_write_multi_4((res), (offset), (addr), (count)) #define ATA_OUTSL_STRM(res, offset, addr, count) \ bus_write_multi_stream_4((res), (offset), (addr), (count)) + + +#define AHCI_Q_NOFORCE 1 +#define AHCI_Q_NOPMP 2 +#define AHCI_Q_NONCQ 4 +#define AHCI_Q_1CH 8 +#define AHCI_Q_2CH 0x10 +#define AHCI_Q_4CH 0x20 +#define AHCI_Q_EDGEIS 0x40 +#define AHCI_Q_SATA2 0x80 +#define AHCI_Q_NOBSYRES 0x100 +#define AHCI_Q_NOAA 0x200 +#define AHCI_Q_NOCOUNT 0x400 +#define AHCI_Q_ALTSIG 0x800 +#define AHCI_Q_NOMSI 0x1000 +#define AHCI_Q_ATI_PMP_BUG 0x2000 +#define AHCI_Q_MAXIO_64K 0x4000 +#define AHCI_Q_SATA1_UNIT0 0x8000 /* need better method for this */ + +#define AHCI_Q_BIT_STRING \ + "\020" \ + "\001NOFORCE" \ + "\002NOPMP" \ + "\003NONCQ" \ + "\0041CH" \ + "\0052CH" \ + "\0064CH" \ + "\007EDGEIS" \ + "\010SATA2" \ + "\011NOBSYRES" \ + "\012NOAA" \ + "\013NOCOUNT" \ + "\014ALTSIG" \ + "\015NOMSI" \ + "\016ATI_PMP_BUG" \ + "\017MAXIO_64K" \ + "\020SATA1_UNIT0" + +int ahci_attach(device_t dev); +int ahci_detach(device_t dev); +int ahci_setup_interrupt(device_t dev); +int ahci_print_child(device_t dev, device_t child); +struct resource *ahci_alloc_resource(device_t dev, device_t child, int type, int *rid, + u_long start, u_long end, u_long count, u_int flags); +int ahci_release_resource(device_t dev, device_t child, int type, int rid, + struct resource *r); +int ahci_setup_intr(device_t dev, device_t child, struct resource *irq, + int flags, driver_filter_t *filter, driver_intr_t *function, + void *argument, void **cookiep); +int ahci_teardown_intr(device_t dev, device_t child, struct resource *irq, + void *cookie); +int ahci_child_location_str(device_t dev, device_t child, char *buf, + size_t buflen); +bus_dma_tag_t ahci_get_dma_tag(device_t dev, device_t child); +int ahci_ctlr_reset(device_t dev); +int ahci_ctlr_setup(device_t dev); Copied and modified: head/sys/dev/ahci/ahci_pci.c (from r271145, head/sys/dev/ahci/ahci.c) ============================================================================== --- head/sys/dev/ahci/ahci.c Thu Sep 4 22:00:52 2014 (r271145, copy source) +++ head/sys/dev/ahci/ahci_pci.c Thu Sep 4 22:22:53 2014 (r271146) @@ -45,102 +45,24 @@ __FBSDID("$FreeBSD$"); #include #include "ahci.h" -#include -#include -#include -#include -#include - -/* local prototypes */ -static int ahci_setup_interrupt(device_t dev); -static void ahci_intr(void *data); -static void ahci_intr_one(void *data); -static void ahci_intr_one_edge(void *data); -static int ahci_suspend(device_t dev); -static int ahci_resume(device_t dev); -static int ahci_ch_init(device_t dev); -static int ahci_ch_deinit(device_t dev); -static int ahci_ch_suspend(device_t dev); -static int ahci_ch_resume(device_t dev); -static void ahci_ch_pm(void *arg); -static void ahci_ch_intr(void *arg); -static void ahci_ch_intr_direct(void *arg); -static void ahci_ch_intr_main(struct ahci_channel *ch, uint32_t istatus); -static int ahci_ctlr_reset(device_t dev); -static int ahci_ctlr_setup(device_t dev); -static void ahci_begin_transaction(device_t dev, union ccb *ccb); -static void ahci_dmasetprd(void *arg, bus_dma_segment_t *segs, int nsegs, int error); -static void ahci_execute_transaction(struct ahci_slot *slot); -static void ahci_timeout(struct ahci_slot *slot); -static void ahci_end_transaction(struct ahci_slot *slot, enum ahci_err_type et); -static int ahci_setup_fis(device_t dev, struct ahci_cmd_tab *ctp, union ccb *ccb, int tag); -static void ahci_dmainit(device_t dev); -static void ahci_dmasetupc_cb(void *xsc, bus_dma_segment_t *segs, int nsegs, int error); -static void ahci_dmafini(device_t dev); -static void ahci_slotsalloc(device_t dev); -static void ahci_slotsfree(device_t dev); -static void ahci_reset(device_t dev); -static void ahci_start(device_t dev, int fbs); -static void ahci_stop(device_t dev); -static void ahci_clo(device_t dev); -static void ahci_start_fr(device_t dev); -static void ahci_stop_fr(device_t dev); - -static int ahci_sata_connect(struct ahci_channel *ch); -static int ahci_sata_phy_reset(device_t dev); -static int ahci_wait_ready(device_t dev, int t, int t0); - -static void ahci_issue_recovery(device_t dev); -static void ahci_process_read_log(device_t dev, union ccb *ccb); -static void ahci_process_request_sense(device_t dev, union ccb *ccb); - -static void ahciaction(struct cam_sim *sim, union ccb *ccb); -static void ahcipoll(struct cam_sim *sim); - -static MALLOC_DEFINE(M_AHCI, "AHCI driver", "AHCI driver data buffers"); +static int force_ahci = 1; +TUNABLE_INT("hw.ahci.force", &force_ahci); static struct { uint32_t id; uint8_t rev; const char *name; int quirks; -#define AHCI_Q_NOFORCE 1 -#define AHCI_Q_NOPMP 2 -#define AHCI_Q_NONCQ 4 -#define AHCI_Q_1CH 8 -#define AHCI_Q_2CH 16 -#define AHCI_Q_4CH 32 -#define AHCI_Q_EDGEIS 64 -#define AHCI_Q_SATA2 128 -#define AHCI_Q_NOBSYRES 256 -#define AHCI_Q_NOAA 512 -#define AHCI_Q_NOCOUNT 1024 -#define AHCI_Q_ALTSIG 2048 -#define AHCI_Q_NOMSI 4096 - -#define AHCI_Q_BIT_STRING \ - "\020" \ - "\001NOFORCE" \ - "\002NOPMP" \ - "\003NONCQ" \ - "\0041CH" \ - "\0052CH" \ - "\0064CH" \ - "\007EDGEIS" \ - "\010SATA2" \ - "\011NOBSYRES" \ - "\012NOAA" \ - "\013NOCOUNT" \ - "\014ALTSIG" \ - "\015NOMSI" } ahci_ids[] = { - {0x43801002, 0x00, "AMD SB600", AHCI_Q_NOMSI}, - {0x43901002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0}, - {0x43911002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0}, - {0x43921002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0}, - {0x43931002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0}, - {0x43941002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0}, - {0x43951002, 0x00, "AMD SB8x0/SB9x0", 0}, + {0x43801002, 0x00, "AMD SB600", + AHCI_Q_NOMSI | AHCI_Q_ATI_PMP_BUG | AHCI_Q_MAXIO_64K}, + {0x43901002, 0x00, "AMD SB7x0/SB8x0/SB9x0", AHCI_Q_ATI_PMP_BUG}, + {0x43911002, 0x00, "AMD SB7x0/SB8x0/SB9x0", AHCI_Q_ATI_PMP_BUG}, + {0x43921002, 0x00, "AMD SB7x0/SB8x0/SB9x0", AHCI_Q_ATI_PMP_BUG}, + {0x43931002, 0x00, "AMD SB7x0/SB8x0/SB9x0", AHCI_Q_ATI_PMP_BUG}, + {0x43941002, 0x00, "AMD SB7x0/SB8x0/SB9x0", AHCI_Q_ATI_PMP_BUG}, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 23:50:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75141573; Thu, 4 Sep 2014 23:50:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 609C91822; Thu, 4 Sep 2014 23:50:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84No62w031155; Thu, 4 Sep 2014 23:50:06 GMT (envelope-from kargl@FreeBSD.org) Received: (from kargl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84No6dX030978; Thu, 4 Sep 2014 23:50:06 GMT (envelope-from kargl@FreeBSD.org) Message-Id: <201409042350.s84No6dX030978@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kargl set sender to kargl@FreeBSD.org using -f From: Steve Kargl Date: Thu, 4 Sep 2014 23:50:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271147 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 23:50:06 -0000 Author: kargl Date: Thu Sep 4 23:50:05 2014 New Revision: 271147 URL: http://svnweb.freebsd.org/changeset/base/271147 Log: Remove an initialized, but otherwise, unused variable. Modified: head/lib/msun/src/e_lgamma_r.c head/lib/msun/src/e_lgammaf_r.c Modified: head/lib/msun/src/e_lgamma_r.c ============================================================================== --- head/lib/msun/src/e_lgamma_r.c Thu Sep 4 22:22:53 2014 (r271146) +++ head/lib/msun/src/e_lgamma_r.c Thu Sep 4 23:50:05 2014 (r271147) @@ -90,7 +90,6 @@ static const volatile double vzero = 0; static const double zero= 0.00000000000000000000e+00, -two52= 4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */ half= 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */ one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ pi = 3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */ Modified: head/lib/msun/src/e_lgammaf_r.c ============================================================================== --- head/lib/msun/src/e_lgammaf_r.c Thu Sep 4 22:22:53 2014 (r271146) +++ head/lib/msun/src/e_lgammaf_r.c Thu Sep 4 23:50:05 2014 (r271147) @@ -23,7 +23,6 @@ static const volatile float vzero = 0; static const float zero= 0.0000000000e+00, -two23= 8.3886080000e+06, /* 0x4b000000 */ half= 5.0000000000e-01, /* 0x3f000000 */ one = 1.0000000000e+00, /* 0x3f800000 */ pi = 3.1415927410e+00, /* 0x40490fdb */ From owner-svn-src-all@FreeBSD.ORG Thu Sep 4 23:53:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 730797AB; Thu, 4 Sep 2014 23:53:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E8C918BB; Thu, 4 Sep 2014 23:53:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s84Nrq3Y034958; Thu, 4 Sep 2014 23:53:52 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s84NrpSW034955; Thu, 4 Sep 2014 23:53:51 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201409042353.s84NrpSW034955@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Thu, 4 Sep 2014 23:53:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271148 - head/sys/geom/eli X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Sep 2014 23:53:52 -0000 Author: jmg Date: Thu Sep 4 23:53:51 2014 New Revision: 271148 URL: http://svnweb.freebsd.org/changeset/base/271148 Log: use a straight buffer instead of an iov w/ 1 segment... The aesni driver when it hits a mbuf/iov buffer, it mallocs and copies the data for processing.. This improves perf by ~8-10% on my machine... I have thoughts of fixing AES-NI so that it can better handle segmented buffers, which should help improve IPSEC performance, but that is for the future... Modified: head/sys/geom/eli/g_eli_crypto.c head/sys/geom/eli/g_eli_integrity.c head/sys/geom/eli/g_eli_privacy.c Modified: head/sys/geom/eli/g_eli_crypto.c ============================================================================== --- head/sys/geom/eli/g_eli_crypto.c Thu Sep 4 23:50:05 2014 (r271147) +++ head/sys/geom/eli/g_eli_crypto.c Thu Sep 4 23:53:51 2014 (r271148) @@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #else #include #include @@ -63,8 +62,6 @@ g_eli_crypto_cipher(u_int algo, int enc, struct cryptoini cri; struct cryptop *crp; struct cryptodesc *crd; - struct uio *uio; - struct iovec *iov; uint64_t sid; u_char *p; int error; @@ -79,24 +76,13 @@ g_eli_crypto_cipher(u_int algo, int enc, error = crypto_newsession(&sid, &cri, CRYPTOCAP_F_SOFTWARE); if (error != 0) return (error); - p = malloc(sizeof(*crp) + sizeof(*crd) + sizeof(*uio) + sizeof(*iov), - M_ELI, M_NOWAIT | M_ZERO); + p = malloc(sizeof(*crp) + sizeof(*crd), M_ELI, M_NOWAIT | M_ZERO); if (p == NULL) { crypto_freesession(sid); return (ENOMEM); } crp = (struct cryptop *)p; p += sizeof(*crp); crd = (struct cryptodesc *)p; p += sizeof(*crd); - uio = (struct uio *)p; p += sizeof(*uio); - iov = (struct iovec *)p; p += sizeof(*iov); - - iov->iov_len = datasize; - iov->iov_base = data; - - uio->uio_iov = iov; - uio->uio_iovcnt = 1; - uio->uio_segflg = UIO_SYSSPACE; - uio->uio_resid = datasize; crd->crd_skip = 0; crd->crd_len = datasize; @@ -114,8 +100,8 @@ g_eli_crypto_cipher(u_int algo, int enc, crp->crp_olen = datasize; crp->crp_opaque = NULL; crp->crp_callback = g_eli_crypto_done; - crp->crp_buf = (void *)uio; - crp->crp_flags = CRYPTO_F_IOV | CRYPTO_F_CBIFSYNC | CRYPTO_F_REL; + crp->crp_buf = (void *)data; + crp->crp_flags = CRYPTO_F_CBIFSYNC | CRYPTO_F_REL; crp->crp_desc = crd; error = crypto_dispatch(crp); Modified: head/sys/geom/eli/g_eli_integrity.c ============================================================================== --- head/sys/geom/eli/g_eli_integrity.c Thu Sep 4 23:50:05 2014 (r271147) +++ head/sys/geom/eli/g_eli_integrity.c Thu Sep 4 23:53:51 2014 (r271148) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -363,8 +362,6 @@ g_eli_auth_read(struct g_eli_softc *sc, size += sizeof(struct cryptop) * nsec; size += sizeof(struct cryptodesc) * nsec * 2; size += G_ELI_AUTH_SECKEYLEN * nsec; - size += sizeof(struct uio) * nsec; - size += sizeof(struct iovec) * nsec; cbp->bio_offset = (bp->bio_offset / bp->bio_to->sectorsize) * sc->sc_bytes_per_sector; bp->bio_driver2 = malloc(size, M_ELI, M_WAITOK); cbp->bio_data = bp->bio_driver2; @@ -409,8 +406,6 @@ g_eli_auth_run(struct g_eli_worker *wr, struct g_eli_softc *sc; struct cryptop *crp; struct cryptodesc *crde, *crda; - struct uio *uio; - struct iovec *iov; u_int i, lsec, nsec, data_secsize, decr_secsize, encr_secsize; off_t dstoff; int err, error; @@ -449,8 +444,6 @@ g_eli_auth_run(struct g_eli_worker *wr, size += sizeof(*crde) * nsec; size += sizeof(*crda) * nsec; size += G_ELI_AUTH_SECKEYLEN * nsec; - size += sizeof(*uio) * nsec; - size += sizeof(*iov) * nsec; data = malloc(size, M_ELI, M_WAITOK); bp->bio_driver2 = data; p = data + encr_secsize * nsec; @@ -464,8 +457,6 @@ g_eli_auth_run(struct g_eli_worker *wr, crde = (struct cryptodesc *)p; p += sizeof(*crde); crda = (struct cryptodesc *)p; p += sizeof(*crda); authkey = (u_char *)p; p += G_ELI_AUTH_SECKEYLEN; - uio = (struct uio *)p; p += sizeof(*uio); - iov = (struct iovec *)p; p += sizeof(*iov); data_secsize = sc->sc_data_per_sector; if ((i % lsec) == 0) @@ -482,21 +473,13 @@ g_eli_auth_run(struct g_eli_worker *wr, plaindata += data_secsize; } - iov->iov_len = sc->sc_alen + data_secsize; - iov->iov_base = data; - data += encr_secsize; - - uio->uio_iov = iov; - uio->uio_iovcnt = 1; - uio->uio_segflg = UIO_SYSSPACE; - uio->uio_resid = iov->iov_len; - crp->crp_sid = wr->w_sid; - crp->crp_ilen = uio->uio_resid; + crp->crp_ilen = sc->sc_alen + data_secsize; crp->crp_olen = data_secsize; crp->crp_opaque = (void *)bp; - crp->crp_buf = (void *)uio; - crp->crp_flags = CRYPTO_F_IOV | CRYPTO_F_CBIFSYNC | CRYPTO_F_REL; + crp->crp_buf = (void *)data; + data += encr_secsize; + crp->crp_flags = CRYPTO_F_CBIFSYNC | CRYPTO_F_REL; if (g_eli_batch) crp->crp_flags |= CRYPTO_F_BATCH; if (bp->bio_cmd == BIO_WRITE) { Modified: head/sys/geom/eli/g_eli_privacy.c ============================================================================== --- head/sys/geom/eli/g_eli_privacy.c Thu Sep 4 23:50:05 2014 (r271147) +++ head/sys/geom/eli/g_eli_privacy.c Thu Sep 4 23:53:51 2014 (r271148) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -230,8 +229,6 @@ g_eli_crypto_run(struct g_eli_worker *wr struct g_eli_softc *sc; struct cryptop *crp; struct cryptodesc *crd; - struct uio *uio; - struct iovec *iov; u_int i, nsec, secsize; int err, error; off_t dstoff; @@ -254,8 +251,6 @@ g_eli_crypto_run(struct g_eli_worker *wr */ size = sizeof(*crp) * nsec; size += sizeof(*crd) * nsec; - size += sizeof(*uio) * nsec; - size += sizeof(*iov) * nsec; /* * If we write the data we cannot destroy current bio_data content, * so we need to allocate more memory for encrypted data. @@ -280,28 +275,18 @@ g_eli_crypto_run(struct g_eli_worker *wr for (i = 0, dstoff = bp->bio_offset; i < nsec; i++, dstoff += secsize) { crp = (struct cryptop *)p; p += sizeof(*crp); crd = (struct cryptodesc *)p; p += sizeof(*crd); - uio = (struct uio *)p; p += sizeof(*uio); - iov = (struct iovec *)p; p += sizeof(*iov); - - iov->iov_len = secsize; - iov->iov_base = data; - data += secsize; - - uio->uio_iov = iov; - uio->uio_iovcnt = 1; - uio->uio_segflg = UIO_SYSSPACE; - uio->uio_resid = secsize; crp->crp_sid = wr->w_sid; crp->crp_ilen = secsize; crp->crp_olen = secsize; crp->crp_opaque = (void *)bp; - crp->crp_buf = (void *)uio; + crp->crp_buf = (void *)data; + data += secsize; if (bp->bio_cmd == BIO_WRITE) crp->crp_callback = g_eli_crypto_write_done; else /* if (bp->bio_cmd == BIO_READ) */ crp->crp_callback = g_eli_crypto_read_done; - crp->crp_flags = CRYPTO_F_IOV | CRYPTO_F_CBIFSYNC | CRYPTO_F_REL; + crp->crp_flags = CRYPTO_F_CBIFSYNC | CRYPTO_F_REL; if (g_eli_batch) crp->crp_flags |= CRYPTO_F_BATCH; crp->crp_desc = crd; From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 01:06:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2662552; Fri, 5 Sep 2014 01:06:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C354E1EDB; Fri, 5 Sep 2014 01:06:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8516j53069292; Fri, 5 Sep 2014 01:06:45 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8516jBR069290; Fri, 5 Sep 2014 01:06:45 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201409050106.s8516jBR069290@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 5 Sep 2014 01:06:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271149 - in head/sys: amd64/amd64 i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 01:06:46 -0000 Author: pfg Date: Fri Sep 5 01:06:45 2014 New Revision: 271149 URL: http://svnweb.freebsd.org/changeset/base/271149 Log: Apply known workarounds for modern MacBooks. The legacy USB circuit tends to give trouble on MacBook. While the original report covered MacBook, extend the fix preemptively for the newer MacBookPro too. PR: 191693 Reviewed by: emaste MFC after: 5 days Modified: head/sys/amd64/amd64/machdep.c head/sys/i386/i386/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Thu Sep 4 23:53:51 2014 (r271148) +++ head/sys/amd64/amd64/machdep.c Fri Sep 5 01:06:45 2014 (r271149) @@ -250,9 +250,11 @@ cpu_startup(dummy) if (sysenv != NULL) { if (strncmp(sysenv, "MacBook1,1", 10) == 0 || strncmp(sysenv, "MacBook3,1", 10) == 0 || + strncmp(sysenv, "MacBook4,1", 10) == 0 || strncmp(sysenv, "MacBookPro1,1", 13) == 0 || strncmp(sysenv, "MacBookPro1,2", 13) == 0 || strncmp(sysenv, "MacBookPro3,1", 13) == 0 || + strncmp(sysenv, "MacBookPro4,1", 13) == 0 || strncmp(sysenv, "Macmini1,1", 10) == 0) { if (bootverbose) printf("Disabling LEGACY_USB_EN bit on " Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Thu Sep 4 23:53:51 2014 (r271148) +++ head/sys/i386/i386/machdep.c Fri Sep 5 01:06:45 2014 (r271149) @@ -273,9 +273,11 @@ cpu_startup(dummy) if (sysenv != NULL) { if (strncmp(sysenv, "MacBook1,1", 10) == 0 || strncmp(sysenv, "MacBook3,1", 10) == 0 || + strncmp(sysenv, "MacBook4,1", 10) == 0 || strncmp(sysenv, "MacBookPro1,1", 13) == 0 || strncmp(sysenv, "MacBookPro1,2", 13) == 0 || strncmp(sysenv, "MacBookPro3,1", 13) == 0 || + strncmp(sysenv, "MacBookPro4,1", 13) == 0 || strncmp(sysenv, "Macmini1,1", 10) == 0) { if (bootverbose) printf("Disabling LEGACY_USB_EN bit on " From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 02:20:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2EA3125C; Fri, 5 Sep 2014 02:20:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 199BD1756; Fri, 5 Sep 2014 02:20:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s852K7Fp002462; Fri, 5 Sep 2014 02:20:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s852K6wU002459; Fri, 5 Sep 2014 02:20:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201409050220.s852K6wU002459@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 5 Sep 2014 02:20:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r271150 - vendor/device-tree/dist/src/arm X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 02:20:07 -0000 Author: imp Date: Fri Sep 5 02:20:06 2014 New Revision: 271150 URL: http://svnweb.freebsd.org/changeset/base/271150 Log: Bring in forgotten pinfunc.h files from last import. Added: vendor/device-tree/dist/src/arm/imx51-pinfunc.h - copied unchanged from r271109, vendor/device-tree/ianc-b78b6b80/src/arm/imx51-pinfunc.h vendor/device-tree/dist/src/arm/imx53-pinfunc.h - copied unchanged from r271109, vendor/device-tree/ianc-b78b6b80/src/arm/imx53-pinfunc.h vendor/device-tree/dist/src/arm/imx6dl-pinfunc.h - copied unchanged from r271109, vendor/device-tree/ianc-b78b6b80/src/arm/imx6dl-pinfunc.h vendor/device-tree/dist/src/arm/imx6q-pinfunc.h - copied unchanged from r271109, vendor/device-tree/ianc-b78b6b80/src/arm/imx6q-pinfunc.h vendor/device-tree/dist/src/arm/imx6sl-pinfunc.h - copied unchanged from r271109, vendor/device-tree/ianc-b78b6b80/src/arm/imx6sl-pinfunc.h Copied: vendor/device-tree/dist/src/arm/imx51-pinfunc.h (from r271109, vendor/device-tree/ianc-b78b6b80/src/arm/imx51-pinfunc.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/src/arm/imx51-pinfunc.h Fri Sep 5 02:20:06 2014 (r271150, copy of r271109, vendor/device-tree/ianc-b78b6b80/src/arm/imx51-pinfunc.h) @@ -0,0 +1,773 @@ +/* + * Copyright 2013 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#ifndef __DTS_IMX51_PINFUNC_H +#define __DTS_IMX51_PINFUNC_H + +/* + * The pin function ID is a tuple of + * + */ +#define MX51_PAD_EIM_D16__AUD4_RXFS 0x05c 0x3f0 0x000 0x5 0x0 +#define MX51_PAD_EIM_D16__AUD5_TXD 0x05c 0x3f0 0x8d8 0x7 0x0 +#define MX51_PAD_EIM_D16__EIM_D16 0x05c 0x3f0 0x000 0x0 0x0 +#define MX51_PAD_EIM_D16__GPIO2_0 0x05c 0x3f0 0x000 0x1 0x0 +#define MX51_PAD_EIM_D16__I2C1_SDA 0x05c 0x3f0 0x9b4 0x4 0x0 +#define MX51_PAD_EIM_D16__UART2_CTS 0x05c 0x3f0 0x000 0x3 0x0 +#define MX51_PAD_EIM_D16__USBH2_DATA0 0x05c 0x3f0 0x000 0x2 0x0 +#define MX51_PAD_EIM_D17__AUD5_RXD 0x060 0x3f4 0x8d4 0x7 0x0 +#define MX51_PAD_EIM_D17__EIM_D17 0x060 0x3f4 0x000 0x0 0x0 +#define MX51_PAD_EIM_D17__GPIO2_1 0x060 0x3f4 0x000 0x1 0x0 +#define MX51_PAD_EIM_D17__UART2_RXD 0x060 0x3f4 0x9ec 0x3 0x0 +#define MX51_PAD_EIM_D17__UART3_CTS 0x060 0x3f4 0x000 0x4 0x0 +#define MX51_PAD_EIM_D17__USBH2_DATA1 0x060 0x3f4 0x000 0x2 0x0 +#define MX51_PAD_EIM_D18__AUD5_TXC 0x064 0x3f8 0x8e4 0x7 0x0 +#define MX51_PAD_EIM_D18__EIM_D18 0x064 0x3f8 0x000 0x0 0x0 +#define MX51_PAD_EIM_D18__GPIO2_2 0x064 0x3f8 0x000 0x1 0x0 +#define MX51_PAD_EIM_D18__UART2_TXD 0x064 0x3f8 0x000 0x3 0x0 +#define MX51_PAD_EIM_D18__UART3_RTS 0x064 0x3f8 0x9f0 0x4 0x1 +#define MX51_PAD_EIM_D18__USBH2_DATA2 0x064 0x3f8 0x000 0x2 0x0 +#define MX51_PAD_EIM_D19__AUD4_RXC 0x068 0x3fc 0x000 0x5 0x0 +#define MX51_PAD_EIM_D19__AUD5_TXFS 0x068 0x3fc 0x8e8 0x7 0x0 +#define MX51_PAD_EIM_D19__EIM_D19 0x068 0x3fc 0x000 0x0 0x0 +#define MX51_PAD_EIM_D19__GPIO2_3 0x068 0x3fc 0x000 0x1 0x0 +#define MX51_PAD_EIM_D19__I2C1_SCL 0x068 0x3fc 0x9b0 0x4 0x0 +#define MX51_PAD_EIM_D19__UART2_RTS 0x068 0x3fc 0x9e8 0x3 0x1 +#define MX51_PAD_EIM_D19__USBH2_DATA3 0x068 0x3fc 0x000 0x2 0x0 +#define MX51_PAD_EIM_D20__AUD4_TXD 0x06c 0x400 0x8c8 0x5 0x0 +#define MX51_PAD_EIM_D20__EIM_D20 0x06c 0x400 0x000 0x0 0x0 +#define MX51_PAD_EIM_D20__GPIO2_4 0x06c 0x400 0x000 0x1 0x0 +#define MX51_PAD_EIM_D20__SRTC_ALARM_DEB 0x06c 0x400 0x000 0x4 0x0 +#define MX51_PAD_EIM_D20__USBH2_DATA4 0x06c 0x400 0x000 0x2 0x0 +#define MX51_PAD_EIM_D21__AUD4_RXD 0x070 0x404 0x8c4 0x5 0x0 +#define MX51_PAD_EIM_D21__EIM_D21 0x070 0x404 0x000 0x0 0x0 +#define MX51_PAD_EIM_D21__GPIO2_5 0x070 0x404 0x000 0x1 0x0 +#define MX51_PAD_EIM_D21__SRTC_ALARM_DEB 0x070 0x404 0x000 0x3 0x0 +#define MX51_PAD_EIM_D21__USBH2_DATA5 0x070 0x404 0x000 0x2 0x0 +#define MX51_PAD_EIM_D22__AUD4_TXC 0x074 0x408 0x8cc 0x5 0x0 +#define MX51_PAD_EIM_D22__EIM_D22 0x074 0x408 0x000 0x0 0x0 +#define MX51_PAD_EIM_D22__GPIO2_6 0x074 0x408 0x000 0x1 0x0 +#define MX51_PAD_EIM_D22__USBH2_DATA6 0x074 0x408 0x000 0x2 0x0 +#define MX51_PAD_EIM_D23__AUD4_TXFS 0x078 0x40c 0x8d0 0x5 0x0 +#define MX51_PAD_EIM_D23__EIM_D23 0x078 0x40c 0x000 0x0 0x0 +#define MX51_PAD_EIM_D23__GPIO2_7 0x078 0x40c 0x000 0x1 0x0 +#define MX51_PAD_EIM_D23__SPDIF_OUT1 0x078 0x40c 0x000 0x4 0x0 +#define MX51_PAD_EIM_D23__USBH2_DATA7 0x078 0x40c 0x000 0x2 0x0 +#define MX51_PAD_EIM_D24__AUD6_RXFS 0x07c 0x410 0x8f8 0x5 0x0 +#define MX51_PAD_EIM_D24__EIM_D24 0x07c 0x410 0x000 0x0 0x0 +#define MX51_PAD_EIM_D24__GPIO2_8 0x07c 0x410 0x000 0x1 0x0 +#define MX51_PAD_EIM_D24__I2C2_SDA 0x07c 0x410 0x9bc 0x4 0x0 +#define MX51_PAD_EIM_D24__UART3_CTS 0x07c 0x410 0x000 0x3 0x0 +#define MX51_PAD_EIM_D24__USBOTG_DATA0 0x07c 0x410 0x000 0x2 0x0 +#define MX51_PAD_EIM_D25__EIM_D25 0x080 0x414 0x000 0x0 0x0 +#define MX51_PAD_EIM_D25__KEY_COL6 0x080 0x414 0x9c8 0x1 0x0 +#define MX51_PAD_EIM_D25__UART2_CTS 0x080 0x414 0x000 0x4 0x0 +#define MX51_PAD_EIM_D25__UART3_RXD 0x080 0x414 0x9f4 0x3 0x0 +#define MX51_PAD_EIM_D25__USBOTG_DATA1 0x080 0x414 0x000 0x2 0x0 +#define MX51_PAD_EIM_D26__EIM_D26 0x084 0x418 0x000 0x0 0x0 +#define MX51_PAD_EIM_D26__KEY_COL7 0x084 0x418 0x9cc 0x1 0x0 +#define MX51_PAD_EIM_D26__UART2_RTS 0x084 0x418 0x9e8 0x4 0x3 +#define MX51_PAD_EIM_D26__UART3_TXD 0x084 0x418 0x000 0x3 0x0 +#define MX51_PAD_EIM_D26__USBOTG_DATA2 0x084 0x418 0x000 0x2 0x0 +#define MX51_PAD_EIM_D27__AUD6_RXC 0x088 0x41c 0x8f4 0x5 0x0 +#define MX51_PAD_EIM_D27__EIM_D27 0x088 0x41c 0x000 0x0 0x0 +#define MX51_PAD_EIM_D27__GPIO2_9 0x088 0x41c 0x000 0x1 0x0 +#define MX51_PAD_EIM_D27__I2C2_SCL 0x088 0x41c 0x9b8 0x4 0x0 +#define MX51_PAD_EIM_D27__UART3_RTS 0x088 0x41c 0x9f0 0x3 0x3 +#define MX51_PAD_EIM_D27__USBOTG_DATA3 0x088 0x41c 0x000 0x2 0x0 +#define MX51_PAD_EIM_D28__AUD6_TXD 0x08c 0x420 0x8f0 0x5 0x0 +#define MX51_PAD_EIM_D28__EIM_D28 0x08c 0x420 0x000 0x0 0x0 +#define MX51_PAD_EIM_D28__KEY_ROW4 0x08c 0x420 0x9d0 0x1 0x0 +#define MX51_PAD_EIM_D28__USBOTG_DATA4 0x08c 0x420 0x000 0x2 0x0 +#define MX51_PAD_EIM_D29__AUD6_RXD 0x090 0x424 0x8ec 0x5 0x0 +#define MX51_PAD_EIM_D29__EIM_D29 0x090 0x424 0x000 0x0 0x0 +#define MX51_PAD_EIM_D29__KEY_ROW5 0x090 0x424 0x9d4 0x1 0x0 +#define MX51_PAD_EIM_D29__USBOTG_DATA5 0x090 0x424 0x000 0x2 0x0 +#define MX51_PAD_EIM_D30__AUD6_TXC 0x094 0x428 0x8fc 0x5 0x0 +#define MX51_PAD_EIM_D30__EIM_D30 0x094 0x428 0x000 0x0 0x0 +#define MX51_PAD_EIM_D30__KEY_ROW6 0x094 0x428 0x9d8 0x1 0x0 +#define MX51_PAD_EIM_D30__USBOTG_DATA6 0x094 0x428 0x000 0x2 0x0 +#define MX51_PAD_EIM_D31__AUD6_TXFS 0x098 0x42c 0x900 0x5 0x0 +#define MX51_PAD_EIM_D31__EIM_D31 0x098 0x42c 0x000 0x0 0x0 +#define MX51_PAD_EIM_D31__KEY_ROW7 0x098 0x42c 0x9dc 0x1 0x0 +#define MX51_PAD_EIM_D31__USBOTG_DATA7 0x098 0x42c 0x000 0x2 0x0 +#define MX51_PAD_EIM_A16__EIM_A16 0x09c 0x430 0x000 0x0 0x0 +#define MX51_PAD_EIM_A16__GPIO2_10 0x09c 0x430 0x000 0x1 0x0 +#define MX51_PAD_EIM_A16__OSC_FREQ_SEL0 0x09c 0x430 0x000 0x7 0x0 +#define MX51_PAD_EIM_A17__EIM_A17 0x0a0 0x434 0x000 0x0 0x0 +#define MX51_PAD_EIM_A17__GPIO2_11 0x0a0 0x434 0x000 0x1 0x0 +#define MX51_PAD_EIM_A17__OSC_FREQ_SEL1 0x0a0 0x434 0x000 0x7 0x0 +#define MX51_PAD_EIM_A18__BOOT_LPB0 0x0a4 0x438 0x000 0x7 0x0 +#define MX51_PAD_EIM_A18__EIM_A18 0x0a4 0x438 0x000 0x0 0x0 +#define MX51_PAD_EIM_A18__GPIO2_12 0x0a4 0x438 0x000 0x1 0x0 +#define MX51_PAD_EIM_A19__BOOT_LPB1 0x0a8 0x43c 0x000 0x7 0x0 +#define MX51_PAD_EIM_A19__EIM_A19 0x0a8 0x43c 0x000 0x0 0x0 +#define MX51_PAD_EIM_A19__GPIO2_13 0x0a8 0x43c 0x000 0x1 0x0 +#define MX51_PAD_EIM_A20__BOOT_UART_SRC0 0x0ac 0x440 0x000 0x7 0x0 +#define MX51_PAD_EIM_A20__EIM_A20 0x0ac 0x440 0x000 0x0 0x0 +#define MX51_PAD_EIM_A20__GPIO2_14 0x0ac 0x440 0x000 0x1 0x0 +#define MX51_PAD_EIM_A21__BOOT_UART_SRC1 0x0b0 0x444 0x000 0x7 0x0 +#define MX51_PAD_EIM_A21__EIM_A21 0x0b0 0x444 0x000 0x0 0x0 +#define MX51_PAD_EIM_A21__GPIO2_15 0x0b0 0x444 0x000 0x1 0x0 +#define MX51_PAD_EIM_A22__EIM_A22 0x0b4 0x448 0x000 0x0 0x0 +#define MX51_PAD_EIM_A22__GPIO2_16 0x0b4 0x448 0x000 0x1 0x0 +#define MX51_PAD_EIM_A23__BOOT_HPN_EN 0x0b8 0x44c 0x000 0x7 0x0 +#define MX51_PAD_EIM_A23__EIM_A23 0x0b8 0x44c 0x000 0x0 0x0 +#define MX51_PAD_EIM_A23__GPIO2_17 0x0b8 0x44c 0x000 0x1 0x0 +#define MX51_PAD_EIM_A24__EIM_A24 0x0bc 0x450 0x000 0x0 0x0 +#define MX51_PAD_EIM_A24__GPIO2_18 0x0bc 0x450 0x000 0x1 0x0 +#define MX51_PAD_EIM_A24__USBH2_CLK 0x0bc 0x450 0x000 0x2 0x0 +#define MX51_PAD_EIM_A25__DISP1_PIN4 0x0c0 0x454 0x000 0x6 0x0 +#define MX51_PAD_EIM_A25__EIM_A25 0x0c0 0x454 0x000 0x0 0x0 +#define MX51_PAD_EIM_A25__GPIO2_19 0x0c0 0x454 0x000 0x1 0x0 +#define MX51_PAD_EIM_A25__USBH2_DIR 0x0c0 0x454 0x000 0x2 0x0 +#define MX51_PAD_EIM_A26__CSI1_DATA_EN 0x0c4 0x458 0x9a0 0x5 0x0 +#define MX51_PAD_EIM_A26__DISP2_EXT_CLK 0x0c4 0x458 0x908 0x6 0x0 +#define MX51_PAD_EIM_A26__EIM_A26 0x0c4 0x458 0x000 0x0 0x0 +#define MX51_PAD_EIM_A26__GPIO2_20 0x0c4 0x458 0x000 0x1 0x0 +#define MX51_PAD_EIM_A26__USBH2_STP 0x0c4 0x458 0x000 0x2 0x0 +#define MX51_PAD_EIM_A27__CSI2_DATA_EN 0x0c8 0x45c 0x99c 0x5 0x0 +#define MX51_PAD_EIM_A27__DISP1_PIN1 0x0c8 0x45c 0x9a4 0x6 0x0 +#define MX51_PAD_EIM_A27__EIM_A27 0x0c8 0x45c 0x000 0x0 0x0 +#define MX51_PAD_EIM_A27__GPIO2_21 0x0c8 0x45c 0x000 0x1 0x0 +#define MX51_PAD_EIM_A27__USBH2_NXT 0x0c8 0x45c 0x000 0x2 0x0 +#define MX51_PAD_EIM_EB0__EIM_EB0 0x0cc 0x460 0x000 0x0 0x0 +#define MX51_PAD_EIM_EB1__EIM_EB1 0x0d0 0x464 0x000 0x0 0x0 +#define MX51_PAD_EIM_EB2__AUD5_RXFS 0x0d4 0x468 0x8e0 0x6 0x0 +#define MX51_PAD_EIM_EB2__CSI1_D2 0x0d4 0x468 0x000 0x5 0x0 +#define MX51_PAD_EIM_EB2__EIM_EB2 0x0d4 0x468 0x000 0x0 0x0 +#define MX51_PAD_EIM_EB2__FEC_MDIO 0x0d4 0x468 0x954 0x3 0x0 +#define MX51_PAD_EIM_EB2__GPIO2_22 0x0d4 0x468 0x000 0x1 0x0 +#define MX51_PAD_EIM_EB2__GPT_CMPOUT1 0x0d4 0x468 0x000 0x7 0x0 +#define MX51_PAD_EIM_EB3__AUD5_RXC 0x0d8 0x46c 0x8dc 0x6 0x0 +#define MX51_PAD_EIM_EB3__CSI1_D3 0x0d8 0x46c 0x000 0x5 0x0 +#define MX51_PAD_EIM_EB3__EIM_EB3 0x0d8 0x46c 0x000 0x0 0x0 +#define MX51_PAD_EIM_EB3__FEC_RDATA1 0x0d8 0x46c 0x95c 0x3 0x0 +#define MX51_PAD_EIM_EB3__GPIO2_23 0x0d8 0x46c 0x000 0x1 0x0 +#define MX51_PAD_EIM_EB3__GPT_CMPOUT2 0x0d8 0x46c 0x000 0x7 0x0 +#define MX51_PAD_EIM_OE__EIM_OE 0x0dc 0x470 0x000 0x0 0x0 +#define MX51_PAD_EIM_OE__GPIO2_24 0x0dc 0x470 0x000 0x1 0x0 +#define MX51_PAD_EIM_CS0__EIM_CS0 0x0e0 0x474 0x000 0x0 0x0 +#define MX51_PAD_EIM_CS0__GPIO2_25 0x0e0 0x474 0x000 0x1 0x0 +#define MX51_PAD_EIM_CS1__EIM_CS1 0x0e4 0x478 0x000 0x0 0x0 +#define MX51_PAD_EIM_CS1__GPIO2_26 0x0e4 0x478 0x000 0x1 0x0 +#define MX51_PAD_EIM_CS2__AUD5_TXD 0x0e8 0x47c 0x8d8 0x6 0x1 +#define MX51_PAD_EIM_CS2__CSI1_D4 0x0e8 0x47c 0x000 0x5 0x0 +#define MX51_PAD_EIM_CS2__EIM_CS2 0x0e8 0x47c 0x000 0x0 0x0 +#define MX51_PAD_EIM_CS2__FEC_RDATA2 0x0e8 0x47c 0x960 0x3 0x0 +#define MX51_PAD_EIM_CS2__GPIO2_27 0x0e8 0x47c 0x000 0x1 0x0 +#define MX51_PAD_EIM_CS2__USBOTG_STP 0x0e8 0x47c 0x000 0x2 0x0 +#define MX51_PAD_EIM_CS3__AUD5_RXD 0x0ec 0x480 0x8d4 0x6 0x1 +#define MX51_PAD_EIM_CS3__CSI1_D5 0x0ec 0x480 0x000 0x5 0x0 +#define MX51_PAD_EIM_CS3__EIM_CS3 0x0ec 0x480 0x000 0x0 0x0 +#define MX51_PAD_EIM_CS3__FEC_RDATA3 0x0ec 0x480 0x964 0x3 0x0 +#define MX51_PAD_EIM_CS3__GPIO2_28 0x0ec 0x480 0x000 0x1 0x0 +#define MX51_PAD_EIM_CS3__USBOTG_NXT 0x0ec 0x480 0x000 0x2 0x0 +#define MX51_PAD_EIM_CS4__AUD5_TXC 0x0f0 0x484 0x8e4 0x6 0x1 +#define MX51_PAD_EIM_CS4__CSI1_D6 0x0f0 0x484 0x000 0x5 0x0 +#define MX51_PAD_EIM_CS4__EIM_CS4 0x0f0 0x484 0x000 0x0 0x0 +#define MX51_PAD_EIM_CS4__FEC_RX_ER 0x0f0 0x484 0x970 0x3 0x0 +#define MX51_PAD_EIM_CS4__GPIO2_29 0x0f0 0x484 0x000 0x1 0x0 +#define MX51_PAD_EIM_CS4__USBOTG_CLK 0x0f0 0x484 0x000 0x2 0x0 +#define MX51_PAD_EIM_CS5__AUD5_TXFS 0x0f4 0x488 0x8e8 0x6 0x1 +#define MX51_PAD_EIM_CS5__CSI1_D7 0x0f4 0x488 0x000 0x5 0x0 +#define MX51_PAD_EIM_CS5__DISP1_EXT_CLK 0x0f4 0x488 0x904 0x4 0x0 +#define MX51_PAD_EIM_CS5__EIM_CS5 0x0f4 0x488 0x000 0x0 0x0 +#define MX51_PAD_EIM_CS5__FEC_CRS 0x0f4 0x488 0x950 0x3 0x0 +#define MX51_PAD_EIM_CS5__GPIO2_30 0x0f4 0x488 0x000 0x1 0x0 +#define MX51_PAD_EIM_CS5__USBOTG_DIR 0x0f4 0x488 0x000 0x2 0x0 +#define MX51_PAD_EIM_DTACK__EIM_DTACK 0x0f8 0x48c 0x000 0x0 0x0 +#define MX51_PAD_EIM_DTACK__GPIO2_31 0x0f8 0x48c 0x000 0x1 0x0 +#define MX51_PAD_EIM_LBA__EIM_LBA 0x0fc 0x494 0x000 0x0 0x0 +#define MX51_PAD_EIM_LBA__GPIO3_1 0x0fc 0x494 0x978 0x1 0x0 +#define MX51_PAD_EIM_CRE__EIM_CRE 0x100 0x4a0 0x000 0x0 0x0 +#define MX51_PAD_EIM_CRE__GPIO3_2 0x100 0x4a0 0x97c 0x1 0x0 +#define MX51_PAD_DRAM_CS1__DRAM_CS1 0x104 0x4d0 0x000 0x0 0x0 +#define MX51_PAD_NANDF_WE_B__GPIO3_3 0x108 0x4e4 0x980 0x3 0x0 +#define MX51_PAD_NANDF_WE_B__NANDF_WE_B 0x108 0x4e4 0x000 0x0 0x0 +#define MX51_PAD_NANDF_WE_B__PATA_DIOW 0x108 0x4e4 0x000 0x1 0x0 +#define MX51_PAD_NANDF_WE_B__SD3_DATA0 0x108 0x4e4 0x93c 0x2 0x0 +#define MX51_PAD_NANDF_RE_B__GPIO3_4 0x10c 0x4e8 0x984 0x3 0x0 +#define MX51_PAD_NANDF_RE_B__NANDF_RE_B 0x10c 0x4e8 0x000 0x0 0x0 +#define MX51_PAD_NANDF_RE_B__PATA_DIOR 0x10c 0x4e8 0x000 0x1 0x0 +#define MX51_PAD_NANDF_RE_B__SD3_DATA1 0x10c 0x4e8 0x940 0x2 0x0 +#define MX51_PAD_NANDF_ALE__GPIO3_5 0x110 0x4ec 0x988 0x3 0x0 +#define MX51_PAD_NANDF_ALE__NANDF_ALE 0x110 0x4ec 0x000 0x0 0x0 +#define MX51_PAD_NANDF_ALE__PATA_BUFFER_EN 0x110 0x4ec 0x000 0x1 0x0 +#define MX51_PAD_NANDF_CLE__GPIO3_6 0x114 0x4f0 0x98c 0x3 0x0 +#define MX51_PAD_NANDF_CLE__NANDF_CLE 0x114 0x4f0 0x000 0x0 0x0 +#define MX51_PAD_NANDF_CLE__PATA_RESET_B 0x114 0x4f0 0x000 0x1 0x0 +#define MX51_PAD_NANDF_WP_B__GPIO3_7 0x118 0x4f4 0x990 0x3 0x0 +#define MX51_PAD_NANDF_WP_B__NANDF_WP_B 0x118 0x4f4 0x000 0x0 0x0 +#define MX51_PAD_NANDF_WP_B__PATA_DMACK 0x118 0x4f4 0x000 0x1 0x0 +#define MX51_PAD_NANDF_WP_B__SD3_DATA2 0x118 0x4f4 0x944 0x2 0x0 +#define MX51_PAD_NANDF_RB0__ECSPI2_SS1 0x11c 0x4f8 0x930 0x5 0x0 +#define MX51_PAD_NANDF_RB0__GPIO3_8 0x11c 0x4f8 0x994 0x3 0x0 +#define MX51_PAD_NANDF_RB0__NANDF_RB0 0x11c 0x4f8 0x000 0x0 0x0 +#define MX51_PAD_NANDF_RB0__PATA_DMARQ 0x11c 0x4f8 0x000 0x1 0x0 +#define MX51_PAD_NANDF_RB0__SD3_DATA3 0x11c 0x4f8 0x948 0x2 0x0 +#define MX51_PAD_NANDF_RB1__CSPI_MOSI 0x120 0x4fc 0x91c 0x6 0x0 +#define MX51_PAD_NANDF_RB1__ECSPI2_RDY 0x120 0x4fc 0x000 0x2 0x0 +#define MX51_PAD_NANDF_RB1__GPIO3_9 0x120 0x4fc 0x000 0x3 0x0 +#define MX51_PAD_NANDF_RB1__NANDF_RB1 0x120 0x4fc 0x000 0x0 0x0 +#define MX51_PAD_NANDF_RB1__PATA_IORDY 0x120 0x4fc 0x000 0x1 0x0 +#define MX51_PAD_NANDF_RB1__SD4_CMD 0x120 0x4fc 0x000 0x5 0x0 +#define MX51_PAD_NANDF_RB2__DISP2_WAIT 0x124 0x500 0x9a8 0x5 0x0 +#define MX51_PAD_NANDF_RB2__ECSPI2_SCLK 0x124 0x500 0x000 0x2 0x0 +#define MX51_PAD_NANDF_RB2__FEC_COL 0x124 0x500 0x94c 0x1 0x0 +#define MX51_PAD_NANDF_RB2__GPIO3_10 0x124 0x500 0x000 0x3 0x0 +#define MX51_PAD_NANDF_RB2__NANDF_RB2 0x124 0x500 0x000 0x0 0x0 +#define MX51_PAD_NANDF_RB2__USBH3_H3_DP 0x124 0x500 0x000 0x7 0x0 +#define MX51_PAD_NANDF_RB2__USBH3_NXT 0x124 0x500 0xa20 0x6 0x0 +#define MX51_PAD_NANDF_RB3__DISP1_WAIT 0x128 0x504 0x000 0x5 0x0 +#define MX51_PAD_NANDF_RB3__ECSPI2_MISO 0x128 0x504 0x000 0x2 0x0 +#define MX51_PAD_NANDF_RB3__FEC_RX_CLK 0x128 0x504 0x968 0x1 0x0 +#define MX51_PAD_NANDF_RB3__GPIO3_11 0x128 0x504 0x000 0x3 0x0 +#define MX51_PAD_NANDF_RB3__NANDF_RB3 0x128 0x504 0x000 0x0 0x0 +#define MX51_PAD_NANDF_RB3__USBH3_CLK 0x128 0x504 0x9f8 0x6 0x0 +#define MX51_PAD_NANDF_RB3__USBH3_H3_DM 0x128 0x504 0x000 0x7 0x0 +#define MX51_PAD_GPIO_NAND__GPIO_NAND 0x12c 0x514 0x998 0x0 0x0 +#define MX51_PAD_GPIO_NAND__PATA_INTRQ 0x12c 0x514 0x000 0x1 0x0 +#define MX51_PAD_NANDF_CS0__GPIO3_16 0x130 0x518 0x000 0x3 0x0 +#define MX51_PAD_NANDF_CS0__NANDF_CS0 0x130 0x518 0x000 0x0 0x0 +#define MX51_PAD_NANDF_CS1__GPIO3_17 0x134 0x51c 0x000 0x3 0x0 +#define MX51_PAD_NANDF_CS1__NANDF_CS1 0x134 0x51c 0x000 0x0 0x0 +#define MX51_PAD_NANDF_CS2__CSPI_SCLK 0x138 0x520 0x914 0x6 0x0 +#define MX51_PAD_NANDF_CS2__FEC_TX_ER 0x138 0x520 0x000 0x2 0x0 +#define MX51_PAD_NANDF_CS2__GPIO3_18 0x138 0x520 0x000 0x3 0x0 +#define MX51_PAD_NANDF_CS2__NANDF_CS2 0x138 0x520 0x000 0x0 0x0 +#define MX51_PAD_NANDF_CS2__PATA_CS_0 0x138 0x520 0x000 0x1 0x0 +#define MX51_PAD_NANDF_CS2__SD4_CLK 0x138 0x520 0x000 0x5 0x0 +#define MX51_PAD_NANDF_CS2__USBH3_H1_DP 0x138 0x520 0x000 0x7 0x0 +#define MX51_PAD_NANDF_CS3__FEC_MDC 0x13c 0x524 0x000 0x2 0x0 +#define MX51_PAD_NANDF_CS3__GPIO3_19 0x13c 0x524 0x000 0x3 0x0 +#define MX51_PAD_NANDF_CS3__NANDF_CS3 0x13c 0x524 0x000 0x0 0x0 +#define MX51_PAD_NANDF_CS3__PATA_CS_1 0x13c 0x524 0x000 0x1 0x0 +#define MX51_PAD_NANDF_CS3__SD4_DAT0 0x13c 0x524 0x000 0x5 0x0 +#define MX51_PAD_NANDF_CS3__USBH3_H1_DM 0x13c 0x524 0x000 0x7 0x0 +#define MX51_PAD_NANDF_CS4__FEC_TDATA1 0x140 0x528 0x000 0x2 0x0 +#define MX51_PAD_NANDF_CS4__GPIO3_20 0x140 0x528 0x000 0x3 0x0 +#define MX51_PAD_NANDF_CS4__NANDF_CS4 0x140 0x528 0x000 0x0 0x0 +#define MX51_PAD_NANDF_CS4__PATA_DA_0 0x140 0x528 0x000 0x1 0x0 +#define MX51_PAD_NANDF_CS4__SD4_DAT1 0x140 0x528 0x000 0x5 0x0 +#define MX51_PAD_NANDF_CS4__USBH3_STP 0x140 0x528 0xa24 0x7 0x0 +#define MX51_PAD_NANDF_CS5__FEC_TDATA2 0x144 0x52c 0x000 0x2 0x0 +#define MX51_PAD_NANDF_CS5__GPIO3_21 0x144 0x52c 0x000 0x3 0x0 +#define MX51_PAD_NANDF_CS5__NANDF_CS5 0x144 0x52c 0x000 0x0 0x0 +#define MX51_PAD_NANDF_CS5__PATA_DA_1 0x144 0x52c 0x000 0x1 0x0 +#define MX51_PAD_NANDF_CS5__SD4_DAT2 0x144 0x52c 0x000 0x5 0x0 +#define MX51_PAD_NANDF_CS5__USBH3_DIR 0x144 0x52c 0xa1c 0x7 0x0 +#define MX51_PAD_NANDF_CS6__CSPI_SS3 0x148 0x530 0x928 0x7 0x0 +#define MX51_PAD_NANDF_CS6__FEC_TDATA3 0x148 0x530 0x000 0x2 0x0 +#define MX51_PAD_NANDF_CS6__GPIO3_22 0x148 0x530 0x000 0x3 0x0 +#define MX51_PAD_NANDF_CS6__NANDF_CS6 0x148 0x530 0x000 0x0 0x0 +#define MX51_PAD_NANDF_CS6__PATA_DA_2 0x148 0x530 0x000 0x1 0x0 +#define MX51_PAD_NANDF_CS6__SD4_DAT3 0x148 0x530 0x000 0x5 0x0 +#define MX51_PAD_NANDF_CS7__FEC_TX_EN 0x14c 0x534 0x000 0x1 0x0 +#define MX51_PAD_NANDF_CS7__GPIO3_23 0x14c 0x534 0x000 0x3 0x0 +#define MX51_PAD_NANDF_CS7__NANDF_CS7 0x14c 0x534 0x000 0x0 0x0 +#define MX51_PAD_NANDF_CS7__SD3_CLK 0x14c 0x534 0x000 0x5 0x0 +#define MX51_PAD_NANDF_RDY_INT__ECSPI2_SS0 0x150 0x538 0x000 0x2 0x0 +#define MX51_PAD_NANDF_RDY_INT__FEC_TX_CLK 0x150 0x538 0x974 0x1 0x0 +#define MX51_PAD_NANDF_RDY_INT__GPIO3_24 0x150 0x538 0x000 0x3 0x0 +#define MX51_PAD_NANDF_RDY_INT__NANDF_RDY_INT 0x150 0x538 0x938 0x0 0x0 +#define MX51_PAD_NANDF_RDY_INT__SD3_CMD 0x150 0x538 0x000 0x5 0x0 +#define MX51_PAD_NANDF_D15__ECSPI2_MOSI 0x154 0x53c 0x000 0x2 0x0 +#define MX51_PAD_NANDF_D15__GPIO3_25 0x154 0x53c 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D15__NANDF_D15 0x154 0x53c 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D15__PATA_DATA15 0x154 0x53c 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D15__SD3_DAT7 0x154 0x53c 0x000 0x5 0x0 +#define MX51_PAD_NANDF_D14__ECSPI2_SS3 0x158 0x540 0x934 0x2 0x0 +#define MX51_PAD_NANDF_D14__GPIO3_26 0x158 0x540 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D14__NANDF_D14 0x158 0x540 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D14__PATA_DATA14 0x158 0x540 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D14__SD3_DAT6 0x158 0x540 0x000 0x5 0x0 +#define MX51_PAD_NANDF_D13__ECSPI2_SS2 0x15c 0x544 0x000 0x2 0x0 +#define MX51_PAD_NANDF_D13__GPIO3_27 0x15c 0x544 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D13__NANDF_D13 0x15c 0x544 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D13__PATA_DATA13 0x15c 0x544 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D13__SD3_DAT5 0x15c 0x544 0x000 0x5 0x0 +#define MX51_PAD_NANDF_D12__ECSPI2_SS1 0x160 0x548 0x930 0x2 0x1 +#define MX51_PAD_NANDF_D12__GPIO3_28 0x160 0x548 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D12__NANDF_D12 0x160 0x548 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D12__PATA_DATA12 0x160 0x548 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D12__SD3_DAT4 0x160 0x548 0x000 0x5 0x0 +#define MX51_PAD_NANDF_D11__FEC_RX_DV 0x164 0x54c 0x96c 0x2 0x0 +#define MX51_PAD_NANDF_D11__GPIO3_29 0x164 0x54c 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D11__NANDF_D11 0x164 0x54c 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D11__PATA_DATA11 0x164 0x54c 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D11__SD3_DATA3 0x164 0x54c 0x948 0x5 0x1 +#define MX51_PAD_NANDF_D10__GPIO3_30 0x168 0x550 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D10__NANDF_D10 0x168 0x550 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D10__PATA_DATA10 0x168 0x550 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D10__SD3_DATA2 0x168 0x550 0x944 0x5 0x1 +#define MX51_PAD_NANDF_D9__FEC_RDATA0 0x16c 0x554 0x958 0x2 0x0 +#define MX51_PAD_NANDF_D9__GPIO3_31 0x16c 0x554 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D9__NANDF_D9 0x16c 0x554 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D9__PATA_DATA9 0x16c 0x554 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D9__SD3_DATA1 0x16c 0x554 0x940 0x5 0x1 +#define MX51_PAD_NANDF_D8__FEC_TDATA0 0x170 0x558 0x000 0x2 0x0 +#define MX51_PAD_NANDF_D8__GPIO4_0 0x170 0x558 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D8__NANDF_D8 0x170 0x558 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D8__PATA_DATA8 0x170 0x558 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D8__SD3_DATA0 0x170 0x558 0x93c 0x5 0x1 +#define MX51_PAD_NANDF_D7__GPIO4_1 0x174 0x55c 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D7__NANDF_D7 0x174 0x55c 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D7__PATA_DATA7 0x174 0x55c 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D7__USBH3_DATA0 0x174 0x55c 0x9fc 0x5 0x0 +#define MX51_PAD_NANDF_D6__GPIO4_2 0x178 0x560 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D6__NANDF_D6 0x178 0x560 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D6__PATA_DATA6 0x178 0x560 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D6__SD4_LCTL 0x178 0x560 0x000 0x2 0x0 +#define MX51_PAD_NANDF_D6__USBH3_DATA1 0x178 0x560 0xa00 0x5 0x0 +#define MX51_PAD_NANDF_D5__GPIO4_3 0x17c 0x564 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D5__NANDF_D5 0x17c 0x564 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D5__PATA_DATA5 0x17c 0x564 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D5__SD4_WP 0x17c 0x564 0x000 0x2 0x0 +#define MX51_PAD_NANDF_D5__USBH3_DATA2 0x17c 0x564 0xa04 0x5 0x0 +#define MX51_PAD_NANDF_D4__GPIO4_4 0x180 0x568 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D4__NANDF_D4 0x180 0x568 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D4__PATA_DATA4 0x180 0x568 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D4__SD4_CD 0x180 0x568 0x000 0x2 0x0 +#define MX51_PAD_NANDF_D4__USBH3_DATA3 0x180 0x568 0xa08 0x5 0x0 +#define MX51_PAD_NANDF_D3__GPIO4_5 0x184 0x56c 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D3__NANDF_D3 0x184 0x56c 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D3__PATA_DATA3 0x184 0x56c 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D3__SD4_DAT4 0x184 0x56c 0x000 0x2 0x0 +#define MX51_PAD_NANDF_D3__USBH3_DATA4 0x184 0x56c 0xa0c 0x5 0x0 +#define MX51_PAD_NANDF_D2__GPIO4_6 0x188 0x570 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D2__NANDF_D2 0x188 0x570 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D2__PATA_DATA2 0x188 0x570 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D2__SD4_DAT5 0x188 0x570 0x000 0x2 0x0 +#define MX51_PAD_NANDF_D2__USBH3_DATA5 0x188 0x570 0xa10 0x5 0x0 +#define MX51_PAD_NANDF_D1__GPIO4_7 0x18c 0x574 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D1__NANDF_D1 0x18c 0x574 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D1__PATA_DATA1 0x18c 0x574 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D1__SD4_DAT6 0x18c 0x574 0x000 0x2 0x0 +#define MX51_PAD_NANDF_D1__USBH3_DATA6 0x18c 0x574 0xa14 0x5 0x0 +#define MX51_PAD_NANDF_D0__GPIO4_8 0x190 0x578 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D0__NANDF_D0 0x190 0x578 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D0__PATA_DATA0 0x190 0x578 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D0__SD4_DAT7 0x190 0x578 0x000 0x2 0x0 +#define MX51_PAD_NANDF_D0__USBH3_DATA7 0x190 0x578 0xa18 0x5 0x0 +#define MX51_PAD_CSI1_D8__CSI1_D8 0x194 0x57c 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D8__GPIO3_12 0x194 0x57c 0x998 0x3 0x1 +#define MX51_PAD_CSI1_D9__CSI1_D9 0x198 0x580 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D9__GPIO3_13 0x198 0x580 0x000 0x3 0x0 +#define MX51_PAD_CSI1_D10__CSI1_D10 0x19c 0x584 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D11__CSI1_D11 0x1a0 0x588 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D12__CSI1_D12 0x1a4 0x58c 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D13__CSI1_D13 0x1a8 0x590 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D14__CSI1_D14 0x1ac 0x594 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D15__CSI1_D15 0x1b0 0x598 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D16__CSI1_D16 0x1b4 0x59c 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D17__CSI1_D17 0x1b8 0x5a0 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D18__CSI1_D18 0x1bc 0x5a4 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D19__CSI1_D19 0x1c0 0x5a8 0x000 0x0 0x0 +#define MX51_PAD_CSI1_VSYNC__CSI1_VSYNC 0x1c4 0x5ac 0x000 0x0 0x0 +#define MX51_PAD_CSI1_VSYNC__GPIO3_14 0x1c4 0x5ac 0x000 0x3 0x0 +#define MX51_PAD_CSI1_HSYNC__CSI1_HSYNC 0x1c8 0x5b0 0x000 0x0 0x0 +#define MX51_PAD_CSI1_HSYNC__GPIO3_15 0x1c8 0x5b0 0x000 0x3 0x0 +#define MX51_PAD_CSI1_PIXCLK__CSI1_PIXCLK 0x000 0x5b4 0x000 0x0 0x0 +#define MX51_PAD_CSI1_MCLK__CSI1_MCLK 0x000 0x5b8 0x000 0x0 0x0 +#define MX51_PAD_CSI2_D12__CSI2_D12 0x1cc 0x5bc 0x000 0x0 0x0 +#define MX51_PAD_CSI2_D12__GPIO4_9 0x1cc 0x5bc 0x000 0x3 0x0 +#define MX51_PAD_CSI2_D13__CSI2_D13 0x1d0 0x5c0 0x000 0x0 0x0 +#define MX51_PAD_CSI2_D13__GPIO4_10 0x1d0 0x5c0 0x000 0x3 0x0 +#define MX51_PAD_CSI2_D14__CSI2_D14 0x1d4 0x5c4 0x000 0x0 0x0 +#define MX51_PAD_CSI2_D15__CSI2_D15 0x1d8 0x5c8 0x000 0x0 0x0 +#define MX51_PAD_CSI2_D16__CSI2_D16 0x1dc 0x5cc 0x000 0x0 0x0 +#define MX51_PAD_CSI2_D17__CSI2_D17 0x1e0 0x5d0 0x000 0x0 0x0 +#define MX51_PAD_CSI2_D18__CSI2_D18 0x1e4 0x5d4 0x000 0x0 0x0 +#define MX51_PAD_CSI2_D18__GPIO4_11 0x1e4 0x5d4 0x000 0x3 0x0 +#define MX51_PAD_CSI2_D19__CSI2_D19 0x1e8 0x5d8 0x000 0x0 0x0 +#define MX51_PAD_CSI2_D19__GPIO4_12 0x1e8 0x5d8 0x000 0x3 0x0 +#define MX51_PAD_CSI2_VSYNC__CSI2_VSYNC 0x1ec 0x5dc 0x000 0x0 0x0 +#define MX51_PAD_CSI2_VSYNC__GPIO4_13 0x1ec 0x5dc 0x000 0x3 0x0 +#define MX51_PAD_CSI2_HSYNC__CSI2_HSYNC 0x1f0 0x5e0 0x000 0x0 0x0 +#define MX51_PAD_CSI2_HSYNC__GPIO4_14 0x1f0 0x5e0 0x000 0x3 0x0 +#define MX51_PAD_CSI2_PIXCLK__CSI2_PIXCLK 0x1f4 0x5e4 0x000 0x0 0x0 +#define MX51_PAD_CSI2_PIXCLK__GPIO4_15 0x1f4 0x5e4 0x000 0x3 0x0 +#define MX51_PAD_I2C1_CLK__GPIO4_16 0x1f8 0x5e8 0x000 0x3 0x0 +#define MX51_PAD_I2C1_CLK__I2C1_CLK 0x1f8 0x5e8 0x000 0x0 0x0 +#define MX51_PAD_I2C1_DAT__GPIO4_17 0x1fc 0x5ec 0x000 0x3 0x0 +#define MX51_PAD_I2C1_DAT__I2C1_DAT 0x1fc 0x5ec 0x000 0x0 0x0 +#define MX51_PAD_AUD3_BB_TXD__AUD3_TXD 0x200 0x5f0 0x000 0x0 0x0 +#define MX51_PAD_AUD3_BB_TXD__GPIO4_18 0x200 0x5f0 0x000 0x3 0x0 +#define MX51_PAD_AUD3_BB_RXD__AUD3_RXD 0x204 0x5f4 0x000 0x0 0x0 +#define MX51_PAD_AUD3_BB_RXD__GPIO4_19 0x204 0x5f4 0x000 0x3 0x0 +#define MX51_PAD_AUD3_BB_RXD__UART3_RXD 0x204 0x5f4 0x9f4 0x1 0x2 +#define MX51_PAD_AUD3_BB_CK__AUD3_TXC 0x208 0x5f8 0x000 0x0 0x0 +#define MX51_PAD_AUD3_BB_CK__GPIO4_20 0x208 0x5f8 0x000 0x3 0x0 +#define MX51_PAD_AUD3_BB_FS__AUD3_TXFS 0x20c 0x5fc 0x000 0x0 0x0 +#define MX51_PAD_AUD3_BB_FS__GPIO4_21 0x20c 0x5fc 0x000 0x3 0x0 +#define MX51_PAD_AUD3_BB_FS__UART3_TXD 0x20c 0x5fc 0x000 0x1 0x0 +#define MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI 0x210 0x600 0x000 0x0 0x0 +#define MX51_PAD_CSPI1_MOSI__GPIO4_22 0x210 0x600 0x000 0x3 0x0 +#define MX51_PAD_CSPI1_MOSI__I2C1_SDA 0x210 0x600 0x9b4 0x1 0x1 +#define MX51_PAD_CSPI1_MISO__AUD4_RXD 0x214 0x604 0x8c4 0x1 0x1 +#define MX51_PAD_CSPI1_MISO__ECSPI1_MISO 0x214 0x604 0x000 0x0 0x0 +#define MX51_PAD_CSPI1_MISO__GPIO4_23 0x214 0x604 0x000 0x3 0x0 +#define MX51_PAD_CSPI1_SS0__AUD4_TXC 0x218 0x608 0x8cc 0x1 0x1 +#define MX51_PAD_CSPI1_SS0__ECSPI1_SS0 0x218 0x608 0x000 0x0 0x0 +#define MX51_PAD_CSPI1_SS0__GPIO4_24 0x218 0x608 0x000 0x3 0x0 +#define MX51_PAD_CSPI1_SS1__AUD4_TXD 0x21c 0x60c 0x8c8 0x1 0x1 +#define MX51_PAD_CSPI1_SS1__ECSPI1_SS1 0x21c 0x60c 0x000 0x0 0x0 +#define MX51_PAD_CSPI1_SS1__GPIO4_25 0x21c 0x60c 0x000 0x3 0x0 +#define MX51_PAD_CSPI1_RDY__AUD4_TXFS 0x220 0x610 0x8d0 0x1 0x1 +#define MX51_PAD_CSPI1_RDY__ECSPI1_RDY 0x220 0x610 0x000 0x0 0x0 +#define MX51_PAD_CSPI1_RDY__GPIO4_26 0x220 0x610 0x000 0x3 0x0 +#define MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK 0x224 0x614 0x000 0x0 0x0 +#define MX51_PAD_CSPI1_SCLK__GPIO4_27 0x224 0x614 0x000 0x3 0x0 +#define MX51_PAD_CSPI1_SCLK__I2C1_SCL 0x224 0x614 0x9b0 0x1 0x1 +#define MX51_PAD_UART1_RXD__GPIO4_28 0x228 0x618 0x000 0x3 0x0 +#define MX51_PAD_UART1_RXD__UART1_RXD 0x228 0x618 0x9e4 0x0 0x0 +#define MX51_PAD_UART1_TXD__GPIO4_29 0x22c 0x61c 0x000 0x3 0x0 +#define MX51_PAD_UART1_TXD__PWM2_PWMO 0x22c 0x61c 0x000 0x1 0x0 +#define MX51_PAD_UART1_TXD__UART1_TXD 0x22c 0x61c 0x000 0x0 0x0 +#define MX51_PAD_UART1_RTS__GPIO4_30 0x230 0x620 0x000 0x3 0x0 +#define MX51_PAD_UART1_RTS__UART1_RTS 0x230 0x620 0x9e0 0x0 0x0 +#define MX51_PAD_UART1_CTS__GPIO4_31 0x234 0x624 0x000 0x3 0x0 +#define MX51_PAD_UART1_CTS__UART1_CTS 0x234 0x624 0x000 0x0 0x0 +#define MX51_PAD_UART2_RXD__FIRI_TXD 0x238 0x628 0x000 0x1 0x0 +#define MX51_PAD_UART2_RXD__GPIO1_20 0x238 0x628 0x000 0x3 0x0 +#define MX51_PAD_UART2_RXD__UART2_RXD 0x238 0x628 0x9ec 0x0 0x2 +#define MX51_PAD_UART2_TXD__FIRI_RXD 0x23c 0x62c 0x000 0x1 0x0 +#define MX51_PAD_UART2_TXD__GPIO1_21 0x23c 0x62c 0x000 0x3 0x0 +#define MX51_PAD_UART2_TXD__UART2_TXD 0x23c 0x62c 0x000 0x0 0x0 +#define MX51_PAD_UART3_RXD__CSI1_D0 0x240 0x630 0x000 0x2 0x0 +#define MX51_PAD_UART3_RXD__GPIO1_22 0x240 0x630 0x000 0x3 0x0 +#define MX51_PAD_UART3_RXD__UART1_DTR 0x240 0x630 0x000 0x0 0x0 +#define MX51_PAD_UART3_RXD__UART3_RXD 0x240 0x630 0x9f4 0x1 0x4 +#define MX51_PAD_UART3_TXD__CSI1_D1 0x244 0x634 0x000 0x2 0x0 +#define MX51_PAD_UART3_TXD__GPIO1_23 0x244 0x634 0x000 0x3 0x0 +#define MX51_PAD_UART3_TXD__UART1_DSR 0x244 0x634 0x000 0x0 0x0 +#define MX51_PAD_UART3_TXD__UART3_TXD 0x244 0x634 0x000 0x1 0x0 +#define MX51_PAD_OWIRE_LINE__GPIO1_24 0x248 0x638 0x000 0x3 0x0 +#define MX51_PAD_OWIRE_LINE__OWIRE_LINE 0x248 0x638 0x000 0x0 0x0 +#define MX51_PAD_OWIRE_LINE__SPDIF_OUT 0x248 0x638 0x000 0x6 0x0 +#define MX51_PAD_KEY_ROW0__KEY_ROW0 0x24c 0x63c 0x000 0x0 0x0 +#define MX51_PAD_KEY_ROW1__KEY_ROW1 0x250 0x640 0x000 0x0 0x0 +#define MX51_PAD_KEY_ROW2__KEY_ROW2 0x254 0x644 0x000 0x0 0x0 +#define MX51_PAD_KEY_ROW3__KEY_ROW3 0x258 0x648 0x000 0x0 0x0 +#define MX51_PAD_KEY_COL0__KEY_COL0 0x25c 0x64c 0x000 0x0 0x0 +#define MX51_PAD_KEY_COL0__PLL1_BYP 0x25c 0x64c 0x90c 0x7 0x0 +#define MX51_PAD_KEY_COL1__KEY_COL1 0x260 0x650 0x000 0x0 0x0 +#define MX51_PAD_KEY_COL1__PLL2_BYP 0x260 0x650 0x910 0x7 0x0 +#define MX51_PAD_KEY_COL2__KEY_COL2 0x264 0x654 0x000 0x0 0x0 +#define MX51_PAD_KEY_COL2__PLL3_BYP 0x264 0x654 0x000 0x7 0x0 +#define MX51_PAD_KEY_COL3__KEY_COL3 0x268 0x658 0x000 0x0 0x0 +#define MX51_PAD_KEY_COL4__I2C2_SCL 0x26c 0x65c 0x9b8 0x3 0x1 +#define MX51_PAD_KEY_COL4__KEY_COL4 0x26c 0x65c 0x000 0x0 0x0 +#define MX51_PAD_KEY_COL4__SPDIF_OUT1 0x26c 0x65c 0x000 0x6 0x0 +#define MX51_PAD_KEY_COL4__UART1_RI 0x26c 0x65c 0x000 0x1 0x0 +#define MX51_PAD_KEY_COL4__UART3_RTS 0x26c 0x65c 0x9f0 0x2 0x4 +#define MX51_PAD_KEY_COL5__I2C2_SDA 0x270 0x660 0x9bc 0x3 0x1 +#define MX51_PAD_KEY_COL5__KEY_COL5 0x270 0x660 0x000 0x0 0x0 +#define MX51_PAD_KEY_COL5__UART1_DCD 0x270 0x660 0x000 0x1 0x0 +#define MX51_PAD_KEY_COL5__UART3_CTS 0x270 0x660 0x000 0x2 0x0 +#define MX51_PAD_USBH1_CLK__CSPI_SCLK 0x278 0x678 0x914 0x1 0x1 +#define MX51_PAD_USBH1_CLK__GPIO1_25 0x278 0x678 0x000 0x2 0x0 +#define MX51_PAD_USBH1_CLK__I2C2_SCL 0x278 0x678 0x9b8 0x5 0x2 +#define MX51_PAD_USBH1_CLK__USBH1_CLK 0x278 0x678 0x000 0x0 0x0 +#define MX51_PAD_USBH1_DIR__CSPI_MOSI 0x27c 0x67c 0x91c 0x1 0x1 +#define MX51_PAD_USBH1_DIR__GPIO1_26 0x27c 0x67c 0x000 0x2 0x0 +#define MX51_PAD_USBH1_DIR__I2C2_SDA 0x27c 0x67c 0x9bc 0x5 0x2 +#define MX51_PAD_USBH1_DIR__USBH1_DIR 0x27c 0x67c 0x000 0x0 0x0 +#define MX51_PAD_USBH1_STP__CSPI_RDY 0x280 0x680 0x000 0x1 0x0 +#define MX51_PAD_USBH1_STP__GPIO1_27 0x280 0x680 0x000 0x2 0x0 +#define MX51_PAD_USBH1_STP__UART3_RXD 0x280 0x680 0x9f4 0x5 0x6 +#define MX51_PAD_USBH1_STP__USBH1_STP 0x280 0x680 0x000 0x0 0x0 +#define MX51_PAD_USBH1_NXT__CSPI_MISO 0x284 0x684 0x918 0x1 0x0 +#define MX51_PAD_USBH1_NXT__GPIO1_28 0x284 0x684 0x000 0x2 0x0 +#define MX51_PAD_USBH1_NXT__UART3_TXD 0x284 0x684 0x000 0x5 0x0 +#define MX51_PAD_USBH1_NXT__USBH1_NXT 0x284 0x684 0x000 0x0 0x0 +#define MX51_PAD_USBH1_DATA0__GPIO1_11 0x288 0x688 0x000 0x2 0x0 +#define MX51_PAD_USBH1_DATA0__UART2_CTS 0x288 0x688 0x000 0x1 0x0 +#define MX51_PAD_USBH1_DATA0__USBH1_DATA0 0x288 0x688 0x000 0x0 0x0 +#define MX51_PAD_USBH1_DATA1__GPIO1_12 0x28c 0x68c 0x000 0x2 0x0 +#define MX51_PAD_USBH1_DATA1__UART2_RXD 0x28c 0x68c 0x9ec 0x1 0x4 +#define MX51_PAD_USBH1_DATA1__USBH1_DATA1 0x28c 0x68c 0x000 0x0 0x0 +#define MX51_PAD_USBH1_DATA2__GPIO1_13 0x290 0x690 0x000 0x2 0x0 +#define MX51_PAD_USBH1_DATA2__UART2_TXD 0x290 0x690 0x000 0x1 0x0 +#define MX51_PAD_USBH1_DATA2__USBH1_DATA2 0x290 0x690 0x000 0x0 0x0 +#define MX51_PAD_USBH1_DATA3__GPIO1_14 0x294 0x694 0x000 0x2 0x0 +#define MX51_PAD_USBH1_DATA3__UART2_RTS 0x294 0x694 0x9e8 0x1 0x5 +#define MX51_PAD_USBH1_DATA3__USBH1_DATA3 0x294 0x694 0x000 0x0 0x0 +#define MX51_PAD_USBH1_DATA4__CSPI_SS0 0x298 0x698 0x000 0x1 0x0 +#define MX51_PAD_USBH1_DATA4__GPIO1_15 0x298 0x698 0x000 0x2 0x0 +#define MX51_PAD_USBH1_DATA4__USBH1_DATA4 0x298 0x698 0x000 0x0 0x0 +#define MX51_PAD_USBH1_DATA5__CSPI_SS1 0x29c 0x69c 0x920 0x1 0x0 +#define MX51_PAD_USBH1_DATA5__GPIO1_16 0x29c 0x69c 0x000 0x2 0x0 +#define MX51_PAD_USBH1_DATA5__USBH1_DATA5 0x29c 0x69c 0x000 0x0 0x0 +#define MX51_PAD_USBH1_DATA6__CSPI_SS3 0x2a0 0x6a0 0x928 0x1 0x1 +#define MX51_PAD_USBH1_DATA6__GPIO1_17 0x2a0 0x6a0 0x000 0x2 0x0 +#define MX51_PAD_USBH1_DATA6__USBH1_DATA6 0x2a0 0x6a0 0x000 0x0 0x0 +#define MX51_PAD_USBH1_DATA7__ECSPI1_SS3 0x2a4 0x6a4 0x000 0x1 0x0 +#define MX51_PAD_USBH1_DATA7__ECSPI2_SS3 0x2a4 0x6a4 0x934 0x5 0x1 +#define MX51_PAD_USBH1_DATA7__GPIO1_18 0x2a4 0x6a4 0x000 0x2 0x0 +#define MX51_PAD_USBH1_DATA7__USBH1_DATA7 0x2a4 0x6a4 0x000 0x0 0x0 +#define MX51_PAD_DI1_PIN11__DI1_PIN11 0x2a8 0x6a8 0x000 0x0 0x0 +#define MX51_PAD_DI1_PIN11__ECSPI1_SS2 0x2a8 0x6a8 0x000 0x7 0x0 +#define MX51_PAD_DI1_PIN11__GPIO3_0 0x2a8 0x6a8 0x000 0x4 0x0 +#define MX51_PAD_DI1_PIN12__DI1_PIN12 0x2ac 0x6ac 0x000 0x0 0x0 +#define MX51_PAD_DI1_PIN12__GPIO3_1 0x2ac 0x6ac 0x978 0x4 0x1 +#define MX51_PAD_DI1_PIN13__DI1_PIN13 0x2b0 0x6b0 0x000 0x0 0x0 +#define MX51_PAD_DI1_PIN13__GPIO3_2 0x2b0 0x6b0 0x97c 0x4 0x1 +#define MX51_PAD_DI1_D0_CS__DI1_D0_CS 0x2b4 0x6b4 0x000 0x0 0x0 +#define MX51_PAD_DI1_D0_CS__GPIO3_3 0x2b4 0x6b4 0x980 0x4 0x1 +#define MX51_PAD_DI1_D1_CS__DI1_D1_CS 0x2b8 0x6b8 0x000 0x0 0x0 +#define MX51_PAD_DI1_D1_CS__DISP1_PIN14 0x2b8 0x6b8 0x000 0x2 0x0 +#define MX51_PAD_DI1_D1_CS__DISP1_PIN5 0x2b8 0x6b8 0x000 0x3 0x0 +#define MX51_PAD_DI1_D1_CS__GPIO3_4 0x2b8 0x6b8 0x984 0x4 0x1 +#define MX51_PAD_DISPB2_SER_DIN__DISP1_PIN1 0x2bc 0x6bc 0x9a4 0x2 0x1 +#define MX51_PAD_DISPB2_SER_DIN__DISPB2_SER_DIN 0x2bc 0x6bc 0x9c4 0x0 0x0 +#define MX51_PAD_DISPB2_SER_DIN__GPIO3_5 0x2bc 0x6bc 0x988 0x4 0x1 +#define MX51_PAD_DISPB2_SER_DIO__DISP1_PIN6 0x2c0 0x6c0 0x000 0x3 0x0 +#define MX51_PAD_DISPB2_SER_DIO__DISPB2_SER_DIO 0x2c0 0x6c0 0x9c4 0x0 0x1 +#define MX51_PAD_DISPB2_SER_DIO__GPIO3_6 0x2c0 0x6c0 0x98c 0x4 0x1 +#define MX51_PAD_DISPB2_SER_CLK__DISP1_PIN17 0x2c4 0x6c4 0x000 0x2 0x0 +#define MX51_PAD_DISPB2_SER_CLK__DISP1_PIN7 0x2c4 0x6c4 0x000 0x3 0x0 +#define MX51_PAD_DISPB2_SER_CLK__DISPB2_SER_CLK 0x2c4 0x6c4 0x000 0x0 0x0 +#define MX51_PAD_DISPB2_SER_CLK__GPIO3_7 0x2c4 0x6c4 0x990 0x4 0x1 +#define MX51_PAD_DISPB2_SER_RS__DISP1_EXT_CLK 0x2c8 0x6c8 0x000 0x2 0x0 +#define MX51_PAD_DISPB2_SER_RS__DISP1_PIN16 0x2c8 0x6c8 0x000 0x2 0x0 +#define MX51_PAD_DISPB2_SER_RS__DISP1_PIN8 0x2c8 0x6c8 0x000 0x3 0x0 +#define MX51_PAD_DISPB2_SER_RS__DISPB2_SER_RS 0x2c8 0x6c8 0x000 0x0 0x0 +#define MX51_PAD_DISPB2_SER_RS__GPIO3_8 0x2c8 0x6c8 0x994 0x4 0x1 +#define MX51_PAD_DISP1_DAT0__DISP1_DAT0 0x2cc 0x6cc 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT1__DISP1_DAT1 0x2d0 0x6d0 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT2__DISP1_DAT2 0x2d4 0x6d4 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT3__DISP1_DAT3 0x2d8 0x6d8 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT4__DISP1_DAT4 0x2dc 0x6dc 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT5__DISP1_DAT5 0x2e0 0x6e0 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT6__BOOT_USB_SRC 0x2e4 0x6e4 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT6__DISP1_DAT6 0x2e4 0x6e4 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT7__BOOT_EEPROM_CFG 0x2e8 0x6e8 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT7__DISP1_DAT7 0x2e8 0x6e8 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT8__BOOT_SRC0 0x2ec 0x6ec 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT8__DISP1_DAT8 0x2ec 0x6ec 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT9__BOOT_SRC1 0x2f0 0x6f0 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT9__DISP1_DAT9 0x2f0 0x6f0 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT10__BOOT_SPARE_SIZE 0x2f4 0x6f4 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT10__DISP1_DAT10 0x2f4 0x6f4 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT11__BOOT_LPB_FREQ2 0x2f8 0x6f8 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT11__DISP1_DAT11 0x2f8 0x6f8 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT12__BOOT_MLC_SEL 0x2fc 0x6fc 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT12__DISP1_DAT12 0x2fc 0x6fc 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT13__BOOT_MEM_CTL0 0x300 0x700 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT13__DISP1_DAT13 0x300 0x700 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT14__BOOT_MEM_CTL1 0x304 0x704 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT14__DISP1_DAT14 0x304 0x704 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT15__BOOT_BUS_WIDTH 0x308 0x708 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT15__DISP1_DAT15 0x308 0x708 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT16__BOOT_PAGE_SIZE0 0x30c 0x70c 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT16__DISP1_DAT16 0x30c 0x70c 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT17__BOOT_PAGE_SIZE1 0x310 0x710 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT17__DISP1_DAT17 0x310 0x710 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT18__BOOT_WEIM_MUXED0 0x314 0x714 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT18__DISP1_DAT18 0x314 0x714 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT18__DISP2_PIN11 0x314 0x714 0x000 0x5 0x0 +#define MX51_PAD_DISP1_DAT18__DISP2_PIN5 0x314 0x714 0x000 0x4 0x0 +#define MX51_PAD_DISP1_DAT19__BOOT_WEIM_MUXED1 0x318 0x718 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT19__DISP1_DAT19 0x318 0x718 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT19__DISP2_PIN12 0x318 0x718 0x000 0x5 0x0 +#define MX51_PAD_DISP1_DAT19__DISP2_PIN6 0x318 0x718 0x000 0x4 0x0 +#define MX51_PAD_DISP1_DAT20__BOOT_MEM_TYPE0 0x31c 0x71c 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT20__DISP1_DAT20 0x31c 0x71c 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT20__DISP2_PIN13 0x31c 0x71c 0x000 0x5 0x0 +#define MX51_PAD_DISP1_DAT20__DISP2_PIN7 0x31c 0x71c 0x000 0x4 0x0 +#define MX51_PAD_DISP1_DAT21__BOOT_MEM_TYPE1 0x320 0x720 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT21__DISP1_DAT21 0x320 0x720 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT21__DISP2_PIN14 0x320 0x720 0x000 0x5 0x0 +#define MX51_PAD_DISP1_DAT21__DISP2_PIN8 0x320 0x720 0x000 0x4 0x0 +#define MX51_PAD_DISP1_DAT22__BOOT_LPB_FREQ0 0x324 0x724 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT22__DISP1_DAT22 0x324 0x724 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT22__DISP2_D0_CS 0x324 0x724 0x000 0x6 0x0 +#define MX51_PAD_DISP1_DAT22__DISP2_DAT16 0x324 0x724 0x000 0x5 0x0 +#define MX51_PAD_DISP1_DAT23__BOOT_LPB_FREQ1 0x328 0x728 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT23__DISP1_DAT23 0x328 0x728 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT23__DISP2_D1_CS 0x328 0x728 0x000 0x6 0x0 +#define MX51_PAD_DISP1_DAT23__DISP2_DAT17 0x328 0x728 0x000 0x5 0x0 +#define MX51_PAD_DISP1_DAT23__DISP2_SER_CS 0x328 0x728 0x000 0x4 0x0 +#define MX51_PAD_DI1_PIN3__DI1_PIN3 0x32c 0x72c 0x000 0x0 0x0 +#define MX51_PAD_DI1_PIN2__DI1_PIN2 0x330 0x734 0x000 0x0 0x0 +#define MX51_PAD_DI_GP2__DISP1_SER_CLK 0x338 0x740 0x000 0x0 0x0 +#define MX51_PAD_DI_GP2__DISP2_WAIT 0x338 0x740 0x9a8 0x2 0x1 +#define MX51_PAD_DI_GP3__CSI1_DATA_EN 0x33c 0x744 0x9a0 0x3 0x1 +#define MX51_PAD_DI_GP3__DISP1_SER_DIO 0x33c 0x744 0x9c0 0x0 0x0 +#define MX51_PAD_DI_GP3__FEC_TX_ER 0x33c 0x744 0x000 0x2 0x0 +#define MX51_PAD_DI2_PIN4__CSI2_DATA_EN 0x340 0x748 0x99c 0x3 0x1 +#define MX51_PAD_DI2_PIN4__DI2_PIN4 0x340 0x748 0x000 0x0 0x0 +#define MX51_PAD_DI2_PIN4__FEC_CRS 0x340 0x748 0x950 0x2 0x1 +#define MX51_PAD_DI2_PIN2__DI2_PIN2 0x344 0x74c 0x000 0x0 0x0 +#define MX51_PAD_DI2_PIN2__FEC_MDC 0x344 0x74c 0x000 0x2 0x0 +#define MX51_PAD_DI2_PIN3__DI2_PIN3 0x348 0x750 0x000 0x0 0x0 +#define MX51_PAD_DI2_PIN3__FEC_MDIO 0x348 0x750 0x954 0x2 0x1 +#define MX51_PAD_DI2_DISP_CLK__DI2_DISP_CLK 0x34c 0x754 0x000 0x0 0x0 +#define MX51_PAD_DI2_DISP_CLK__FEC_RDATA1 0x34c 0x754 0x95c 0x2 0x1 +#define MX51_PAD_DI_GP4__DI2_PIN15 0x350 0x758 0x000 0x4 0x0 +#define MX51_PAD_DI_GP4__DISP1_SER_DIN 0x350 0x758 0x9c0 0x0 0x1 +#define MX51_PAD_DI_GP4__DISP2_PIN1 0x350 0x758 0x000 0x3 0x0 +#define MX51_PAD_DI_GP4__FEC_RDATA2 0x350 0x758 0x960 0x2 0x1 +#define MX51_PAD_DISP2_DAT0__DISP2_DAT0 0x354 0x75c 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT0__FEC_RDATA3 0x354 0x75c 0x964 0x2 0x1 +#define MX51_PAD_DISP2_DAT0__KEY_COL6 0x354 0x75c 0x9c8 0x4 0x1 +#define MX51_PAD_DISP2_DAT0__UART3_RXD 0x354 0x75c 0x9f4 0x5 0x8 +#define MX51_PAD_DISP2_DAT0__USBH3_CLK 0x354 0x75c 0x9f8 0x3 0x1 +#define MX51_PAD_DISP2_DAT1__DISP2_DAT1 0x358 0x760 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT1__FEC_RX_ER 0x358 0x760 0x970 0x2 0x1 +#define MX51_PAD_DISP2_DAT1__KEY_COL7 0x358 0x760 0x9cc 0x4 0x1 +#define MX51_PAD_DISP2_DAT1__UART3_TXD 0x358 0x760 0x000 0x5 0x0 +#define MX51_PAD_DISP2_DAT1__USBH3_DIR 0x358 0x760 0xa1c 0x3 0x1 +#define MX51_PAD_DISP2_DAT2__DISP2_DAT2 0x35c 0x764 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT3__DISP2_DAT3 0x360 0x768 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT4__DISP2_DAT4 0x364 0x76c 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT5__DISP2_DAT5 0x368 0x770 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT6__DISP2_DAT6 0x36c 0x774 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT6__FEC_TDATA1 0x36c 0x774 0x000 0x2 0x0 +#define MX51_PAD_DISP2_DAT6__GPIO1_19 0x36c 0x774 0x000 0x5 0x0 +#define MX51_PAD_DISP2_DAT6__KEY_ROW4 0x36c 0x774 0x9d0 0x4 0x1 +#define MX51_PAD_DISP2_DAT6__USBH3_STP 0x36c 0x774 0xa24 0x3 0x1 +#define MX51_PAD_DISP2_DAT7__DISP2_DAT7 0x370 0x778 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT7__FEC_TDATA2 0x370 0x778 0x000 0x2 0x0 +#define MX51_PAD_DISP2_DAT7__GPIO1_29 0x370 0x778 0x000 0x5 0x0 +#define MX51_PAD_DISP2_DAT7__KEY_ROW5 0x370 0x778 0x9d4 0x4 0x1 +#define MX51_PAD_DISP2_DAT7__USBH3_NXT 0x370 0x778 0xa20 0x3 0x1 +#define MX51_PAD_DISP2_DAT8__DISP2_DAT8 0x374 0x77c 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT8__FEC_TDATA3 0x374 0x77c 0x000 0x2 0x0 +#define MX51_PAD_DISP2_DAT8__GPIO1_30 0x374 0x77c 0x000 0x5 0x0 +#define MX51_PAD_DISP2_DAT8__KEY_ROW6 0x374 0x77c 0x9d8 0x4 0x1 +#define MX51_PAD_DISP2_DAT8__USBH3_DATA0 0x374 0x77c 0x9fc 0x3 0x1 +#define MX51_PAD_DISP2_DAT9__AUD6_RXC 0x378 0x780 0x8f4 0x4 0x1 +#define MX51_PAD_DISP2_DAT9__DISP2_DAT9 0x378 0x780 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT9__FEC_TX_EN 0x378 0x780 0x000 0x2 0x0 +#define MX51_PAD_DISP2_DAT9__GPIO1_31 0x378 0x780 0x000 0x5 0x0 +#define MX51_PAD_DISP2_DAT9__USBH3_DATA1 0x378 0x780 0xa00 0x3 0x1 +#define MX51_PAD_DISP2_DAT10__DISP2_DAT10 0x37c 0x784 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT10__DISP2_SER_CS 0x37c 0x784 0x000 0x5 0x0 +#define MX51_PAD_DISP2_DAT10__FEC_COL 0x37c 0x784 0x94c 0x2 0x1 +#define MX51_PAD_DISP2_DAT10__KEY_ROW7 0x37c 0x784 0x9dc 0x4 0x1 +#define MX51_PAD_DISP2_DAT10__USBH3_DATA2 0x37c 0x784 0xa04 0x3 0x1 +#define MX51_PAD_DISP2_DAT11__AUD6_TXD 0x380 0x788 0x8f0 0x4 0x1 +#define MX51_PAD_DISP2_DAT11__DISP2_DAT11 0x380 0x788 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT11__FEC_RX_CLK 0x380 0x788 0x968 0x2 0x1 +#define MX51_PAD_DISP2_DAT11__GPIO1_10 0x380 0x788 0x000 0x7 0x0 +#define MX51_PAD_DISP2_DAT11__USBH3_DATA3 0x380 0x788 0xa08 0x3 0x1 +#define MX51_PAD_DISP2_DAT12__AUD6_RXD 0x384 0x78c 0x8ec 0x4 0x1 +#define MX51_PAD_DISP2_DAT12__DISP2_DAT12 0x384 0x78c 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT12__FEC_RX_DV 0x384 0x78c 0x96c 0x2 0x1 +#define MX51_PAD_DISP2_DAT12__USBH3_DATA4 0x384 0x78c 0xa0c 0x3 0x1 +#define MX51_PAD_DISP2_DAT13__AUD6_TXC 0x388 0x790 0x8fc 0x4 0x1 +#define MX51_PAD_DISP2_DAT13__DISP2_DAT13 0x388 0x790 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT13__FEC_TX_CLK 0x388 0x790 0x974 0x2 0x1 +#define MX51_PAD_DISP2_DAT13__USBH3_DATA5 0x388 0x790 0xa10 0x3 0x1 +#define MX51_PAD_DISP2_DAT14__AUD6_TXFS 0x38c 0x794 0x900 0x4 0x1 +#define MX51_PAD_DISP2_DAT14__DISP2_DAT14 0x38c 0x794 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT14__FEC_RDATA0 0x38c 0x794 0x958 0x2 0x1 +#define MX51_PAD_DISP2_DAT14__USBH3_DATA6 0x38c 0x794 0xa14 0x3 0x1 +#define MX51_PAD_DISP2_DAT15__AUD6_RXFS 0x390 0x798 0x8f8 0x4 0x1 +#define MX51_PAD_DISP2_DAT15__DISP1_SER_CS 0x390 0x798 0x000 0x5 0x0 +#define MX51_PAD_DISP2_DAT15__DISP2_DAT15 0x390 0x798 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT15__FEC_TDATA0 0x390 0x798 0x000 0x2 0x0 +#define MX51_PAD_DISP2_DAT15__USBH3_DATA7 0x390 0x798 0xa18 0x3 0x1 +#define MX51_PAD_SD1_CMD__AUD5_RXFS 0x394 0x79c 0x8e0 0x1 0x1 +#define MX51_PAD_SD1_CMD__CSPI_MOSI 0x394 0x79c 0x91c 0x2 0x2 +#define MX51_PAD_SD1_CMD__SD1_CMD 0x394 0x79c 0x000 0x0 0x0 +#define MX51_PAD_SD1_CLK__AUD5_RXC 0x398 0x7a0 0x8dc 0x1 0x1 +#define MX51_PAD_SD1_CLK__CSPI_SCLK 0x398 0x7a0 0x914 0x2 0x2 +#define MX51_PAD_SD1_CLK__SD1_CLK 0x398 0x7a0 0x000 0x0 0x0 +#define MX51_PAD_SD1_DATA0__AUD5_TXD 0x39c 0x7a4 0x8d8 0x1 0x2 +#define MX51_PAD_SD1_DATA0__CSPI_MISO 0x39c 0x7a4 0x918 0x2 0x1 +#define MX51_PAD_SD1_DATA0__SD1_DATA0 0x39c 0x7a4 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA0__EIM_DA0 0x01c 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA1__EIM_DA1 0x020 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA2__EIM_DA2 0x024 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA3__EIM_DA3 0x028 0x000 0x000 0x0 0x0 +#define MX51_PAD_SD1_DATA1__AUD5_RXD 0x3a0 0x7a8 0x8d4 0x1 0x2 +#define MX51_PAD_SD1_DATA1__SD1_DATA1 0x3a0 0x7a8 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA4__EIM_DA4 0x02c 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA5__EIM_DA5 0x030 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA6__EIM_DA6 0x034 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA7__EIM_DA7 0x038 0x000 0x000 0x0 0x0 +#define MX51_PAD_SD1_DATA2__AUD5_TXC 0x3a4 0x7ac 0x8e4 0x1 0x2 +#define MX51_PAD_SD1_DATA2__SD1_DATA2 0x3a4 0x7ac 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA10__EIM_DA10 0x044 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA11__EIM_DA11 0x048 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA8__EIM_DA8 0x03c 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA9__EIM_DA9 0x040 0x000 0x000 0x0 0x0 +#define MX51_PAD_SD1_DATA3__AUD5_TXFS 0x3a8 0x7b0 0x8e8 0x1 0x2 +#define MX51_PAD_SD1_DATA3__CSPI_SS1 0x3a8 0x7b0 0x920 0x2 0x1 +#define MX51_PAD_SD1_DATA3__SD1_DATA3 0x3a8 0x7b0 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_0__CSPI_SS2 0x3ac 0x7b4 0x924 0x2 0x0 +#define MX51_PAD_GPIO1_0__GPIO1_0 0x3ac 0x7b4 0x000 0x1 0x0 +#define MX51_PAD_GPIO1_0__SD1_CD 0x3ac 0x7b4 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_1__CSPI_MISO 0x3b0 0x7b8 0x918 0x2 0x2 +#define MX51_PAD_GPIO1_1__GPIO1_1 0x3b0 0x7b8 0x000 0x1 0x0 +#define MX51_PAD_GPIO1_1__SD1_WP 0x3b0 0x7b8 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA12__EIM_DA12 0x04c 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA13__EIM_DA13 0x050 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA14__EIM_DA14 0x054 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA15__EIM_DA15 0x058 0x000 0x000 0x0 0x0 +#define MX51_PAD_SD2_CMD__CSPI_MOSI 0x3b4 0x7bc 0x91c 0x2 0x3 +#define MX51_PAD_SD2_CMD__I2C1_SCL 0x3b4 0x7bc 0x9b0 0x1 0x2 +#define MX51_PAD_SD2_CMD__SD2_CMD 0x3b4 0x7bc 0x000 0x0 0x0 +#define MX51_PAD_SD2_CLK__CSPI_SCLK 0x3b8 0x7c0 0x914 0x2 0x3 +#define MX51_PAD_SD2_CLK__I2C1_SDA 0x3b8 0x7c0 0x9b4 0x1 0x2 +#define MX51_PAD_SD2_CLK__SD2_CLK 0x3b8 0x7c0 0x000 0x0 0x0 +#define MX51_PAD_SD2_DATA0__CSPI_MISO 0x3bc 0x7c4 0x918 0x2 0x3 +#define MX51_PAD_SD2_DATA0__SD1_DAT4 0x3bc 0x7c4 0x000 0x1 0x0 +#define MX51_PAD_SD2_DATA0__SD2_DATA0 0x3bc 0x7c4 0x000 0x0 0x0 +#define MX51_PAD_SD2_DATA1__SD1_DAT5 0x3c0 0x7c8 0x000 0x1 0x0 +#define MX51_PAD_SD2_DATA1__SD2_DATA1 0x3c0 0x7c8 0x000 0x0 0x0 +#define MX51_PAD_SD2_DATA1__USBH3_H2_DP 0x3c0 0x7c8 0x000 0x2 0x0 +#define MX51_PAD_SD2_DATA2__SD1_DAT6 0x3c4 0x7cc 0x000 0x1 0x0 +#define MX51_PAD_SD2_DATA2__SD2_DATA2 0x3c4 0x7cc 0x000 0x0 0x0 +#define MX51_PAD_SD2_DATA2__USBH3_H2_DM 0x3c4 0x7cc 0x000 0x2 0x0 +#define MX51_PAD_SD2_DATA3__CSPI_SS2 0x3c8 0x7d0 0x924 0x2 0x1 +#define MX51_PAD_SD2_DATA3__SD1_DAT7 0x3c8 0x7d0 0x000 0x1 0x0 +#define MX51_PAD_SD2_DATA3__SD2_DATA3 0x3c8 0x7d0 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_2__CCM_OUT_2 0x3cc 0x7d4 0x000 0x5 0x0 +#define MX51_PAD_GPIO1_2__GPIO1_2 0x3cc 0x7d4 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_2__I2C2_SCL 0x3cc 0x7d4 0x9b8 0x2 0x3 +#define MX51_PAD_GPIO1_2__PLL1_BYP 0x3cc 0x7d4 0x90c 0x7 0x1 +#define MX51_PAD_GPIO1_2__PWM1_PWMO 0x3cc 0x7d4 0x000 0x1 0x0 +#define MX51_PAD_GPIO1_3__GPIO1_3 0x3d0 0x7d8 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_3__I2C2_SDA 0x3d0 0x7d8 0x9bc 0x2 0x3 +#define MX51_PAD_GPIO1_3__PLL2_BYP 0x3d0 0x7d8 0x910 0x7 0x1 +#define MX51_PAD_GPIO1_3__PWM2_PWMO 0x3d0 0x7d8 0x000 0x1 0x0 +#define MX51_PAD_PMIC_INT_REQ__PMIC_INT_REQ 0x3d4 0x7fc 0x000 0x0 0x0 +#define MX51_PAD_PMIC_INT_REQ__PMIC_PMU_IRQ_B 0x3d4 0x7fc 0x000 0x1 0x0 +#define MX51_PAD_GPIO1_4__DISP2_EXT_CLK 0x3d8 0x804 0x908 0x4 0x1 +#define MX51_PAD_GPIO1_4__EIM_RDY 0x3d8 0x804 0x938 0x3 0x1 +#define MX51_PAD_GPIO1_4__GPIO1_4 0x3d8 0x804 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_4__WDOG1_WDOG_B 0x3d8 0x804 0x000 0x2 0x0 +#define MX51_PAD_GPIO1_5__CSI2_MCLK 0x3dc 0x808 0x000 0x6 0x0 +#define MX51_PAD_GPIO1_5__DISP2_PIN16 0x3dc 0x808 0x000 0x3 0x0 +#define MX51_PAD_GPIO1_5__GPIO1_5 0x3dc 0x808 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_5__WDOG2_WDOG_B 0x3dc 0x808 0x000 0x2 0x0 +#define MX51_PAD_GPIO1_6__DISP2_PIN17 0x3e0 0x80c 0x000 0x4 0x0 +#define MX51_PAD_GPIO1_6__GPIO1_6 0x3e0 0x80c 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_6__REF_EN_B 0x3e0 0x80c 0x000 0x3 0x0 +#define MX51_PAD_GPIO1_7__CCM_OUT_0 0x3e4 0x810 0x000 0x3 0x0 +#define MX51_PAD_GPIO1_7__GPIO1_7 0x3e4 0x810 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_7__SD2_WP 0x3e4 0x810 0x000 0x6 0x0 +#define MX51_PAD_GPIO1_7__SPDIF_OUT1 0x3e4 0x810 0x000 0x2 0x0 +#define MX51_PAD_GPIO1_8__CSI2_DATA_EN 0x3e8 0x814 0x99c 0x2 0x2 +#define MX51_PAD_GPIO1_8__GPIO1_8 0x3e8 0x814 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_8__SD2_CD 0x3e8 0x814 0x000 0x6 0x0 +#define MX51_PAD_GPIO1_8__USBH3_PWR 0x3e8 0x814 0x000 0x1 0x0 +#define MX51_PAD_GPIO1_9__CCM_OUT_1 0x3ec 0x818 0x000 0x3 0x0 +#define MX51_PAD_GPIO1_9__DISP2_D1_CS 0x3ec 0x818 0x000 0x2 0x0 +#define MX51_PAD_GPIO1_9__DISP2_SER_CS 0x3ec 0x818 0x000 0x7 0x0 +#define MX51_PAD_GPIO1_9__GPIO1_9 0x3ec 0x818 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_9__SD2_LCTL 0x3ec 0x818 0x000 0x6 0x0 +#define MX51_PAD_GPIO1_9__USBH3_OC 0x3ec 0x818 0x000 0x1 0x0 + +#endif /* __DTS_IMX51_PINFUNC_H */ Copied: vendor/device-tree/dist/src/arm/imx53-pinfunc.h (from r271109, vendor/device-tree/ianc-b78b6b80/src/arm/imx53-pinfunc.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/device-tree/dist/src/arm/imx53-pinfunc.h Fri Sep 5 02:20:06 2014 (r271150, copy of r271109, vendor/device-tree/ianc-b78b6b80/src/arm/imx53-pinfunc.h) @@ -0,0 +1,1189 @@ +/* + * Copyright 2013 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#ifndef __DTS_IMX53_PINFUNC_H +#define __DTS_IMX53_PINFUNC_H + +/* + * The pin function ID is a tuple of + * + */ +#define MX53_PAD_GPIO_19__KPP_COL_5 0x020 0x348 0x840 0x0 0x0 +#define MX53_PAD_GPIO_19__GPIO4_5 0x020 0x348 0x000 0x1 0x0 +#define MX53_PAD_GPIO_19__CCM_CLKO 0x020 0x348 0x000 0x2 0x0 +#define MX53_PAD_GPIO_19__SPDIF_OUT1 0x020 0x348 0x000 0x3 0x0 +#define MX53_PAD_GPIO_19__RTC_CE_RTC_EXT_TRIG2 0x020 0x348 0x000 0x4 0x0 +#define MX53_PAD_GPIO_19__ECSPI1_RDY 0x020 0x348 0x000 0x5 0x0 +#define MX53_PAD_GPIO_19__FEC_TDATA_3 0x020 0x348 0x000 0x6 0x0 +#define MX53_PAD_GPIO_19__SRC_INT_BOOT 0x020 0x348 0x000 0x7 0x0 +#define MX53_PAD_KEY_COL0__KPP_COL_0 0x024 0x34c 0x000 0x0 0x0 +#define MX53_PAD_KEY_COL0__GPIO4_6 0x024 0x34c 0x000 0x1 0x0 +#define MX53_PAD_KEY_COL0__AUDMUX_AUD5_TXC 0x024 0x34c 0x758 0x2 0x0 +#define MX53_PAD_KEY_COL0__UART4_TXD_MUX 0x024 0x34c 0x000 0x4 0x0 +#define MX53_PAD_KEY_COL0__ECSPI1_SCLK 0x024 0x34c 0x79c 0x5 0x0 +#define MX53_PAD_KEY_COL0__FEC_RDATA_3 0x024 0x34c 0x000 0x6 0x0 +#define MX53_PAD_KEY_COL0__SRC_ANY_PU_RST 0x024 0x34c 0x000 0x7 0x0 +#define MX53_PAD_KEY_ROW0__KPP_ROW_0 0x028 0x350 0x000 0x0 0x0 +#define MX53_PAD_KEY_ROW0__GPIO4_7 0x028 0x350 0x000 0x1 0x0 +#define MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD 0x028 0x350 0x74c 0x2 0x0 +#define MX53_PAD_KEY_ROW0__UART4_RXD_MUX 0x028 0x350 0x890 0x4 0x1 +#define MX53_PAD_KEY_ROW0__ECSPI1_MOSI 0x028 0x350 0x7a4 0x5 0x0 +#define MX53_PAD_KEY_ROW0__FEC_TX_ER 0x028 0x350 0x000 0x6 0x0 +#define MX53_PAD_KEY_COL1__KPP_COL_1 0x02c 0x354 0x000 0x0 0x0 +#define MX53_PAD_KEY_COL1__GPIO4_8 0x02c 0x354 0x000 0x1 0x0 +#define MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS 0x02c 0x354 0x75c 0x2 0x0 +#define MX53_PAD_KEY_COL1__UART5_TXD_MUX 0x02c 0x354 0x000 0x4 0x0 +#define MX53_PAD_KEY_COL1__ECSPI1_MISO 0x02c 0x354 0x7a0 0x5 0x0 +#define MX53_PAD_KEY_COL1__FEC_RX_CLK 0x02c 0x354 0x808 0x6 0x0 +#define MX53_PAD_KEY_COL1__USBPHY1_TXREADY 0x02c 0x354 0x000 0x7 0x0 +#define MX53_PAD_KEY_ROW1__KPP_ROW_1 0x030 0x358 0x000 0x0 0x0 +#define MX53_PAD_KEY_ROW1__GPIO4_9 0x030 0x358 0x000 0x1 0x0 +#define MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD 0x030 0x358 0x748 0x2 0x0 +#define MX53_PAD_KEY_ROW1__UART5_RXD_MUX 0x030 0x358 0x898 0x4 0x1 +#define MX53_PAD_KEY_ROW1__ECSPI1_SS0 0x030 0x358 0x7a8 0x5 0x0 +#define MX53_PAD_KEY_ROW1__FEC_COL 0x030 0x358 0x800 0x6 0x0 +#define MX53_PAD_KEY_ROW1__USBPHY1_RXVALID 0x030 0x358 0x000 0x7 0x0 +#define MX53_PAD_KEY_COL2__KPP_COL_2 0x034 0x35c 0x000 0x0 0x0 +#define MX53_PAD_KEY_COL2__GPIO4_10 0x034 0x35c 0x000 0x1 0x0 +#define MX53_PAD_KEY_COL2__CAN1_TXCAN 0x034 0x35c 0x000 0x2 0x0 +#define MX53_PAD_KEY_COL2__FEC_MDIO 0x034 0x35c 0x804 0x4 0x0 +#define MX53_PAD_KEY_COL2__ECSPI1_SS1 0x034 0x35c 0x7ac 0x5 0x0 +#define MX53_PAD_KEY_COL2__FEC_RDATA_2 0x034 0x35c 0x000 0x6 0x0 +#define MX53_PAD_KEY_COL2__USBPHY1_RXACTIVE 0x034 0x35c 0x000 0x7 0x0 +#define MX53_PAD_KEY_ROW2__KPP_ROW_2 0x038 0x360 0x000 0x0 0x0 +#define MX53_PAD_KEY_ROW2__GPIO4_11 0x038 0x360 0x000 0x1 0x0 +#define MX53_PAD_KEY_ROW2__CAN1_RXCAN 0x038 0x360 0x760 0x2 0x0 +#define MX53_PAD_KEY_ROW2__FEC_MDC 0x038 0x360 0x000 0x4 0x0 +#define MX53_PAD_KEY_ROW2__ECSPI1_SS2 0x038 0x360 0x7b0 0x5 0x0 +#define MX53_PAD_KEY_ROW2__FEC_TDATA_2 0x038 0x360 0x000 0x6 0x0 +#define MX53_PAD_KEY_ROW2__USBPHY1_RXERROR 0x038 0x360 0x000 0x7 0x0 +#define MX53_PAD_KEY_COL3__KPP_COL_3 0x03c 0x364 0x000 0x0 0x0 +#define MX53_PAD_KEY_COL3__GPIO4_12 0x03c 0x364 0x000 0x1 0x0 +#define MX53_PAD_KEY_COL3__USBOH3_H2_DP 0x03c 0x364 0x000 0x2 0x0 +#define MX53_PAD_KEY_COL3__SPDIF_IN1 0x03c 0x364 0x870 0x3 0x0 +#define MX53_PAD_KEY_COL3__I2C2_SCL 0x03c 0x364 0x81c 0x4 0x0 +#define MX53_PAD_KEY_COL3__ECSPI1_SS3 0x03c 0x364 0x7b4 0x5 0x0 +#define MX53_PAD_KEY_COL3__FEC_CRS 0x03c 0x364 0x000 0x6 0x0 +#define MX53_PAD_KEY_COL3__USBPHY1_SIECLOCK 0x03c 0x364 0x000 0x7 0x0 +#define MX53_PAD_KEY_ROW3__KPP_ROW_3 0x040 0x368 0x000 0x0 0x0 +#define MX53_PAD_KEY_ROW3__GPIO4_13 0x040 0x368 0x000 0x1 0x0 +#define MX53_PAD_KEY_ROW3__USBOH3_H2_DM 0x040 0x368 0x000 0x2 0x0 +#define MX53_PAD_KEY_ROW3__CCM_ASRC_EXT_CLK 0x040 0x368 0x768 0x3 0x0 +#define MX53_PAD_KEY_ROW3__I2C2_SDA 0x040 0x368 0x820 0x4 0x0 +#define MX53_PAD_KEY_ROW3__OSC32K_32K_OUT 0x040 0x368 0x000 0x5 0x0 +#define MX53_PAD_KEY_ROW3__CCM_PLL4_BYP 0x040 0x368 0x77c 0x6 0x0 +#define MX53_PAD_KEY_ROW3__USBPHY1_LINESTATE_0 0x040 0x368 0x000 0x7 0x0 +#define MX53_PAD_KEY_COL4__KPP_COL_4 0x044 0x36c 0x000 0x0 0x0 +#define MX53_PAD_KEY_COL4__GPIO4_14 0x044 0x36c 0x000 0x1 0x0 +#define MX53_PAD_KEY_COL4__CAN2_TXCAN 0x044 0x36c 0x000 0x2 0x0 +#define MX53_PAD_KEY_COL4__IPU_SISG_4 0x044 0x36c 0x000 0x3 0x0 +#define MX53_PAD_KEY_COL4__UART5_RTS 0x044 0x36c 0x894 0x4 0x0 +#define MX53_PAD_KEY_COL4__USBOH3_USBOTG_OC 0x044 0x36c 0x89c 0x5 0x0 +#define MX53_PAD_KEY_COL4__USBPHY1_LINESTATE_1 0x044 0x36c 0x000 0x7 0x0 +#define MX53_PAD_KEY_ROW4__KPP_ROW_4 0x048 0x370 0x000 0x0 0x0 +#define MX53_PAD_KEY_ROW4__GPIO4_15 0x048 0x370 0x000 0x1 0x0 +#define MX53_PAD_KEY_ROW4__CAN2_RXCAN 0x048 0x370 0x764 0x2 0x0 +#define MX53_PAD_KEY_ROW4__IPU_SISG_5 0x048 0x370 0x000 0x3 0x0 +#define MX53_PAD_KEY_ROW4__UART5_CTS 0x048 0x370 0x000 0x4 0x0 +#define MX53_PAD_KEY_ROW4__USBOH3_USBOTG_PWR 0x048 0x370 0x000 0x5 0x0 +#define MX53_PAD_KEY_ROW4__USBPHY1_VBUSVALID 0x048 0x370 0x000 0x7 0x0 +#define MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK 0x04c 0x378 0x000 0x0 0x0 +#define MX53_PAD_DI0_DISP_CLK__GPIO4_16 0x04c 0x378 0x000 0x1 0x0 +#define MX53_PAD_DI0_DISP_CLK__USBOH3_USBH2_DIR 0x04c 0x378 0x000 0x2 0x0 +#define MX53_PAD_DI0_DISP_CLK__SDMA_DEBUG_CORE_STATE_0 0x04c 0x378 0x000 0x5 0x0 +#define MX53_PAD_DI0_DISP_CLK__EMI_EMI_DEBUG_0 0x04c 0x378 0x000 0x6 0x0 +#define MX53_PAD_DI0_DISP_CLK__USBPHY1_AVALID 0x04c 0x378 0x000 0x7 0x0 +#define MX53_PAD_DI0_PIN15__IPU_DI0_PIN15 0x050 0x37c 0x000 0x0 0x0 +#define MX53_PAD_DI0_PIN15__GPIO4_17 0x050 0x37c 0x000 0x1 0x0 +#define MX53_PAD_DI0_PIN15__AUDMUX_AUD6_TXC 0x050 0x37c 0x000 0x2 0x0 +#define MX53_PAD_DI0_PIN15__SDMA_DEBUG_CORE_STATE_1 0x050 0x37c 0x000 0x5 0x0 +#define MX53_PAD_DI0_PIN15__EMI_EMI_DEBUG_1 0x050 0x37c 0x000 0x6 0x0 +#define MX53_PAD_DI0_PIN15__USBPHY1_BVALID 0x050 0x37c 0x000 0x7 0x0 +#define MX53_PAD_DI0_PIN2__IPU_DI0_PIN2 0x054 0x380 0x000 0x0 0x0 +#define MX53_PAD_DI0_PIN2__GPIO4_18 0x054 0x380 0x000 0x1 0x0 +#define MX53_PAD_DI0_PIN2__AUDMUX_AUD6_TXD 0x054 0x380 0x000 0x2 0x0 +#define MX53_PAD_DI0_PIN2__SDMA_DEBUG_CORE_STATE_2 0x054 0x380 0x000 0x5 0x0 +#define MX53_PAD_DI0_PIN2__EMI_EMI_DEBUG_2 0x054 0x380 0x000 0x6 0x0 +#define MX53_PAD_DI0_PIN2__USBPHY1_ENDSESSION 0x054 0x380 0x000 0x7 0x0 +#define MX53_PAD_DI0_PIN3__IPU_DI0_PIN3 0x058 0x384 0x000 0x0 0x0 +#define MX53_PAD_DI0_PIN3__GPIO4_19 0x058 0x384 0x000 0x1 0x0 +#define MX53_PAD_DI0_PIN3__AUDMUX_AUD6_TXFS 0x058 0x384 0x000 0x2 0x0 +#define MX53_PAD_DI0_PIN3__SDMA_DEBUG_CORE_STATE_3 0x058 0x384 0x000 0x5 0x0 +#define MX53_PAD_DI0_PIN3__EMI_EMI_DEBUG_3 0x058 0x384 0x000 0x6 0x0 +#define MX53_PAD_DI0_PIN3__USBPHY1_IDDIG 0x058 0x384 0x000 0x7 0x0 +#define MX53_PAD_DI0_PIN4__IPU_DI0_PIN4 0x05c 0x388 0x000 0x0 0x0 +#define MX53_PAD_DI0_PIN4__GPIO4_20 0x05c 0x388 0x000 0x1 0x0 +#define MX53_PAD_DI0_PIN4__AUDMUX_AUD6_RXD 0x05c 0x388 0x000 0x2 0x0 +#define MX53_PAD_DI0_PIN4__ESDHC1_WP 0x05c 0x388 0x7fc 0x3 0x0 +#define MX53_PAD_DI0_PIN4__SDMA_DEBUG_YIELD 0x05c 0x388 0x000 0x5 0x0 +#define MX53_PAD_DI0_PIN4__EMI_EMI_DEBUG_4 0x05c 0x388 0x000 0x6 0x0 +#define MX53_PAD_DI0_PIN4__USBPHY1_HOSTDISCONNECT 0x05c 0x388 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT0__IPU_DISP0_DAT_0 0x060 0x38c 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT0__GPIO4_21 0x060 0x38c 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT0__CSPI_SCLK 0x060 0x38c 0x780 0x2 0x0 +#define MX53_PAD_DISP0_DAT0__USBOH3_USBH2_DATA_0 0x060 0x38c 0x000 0x3 0x0 +#define MX53_PAD_DISP0_DAT0__SDMA_DEBUG_CORE_RUN 0x060 0x38c 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT0__EMI_EMI_DEBUG_5 0x060 0x38c 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT0__USBPHY2_TXREADY 0x060 0x38c 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT1__IPU_DISP0_DAT_1 0x064 0x390 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT1__GPIO4_22 0x064 0x390 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT1__CSPI_MOSI 0x064 0x390 0x788 0x2 0x0 +#define MX53_PAD_DISP0_DAT1__USBOH3_USBH2_DATA_1 0x064 0x390 0x000 0x3 0x0 +#define MX53_PAD_DISP0_DAT1__SDMA_DEBUG_EVENT_CHANNEL_SEL 0x064 0x390 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT1__EMI_EMI_DEBUG_6 0x064 0x390 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT1__USBPHY2_RXVALID 0x064 0x390 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT2__IPU_DISP0_DAT_2 0x068 0x394 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT2__GPIO4_23 0x068 0x394 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT2__CSPI_MISO 0x068 0x394 0x784 0x2 0x0 +#define MX53_PAD_DISP0_DAT2__USBOH3_USBH2_DATA_2 0x068 0x394 0x000 0x3 0x0 +#define MX53_PAD_DISP0_DAT2__SDMA_DEBUG_MODE 0x068 0x394 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT2__EMI_EMI_DEBUG_7 0x068 0x394 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT2__USBPHY2_RXACTIVE 0x068 0x394 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT3__IPU_DISP0_DAT_3 0x06c 0x398 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT3__GPIO4_24 0x06c 0x398 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT3__CSPI_SS0 0x06c 0x398 0x78c 0x2 0x0 +#define MX53_PAD_DISP0_DAT3__USBOH3_USBH2_DATA_3 0x06c 0x398 0x000 0x3 0x0 +#define MX53_PAD_DISP0_DAT3__SDMA_DEBUG_BUS_ERROR 0x06c 0x398 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT3__EMI_EMI_DEBUG_8 0x06c 0x398 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT3__USBPHY2_RXERROR 0x06c 0x398 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT4__IPU_DISP0_DAT_4 0x070 0x39c 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT4__GPIO4_25 0x070 0x39c 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT4__CSPI_SS1 0x070 0x39c 0x790 0x2 0x0 +#define MX53_PAD_DISP0_DAT4__USBOH3_USBH2_DATA_4 0x070 0x39c 0x000 0x3 0x0 +#define MX53_PAD_DISP0_DAT4__SDMA_DEBUG_BUS_RWB 0x070 0x39c 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT4__EMI_EMI_DEBUG_9 0x070 0x39c 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT4__USBPHY2_SIECLOCK 0x070 0x39c 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT5__IPU_DISP0_DAT_5 0x074 0x3a0 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT5__GPIO4_26 0x074 0x3a0 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT5__CSPI_SS2 0x074 0x3a0 0x794 0x2 0x0 +#define MX53_PAD_DISP0_DAT5__USBOH3_USBH2_DATA_5 0x074 0x3a0 0x000 0x3 0x0 +#define MX53_PAD_DISP0_DAT5__SDMA_DEBUG_MATCHED_DMBUS 0x074 0x3a0 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT5__EMI_EMI_DEBUG_10 0x074 0x3a0 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT5__USBPHY2_LINESTATE_0 0x074 0x3a0 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT6__IPU_DISP0_DAT_6 0x078 0x3a4 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT6__GPIO4_27 0x078 0x3a4 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT6__CSPI_SS3 0x078 0x3a4 0x798 0x2 0x0 +#define MX53_PAD_DISP0_DAT6__USBOH3_USBH2_DATA_6 0x078 0x3a4 0x000 0x3 0x0 +#define MX53_PAD_DISP0_DAT6__SDMA_DEBUG_RTBUFFER_WRITE 0x078 0x3a4 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT6__EMI_EMI_DEBUG_11 0x078 0x3a4 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT6__USBPHY2_LINESTATE_1 0x078 0x3a4 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT7__IPU_DISP0_DAT_7 0x07c 0x3a8 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT7__GPIO4_28 0x07c 0x3a8 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT7__CSPI_RDY 0x07c 0x3a8 0x000 0x2 0x0 +#define MX53_PAD_DISP0_DAT7__USBOH3_USBH2_DATA_7 0x07c 0x3a8 0x000 0x3 0x0 +#define MX53_PAD_DISP0_DAT7__SDMA_DEBUG_EVENT_CHANNEL_0 0x07c 0x3a8 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT7__EMI_EMI_DEBUG_12 0x07c 0x3a8 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT7__USBPHY2_VBUSVALID 0x07c 0x3a8 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT8__IPU_DISP0_DAT_8 0x080 0x3ac 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT8__GPIO4_29 0x080 0x3ac 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT8__PWM1_PWMO 0x080 0x3ac 0x000 0x2 0x0 +#define MX53_PAD_DISP0_DAT8__WDOG1_WDOG_B 0x080 0x3ac 0x000 0x3 0x0 +#define MX53_PAD_DISP0_DAT8__SDMA_DEBUG_EVENT_CHANNEL_1 0x080 0x3ac 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT8__EMI_EMI_DEBUG_13 0x080 0x3ac 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT8__USBPHY2_AVALID 0x080 0x3ac 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT9__IPU_DISP0_DAT_9 0x084 0x3b0 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT9__GPIO4_30 0x084 0x3b0 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT9__PWM2_PWMO 0x084 0x3b0 0x000 0x2 0x0 +#define MX53_PAD_DISP0_DAT9__WDOG2_WDOG_B 0x084 0x3b0 0x000 0x3 0x0 +#define MX53_PAD_DISP0_DAT9__SDMA_DEBUG_EVENT_CHANNEL_2 0x084 0x3b0 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT9__EMI_EMI_DEBUG_14 0x084 0x3b0 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT9__USBPHY2_VSTATUS_0 0x084 0x3b0 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT10__IPU_DISP0_DAT_10 0x088 0x3b4 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT10__GPIO4_31 0x088 0x3b4 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT10__USBOH3_USBH2_STP 0x088 0x3b4 0x000 0x2 0x0 +#define MX53_PAD_DISP0_DAT10__SDMA_DEBUG_EVENT_CHANNEL_3 0x088 0x3b4 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT10__EMI_EMI_DEBUG_15 0x088 0x3b4 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT10__USBPHY2_VSTATUS_1 0x088 0x3b4 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT11__IPU_DISP0_DAT_11 0x08c 0x3b8 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT11__GPIO5_5 0x08c 0x3b8 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT11__USBOH3_USBH2_NXT 0x08c 0x3b8 0x000 0x2 0x0 +#define MX53_PAD_DISP0_DAT11__SDMA_DEBUG_EVENT_CHANNEL_4 0x08c 0x3b8 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT11__EMI_EMI_DEBUG_16 0x08c 0x3b8 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT11__USBPHY2_VSTATUS_2 0x08c 0x3b8 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT12__IPU_DISP0_DAT_12 0x090 0x3bc 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT12__GPIO5_6 0x090 0x3bc 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT12__USBOH3_USBH2_CLK 0x090 0x3bc 0x000 0x2 0x0 +#define MX53_PAD_DISP0_DAT12__SDMA_DEBUG_EVENT_CHANNEL_5 0x090 0x3bc 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT12__EMI_EMI_DEBUG_17 0x090 0x3bc 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT12__USBPHY2_VSTATUS_3 0x090 0x3bc 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT13__IPU_DISP0_DAT_13 0x094 0x3c0 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT13__GPIO5_7 0x094 0x3c0 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT13__AUDMUX_AUD5_RXFS 0x094 0x3c0 0x754 0x3 0x0 +#define MX53_PAD_DISP0_DAT13__SDMA_DEBUG_EVT_CHN_LINES_0 0x094 0x3c0 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT13__EMI_EMI_DEBUG_18 0x094 0x3c0 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT13__USBPHY2_VSTATUS_4 0x094 0x3c0 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT14__IPU_DISP0_DAT_14 0x098 0x3c4 0x000 0x0 0x0 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 02:21:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BAF17482; Fri, 5 Sep 2014 02:21:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5E7C17FC; Fri, 5 Sep 2014 02:21:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s852LjqB006013; Fri, 5 Sep 2014 02:21:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s852LjQg006010; Fri, 5 Sep 2014 02:21:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201409050221.s852LjQg006010@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 5 Sep 2014 02:21:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271151 - head/sys/gnu/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 02:21:45 -0000 Author: imp Date: Fri Sep 5 02:21:45 2014 New Revision: 271151 URL: http://svnweb.freebsd.org/changeset/base/271151 Log: Merge forgotten .h files from vendor branch. Added: head/sys/gnu/dts/arm/imx51-pinfunc.h - copied unchanged from r271150, vendor/device-tree/dist/src/arm/imx51-pinfunc.h head/sys/gnu/dts/arm/imx53-pinfunc.h - copied unchanged from r271150, vendor/device-tree/dist/src/arm/imx53-pinfunc.h head/sys/gnu/dts/arm/imx6dl-pinfunc.h - copied unchanged from r271150, vendor/device-tree/dist/src/arm/imx6dl-pinfunc.h head/sys/gnu/dts/arm/imx6q-pinfunc.h - copied unchanged from r271150, vendor/device-tree/dist/src/arm/imx6q-pinfunc.h head/sys/gnu/dts/arm/imx6sl-pinfunc.h - copied unchanged from r271150, vendor/device-tree/dist/src/arm/imx6sl-pinfunc.h Modified: Directory Properties: head/sys/gnu/dts/arm/ (props changed) Copied: head/sys/gnu/dts/arm/imx51-pinfunc.h (from r271150, vendor/device-tree/dist/src/arm/imx51-pinfunc.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/imx51-pinfunc.h Fri Sep 5 02:21:45 2014 (r271151, copy of r271150, vendor/device-tree/dist/src/arm/imx51-pinfunc.h) @@ -0,0 +1,773 @@ +/* + * Copyright 2013 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#ifndef __DTS_IMX51_PINFUNC_H +#define __DTS_IMX51_PINFUNC_H + +/* + * The pin function ID is a tuple of + * + */ +#define MX51_PAD_EIM_D16__AUD4_RXFS 0x05c 0x3f0 0x000 0x5 0x0 +#define MX51_PAD_EIM_D16__AUD5_TXD 0x05c 0x3f0 0x8d8 0x7 0x0 +#define MX51_PAD_EIM_D16__EIM_D16 0x05c 0x3f0 0x000 0x0 0x0 +#define MX51_PAD_EIM_D16__GPIO2_0 0x05c 0x3f0 0x000 0x1 0x0 +#define MX51_PAD_EIM_D16__I2C1_SDA 0x05c 0x3f0 0x9b4 0x4 0x0 +#define MX51_PAD_EIM_D16__UART2_CTS 0x05c 0x3f0 0x000 0x3 0x0 +#define MX51_PAD_EIM_D16__USBH2_DATA0 0x05c 0x3f0 0x000 0x2 0x0 +#define MX51_PAD_EIM_D17__AUD5_RXD 0x060 0x3f4 0x8d4 0x7 0x0 +#define MX51_PAD_EIM_D17__EIM_D17 0x060 0x3f4 0x000 0x0 0x0 +#define MX51_PAD_EIM_D17__GPIO2_1 0x060 0x3f4 0x000 0x1 0x0 +#define MX51_PAD_EIM_D17__UART2_RXD 0x060 0x3f4 0x9ec 0x3 0x0 +#define MX51_PAD_EIM_D17__UART3_CTS 0x060 0x3f4 0x000 0x4 0x0 +#define MX51_PAD_EIM_D17__USBH2_DATA1 0x060 0x3f4 0x000 0x2 0x0 +#define MX51_PAD_EIM_D18__AUD5_TXC 0x064 0x3f8 0x8e4 0x7 0x0 +#define MX51_PAD_EIM_D18__EIM_D18 0x064 0x3f8 0x000 0x0 0x0 +#define MX51_PAD_EIM_D18__GPIO2_2 0x064 0x3f8 0x000 0x1 0x0 +#define MX51_PAD_EIM_D18__UART2_TXD 0x064 0x3f8 0x000 0x3 0x0 +#define MX51_PAD_EIM_D18__UART3_RTS 0x064 0x3f8 0x9f0 0x4 0x1 +#define MX51_PAD_EIM_D18__USBH2_DATA2 0x064 0x3f8 0x000 0x2 0x0 +#define MX51_PAD_EIM_D19__AUD4_RXC 0x068 0x3fc 0x000 0x5 0x0 +#define MX51_PAD_EIM_D19__AUD5_TXFS 0x068 0x3fc 0x8e8 0x7 0x0 +#define MX51_PAD_EIM_D19__EIM_D19 0x068 0x3fc 0x000 0x0 0x0 +#define MX51_PAD_EIM_D19__GPIO2_3 0x068 0x3fc 0x000 0x1 0x0 +#define MX51_PAD_EIM_D19__I2C1_SCL 0x068 0x3fc 0x9b0 0x4 0x0 +#define MX51_PAD_EIM_D19__UART2_RTS 0x068 0x3fc 0x9e8 0x3 0x1 +#define MX51_PAD_EIM_D19__USBH2_DATA3 0x068 0x3fc 0x000 0x2 0x0 +#define MX51_PAD_EIM_D20__AUD4_TXD 0x06c 0x400 0x8c8 0x5 0x0 +#define MX51_PAD_EIM_D20__EIM_D20 0x06c 0x400 0x000 0x0 0x0 +#define MX51_PAD_EIM_D20__GPIO2_4 0x06c 0x400 0x000 0x1 0x0 +#define MX51_PAD_EIM_D20__SRTC_ALARM_DEB 0x06c 0x400 0x000 0x4 0x0 +#define MX51_PAD_EIM_D20__USBH2_DATA4 0x06c 0x400 0x000 0x2 0x0 +#define MX51_PAD_EIM_D21__AUD4_RXD 0x070 0x404 0x8c4 0x5 0x0 +#define MX51_PAD_EIM_D21__EIM_D21 0x070 0x404 0x000 0x0 0x0 +#define MX51_PAD_EIM_D21__GPIO2_5 0x070 0x404 0x000 0x1 0x0 +#define MX51_PAD_EIM_D21__SRTC_ALARM_DEB 0x070 0x404 0x000 0x3 0x0 +#define MX51_PAD_EIM_D21__USBH2_DATA5 0x070 0x404 0x000 0x2 0x0 +#define MX51_PAD_EIM_D22__AUD4_TXC 0x074 0x408 0x8cc 0x5 0x0 +#define MX51_PAD_EIM_D22__EIM_D22 0x074 0x408 0x000 0x0 0x0 +#define MX51_PAD_EIM_D22__GPIO2_6 0x074 0x408 0x000 0x1 0x0 +#define MX51_PAD_EIM_D22__USBH2_DATA6 0x074 0x408 0x000 0x2 0x0 +#define MX51_PAD_EIM_D23__AUD4_TXFS 0x078 0x40c 0x8d0 0x5 0x0 +#define MX51_PAD_EIM_D23__EIM_D23 0x078 0x40c 0x000 0x0 0x0 +#define MX51_PAD_EIM_D23__GPIO2_7 0x078 0x40c 0x000 0x1 0x0 +#define MX51_PAD_EIM_D23__SPDIF_OUT1 0x078 0x40c 0x000 0x4 0x0 +#define MX51_PAD_EIM_D23__USBH2_DATA7 0x078 0x40c 0x000 0x2 0x0 +#define MX51_PAD_EIM_D24__AUD6_RXFS 0x07c 0x410 0x8f8 0x5 0x0 +#define MX51_PAD_EIM_D24__EIM_D24 0x07c 0x410 0x000 0x0 0x0 +#define MX51_PAD_EIM_D24__GPIO2_8 0x07c 0x410 0x000 0x1 0x0 +#define MX51_PAD_EIM_D24__I2C2_SDA 0x07c 0x410 0x9bc 0x4 0x0 +#define MX51_PAD_EIM_D24__UART3_CTS 0x07c 0x410 0x000 0x3 0x0 +#define MX51_PAD_EIM_D24__USBOTG_DATA0 0x07c 0x410 0x000 0x2 0x0 +#define MX51_PAD_EIM_D25__EIM_D25 0x080 0x414 0x000 0x0 0x0 +#define MX51_PAD_EIM_D25__KEY_COL6 0x080 0x414 0x9c8 0x1 0x0 +#define MX51_PAD_EIM_D25__UART2_CTS 0x080 0x414 0x000 0x4 0x0 +#define MX51_PAD_EIM_D25__UART3_RXD 0x080 0x414 0x9f4 0x3 0x0 +#define MX51_PAD_EIM_D25__USBOTG_DATA1 0x080 0x414 0x000 0x2 0x0 +#define MX51_PAD_EIM_D26__EIM_D26 0x084 0x418 0x000 0x0 0x0 +#define MX51_PAD_EIM_D26__KEY_COL7 0x084 0x418 0x9cc 0x1 0x0 +#define MX51_PAD_EIM_D26__UART2_RTS 0x084 0x418 0x9e8 0x4 0x3 +#define MX51_PAD_EIM_D26__UART3_TXD 0x084 0x418 0x000 0x3 0x0 +#define MX51_PAD_EIM_D26__USBOTG_DATA2 0x084 0x418 0x000 0x2 0x0 +#define MX51_PAD_EIM_D27__AUD6_RXC 0x088 0x41c 0x8f4 0x5 0x0 +#define MX51_PAD_EIM_D27__EIM_D27 0x088 0x41c 0x000 0x0 0x0 +#define MX51_PAD_EIM_D27__GPIO2_9 0x088 0x41c 0x000 0x1 0x0 +#define MX51_PAD_EIM_D27__I2C2_SCL 0x088 0x41c 0x9b8 0x4 0x0 +#define MX51_PAD_EIM_D27__UART3_RTS 0x088 0x41c 0x9f0 0x3 0x3 +#define MX51_PAD_EIM_D27__USBOTG_DATA3 0x088 0x41c 0x000 0x2 0x0 +#define MX51_PAD_EIM_D28__AUD6_TXD 0x08c 0x420 0x8f0 0x5 0x0 +#define MX51_PAD_EIM_D28__EIM_D28 0x08c 0x420 0x000 0x0 0x0 +#define MX51_PAD_EIM_D28__KEY_ROW4 0x08c 0x420 0x9d0 0x1 0x0 +#define MX51_PAD_EIM_D28__USBOTG_DATA4 0x08c 0x420 0x000 0x2 0x0 +#define MX51_PAD_EIM_D29__AUD6_RXD 0x090 0x424 0x8ec 0x5 0x0 +#define MX51_PAD_EIM_D29__EIM_D29 0x090 0x424 0x000 0x0 0x0 +#define MX51_PAD_EIM_D29__KEY_ROW5 0x090 0x424 0x9d4 0x1 0x0 +#define MX51_PAD_EIM_D29__USBOTG_DATA5 0x090 0x424 0x000 0x2 0x0 +#define MX51_PAD_EIM_D30__AUD6_TXC 0x094 0x428 0x8fc 0x5 0x0 +#define MX51_PAD_EIM_D30__EIM_D30 0x094 0x428 0x000 0x0 0x0 +#define MX51_PAD_EIM_D30__KEY_ROW6 0x094 0x428 0x9d8 0x1 0x0 +#define MX51_PAD_EIM_D30__USBOTG_DATA6 0x094 0x428 0x000 0x2 0x0 +#define MX51_PAD_EIM_D31__AUD6_TXFS 0x098 0x42c 0x900 0x5 0x0 +#define MX51_PAD_EIM_D31__EIM_D31 0x098 0x42c 0x000 0x0 0x0 +#define MX51_PAD_EIM_D31__KEY_ROW7 0x098 0x42c 0x9dc 0x1 0x0 +#define MX51_PAD_EIM_D31__USBOTG_DATA7 0x098 0x42c 0x000 0x2 0x0 +#define MX51_PAD_EIM_A16__EIM_A16 0x09c 0x430 0x000 0x0 0x0 +#define MX51_PAD_EIM_A16__GPIO2_10 0x09c 0x430 0x000 0x1 0x0 +#define MX51_PAD_EIM_A16__OSC_FREQ_SEL0 0x09c 0x430 0x000 0x7 0x0 +#define MX51_PAD_EIM_A17__EIM_A17 0x0a0 0x434 0x000 0x0 0x0 +#define MX51_PAD_EIM_A17__GPIO2_11 0x0a0 0x434 0x000 0x1 0x0 +#define MX51_PAD_EIM_A17__OSC_FREQ_SEL1 0x0a0 0x434 0x000 0x7 0x0 +#define MX51_PAD_EIM_A18__BOOT_LPB0 0x0a4 0x438 0x000 0x7 0x0 +#define MX51_PAD_EIM_A18__EIM_A18 0x0a4 0x438 0x000 0x0 0x0 +#define MX51_PAD_EIM_A18__GPIO2_12 0x0a4 0x438 0x000 0x1 0x0 +#define MX51_PAD_EIM_A19__BOOT_LPB1 0x0a8 0x43c 0x000 0x7 0x0 +#define MX51_PAD_EIM_A19__EIM_A19 0x0a8 0x43c 0x000 0x0 0x0 +#define MX51_PAD_EIM_A19__GPIO2_13 0x0a8 0x43c 0x000 0x1 0x0 +#define MX51_PAD_EIM_A20__BOOT_UART_SRC0 0x0ac 0x440 0x000 0x7 0x0 +#define MX51_PAD_EIM_A20__EIM_A20 0x0ac 0x440 0x000 0x0 0x0 +#define MX51_PAD_EIM_A20__GPIO2_14 0x0ac 0x440 0x000 0x1 0x0 +#define MX51_PAD_EIM_A21__BOOT_UART_SRC1 0x0b0 0x444 0x000 0x7 0x0 +#define MX51_PAD_EIM_A21__EIM_A21 0x0b0 0x444 0x000 0x0 0x0 +#define MX51_PAD_EIM_A21__GPIO2_15 0x0b0 0x444 0x000 0x1 0x0 +#define MX51_PAD_EIM_A22__EIM_A22 0x0b4 0x448 0x000 0x0 0x0 +#define MX51_PAD_EIM_A22__GPIO2_16 0x0b4 0x448 0x000 0x1 0x0 +#define MX51_PAD_EIM_A23__BOOT_HPN_EN 0x0b8 0x44c 0x000 0x7 0x0 +#define MX51_PAD_EIM_A23__EIM_A23 0x0b8 0x44c 0x000 0x0 0x0 +#define MX51_PAD_EIM_A23__GPIO2_17 0x0b8 0x44c 0x000 0x1 0x0 +#define MX51_PAD_EIM_A24__EIM_A24 0x0bc 0x450 0x000 0x0 0x0 +#define MX51_PAD_EIM_A24__GPIO2_18 0x0bc 0x450 0x000 0x1 0x0 +#define MX51_PAD_EIM_A24__USBH2_CLK 0x0bc 0x450 0x000 0x2 0x0 +#define MX51_PAD_EIM_A25__DISP1_PIN4 0x0c0 0x454 0x000 0x6 0x0 +#define MX51_PAD_EIM_A25__EIM_A25 0x0c0 0x454 0x000 0x0 0x0 +#define MX51_PAD_EIM_A25__GPIO2_19 0x0c0 0x454 0x000 0x1 0x0 +#define MX51_PAD_EIM_A25__USBH2_DIR 0x0c0 0x454 0x000 0x2 0x0 +#define MX51_PAD_EIM_A26__CSI1_DATA_EN 0x0c4 0x458 0x9a0 0x5 0x0 +#define MX51_PAD_EIM_A26__DISP2_EXT_CLK 0x0c4 0x458 0x908 0x6 0x0 +#define MX51_PAD_EIM_A26__EIM_A26 0x0c4 0x458 0x000 0x0 0x0 +#define MX51_PAD_EIM_A26__GPIO2_20 0x0c4 0x458 0x000 0x1 0x0 +#define MX51_PAD_EIM_A26__USBH2_STP 0x0c4 0x458 0x000 0x2 0x0 +#define MX51_PAD_EIM_A27__CSI2_DATA_EN 0x0c8 0x45c 0x99c 0x5 0x0 +#define MX51_PAD_EIM_A27__DISP1_PIN1 0x0c8 0x45c 0x9a4 0x6 0x0 +#define MX51_PAD_EIM_A27__EIM_A27 0x0c8 0x45c 0x000 0x0 0x0 +#define MX51_PAD_EIM_A27__GPIO2_21 0x0c8 0x45c 0x000 0x1 0x0 +#define MX51_PAD_EIM_A27__USBH2_NXT 0x0c8 0x45c 0x000 0x2 0x0 +#define MX51_PAD_EIM_EB0__EIM_EB0 0x0cc 0x460 0x000 0x0 0x0 +#define MX51_PAD_EIM_EB1__EIM_EB1 0x0d0 0x464 0x000 0x0 0x0 +#define MX51_PAD_EIM_EB2__AUD5_RXFS 0x0d4 0x468 0x8e0 0x6 0x0 +#define MX51_PAD_EIM_EB2__CSI1_D2 0x0d4 0x468 0x000 0x5 0x0 +#define MX51_PAD_EIM_EB2__EIM_EB2 0x0d4 0x468 0x000 0x0 0x0 +#define MX51_PAD_EIM_EB2__FEC_MDIO 0x0d4 0x468 0x954 0x3 0x0 +#define MX51_PAD_EIM_EB2__GPIO2_22 0x0d4 0x468 0x000 0x1 0x0 +#define MX51_PAD_EIM_EB2__GPT_CMPOUT1 0x0d4 0x468 0x000 0x7 0x0 +#define MX51_PAD_EIM_EB3__AUD5_RXC 0x0d8 0x46c 0x8dc 0x6 0x0 +#define MX51_PAD_EIM_EB3__CSI1_D3 0x0d8 0x46c 0x000 0x5 0x0 +#define MX51_PAD_EIM_EB3__EIM_EB3 0x0d8 0x46c 0x000 0x0 0x0 +#define MX51_PAD_EIM_EB3__FEC_RDATA1 0x0d8 0x46c 0x95c 0x3 0x0 +#define MX51_PAD_EIM_EB3__GPIO2_23 0x0d8 0x46c 0x000 0x1 0x0 +#define MX51_PAD_EIM_EB3__GPT_CMPOUT2 0x0d8 0x46c 0x000 0x7 0x0 +#define MX51_PAD_EIM_OE__EIM_OE 0x0dc 0x470 0x000 0x0 0x0 +#define MX51_PAD_EIM_OE__GPIO2_24 0x0dc 0x470 0x000 0x1 0x0 +#define MX51_PAD_EIM_CS0__EIM_CS0 0x0e0 0x474 0x000 0x0 0x0 +#define MX51_PAD_EIM_CS0__GPIO2_25 0x0e0 0x474 0x000 0x1 0x0 +#define MX51_PAD_EIM_CS1__EIM_CS1 0x0e4 0x478 0x000 0x0 0x0 +#define MX51_PAD_EIM_CS1__GPIO2_26 0x0e4 0x478 0x000 0x1 0x0 +#define MX51_PAD_EIM_CS2__AUD5_TXD 0x0e8 0x47c 0x8d8 0x6 0x1 +#define MX51_PAD_EIM_CS2__CSI1_D4 0x0e8 0x47c 0x000 0x5 0x0 +#define MX51_PAD_EIM_CS2__EIM_CS2 0x0e8 0x47c 0x000 0x0 0x0 +#define MX51_PAD_EIM_CS2__FEC_RDATA2 0x0e8 0x47c 0x960 0x3 0x0 +#define MX51_PAD_EIM_CS2__GPIO2_27 0x0e8 0x47c 0x000 0x1 0x0 +#define MX51_PAD_EIM_CS2__USBOTG_STP 0x0e8 0x47c 0x000 0x2 0x0 +#define MX51_PAD_EIM_CS3__AUD5_RXD 0x0ec 0x480 0x8d4 0x6 0x1 +#define MX51_PAD_EIM_CS3__CSI1_D5 0x0ec 0x480 0x000 0x5 0x0 +#define MX51_PAD_EIM_CS3__EIM_CS3 0x0ec 0x480 0x000 0x0 0x0 +#define MX51_PAD_EIM_CS3__FEC_RDATA3 0x0ec 0x480 0x964 0x3 0x0 +#define MX51_PAD_EIM_CS3__GPIO2_28 0x0ec 0x480 0x000 0x1 0x0 +#define MX51_PAD_EIM_CS3__USBOTG_NXT 0x0ec 0x480 0x000 0x2 0x0 +#define MX51_PAD_EIM_CS4__AUD5_TXC 0x0f0 0x484 0x8e4 0x6 0x1 +#define MX51_PAD_EIM_CS4__CSI1_D6 0x0f0 0x484 0x000 0x5 0x0 +#define MX51_PAD_EIM_CS4__EIM_CS4 0x0f0 0x484 0x000 0x0 0x0 +#define MX51_PAD_EIM_CS4__FEC_RX_ER 0x0f0 0x484 0x970 0x3 0x0 +#define MX51_PAD_EIM_CS4__GPIO2_29 0x0f0 0x484 0x000 0x1 0x0 +#define MX51_PAD_EIM_CS4__USBOTG_CLK 0x0f0 0x484 0x000 0x2 0x0 +#define MX51_PAD_EIM_CS5__AUD5_TXFS 0x0f4 0x488 0x8e8 0x6 0x1 +#define MX51_PAD_EIM_CS5__CSI1_D7 0x0f4 0x488 0x000 0x5 0x0 +#define MX51_PAD_EIM_CS5__DISP1_EXT_CLK 0x0f4 0x488 0x904 0x4 0x0 +#define MX51_PAD_EIM_CS5__EIM_CS5 0x0f4 0x488 0x000 0x0 0x0 +#define MX51_PAD_EIM_CS5__FEC_CRS 0x0f4 0x488 0x950 0x3 0x0 +#define MX51_PAD_EIM_CS5__GPIO2_30 0x0f4 0x488 0x000 0x1 0x0 +#define MX51_PAD_EIM_CS5__USBOTG_DIR 0x0f4 0x488 0x000 0x2 0x0 +#define MX51_PAD_EIM_DTACK__EIM_DTACK 0x0f8 0x48c 0x000 0x0 0x0 +#define MX51_PAD_EIM_DTACK__GPIO2_31 0x0f8 0x48c 0x000 0x1 0x0 +#define MX51_PAD_EIM_LBA__EIM_LBA 0x0fc 0x494 0x000 0x0 0x0 +#define MX51_PAD_EIM_LBA__GPIO3_1 0x0fc 0x494 0x978 0x1 0x0 +#define MX51_PAD_EIM_CRE__EIM_CRE 0x100 0x4a0 0x000 0x0 0x0 +#define MX51_PAD_EIM_CRE__GPIO3_2 0x100 0x4a0 0x97c 0x1 0x0 +#define MX51_PAD_DRAM_CS1__DRAM_CS1 0x104 0x4d0 0x000 0x0 0x0 +#define MX51_PAD_NANDF_WE_B__GPIO3_3 0x108 0x4e4 0x980 0x3 0x0 +#define MX51_PAD_NANDF_WE_B__NANDF_WE_B 0x108 0x4e4 0x000 0x0 0x0 +#define MX51_PAD_NANDF_WE_B__PATA_DIOW 0x108 0x4e4 0x000 0x1 0x0 +#define MX51_PAD_NANDF_WE_B__SD3_DATA0 0x108 0x4e4 0x93c 0x2 0x0 +#define MX51_PAD_NANDF_RE_B__GPIO3_4 0x10c 0x4e8 0x984 0x3 0x0 +#define MX51_PAD_NANDF_RE_B__NANDF_RE_B 0x10c 0x4e8 0x000 0x0 0x0 +#define MX51_PAD_NANDF_RE_B__PATA_DIOR 0x10c 0x4e8 0x000 0x1 0x0 +#define MX51_PAD_NANDF_RE_B__SD3_DATA1 0x10c 0x4e8 0x940 0x2 0x0 +#define MX51_PAD_NANDF_ALE__GPIO3_5 0x110 0x4ec 0x988 0x3 0x0 +#define MX51_PAD_NANDF_ALE__NANDF_ALE 0x110 0x4ec 0x000 0x0 0x0 +#define MX51_PAD_NANDF_ALE__PATA_BUFFER_EN 0x110 0x4ec 0x000 0x1 0x0 +#define MX51_PAD_NANDF_CLE__GPIO3_6 0x114 0x4f0 0x98c 0x3 0x0 +#define MX51_PAD_NANDF_CLE__NANDF_CLE 0x114 0x4f0 0x000 0x0 0x0 +#define MX51_PAD_NANDF_CLE__PATA_RESET_B 0x114 0x4f0 0x000 0x1 0x0 +#define MX51_PAD_NANDF_WP_B__GPIO3_7 0x118 0x4f4 0x990 0x3 0x0 +#define MX51_PAD_NANDF_WP_B__NANDF_WP_B 0x118 0x4f4 0x000 0x0 0x0 +#define MX51_PAD_NANDF_WP_B__PATA_DMACK 0x118 0x4f4 0x000 0x1 0x0 +#define MX51_PAD_NANDF_WP_B__SD3_DATA2 0x118 0x4f4 0x944 0x2 0x0 +#define MX51_PAD_NANDF_RB0__ECSPI2_SS1 0x11c 0x4f8 0x930 0x5 0x0 +#define MX51_PAD_NANDF_RB0__GPIO3_8 0x11c 0x4f8 0x994 0x3 0x0 +#define MX51_PAD_NANDF_RB0__NANDF_RB0 0x11c 0x4f8 0x000 0x0 0x0 +#define MX51_PAD_NANDF_RB0__PATA_DMARQ 0x11c 0x4f8 0x000 0x1 0x0 +#define MX51_PAD_NANDF_RB0__SD3_DATA3 0x11c 0x4f8 0x948 0x2 0x0 +#define MX51_PAD_NANDF_RB1__CSPI_MOSI 0x120 0x4fc 0x91c 0x6 0x0 +#define MX51_PAD_NANDF_RB1__ECSPI2_RDY 0x120 0x4fc 0x000 0x2 0x0 +#define MX51_PAD_NANDF_RB1__GPIO3_9 0x120 0x4fc 0x000 0x3 0x0 +#define MX51_PAD_NANDF_RB1__NANDF_RB1 0x120 0x4fc 0x000 0x0 0x0 +#define MX51_PAD_NANDF_RB1__PATA_IORDY 0x120 0x4fc 0x000 0x1 0x0 +#define MX51_PAD_NANDF_RB1__SD4_CMD 0x120 0x4fc 0x000 0x5 0x0 +#define MX51_PAD_NANDF_RB2__DISP2_WAIT 0x124 0x500 0x9a8 0x5 0x0 +#define MX51_PAD_NANDF_RB2__ECSPI2_SCLK 0x124 0x500 0x000 0x2 0x0 +#define MX51_PAD_NANDF_RB2__FEC_COL 0x124 0x500 0x94c 0x1 0x0 +#define MX51_PAD_NANDF_RB2__GPIO3_10 0x124 0x500 0x000 0x3 0x0 +#define MX51_PAD_NANDF_RB2__NANDF_RB2 0x124 0x500 0x000 0x0 0x0 +#define MX51_PAD_NANDF_RB2__USBH3_H3_DP 0x124 0x500 0x000 0x7 0x0 +#define MX51_PAD_NANDF_RB2__USBH3_NXT 0x124 0x500 0xa20 0x6 0x0 +#define MX51_PAD_NANDF_RB3__DISP1_WAIT 0x128 0x504 0x000 0x5 0x0 +#define MX51_PAD_NANDF_RB3__ECSPI2_MISO 0x128 0x504 0x000 0x2 0x0 +#define MX51_PAD_NANDF_RB3__FEC_RX_CLK 0x128 0x504 0x968 0x1 0x0 +#define MX51_PAD_NANDF_RB3__GPIO3_11 0x128 0x504 0x000 0x3 0x0 +#define MX51_PAD_NANDF_RB3__NANDF_RB3 0x128 0x504 0x000 0x0 0x0 +#define MX51_PAD_NANDF_RB3__USBH3_CLK 0x128 0x504 0x9f8 0x6 0x0 +#define MX51_PAD_NANDF_RB3__USBH3_H3_DM 0x128 0x504 0x000 0x7 0x0 +#define MX51_PAD_GPIO_NAND__GPIO_NAND 0x12c 0x514 0x998 0x0 0x0 +#define MX51_PAD_GPIO_NAND__PATA_INTRQ 0x12c 0x514 0x000 0x1 0x0 +#define MX51_PAD_NANDF_CS0__GPIO3_16 0x130 0x518 0x000 0x3 0x0 +#define MX51_PAD_NANDF_CS0__NANDF_CS0 0x130 0x518 0x000 0x0 0x0 +#define MX51_PAD_NANDF_CS1__GPIO3_17 0x134 0x51c 0x000 0x3 0x0 +#define MX51_PAD_NANDF_CS1__NANDF_CS1 0x134 0x51c 0x000 0x0 0x0 +#define MX51_PAD_NANDF_CS2__CSPI_SCLK 0x138 0x520 0x914 0x6 0x0 +#define MX51_PAD_NANDF_CS2__FEC_TX_ER 0x138 0x520 0x000 0x2 0x0 +#define MX51_PAD_NANDF_CS2__GPIO3_18 0x138 0x520 0x000 0x3 0x0 +#define MX51_PAD_NANDF_CS2__NANDF_CS2 0x138 0x520 0x000 0x0 0x0 +#define MX51_PAD_NANDF_CS2__PATA_CS_0 0x138 0x520 0x000 0x1 0x0 +#define MX51_PAD_NANDF_CS2__SD4_CLK 0x138 0x520 0x000 0x5 0x0 +#define MX51_PAD_NANDF_CS2__USBH3_H1_DP 0x138 0x520 0x000 0x7 0x0 +#define MX51_PAD_NANDF_CS3__FEC_MDC 0x13c 0x524 0x000 0x2 0x0 +#define MX51_PAD_NANDF_CS3__GPIO3_19 0x13c 0x524 0x000 0x3 0x0 +#define MX51_PAD_NANDF_CS3__NANDF_CS3 0x13c 0x524 0x000 0x0 0x0 +#define MX51_PAD_NANDF_CS3__PATA_CS_1 0x13c 0x524 0x000 0x1 0x0 +#define MX51_PAD_NANDF_CS3__SD4_DAT0 0x13c 0x524 0x000 0x5 0x0 +#define MX51_PAD_NANDF_CS3__USBH3_H1_DM 0x13c 0x524 0x000 0x7 0x0 +#define MX51_PAD_NANDF_CS4__FEC_TDATA1 0x140 0x528 0x000 0x2 0x0 +#define MX51_PAD_NANDF_CS4__GPIO3_20 0x140 0x528 0x000 0x3 0x0 +#define MX51_PAD_NANDF_CS4__NANDF_CS4 0x140 0x528 0x000 0x0 0x0 +#define MX51_PAD_NANDF_CS4__PATA_DA_0 0x140 0x528 0x000 0x1 0x0 +#define MX51_PAD_NANDF_CS4__SD4_DAT1 0x140 0x528 0x000 0x5 0x0 +#define MX51_PAD_NANDF_CS4__USBH3_STP 0x140 0x528 0xa24 0x7 0x0 +#define MX51_PAD_NANDF_CS5__FEC_TDATA2 0x144 0x52c 0x000 0x2 0x0 +#define MX51_PAD_NANDF_CS5__GPIO3_21 0x144 0x52c 0x000 0x3 0x0 +#define MX51_PAD_NANDF_CS5__NANDF_CS5 0x144 0x52c 0x000 0x0 0x0 +#define MX51_PAD_NANDF_CS5__PATA_DA_1 0x144 0x52c 0x000 0x1 0x0 +#define MX51_PAD_NANDF_CS5__SD4_DAT2 0x144 0x52c 0x000 0x5 0x0 +#define MX51_PAD_NANDF_CS5__USBH3_DIR 0x144 0x52c 0xa1c 0x7 0x0 +#define MX51_PAD_NANDF_CS6__CSPI_SS3 0x148 0x530 0x928 0x7 0x0 +#define MX51_PAD_NANDF_CS6__FEC_TDATA3 0x148 0x530 0x000 0x2 0x0 +#define MX51_PAD_NANDF_CS6__GPIO3_22 0x148 0x530 0x000 0x3 0x0 +#define MX51_PAD_NANDF_CS6__NANDF_CS6 0x148 0x530 0x000 0x0 0x0 +#define MX51_PAD_NANDF_CS6__PATA_DA_2 0x148 0x530 0x000 0x1 0x0 +#define MX51_PAD_NANDF_CS6__SD4_DAT3 0x148 0x530 0x000 0x5 0x0 +#define MX51_PAD_NANDF_CS7__FEC_TX_EN 0x14c 0x534 0x000 0x1 0x0 +#define MX51_PAD_NANDF_CS7__GPIO3_23 0x14c 0x534 0x000 0x3 0x0 +#define MX51_PAD_NANDF_CS7__NANDF_CS7 0x14c 0x534 0x000 0x0 0x0 +#define MX51_PAD_NANDF_CS7__SD3_CLK 0x14c 0x534 0x000 0x5 0x0 +#define MX51_PAD_NANDF_RDY_INT__ECSPI2_SS0 0x150 0x538 0x000 0x2 0x0 +#define MX51_PAD_NANDF_RDY_INT__FEC_TX_CLK 0x150 0x538 0x974 0x1 0x0 +#define MX51_PAD_NANDF_RDY_INT__GPIO3_24 0x150 0x538 0x000 0x3 0x0 +#define MX51_PAD_NANDF_RDY_INT__NANDF_RDY_INT 0x150 0x538 0x938 0x0 0x0 +#define MX51_PAD_NANDF_RDY_INT__SD3_CMD 0x150 0x538 0x000 0x5 0x0 +#define MX51_PAD_NANDF_D15__ECSPI2_MOSI 0x154 0x53c 0x000 0x2 0x0 +#define MX51_PAD_NANDF_D15__GPIO3_25 0x154 0x53c 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D15__NANDF_D15 0x154 0x53c 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D15__PATA_DATA15 0x154 0x53c 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D15__SD3_DAT7 0x154 0x53c 0x000 0x5 0x0 +#define MX51_PAD_NANDF_D14__ECSPI2_SS3 0x158 0x540 0x934 0x2 0x0 +#define MX51_PAD_NANDF_D14__GPIO3_26 0x158 0x540 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D14__NANDF_D14 0x158 0x540 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D14__PATA_DATA14 0x158 0x540 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D14__SD3_DAT6 0x158 0x540 0x000 0x5 0x0 +#define MX51_PAD_NANDF_D13__ECSPI2_SS2 0x15c 0x544 0x000 0x2 0x0 +#define MX51_PAD_NANDF_D13__GPIO3_27 0x15c 0x544 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D13__NANDF_D13 0x15c 0x544 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D13__PATA_DATA13 0x15c 0x544 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D13__SD3_DAT5 0x15c 0x544 0x000 0x5 0x0 +#define MX51_PAD_NANDF_D12__ECSPI2_SS1 0x160 0x548 0x930 0x2 0x1 +#define MX51_PAD_NANDF_D12__GPIO3_28 0x160 0x548 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D12__NANDF_D12 0x160 0x548 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D12__PATA_DATA12 0x160 0x548 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D12__SD3_DAT4 0x160 0x548 0x000 0x5 0x0 +#define MX51_PAD_NANDF_D11__FEC_RX_DV 0x164 0x54c 0x96c 0x2 0x0 +#define MX51_PAD_NANDF_D11__GPIO3_29 0x164 0x54c 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D11__NANDF_D11 0x164 0x54c 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D11__PATA_DATA11 0x164 0x54c 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D11__SD3_DATA3 0x164 0x54c 0x948 0x5 0x1 +#define MX51_PAD_NANDF_D10__GPIO3_30 0x168 0x550 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D10__NANDF_D10 0x168 0x550 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D10__PATA_DATA10 0x168 0x550 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D10__SD3_DATA2 0x168 0x550 0x944 0x5 0x1 +#define MX51_PAD_NANDF_D9__FEC_RDATA0 0x16c 0x554 0x958 0x2 0x0 +#define MX51_PAD_NANDF_D9__GPIO3_31 0x16c 0x554 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D9__NANDF_D9 0x16c 0x554 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D9__PATA_DATA9 0x16c 0x554 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D9__SD3_DATA1 0x16c 0x554 0x940 0x5 0x1 +#define MX51_PAD_NANDF_D8__FEC_TDATA0 0x170 0x558 0x000 0x2 0x0 +#define MX51_PAD_NANDF_D8__GPIO4_0 0x170 0x558 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D8__NANDF_D8 0x170 0x558 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D8__PATA_DATA8 0x170 0x558 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D8__SD3_DATA0 0x170 0x558 0x93c 0x5 0x1 +#define MX51_PAD_NANDF_D7__GPIO4_1 0x174 0x55c 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D7__NANDF_D7 0x174 0x55c 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D7__PATA_DATA7 0x174 0x55c 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D7__USBH3_DATA0 0x174 0x55c 0x9fc 0x5 0x0 +#define MX51_PAD_NANDF_D6__GPIO4_2 0x178 0x560 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D6__NANDF_D6 0x178 0x560 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D6__PATA_DATA6 0x178 0x560 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D6__SD4_LCTL 0x178 0x560 0x000 0x2 0x0 +#define MX51_PAD_NANDF_D6__USBH3_DATA1 0x178 0x560 0xa00 0x5 0x0 +#define MX51_PAD_NANDF_D5__GPIO4_3 0x17c 0x564 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D5__NANDF_D5 0x17c 0x564 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D5__PATA_DATA5 0x17c 0x564 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D5__SD4_WP 0x17c 0x564 0x000 0x2 0x0 +#define MX51_PAD_NANDF_D5__USBH3_DATA2 0x17c 0x564 0xa04 0x5 0x0 +#define MX51_PAD_NANDF_D4__GPIO4_4 0x180 0x568 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D4__NANDF_D4 0x180 0x568 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D4__PATA_DATA4 0x180 0x568 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D4__SD4_CD 0x180 0x568 0x000 0x2 0x0 +#define MX51_PAD_NANDF_D4__USBH3_DATA3 0x180 0x568 0xa08 0x5 0x0 +#define MX51_PAD_NANDF_D3__GPIO4_5 0x184 0x56c 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D3__NANDF_D3 0x184 0x56c 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D3__PATA_DATA3 0x184 0x56c 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D3__SD4_DAT4 0x184 0x56c 0x000 0x2 0x0 +#define MX51_PAD_NANDF_D3__USBH3_DATA4 0x184 0x56c 0xa0c 0x5 0x0 +#define MX51_PAD_NANDF_D2__GPIO4_6 0x188 0x570 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D2__NANDF_D2 0x188 0x570 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D2__PATA_DATA2 0x188 0x570 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D2__SD4_DAT5 0x188 0x570 0x000 0x2 0x0 +#define MX51_PAD_NANDF_D2__USBH3_DATA5 0x188 0x570 0xa10 0x5 0x0 +#define MX51_PAD_NANDF_D1__GPIO4_7 0x18c 0x574 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D1__NANDF_D1 0x18c 0x574 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D1__PATA_DATA1 0x18c 0x574 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D1__SD4_DAT6 0x18c 0x574 0x000 0x2 0x0 +#define MX51_PAD_NANDF_D1__USBH3_DATA6 0x18c 0x574 0xa14 0x5 0x0 +#define MX51_PAD_NANDF_D0__GPIO4_8 0x190 0x578 0x000 0x3 0x0 +#define MX51_PAD_NANDF_D0__NANDF_D0 0x190 0x578 0x000 0x0 0x0 +#define MX51_PAD_NANDF_D0__PATA_DATA0 0x190 0x578 0x000 0x1 0x0 +#define MX51_PAD_NANDF_D0__SD4_DAT7 0x190 0x578 0x000 0x2 0x0 +#define MX51_PAD_NANDF_D0__USBH3_DATA7 0x190 0x578 0xa18 0x5 0x0 +#define MX51_PAD_CSI1_D8__CSI1_D8 0x194 0x57c 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D8__GPIO3_12 0x194 0x57c 0x998 0x3 0x1 +#define MX51_PAD_CSI1_D9__CSI1_D9 0x198 0x580 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D9__GPIO3_13 0x198 0x580 0x000 0x3 0x0 +#define MX51_PAD_CSI1_D10__CSI1_D10 0x19c 0x584 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D11__CSI1_D11 0x1a0 0x588 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D12__CSI1_D12 0x1a4 0x58c 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D13__CSI1_D13 0x1a8 0x590 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D14__CSI1_D14 0x1ac 0x594 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D15__CSI1_D15 0x1b0 0x598 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D16__CSI1_D16 0x1b4 0x59c 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D17__CSI1_D17 0x1b8 0x5a0 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D18__CSI1_D18 0x1bc 0x5a4 0x000 0x0 0x0 +#define MX51_PAD_CSI1_D19__CSI1_D19 0x1c0 0x5a8 0x000 0x0 0x0 +#define MX51_PAD_CSI1_VSYNC__CSI1_VSYNC 0x1c4 0x5ac 0x000 0x0 0x0 +#define MX51_PAD_CSI1_VSYNC__GPIO3_14 0x1c4 0x5ac 0x000 0x3 0x0 +#define MX51_PAD_CSI1_HSYNC__CSI1_HSYNC 0x1c8 0x5b0 0x000 0x0 0x0 +#define MX51_PAD_CSI1_HSYNC__GPIO3_15 0x1c8 0x5b0 0x000 0x3 0x0 +#define MX51_PAD_CSI1_PIXCLK__CSI1_PIXCLK 0x000 0x5b4 0x000 0x0 0x0 +#define MX51_PAD_CSI1_MCLK__CSI1_MCLK 0x000 0x5b8 0x000 0x0 0x0 +#define MX51_PAD_CSI2_D12__CSI2_D12 0x1cc 0x5bc 0x000 0x0 0x0 +#define MX51_PAD_CSI2_D12__GPIO4_9 0x1cc 0x5bc 0x000 0x3 0x0 +#define MX51_PAD_CSI2_D13__CSI2_D13 0x1d0 0x5c0 0x000 0x0 0x0 +#define MX51_PAD_CSI2_D13__GPIO4_10 0x1d0 0x5c0 0x000 0x3 0x0 +#define MX51_PAD_CSI2_D14__CSI2_D14 0x1d4 0x5c4 0x000 0x0 0x0 +#define MX51_PAD_CSI2_D15__CSI2_D15 0x1d8 0x5c8 0x000 0x0 0x0 +#define MX51_PAD_CSI2_D16__CSI2_D16 0x1dc 0x5cc 0x000 0x0 0x0 +#define MX51_PAD_CSI2_D17__CSI2_D17 0x1e0 0x5d0 0x000 0x0 0x0 +#define MX51_PAD_CSI2_D18__CSI2_D18 0x1e4 0x5d4 0x000 0x0 0x0 +#define MX51_PAD_CSI2_D18__GPIO4_11 0x1e4 0x5d4 0x000 0x3 0x0 +#define MX51_PAD_CSI2_D19__CSI2_D19 0x1e8 0x5d8 0x000 0x0 0x0 +#define MX51_PAD_CSI2_D19__GPIO4_12 0x1e8 0x5d8 0x000 0x3 0x0 +#define MX51_PAD_CSI2_VSYNC__CSI2_VSYNC 0x1ec 0x5dc 0x000 0x0 0x0 +#define MX51_PAD_CSI2_VSYNC__GPIO4_13 0x1ec 0x5dc 0x000 0x3 0x0 +#define MX51_PAD_CSI2_HSYNC__CSI2_HSYNC 0x1f0 0x5e0 0x000 0x0 0x0 +#define MX51_PAD_CSI2_HSYNC__GPIO4_14 0x1f0 0x5e0 0x000 0x3 0x0 +#define MX51_PAD_CSI2_PIXCLK__CSI2_PIXCLK 0x1f4 0x5e4 0x000 0x0 0x0 +#define MX51_PAD_CSI2_PIXCLK__GPIO4_15 0x1f4 0x5e4 0x000 0x3 0x0 +#define MX51_PAD_I2C1_CLK__GPIO4_16 0x1f8 0x5e8 0x000 0x3 0x0 +#define MX51_PAD_I2C1_CLK__I2C1_CLK 0x1f8 0x5e8 0x000 0x0 0x0 +#define MX51_PAD_I2C1_DAT__GPIO4_17 0x1fc 0x5ec 0x000 0x3 0x0 +#define MX51_PAD_I2C1_DAT__I2C1_DAT 0x1fc 0x5ec 0x000 0x0 0x0 +#define MX51_PAD_AUD3_BB_TXD__AUD3_TXD 0x200 0x5f0 0x000 0x0 0x0 +#define MX51_PAD_AUD3_BB_TXD__GPIO4_18 0x200 0x5f0 0x000 0x3 0x0 +#define MX51_PAD_AUD3_BB_RXD__AUD3_RXD 0x204 0x5f4 0x000 0x0 0x0 +#define MX51_PAD_AUD3_BB_RXD__GPIO4_19 0x204 0x5f4 0x000 0x3 0x0 +#define MX51_PAD_AUD3_BB_RXD__UART3_RXD 0x204 0x5f4 0x9f4 0x1 0x2 +#define MX51_PAD_AUD3_BB_CK__AUD3_TXC 0x208 0x5f8 0x000 0x0 0x0 +#define MX51_PAD_AUD3_BB_CK__GPIO4_20 0x208 0x5f8 0x000 0x3 0x0 +#define MX51_PAD_AUD3_BB_FS__AUD3_TXFS 0x20c 0x5fc 0x000 0x0 0x0 +#define MX51_PAD_AUD3_BB_FS__GPIO4_21 0x20c 0x5fc 0x000 0x3 0x0 +#define MX51_PAD_AUD3_BB_FS__UART3_TXD 0x20c 0x5fc 0x000 0x1 0x0 +#define MX51_PAD_CSPI1_MOSI__ECSPI1_MOSI 0x210 0x600 0x000 0x0 0x0 +#define MX51_PAD_CSPI1_MOSI__GPIO4_22 0x210 0x600 0x000 0x3 0x0 +#define MX51_PAD_CSPI1_MOSI__I2C1_SDA 0x210 0x600 0x9b4 0x1 0x1 +#define MX51_PAD_CSPI1_MISO__AUD4_RXD 0x214 0x604 0x8c4 0x1 0x1 +#define MX51_PAD_CSPI1_MISO__ECSPI1_MISO 0x214 0x604 0x000 0x0 0x0 +#define MX51_PAD_CSPI1_MISO__GPIO4_23 0x214 0x604 0x000 0x3 0x0 +#define MX51_PAD_CSPI1_SS0__AUD4_TXC 0x218 0x608 0x8cc 0x1 0x1 +#define MX51_PAD_CSPI1_SS0__ECSPI1_SS0 0x218 0x608 0x000 0x0 0x0 +#define MX51_PAD_CSPI1_SS0__GPIO4_24 0x218 0x608 0x000 0x3 0x0 +#define MX51_PAD_CSPI1_SS1__AUD4_TXD 0x21c 0x60c 0x8c8 0x1 0x1 +#define MX51_PAD_CSPI1_SS1__ECSPI1_SS1 0x21c 0x60c 0x000 0x0 0x0 +#define MX51_PAD_CSPI1_SS1__GPIO4_25 0x21c 0x60c 0x000 0x3 0x0 +#define MX51_PAD_CSPI1_RDY__AUD4_TXFS 0x220 0x610 0x8d0 0x1 0x1 +#define MX51_PAD_CSPI1_RDY__ECSPI1_RDY 0x220 0x610 0x000 0x0 0x0 +#define MX51_PAD_CSPI1_RDY__GPIO4_26 0x220 0x610 0x000 0x3 0x0 +#define MX51_PAD_CSPI1_SCLK__ECSPI1_SCLK 0x224 0x614 0x000 0x0 0x0 +#define MX51_PAD_CSPI1_SCLK__GPIO4_27 0x224 0x614 0x000 0x3 0x0 +#define MX51_PAD_CSPI1_SCLK__I2C1_SCL 0x224 0x614 0x9b0 0x1 0x1 +#define MX51_PAD_UART1_RXD__GPIO4_28 0x228 0x618 0x000 0x3 0x0 +#define MX51_PAD_UART1_RXD__UART1_RXD 0x228 0x618 0x9e4 0x0 0x0 +#define MX51_PAD_UART1_TXD__GPIO4_29 0x22c 0x61c 0x000 0x3 0x0 +#define MX51_PAD_UART1_TXD__PWM2_PWMO 0x22c 0x61c 0x000 0x1 0x0 +#define MX51_PAD_UART1_TXD__UART1_TXD 0x22c 0x61c 0x000 0x0 0x0 +#define MX51_PAD_UART1_RTS__GPIO4_30 0x230 0x620 0x000 0x3 0x0 +#define MX51_PAD_UART1_RTS__UART1_RTS 0x230 0x620 0x9e0 0x0 0x0 +#define MX51_PAD_UART1_CTS__GPIO4_31 0x234 0x624 0x000 0x3 0x0 +#define MX51_PAD_UART1_CTS__UART1_CTS 0x234 0x624 0x000 0x0 0x0 +#define MX51_PAD_UART2_RXD__FIRI_TXD 0x238 0x628 0x000 0x1 0x0 +#define MX51_PAD_UART2_RXD__GPIO1_20 0x238 0x628 0x000 0x3 0x0 +#define MX51_PAD_UART2_RXD__UART2_RXD 0x238 0x628 0x9ec 0x0 0x2 +#define MX51_PAD_UART2_TXD__FIRI_RXD 0x23c 0x62c 0x000 0x1 0x0 +#define MX51_PAD_UART2_TXD__GPIO1_21 0x23c 0x62c 0x000 0x3 0x0 +#define MX51_PAD_UART2_TXD__UART2_TXD 0x23c 0x62c 0x000 0x0 0x0 +#define MX51_PAD_UART3_RXD__CSI1_D0 0x240 0x630 0x000 0x2 0x0 +#define MX51_PAD_UART3_RXD__GPIO1_22 0x240 0x630 0x000 0x3 0x0 +#define MX51_PAD_UART3_RXD__UART1_DTR 0x240 0x630 0x000 0x0 0x0 +#define MX51_PAD_UART3_RXD__UART3_RXD 0x240 0x630 0x9f4 0x1 0x4 +#define MX51_PAD_UART3_TXD__CSI1_D1 0x244 0x634 0x000 0x2 0x0 +#define MX51_PAD_UART3_TXD__GPIO1_23 0x244 0x634 0x000 0x3 0x0 +#define MX51_PAD_UART3_TXD__UART1_DSR 0x244 0x634 0x000 0x0 0x0 +#define MX51_PAD_UART3_TXD__UART3_TXD 0x244 0x634 0x000 0x1 0x0 +#define MX51_PAD_OWIRE_LINE__GPIO1_24 0x248 0x638 0x000 0x3 0x0 +#define MX51_PAD_OWIRE_LINE__OWIRE_LINE 0x248 0x638 0x000 0x0 0x0 +#define MX51_PAD_OWIRE_LINE__SPDIF_OUT 0x248 0x638 0x000 0x6 0x0 +#define MX51_PAD_KEY_ROW0__KEY_ROW0 0x24c 0x63c 0x000 0x0 0x0 +#define MX51_PAD_KEY_ROW1__KEY_ROW1 0x250 0x640 0x000 0x0 0x0 +#define MX51_PAD_KEY_ROW2__KEY_ROW2 0x254 0x644 0x000 0x0 0x0 +#define MX51_PAD_KEY_ROW3__KEY_ROW3 0x258 0x648 0x000 0x0 0x0 +#define MX51_PAD_KEY_COL0__KEY_COL0 0x25c 0x64c 0x000 0x0 0x0 +#define MX51_PAD_KEY_COL0__PLL1_BYP 0x25c 0x64c 0x90c 0x7 0x0 +#define MX51_PAD_KEY_COL1__KEY_COL1 0x260 0x650 0x000 0x0 0x0 +#define MX51_PAD_KEY_COL1__PLL2_BYP 0x260 0x650 0x910 0x7 0x0 +#define MX51_PAD_KEY_COL2__KEY_COL2 0x264 0x654 0x000 0x0 0x0 +#define MX51_PAD_KEY_COL2__PLL3_BYP 0x264 0x654 0x000 0x7 0x0 +#define MX51_PAD_KEY_COL3__KEY_COL3 0x268 0x658 0x000 0x0 0x0 +#define MX51_PAD_KEY_COL4__I2C2_SCL 0x26c 0x65c 0x9b8 0x3 0x1 +#define MX51_PAD_KEY_COL4__KEY_COL4 0x26c 0x65c 0x000 0x0 0x0 +#define MX51_PAD_KEY_COL4__SPDIF_OUT1 0x26c 0x65c 0x000 0x6 0x0 +#define MX51_PAD_KEY_COL4__UART1_RI 0x26c 0x65c 0x000 0x1 0x0 +#define MX51_PAD_KEY_COL4__UART3_RTS 0x26c 0x65c 0x9f0 0x2 0x4 +#define MX51_PAD_KEY_COL5__I2C2_SDA 0x270 0x660 0x9bc 0x3 0x1 +#define MX51_PAD_KEY_COL5__KEY_COL5 0x270 0x660 0x000 0x0 0x0 +#define MX51_PAD_KEY_COL5__UART1_DCD 0x270 0x660 0x000 0x1 0x0 +#define MX51_PAD_KEY_COL5__UART3_CTS 0x270 0x660 0x000 0x2 0x0 +#define MX51_PAD_USBH1_CLK__CSPI_SCLK 0x278 0x678 0x914 0x1 0x1 +#define MX51_PAD_USBH1_CLK__GPIO1_25 0x278 0x678 0x000 0x2 0x0 +#define MX51_PAD_USBH1_CLK__I2C2_SCL 0x278 0x678 0x9b8 0x5 0x2 +#define MX51_PAD_USBH1_CLK__USBH1_CLK 0x278 0x678 0x000 0x0 0x0 +#define MX51_PAD_USBH1_DIR__CSPI_MOSI 0x27c 0x67c 0x91c 0x1 0x1 +#define MX51_PAD_USBH1_DIR__GPIO1_26 0x27c 0x67c 0x000 0x2 0x0 +#define MX51_PAD_USBH1_DIR__I2C2_SDA 0x27c 0x67c 0x9bc 0x5 0x2 +#define MX51_PAD_USBH1_DIR__USBH1_DIR 0x27c 0x67c 0x000 0x0 0x0 +#define MX51_PAD_USBH1_STP__CSPI_RDY 0x280 0x680 0x000 0x1 0x0 +#define MX51_PAD_USBH1_STP__GPIO1_27 0x280 0x680 0x000 0x2 0x0 +#define MX51_PAD_USBH1_STP__UART3_RXD 0x280 0x680 0x9f4 0x5 0x6 +#define MX51_PAD_USBH1_STP__USBH1_STP 0x280 0x680 0x000 0x0 0x0 +#define MX51_PAD_USBH1_NXT__CSPI_MISO 0x284 0x684 0x918 0x1 0x0 +#define MX51_PAD_USBH1_NXT__GPIO1_28 0x284 0x684 0x000 0x2 0x0 +#define MX51_PAD_USBH1_NXT__UART3_TXD 0x284 0x684 0x000 0x5 0x0 +#define MX51_PAD_USBH1_NXT__USBH1_NXT 0x284 0x684 0x000 0x0 0x0 +#define MX51_PAD_USBH1_DATA0__GPIO1_11 0x288 0x688 0x000 0x2 0x0 +#define MX51_PAD_USBH1_DATA0__UART2_CTS 0x288 0x688 0x000 0x1 0x0 +#define MX51_PAD_USBH1_DATA0__USBH1_DATA0 0x288 0x688 0x000 0x0 0x0 +#define MX51_PAD_USBH1_DATA1__GPIO1_12 0x28c 0x68c 0x000 0x2 0x0 +#define MX51_PAD_USBH1_DATA1__UART2_RXD 0x28c 0x68c 0x9ec 0x1 0x4 +#define MX51_PAD_USBH1_DATA1__USBH1_DATA1 0x28c 0x68c 0x000 0x0 0x0 +#define MX51_PAD_USBH1_DATA2__GPIO1_13 0x290 0x690 0x000 0x2 0x0 +#define MX51_PAD_USBH1_DATA2__UART2_TXD 0x290 0x690 0x000 0x1 0x0 +#define MX51_PAD_USBH1_DATA2__USBH1_DATA2 0x290 0x690 0x000 0x0 0x0 +#define MX51_PAD_USBH1_DATA3__GPIO1_14 0x294 0x694 0x000 0x2 0x0 +#define MX51_PAD_USBH1_DATA3__UART2_RTS 0x294 0x694 0x9e8 0x1 0x5 +#define MX51_PAD_USBH1_DATA3__USBH1_DATA3 0x294 0x694 0x000 0x0 0x0 +#define MX51_PAD_USBH1_DATA4__CSPI_SS0 0x298 0x698 0x000 0x1 0x0 +#define MX51_PAD_USBH1_DATA4__GPIO1_15 0x298 0x698 0x000 0x2 0x0 +#define MX51_PAD_USBH1_DATA4__USBH1_DATA4 0x298 0x698 0x000 0x0 0x0 +#define MX51_PAD_USBH1_DATA5__CSPI_SS1 0x29c 0x69c 0x920 0x1 0x0 +#define MX51_PAD_USBH1_DATA5__GPIO1_16 0x29c 0x69c 0x000 0x2 0x0 +#define MX51_PAD_USBH1_DATA5__USBH1_DATA5 0x29c 0x69c 0x000 0x0 0x0 +#define MX51_PAD_USBH1_DATA6__CSPI_SS3 0x2a0 0x6a0 0x928 0x1 0x1 +#define MX51_PAD_USBH1_DATA6__GPIO1_17 0x2a0 0x6a0 0x000 0x2 0x0 +#define MX51_PAD_USBH1_DATA6__USBH1_DATA6 0x2a0 0x6a0 0x000 0x0 0x0 +#define MX51_PAD_USBH1_DATA7__ECSPI1_SS3 0x2a4 0x6a4 0x000 0x1 0x0 +#define MX51_PAD_USBH1_DATA7__ECSPI2_SS3 0x2a4 0x6a4 0x934 0x5 0x1 +#define MX51_PAD_USBH1_DATA7__GPIO1_18 0x2a4 0x6a4 0x000 0x2 0x0 +#define MX51_PAD_USBH1_DATA7__USBH1_DATA7 0x2a4 0x6a4 0x000 0x0 0x0 +#define MX51_PAD_DI1_PIN11__DI1_PIN11 0x2a8 0x6a8 0x000 0x0 0x0 +#define MX51_PAD_DI1_PIN11__ECSPI1_SS2 0x2a8 0x6a8 0x000 0x7 0x0 +#define MX51_PAD_DI1_PIN11__GPIO3_0 0x2a8 0x6a8 0x000 0x4 0x0 +#define MX51_PAD_DI1_PIN12__DI1_PIN12 0x2ac 0x6ac 0x000 0x0 0x0 +#define MX51_PAD_DI1_PIN12__GPIO3_1 0x2ac 0x6ac 0x978 0x4 0x1 +#define MX51_PAD_DI1_PIN13__DI1_PIN13 0x2b0 0x6b0 0x000 0x0 0x0 +#define MX51_PAD_DI1_PIN13__GPIO3_2 0x2b0 0x6b0 0x97c 0x4 0x1 +#define MX51_PAD_DI1_D0_CS__DI1_D0_CS 0x2b4 0x6b4 0x000 0x0 0x0 +#define MX51_PAD_DI1_D0_CS__GPIO3_3 0x2b4 0x6b4 0x980 0x4 0x1 +#define MX51_PAD_DI1_D1_CS__DI1_D1_CS 0x2b8 0x6b8 0x000 0x0 0x0 +#define MX51_PAD_DI1_D1_CS__DISP1_PIN14 0x2b8 0x6b8 0x000 0x2 0x0 +#define MX51_PAD_DI1_D1_CS__DISP1_PIN5 0x2b8 0x6b8 0x000 0x3 0x0 +#define MX51_PAD_DI1_D1_CS__GPIO3_4 0x2b8 0x6b8 0x984 0x4 0x1 +#define MX51_PAD_DISPB2_SER_DIN__DISP1_PIN1 0x2bc 0x6bc 0x9a4 0x2 0x1 +#define MX51_PAD_DISPB2_SER_DIN__DISPB2_SER_DIN 0x2bc 0x6bc 0x9c4 0x0 0x0 +#define MX51_PAD_DISPB2_SER_DIN__GPIO3_5 0x2bc 0x6bc 0x988 0x4 0x1 +#define MX51_PAD_DISPB2_SER_DIO__DISP1_PIN6 0x2c0 0x6c0 0x000 0x3 0x0 +#define MX51_PAD_DISPB2_SER_DIO__DISPB2_SER_DIO 0x2c0 0x6c0 0x9c4 0x0 0x1 +#define MX51_PAD_DISPB2_SER_DIO__GPIO3_6 0x2c0 0x6c0 0x98c 0x4 0x1 +#define MX51_PAD_DISPB2_SER_CLK__DISP1_PIN17 0x2c4 0x6c4 0x000 0x2 0x0 +#define MX51_PAD_DISPB2_SER_CLK__DISP1_PIN7 0x2c4 0x6c4 0x000 0x3 0x0 +#define MX51_PAD_DISPB2_SER_CLK__DISPB2_SER_CLK 0x2c4 0x6c4 0x000 0x0 0x0 +#define MX51_PAD_DISPB2_SER_CLK__GPIO3_7 0x2c4 0x6c4 0x990 0x4 0x1 +#define MX51_PAD_DISPB2_SER_RS__DISP1_EXT_CLK 0x2c8 0x6c8 0x000 0x2 0x0 +#define MX51_PAD_DISPB2_SER_RS__DISP1_PIN16 0x2c8 0x6c8 0x000 0x2 0x0 +#define MX51_PAD_DISPB2_SER_RS__DISP1_PIN8 0x2c8 0x6c8 0x000 0x3 0x0 +#define MX51_PAD_DISPB2_SER_RS__DISPB2_SER_RS 0x2c8 0x6c8 0x000 0x0 0x0 +#define MX51_PAD_DISPB2_SER_RS__GPIO3_8 0x2c8 0x6c8 0x994 0x4 0x1 +#define MX51_PAD_DISP1_DAT0__DISP1_DAT0 0x2cc 0x6cc 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT1__DISP1_DAT1 0x2d0 0x6d0 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT2__DISP1_DAT2 0x2d4 0x6d4 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT3__DISP1_DAT3 0x2d8 0x6d8 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT4__DISP1_DAT4 0x2dc 0x6dc 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT5__DISP1_DAT5 0x2e0 0x6e0 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT6__BOOT_USB_SRC 0x2e4 0x6e4 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT6__DISP1_DAT6 0x2e4 0x6e4 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT7__BOOT_EEPROM_CFG 0x2e8 0x6e8 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT7__DISP1_DAT7 0x2e8 0x6e8 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT8__BOOT_SRC0 0x2ec 0x6ec 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT8__DISP1_DAT8 0x2ec 0x6ec 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT9__BOOT_SRC1 0x2f0 0x6f0 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT9__DISP1_DAT9 0x2f0 0x6f0 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT10__BOOT_SPARE_SIZE 0x2f4 0x6f4 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT10__DISP1_DAT10 0x2f4 0x6f4 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT11__BOOT_LPB_FREQ2 0x2f8 0x6f8 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT11__DISP1_DAT11 0x2f8 0x6f8 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT12__BOOT_MLC_SEL 0x2fc 0x6fc 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT12__DISP1_DAT12 0x2fc 0x6fc 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT13__BOOT_MEM_CTL0 0x300 0x700 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT13__DISP1_DAT13 0x300 0x700 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT14__BOOT_MEM_CTL1 0x304 0x704 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT14__DISP1_DAT14 0x304 0x704 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT15__BOOT_BUS_WIDTH 0x308 0x708 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT15__DISP1_DAT15 0x308 0x708 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT16__BOOT_PAGE_SIZE0 0x30c 0x70c 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT16__DISP1_DAT16 0x30c 0x70c 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT17__BOOT_PAGE_SIZE1 0x310 0x710 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT17__DISP1_DAT17 0x310 0x710 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT18__BOOT_WEIM_MUXED0 0x314 0x714 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT18__DISP1_DAT18 0x314 0x714 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT18__DISP2_PIN11 0x314 0x714 0x000 0x5 0x0 +#define MX51_PAD_DISP1_DAT18__DISP2_PIN5 0x314 0x714 0x000 0x4 0x0 +#define MX51_PAD_DISP1_DAT19__BOOT_WEIM_MUXED1 0x318 0x718 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT19__DISP1_DAT19 0x318 0x718 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT19__DISP2_PIN12 0x318 0x718 0x000 0x5 0x0 +#define MX51_PAD_DISP1_DAT19__DISP2_PIN6 0x318 0x718 0x000 0x4 0x0 +#define MX51_PAD_DISP1_DAT20__BOOT_MEM_TYPE0 0x31c 0x71c 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT20__DISP1_DAT20 0x31c 0x71c 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT20__DISP2_PIN13 0x31c 0x71c 0x000 0x5 0x0 +#define MX51_PAD_DISP1_DAT20__DISP2_PIN7 0x31c 0x71c 0x000 0x4 0x0 +#define MX51_PAD_DISP1_DAT21__BOOT_MEM_TYPE1 0x320 0x720 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT21__DISP1_DAT21 0x320 0x720 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT21__DISP2_PIN14 0x320 0x720 0x000 0x5 0x0 +#define MX51_PAD_DISP1_DAT21__DISP2_PIN8 0x320 0x720 0x000 0x4 0x0 +#define MX51_PAD_DISP1_DAT22__BOOT_LPB_FREQ0 0x324 0x724 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT22__DISP1_DAT22 0x324 0x724 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT22__DISP2_D0_CS 0x324 0x724 0x000 0x6 0x0 +#define MX51_PAD_DISP1_DAT22__DISP2_DAT16 0x324 0x724 0x000 0x5 0x0 +#define MX51_PAD_DISP1_DAT23__BOOT_LPB_FREQ1 0x328 0x728 0x000 0x7 0x0 +#define MX51_PAD_DISP1_DAT23__DISP1_DAT23 0x328 0x728 0x000 0x0 0x0 +#define MX51_PAD_DISP1_DAT23__DISP2_D1_CS 0x328 0x728 0x000 0x6 0x0 +#define MX51_PAD_DISP1_DAT23__DISP2_DAT17 0x328 0x728 0x000 0x5 0x0 +#define MX51_PAD_DISP1_DAT23__DISP2_SER_CS 0x328 0x728 0x000 0x4 0x0 +#define MX51_PAD_DI1_PIN3__DI1_PIN3 0x32c 0x72c 0x000 0x0 0x0 +#define MX51_PAD_DI1_PIN2__DI1_PIN2 0x330 0x734 0x000 0x0 0x0 +#define MX51_PAD_DI_GP2__DISP1_SER_CLK 0x338 0x740 0x000 0x0 0x0 +#define MX51_PAD_DI_GP2__DISP2_WAIT 0x338 0x740 0x9a8 0x2 0x1 +#define MX51_PAD_DI_GP3__CSI1_DATA_EN 0x33c 0x744 0x9a0 0x3 0x1 +#define MX51_PAD_DI_GP3__DISP1_SER_DIO 0x33c 0x744 0x9c0 0x0 0x0 +#define MX51_PAD_DI_GP3__FEC_TX_ER 0x33c 0x744 0x000 0x2 0x0 +#define MX51_PAD_DI2_PIN4__CSI2_DATA_EN 0x340 0x748 0x99c 0x3 0x1 +#define MX51_PAD_DI2_PIN4__DI2_PIN4 0x340 0x748 0x000 0x0 0x0 +#define MX51_PAD_DI2_PIN4__FEC_CRS 0x340 0x748 0x950 0x2 0x1 +#define MX51_PAD_DI2_PIN2__DI2_PIN2 0x344 0x74c 0x000 0x0 0x0 +#define MX51_PAD_DI2_PIN2__FEC_MDC 0x344 0x74c 0x000 0x2 0x0 +#define MX51_PAD_DI2_PIN3__DI2_PIN3 0x348 0x750 0x000 0x0 0x0 +#define MX51_PAD_DI2_PIN3__FEC_MDIO 0x348 0x750 0x954 0x2 0x1 +#define MX51_PAD_DI2_DISP_CLK__DI2_DISP_CLK 0x34c 0x754 0x000 0x0 0x0 +#define MX51_PAD_DI2_DISP_CLK__FEC_RDATA1 0x34c 0x754 0x95c 0x2 0x1 +#define MX51_PAD_DI_GP4__DI2_PIN15 0x350 0x758 0x000 0x4 0x0 +#define MX51_PAD_DI_GP4__DISP1_SER_DIN 0x350 0x758 0x9c0 0x0 0x1 +#define MX51_PAD_DI_GP4__DISP2_PIN1 0x350 0x758 0x000 0x3 0x0 +#define MX51_PAD_DI_GP4__FEC_RDATA2 0x350 0x758 0x960 0x2 0x1 +#define MX51_PAD_DISP2_DAT0__DISP2_DAT0 0x354 0x75c 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT0__FEC_RDATA3 0x354 0x75c 0x964 0x2 0x1 +#define MX51_PAD_DISP2_DAT0__KEY_COL6 0x354 0x75c 0x9c8 0x4 0x1 +#define MX51_PAD_DISP2_DAT0__UART3_RXD 0x354 0x75c 0x9f4 0x5 0x8 +#define MX51_PAD_DISP2_DAT0__USBH3_CLK 0x354 0x75c 0x9f8 0x3 0x1 +#define MX51_PAD_DISP2_DAT1__DISP2_DAT1 0x358 0x760 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT1__FEC_RX_ER 0x358 0x760 0x970 0x2 0x1 +#define MX51_PAD_DISP2_DAT1__KEY_COL7 0x358 0x760 0x9cc 0x4 0x1 +#define MX51_PAD_DISP2_DAT1__UART3_TXD 0x358 0x760 0x000 0x5 0x0 +#define MX51_PAD_DISP2_DAT1__USBH3_DIR 0x358 0x760 0xa1c 0x3 0x1 +#define MX51_PAD_DISP2_DAT2__DISP2_DAT2 0x35c 0x764 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT3__DISP2_DAT3 0x360 0x768 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT4__DISP2_DAT4 0x364 0x76c 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT5__DISP2_DAT5 0x368 0x770 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT6__DISP2_DAT6 0x36c 0x774 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT6__FEC_TDATA1 0x36c 0x774 0x000 0x2 0x0 +#define MX51_PAD_DISP2_DAT6__GPIO1_19 0x36c 0x774 0x000 0x5 0x0 +#define MX51_PAD_DISP2_DAT6__KEY_ROW4 0x36c 0x774 0x9d0 0x4 0x1 +#define MX51_PAD_DISP2_DAT6__USBH3_STP 0x36c 0x774 0xa24 0x3 0x1 +#define MX51_PAD_DISP2_DAT7__DISP2_DAT7 0x370 0x778 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT7__FEC_TDATA2 0x370 0x778 0x000 0x2 0x0 +#define MX51_PAD_DISP2_DAT7__GPIO1_29 0x370 0x778 0x000 0x5 0x0 +#define MX51_PAD_DISP2_DAT7__KEY_ROW5 0x370 0x778 0x9d4 0x4 0x1 +#define MX51_PAD_DISP2_DAT7__USBH3_NXT 0x370 0x778 0xa20 0x3 0x1 +#define MX51_PAD_DISP2_DAT8__DISP2_DAT8 0x374 0x77c 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT8__FEC_TDATA3 0x374 0x77c 0x000 0x2 0x0 +#define MX51_PAD_DISP2_DAT8__GPIO1_30 0x374 0x77c 0x000 0x5 0x0 +#define MX51_PAD_DISP2_DAT8__KEY_ROW6 0x374 0x77c 0x9d8 0x4 0x1 +#define MX51_PAD_DISP2_DAT8__USBH3_DATA0 0x374 0x77c 0x9fc 0x3 0x1 +#define MX51_PAD_DISP2_DAT9__AUD6_RXC 0x378 0x780 0x8f4 0x4 0x1 +#define MX51_PAD_DISP2_DAT9__DISP2_DAT9 0x378 0x780 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT9__FEC_TX_EN 0x378 0x780 0x000 0x2 0x0 +#define MX51_PAD_DISP2_DAT9__GPIO1_31 0x378 0x780 0x000 0x5 0x0 +#define MX51_PAD_DISP2_DAT9__USBH3_DATA1 0x378 0x780 0xa00 0x3 0x1 +#define MX51_PAD_DISP2_DAT10__DISP2_DAT10 0x37c 0x784 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT10__DISP2_SER_CS 0x37c 0x784 0x000 0x5 0x0 +#define MX51_PAD_DISP2_DAT10__FEC_COL 0x37c 0x784 0x94c 0x2 0x1 +#define MX51_PAD_DISP2_DAT10__KEY_ROW7 0x37c 0x784 0x9dc 0x4 0x1 +#define MX51_PAD_DISP2_DAT10__USBH3_DATA2 0x37c 0x784 0xa04 0x3 0x1 +#define MX51_PAD_DISP2_DAT11__AUD6_TXD 0x380 0x788 0x8f0 0x4 0x1 +#define MX51_PAD_DISP2_DAT11__DISP2_DAT11 0x380 0x788 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT11__FEC_RX_CLK 0x380 0x788 0x968 0x2 0x1 +#define MX51_PAD_DISP2_DAT11__GPIO1_10 0x380 0x788 0x000 0x7 0x0 +#define MX51_PAD_DISP2_DAT11__USBH3_DATA3 0x380 0x788 0xa08 0x3 0x1 +#define MX51_PAD_DISP2_DAT12__AUD6_RXD 0x384 0x78c 0x8ec 0x4 0x1 +#define MX51_PAD_DISP2_DAT12__DISP2_DAT12 0x384 0x78c 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT12__FEC_RX_DV 0x384 0x78c 0x96c 0x2 0x1 +#define MX51_PAD_DISP2_DAT12__USBH3_DATA4 0x384 0x78c 0xa0c 0x3 0x1 +#define MX51_PAD_DISP2_DAT13__AUD6_TXC 0x388 0x790 0x8fc 0x4 0x1 +#define MX51_PAD_DISP2_DAT13__DISP2_DAT13 0x388 0x790 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT13__FEC_TX_CLK 0x388 0x790 0x974 0x2 0x1 +#define MX51_PAD_DISP2_DAT13__USBH3_DATA5 0x388 0x790 0xa10 0x3 0x1 +#define MX51_PAD_DISP2_DAT14__AUD6_TXFS 0x38c 0x794 0x900 0x4 0x1 +#define MX51_PAD_DISP2_DAT14__DISP2_DAT14 0x38c 0x794 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT14__FEC_RDATA0 0x38c 0x794 0x958 0x2 0x1 +#define MX51_PAD_DISP2_DAT14__USBH3_DATA6 0x38c 0x794 0xa14 0x3 0x1 +#define MX51_PAD_DISP2_DAT15__AUD6_RXFS 0x390 0x798 0x8f8 0x4 0x1 +#define MX51_PAD_DISP2_DAT15__DISP1_SER_CS 0x390 0x798 0x000 0x5 0x0 +#define MX51_PAD_DISP2_DAT15__DISP2_DAT15 0x390 0x798 0x000 0x0 0x0 +#define MX51_PAD_DISP2_DAT15__FEC_TDATA0 0x390 0x798 0x000 0x2 0x0 +#define MX51_PAD_DISP2_DAT15__USBH3_DATA7 0x390 0x798 0xa18 0x3 0x1 +#define MX51_PAD_SD1_CMD__AUD5_RXFS 0x394 0x79c 0x8e0 0x1 0x1 +#define MX51_PAD_SD1_CMD__CSPI_MOSI 0x394 0x79c 0x91c 0x2 0x2 +#define MX51_PAD_SD1_CMD__SD1_CMD 0x394 0x79c 0x000 0x0 0x0 +#define MX51_PAD_SD1_CLK__AUD5_RXC 0x398 0x7a0 0x8dc 0x1 0x1 +#define MX51_PAD_SD1_CLK__CSPI_SCLK 0x398 0x7a0 0x914 0x2 0x2 +#define MX51_PAD_SD1_CLK__SD1_CLK 0x398 0x7a0 0x000 0x0 0x0 +#define MX51_PAD_SD1_DATA0__AUD5_TXD 0x39c 0x7a4 0x8d8 0x1 0x2 +#define MX51_PAD_SD1_DATA0__CSPI_MISO 0x39c 0x7a4 0x918 0x2 0x1 +#define MX51_PAD_SD1_DATA0__SD1_DATA0 0x39c 0x7a4 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA0__EIM_DA0 0x01c 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA1__EIM_DA1 0x020 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA2__EIM_DA2 0x024 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA3__EIM_DA3 0x028 0x000 0x000 0x0 0x0 +#define MX51_PAD_SD1_DATA1__AUD5_RXD 0x3a0 0x7a8 0x8d4 0x1 0x2 +#define MX51_PAD_SD1_DATA1__SD1_DATA1 0x3a0 0x7a8 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA4__EIM_DA4 0x02c 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA5__EIM_DA5 0x030 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA6__EIM_DA6 0x034 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA7__EIM_DA7 0x038 0x000 0x000 0x0 0x0 +#define MX51_PAD_SD1_DATA2__AUD5_TXC 0x3a4 0x7ac 0x8e4 0x1 0x2 +#define MX51_PAD_SD1_DATA2__SD1_DATA2 0x3a4 0x7ac 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA10__EIM_DA10 0x044 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA11__EIM_DA11 0x048 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA8__EIM_DA8 0x03c 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA9__EIM_DA9 0x040 0x000 0x000 0x0 0x0 +#define MX51_PAD_SD1_DATA3__AUD5_TXFS 0x3a8 0x7b0 0x8e8 0x1 0x2 +#define MX51_PAD_SD1_DATA3__CSPI_SS1 0x3a8 0x7b0 0x920 0x2 0x1 +#define MX51_PAD_SD1_DATA3__SD1_DATA3 0x3a8 0x7b0 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_0__CSPI_SS2 0x3ac 0x7b4 0x924 0x2 0x0 +#define MX51_PAD_GPIO1_0__GPIO1_0 0x3ac 0x7b4 0x000 0x1 0x0 +#define MX51_PAD_GPIO1_0__SD1_CD 0x3ac 0x7b4 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_1__CSPI_MISO 0x3b0 0x7b8 0x918 0x2 0x2 +#define MX51_PAD_GPIO1_1__GPIO1_1 0x3b0 0x7b8 0x000 0x1 0x0 +#define MX51_PAD_GPIO1_1__SD1_WP 0x3b0 0x7b8 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA12__EIM_DA12 0x04c 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA13__EIM_DA13 0x050 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA14__EIM_DA14 0x054 0x000 0x000 0x0 0x0 +#define MX51_PAD_EIM_DA15__EIM_DA15 0x058 0x000 0x000 0x0 0x0 +#define MX51_PAD_SD2_CMD__CSPI_MOSI 0x3b4 0x7bc 0x91c 0x2 0x3 +#define MX51_PAD_SD2_CMD__I2C1_SCL 0x3b4 0x7bc 0x9b0 0x1 0x2 +#define MX51_PAD_SD2_CMD__SD2_CMD 0x3b4 0x7bc 0x000 0x0 0x0 +#define MX51_PAD_SD2_CLK__CSPI_SCLK 0x3b8 0x7c0 0x914 0x2 0x3 +#define MX51_PAD_SD2_CLK__I2C1_SDA 0x3b8 0x7c0 0x9b4 0x1 0x2 +#define MX51_PAD_SD2_CLK__SD2_CLK 0x3b8 0x7c0 0x000 0x0 0x0 +#define MX51_PAD_SD2_DATA0__CSPI_MISO 0x3bc 0x7c4 0x918 0x2 0x3 +#define MX51_PAD_SD2_DATA0__SD1_DAT4 0x3bc 0x7c4 0x000 0x1 0x0 +#define MX51_PAD_SD2_DATA0__SD2_DATA0 0x3bc 0x7c4 0x000 0x0 0x0 +#define MX51_PAD_SD2_DATA1__SD1_DAT5 0x3c0 0x7c8 0x000 0x1 0x0 +#define MX51_PAD_SD2_DATA1__SD2_DATA1 0x3c0 0x7c8 0x000 0x0 0x0 +#define MX51_PAD_SD2_DATA1__USBH3_H2_DP 0x3c0 0x7c8 0x000 0x2 0x0 +#define MX51_PAD_SD2_DATA2__SD1_DAT6 0x3c4 0x7cc 0x000 0x1 0x0 +#define MX51_PAD_SD2_DATA2__SD2_DATA2 0x3c4 0x7cc 0x000 0x0 0x0 +#define MX51_PAD_SD2_DATA2__USBH3_H2_DM 0x3c4 0x7cc 0x000 0x2 0x0 +#define MX51_PAD_SD2_DATA3__CSPI_SS2 0x3c8 0x7d0 0x924 0x2 0x1 +#define MX51_PAD_SD2_DATA3__SD1_DAT7 0x3c8 0x7d0 0x000 0x1 0x0 +#define MX51_PAD_SD2_DATA3__SD2_DATA3 0x3c8 0x7d0 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_2__CCM_OUT_2 0x3cc 0x7d4 0x000 0x5 0x0 +#define MX51_PAD_GPIO1_2__GPIO1_2 0x3cc 0x7d4 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_2__I2C2_SCL 0x3cc 0x7d4 0x9b8 0x2 0x3 +#define MX51_PAD_GPIO1_2__PLL1_BYP 0x3cc 0x7d4 0x90c 0x7 0x1 +#define MX51_PAD_GPIO1_2__PWM1_PWMO 0x3cc 0x7d4 0x000 0x1 0x0 +#define MX51_PAD_GPIO1_3__GPIO1_3 0x3d0 0x7d8 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_3__I2C2_SDA 0x3d0 0x7d8 0x9bc 0x2 0x3 +#define MX51_PAD_GPIO1_3__PLL2_BYP 0x3d0 0x7d8 0x910 0x7 0x1 +#define MX51_PAD_GPIO1_3__PWM2_PWMO 0x3d0 0x7d8 0x000 0x1 0x0 +#define MX51_PAD_PMIC_INT_REQ__PMIC_INT_REQ 0x3d4 0x7fc 0x000 0x0 0x0 +#define MX51_PAD_PMIC_INT_REQ__PMIC_PMU_IRQ_B 0x3d4 0x7fc 0x000 0x1 0x0 +#define MX51_PAD_GPIO1_4__DISP2_EXT_CLK 0x3d8 0x804 0x908 0x4 0x1 +#define MX51_PAD_GPIO1_4__EIM_RDY 0x3d8 0x804 0x938 0x3 0x1 +#define MX51_PAD_GPIO1_4__GPIO1_4 0x3d8 0x804 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_4__WDOG1_WDOG_B 0x3d8 0x804 0x000 0x2 0x0 +#define MX51_PAD_GPIO1_5__CSI2_MCLK 0x3dc 0x808 0x000 0x6 0x0 +#define MX51_PAD_GPIO1_5__DISP2_PIN16 0x3dc 0x808 0x000 0x3 0x0 +#define MX51_PAD_GPIO1_5__GPIO1_5 0x3dc 0x808 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_5__WDOG2_WDOG_B 0x3dc 0x808 0x000 0x2 0x0 +#define MX51_PAD_GPIO1_6__DISP2_PIN17 0x3e0 0x80c 0x000 0x4 0x0 +#define MX51_PAD_GPIO1_6__GPIO1_6 0x3e0 0x80c 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_6__REF_EN_B 0x3e0 0x80c 0x000 0x3 0x0 +#define MX51_PAD_GPIO1_7__CCM_OUT_0 0x3e4 0x810 0x000 0x3 0x0 +#define MX51_PAD_GPIO1_7__GPIO1_7 0x3e4 0x810 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_7__SD2_WP 0x3e4 0x810 0x000 0x6 0x0 +#define MX51_PAD_GPIO1_7__SPDIF_OUT1 0x3e4 0x810 0x000 0x2 0x0 +#define MX51_PAD_GPIO1_8__CSI2_DATA_EN 0x3e8 0x814 0x99c 0x2 0x2 +#define MX51_PAD_GPIO1_8__GPIO1_8 0x3e8 0x814 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_8__SD2_CD 0x3e8 0x814 0x000 0x6 0x0 +#define MX51_PAD_GPIO1_8__USBH3_PWR 0x3e8 0x814 0x000 0x1 0x0 +#define MX51_PAD_GPIO1_9__CCM_OUT_1 0x3ec 0x818 0x000 0x3 0x0 +#define MX51_PAD_GPIO1_9__DISP2_D1_CS 0x3ec 0x818 0x000 0x2 0x0 +#define MX51_PAD_GPIO1_9__DISP2_SER_CS 0x3ec 0x818 0x000 0x7 0x0 +#define MX51_PAD_GPIO1_9__GPIO1_9 0x3ec 0x818 0x000 0x0 0x0 +#define MX51_PAD_GPIO1_9__SD2_LCTL 0x3ec 0x818 0x000 0x6 0x0 +#define MX51_PAD_GPIO1_9__USBH3_OC 0x3ec 0x818 0x000 0x1 0x0 + +#endif /* __DTS_IMX51_PINFUNC_H */ Copied: head/sys/gnu/dts/arm/imx53-pinfunc.h (from r271150, vendor/device-tree/dist/src/arm/imx53-pinfunc.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/gnu/dts/arm/imx53-pinfunc.h Fri Sep 5 02:21:45 2014 (r271151, copy of r271150, vendor/device-tree/dist/src/arm/imx53-pinfunc.h) @@ -0,0 +1,1189 @@ +/* + * Copyright 2013 Freescale Semiconductor, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +#ifndef __DTS_IMX53_PINFUNC_H +#define __DTS_IMX53_PINFUNC_H + +/* + * The pin function ID is a tuple of + * + */ +#define MX53_PAD_GPIO_19__KPP_COL_5 0x020 0x348 0x840 0x0 0x0 +#define MX53_PAD_GPIO_19__GPIO4_5 0x020 0x348 0x000 0x1 0x0 +#define MX53_PAD_GPIO_19__CCM_CLKO 0x020 0x348 0x000 0x2 0x0 +#define MX53_PAD_GPIO_19__SPDIF_OUT1 0x020 0x348 0x000 0x3 0x0 +#define MX53_PAD_GPIO_19__RTC_CE_RTC_EXT_TRIG2 0x020 0x348 0x000 0x4 0x0 +#define MX53_PAD_GPIO_19__ECSPI1_RDY 0x020 0x348 0x000 0x5 0x0 +#define MX53_PAD_GPIO_19__FEC_TDATA_3 0x020 0x348 0x000 0x6 0x0 +#define MX53_PAD_GPIO_19__SRC_INT_BOOT 0x020 0x348 0x000 0x7 0x0 +#define MX53_PAD_KEY_COL0__KPP_COL_0 0x024 0x34c 0x000 0x0 0x0 +#define MX53_PAD_KEY_COL0__GPIO4_6 0x024 0x34c 0x000 0x1 0x0 +#define MX53_PAD_KEY_COL0__AUDMUX_AUD5_TXC 0x024 0x34c 0x758 0x2 0x0 +#define MX53_PAD_KEY_COL0__UART4_TXD_MUX 0x024 0x34c 0x000 0x4 0x0 +#define MX53_PAD_KEY_COL0__ECSPI1_SCLK 0x024 0x34c 0x79c 0x5 0x0 +#define MX53_PAD_KEY_COL0__FEC_RDATA_3 0x024 0x34c 0x000 0x6 0x0 +#define MX53_PAD_KEY_COL0__SRC_ANY_PU_RST 0x024 0x34c 0x000 0x7 0x0 +#define MX53_PAD_KEY_ROW0__KPP_ROW_0 0x028 0x350 0x000 0x0 0x0 +#define MX53_PAD_KEY_ROW0__GPIO4_7 0x028 0x350 0x000 0x1 0x0 +#define MX53_PAD_KEY_ROW0__AUDMUX_AUD5_TXD 0x028 0x350 0x74c 0x2 0x0 +#define MX53_PAD_KEY_ROW0__UART4_RXD_MUX 0x028 0x350 0x890 0x4 0x1 +#define MX53_PAD_KEY_ROW0__ECSPI1_MOSI 0x028 0x350 0x7a4 0x5 0x0 +#define MX53_PAD_KEY_ROW0__FEC_TX_ER 0x028 0x350 0x000 0x6 0x0 +#define MX53_PAD_KEY_COL1__KPP_COL_1 0x02c 0x354 0x000 0x0 0x0 +#define MX53_PAD_KEY_COL1__GPIO4_8 0x02c 0x354 0x000 0x1 0x0 +#define MX53_PAD_KEY_COL1__AUDMUX_AUD5_TXFS 0x02c 0x354 0x75c 0x2 0x0 +#define MX53_PAD_KEY_COL1__UART5_TXD_MUX 0x02c 0x354 0x000 0x4 0x0 +#define MX53_PAD_KEY_COL1__ECSPI1_MISO 0x02c 0x354 0x7a0 0x5 0x0 +#define MX53_PAD_KEY_COL1__FEC_RX_CLK 0x02c 0x354 0x808 0x6 0x0 +#define MX53_PAD_KEY_COL1__USBPHY1_TXREADY 0x02c 0x354 0x000 0x7 0x0 +#define MX53_PAD_KEY_ROW1__KPP_ROW_1 0x030 0x358 0x000 0x0 0x0 +#define MX53_PAD_KEY_ROW1__GPIO4_9 0x030 0x358 0x000 0x1 0x0 +#define MX53_PAD_KEY_ROW1__AUDMUX_AUD5_RXD 0x030 0x358 0x748 0x2 0x0 +#define MX53_PAD_KEY_ROW1__UART5_RXD_MUX 0x030 0x358 0x898 0x4 0x1 +#define MX53_PAD_KEY_ROW1__ECSPI1_SS0 0x030 0x358 0x7a8 0x5 0x0 +#define MX53_PAD_KEY_ROW1__FEC_COL 0x030 0x358 0x800 0x6 0x0 +#define MX53_PAD_KEY_ROW1__USBPHY1_RXVALID 0x030 0x358 0x000 0x7 0x0 +#define MX53_PAD_KEY_COL2__KPP_COL_2 0x034 0x35c 0x000 0x0 0x0 +#define MX53_PAD_KEY_COL2__GPIO4_10 0x034 0x35c 0x000 0x1 0x0 +#define MX53_PAD_KEY_COL2__CAN1_TXCAN 0x034 0x35c 0x000 0x2 0x0 +#define MX53_PAD_KEY_COL2__FEC_MDIO 0x034 0x35c 0x804 0x4 0x0 +#define MX53_PAD_KEY_COL2__ECSPI1_SS1 0x034 0x35c 0x7ac 0x5 0x0 +#define MX53_PAD_KEY_COL2__FEC_RDATA_2 0x034 0x35c 0x000 0x6 0x0 +#define MX53_PAD_KEY_COL2__USBPHY1_RXACTIVE 0x034 0x35c 0x000 0x7 0x0 +#define MX53_PAD_KEY_ROW2__KPP_ROW_2 0x038 0x360 0x000 0x0 0x0 +#define MX53_PAD_KEY_ROW2__GPIO4_11 0x038 0x360 0x000 0x1 0x0 +#define MX53_PAD_KEY_ROW2__CAN1_RXCAN 0x038 0x360 0x760 0x2 0x0 +#define MX53_PAD_KEY_ROW2__FEC_MDC 0x038 0x360 0x000 0x4 0x0 +#define MX53_PAD_KEY_ROW2__ECSPI1_SS2 0x038 0x360 0x7b0 0x5 0x0 +#define MX53_PAD_KEY_ROW2__FEC_TDATA_2 0x038 0x360 0x000 0x6 0x0 +#define MX53_PAD_KEY_ROW2__USBPHY1_RXERROR 0x038 0x360 0x000 0x7 0x0 +#define MX53_PAD_KEY_COL3__KPP_COL_3 0x03c 0x364 0x000 0x0 0x0 +#define MX53_PAD_KEY_COL3__GPIO4_12 0x03c 0x364 0x000 0x1 0x0 +#define MX53_PAD_KEY_COL3__USBOH3_H2_DP 0x03c 0x364 0x000 0x2 0x0 +#define MX53_PAD_KEY_COL3__SPDIF_IN1 0x03c 0x364 0x870 0x3 0x0 +#define MX53_PAD_KEY_COL3__I2C2_SCL 0x03c 0x364 0x81c 0x4 0x0 +#define MX53_PAD_KEY_COL3__ECSPI1_SS3 0x03c 0x364 0x7b4 0x5 0x0 +#define MX53_PAD_KEY_COL3__FEC_CRS 0x03c 0x364 0x000 0x6 0x0 +#define MX53_PAD_KEY_COL3__USBPHY1_SIECLOCK 0x03c 0x364 0x000 0x7 0x0 +#define MX53_PAD_KEY_ROW3__KPP_ROW_3 0x040 0x368 0x000 0x0 0x0 +#define MX53_PAD_KEY_ROW3__GPIO4_13 0x040 0x368 0x000 0x1 0x0 +#define MX53_PAD_KEY_ROW3__USBOH3_H2_DM 0x040 0x368 0x000 0x2 0x0 +#define MX53_PAD_KEY_ROW3__CCM_ASRC_EXT_CLK 0x040 0x368 0x768 0x3 0x0 +#define MX53_PAD_KEY_ROW3__I2C2_SDA 0x040 0x368 0x820 0x4 0x0 +#define MX53_PAD_KEY_ROW3__OSC32K_32K_OUT 0x040 0x368 0x000 0x5 0x0 +#define MX53_PAD_KEY_ROW3__CCM_PLL4_BYP 0x040 0x368 0x77c 0x6 0x0 +#define MX53_PAD_KEY_ROW3__USBPHY1_LINESTATE_0 0x040 0x368 0x000 0x7 0x0 +#define MX53_PAD_KEY_COL4__KPP_COL_4 0x044 0x36c 0x000 0x0 0x0 +#define MX53_PAD_KEY_COL4__GPIO4_14 0x044 0x36c 0x000 0x1 0x0 +#define MX53_PAD_KEY_COL4__CAN2_TXCAN 0x044 0x36c 0x000 0x2 0x0 +#define MX53_PAD_KEY_COL4__IPU_SISG_4 0x044 0x36c 0x000 0x3 0x0 +#define MX53_PAD_KEY_COL4__UART5_RTS 0x044 0x36c 0x894 0x4 0x0 +#define MX53_PAD_KEY_COL4__USBOH3_USBOTG_OC 0x044 0x36c 0x89c 0x5 0x0 +#define MX53_PAD_KEY_COL4__USBPHY1_LINESTATE_1 0x044 0x36c 0x000 0x7 0x0 +#define MX53_PAD_KEY_ROW4__KPP_ROW_4 0x048 0x370 0x000 0x0 0x0 +#define MX53_PAD_KEY_ROW4__GPIO4_15 0x048 0x370 0x000 0x1 0x0 +#define MX53_PAD_KEY_ROW4__CAN2_RXCAN 0x048 0x370 0x764 0x2 0x0 +#define MX53_PAD_KEY_ROW4__IPU_SISG_5 0x048 0x370 0x000 0x3 0x0 +#define MX53_PAD_KEY_ROW4__UART5_CTS 0x048 0x370 0x000 0x4 0x0 +#define MX53_PAD_KEY_ROW4__USBOH3_USBOTG_PWR 0x048 0x370 0x000 0x5 0x0 +#define MX53_PAD_KEY_ROW4__USBPHY1_VBUSVALID 0x048 0x370 0x000 0x7 0x0 +#define MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK 0x04c 0x378 0x000 0x0 0x0 +#define MX53_PAD_DI0_DISP_CLK__GPIO4_16 0x04c 0x378 0x000 0x1 0x0 +#define MX53_PAD_DI0_DISP_CLK__USBOH3_USBH2_DIR 0x04c 0x378 0x000 0x2 0x0 +#define MX53_PAD_DI0_DISP_CLK__SDMA_DEBUG_CORE_STATE_0 0x04c 0x378 0x000 0x5 0x0 +#define MX53_PAD_DI0_DISP_CLK__EMI_EMI_DEBUG_0 0x04c 0x378 0x000 0x6 0x0 +#define MX53_PAD_DI0_DISP_CLK__USBPHY1_AVALID 0x04c 0x378 0x000 0x7 0x0 +#define MX53_PAD_DI0_PIN15__IPU_DI0_PIN15 0x050 0x37c 0x000 0x0 0x0 +#define MX53_PAD_DI0_PIN15__GPIO4_17 0x050 0x37c 0x000 0x1 0x0 +#define MX53_PAD_DI0_PIN15__AUDMUX_AUD6_TXC 0x050 0x37c 0x000 0x2 0x0 +#define MX53_PAD_DI0_PIN15__SDMA_DEBUG_CORE_STATE_1 0x050 0x37c 0x000 0x5 0x0 +#define MX53_PAD_DI0_PIN15__EMI_EMI_DEBUG_1 0x050 0x37c 0x000 0x6 0x0 +#define MX53_PAD_DI0_PIN15__USBPHY1_BVALID 0x050 0x37c 0x000 0x7 0x0 +#define MX53_PAD_DI0_PIN2__IPU_DI0_PIN2 0x054 0x380 0x000 0x0 0x0 +#define MX53_PAD_DI0_PIN2__GPIO4_18 0x054 0x380 0x000 0x1 0x0 +#define MX53_PAD_DI0_PIN2__AUDMUX_AUD6_TXD 0x054 0x380 0x000 0x2 0x0 +#define MX53_PAD_DI0_PIN2__SDMA_DEBUG_CORE_STATE_2 0x054 0x380 0x000 0x5 0x0 +#define MX53_PAD_DI0_PIN2__EMI_EMI_DEBUG_2 0x054 0x380 0x000 0x6 0x0 +#define MX53_PAD_DI0_PIN2__USBPHY1_ENDSESSION 0x054 0x380 0x000 0x7 0x0 +#define MX53_PAD_DI0_PIN3__IPU_DI0_PIN3 0x058 0x384 0x000 0x0 0x0 +#define MX53_PAD_DI0_PIN3__GPIO4_19 0x058 0x384 0x000 0x1 0x0 +#define MX53_PAD_DI0_PIN3__AUDMUX_AUD6_TXFS 0x058 0x384 0x000 0x2 0x0 +#define MX53_PAD_DI0_PIN3__SDMA_DEBUG_CORE_STATE_3 0x058 0x384 0x000 0x5 0x0 +#define MX53_PAD_DI0_PIN3__EMI_EMI_DEBUG_3 0x058 0x384 0x000 0x6 0x0 +#define MX53_PAD_DI0_PIN3__USBPHY1_IDDIG 0x058 0x384 0x000 0x7 0x0 +#define MX53_PAD_DI0_PIN4__IPU_DI0_PIN4 0x05c 0x388 0x000 0x0 0x0 +#define MX53_PAD_DI0_PIN4__GPIO4_20 0x05c 0x388 0x000 0x1 0x0 +#define MX53_PAD_DI0_PIN4__AUDMUX_AUD6_RXD 0x05c 0x388 0x000 0x2 0x0 +#define MX53_PAD_DI0_PIN4__ESDHC1_WP 0x05c 0x388 0x7fc 0x3 0x0 +#define MX53_PAD_DI0_PIN4__SDMA_DEBUG_YIELD 0x05c 0x388 0x000 0x5 0x0 +#define MX53_PAD_DI0_PIN4__EMI_EMI_DEBUG_4 0x05c 0x388 0x000 0x6 0x0 +#define MX53_PAD_DI0_PIN4__USBPHY1_HOSTDISCONNECT 0x05c 0x388 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT0__IPU_DISP0_DAT_0 0x060 0x38c 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT0__GPIO4_21 0x060 0x38c 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT0__CSPI_SCLK 0x060 0x38c 0x780 0x2 0x0 +#define MX53_PAD_DISP0_DAT0__USBOH3_USBH2_DATA_0 0x060 0x38c 0x000 0x3 0x0 +#define MX53_PAD_DISP0_DAT0__SDMA_DEBUG_CORE_RUN 0x060 0x38c 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT0__EMI_EMI_DEBUG_5 0x060 0x38c 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT0__USBPHY2_TXREADY 0x060 0x38c 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT1__IPU_DISP0_DAT_1 0x064 0x390 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT1__GPIO4_22 0x064 0x390 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT1__CSPI_MOSI 0x064 0x390 0x788 0x2 0x0 +#define MX53_PAD_DISP0_DAT1__USBOH3_USBH2_DATA_1 0x064 0x390 0x000 0x3 0x0 +#define MX53_PAD_DISP0_DAT1__SDMA_DEBUG_EVENT_CHANNEL_SEL 0x064 0x390 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT1__EMI_EMI_DEBUG_6 0x064 0x390 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT1__USBPHY2_RXVALID 0x064 0x390 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT2__IPU_DISP0_DAT_2 0x068 0x394 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT2__GPIO4_23 0x068 0x394 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT2__CSPI_MISO 0x068 0x394 0x784 0x2 0x0 +#define MX53_PAD_DISP0_DAT2__USBOH3_USBH2_DATA_2 0x068 0x394 0x000 0x3 0x0 +#define MX53_PAD_DISP0_DAT2__SDMA_DEBUG_MODE 0x068 0x394 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT2__EMI_EMI_DEBUG_7 0x068 0x394 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT2__USBPHY2_RXACTIVE 0x068 0x394 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT3__IPU_DISP0_DAT_3 0x06c 0x398 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT3__GPIO4_24 0x06c 0x398 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT3__CSPI_SS0 0x06c 0x398 0x78c 0x2 0x0 +#define MX53_PAD_DISP0_DAT3__USBOH3_USBH2_DATA_3 0x06c 0x398 0x000 0x3 0x0 +#define MX53_PAD_DISP0_DAT3__SDMA_DEBUG_BUS_ERROR 0x06c 0x398 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT3__EMI_EMI_DEBUG_8 0x06c 0x398 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT3__USBPHY2_RXERROR 0x06c 0x398 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT4__IPU_DISP0_DAT_4 0x070 0x39c 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT4__GPIO4_25 0x070 0x39c 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT4__CSPI_SS1 0x070 0x39c 0x790 0x2 0x0 +#define MX53_PAD_DISP0_DAT4__USBOH3_USBH2_DATA_4 0x070 0x39c 0x000 0x3 0x0 +#define MX53_PAD_DISP0_DAT4__SDMA_DEBUG_BUS_RWB 0x070 0x39c 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT4__EMI_EMI_DEBUG_9 0x070 0x39c 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT4__USBPHY2_SIECLOCK 0x070 0x39c 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT5__IPU_DISP0_DAT_5 0x074 0x3a0 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT5__GPIO4_26 0x074 0x3a0 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT5__CSPI_SS2 0x074 0x3a0 0x794 0x2 0x0 +#define MX53_PAD_DISP0_DAT5__USBOH3_USBH2_DATA_5 0x074 0x3a0 0x000 0x3 0x0 +#define MX53_PAD_DISP0_DAT5__SDMA_DEBUG_MATCHED_DMBUS 0x074 0x3a0 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT5__EMI_EMI_DEBUG_10 0x074 0x3a0 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT5__USBPHY2_LINESTATE_0 0x074 0x3a0 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT6__IPU_DISP0_DAT_6 0x078 0x3a4 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT6__GPIO4_27 0x078 0x3a4 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT6__CSPI_SS3 0x078 0x3a4 0x798 0x2 0x0 +#define MX53_PAD_DISP0_DAT6__USBOH3_USBH2_DATA_6 0x078 0x3a4 0x000 0x3 0x0 +#define MX53_PAD_DISP0_DAT6__SDMA_DEBUG_RTBUFFER_WRITE 0x078 0x3a4 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT6__EMI_EMI_DEBUG_11 0x078 0x3a4 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT6__USBPHY2_LINESTATE_1 0x078 0x3a4 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT7__IPU_DISP0_DAT_7 0x07c 0x3a8 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT7__GPIO4_28 0x07c 0x3a8 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT7__CSPI_RDY 0x07c 0x3a8 0x000 0x2 0x0 +#define MX53_PAD_DISP0_DAT7__USBOH3_USBH2_DATA_7 0x07c 0x3a8 0x000 0x3 0x0 +#define MX53_PAD_DISP0_DAT7__SDMA_DEBUG_EVENT_CHANNEL_0 0x07c 0x3a8 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT7__EMI_EMI_DEBUG_12 0x07c 0x3a8 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT7__USBPHY2_VBUSVALID 0x07c 0x3a8 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT8__IPU_DISP0_DAT_8 0x080 0x3ac 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT8__GPIO4_29 0x080 0x3ac 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT8__PWM1_PWMO 0x080 0x3ac 0x000 0x2 0x0 +#define MX53_PAD_DISP0_DAT8__WDOG1_WDOG_B 0x080 0x3ac 0x000 0x3 0x0 +#define MX53_PAD_DISP0_DAT8__SDMA_DEBUG_EVENT_CHANNEL_1 0x080 0x3ac 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT8__EMI_EMI_DEBUG_13 0x080 0x3ac 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT8__USBPHY2_AVALID 0x080 0x3ac 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT9__IPU_DISP0_DAT_9 0x084 0x3b0 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT9__GPIO4_30 0x084 0x3b0 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT9__PWM2_PWMO 0x084 0x3b0 0x000 0x2 0x0 +#define MX53_PAD_DISP0_DAT9__WDOG2_WDOG_B 0x084 0x3b0 0x000 0x3 0x0 +#define MX53_PAD_DISP0_DAT9__SDMA_DEBUG_EVENT_CHANNEL_2 0x084 0x3b0 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT9__EMI_EMI_DEBUG_14 0x084 0x3b0 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT9__USBPHY2_VSTATUS_0 0x084 0x3b0 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT10__IPU_DISP0_DAT_10 0x088 0x3b4 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT10__GPIO4_31 0x088 0x3b4 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT10__USBOH3_USBH2_STP 0x088 0x3b4 0x000 0x2 0x0 +#define MX53_PAD_DISP0_DAT10__SDMA_DEBUG_EVENT_CHANNEL_3 0x088 0x3b4 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT10__EMI_EMI_DEBUG_15 0x088 0x3b4 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT10__USBPHY2_VSTATUS_1 0x088 0x3b4 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT11__IPU_DISP0_DAT_11 0x08c 0x3b8 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT11__GPIO5_5 0x08c 0x3b8 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT11__USBOH3_USBH2_NXT 0x08c 0x3b8 0x000 0x2 0x0 +#define MX53_PAD_DISP0_DAT11__SDMA_DEBUG_EVENT_CHANNEL_4 0x08c 0x3b8 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT11__EMI_EMI_DEBUG_16 0x08c 0x3b8 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT11__USBPHY2_VSTATUS_2 0x08c 0x3b8 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT12__IPU_DISP0_DAT_12 0x090 0x3bc 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT12__GPIO5_6 0x090 0x3bc 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT12__USBOH3_USBH2_CLK 0x090 0x3bc 0x000 0x2 0x0 +#define MX53_PAD_DISP0_DAT12__SDMA_DEBUG_EVENT_CHANNEL_5 0x090 0x3bc 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT12__EMI_EMI_DEBUG_17 0x090 0x3bc 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT12__USBPHY2_VSTATUS_3 0x090 0x3bc 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT13__IPU_DISP0_DAT_13 0x094 0x3c0 0x000 0x0 0x0 +#define MX53_PAD_DISP0_DAT13__GPIO5_7 0x094 0x3c0 0x000 0x1 0x0 +#define MX53_PAD_DISP0_DAT13__AUDMUX_AUD5_RXFS 0x094 0x3c0 0x754 0x3 0x0 +#define MX53_PAD_DISP0_DAT13__SDMA_DEBUG_EVT_CHN_LINES_0 0x094 0x3c0 0x000 0x5 0x0 +#define MX53_PAD_DISP0_DAT13__EMI_EMI_DEBUG_18 0x094 0x3c0 0x000 0x6 0x0 +#define MX53_PAD_DISP0_DAT13__USBPHY2_VSTATUS_4 0x094 0x3c0 0x000 0x7 0x0 +#define MX53_PAD_DISP0_DAT14__IPU_DISP0_DAT_14 0x098 0x3c4 0x000 0x0 0x0 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 02:50:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 382E88CA; Fri, 5 Sep 2014 02:50:44 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0EDE61A8F; Fri, 5 Sep 2014 02:50:44 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 1F3F8B968; Thu, 4 Sep 2014 22:50:43 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Subject: Re: svn commit: r270850 - in head/sys: i386/i386 i386/include i386/isa x86/acpica Date: Thu, 04 Sep 2014 22:50:25 -0400 Message-ID: <3070015.668SIdAzOX@ralph.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/10.0-STABLE; KDE/4.10.5; amd64; ; ) In-Reply-To: <20140902154127.GD2737@kib.kiev.ua> References: <201408301748.s7UHmc6H059701@svn.freebsd.org> <201409021100.57493.jhb@freebsd.org> <20140902154127.GD2737@kib.kiev.ua> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 04 Sep 2014 22:50:43 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 02:50:44 -0000 On Tuesday, September 02, 2014 06:41:27 PM Konstantin Belousov wrote: > On Tue, Sep 02, 2014 at 11:00:57AM -0400, John Baldwin wrote: > > I thought about that. I could easily make a parallel array, or perhaps > > use a separate 'susppcb' structure that includes a pcb and the savefpu > > union and change susppcbs to be an array of those. Which do you prefer? > > If we want to move some state out of the PCB on amd64 into this, then a > > separate struct for susppcbs might be the sanest. > > Yes, separate structure seems to be a way forward. Please see www.freebsd.org/~jhb/patches/susppcb.patch Note that I moved fpususpend() out into a C function on amd64 so that resumectx() could still operate on just a pcb. This also makes savectx and resumectx more symmetric and matches what I ended up doing on i386. This is tested for suspend and resume on both i386 and amd64. > FWIW, I do not understand the need for pcb in its current form, allocated > on the thread kernel stack, at all. It looks like a vestige of the > u-area, but serves no real purpose except to consume now precious stack > space. > > The idea of the part of the thread state that can be swapped out, together > with the stack, seems to become alien. Most of the thread state which is > not needed when the thread is not runnable, now goes to struct thread > anyway. Might be, we should move the pcb into td_md. People actively > object to the idea of the swappable kernel stack when they learn > hard that local vars cannot participate in the global lists. > > The only thing which is currently allocated below the pcb and which > seems to be reasonable to swap out, is the FPU context on amd64. I will defer to Peter on this as I believe he is the one that split the PCB out from the rest of the u-area (or what was left of it). My gut is that you are probably right and that it would be better to leave that room for the stack than to use it for the pcb. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 05:07:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AF70CEE; Fri, 5 Sep 2014 05:07:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85EA51991; Fri, 5 Sep 2014 05:07:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8557c6h082117; Fri, 5 Sep 2014 05:07:38 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8557cPh082116; Fri, 5 Sep 2014 05:07:38 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201409050507.s8557cPh082116@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 5 Sep 2014 05:07:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271153 - stable/10/sys/powerpc/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 05:07:38 -0000 Author: jhibbits Date: Fri Sep 5 05:07:38 2014 New Revision: 271153 URL: http://svnweb.freebsd.org/changeset/base/271153 Log: MFC r258078,258079 Increase the stack size for ppc64 from 4 pages to 8. I found a stack overflow when a coredump was taken onto a ZFS volume with heavy network activity. 2 DSI traps, plus one DECR trap, along with several function calls in the stack, overflowed the 4 pages. 8 page stack fixes this. Discussed with: nwhitehorn Approved by: re Relnotes: yes Modified: stable/10/sys/powerpc/include/param.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/include/param.h ============================================================================== --- stable/10/sys/powerpc/include/param.h Fri Sep 5 03:33:16 2014 (r271152) +++ stable/10/sys/powerpc/include/param.h Fri Sep 5 05:07:38 2014 (r271153) @@ -104,8 +104,12 @@ #define MAXPAGESIZES 1 /* maximum number of supported page sizes */ #ifndef KSTACK_PAGES +#ifdef __powerpc64__ +#define KSTACK_PAGES 8 /* includes pcb */ +#else #define KSTACK_PAGES 4 /* includes pcb */ #endif +#endif #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ #define USPACE (KSTACK_PAGES * PAGE_SIZE) /* total size of pcb */ From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 05:20:53 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68AB3F61; Fri, 5 Sep 2014 05:20:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 546C41A68; Fri, 5 Sep 2014 05:20:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s855Kruo088334; Fri, 5 Sep 2014 05:20:53 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s855Krvr088333; Fri, 5 Sep 2014 05:20:53 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201409050520.s855Krvr088333@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Fri, 5 Sep 2014 05:20:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271154 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 05:20:53 -0000 Author: ed Date: Fri Sep 5 05:20:52 2014 New Revision: 271154 URL: http://svnweb.freebsd.org/changeset/base/271154 Log: Partially revert r271012. Incredibly weird: GCC 4.7/4.9 do support the _Noreturn and _Thread_local keywords, but not during bootstrapping. GCC is by far the weirdest compiler that I've ever used. Reported by: andreast@ Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Fri Sep 5 05:07:38 2014 (r271153) +++ head/sys/sys/cdefs.h Fri Sep 5 05:20:52 2014 (r271154) @@ -280,13 +280,11 @@ #define _Atomic(T) struct { T volatile __val; } #endif -#if !__GNUC_PREREQ__(4, 7) #if defined(__cplusplus) && __cplusplus >= 201103L #define _Noreturn [[noreturn]] #else #define _Noreturn __dead2 #endif -#endif #if !__has_extension(c_static_assert) && !__GNUC_PREREQ__(4, 7) #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ @@ -301,7 +299,7 @@ #endif #endif -#if !__has_extension(c_thread_local) && !__GNUC_PREREQ__(4, 9) +#if !__has_extension(c_thread_local) /* * XXX: Some compilers (Clang 3.3, GCC 4.7) falsely announce C++11 mode * without actually supporting the thread_local keyword. Don't check for From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 05:36:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7B0E2EA; Fri, 5 Sep 2014 05:36:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9B061C3A; Fri, 5 Sep 2014 05:36:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s855aXeq095860; Fri, 5 Sep 2014 05:36:33 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s855aXgD095858; Fri, 5 Sep 2014 05:36:33 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201409050536.s855aXgD095858@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Fri, 5 Sep 2014 05:36:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271155 - in head: include sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 05:36:33 -0000 Author: ed Date: Fri Sep 5 05:36:32 2014 New Revision: 271155 URL: http://svnweb.freebsd.org/changeset/base/271155 Log: Roll back r271012 even more aggressively. I've looked at the GCC sources and I now understand what's going wrong. THe C11 keywords are simply nonexistent when using C++ mode. They are marked as C-only in the parser. This is absolutely impractical for multiple reasons: - The C11 keywords do not conflict with C++ naming rules. They all start with _[A-Z]. There is no reason to make them C-only. - It makes it practically impossible for people to use these keywords in C header files and expect them to work from within C++ sources. As I said in my previous commit message: GCC is by far the weirdest compiler that I've ever used. Modified: head/include/tgmath.h head/sys/sys/cdefs.h Modified: head/include/tgmath.h ============================================================================== --- head/include/tgmath.h Fri Sep 5 05:20:52 2014 (r271154) +++ head/include/tgmath.h Fri Sep 5 05:36:32 2014 (r271155) @@ -61,7 +61,7 @@ */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ - __has_extension(c_generic_selections) || __GNUC_PREREQ__(4, 9) + __has_extension(c_generic_selections) #define __tg_generic(x, cfnl, cfn, cfnf, fnl, fn, fnf) \ _Generic(x, \ long double _Complex: cfnl, \ Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Fri Sep 5 05:20:52 2014 (r271154) +++ head/sys/sys/cdefs.h Fri Sep 5 05:36:32 2014 (r271155) @@ -254,7 +254,7 @@ #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L -#if !__has_extension(c_alignas) && !__GNUC_PREREQ__(4, 7) +#if !__has_extension(c_alignas) #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ __has_extension(cxx_alignas) #define _Alignas(x) alignas(x) @@ -264,13 +264,11 @@ #endif #endif -#if !__GNUC_PREREQ__(4, 7) #if defined(__cplusplus) && __cplusplus >= 201103L #define _Alignof(x) alignof(x) #else #define _Alignof(x) __alignof(x) #endif -#endif #if !__has_extension(c_atomic) && !__has_extension(cxx_atomic) /* @@ -286,7 +284,7 @@ #define _Noreturn __dead2 #endif -#if !__has_extension(c_static_assert) && !__GNUC_PREREQ__(4, 7) +#if !__has_extension(c_static_assert) #if (defined(__cplusplus) && __cplusplus >= 201103L) || \ __has_extension(cxx_static_assert) #define _Static_assert(x, y) static_assert(x, y) @@ -325,7 +323,7 @@ */ #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ - __has_extension(c_generic_selections) || __GNUC_PREREQ__(4, 9) + __has_extension(c_generic_selections) #define __generic(expr, t, yes, no) \ _Generic(expr, t: yes, default: no) #elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus) From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 07:42:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30A77453; Fri, 5 Sep 2014 07:42:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C6D4198A; Fri, 5 Sep 2014 07:42:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s857gYqW054307; Fri, 5 Sep 2014 07:42:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s857gYeR054306; Fri, 5 Sep 2014 07:42:34 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409050742.s857gYeR054306@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 5 Sep 2014 07:42:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271156 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 07:42:35 -0000 Author: mav Date: Fri Sep 5 07:42:34 2014 New Revision: 271156 URL: http://svnweb.freebsd.org/changeset/base/271156 Log: Add IDs for Intel Patsburg USB 2.0 controller. Modified: head/sys/dev/usb/controller/ehci_pci.c Modified: head/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- head/sys/dev/usb/controller/ehci_pci.c Fri Sep 5 05:36:32 2014 (r271155) +++ head/sys/dev/usb/controller/ehci_pci.c Fri Sep 5 07:42:34 2014 (r271156) @@ -120,6 +120,10 @@ ehci_pci_match(device_t self) case 0x43961002: return ("AMD SB7x0/SB8x0/SB9x0 USB 2.0 controller"); + case 0x1d268086: + return ("Intel Patsburg USB 2.0 controller"); + case 0x1d2d8086: + return ("Intel Patsburg USB 2.0 controller"); case 0x1e268086: return ("Intel Panther Point USB 2.0 controller"); case 0x1e2d8086: From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 08:43:10 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 460B0350; Fri, 5 Sep 2014 08:43:10 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC8991EFA; Fri, 5 Sep 2014 08:43:09 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s858h5co005526 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 5 Sep 2014 11:43:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s858h5co005526 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s858h5jn005525; Fri, 5 Sep 2014 11:43:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 5 Sep 2014 11:43:05 +0300 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r270850 - in head/sys: i386/i386 i386/include i386/isa x86/acpica Message-ID: <20140905084305.GN2737@kib.kiev.ua> References: <201408301748.s7UHmc6H059701@svn.freebsd.org> <201409021100.57493.jhb@freebsd.org> <20140902154127.GD2737@kib.kiev.ua> <3070015.668SIdAzOX@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="x2SxEfr5rzNwq/hH" Content-Disposition: inline In-Reply-To: <3070015.668SIdAzOX@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 08:43:10 -0000 --x2SxEfr5rzNwq/hH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 04, 2014 at 10:50:25PM -0400, John Baldwin wrote: > On Tuesday, September 02, 2014 06:41:27 PM Konstantin Belousov wrote: > > On Tue, Sep 02, 2014 at 11:00:57AM -0400, John Baldwin wrote: > > > I thought about that. I could easily make a parallel array, or perha= ps > > > use a separate 'susppcb' structure that includes a pcb and the savefpu > > > union and change susppcbs to be an array of those. Which do you pref= er?=20 > > > If we want to move some state out of the PCB on amd64 into this, then= a > > > separate struct for susppcbs might be the sanest. > >=20 > > Yes, separate structure seems to be a way forward. >=20 > Please see www.freebsd.org/~jhb/patches/susppcb.patch Note that I moved > fpususpend() out into a C function on amd64 so that resumectx() could sti= ll=20 > operate on just a pcb. This also makes savectx and resumectx more symmet= ric > and matches what I ended up doing on i386. This is tested for suspend and > resume on both i386 and amd64. The implementation of fpuresume() in C is definitely an improvement. You only moved the fpu context to the susppcb, I think this is good for now, we will want to move other bits later. Do we need to keep pcb layout for KBI compat ? I remember that pcb size is asserted to properly fit into pcpu area for percpu zones. But why keep the layout ? I.e. moving all padding bits to the end. There is one weird detail, not touched by your patch. Amd64 resume path calls initializecpu(), while i386 does not. I do not see any use for the call, the reload of CRX registers by trampoline/resumectx should already set everything to working state. E.g., enabling XMM in CR4 after fpu state is restored looks strange. Overall, it looks fine. Do you prefer to have alloc_fpusave() on i386 ? --x2SxEfr5rzNwq/hH Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUCXeYAAoJEJDCuSvBvK1BQOkP/RY8Mb3aL0jGwDDRyTBdPzvV wuPQe+4SFtRdGt7anMzoQTdTMUfuYq8hdlKNbAUOHggZi94cu1IAFstqprHsSbGQ H0YV0+ExpjH8jGMoNDUQwsbOgslYBz4Cu1vvfQSGtkOlUPK1lTrMteyw967AOB9M BZ8nbUEafRHinGyTaod97g6NZo7aVKGZRe93OzvoApgrlAznWnmDs2EkyIIhaY30 FzE5LHML3vgBk93YjKKd00iDJrAtt/AmWRVmix+420yks+Wl5sxhoDLt1Kp7Ll5Q kd1x1EtgGZEdZJqfaXOJt/sHdScG9za8Tq5P4+1HNb61MQjQHQULvxUfuFJ6/sue D1roZQXY7mbGxWo7UKVxX9y6xVp/o97qnjcWcmJ2UYqucn8Ae/OHYrjPrB32pJB2 noPS8WodPqqanvzi4A8OMO/KAIHCMsI0pg6nrsTPuIs+lf9AnRzcjXcV7sf0bc21 mLM+xH6ibT+UdeYL4KQntbAfwT6uov2mTM1WhZg2EddzOrppZ4jWUP4P35WqgMy2 k2tcsPy+3FeA6FMs3dh5cjwa+lVrdogmFA5GWfci/9Kxk+AtN4k0jaRl0i4BQtRV I/cjmi1ZaRfXbIDSOB49fwkdxlEN0xdPNK4SqFanpQNbmn/oQa6r5c8SfLazQfv+ P2iRkSPwNaq2EH0hcVvc =41Qm -----END PGP SIGNATURE----- --x2SxEfr5rzNwq/hH-- From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 11:10:45 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D4EEC4D; Fri, 5 Sep 2014 11:10:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68DA7144D; Fri, 5 Sep 2014 11:10:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85BAiIk047542; Fri, 5 Sep 2014 11:10:44 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85BAiAc047541; Fri, 5 Sep 2014 11:10:44 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201409051110.s85BAiAc047541@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 5 Sep 2014 11:10:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271157 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 11:10:45 -0000 Author: trasz Date: Fri Sep 5 11:10:44 2014 New Revision: 271157 URL: http://svnweb.freebsd.org/changeset/base/271157 Log: Fix typo. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/login.c Modified: head/usr.sbin/ctld/login.c ============================================================================== --- head/usr.sbin/ctld/login.c Fri Sep 5 07:42:34 2014 (r271156) +++ head/usr.sbin/ctld/login.c Fri Sep 5 11:10:44 2014 (r271157) @@ -720,8 +720,8 @@ login_negotiate_key(struct pdu *request, "MaxRecvDataSegmentLength"); } if (tmp > MAX_DATA_SEGMENT_LENGTH) { - log_debugx("capping MaxDataSegmentLength from %d to %d", - tmp, MAX_DATA_SEGMENT_LENGTH); + log_debugx("capping MaxRecvDataSegmentLength " + "from %d to %d", tmp, MAX_DATA_SEGMENT_LENGTH); tmp = MAX_DATA_SEGMENT_LENGTH; } conn->conn_max_data_segment_length = tmp; From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 11:26:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 140DF1A8; Fri, 5 Sep 2014 11:26:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7DC515B5; Fri, 5 Sep 2014 11:26:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85BQ0r7056607; Fri, 5 Sep 2014 11:26:00 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85BPwaE056586; Fri, 5 Sep 2014 11:25:58 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201409051125.s85BPwaE056586@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Fri, 5 Sep 2014 11:25:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271159 - in head: . share/man/man4 sys/conf sys/dev/usb sys/dev/usb/misc sys/dev/usb/quirk sys/modules/usb sys/modules/usb/uled X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 11:26:01 -0000 Author: kevlo Date: Fri Sep 5 11:25:58 2014 New Revision: 271159 URL: http://svnweb.freebsd.org/changeset/base/271159 Log: The USB LED driver for the Dream Cheeky WebMail Notifier. Reviewed by: hselasky Added: head/share/man/man4/uled.4 (contents, props changed) head/sys/dev/usb/misc/uled.c (contents, props changed) head/sys/dev/usb/uled_ioctl.h (contents, props changed) head/sys/modules/usb/uled/ head/sys/modules/usb/uled/Makefile (contents, props changed) Modified: head/Makefile head/share/man/man4/Makefile head/sys/conf/NOTES head/sys/conf/files head/sys/dev/usb/quirk/usb_quirk.c head/sys/dev/usb/usbdevs head/sys/modules/usb/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Fri Sep 5 11:11:15 2014 (r271158) +++ head/Makefile Fri Sep 5 11:25:58 2014 (r271159) @@ -1,6 +1,42 @@ # # $FreeBSD$ # +# Copyright (c) 2014 Kevin Lo. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# + +S= ${.CURDIR}/../../.. + +.PATH: $S/dev/usb/misc + +KMOD= uled +SRCS= opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h vnode_if.h usbdevs.h \ + uled.c + +.include +# +# $FreeBSD$ +# # The user-driven targets are: # # universe - *Really* build *everything* (buildworld and Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Fri Sep 5 11:11:15 2014 (r271158) +++ head/share/man/man4/Makefile Fri Sep 5 11:25:58 2014 (r271159) @@ -527,6 +527,7 @@ MAN= aac.4 \ uhso.4 \ uipaq.4 \ ukbd.4 \ + uled.4 \ ulpt.4 \ umass.4 \ umcs.4 \ Added: head/share/man/man4/uled.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/uled.4 Fri Sep 5 11:25:58 2014 (r271159) @@ -0,0 +1,95 @@ +.\" +.\" Copyright (c) 2014 Kevin Lo +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd September 5, 2014 +.Dt ULED 4 +.Os +.Sh NAME +.Nm uled +.Nd USB LED driver +.Sh SYNOPSIS +To compile this driver into the kernel, place the following lines into +your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device uled" +.Cd "device usb" +.Ed +.Pp +Alternatively, to load the driver as a module at boot time, +place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +uled_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for the Dream Cheeky WebMail Notifier device. +.Pp +Subsequently, the +.Pa /dev/uled0 +device can be used by userland applications. +.Sh IOCTLS +The following +.Xr ioctl 2 +commands can be performed on +.Pa /dev/uled0 , +which are defined in +.In dev/usb/uled_ioctl.h : +.Bl -tag -width indent +.It Dv ULED_GET_COLOR +The command returns LED colors with values for RGB. +This +.Xr ioctl 2 +takes the following structure: +.Bd -literal +struct uled_color { + uint8_t red; + uint8_t green; + uint8_t blue; +}; +.Ed +.Pp +.It Dv ULED_SET_COLOR +The command sets LED colors with values for RGB. +It uses the same structure as above. +.El +.Sh FILES +.Bl -tag -width ".Pa /dev/uled0" -compact +.It Pa /dev/uled0 +blocking device node +.El +.Sh SEE ALSO +.Xr ohci 4 , +.Xr uhci 4 , +.Xr usb 4 +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Kevin Lo Aq Mt kevlo@FreeBSD.org . Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Fri Sep 5 11:11:15 2014 (r271158) +++ head/sys/conf/NOTES Fri Sep 5 11:25:58 2014 (r271159) @@ -2653,6 +2653,8 @@ device usb device udbp # USB Fm Radio device ufm +# USB LED +device uled # Human Interface Device (anything with buttons and dials) device uhid # USB keyboard Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Sep 5 11:11:15 2014 (r271158) +++ head/sys/conf/files Fri Sep 5 11:25:58 2014 (r271159) @@ -2542,6 +2542,7 @@ dev/usb/serial/usb_serial.c optional uc # dev/usb/misc/ufm.c optional ufm dev/usb/misc/udbp.c optional udbp +dev/usb/misc/uled.c optional uled # # USB input drivers # Added: head/sys/dev/usb/misc/uled.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/misc/uled.c Fri Sep 5 11:25:58 2014 (r271159) @@ -0,0 +1,275 @@ +/*- + * Copyright (c) 2014 Kevin Lo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include "usbdevs.h" + +#define USB_DEBUG_VAR usb_debug +#include + +#include + +struct uled_softc { + struct usb_fifo_sc sc_fifo; + struct mtx sc_mtx; + + struct usb_device *sc_udev; + struct uled_color sc_color; + + uint8_t sc_state; +#define ULED_ENABLED 0x01 +}; + +/* prototypes */ + +static device_probe_t uled_probe; +static device_attach_t uled_attach; +static device_detach_t uled_detach; + +static usb_fifo_open_t uled_open; +static usb_fifo_close_t uled_close; +static usb_fifo_ioctl_t uled_ioctl; + +static struct usb_fifo_methods uled_fifo_methods = { + .f_open = &uled_open, + .f_close = &uled_close, + .f_ioctl = &uled_ioctl, + .basename[0] = "uled", +}; + +static usb_error_t uled_ctrl_msg(struct uled_softc *, uint8_t, uint8_t, + uint16_t, uint16_t, void *buf, uint16_t); +static int uled_enable(struct uled_softc *); + +static devclass_t uled_devclass; + +static device_method_t uled_methods[] = { + DEVMETHOD(device_probe, uled_probe), + DEVMETHOD(device_attach, uled_attach), + DEVMETHOD(device_detach, uled_detach), + + DEVMETHOD_END +}; + +static driver_t uled_driver = { + .name = "uled", + .methods = uled_methods, + .size = sizeof(struct uled_softc), +}; + +DRIVER_MODULE(uled, uhub, uled_driver, uled_devclass, NULL, NULL); +MODULE_DEPEND(uled, usb, 1, 1, 1); +MODULE_VERSION(uled, 1); + +static const STRUCT_USB_HOST_ID uled_devs[] = { + {USB_VPI(USB_VENDOR_DREAMLINK, USB_PRODUCT_DREAMLINK_DL100B, 0)}, +}; + +static int +uled_probe(device_t dev) +{ + struct usb_attach_arg *uaa; + + uaa = device_get_ivars(dev); + if (uaa->usb_mode != USB_MODE_HOST) + return (ENXIO); + if (uaa->info.bInterfaceClass != UICLASS_HID) + return (ENXIO); + + return (usbd_lookup_id_by_uaa(uled_devs, sizeof(uled_devs), uaa)); +} + +static int +uled_attach(device_t dev) +{ + struct usb_attach_arg *uaa; + struct uled_softc *sc; + int unit; + usb_error_t error; + + uaa = device_get_ivars(dev); + sc = device_get_softc(dev); + unit = device_get_unit(dev); + + device_set_usb_desc(dev); + mtx_init(&sc->sc_mtx, "uled lock", NULL, MTX_DEF | MTX_RECURSE); + + sc->sc_udev = uaa->device; + + error = usb_fifo_attach(uaa->device, sc, &sc->sc_mtx, + &uled_fifo_methods, &sc->sc_fifo, unit, -1, + uaa->info.bIfaceIndex, UID_ROOT, GID_OPERATOR, 0644); + if (error != 0) + goto detach; + + sc->sc_color.red = 0; + sc->sc_color.green = 0; + sc->sc_color.blue = 0; + + return (0); + +detach: + uled_detach(dev); + return (ENOMEM); +} + +static int +uled_detach(device_t dev) +{ + struct uled_softc *sc; + + sc = device_get_softc(dev); + usb_fifo_detach(&sc->sc_fifo); + mtx_destroy(&sc->sc_mtx); + return (0); +} + +static usb_error_t +uled_ctrl_msg(struct uled_softc *sc, uint8_t rt, uint8_t reqno, + uint16_t value, uint16_t index, void *buf, uint16_t buflen) +{ + struct usb_device_request req; + + req.bmRequestType = rt; + req.bRequest = reqno; + USETW(req.wValue, value); + USETW(req.wIndex, index); + USETW(req.wLength, buflen); + + return (usbd_do_request_flags(sc->sc_udev, &sc->sc_mtx, &req, buf, + 0, NULL, 2000)); +} + +static int +uled_enable(struct uled_softc *sc) +{ + static uint8_t cmdbuf[] = { 0x1f, 0x02, 0x00, 0x5f, 0x00, 0x00, 0x1a, + 0x03 }; + int error; + + sc->sc_state |= ULED_ENABLED; + mtx_lock(&sc->sc_mtx); + error = uled_ctrl_msg(sc, UT_WRITE_CLASS_INTERFACE, UR_SET_REPORT, + 0x200, 0, cmdbuf, sizeof(cmdbuf)); + mtx_unlock(&sc->sc_mtx); + return (error); +} + +static int +uled_open(struct usb_fifo *fifo, int fflags) +{ + if (fflags & FREAD) { + struct uled_softc *sc; + int rc; + + sc = usb_fifo_softc(fifo); + if (sc->sc_state & ULED_ENABLED) + return (EBUSY); + if ((rc = uled_enable(sc)) != 0) + return (rc); + } + return (0); +} + +static void +uled_close(struct usb_fifo *fifo, int fflags) +{ + if (fflags & FREAD) { + struct uled_softc *sc; + + sc = usb_fifo_softc(fifo); + sc->sc_state &= ~ULED_ENABLED; + } +} + +static int +uled_ioctl(struct usb_fifo *fifo, u_long cmd, void *addr, int fflags) +{ + struct uled_softc *sc; + struct uled_color color; + int error; + + sc = usb_fifo_softc(fifo); + error = 0; + + mtx_lock(&sc->sc_mtx); + + switch(cmd) { + case ULED_GET_COLOR: + *(struct uled_color *)addr = sc->sc_color; + break; + case ULED_SET_COLOR: + color = *(struct uled_color *)addr; + uint8_t buf[8]; + + sc->sc_color.red = color.red; + sc->sc_color.green = color.green; + sc->sc_color.blue = color.blue; + + buf[0] = color.red; + buf[1] = color.green; + buf[2] = color.blue; + buf[3] = buf[4] = buf[5] = 0; + buf[6] = 0x1a; + buf[7] = 0x05; + error = uled_ctrl_msg(sc, UT_WRITE_CLASS_INTERFACE, + UR_SET_REPORT, 0x200, 0, buf, sizeof(buf)); + break; + default: + error = ENOTTY; + break; + } + + mtx_unlock(&sc->sc_mtx); + return (error); +} Modified: head/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- head/sys/dev/usb/quirk/usb_quirk.c Fri Sep 5 11:11:15 2014 (r271158) +++ head/sys/dev/usb/quirk/usb_quirk.c Fri Sep 5 11:25:58 2014 (r271159) @@ -110,6 +110,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(CYBERPOWER, 1500CAVRLCD, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(CYPRESS, SILVERSHIELD, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(DELORME, EARTHMATE, 0x0000, 0xffff, UQ_HID_IGNORE), + USB_QUIRK(DREAMLINK, DL100B, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(ITUNERNET, USBLCD2X20, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(ITUNERNET, USBLCD4X20, 0x0000, 0xffff, UQ_HID_IGNORE), USB_QUIRK(LIEBERT, POWERSURE_PXT, 0x0000, 0xffff, UQ_HID_IGNORE), Added: head/sys/dev/usb/uled_ioctl.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/uled_ioctl.h Fri Sep 5 11:25:58 2014 (r271159) @@ -0,0 +1,43 @@ +/*- + * Copyright (c) 2014 Kevin Lo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _ULED_IOCTL_H_ +#define _ULED_IOCTL_H_ + +#include + +struct uled_color { + uint8_t red; + uint8_t green; + uint8_t blue; +}; + +#define ULED_GET_COLOR _IOR('U', 205, struct uled_color) +#define ULED_SET_COLOR _IOW('U', 206, struct uled_color) + +#endif /* _ULED_IOCTL_H_ */ Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Fri Sep 5 11:11:15 2014 (r271158) +++ head/sys/dev/usb/usbdevs Fri Sep 5 11:25:58 2014 (r271159) @@ -713,6 +713,7 @@ vendor LONGCHEER 0x1c9e Longcheer Holdin vendor MPMAN 0x1cae MpMan vendor DRESDENELEKTRONIK 0x1cf1 dresden elektronik vendor NEOTEL 0x1d09 Neotel +vendor DREAMLINK 0x1d34 Dream Link vendor PEGATRON 0x1d4d Pegatron vendor QISDA 0x1da5 Qisda vendor METAGEEK2 0x1dd5 MetaGeek @@ -1657,6 +1658,9 @@ product DMI DISK 0x2bcf Generic Disk /* DrayTek products */ product DRAYTEK VIGOR550 0x0550 Vigor550 +/* Dream Link products */ +product DREAMLINK DL100B 0x0004 USB Webmail Notifier + /* dresden elektronik products */ product DRESDENELEKTRONIK SENSORTERMINALBOARD 0x0001 SensorTerminalBoard product DRESDENELEKTRONIK WIRELESSHANDHELDTERMINAL 0x0004 Wireless Handheld Terminal Modified: head/sys/modules/usb/Makefile ============================================================================== --- head/sys/modules/usb/Makefile Fri Sep 5 11:11:15 2014 (r271158) +++ head/sys/modules/usb/Makefile Fri Sep 5 11:25:58 2014 (r271159) @@ -48,7 +48,7 @@ SUBDIR += ${_dwc_otg} ehci ${_musb} ohci ${_atmegadci} ${_avr32dci} ${_rsu} ${_rsufw} ${_saf1761otg} SUBDIR += ${_rum} ${_run} ${_runfw} ${_uath} upgt usie ural ${_zyd} ${_urtw} SUBDIR += ${_urtwn} ${_urtwnfw} -SUBDIR += atp uhid ukbd ums udbp ufm uep wsp +SUBDIR += atp uhid ukbd ums udbp ufm uep wsp uled SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq ulpt \ umct umcs umodem umoscom uplcom uslcom uvisor uvscom SUBDIR += uether aue axe axge cdce cue ${_kue} mos rue smsc udav uhso ipheth Added: head/sys/modules/usb/uled/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/usb/uled/Makefile Fri Sep 5 11:25:58 2014 (r271159) @@ -0,0 +1,36 @@ +# +# $FreeBSD$ +# +# Copyright (c) 2014 Kevin Lo. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# + +S= ${.CURDIR}/../../.. + +.PATH: $S/dev/usb/misc + +KMOD= uled +SRCS= opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h vnode_if.h usbdevs.h \ + uled.c + +.include From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 09:24:27 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78B9BC5A; Fri, 5 Sep 2014 09:24:27 +0000 (UTC) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 2D6291472; Fri, 5 Sep 2014 09:24:25 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA19169; Fri, 05 Sep 2014 12:24:03 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1XPpkQ-000PYs-Mg; Fri, 05 Sep 2014 12:24:02 +0300 Message-ID: <5409810E.1080705@FreeBSD.org> Date: Fri, 05 Sep 2014 12:23:26 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Steven Hartland Subject: Re: svn commit: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm References: <201408281950.s7SJo90I047213@svn.freebsd.org> <169C94ED141B435BACEADB04A4824717@multiplay.co.uk> <54072E20.10802@mail.lifanov.com> <2230377.GgKARkJyaG@ralph.baldwin.cx> <540778A2.3080809@mail.lifanov.com> <5407816B.9000401@FreeBSD.org> <86292055B4114529874B693EEB441CB6@multiplay.co.uk> In-Reply-To: <86292055B4114529874B693EEB441CB6@multiplay.co.uk> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Fri, 05 Sep 2014 11:33:43 +0000 Cc: src-committers@FreeBSD.org, John Baldwin , Peter Wemm , Alan Cox , svn-src-all@FreeBSD.org, Dmitry Morozovsky , "Matthew D. Fuller" , Nikolai Lifanov , svn-src-head@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 09:24:27 -0000 on 04/09/2014 04:18 Steven Hartland said the following: > Indeed that would be interesting, but we might find that its quite memory size > dependent given the scaling so confirming HW details would be nice too. > > I'd also be interested to know who wins the free race between the VM and ARC > when using that value. BTW, I've written a small silly program that tests for a problem that affected me in the distant past: http://people.freebsd.org/~avg/arc-vs-swap.c It gobbles almost all of the memory and then just sits on it never accessing it again. At the same time it repeatedly reads blocks of data from a large file. The idea is that eventually the unused memory should be pushed out to the swap and the ARC is allowed to grow to accommodate for the data being read. I run this program on a freshly booted system without any other applications. Prior to r270759 the system behaves as expected. Although the pace of shifting balance between the ARC and the swap-backed pages is quite slow. After r270759 and with the default tuning the ARC always sits at its minimum size. To me this is a regression. To summarize: I really appreciate the improvements that you are making here https://reviews.freebsd.org/D702 Thanks! P.S. I wish there was an easy way to make the page cache and the ARC aware of each other. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 13:08:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6765EB34; Fri, 5 Sep 2014 13:08:37 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1021120A; Fri, 5 Sep 2014 13:08:36 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s85D8S3v093176 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 5 Sep 2014 16:08:28 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s85D8S3v093176 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s85D8Sen093175; Fri, 5 Sep 2014 16:08:28 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 5 Sep 2014 16:08:28 +0300 From: Konstantin Belousov To: Kevin Lo Subject: Re: svn commit: r271159 - in head: . share/man/man4 sys/conf sys/dev/usb sys/dev/usb/misc sys/dev/usb/quirk sys/modules/usb sys/modules/usb/uled Message-ID: <20140905130828.GQ2737@kib.kiev.ua> References: <201409051125.s85BPwaE056586@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="adQrqeOhWOaS1Na2" Content-Disposition: inline In-Reply-To: <201409051125.s85BPwaE056586@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 13:08:37 -0000 --adQrqeOhWOaS1Na2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 05, 2014 at 11:25:58AM +0000, Kevin Lo wrote: > Author: kevlo > Date: Fri Sep 5 11:25:58 2014 > New Revision: 271159 > URL: http://svnweb.freebsd.org/changeset/base/271159 >=20 > Log: > The USB LED driver for the Dream Cheeky WebMail Notifier. > =20 > Reviewed by: hselasky >=20 > Added: > head/share/man/man4/uled.4 (contents, props changed) > head/sys/dev/usb/misc/uled.c (contents, props changed) > head/sys/dev/usb/uled_ioctl.h (contents, props changed) > head/sys/modules/usb/uled/ > head/sys/modules/usb/uled/Makefile (contents, props changed) > Modified: > head/Makefile ^^^^^^^^^ > head/share/man/man4/Makefile > head/sys/conf/NOTES > head/sys/conf/files > head/sys/dev/usb/quirk/usb_quirk.c > head/sys/dev/usb/usbdevs > head/sys/modules/usb/Makefile >=20 > Modified: head/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/Makefile Fri Sep 5 11:11:15 2014 (r271158) > +++ head/Makefile Fri Sep 5 11:25:58 2014 (r271159) > @@ -1,6 +1,42 @@ > # > # $FreeBSD$ > # > +# Copyright (c) 2014 Kevin Lo. All rights reserved. > +# > +# Redistribution and use in source and binary forms, with or without > +# modification, are permitted provided that the following conditions > +# are met: > +# 1. Redistributions of source code must retain the above copyright > +# notice, this list of conditions and the following disclaimer. > +# 2. Redistributions in binary form must reproduce the above copyright > +# notice, this list of conditions and the following disclaimer in the > +# documentation and/or other materials provided with the distribution. > +# > +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PUR= POSE > +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUEN= TIAL > +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, ST= RICT > +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY = WAY > +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > +# SUCH DAMAGE. > +# > + > +S=3D ${.CURDIR}/../../.. > + > +.PATH: $S/dev/usb/misc > + > +KMOD=3D uled > +SRCS=3D opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h vnode_if.h usb= devs.h \ > + uled.c > + > +.include > +# > +# $FreeBSD$ > +# > # The user-driven targets are: > # > # universe - *Really* build *everything* (buildworld and >=20 It seems you mis-patched the commit tree. > Modified: head/share/man/man4/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/share/man/man4/Makefile Fri Sep 5 11:11:15 2014 (r271158) > +++ head/share/man/man4/Makefile Fri Sep 5 11:25:58 2014 (r271159) > @@ -527,6 +527,7 @@ MAN=3D aac.4 \ > uhso.4 \ > uipaq.4 \ > ukbd.4 \ > + uled.4 \ > ulpt.4 \ > umass.4 \ > umcs.4 \ >=20 > Added: head/share/man/man4/uled.4 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/share/man/man4/uled.4 Fri Sep 5 11:25:58 2014 (r271159) > @@ -0,0 +1,95 @@ > +.\" > +.\" Copyright (c) 2014 Kevin Lo > +.\" All rights reserved. > +.\" > +.\" Redistribution and use in source and binary forms, with or without > +.\" modification, are permitted provided that the following conditions > +.\" are met: > +.\" 1. Redistributions of source code must retain the above copyright > +.\" notice, this list of conditions and the following disclaimer. > +.\" 2. Redistributions in binary form must reproduce the above copyright > +.\" notice, this list of conditions and the following disclaimer in t= he > +.\" documentation and/or other materials provided with the distributi= on. > +.\" > +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' A= ND > +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR P= URPOSE > +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIA= BLE > +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQU= ENTIAL > +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GO= ODS > +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, = STRICT > +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN AN= Y WAY > +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY = OF > +.\" SUCH DAMAGE. > +.\" > +.\" $FreeBSD$ > +.\" > +.Dd September 5, 2014 > +.Dt ULED 4 > +.Os > +.Sh NAME > +.Nm uled > +.Nd USB LED driver > +.Sh SYNOPSIS > +To compile this driver into the kernel, place the following lines into > +your kernel configuration file: > +.Bd -ragged -offset indent > +.Cd "device uled" > +.Cd "device usb" > +.Ed > +.Pp > +Alternatively, to load the driver as a module at boot time, > +place the following line in > +.Xr loader.conf 5 : > +.Bd -literal -offset indent > +uled_load=3D"YES" > +.Ed > +.Sh DESCRIPTION > +The > +.Nm > +driver provides support for the Dream Cheeky WebMail Notifier device. > +.Pp > +Subsequently, the > +.Pa /dev/uled0 > +device can be used by userland applications. > +.Sh IOCTLS > +The following > +.Xr ioctl 2 > +commands can be performed on > +.Pa /dev/uled0 , > +which are defined in > +.In dev/usb/uled_ioctl.h : > +.Bl -tag -width indent > +.It Dv ULED_GET_COLOR > +The command returns LED colors with values for RGB. > +This > +.Xr ioctl 2 > +takes the following structure: > +.Bd -literal > +struct uled_color { > + uint8_t red; > + uint8_t green; > + uint8_t blue; > +}; > +.Ed > +.Pp > +.It Dv ULED_SET_COLOR > +The command sets LED colors with values for RGB. > +It uses the same structure as above. > +.El > +.Sh FILES > +.Bl -tag -width ".Pa /dev/uled0" -compact > +.It Pa /dev/uled0 > +blocking device node > +.El > +.Sh SEE ALSO > +.Xr ohci 4 , > +.Xr uhci 4 , > +.Xr usb 4 > +.Sh AUTHORS > +.An -nosplit > +The > +.Nm > +driver was written by > +.An Kevin Lo Aq Mt kevlo@FreeBSD.org . >=20 > Modified: head/sys/conf/NOTES > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/conf/NOTES Fri Sep 5 11:11:15 2014 (r271158) > +++ head/sys/conf/NOTES Fri Sep 5 11:25:58 2014 (r271159) > @@ -2653,6 +2653,8 @@ device usb > device udbp > # USB Fm Radio > device ufm > +# USB LED > +device uled > # Human Interface Device (anything with buttons and dials) > device uhid > # USB keyboard >=20 > Modified: head/sys/conf/files > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/conf/files Fri Sep 5 11:11:15 2014 (r271158) > +++ head/sys/conf/files Fri Sep 5 11:25:58 2014 (r271159) > @@ -2542,6 +2542,7 @@ dev/usb/serial/usb_serial.c optional uc > # > dev/usb/misc/ufm.c optional ufm > dev/usb/misc/udbp.c optional udbp > +dev/usb/misc/uled.c optional uled > # > # USB input drivers > # >=20 > Added: head/sys/dev/usb/misc/uled.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/dev/usb/misc/uled.c Fri Sep 5 11:25:58 2014 (r271159) > @@ -0,0 +1,275 @@ > +/*- > + * Copyright (c) 2014 Kevin Lo > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions, and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distributio= n. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PU= RPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABL= E FOR > + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOO= DS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, S= TRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY= WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include "usbdevs.h" > + > +#define USB_DEBUG_VAR usb_debug > +#include > + > +#include > + > +struct uled_softc { > + struct usb_fifo_sc sc_fifo; > + struct mtx sc_mtx; > + > + struct usb_device *sc_udev; > + struct uled_color sc_color; > + > + uint8_t sc_state; > +#define ULED_ENABLED 0x01 > +}; > + > +/* prototypes */ > + > +static device_probe_t uled_probe; > +static device_attach_t uled_attach; > +static device_detach_t uled_detach; > + > +static usb_fifo_open_t uled_open; > +static usb_fifo_close_t uled_close; > +static usb_fifo_ioctl_t uled_ioctl; > + > +static struct usb_fifo_methods uled_fifo_methods =3D { > + .f_open =3D &uled_open, > + .f_close =3D &uled_close, > + .f_ioctl =3D &uled_ioctl, > + .basename[0] =3D "uled", > +}; > + > +static usb_error_t uled_ctrl_msg(struct uled_softc *, uint8_t, uint8_t, > + uint16_t, uint16_t, void *buf, uint16_t); > +static int uled_enable(struct uled_softc *); > + > +static devclass_t uled_devclass; > + > +static device_method_t uled_methods[] =3D { > + DEVMETHOD(device_probe, uled_probe), > + DEVMETHOD(device_attach, uled_attach), > + DEVMETHOD(device_detach, uled_detach), > + > + DEVMETHOD_END > +}; > + > +static driver_t uled_driver =3D { > + .name =3D "uled", > + .methods =3D uled_methods, > + .size =3D sizeof(struct uled_softc), > +}; > + > +DRIVER_MODULE(uled, uhub, uled_driver, uled_devclass, NULL, NULL); > +MODULE_DEPEND(uled, usb, 1, 1, 1); > +MODULE_VERSION(uled, 1); > + > +static const STRUCT_USB_HOST_ID uled_devs[] =3D { > + {USB_VPI(USB_VENDOR_DREAMLINK, USB_PRODUCT_DREAMLINK_DL100B, 0)}, > +}; > + > +static int > +uled_probe(device_t dev) > +{ > + struct usb_attach_arg *uaa; > + > + uaa =3D device_get_ivars(dev); > + if (uaa->usb_mode !=3D USB_MODE_HOST) > + return (ENXIO); > + if (uaa->info.bInterfaceClass !=3D UICLASS_HID) > + return (ENXIO); > + > + return (usbd_lookup_id_by_uaa(uled_devs, sizeof(uled_devs), uaa)); > +} > + > +static int > +uled_attach(device_t dev) > +{ > + struct usb_attach_arg *uaa; > + struct uled_softc *sc; > + int unit; > + usb_error_t error; > + > + uaa =3D device_get_ivars(dev); > + sc =3D device_get_softc(dev); > + unit =3D device_get_unit(dev); > + > + device_set_usb_desc(dev); > + mtx_init(&sc->sc_mtx, "uled lock", NULL, MTX_DEF | MTX_RECURSE); > + > + sc->sc_udev =3D uaa->device; > + > + error =3D usb_fifo_attach(uaa->device, sc, &sc->sc_mtx, > + &uled_fifo_methods, &sc->sc_fifo, unit, -1, > + uaa->info.bIfaceIndex, UID_ROOT, GID_OPERATOR, 0644); > + if (error !=3D 0) > + goto detach; > + > + sc->sc_color.red =3D 0; > + sc->sc_color.green =3D 0; > + sc->sc_color.blue =3D 0; > + > + return (0); > + > +detach: > + uled_detach(dev); > + return (ENOMEM); > +} > + > +static int > +uled_detach(device_t dev) > +{ > + struct uled_softc *sc; > + > + sc =3D device_get_softc(dev); > + usb_fifo_detach(&sc->sc_fifo); > + mtx_destroy(&sc->sc_mtx); > + return (0); > +} > + > +static usb_error_t > +uled_ctrl_msg(struct uled_softc *sc, uint8_t rt, uint8_t reqno, > + uint16_t value, uint16_t index, void *buf, uint16_t buflen) > +{ > + struct usb_device_request req; > + > + req.bmRequestType =3D rt; > + req.bRequest =3D reqno; > + USETW(req.wValue, value); > + USETW(req.wIndex, index); > + USETW(req.wLength, buflen); > + > + return (usbd_do_request_flags(sc->sc_udev, &sc->sc_mtx, &req, buf, > + 0, NULL, 2000)); > +} > + > +static int > +uled_enable(struct uled_softc *sc) > +{ > + static uint8_t cmdbuf[] =3D { 0x1f, 0x02, 0x00, 0x5f, 0x00, 0x00, 0x1a, > + 0x03 }; > + int error; > + > + sc->sc_state |=3D ULED_ENABLED; > + mtx_lock(&sc->sc_mtx); > + error =3D uled_ctrl_msg(sc, UT_WRITE_CLASS_INTERFACE, UR_SET_REPORT, > + 0x200, 0, cmdbuf, sizeof(cmdbuf)); > + mtx_unlock(&sc->sc_mtx); > + return (error); > +} > + > +static int > +uled_open(struct usb_fifo *fifo, int fflags) > +{ > + if (fflags & FREAD) { > + struct uled_softc *sc; > + int rc; > + > + sc =3D usb_fifo_softc(fifo); > + if (sc->sc_state & ULED_ENABLED) > + return (EBUSY); > + if ((rc =3D uled_enable(sc)) !=3D 0) > + return (rc); > + } > + return (0); > +} > + > +static void > +uled_close(struct usb_fifo *fifo, int fflags) > +{ > + if (fflags & FREAD) { > + struct uled_softc *sc; > + > + sc =3D usb_fifo_softc(fifo); > + sc->sc_state &=3D ~ULED_ENABLED; > + } > +} > + =09 > +static int > +uled_ioctl(struct usb_fifo *fifo, u_long cmd, void *addr, int fflags) > +{ > + struct uled_softc *sc; > + struct uled_color color; > + int error; > + > + sc =3D usb_fifo_softc(fifo); > + error =3D 0; > + > + mtx_lock(&sc->sc_mtx); > + > + switch(cmd) { > + case ULED_GET_COLOR: > + *(struct uled_color *)addr =3D sc->sc_color; > + break; > + case ULED_SET_COLOR: > + color =3D *(struct uled_color *)addr; > + uint8_t buf[8]; > + > + sc->sc_color.red =3D color.red; > + sc->sc_color.green =3D color.green; > + sc->sc_color.blue =3D color.blue; > + > + buf[0] =3D color.red; > + buf[1] =3D color.green; > + buf[2] =3D color.blue; > + buf[3] =3D buf[4] =3D buf[5] =3D 0; > + buf[6] =3D 0x1a; > + buf[7] =3D 0x05; > + error =3D uled_ctrl_msg(sc, UT_WRITE_CLASS_INTERFACE, > + UR_SET_REPORT, 0x200, 0, buf, sizeof(buf)); > + break; > + default: > + error =3D ENOTTY; > + break; > + } > + > + mtx_unlock(&sc->sc_mtx); > + return (error); > +} >=20 > Modified: head/sys/dev/usb/quirk/usb_quirk.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/usb/quirk/usb_quirk.c Fri Sep 5 11:11:15 2014 (r271158) > +++ head/sys/dev/usb/quirk/usb_quirk.c Fri Sep 5 11:25:58 2014 (r271159) > @@ -110,6 +110,7 @@ static struct usb_quirk_entry usb_quirks > USB_QUIRK(CYBERPOWER, 1500CAVRLCD, 0x0000, 0xffff, UQ_HID_IGNORE), > USB_QUIRK(CYPRESS, SILVERSHIELD, 0x0000, 0xffff, UQ_HID_IGNORE), > USB_QUIRK(DELORME, EARTHMATE, 0x0000, 0xffff, UQ_HID_IGNORE), > + USB_QUIRK(DREAMLINK, DL100B, 0x0000, 0xffff, UQ_HID_IGNORE), > USB_QUIRK(ITUNERNET, USBLCD2X20, 0x0000, 0xffff, UQ_HID_IGNORE), > USB_QUIRK(ITUNERNET, USBLCD4X20, 0x0000, 0xffff, UQ_HID_IGNORE), > USB_QUIRK(LIEBERT, POWERSURE_PXT, 0x0000, 0xffff, UQ_HID_IGNORE), >=20 > Added: head/sys/dev/usb/uled_ioctl.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/dev/usb/uled_ioctl.h Fri Sep 5 11:25:58 2014 (r271159) > @@ -0,0 +1,43 @@ > +/*- > + * Copyright (c) 2014 Kevin Lo > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distributio= n. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PU= RPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIAB= LE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUE= NTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOO= DS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, S= TRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY= WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +#ifndef _ULED_IOCTL_H_ > +#define _ULED_IOCTL_H_ > + > +#include > + > +struct uled_color { > + uint8_t red; > + uint8_t green; > + uint8_t blue; > +}; > + > +#define ULED_GET_COLOR _IOR('U', 205, struct uled_color) > +#define ULED_SET_COLOR _IOW('U', 206, struct uled_color) > + > +#endif /* _ULED_IOCTL_H_ */ >=20 > Modified: head/sys/dev/usb/usbdevs > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/usb/usbdevs Fri Sep 5 11:11:15 2014 (r271158) > +++ head/sys/dev/usb/usbdevs Fri Sep 5 11:25:58 2014 (r271159) > @@ -713,6 +713,7 @@ vendor LONGCHEER 0x1c9e Longcheer Holdin > vendor MPMAN 0x1cae MpMan > vendor DRESDENELEKTRONIK 0x1cf1 dresden elektronik > vendor NEOTEL 0x1d09 Neotel > +vendor DREAMLINK 0x1d34 Dream Link > vendor PEGATRON 0x1d4d Pegatron > vendor QISDA 0x1da5 Qisda > vendor METAGEEK2 0x1dd5 MetaGeek > @@ -1657,6 +1658,9 @@ product DMI DISK 0x2bcf Generic Disk > /* DrayTek products */ > product DRAYTEK VIGOR550 0x0550 Vigor550 > =20 > +/* Dream Link products */ > +product DREAMLINK DL100B 0x0004 USB Webmail Notifier > + > /* dresden elektronik products */ > product DRESDENELEKTRONIK SENSORTERMINALBOARD 0x0001 SensorTerminalBoard > product DRESDENELEKTRONIK WIRELESSHANDHELDTERMINAL 0x0004 Wireless Hand= held Terminal >=20 > Modified: head/sys/modules/usb/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/modules/usb/Makefile Fri Sep 5 11:11:15 2014 (r271158) > +++ head/sys/modules/usb/Makefile Fri Sep 5 11:25:58 2014 (r271159) > @@ -48,7 +48,7 @@ SUBDIR +=3D ${_dwc_otg} ehci ${_musb} ohci > ${_atmegadci} ${_avr32dci} ${_rsu} ${_rsufw} ${_saf1761otg} > SUBDIR +=3D ${_rum} ${_run} ${_runfw} ${_uath} upgt usie ural ${_zyd} ${= _urtw}=20 > SUBDIR +=3D ${_urtwn} ${_urtwnfw} > -SUBDIR +=3D atp uhid ukbd ums udbp ufm uep wsp > +SUBDIR +=3D atp uhid ukbd ums udbp ufm uep wsp uled > SUBDIR +=3D ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa ui= paq ulpt \ > umct umcs umodem umoscom uplcom uslcom uvisor uvscom > SUBDIR +=3D uether aue axe axge cdce cue ${_kue} mos rue smsc udav uhso = ipheth >=20 > Added: head/sys/modules/usb/uled/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/modules/usb/uled/Makefile Fri Sep 5 11:25:58 2014 (r271159) > @@ -0,0 +1,36 @@ > +# > +# $FreeBSD$ > +# > +# Copyright (c) 2014 Kevin Lo. All rights reserved. > +# > +# Redistribution and use in source and binary forms, with or without > +# modification, are permitted provided that the following conditions > +# are met: > +# 1. Redistributions of source code must retain the above copyright > +# notice, this list of conditions and the following disclaimer. > +# 2. Redistributions in binary form must reproduce the above copyright > +# notice, this list of conditions and the following disclaimer in the > +# documentation and/or other materials provided with the distribution. > +# > +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PUR= POSE > +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUEN= TIAL > +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, ST= RICT > +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY = WAY > +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > +# SUCH DAMAGE. > +# > + > +S=3D ${.CURDIR}/../../.. > + > +.PATH: $S/dev/usb/misc > + > +KMOD=3D uled > +SRCS=3D opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h vnode_if.h usb= devs.h \ > + uled.c > + > +.include --adQrqeOhWOaS1Na2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUCbXMAAoJEJDCuSvBvK1BWNwP/2hMU+81dZny2AwZ2jOATW/n Dh2xMpmOGVDKsGB7Q8zDA5YrL0bb210PZvN+tTxHLmKnIxVqrq7jNIi2G6YP1dzJ p7sRqN2R1Uo7ragbA1vN0A6X81PCSeB1Dc1tB5fvMW2czZbGsVqU+cDdXv2arU75 CWpmtw2nUM6puD57FP8Rt9gF5LlA0bjyGZlLwnMy++/4OlJgOdFVOp/TCRKPmNHd Ie2kzzB8ogBqhfMbHy5WNRDoEH3vxtOzTfseh2Gbhk4B5Qp5G8DVXb6GIDf3QnYd FEvPWH9DUuAuVLEWLc8UUHZ/xdgTq6haIeVen8HTUoUETxpxeGQBMvOnsCUuv4FX RRKxyQiwMvbcxAzlkZtM+RuAlKBJm9T8KZRF7ENNwbw+CSHcZrKUhE39jHe7q4P4 cFO8RYoiZHhFhQCEoNt3gW8no+G6XIK1UyIA3862uOtP1v+Q6orIDAPX6BTR5tzt TOJJH0qYBu/o4QD/6lSxSRQarKntYeUyDvq9fmOlR6n50Hq938lOlBUUe6+YapLo l1riBWh392dJywOvWv8VqmQP3KwqP7RXC238QzvOc+wDFkS4+RXmAlrrFWqg7yAY Qxncp0Yme5qIzbj6DIsjy2/Fxjg/j35fzOFfLnW1v4/qFGb8GRDPKPohr0LxB6jW C22dYgmvm/tiMLTBWlVf =L1Un -----END PGP SIGNATURE----- --adQrqeOhWOaS1Na2-- From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 13:22:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B05F90; Fri, 5 Sep 2014 13:22:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C1CE13B9; Fri, 5 Sep 2014 13:22:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85DMSpW011832; Fri, 5 Sep 2014 13:22:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85DMSFD011829; Fri, 5 Sep 2014 13:22:28 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409051322.s85DMSFD011829@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 5 Sep 2014 13:22:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271161 - in stable/10/sys: kern sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 13:22:29 -0000 Author: kib Date: Fri Sep 5 13:22:28 2014 New Revision: 271161 URL: http://svnweb.freebsd.org/changeset/base/271161 Log: Add function and wrapper to switch lockmgr and vnode lock back to auto-promotion of shared to exclusive. Approved by: re (gjb) Modified: stable/10/sys/kern/kern_lock.c stable/10/sys/sys/lockmgr.h stable/10/sys/sys/vnode.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_lock.c ============================================================================== --- stable/10/sys/kern/kern_lock.c Fri Sep 5 11:48:32 2014 (r271160) +++ stable/10/sys/kern/kern_lock.c Fri Sep 5 13:22:28 2014 (r271161) @@ -419,6 +419,14 @@ lockallowshare(struct lock *lk) } void +lockdisableshare(struct lock *lk) +{ + + lockmgr_assert(lk, KA_XLOCKED); + lk->lock_object.lo_flags |= LK_NOSHARE; +} + +void lockallowrecurse(struct lock *lk) { Modified: stable/10/sys/sys/lockmgr.h ============================================================================== --- stable/10/sys/sys/lockmgr.h Fri Sep 5 11:48:32 2014 (r271160) +++ stable/10/sys/sys/lockmgr.h Fri Sep 5 13:22:28 2014 (r271161) @@ -77,6 +77,7 @@ void lockallowrecurse(struct lock *lk); void lockallowshare(struct lock *lk); void lockdestroy(struct lock *lk); void lockdisablerecurse(struct lock *lk); +void lockdisableshare(struct lock *lk); void lockinit(struct lock *lk, int prio, const char *wmesg, int timo, int flags); #ifdef DDB Modified: stable/10/sys/sys/vnode.h ============================================================================== --- stable/10/sys/sys/vnode.h Fri Sep 5 11:48:32 2014 (r271160) +++ stable/10/sys/sys/vnode.h Fri Sep 5 13:22:28 2014 (r271161) @@ -428,6 +428,7 @@ extern struct vattr va_null; /* predefi #define VN_LOCK_AREC(vp) lockallowrecurse((vp)->v_vnlock) #define VN_LOCK_ASHARE(vp) lockallowshare((vp)->v_vnlock) +#define VN_LOCK_DSHARE(vp) lockdisableshare((vp)->v_vnlock) #endif /* _KERNEL */ From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 13:25:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 154F43D7; Fri, 5 Sep 2014 13:25:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 004D913D9; Fri, 5 Sep 2014 13:25:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85DPRQL012407; Fri, 5 Sep 2014 13:25:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85DPR9f012406; Fri, 5 Sep 2014 13:25:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409051325.s85DPR9f012406@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 5 Sep 2014 13:25:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271162 - stable/10/sys/ufs/ufs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 13:25:28 -0000 Author: kib Date: Fri Sep 5 13:25:27 2014 New Revision: 271162 URL: http://svnweb.freebsd.org/changeset/base/271162 Log: MFC r270797: Direct access to the quota files, in particular, lookup, causes lock conflict with the quota metadata access. Mark quota vnode lock as recursive and always exclusive to avoid the problem. Approved by: re (gjb) Modified: stable/10/sys/ufs/ufs/ufs_quota.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ufs/ufs_quota.c ============================================================================== --- stable/10/sys/ufs/ufs/ufs_quota.c Fri Sep 5 13:22:28 2014 (r271161) +++ stable/10/sys/ufs/ufs/ufs_quota.c Fri Sep 5 13:25:27 2014 (r271162) @@ -557,8 +557,21 @@ quotaon(struct thread *td, struct mount if (*vpp != vp) quotaoff1(td, mp, type); + /* + * When the directory vnode containing the quota file is + * inactivated, due to the shared lookup of the quota file + * vput()ing the dvp, the qsyncvp() call for the containing + * directory would try to acquire the quota lock exclusive. + * At the same time, lookup already locked the quota vnode + * shared. Mark the quota vnode lock as allowing recursion + * and automatically converting shared locks to exclusive. + * + * Also mark quota vnode as system. + */ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); vp->v_vflag |= VV_SYSTEM; + VN_LOCK_AREC(vp); + VN_LOCK_DSHARE(vp); VOP_UNLOCK(vp, 0); *vpp = vp; /* From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 13:29:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CB7C551; Fri, 5 Sep 2014 13:29:01 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82DF61434; Fri, 5 Sep 2014 13:29:00 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s85DStKH097744 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 5 Sep 2014 16:28:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s85DStKH097744 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s85DStBf097743; Fri, 5 Sep 2014 16:28:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 5 Sep 2014 16:28:55 +0300 From: Konstantin Belousov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r271161 - in stable/10/sys: kern sys Message-ID: <20140905132855.GR2737@kib.kiev.ua> References: <201409051322.s85DMSFD011829@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TD4T2t6LN4AO0FZv" Content-Disposition: inline In-Reply-To: <201409051322.s85DMSFD011829@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 13:29:01 -0000 --TD4T2t6LN4AO0FZv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 05, 2014 at 01:22:28PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Fri Sep 5 13:22:28 2014 > New Revision: 271161 > URL: http://svnweb.freebsd.org/changeset/base/271161 >=20 > Log: > Add function and wrapper to switch lockmgr and vnode lock back to > auto-promotion of shared to exclusive. > =20 > Approved by: re (gjb) The commit message missed a line, it is MFC of r270795. --TD4T2t6LN4AO0FZv Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUCbqXAAoJEJDCuSvBvK1Bb8cP/36URDEFOrtmHhD6rRabQ8dX sACsuC/m7r7T9SZ4gmIpuZbaiTEL4RIqrb/aH2JBATZsFOHunkKkIh+FxOmqiNhr gFUXTN6NagS+urTk78EvAe1uNvBysuIvT+jS3/WaL5WwGmH+CRJ6arj8xxd3t561 kaPFDAjC++IVZf0bODiOtPeyelBLwT2OX6faCUPHBXJvRNLnHCy0K4t53fNTL0rQ lWK52dj2FsbkjAVLsBubAZkmmMx7TOgs9+BUFk6B3oVk+uFEU+fWoplyaSzRMi2+ /Pt74AUkUYpet+E0dt4cjwTrmuGmUVVuuQgupVz7+1Y8jFZN2zxOLZvNYo94aDey 0uq91LlYXZ9rTYKUX0KH0qLKFWtEr8MixQARoZQauy3pMfo5g7UNMQHwgQwMPwsG BdqNs3YKEGMCJWdf7n3mJZWInaA9AKA2/35j9UpFCjyBnkwtH9itm2J85SQobSeY nMY42EZROZlLnDcOdqHDlaf4KBbmMedfLrBqS95VDK4kDlVOp3cxav4Pd2m6/8h1 91hE+wkUQur6fIxHpqtOKefJ62scHtiZwtt96wxDnieqm0nEU8/ktJNLlGRZJD44 Wd1BTTb2eOu9beoi4ZynkGcCaX5s607GLOIhfyJFmi1FY8R9Jh6clb2axAQsijki 12Znegnbkm0z8ZITWsGa =UMtd -----END PGP SIGNATURE----- --TD4T2t6LN4AO0FZv-- From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 13:45:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D2F1A59; Fri, 5 Sep 2014 13:45:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0CD5174C; Fri, 5 Sep 2014 13:45:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85DjEYD021999; Fri, 5 Sep 2014 13:45:14 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85DjEJl021997; Fri, 5 Sep 2014 13:45:14 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409051345.s85DjEJl021997@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 5 Sep 2014 13:45:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271163 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 13:45:15 -0000 Author: mav Date: Fri Sep 5 13:45:14 2014 New Revision: 271163 URL: http://svnweb.freebsd.org/changeset/base/271163 Log: Invert AHCI_Q_NOBSYRES quirk meaning, waiting for readiness by default. I gave up to update list of Marvell chips that require this quirk. The final nail was growing number of PCIe/M.2 SSDs where Marvell chips have PCI IDs of different vendors. MFC after: 1 week H/W donated by: I/O Switch Modified: head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci_pci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Fri Sep 5 13:25:27 2014 (r271162) +++ head/sys/dev/ahci/ahci.c Fri Sep 5 13:45:14 2014 (r271163) @@ -187,10 +187,9 @@ ahci_attach(device_t dev) ctlr->ichannels = ATA_INL(ctlr->r_mem, AHCI_PI); /* Identify and set separate quirks for HBA and RAID f/w Marvells. */ - if ((ctlr->quirks & AHCI_Q_NOBSYRES) && - (ctlr->quirks & AHCI_Q_ALTSIG) && + if ((ctlr->quirks & AHCI_Q_ALTSIG) && (ctlr->caps & AHCI_CAP_SPM) == 0) - ctlr->quirks &= ~AHCI_Q_NOBSYRES; + ctlr->quirks |= AHCI_Q_NOBSYRES; if (ctlr->quirks & AHCI_Q_1CH) { ctlr->caps &= ~AHCI_CAP_NPMASK; @@ -1533,9 +1532,15 @@ ahci_execute_transaction(struct ahci_slo } } - /* Marvell controllers do not wait for readyness. */ - if ((ch->quirks & AHCI_Q_NOBSYRES) && softreset == 2 && - et == AHCI_ERR_NONE) { + /* + * Marvell HBAs with non-RAID firmware do not wait for + * readiness after soft reset, so we have to wait here. + * Marvell RAIDs have no this problem, but instead sometimes + * forget to update FIS receive area, breaking this wait. + */ + if ((ch->quirks & AHCI_Q_NOBSYRES) == 0 && + (ch->quirks & AHCI_Q_ATI_PMP_BUG) == 0 && + softreset == 2 && et == AHCI_ERR_NONE) { while ((val = fis[2]) & ATA_S_BUSY) { DELAY(10); if (count++ >= timeout) Modified: head/sys/dev/ahci/ahci_pci.c ============================================================================== --- head/sys/dev/ahci/ahci_pci.c Fri Sep 5 13:25:27 2014 (r271162) +++ head/sys/dev/ahci/ahci_pci.c Fri Sep 5 13:45:14 2014 (r271163) @@ -179,31 +179,31 @@ static struct { AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, {0x614511ab, 0x00, "Marvell 88SE6145", AHCI_Q_NOFORCE | AHCI_Q_4CH | AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT}, - {0x91201b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_NOBSYRES}, - {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES}, - {0x91251b4b, 0x00, "Marvell 88SE9125", AHCI_Q_NOBSYRES}, - {0x91281b4b, 0x00, "Marvell 88SE9128", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x91301b4b, 0x00, "Marvell 88SE9130", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x91721b4b, 0x00, "Marvell 88SE9172", AHCI_Q_NOBSYRES}, - {0x91821b4b, 0x00, "Marvell 88SE9182", AHCI_Q_NOBSYRES}, - {0x91831b4b, 0x00, "Marvell 88SS9183", AHCI_Q_NOBSYRES}, - {0x91a01b4b, 0x00, "Marvell 88SE91Ax", AHCI_Q_NOBSYRES}, - {0x92151b4b, 0x00, "Marvell 88SE9215", AHCI_Q_NOBSYRES}, - {0x92201b4b, 0x00, "Marvell 88SE9220", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x92301b4b, 0x00, "Marvell 88SE9230", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG}, - {0x92351b4b, 0x00, "Marvell 88SE9235", AHCI_Q_NOBSYRES}, - {0x06201103, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, - {0x06201b4b, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES}, - {0x06221103, 0x00, "HighPoint RocketRAID 622", AHCI_Q_NOBSYRES}, - {0x06221b4b, 0x00, "HighPoint RocketRAID 622", AHCI_Q_NOBSYRES}, - {0x06401103, 0x00, "HighPoint RocketRAID 640", AHCI_Q_NOBSYRES}, - {0x06401b4b, 0x00, "HighPoint RocketRAID 640", AHCI_Q_NOBSYRES}, - {0x06441103, 0x00, "HighPoint RocketRAID 644", AHCI_Q_NOBSYRES}, - {0x06441b4b, 0x00, "HighPoint RocketRAID 644", AHCI_Q_NOBSYRES}, - {0x06411103, 0x00, "HighPoint RocketRAID 640L", AHCI_Q_NOBSYRES}, - {0x06421103, 0x00, "HighPoint RocketRAID 642L", AHCI_Q_NOBSYRES}, - {0x06451103, 0x00, "HighPoint RocketRAID 644L", AHCI_Q_NOBSYRES}, + {0x91201b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS}, + {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_ALTSIG}, + {0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2}, + {0x91251b4b, 0x00, "Marvell 88SE9125", 0}, + {0x91281b4b, 0x00, "Marvell 88SE9128", AHCI_Q_ALTSIG}, + {0x91301b4b, 0x00, "Marvell 88SE9130", AHCI_Q_ALTSIG}, + {0x91721b4b, 0x00, "Marvell 88SE9172", 0}, + {0x91821b4b, 0x00, "Marvell 88SE9182", 0}, + {0x91831b4b, 0x00, "Marvell 88SS9183", 0}, + {0x91a01b4b, 0x00, "Marvell 88SE91Ax", 0}, + {0x92151b4b, 0x00, "Marvell 88SE9215", 0}, + {0x92201b4b, 0x00, "Marvell 88SE9220", AHCI_Q_ALTSIG}, + {0x92301b4b, 0x00, "Marvell 88SE9230", AHCI_Q_ALTSIG}, + {0x92351b4b, 0x00, "Marvell 88SE9235", 0}, + {0x06201103, 0x00, "HighPoint RocketRAID 620", 0}, + {0x06201b4b, 0x00, "HighPoint RocketRAID 620", 0}, + {0x06221103, 0x00, "HighPoint RocketRAID 622", 0}, + {0x06221b4b, 0x00, "HighPoint RocketRAID 622", 0}, + {0x06401103, 0x00, "HighPoint RocketRAID 640", 0}, + {0x06401b4b, 0x00, "HighPoint RocketRAID 640", 0}, + {0x06441103, 0x00, "HighPoint RocketRAID 644", 0}, + {0x06441b4b, 0x00, "HighPoint RocketRAID 644", 0}, + {0x06411103, 0x00, "HighPoint RocketRAID 640L", 0}, + {0x06421103, 0x00, "HighPoint RocketRAID 642L", 0}, + {0x06451103, 0x00, "HighPoint RocketRAID 644L", 0}, {0x044c10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, {0x044d10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, {0x044e10de, 0x00, "NVIDIA MCP65", AHCI_Q_NOAA}, From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 14:32:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B155C05; Fri, 5 Sep 2014 14:32:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 860721CB4; Fri, 5 Sep 2014 14:32:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85EW9Nk045746; Fri, 5 Sep 2014 14:32:09 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85EW9C7045745; Fri, 5 Sep 2014 14:32:09 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201409051432.s85EW9C7045745@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 5 Sep 2014 14:32:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271167 - head/usr.sbin/autofs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 14:32:09 -0000 Author: trasz Date: Fri Sep 5 14:32:09 2014 New Revision: 271167 URL: http://svnweb.freebsd.org/changeset/base/271167 Log: Make it possible to quote names in autofs maps using double quotes. Note that this is a workaround, not a proper solution. If you know lex well, and want to help - please let me know, I'll explain how it should work. PR: 192968 MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/autofs/token.l Modified: head/usr.sbin/autofs/token.l ============================================================================== --- head/usr.sbin/autofs/token.l Fri Sep 5 14:19:02 2014 (r271166) +++ head/usr.sbin/autofs/token.l Fri Sep 5 14:32:09 2014 (r271167) @@ -48,6 +48,7 @@ extern int yylex(void); %option noyywrap %% +\"[^"]+\" { yytext++; yytext[strlen(yytext) - 1] = '\0'; return STR; }; [a-zA-Z0-9\.\+-_/\:\[\]$&{}]+ { return STR; } #.*\n { lineno++; return NEWLINE; }; \\\n { lineno++; }; From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 14:35:35 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18ECFF77; Fri, 5 Sep 2014 14:35:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E08751CE9; Fri, 5 Sep 2014 14:35:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85EZYSO046311; Fri, 5 Sep 2014 14:35:34 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85EZYD3046310; Fri, 5 Sep 2014 14:35:34 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201409051435.s85EZYD3046310@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Fri, 5 Sep 2014 14:35:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271168 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 14:35:35 -0000 Author: kevlo Date: Fri Sep 5 14:35:34 2014 New Revision: 271168 URL: http://svnweb.freebsd.org/changeset/base/271168 Log: Revert r271159, Mis-patched the tree. Pointed out by: kib Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Fri Sep 5 14:32:09 2014 (r271167) +++ head/Makefile Fri Sep 5 14:35:34 2014 (r271168) @@ -1,42 +1,6 @@ # # $FreeBSD$ # -# Copyright (c) 2014 Kevin Lo. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# - -S= ${.CURDIR}/../../.. - -.PATH: $S/dev/usb/misc - -KMOD= uled -SRCS= opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h vnode_if.h usbdevs.h \ - uled.c - -.include -# -# $FreeBSD$ -# # The user-driven targets are: # # universe - *Really* build *everything* (buildworld and From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 14:41:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5FB08460; Fri, 5 Sep 2014 14:41:40 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 179AB1DEC; Fri, 5 Sep 2014 14:41:39 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 887461FE027; Fri, 5 Sep 2014 16:41:37 +0200 (CEST) Message-ID: <5409CBA0.3080401@selasky.org> Date: Fri, 05 Sep 2014 16:41:36 +0200 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Konstantin Belousov , Kevin Lo Subject: Re: svn commit: r271159 - in head: . share/man/man4 sys/conf sys/dev/usb sys/dev/usb/misc sys/dev/usb/quirk sys/modules/usb sys/modules/usb/uled References: <201409051125.s85BPwaE056586@svn.freebsd.org> <20140905130828.GQ2737@kib.kiev.ua> In-Reply-To: <20140905130828.GQ2737@kib.kiev.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 14:41:40 -0000 On 09/05/14 15:08, Konstantin Belousov wrote: > On Fri, Sep 05, 2014 at 11:25:58AM +0000, Kevin Lo wrote: >> Author: kevlo >> Date: Fri Sep 5 11:25:58 2014 >> New Revision: 271159 >> URL: http://svnweb.freebsd.org/changeset/base/271159 >> >> Log: >> The USB LED driver for the Dream Cheeky WebMail Notifier. >> >> Reviewed by: hselasky >> >> Added: >> head/share/man/man4/uled.4 (contents, props changed) >> head/sys/dev/usb/misc/uled.c (contents, props changed) >> head/sys/dev/usb/uled_ioctl.h (contents, props changed) >> head/sys/modules/usb/uled/ >> head/sys/modules/usb/uled/Makefile (contents, props changed) >> Modified: >> head/Makefile > ^^^^^^^^^ > Hi, The "head/Makefile" was not part of the reviewed patch sent to me. Anyway, USB modules rock also at toplevel ;-) --HPS From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 14:44:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BC8F6E7; Fri, 5 Sep 2014 14:44:33 +0000 (UTC) Received: from ns.kevlo.org (220-135-115-6.HINET-IP.hinet.net [220.135.115.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns.kevlo.org", Issuer "ns.kevlo.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9298E1E2E; Fri, 5 Sep 2014 14:44:32 +0000 (UTC) Received: from ns.kevlo.org (localhost [127.0.0.1]) by ns.kevlo.org (8.14.8/8.14.8) with ESMTP id s85EhPH9072448 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 5 Sep 2014 22:43:25 +0800 (CST) (envelope-from kevlo@ns.kevlo.org) Received: (from kevlo@localhost) by ns.kevlo.org (8.14.8/8.14.8/Submit) id s85EhPpV072447; Fri, 5 Sep 2014 22:43:25 +0800 (CST) (envelope-from kevlo) Date: Fri, 5 Sep 2014 22:43:24 +0800 From: Kevin Lo To: Konstantin Belousov Subject: Re: svn commit: r271159 - in head: . share/man/man4 sys/conf sys/dev/usb sys/dev/usb/misc sys/dev/usb/quirk sys/modules/usb sys/modules/usb/uled Message-ID: <20140905144324.GA72438@ns.kevlo.org> References: <201409051125.s85BPwaE056586@svn.freebsd.org> <20140905130828.GQ2737@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140905130828.GQ2737@kib.kiev.ua> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 14:44:33 -0000 On Fri, Sep 05, 2014 at 04:08:28PM +0300, Konstantin Belousov wrote: > On Fri, Sep 05, 2014 at 11:25:58AM +0000, Kevin Lo wrote: > > Author: kevlo > > Date: Fri Sep 5 11:25:58 2014 > > New Revision: 271159 > > URL: http://svnweb.freebsd.org/changeset/base/271159 > > > > Log: > > The USB LED driver for the Dream Cheeky WebMail Notifier. > > > > Reviewed by: hselasky > > > > Added: > > head/share/man/man4/uled.4 (contents, props changed) > > head/sys/dev/usb/misc/uled.c (contents, props changed) > > head/sys/dev/usb/uled_ioctl.h (contents, props changed) > > head/sys/modules/usb/uled/ > > head/sys/modules/usb/uled/Makefile (contents, props changed) > > Modified: > > head/Makefile > ^^^^^^^^^ > > > head/share/man/man4/Makefile > > head/sys/conf/NOTES > > head/sys/conf/files > > head/sys/dev/usb/quirk/usb_quirk.c > > head/sys/dev/usb/usbdevs > > head/sys/modules/usb/Makefile > > > > Modified: head/Makefile > > ============================================================================== > > --- head/Makefile Fri Sep 5 11:11:15 2014 (r271158) > > +++ head/Makefile Fri Sep 5 11:25:58 2014 (r271159) > > @@ -1,6 +1,42 @@ > > # > > # $FreeBSD$ > > # > > +# Copyright (c) 2014 Kevin Lo. All rights reserved. > > +# > > +# Redistribution and use in source and binary forms, with or without > > +# modification, are permitted provided that the following conditions > > +# are met: > > +# 1. Redistributions of source code must retain the above copyright > > +# notice, this list of conditions and the following disclaimer. > > +# 2. Redistributions in binary form must reproduce the above copyright > > +# notice, this list of conditions and the following disclaimer in the > > +# documentation and/or other materials provided with the distribution. > > +# > > +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > > +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > > +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > > +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > > +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > > +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > > +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > > +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > > +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > > +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > > +# SUCH DAMAGE. > > +# > > + > > +S= ${.CURDIR}/../../.. > > + > > +.PATH: $S/dev/usb/misc > > + > > +KMOD= uled > > +SRCS= opt_bus.h opt_usb.h device_if.h bus_if.h usb_if.h vnode_if.h usbdevs.h \ > > + uled.c > > + > > +.include > > +# > > +# $FreeBSD$ > > +# > > # The user-driven targets are: > > # > > # universe - *Really* build *everything* (buildworld and > > > It seems you mis-patched the commit tree. I'm sorry that was my damn fault. Just committed a fix in r271168. Thanks for spotting. Kevin From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 14:48:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6FCFB1E; Fri, 5 Sep 2014 14:48:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A20AE1E63; Fri, 5 Sep 2014 14:48:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85Em6Am051457; Fri, 5 Sep 2014 14:48:06 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85Em6Mu051456; Fri, 5 Sep 2014 14:48:06 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201409051448.s85Em6Mu051456@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 5 Sep 2014 14:48:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271169 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 14:48:06 -0000 Author: trasz Date: Fri Sep 5 14:48:06 2014 New Revision: 271169 URL: http://svnweb.freebsd.org/changeset/base/271169 Log: Turn two errors, which are possible to trigger only by bugs, into assertions. Discussed with: mav@ MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctld.c Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Fri Sep 5 14:35:34 2014 (r271168) +++ head/usr.sbin/ctld/ctld.c Fri Sep 5 14:48:06 2014 (r271169) @@ -1760,9 +1760,7 @@ main_loop(struct conf *conf, bool dont_f client_salen = sizeof(client_sa); kernel_accept(&connection_id, &portal_id, (struct sockaddr *)&client_sa, &client_salen); - if (client_salen < client_sa.ss_len) - log_errx(1, "salen %u < %u", - client_salen, client_sa.ss_len); + assert(client_salen >= client_sa.ss_len); log_debugx("incoming connection, id %d, portal id %d", connection_id, portal_id); @@ -1806,10 +1804,8 @@ found: &client_salen); if (client_fd < 0) log_err(1, "accept"); - if (client_salen < client_sa.ss_len) - log_errx(1, "salen %u < %u", - client_salen, - client_sa.ss_len); + assert(client_salen >= client_sa.ss_len); + handle_connection(portal, client_fd, (struct sockaddr *)&client_sa, dont_fork); From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 14:58:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88B57D8A; Fri, 5 Sep 2014 14:58:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59EAB1F57; Fri, 5 Sep 2014 14:58:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85EwPwZ056063; Fri, 5 Sep 2014 14:58:25 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85EwPgX056062; Fri, 5 Sep 2014 14:58:25 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201409051458.s85EwPgX056062@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 5 Sep 2014 14:58:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271170 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 14:58:25 -0000 Author: trasz Date: Fri Sep 5 14:58:24 2014 New Revision: 271170 URL: http://svnweb.freebsd.org/changeset/base/271170 Log: Document initiator-portal netmask support. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctl.conf.5 Modified: head/usr.sbin/ctld/ctl.conf.5 ============================================================================== --- head/usr.sbin/ctld/ctl.conf.5 Fri Sep 5 14:48:06 2014 (r271169) +++ head/usr.sbin/ctld/ctl.conf.5 Fri Sep 5 14:58:24 2014 (r271170) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 28, 2014 +.Dd September 5, 2014 .Dt CTL.CONF 5 .Os .Sh NAME @@ -118,8 +118,9 @@ If not defined, there will be no restric name. Otherwise, only initiators with names matching one of defined ones will be allowed to connect. -.It Ic initiator-portal Ao Ar address Ac -Specifies iSCSI initiator portal - IPv4 or IPv6 address or network. +.It Ic initiator-portal Ao Ar address Ac Ao Ar / prefixlen Ac +Specifies the iSCSI initiator portal: an IPv4 or IPv6 address, optionally +followed by slash and prefix length. If not defined, there will be no restrictions based on initiator address. Otherwise, only initiators with addresses matching one of defined @@ -178,8 +179,9 @@ Otherwise, only initiators with names ma ones will be allowed to connect. This clause is mutually exclusive with auth-group; one cannot use both in a single target. -.It Ic initiator-portal Ao Ar address Ac -Specifies iSCSI initiator portal - IPv4 or IPv6 address. +.It Ic initiator-portal Ao Ar address Ac Ao Ar / prefixlen Ac +Specifies the iSCSI initiator portal: an IPv4 or IPv6 address, optionally +followed by slash and prefix length. If not defined, there will be no restrictions based on initiator address. Otherwise, only initiators with addresses matching one of defined @@ -234,6 +236,7 @@ pidfile /var/run/ctld.pid auth-group example2 { chap-mutual "user" "secret" "mutualuser" "mutualsecret" chap-mutual "user2" "secret2" "mutualuser" "mutualsecret" + initiator-portal 192.168.1.1/16 } portal-group example2 { From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 15:06:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20C11FE1; Fri, 5 Sep 2014 15:06:09 +0000 (UTC) Received: from ns.kevlo.org (220-135-115-6.HINET-IP.hinet.net [220.135.115.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns.kevlo.org", Issuer "ns.kevlo.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id ACBF4109C; Fri, 5 Sep 2014 15:06:08 +0000 (UTC) Received: from ns.kevlo.org (localhost [127.0.0.1]) by ns.kevlo.org (8.14.8/8.14.8) with ESMTP id s85F51It072618 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 5 Sep 2014 23:05:02 +0800 (CST) (envelope-from kevlo@ns.kevlo.org) Received: (from kevlo@localhost) by ns.kevlo.org (8.14.8/8.14.8/Submit) id s85F51Oc072617; Fri, 5 Sep 2014 23:05:01 +0800 (CST) (envelope-from kevlo) Date: Fri, 5 Sep 2014 23:05:01 +0800 From: Kevin Lo To: Hans Petter Selasky Subject: Re: svn commit: r271159 - in head: . share/man/man4 sys/conf sys/dev/usb sys/dev/usb/misc sys/dev/usb/quirk sys/modules/usb sys/modules/usb/uled Message-ID: <20140905150501.GA72605@ns.kevlo.org> References: <201409051125.s85BPwaE056586@svn.freebsd.org> <20140905130828.GQ2737@kib.kiev.ua> <5409CBA0.3080401@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5409CBA0.3080401@selasky.org> User-Agent: Mutt/1.5.22 (2013-10-16) Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 15:06:09 -0000 On Fri, Sep 05, 2014 at 04:41:36PM +0200, Hans Petter Selasky wrote: > > On 09/05/14 15:08, Konstantin Belousov wrote: > > On Fri, Sep 05, 2014 at 11:25:58AM +0000, Kevin Lo wrote: > >> Author: kevlo > >> Date: Fri Sep 5 11:25:58 2014 > >> New Revision: 271159 > >> URL: http://svnweb.freebsd.org/changeset/base/271159 > >> > >> Log: > >> The USB LED driver for the Dream Cheeky WebMail Notifier. > >> > >> Reviewed by: hselasky > >> > >> Added: > >> head/share/man/man4/uled.4 (contents, props changed) > >> head/sys/dev/usb/misc/uled.c (contents, props changed) > >> head/sys/dev/usb/uled_ioctl.h (contents, props changed) > >> head/sys/modules/usb/uled/ > >> head/sys/modules/usb/uled/Makefile (contents, props changed) > >> Modified: > >> head/Makefile > > ^^^^^^^^^ > > > > Hi, > > The "head/Makefile" was not part of the reviewed patch sent to me. Right. There was something wrong with my tree :( > Anyway, USB modules rock also at toplevel ;-) > > --HPS From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 15:13:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1EBD68E; Fri, 5 Sep 2014 15:13:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C15FD1252; Fri, 5 Sep 2014 15:13:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85FDfrc064878; Fri, 5 Sep 2014 15:13:41 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85FDf3A064876; Fri, 5 Sep 2014 15:13:41 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201409051513.s85FDf3A064876@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 5 Sep 2014 15:13:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271171 - in stable/10/sys/powerpc: include powerpc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 15:13:42 -0000 Author: jhibbits Date: Fri Sep 5 15:13:41 2014 New Revision: 271171 URL: http://svnweb.freebsd.org/changeset/base/271171 Log: MFC r261095,r263464,r263752,r264189 r263464,r263752,r275189: Mask out SRR1 bits that aren't exported to the MSR. This appears to fix a strange condition with X on 32-bit PowerBooks I observed, caused by one of these bits getting set in the mcontext, but not set in the thread, which is a symptom of another problem, more difficult to diagnose. Since these bits aren't exported anyway, this change makes it more explicit that the bits aren't MSR-related in SRR1. r261095: Fix 32-bit signal handling on ppc64. This was broken when the PSL_USERSTATIC macro was changed. Since copying 64-bit srr1 into 32-bit srr1 drops the upper 32 bits, any bits set in the context were dropped, meaning the context check fails. Since 32-bit set_context() can't change those bits anyway, copy the ones from the current context (td->td_frame) before calling set_context(). Approved by: re Relnotes: yes (Affects 10-stable, but not 10.0-release) Modified: stable/10/sys/powerpc/include/psl.h stable/10/sys/powerpc/powerpc/exec_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/include/psl.h ============================================================================== --- stable/10/sys/powerpc/include/psl.h Fri Sep 5 14:58:24 2014 (r271170) +++ stable/10/sys/powerpc/include/psl.h Fri Sep 5 15:13:41 2014 (r271171) @@ -86,17 +86,20 @@ /* Initial kernel MSR, use IS=1 ad DS=1. */ #define PSL_KERNSET_INIT (PSL_IS | PSL_DS) #define PSL_KERNSET (PSL_CE | PSL_ME | PSL_EE) +#define PSL_SRR1_MASK 0x00000000UL /* No mask on Book-E */ #elif defined(BOOKE_PPC4XX) #define PSL_KERNSET (PSL_CE | PSL_ME | PSL_EE | PSL_FP) +#define PSL_SRR1_MASK 0x00000000UL /* No mask on Book-E */ #elif defined(AIM) #ifdef __powerpc64__ #define PSL_KERNSET (PSL_SF | PSL_EE | PSL_ME | PSL_IR | PSL_DR | PSL_RI) #else #define PSL_KERNSET (PSL_EE | PSL_ME | PSL_IR | PSL_DR | PSL_RI) #endif +#define PSL_SRR1_MASK 0x783f0000UL /* Bits 1-4, 10-15 (ppc32), 33-36, 42-47 (ppc64) */ #endif #define PSL_USERSET (PSL_KERNSET | PSL_PR) -#define PSL_USERSTATIC ~(PSL_VEC | PSL_FP | PSL_FE0 | PSL_FE1) +#define PSL_USERSTATIC (~(PSL_VEC | PSL_FP | PSL_FE0 | PSL_FE1) & ~PSL_SRR1_MASK) #endif /* _MACHINE_PSL_H_ */ Modified: stable/10/sys/powerpc/powerpc/exec_machdep.c ============================================================================== --- stable/10/sys/powerpc/powerpc/exec_machdep.c Fri Sep 5 14:58:24 2014 (r271170) +++ stable/10/sys/powerpc/powerpc/exec_machdep.c Fri Sep 5 15:13:41 2014 (r271171) @@ -752,6 +752,7 @@ set_mcontext32(struct thread *td, const memcpy(mcp64.mc_av,mcp->mc_av,sizeof(mcp64.mc_av)); for (i = 0; i < 42; i++) mcp64.mc_frame[i] = mcp->mc_frame[i]; + mcp64.mc_srr1 |= (td->td_frame->srr1 & 0xFFFFFFFF00000000ULL); memcpy(mcp64.mc_fpreg,mcp->mc_fpreg,sizeof(mcp64.mc_fpreg)); error = set_mcontext(td, &mcp64); From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 15:45:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDF669FF; Fri, 5 Sep 2014 15:45:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8C4A1822; Fri, 5 Sep 2014 15:45:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85FjKTW079404; Fri, 5 Sep 2014 15:45:20 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85FjKn4079402; Fri, 5 Sep 2014 15:45:20 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409051545.s85FjKn4079402@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 5 Sep 2014 15:45:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271172 - stable/10/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 15:45:21 -0000 Author: jhb Date: Fri Sep 5 15:45:20 2014 New Revision: 271172 URL: http://svnweb.freebsd.org/changeset/base/271172 Log: MFC 270222: Bump the default size of cpuset_t masks in userland from 128 bits to 256. This should not be an ABI change since the various public APIs that use cpusets all include an explicit size parameter in addition to the cpuset parameter. Approved by: re (gjb) Modified: stable/10/sys/sys/_cpuset.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/_cpuset.h ============================================================================== --- stable/10/sys/sys/_cpuset.h Fri Sep 5 15:13:41 2014 (r271171) +++ stable/10/sys/sys/_cpuset.h Fri Sep 5 15:45:20 2014 (r271172) @@ -38,7 +38,7 @@ #define CPU_SETSIZE MAXCPU #endif -#define CPU_MAXSIZE 128 +#define CPU_MAXSIZE 256 #ifndef CPU_SETSIZE #define CPU_SETSIZE CPU_MAXSIZE From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 15:53:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 746B4D1E; Fri, 5 Sep 2014 15:53:49 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4AD511914; Fri, 5 Sep 2014 15:53:49 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id C99DFB948; Fri, 5 Sep 2014 11:53:47 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Subject: Re: svn commit: r270850 - in head/sys: i386/i386 i386/include i386/isa x86/acpica Date: Fri, 5 Sep 2014 10:44:05 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <201408301748.s7UHmc6H059701@svn.freebsd.org> <3070015.668SIdAzOX@ralph.baldwin.cx> <20140905084305.GN2737@kib.kiev.ua> In-Reply-To: <20140905084305.GN2737@kib.kiev.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201409051044.05853.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 05 Sep 2014 11:53:47 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 15:53:49 -0000 On Friday, September 05, 2014 4:43:05 am Konstantin Belousov wrote: > On Thu, Sep 04, 2014 at 10:50:25PM -0400, John Baldwin wrote: > > On Tuesday, September 02, 2014 06:41:27 PM Konstantin Belousov wrote: > > > On Tue, Sep 02, 2014 at 11:00:57AM -0400, John Baldwin wrote: > > > > I thought about that. I could easily make a parallel array, or perhaps > > > > use a separate 'susppcb' structure that includes a pcb and the savefpu > > > > union and change susppcbs to be an array of those. Which do you prefer? > > > > If we want to move some state out of the PCB on amd64 into this, then a > > > > separate struct for susppcbs might be the sanest. > > > > > > Yes, separate structure seems to be a way forward. > > > > Please see www.freebsd.org/~jhb/patches/susppcb.patch Note that I moved > > fpususpend() out into a C function on amd64 so that resumectx() could still > > operate on just a pcb. This also makes savectx and resumectx more symmetric > > and matches what I ended up doing on i386. This is tested for suspend and > > resume on both i386 and amd64. > > The implementation of fpuresume() in C is definitely an improvement. > > You only moved the fpu context to the susppcb, I think this is good for > now, we will want to move other bits later. > > Do we need to keep pcb layout for KBI compat ? I remember that pcb > size is asserted to properly fit into pcpu area for percpu zones. > But why keep the layout ? I.e. moving all padding bits to the end. I wasn't sure. I thought the padding was there for ABI reasons. If we don't need KBI compat, I would much rather consolidate all the padding at the end. > There is one weird detail, not touched by your patch. Amd64 resume > path calls initializecpu(), while i386 does not. I do not see any > use for the call, the reload of CRX registers by trampoline/resumectx > should already set everything to working state. E.g., enabling XMM > in CR4 after fpu state is restored looks strange. I can test that. > Overall, it looks fine. Do you prefer to have alloc_fpusave() on i386 ? Well, it might be nice to have XSAVE on i386. I'm not sure if Intel has any 32-bit only chips planned that will use AVX or MPX, etc. If they are, then I do think AVX on i386 would be nice to have. Barring XSAVE I think we can just use a static savefpu on i386 for now. We might also consider removing support for 486sx CPUs and requiring an on-CPU FPU for i386. If we do that we might able to use a common fpu.c which would be even nicer. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 16:34:34 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 093EFC68; Fri, 5 Sep 2014 16:34:34 +0000 (UTC) Date: Fri, 5 Sep 2014 16:34:34 +0000 From: Alexey Dokuchaev To: =?koi8-r?Q?Jean-S=E9bastien_P=E9dron?= Subject: Re: svn commit: r271023 - stable/10/sys/dev/vt Message-ID: <20140905163433.GA80322@FreeBSD.org> References: <201409031400.s83E0bK6049810@svn.freebsd.org> <20140903140757.GA7494@FreeBSD.org> <20140903145753.GA25935@FreeBSD.org> <54082B57.6070007@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <54082B57.6070007@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Ed Maste , svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 16:34:34 -0000 On Thu, Sep 04, 2014 at 11:05:27AM +0200, Jean-Sébastien Pédron wrote: > One bug in vt(4) was that the mouse cursor position, even if it was > invisible before moused(8) starts, was always considered "dirty" and > required a redraw. The default position being [0;0], each new character > written would trigger a full refresh of the screen from [0;0] to the > position of this character. For quite a while (since I started using vt(4)) I'm observing a rather annoying thing: sometimes small area of screen would get selected like if pressed mouse button or something. If I do a long build on the console, periodically, white rectangle (selected area) will suddenly pop up and scroll away. Is this a known thing? It can be very annoyting for text editing on the console, as these sporadic "selects" are overwriting my selection buffer contents with whatever was on the screen at that time when they suddenly appear. (Rat itself it motionless while it happens.) > Those two problems combined explain the slownness of vt(4), especially > with discrete GPU and virtual machines; i915 users were mostly spared. > > Regarding the incorrect refresh when vt-switching, it was caused by a > race between the redraw thread and the switch. The redraw thread was not > stopped during a switch. Therefore, if the thread ran while the switch > was in progress, it could mark the screen as "up-to-date" even though it > displayed the wrong data. > > One change did reduce the vt-switch time specifically: in vt_vga, a > switch triggers a clear of the video memory. The loop did read from the > video memory, then wrote 8 black pixels. The useless read was removed. I must say that after I rebuilt my -CURRENT kernel today, vt(4) behaves much nicer than few weeks ago: switching is fast, no damaged screen any- more (both before and after I do "kldload i915kms"). Good work guys, and thanks for explanations! ./danfe From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 16:40:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98E7E1B6; Fri, 5 Sep 2014 16:40:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77DB71DE9; Fri, 5 Sep 2014 16:40:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85GenX1006245; Fri, 5 Sep 2014 16:40:49 GMT (envelope-from benno@FreeBSD.org) Received: (from benno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85Gemme006236; Fri, 5 Sep 2014 16:40:48 GMT (envelope-from benno@FreeBSD.org) Message-Id: <201409051640.s85Gemme006236@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: benno set sender to benno@FreeBSD.org using -f From: Benno Rice Date: Fri, 5 Sep 2014 16:40:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271173 - in head/sys: conf gdb libkern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 16:40:49 -0000 Author: benno Date: Fri Sep 5 16:40:47 2014 New Revision: 271173 URL: http://svnweb.freebsd.org/changeset/base/271173 Log: Add support for gdb's memory searching capabilities to our in-kernel gdb server. Submitted by: Daniel O'Connor Reviewed by: jhb Sponsored by: EMC Isilon Storage Division Added: head/sys/libkern/memmem.c (contents, props changed) Modified: head/sys/conf/files head/sys/gdb/gdb_int.h head/sys/gdb/gdb_main.c head/sys/gdb/gdb_packet.c head/sys/sys/libkern.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Sep 5 15:45:20 2014 (r271172) +++ head/sys/conf/files Fri Sep 5 16:40:47 2014 (r271173) @@ -3176,8 +3176,9 @@ libkern/inet_pton.c standard libkern/jenkins_hash.c standard libkern/mcount.c optional profiling-routine libkern/memcchr.c standard -libkern/memchr.c optional fdt +libkern/memchr.c optional fdt | gdb libkern/memcmp.c standard +libkern/memmem.c optional gdb libkern/qsort.c standard libkern/qsort_r.c standard libkern/random.c standard Modified: head/sys/gdb/gdb_int.h ============================================================================== --- head/sys/gdb/gdb_int.h Fri Sep 5 15:45:20 2014 (r271172) +++ head/sys/gdb/gdb_int.h Fri Sep 5 16:40:47 2014 (r271173) @@ -60,6 +60,9 @@ void gdb_tx_begin(char); int gdb_tx_end(void); int gdb_tx_mem(const unsigned char *, size_t); void gdb_tx_reg(int); +int gdb_rx_bindata(unsigned char *data, size_t datalen, size_t *amt); +int gdb_search_mem(const unsigned char *addr, size_t size, + const unsigned char *pat, size_t patlen, const unsigned char **found); static __inline void gdb_tx_char(char c) Modified: head/sys/gdb/gdb_main.c ============================================================================== --- head/sys/gdb/gdb_main.c Fri Sep 5 15:45:20 2014 (r271172) +++ head/sys/gdb/gdb_main.c Fri Sep 5 16:40:47 2014 (r271173) @@ -53,6 +53,8 @@ SET_DECLARE(gdb_dbgport_set, struct gdb_ struct gdb_dbgport *gdb_cur = NULL; int gdb_listening = 0; +static unsigned char gdb_bindata[64]; + static int gdb_init(void) { @@ -254,6 +256,28 @@ gdb_trap(int type, int code) gdb_tx_begin('l'); gdb_tx_end(); } + } else if (gdb_rx_equal("Search:memory:")) { + size_t patlen; + intmax_t addr, size; + const unsigned char *found; + if (gdb_rx_varhex(&addr) || gdb_rx_char() != ';' || + gdb_rx_varhex(&size) || gdb_rx_char() != ';' || + gdb_rx_bindata(gdb_bindata, sizeof(gdb_bindata), &patlen)) { + gdb_tx_err(EINVAL); + break; + } + if (gdb_search_mem((char *)(uintptr_t)addr, size, gdb_bindata, patlen, &found)) { + if (found == 0ULL) + gdb_tx_begin('0'); + else { + gdb_tx_begin('1'); + gdb_tx_char(','); + gdb_tx_hex((intmax_t)(uintptr_t)found, 8); + } + gdb_tx_end(); + } else + gdb_tx_err(EIO); + break; } else if (!gdb_cpu_query()) gdb_tx_empty(); break; Modified: head/sys/gdb/gdb_packet.c ============================================================================== --- head/sys/gdb/gdb_packet.c Fri Sep 5 15:45:20 2014 (r271172) +++ head/sys/gdb/gdb_packet.c Fri Sep 5 16:40:47 2014 (r271173) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -320,3 +321,46 @@ gdb_tx_reg(int regnum) } else gdb_tx_mem(regp, regsz); } + +/* Read binary data up until the end of the packet or until we have datalen decoded bytes */ +int +gdb_rx_bindata(unsigned char *data, size_t datalen, size_t *amt) +{ + int c; + + *amt = 0; + + while (*amt < datalen) { + c = gdb_rx_char(); + /* End of packet? */ + if (c == -1) + break; + /* Escaped character up next */ + if (c == '}') { + /* Truncated packet? Bail out */ + if ((c = gdb_rx_char()) == -1) + return (1); + c ^= 0x20; + } + *(data++) = c & 0xff; + (*amt)++; + } + + return (0); +} + +int +gdb_search_mem(const unsigned char *addr, size_t size, const unsigned char *pat, size_t patlen, const unsigned char **found) +{ + void *prev; + jmp_buf jb; + int ret; + + prev = kdb_jmpbuf(jb); + ret = setjmp(jb); + if (ret == 0) + *found = memmem(addr, size, pat, patlen); + + (void)kdb_jmpbuf(prev); + return ((ret == 0) ? 1 : 0); +} Added: head/sys/libkern/memmem.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/libkern/memmem.c Fri Sep 5 16:40:47 2014 (r271173) @@ -0,0 +1,62 @@ +/*- + * Copyright (c) 2005 Pascal Gloor + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +void * +memmem(const void *l, size_t l_len, const void *s, size_t s_len) +{ + register char *cur, *last; + const char *cl = (const char *)l; + const char *cs = (const char *)s; + + /* we need something to compare */ + if (l_len == 0 || s_len == 0) + return NULL; + + /* "s" must be smaller or equal to "l" */ + if (l_len < s_len) + return NULL; + + /* special case where s_len == 1 */ + if (s_len == 1) + return memchr(l, (int)*cs, l_len); + + /* the last position where its possible to find "s" in "l" */ + last = (char *)cl + l_len - s_len; + + for (cur = (char *)cl; cur <= last; cur++) + if (cur[0] == cs[0] && memcmp(cur, cs, s_len) == 0) + return cur; + + return NULL; +} Modified: head/sys/sys/libkern.h ============================================================================== --- head/sys/sys/libkern.h Fri Sep 5 15:45:20 2014 (r271172) +++ head/sys/sys/libkern.h Fri Sep 5 16:40:47 2014 (r271173) @@ -103,6 +103,7 @@ int locc(int, char *, u_int); void *memchr(const void *s, int c, size_t n); void *memcchr(const void *s, int c, size_t n); int memcmp(const void *b1, const void *b2, size_t len); +void *memmem(const void *l, size_t l_len, const void *s, size_t s_len); void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)); void qsort_r(void *base, size_t nmemb, size_t size, void *thunk, From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 16:46:28 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9625B835; Fri, 5 Sep 2014 16:46:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81A5D1ECA; Fri, 5 Sep 2014 16:46:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85GkSJ8008981; Fri, 5 Sep 2014 16:46:28 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85GkSm0008980; Fri, 5 Sep 2014 16:46:28 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201409051646.s85GkSm0008980@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Fri, 5 Sep 2014 16:46:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271174 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 16:46:28 -0000 Author: rwatson Date: Fri Sep 5 16:46:28 2014 New Revision: 271174 URL: http://svnweb.freebsd.org/changeset/base/271174 Log: Clarify a diagnostic printf() in the mbuf code: M_EXT doesn't necessarily imply a cluster is attached; it could also refer to some other sort of external storage (e.g., an sf_buf). MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Fri Sep 5 16:40:47 2014 (r271173) +++ head/sys/sys/mbuf.h Fri Sep 5 16:46:28 2014 (r271174) @@ -672,7 +672,7 @@ m_clget(struct mbuf *m, int how) { if (m->m_flags & M_EXT) - printf("%s: %p mbuf already has cluster\n", __func__, m); + printf("%s: %p mbuf already has external storage\n", __func__, m); m->m_ext.ext_buf = (char *)NULL; uma_zalloc_arg(zone_clust, m, how); /* @@ -698,7 +698,7 @@ m_cljget(struct mbuf *m, int how, int si uma_zone_t zone; if (m && m->m_flags & M_EXT) - printf("%s: %p mbuf already has cluster\n", __func__, m); + printf("%s: %p mbuf already has external storage\n", __func__, m); if (m != NULL) m->m_ext.ext_buf = NULL; From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 17:05:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D0072BD; Fri, 5 Sep 2014 17:05:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 483791149; Fri, 5 Sep 2014 17:05:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85H5qMp019430; Fri, 5 Sep 2014 17:05:52 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85H5qxx019429; Fri, 5 Sep 2014 17:05:52 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201409051705.s85H5qxx019429@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Fri, 5 Sep 2014 17:05:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271175 - head/sys/fs/nfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 17:05:52 -0000 Author: rwatson Date: Fri Sep 5 17:05:51 2014 New Revision: 271175 URL: http://svnweb.freebsd.org/changeset/base/271175 Log: Garbage collect NFSMINOFF() from the NFS stack; this unused macro replicates mbuf-initialisation logic that is best left to centralised mbuf utility code rather than scattered around the kernel. MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/sys/fs/nfs/nfsm_subs.h Modified: head/sys/fs/nfs/nfsm_subs.h ============================================================================== --- head/sys/fs/nfs/nfsm_subs.h Fri Sep 5 16:46:28 2014 (r271174) +++ head/sys/fs/nfs/nfsm_subs.h Fri Sep 5 17:05:51 2014 (r271175) @@ -47,13 +47,6 @@ * First define what the actual subs. return */ #define M_HASCL(m) ((m)->m_flags & M_EXT) -#define NFSMINOFF(m) \ - if (M_HASCL(m)) \ - (m)->m_data = (m)->m_ext.ext_buf; \ - else if ((m)->m_flags & M_PKTHDR) \ - (m)->m_data = (m)->m_pktdat; \ - else \ - (m)->m_data = (m)->m_dat #define NFSMSIZ(m) ((M_HASCL(m))?MCLBYTES: \ (((m)->m_flags & M_PKTHDR)?MHLEN:MLEN)) #define NFSM_DATAP(m, s) (m)->m_data += (s) From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 17:22:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4577E69F; Fri, 5 Sep 2014 17:22:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15F281362; Fri, 5 Sep 2014 17:22:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85HMKli028654; Fri, 5 Sep 2014 17:22:20 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85HMKkp028653; Fri, 5 Sep 2014 17:22:20 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409051722.s85HMKkp028653@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 5 Sep 2014 17:22:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271176 - in stable: 10/usr.bin/ktrace 8/usr.bin/ktrace 9/usr.bin/ktrace X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 17:22:21 -0000 Author: jhb Date: Fri Sep 5 17:22:20 2014 New Revision: 271176 URL: http://svnweb.freebsd.org/changeset/base/271176 Log: MFC 270674: Clarify that the -c argument clears the list of tracepoints specified by -t (it does not clear all tracepoints). Approved by: re (gjb for 10) Modified: stable/10/usr.bin/ktrace/ktrace.1 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/usr.bin/ktrace/ktrace.1 stable/9/usr.bin/ktrace/ktrace.1 Directory Properties: stable/8/usr.bin/ktrace/ (props changed) stable/9/usr.bin/ktrace/ (props changed) Modified: stable/10/usr.bin/ktrace/ktrace.1 ============================================================================== --- stable/10/usr.bin/ktrace/ktrace.1 Fri Sep 5 17:05:51 2014 (r271175) +++ stable/10/usr.bin/ktrace/ktrace.1 Fri Sep 5 17:22:20 2014 (r271176) @@ -28,7 +28,7 @@ .\" @(#)ktrace.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 31, 2012 +.Dd August 26, 2014 .Dt KTRACE 1 .Os .Sh NAME @@ -81,7 +81,7 @@ Append to the trace file instead of recr Disable tracing on all user-owned processes, and, if executed by root, all processes in the system. .It Fl c -Clear the trace points associated with the specified file or processes. +Clear the specified trace points associated with the given file or processes. .It Fl d Descendants; perform the operation for all current children of the designated processes. @@ -102,8 +102,10 @@ Enable (disable) tracing on the indicate .Fl p flag is permitted). .It Fl t Ar trstr -The string argument represents the kernel trace points, one per letter. -The following table equates the letters with the tracepoints: +Specify the list of trace points to enable or disable, one per letter. +If an explicit list is not specified, the default set of trace points is used. +.Pp +The following trace points are supported: .Pp .Bl -tag -width flag -compact .It Cm c From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 17:22:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E591B6A1; Fri, 5 Sep 2014 17:22:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B79341364; Fri, 5 Sep 2014 17:22:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85HML6h028667; Fri, 5 Sep 2014 17:22:21 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85HMLp6028666; Fri, 5 Sep 2014 17:22:21 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409051722.s85HMLp6028666@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 5 Sep 2014 17:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r271176 - in stable: 10/usr.bin/ktrace 8/usr.bin/ktrace 9/usr.bin/ktrace X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 17:22:22 -0000 Author: jhb Date: Fri Sep 5 17:22:20 2014 New Revision: 271176 URL: http://svnweb.freebsd.org/changeset/base/271176 Log: MFC 270674: Clarify that the -c argument clears the list of tracepoints specified by -t (it does not clear all tracepoints). Approved by: re (gjb for 10) Modified: stable/9/usr.bin/ktrace/ktrace.1 Directory Properties: stable/9/usr.bin/ktrace/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.bin/ktrace/ktrace.1 stable/8/usr.bin/ktrace/ktrace.1 Directory Properties: stable/10/ (props changed) stable/8/usr.bin/ktrace/ (props changed) Modified: stable/9/usr.bin/ktrace/ktrace.1 ============================================================================== --- stable/9/usr.bin/ktrace/ktrace.1 Fri Sep 5 17:05:51 2014 (r271175) +++ stable/9/usr.bin/ktrace/ktrace.1 Fri Sep 5 17:22:20 2014 (r271176) @@ -28,7 +28,7 @@ .\" @(#)ktrace.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 31, 2012 +.Dd August 26, 2014 .Dt KTRACE 1 .Os .Sh NAME @@ -81,7 +81,7 @@ Append to the trace file instead of recr Disable tracing on all user-owned processes, and, if executed by root, all processes in the system. .It Fl c -Clear the trace points associated with the specified file or processes. +Clear the specified trace points associated with the given file or processes. .It Fl d Descendants; perform the operation for all current children of the designated processes. @@ -102,8 +102,10 @@ Enable (disable) tracing on the indicate .Fl p flag is permitted). .It Fl t Ar trstr -The string argument represents the kernel trace points, one per letter. -The following table equates the letters with the tracepoints: +Specify the list of trace points to enable or disable, one per letter. +If an explicit list is not specified, the default set of trace points is used. +.Pp +The following trace points are supported: .Pp .Bl -tag -width flag -compact .It Cm c From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 17:22:21 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 967DF6A0; Fri, 5 Sep 2014 17:22:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66EEF1363; Fri, 5 Sep 2014 17:22:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85HMLkw028661; Fri, 5 Sep 2014 17:22:21 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85HMLlP028659; Fri, 5 Sep 2014 17:22:21 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409051722.s85HMLlP028659@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 5 Sep 2014 17:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r271176 - in stable: 10/usr.bin/ktrace 8/usr.bin/ktrace 9/usr.bin/ktrace X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 17:22:21 -0000 Author: jhb Date: Fri Sep 5 17:22:20 2014 New Revision: 271176 URL: http://svnweb.freebsd.org/changeset/base/271176 Log: MFC 270674: Clarify that the -c argument clears the list of tracepoints specified by -t (it does not clear all tracepoints). Approved by: re (gjb for 10) Modified: stable/8/usr.bin/ktrace/ktrace.1 Directory Properties: stable/8/usr.bin/ktrace/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.bin/ktrace/ktrace.1 stable/9/usr.bin/ktrace/ktrace.1 Directory Properties: stable/10/ (props changed) stable/9/usr.bin/ktrace/ (props changed) Modified: stable/8/usr.bin/ktrace/ktrace.1 ============================================================================== --- stable/8/usr.bin/ktrace/ktrace.1 Fri Sep 5 17:05:51 2014 (r271175) +++ stable/8/usr.bin/ktrace/ktrace.1 Fri Sep 5 17:22:20 2014 (r271176) @@ -32,7 +32,7 @@ .\" @(#)ktrace.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd May 31, 2012 +.Dd August 26, 2014 .Dt KTRACE 1 .Os .Sh NAME @@ -85,7 +85,7 @@ Append to the trace file instead of recr Disable tracing on all user-owned processes, and, if executed by root, all processes in the system. .It Fl c -Clear the trace points associated with the specified file or processes. +Clear the specified trace points associated with the given file or processes. .It Fl d Descendants; perform the operation for all current children of the designated processes. @@ -106,8 +106,10 @@ Enable (disable) tracing on the indicate .Fl p flag is permitted). .It Fl t Ar trstr -The string argument represents the kernel trace points, one per letter. -The following table equates the letters with the tracepoints: +Specify the list of trace points to enable or disable, one per letter. +If an explicit list is not specified, the default set of trace points is used. +.Pp +The following trace points are supported: .Pp .Bl -tag -width flag -compact .It Cm c From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 17:44:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BDFB8238; Fri, 5 Sep 2014 17:44:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8D8A173F; Fri, 5 Sep 2014 17:44:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85HiBlx038489; Fri, 5 Sep 2014 17:44:11 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85HiBSp038488; Fri, 5 Sep 2014 17:44:11 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409051744.s85HiBSp038488@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 5 Sep 2014 17:44:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r271177 - in stable: 10/sbin/gbde 8/sbin/gbde 9/sbin/gbde X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 17:44:11 -0000 Author: jhb Date: Fri Sep 5 17:44:10 2014 New Revision: 271177 URL: http://svnweb.freebsd.org/changeset/base/271177 Log: MFC 270722: Correct the destroy example. The -n argument is not needed (and is not valid). Approved by: re (gjb for 10) Modified: stable/8/sbin/gbde/gbde.8 Directory Properties: stable/8/sbin/gbde/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sbin/gbde/gbde.8 stable/9/sbin/gbde/gbde.8 Directory Properties: stable/10/ (props changed) stable/9/sbin/gbde/ (props changed) Modified: stable/8/sbin/gbde/gbde.8 ============================================================================== --- stable/8/sbin/gbde/gbde.8 Fri Sep 5 17:22:20 2014 (r271176) +++ stable/8/sbin/gbde/gbde.8 Fri Sep 5 17:44:10 2014 (r271177) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2006 +.Dd August 27, 2014 .Dt GBDE 8 .Os .Sh NAME @@ -235,7 +235,7 @@ pass-phrase: .Pp To destroy all copies of the masterkey: .Pp -.Dl "gbde destroy ad0s1f -n -1" +.Dl "gbde destroy ad0s1f" .Sh SEE ALSO .Xr gbde 4 , .Xr geom 4 From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 17:44:11 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DE9D237; Fri, 5 Sep 2014 17:44:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58B57173E; Fri, 5 Sep 2014 17:44:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85HiBpB038482; Fri, 5 Sep 2014 17:44:11 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85HiBXP038481; Fri, 5 Sep 2014 17:44:11 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409051744.s85HiBXP038481@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 5 Sep 2014 17:44:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271177 - in stable: 10/sbin/gbde 8/sbin/gbde 9/sbin/gbde X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 17:44:11 -0000 Author: jhb Date: Fri Sep 5 17:44:10 2014 New Revision: 271177 URL: http://svnweb.freebsd.org/changeset/base/271177 Log: MFC 270722: Correct the destroy example. The -n argument is not needed (and is not valid). Approved by: re (gjb for 10) Modified: stable/10/sbin/gbde/gbde.8 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/8/sbin/gbde/gbde.8 stable/9/sbin/gbde/gbde.8 Directory Properties: stable/8/sbin/gbde/ (props changed) stable/9/sbin/gbde/ (props changed) Modified: stable/10/sbin/gbde/gbde.8 ============================================================================== --- stable/10/sbin/gbde/gbde.8 Fri Sep 5 17:22:20 2014 (r271176) +++ stable/10/sbin/gbde/gbde.8 Fri Sep 5 17:44:10 2014 (r271177) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd August 27, 2014 .Dt GBDE 8 .Os .Sh NAME @@ -235,7 +235,7 @@ pass-phrase: .Pp To destroy all copies of the masterkey: .Pp -.Dl "gbde destroy ada0s1f -n -1" +.Dl "gbde destroy ada0s1f" .Sh SEE ALSO .Xr gbde 4 , .Xr geom 4 From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 17:44:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19BDA23B; Fri, 5 Sep 2014 17:44:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 056D51741; Fri, 5 Sep 2014 17:44:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85HiBi0038497; Fri, 5 Sep 2014 17:44:11 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85HiBYu038496; Fri, 5 Sep 2014 17:44:11 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409051744.s85HiBYu038496@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 5 Sep 2014 17:44:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r271177 - in stable: 10/sbin/gbde 8/sbin/gbde 9/sbin/gbde X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 17:44:12 -0000 Author: jhb Date: Fri Sep 5 17:44:10 2014 New Revision: 271177 URL: http://svnweb.freebsd.org/changeset/base/271177 Log: MFC 270722: Correct the destroy example. The -n argument is not needed (and is not valid). Approved by: re (gjb for 10) Modified: stable/9/sbin/gbde/gbde.8 Directory Properties: stable/9/sbin/gbde/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sbin/gbde/gbde.8 stable/8/sbin/gbde/gbde.8 Directory Properties: stable/10/ (props changed) stable/8/sbin/gbde/ (props changed) Modified: stable/9/sbin/gbde/gbde.8 ============================================================================== --- stable/9/sbin/gbde/gbde.8 Fri Sep 5 17:22:20 2014 (r271176) +++ stable/9/sbin/gbde/gbde.8 Fri Sep 5 17:44:10 2014 (r271177) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd August 27, 2014 .Dt GBDE 8 .Os .Sh NAME @@ -235,7 +235,7 @@ pass-phrase: .Pp To destroy all copies of the masterkey: .Pp -.Dl "gbde destroy ada0s1f -n -1" +.Dl "gbde destroy ada0s1f" .Sh SEE ALSO .Xr gbde 4 , .Xr geom 4 From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 18:07:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8ECC0AF8; Fri, 5 Sep 2014 18:07:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 703CC192D; Fri, 5 Sep 2014 18:07:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85I7GM5048789; Fri, 5 Sep 2014 18:07:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85I7GFG048788; Fri, 5 Sep 2014 18:07:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201409051807.s85I7GFG048788@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 5 Sep 2014 18:07:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271178 - head/contrib/llvm/patches X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 18:07:16 -0000 Author: emaste Date: Fri Sep 5 18:07:15 2014 New Revision: 271178 URL: http://svnweb.freebsd.org/changeset/base/271178 Log: Correct patch paths (remove contrib/llvm/) The example in contrib/llvm/patches/README.TXT fails otherwise. Sponsored by: DARPA, AFRL Modified: head/contrib/llvm/patches/patch-r270147-llvm-r197824-r213427-r213960.diff Modified: head/contrib/llvm/patches/patch-r270147-llvm-r197824-r213427-r213960.diff ============================================================================== --- head/contrib/llvm/patches/patch-r270147-llvm-r197824-r213427-r213960.diff Fri Sep 5 17:44:10 2014 (r271177) +++ head/contrib/llvm/patches/patch-r270147-llvm-r197824-r213427-r213960.diff Fri Sep 5 18:07:15 2014 (r271178) @@ -1,7 +1,7 @@ -Index: contrib/llvm/include/llvm/Support/ELF.h +Index: include/llvm/Support/ELF.h =================================================================== ---- contrib/llvm/include/llvm/Support/ELF.h (revision 270019) -+++ contrib/llvm/include/llvm/Support/ELF.h (working copy) +--- include/llvm/Support/ELF.h (revision 270019) ++++ include/llvm/Support/ELF.h (working copy) @@ -437,6 +437,7 @@ R_PPC_GOT16_LO = 15, R_PPC_GOT16_HI = 16, @@ -10,10 +10,10 @@ Index: contrib/llvm/include/llvm/Support R_PPC_REL32 = 26, R_PPC_TLS = 67, R_PPC_DTPMOD32 = 68, -Index: contrib/llvm/lib/Object/ELF.cpp +Index: lib/Object/ELF.cpp =================================================================== ---- contrib/llvm/lib/Object/ELF.cpp (revision 270019) -+++ contrib/llvm/lib/Object/ELF.cpp (working copy) +--- lib/Object/ELF.cpp (revision 270019) ++++ lib/Object/ELF.cpp (working copy) @@ -507,6 +507,7 @@ LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT16_LO); LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_GOT16_HI); @@ -22,10 +22,10 @@ Index: contrib/llvm/lib/Object/ELF.cpp LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_REL32); LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_TLS); LLVM_ELF_SWITCH_RELOC_TYPE_NAME(R_PPC_DTPMOD32); -Index: contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp +Index: lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp =================================================================== ---- contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp (revision 270019) -+++ contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp (working copy) +--- lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp (revision 270019) ++++ lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp (working copy) @@ -18,6 +18,7 @@ #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCInst.h" @@ -52,10 +52,10 @@ Index: contrib/llvm/lib/Target/PowerPC/I } -Index: contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp +Index: lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp =================================================================== ---- contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp (revision 270019) -+++ contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp (working copy) +--- lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp (revision 270019) ++++ lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp (working copy) @@ -64,7 +64,15 @@ llvm_unreachable("Unimplemented"); case PPC::fixup_ppc_br24: @@ -123,10 +123,10 @@ Index: contrib/llvm/lib/Target/PowerPC/M break; } break; -Index: contrib/llvm/lib/Target/PowerPC/PPC.h +Index: lib/Target/PowerPC/PPC.h =================================================================== ---- contrib/llvm/lib/Target/PowerPC/PPC.h (revision 270019) -+++ contrib/llvm/lib/Target/PowerPC/PPC.h (working copy) +--- lib/Target/PowerPC/PPC.h (revision 270019) ++++ lib/Target/PowerPC/PPC.h (working copy) @@ -53,10 +53,11 @@ // PPC Specific MachineOperand flags. MO_NO_FLAG, @@ -143,10 +143,10 @@ Index: contrib/llvm/lib/Target/PowerPC/P /// MO_PIC_FLAG - If this bit is set, the symbol reference is relative to /// the function's picbase, e.g. lo16(symbol-picbase). -Index: contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp +Index: lib/Target/PowerPC/PPCAsmPrinter.cpp =================================================================== ---- contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp (revision 270019) -+++ contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp (working copy) +--- lib/Target/PowerPC/PPCAsmPrinter.cpp (revision 270019) ++++ lib/Target/PowerPC/PPCAsmPrinter.cpp (working copy) @@ -19,6 +19,7 @@ #define DEBUG_TYPE "asmprinter" #include "PPC.h" @@ -578,10 +578,10 @@ Index: contrib/llvm/lib/Target/PowerPC/P } } -Index: contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp +Index: lib/Target/PowerPC/PPCFrameLowering.cpp =================================================================== ---- contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp (revision 270019) -+++ contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp (working copy) +--- lib/Target/PowerPC/PPCFrameLowering.cpp (revision 270019) ++++ lib/Target/PowerPC/PPCFrameLowering.cpp (working copy) @@ -299,7 +299,7 @@ const PPCRegisterInfo *RegInfo = static_cast(MF.getTarget().getRegisterInfo()); @@ -664,10 +664,10 @@ Index: contrib/llvm/lib/Target/PowerPC/P // Allocate the frame index for the base pointer save area. BPSI = MFI->CreateFixedObject(isPPC64? 8 : 4, BPOffset, true); // Save the result. -Index: contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h +Index: lib/Target/PowerPC/PPCFrameLowering.h =================================================================== ---- contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h (revision 270019) -+++ contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h (working copy) +--- lib/Target/PowerPC/PPCFrameLowering.h (revision 270019) ++++ lib/Target/PowerPC/PPCFrameLowering.h (working copy) @@ -96,12 +96,14 @@ /// getBasePointerSaveOffset - Return the previous frame offset to save the @@ -685,10 +685,10 @@ Index: contrib/llvm/lib/Target/PowerPC/P } /// getLinkageSize - Return the size of the PowerPC ABI linkage area. -Index: contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp +Index: lib/Target/PowerPC/PPCISelDAGToDAG.cpp =================================================================== ---- contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp (revision 270019) -+++ contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp (working copy) +--- lib/Target/PowerPC/PPCISelDAGToDAG.cpp (revision 270019) ++++ lib/Target/PowerPC/PPCISelDAGToDAG.cpp (working copy) @@ -15,6 +15,7 @@ #define DEBUG_TYPE "ppc-codegen" #include "PPC.h" @@ -748,10 +748,10 @@ Index: contrib/llvm/lib/Target/PowerPC/P case PPCISD::VADD_SPLAT: { // This expands into one of three sequences, depending on whether // the first operand is odd or even, positive or negative. -Index: contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +Index: lib/Target/PowerPC/PPCISelLowering.cpp =================================================================== ---- contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp (revision 270019) -+++ contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp (working copy) +--- lib/Target/PowerPC/PPCISelLowering.cpp (revision 270019) ++++ lib/Target/PowerPC/PPCISelLowering.cpp (working copy) @@ -670,6 +670,7 @@ case PPCISD::ADDIS_TOC_HA: return "PPCISD::ADDIS_TOC_HA"; case PPCISD::LD_TOC_L: return "PPCISD::LD_TOC_L"; @@ -972,10 +972,10 @@ Index: contrib/llvm/lib/Target/PowerPC/P MachineInstrBuilder MIB; -Index: contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h +Index: lib/Target/PowerPC/PPCISelLowering.h =================================================================== ---- contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h (revision 270019) -+++ contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h (working copy) +--- lib/Target/PowerPC/PPCISelLowering.h (revision 270019) ++++ lib/Target/PowerPC/PPCISelLowering.h (working copy) @@ -177,6 +177,12 @@ CR6SET, CR6UNSET, @@ -989,10 +989,10 @@ Index: contrib/llvm/lib/Target/PowerPC/P /// G8RC = ADDIS_GOT_TPREL_HA %X2, Symbol - Used by the initial-exec /// TLS model, produces an ADDIS8 instruction that adds the GOT /// base to sym\@got\@tprel\@ha. -Index: contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td +Index: lib/Target/PowerPC/PPCInstr64Bit.td =================================================================== ---- contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td (revision 270019) -+++ contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td (working copy) +--- lib/Target/PowerPC/PPCInstr64Bit.td (revision 270019) ++++ lib/Target/PowerPC/PPCInstr64Bit.td (working copy) @@ -36,10 +36,6 @@ def tocentry : Operand { let MIOperandInfo = (ops i64imm:$imm); @@ -1004,10 +1004,10 @@ Index: contrib/llvm/lib/Target/PowerPC/P def tlsreg : Operand { let EncoderMethod = "getTLSRegEncoding"; let ParserMatchClass = PPCTLSRegOperand; -Index: contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td +Index: lib/Target/PowerPC/PPCInstrInfo.td =================================================================== ---- contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td (revision 270019) -+++ contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td (working copy) +--- lib/Target/PowerPC/PPCInstrInfo.td (revision 270019) ++++ lib/Target/PowerPC/PPCInstrInfo.td (working copy) @@ -57,6 +57,9 @@ SDTCisPtrTy<0>, SDTCisVT<1, i32> ]>; @@ -1130,10 +1130,10 @@ Index: contrib/llvm/lib/Target/PowerPC/P // Standard shifts. These are represented separately from the real shifts above // so that we can distinguish between shifts that allow 5-bit and 6-bit shift // amounts. -Index: contrib/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp +Index: lib/Target/PowerPC/PPCMCInstLower.cpp =================================================================== ---- contrib/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp (revision 270019) -+++ contrib/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp (working copy) +--- lib/Target/PowerPC/PPCMCInstLower.cpp (revision 270019) ++++ lib/Target/PowerPC/PPCMCInstLower.cpp (working copy) @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// @@ -1188,10 +1188,10 @@ Index: contrib/llvm/lib/Target/PowerPC/P const MCExpr *Expr = MCSymbolRefExpr::Create(Symbol, RefKind, Ctx); if (!MO.isJTI() && MO.getOffset()) -Index: contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp +Index: lib/Target/PowerPC/PPCMachineFunctionInfo.cpp =================================================================== ---- contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp (revision 270019) -+++ contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp (working copy) +--- lib/Target/PowerPC/PPCMachineFunctionInfo.cpp (revision 270019) ++++ lib/Target/PowerPC/PPCMachineFunctionInfo.cpp (working copy) @@ -8,8 +8,16 @@ //===----------------------------------------------------------------------===// @@ -1209,10 +1209,10 @@ Index: contrib/llvm/lib/Target/PowerPC/P + return MF.getContext().GetOrCreateSymbol(Twine(MAI->getPrivateGlobalPrefix())+ + Twine(MF.getFunctionNumber())+"$poff"); +} -Index: contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h +Index: lib/Target/PowerPC/PPCMachineFunctionInfo.h =================================================================== ---- contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h (revision 270019) -+++ contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h (working copy) +--- lib/Target/PowerPC/PPCMachineFunctionInfo.h (revision 270019) ++++ lib/Target/PowerPC/PPCMachineFunctionInfo.h (working copy) @@ -92,6 +92,12 @@ /// 64-bit SVR4 ABI. SmallVector MustSaveCRs; @@ -1249,10 +1249,10 @@ Index: contrib/llvm/lib/Target/PowerPC/P }; } // end of namespace llvm -Index: contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp +Index: lib/Target/PowerPC/PPCRegisterInfo.cpp =================================================================== ---- contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp (revision 270019) -+++ contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp (working copy) +--- lib/Target/PowerPC/PPCRegisterInfo.cpp (revision 270019) ++++ lib/Target/PowerPC/PPCRegisterInfo.cpp (working copy) @@ -199,7 +199,16 @@ if (PPCFI->needsFP(MF)) Reserved.set(PPC::R31); @@ -1287,10 +1287,10 @@ Index: contrib/llvm/lib/Target/PowerPC/P } bool PPCRegisterInfo::hasBasePointer(const MachineFunction &MF) const { -Index: contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h +Index: lib/Target/PowerPC/PPCSubtarget.h =================================================================== ---- contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h (revision 270019) -+++ contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h (working copy) +--- lib/Target/PowerPC/PPCSubtarget.h (revision 270019) ++++ lib/Target/PowerPC/PPCSubtarget.h (working copy) @@ -189,6 +189,9 @@ /// isBGQ - True if this is a BG/Q platform. bool isBGQ() const { return TargetTriple.getVendor() == Triple::BGQ; } From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 18:08:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 95D5DC3F; Fri, 5 Sep 2014 18:08:14 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 56BE11939; Fri, 5 Sep 2014 18:08:13 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 90482783714; Sat, 6 Sep 2014 03:43:06 +1000 (EST) Date: Sat, 6 Sep 2014 03:43:04 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin Subject: Re: svn commit: r270850 - in head/sys: i386/i386 i386/include i386/isa x86/acpica In-Reply-To: <201409051044.05853.jhb@freebsd.org> Message-ID: <20140906033051.A1982@besplex.bde.org> References: <201408301748.s7UHmc6H059701@svn.freebsd.org> <3070015.668SIdAzOX@ralph.baldwin.cx> <20140905084305.GN2737@kib.kiev.ua> <201409051044.05853.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=BdjhjNd2 c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=6p4dWWagHjQA:10 a=gxbj2yEgeIQA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=sZ-NFdfg8zaX1CIR4RwA:9 a=CjuIK1q_8ugA:10 a=Jdm36EHaYjsA:10 a=afaCV70lbk4A:10 Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 18:08:14 -0000 On Fri, 5 Sep 2014, John Baldwin wrote: > We might also consider removing support for 486sx CPUs and requiring an > on-CPU FPU for i386. If we do that we might able to use a common fpu.c > which would be even nicer. You mean a common npx.c. The 'x' part of npx.c is much more descriptive now than it was when the only extension was the floating point one. The 'n' part of npx.c is now too specific, but not as specific as the 'fp' part of fpu.c. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 18:11:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F3E9EBF; Fri, 5 Sep 2014 18:11:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EECE219FF; Fri, 5 Sep 2014 18:11:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85IBaGA050767; Fri, 5 Sep 2014 18:11:36 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85IBaoc050765; Fri, 5 Sep 2014 18:11:36 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201409051811.s85IBaoc050765@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 5 Sep 2014 18:11:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271179 - head/lib/libc/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 18:11:37 -0000 Author: andrew Date: Fri Sep 5 18:11:36 2014 New Revision: 271179 URL: http://svnweb.freebsd.org/changeset/base/271179 Log: Add the fp{get,set}{mask,round} functions to the public symbols in the map. These are only exported for armv6hf as the soft-float ABIs have these in the softfloat Symbol.map file. Added: head/lib/libc/arm/Symbol_vfp.map (contents, props changed) Modified: head/lib/libc/arm/Makefile.inc Modified: head/lib/libc/arm/Makefile.inc ============================================================================== --- head/lib/libc/arm/Makefile.inc Fri Sep 5 18:07:15 2014 (r271178) +++ head/lib/libc/arm/Makefile.inc Fri Sep 5 18:11:36 2014 (r271179) @@ -16,3 +16,7 @@ SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol_oabi .include "${LIBC_SRCTOP}/arm/aeabi/Makefile.inc" .endif +.if ${MACHINE_ARCH} == "armv6hf" +SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol_vfp.map +.endif + Added: head/lib/libc/arm/Symbol_vfp.map ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/arm/Symbol_vfp.map Fri Sep 5 18:11:36 2014 (r271179) @@ -0,0 +1,10 @@ +/* + * $FreeBSD$ + */ + +FBSD_1.0 { + fpgetmask; + fpgetround; + fpsetmask; + fpsetround; +}; From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 18:11:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B84AFF4; Fri, 5 Sep 2014 18:11:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A114E1A00; Fri, 5 Sep 2014 18:11:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85IBdBe050812; Fri, 5 Sep 2014 18:11:39 GMT (envelope-from dumbbell@FreeBSD.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85IBdoH050811; Fri, 5 Sep 2014 18:11:39 GMT (envelope-from dumbbell@FreeBSD.org) Message-Id: <201409051811.s85IBdoH050811@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dumbbell set sender to dumbbell@FreeBSD.org using -f From: Jean-Sebastien Pedron Date: Fri, 5 Sep 2014 18:11:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271180 - head/sys/dev/vt/hw/vga X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 18:11:40 -0000 Author: dumbbell Date: Fri Sep 5 18:11:39 2014 New Revision: 271180 URL: http://svnweb.freebsd.org/changeset/base/271180 Log: vt_vga: vd_setpixel_t and vd_drawrect_t are noop in text mode MFC after: 3 days Modified: head/sys/dev/vt/hw/vga/vt_vga.c Modified: head/sys/dev/vt/hw/vga/vt_vga.c ============================================================================== --- head/sys/dev/vt/hw/vga/vt_vga.c Fri Sep 5 18:11:36 2014 (r271179) +++ head/sys/dev/vt/hw/vga/vt_vga.c Fri Sep 5 18:11:39 2014 (r271180) @@ -352,6 +352,9 @@ static void vga_setpixel(struct vt_device *vd, int x, int y, term_color_t color) { + if (vd->vd_flags & VDF_TEXTMODE) + return; + vga_bitblt_put(vd, (y * VT_VGA_WIDTH / 8) + (x / 8), color, 0x80 >> (x % 8)); } @@ -362,6 +365,9 @@ vga_drawrect(struct vt_device *vd, int x { int x, y; + if (vd->vd_flags & VDF_TEXTMODE) + return; + for (y = y1; y <= y2; y++) { if (fill || (y == y1) || (y == y2)) { for (x = x1; x <= x2; x++) From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 19:00:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B917791; Fri, 5 Sep 2014 19:00:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB8D91E9B; Fri, 5 Sep 2014 19:00:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85J0U1J074756; Fri, 5 Sep 2014 19:00:30 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85J0UeI074755; Fri, 5 Sep 2014 19:00:30 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201409051900.s85J0UeI074755@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 5 Sep 2014 19:00:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271181 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 19:00:31 -0000 Author: andrew Date: Fri Sep 5 19:00:30 2014 New Revision: 271181 URL: http://svnweb.freebsd.org/changeset/base/271181 Log: Add the virtual timer irq to the list of interrupts we enable on secondary cores. Modified: head/sys/arm/arm/gic.c Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Fri Sep 5 18:11:39 2014 (r271180) +++ head/sys/arm/arm/gic.c Fri Sep 5 19:00:30 2014 (r271181) @@ -166,7 +166,10 @@ gic_init_secondary(void) /* Enable interrupt distribution */ gic_d_write_4(GICD_CTLR, 0x01); - /* Activate IRQ 29-30, ie private timer (secure & non-secure) IRQs */ + /* + * Activate the timer interrupts: virtual, secure, and non-secure. + */ + gic_d_write_4(GICD_ISENABLER(27 >> 5), (1UL << (27 & 0x1F))); gic_d_write_4(GICD_ISENABLER(29 >> 5), (1UL << (29 & 0x1F))); gic_d_write_4(GICD_ISENABLER(30 >> 5), (1UL << (30 & 0x1F))); } From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 19:50:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F31636D9; Fri, 5 Sep 2014 19:50:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEC6414A5; Fri, 5 Sep 2014 19:50:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85JoIHn000445; Fri, 5 Sep 2014 19:50:18 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85JoI3r000416; Fri, 5 Sep 2014 19:50:18 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409051950.s85JoI3r000416@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 5 Sep 2014 19:50:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271182 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 19:50:19 -0000 Author: glebius Date: Fri Sep 5 19:50:18 2014 New Revision: 271182 URL: http://svnweb.freebsd.org/changeset/base/271182 Log: Set vnet context before accessing V_socket_hhh[]. Submitted by: "Hiroo Ono (å°é‡Žå¯›ç”Ÿ)" Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Fri Sep 5 19:00:30 2014 (r271181) +++ head/sys/kern/uipc_socket.c Fri Sep 5 19:50:18 2014 (r271182) @@ -3265,9 +3265,11 @@ filt_soread(struct knote *kn, long hint) return 1; } + CURVNET_SET(so->so_vnet); if (V_socket_hhh[HHOOK_FILT_SOREAD]->hhh_nhooks > 0) /* This hook returning non-zero indicates an event, not error */ return (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD)); + CURVNET_RESTORE(); return (0); } @@ -3294,8 +3296,10 @@ filt_sowrite(struct knote *kn, long hint SOCKBUF_LOCK_ASSERT(&so->so_snd); kn->kn_data = sbspace(&so->so_snd); + CURVNET_SET(so->so_vnet); if (V_socket_hhh[HHOOK_FILT_SOWRITE]->hhh_nhooks > 0) hhook_run_socket(so, kn, HHOOK_FILT_SOWRITE); + CURVNET_RESTORE(); if (so->so_snd.sb_state & SBS_CANTSENDMORE) { kn->kn_flags |= EV_EOF; From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 19:54:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C26CD868; Fri, 5 Sep 2014 19:54:16 +0000 (UTC) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E15F41585; Fri, 5 Sep 2014 19:54:15 +0000 (UTC) Received: by mail-wi0-f172.google.com with SMTP id n3so6260wiv.17 for ; Fri, 05 Sep 2014 12:54:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=hDFR6r9y0rFBk3W1/TNVeiLEgXbpDeej96bmlhRt/sk=; b=LquAuxI1YISnqigX5sM0Bc9+GfVvLjxxYtwsaK9jrkne7MAo584o9X6Qhdjqmf4BHT Jf7fr4z7h/0yUnJfLza/hDMKp/pKDuq4v4c8ttd5w74F6E126ohxWsUZ0wQp5++txtb1 RSJk+S4UAUOr0VSPswa8PorfSjR0a2otNJg9SJHLgjmgv51qUeNs0JxgMPjOc3v9X0EP M3bwxlrYtMnUPdAgCblW+v/nrQjDtRSFSDVcTPx9JPrBp3+F4vGjCdJAjTzAyQ9mbZLx Zg02Qxy0Nm3mC+7tiSToQkOKviKC2iJW7vUu8z94kux6CXHay7iMxRUedEAUA03HzfZi BV3w== X-Received: by 10.194.191.132 with SMTP id gy4mr6992450wjc.35.1409946854211; Fri, 05 Sep 2014 12:54:14 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id g8sm2844675wiy.19.2014.09.05.12.54.12 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 05 Sep 2014 12:54:13 -0700 (PDT) Date: Fri, 5 Sep 2014 21:54:11 +0200 From: Mateusz Guzik To: Gleb Smirnoff Subject: Re: svn commit: r271182 - head/sys/kern Message-ID: <20140905195410.GA722@dft-labs.eu> References: <201409051950.s85JoI3r000416@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201409051950.s85JoI3r000416@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 19:54:16 -0000 On Fri, Sep 05, 2014 at 07:50:18PM +0000, Gleb Smirnoff wrote: > Author: glebius > Date: Fri Sep 5 19:50:18 2014 > New Revision: 271182 > URL: http://svnweb.freebsd.org/changeset/base/271182 > > Log: > Set vnet context before accessing V_socket_hhh[]. > > Submitted by: "Hiroo Ono (å°é‡Žå¯›ç”Ÿ)" > > Modified: > head/sys/kern/uipc_socket.c > > Modified: head/sys/kern/uipc_socket.c > ============================================================================== > --- head/sys/kern/uipc_socket.c Fri Sep 5 19:00:30 2014 (r271181) > +++ head/sys/kern/uipc_socket.c Fri Sep 5 19:50:18 2014 (r271182) > @@ -3265,9 +3265,11 @@ filt_soread(struct knote *kn, long hint) > return 1; > } > > + CURVNET_SET(so->so_vnet); > if (V_socket_hhh[HHOOK_FILT_SOREAD]->hhh_nhooks > 0) > /* This hook returning non-zero indicates an event, not error */ > return (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD)); > + CURVNET_RESTORE(); > should not this be something like: error = hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD); CURVNET_RESTORE(); return (error); ? > return (0); > } > @@ -3294,8 +3296,10 @@ filt_sowrite(struct knote *kn, long hint > SOCKBUF_LOCK_ASSERT(&so->so_snd); > kn->kn_data = sbspace(&so->so_snd); > > + CURVNET_SET(so->so_vnet); > if (V_socket_hhh[HHOOK_FILT_SOWRITE]->hhh_nhooks > 0) > hhook_run_socket(so, kn, HHOOK_FILT_SOWRITE); > + CURVNET_RESTORE(); > > if (so->so_snd.sb_state & SBS_CANTSENDMORE) { > kn->kn_flags |= EV_EOF; > -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 19:59:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47012A04; Fri, 5 Sep 2014 19:59:23 +0000 (UTC) Received: from mail-pa0-x235.google.com (mail-pa0-x235.google.com [IPv6:2607:f8b0:400e:c03::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0AAEC15B5; Fri, 5 Sep 2014 19:59:23 +0000 (UTC) Received: by mail-pa0-f53.google.com with SMTP id fa1so22922033pad.40 for ; Fri, 05 Sep 2014 12:59:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=GwxKzu39H+dFh4lPSee3iQMh5EuCjF4Gr+UzHxgtVLI=; b=rgLx/mlQann8E1jKUppt8HeMjN7Xj1qUT829PC/X84DK7+VlJ21Vf3/mqf5i+TsTsB yImOQxbq/S6meNREdpX/w5dREPyw+0uLQ7KEyWihFDT7bX5zI7tbI4LFMeP4TmiESOZO ul6aRYN77W/Twpk0KfdrOOsGsrdNTTKMnLy31T4I4ODg0MJbyBSFnIflenH28lERBo/1 obx9wAc2mG+RSD2noMYhdMrxFIofo7SCDJrGoJfo6oSmQH017D2EZhZto1R8GNhFSAKJ AmHySmRS8poInNgGkQ2Wb34B/b+td+E00uwSK0l/0uICxXCD8eFXk5WuUVEh6+epYk81 foLg== X-Received: by 10.67.23.136 with SMTP id ia8mr1205597pad.125.1409947162569; Fri, 05 Sep 2014 12:59:22 -0700 (PDT) Received: from [10.88.239.179] (mobile-166-137-215-074.mycingular.net. [166.137.215.74]) by mx.google.com with ESMTPSA id nj7sm2487319pdb.10.2014.09.05.12.59.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Sep 2014 12:59:21 -0700 (PDT) References: <201409051950.s85JoI3r000416@svn.freebsd.org> <20140905195410.GA722@dft-labs.eu> Mime-Version: 1.0 (1.0) In-Reply-To: <20140905195410.GA722@dft-labs.eu> Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: quoted-printable Message-Id: X-Mailer: iPhone Mail (11D257) From: Garrett Cooper Subject: Re: svn commit: r271182 - head/sys/kern Date: Fri, 5 Sep 2014 12:59:12 -0700 To: Mateusz Guzik Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 19:59:23 -0000 > On Sep 5, 2014, at 12:54, Mateusz Guzik wrote: >=20 >> On Fri, Sep 05, 2014 at 07:50:18PM +0000, Gleb Smirnoff wrote: >> Author: glebius >> Date: Fri Sep 5 19:50:18 2014 >> New Revision: 271182 >> URL: http://svnweb.freebsd.org/changeset/base/271182 >>=20 >> Log: >> Set vnet context before accessing V_socket_hhh[]. >>=20 >> Submitted by: "Hiroo Ono (=1B$B>.Ln42@8=1B(B)" >>=20 >> Modified: >> head/sys/kern/uipc_socket.c >>=20 >> Modified: head/sys/kern/uipc_socket.c >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D >> --- head/sys/kern/uipc_socket.c Fri Sep 5 19:00:30 2014 (r271181) >> +++ head/sys/kern/uipc_socket.c Fri Sep 5 19:50:18 2014 (r271182) >> @@ -3265,9 +3265,11 @@ filt_soread(struct knote *kn, long hint) >> return 1; >> } >>=20 >> + CURVNET_SET(so->so_vnet); >> if (V_socket_hhh[HHOOK_FILT_SOREAD]->hhh_nhooks > 0) >> /* This hook returning non-zero indicates an event, not error */ >> return (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD)); >> + CURVNET_RESTORE(); >=20 > should not this be something like: > error =3D hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD); > CURVNET_RESTORE(); > return (error); > ? Probably :/.. >> return (0); >> } >> @@ -3294,8 +3296,10 @@ filt_sowrite(struct knote *kn, long hint >> SOCKBUF_LOCK_ASSERT(&so->so_snd); >> kn->kn_data =3D sbspace(&so->so_snd); >>=20 >> + CURVNET_SET(so->so_vnet); >> if (V_socket_hhh[HHOOK_FILT_SOWRITE]->hhh_nhooks > 0) >> hhook_run_socket(so, kn, HHOOK_FILT_SOWRITE); >> + CURVNET_RESTORE(); >>=20 >> if (so->so_snd.sb_state & SBS_CANTSENDMORE) { >> kn->kn_flags |=3D EV_EOF; >=20 > --=20 > Mateusz Guzik >=20 From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 21:15:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 299A7E58; Fri, 5 Sep 2014 21:15:17 +0000 (UTC) Received: from mail-qg0-x229.google.com (mail-qg0-x229.google.com [IPv6:2607:f8b0:400d:c04::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AA95E1E70; Fri, 5 Sep 2014 21:15:16 +0000 (UTC) Received: by mail-qg0-f41.google.com with SMTP id i50so12647659qgf.14 for ; Fri, 05 Sep 2014 14:15:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=o5nc5cvIBE5ecWtMnvefIA1DYXOrDJcIVN6PYKMo9nM=; b=cb8uPa2304Hrf//4ycynjwwXb3VWAPEsTjKpkoTsg1y2cFqorzD9shKSMH1IZsFocj 8b4HqHSLXHuOmB7QnaZio/CmFc/qddqJEfruPyoXWkYabfUPBHgt9fz8Bytta7ES2BOb f2ey5K90B90B+FWoP9w6WvfpiTaK2mR0Ijoq0x9m6PAB/pQXfu/u84D9eiNv2CYLyWIz a2ICi5nH1EGUmwNbzQoH1JNdYzPdHbzbQwEH3ijSRn4KRifrrYWPUWAn7DN8ogcp5gE5 JrBLDKHJPbRdWGdekdMsDYp1Twuf9jZFN7EUtstJd4nEQRFTbvGvFzgvY9cTPTi9i6Q1 6YtQ== MIME-Version: 1.0 X-Received: by 10.224.75.73 with SMTP id x9mr22733328qaj.63.1409951715232; Fri, 05 Sep 2014 14:15:15 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.39.139 with HTTP; Fri, 5 Sep 2014 14:15:15 -0700 (PDT) In-Reply-To: References: <201409051950.s85JoI3r000416@svn.freebsd.org> <20140905195410.GA722@dft-labs.eu> Date: Fri, 5 Sep 2014 14:15:15 -0700 X-Google-Sender-Auth: 5toLIEhSFI0HSzA5Rf4ui1Sm93s Message-ID: Subject: Re: svn commit: r271182 - head/sys/kern From: Adrian Chadd To: Garrett Cooper Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Mateusz Guzik , "src-committers@freebsd.org" , Gleb Smirnoff X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 21:15:17 -0000 I'm building a vimage kernel now to at least compile test a fix. Thanks, -a On 5 September 2014 12:59, Garrett Cooper wrote: > >> On Sep 5, 2014, at 12:54, Mateusz Guzik wrote: >> >>> On Fri, Sep 05, 2014 at 07:50:18PM +0000, Gleb Smirnoff wrote: >>> Author: glebius >>> Date: Fri Sep 5 19:50:18 2014 >>> New Revision: 271182 >>> URL: http://svnweb.freebsd.org/changeset/base/271182 >>> >>> Log: >>> Set vnet context before accessing V_socket_hhh[]. >>> >>> Submitted by: "Hiroo Ono (=E5=B0=8F=E9=87=8E=E5=AF=9B=E7=94=9F)" >>> >>> Modified: >>> head/sys/kern/uipc_socket.c >>> >>> Modified: head/sys/kern/uipc_socket.c >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>> --- head/sys/kern/uipc_socket.c Fri Sep 5 19:00:30 2014 (r271181= ) >>> +++ head/sys/kern/uipc_socket.c Fri Sep 5 19:50:18 2014 (r271182= ) >>> @@ -3265,9 +3265,11 @@ filt_soread(struct knote *kn, long hint) >>> return 1; >>> } >>> >>> + CURVNET_SET(so->so_vnet); >>> if (V_socket_hhh[HHOOK_FILT_SOREAD]->hhh_nhooks > 0) >>> /* This hook returning non-zero indicates an event, not error */ >>> return (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD)); >>> + CURVNET_RESTORE(); >> >> should not this be something like: >> error =3D hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD); >> CURVNET_RESTORE(); >> return (error); >> ? > > Probably :/.. > > >>> return (0); >>> } >>> @@ -3294,8 +3296,10 @@ filt_sowrite(struct knote *kn, long hint >>> SOCKBUF_LOCK_ASSERT(&so->so_snd); >>> kn->kn_data =3D sbspace(&so->so_snd); >>> >>> + CURVNET_SET(so->so_vnet); >>> if (V_socket_hhh[HHOOK_FILT_SOWRITE]->hhh_nhooks > 0) >>> hhook_run_socket(so, kn, HHOOK_FILT_SOWRITE); >>> + CURVNET_RESTORE(); >>> >>> if (so->so_snd.sb_state & SBS_CANTSENDMORE) { >>> kn->kn_flags |=3D EV_EOF; >> >> -- >> Mateusz Guzik >> > From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 22:35:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D75C402; Fri, 5 Sep 2014 22:35:37 +0000 (UTC) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B950E1932; Fri, 5 Sep 2014 22:35:36 +0000 (UTC) Received: by mail-wi0-f170.google.com with SMTP id cc10so222636wib.1 for ; Fri, 05 Sep 2014 15:35:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=yvDxkt9Npkqy4uC3mVwSX5djbYS3LD4X+IHVWhdS49E=; b=ovxiLqCsQoyb61pQOUrdZQbJz7GoDA+3xrDJ3lwLSGiqhnMZ4tY0VT4atYW6Gr5kEn WuGU8RrNvJlxScxyG8GGxQ+yeo9wbpSs+qLhYIIx8fdnXcDCfmBRStdwO4Z951GklHLk M3o003kmI6fPmrvEAPKdC3oOH3OIXT4cMlIfLhW5p+rkPeS00Xj12ZNLD2Mnkci/lX3F IE/RFTNerl3AcHDEizM2rjDDq07nm+vLQQ4ydmYS4Fny8YvZb4mQ/Q1HqzsOeQhApXA0 yBngms1NJM5MlGqJ9AdzpyBXtJkFZyzdYD8fSGWnbm5uTuCCKlbSmflJHO4ahHo0gG7n ulkg== X-Received: by 10.180.212.50 with SMTP id nh18mr6226598wic.81.1409956534775; Fri, 05 Sep 2014 15:35:34 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id hi4sm2742019wjb.46.2014.09.05.15.35.33 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 05 Sep 2014 15:35:33 -0700 (PDT) Date: Sat, 6 Sep 2014 00:35:26 +0200 From: Mateusz Guzik To: Sean Bruno Subject: Re: svn commit: r271141 - in head/sys: kern sys Message-ID: <20140905223526.GB722@dft-labs.eu> References: <201409042131.s84LVPh3065497@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201409042131.s84LVPh3065497@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 22:35:37 -0000 On Thu, Sep 04, 2014 at 09:31:25PM +0000, Sean Bruno wrote: > Author: sbruno > Date: Thu Sep 4 21:31:25 2014 > New Revision: 271141 > URL: http://svnweb.freebsd.org/changeset/base/271141 > > Log: > Allow multiple image activators to run on the same execution by changing > imgp->interpreted to a bitmask instead of, functionally, a bool. Each > imgactivator now requires its own flag in interpreted to indicate whether > or not it has already examined argv[0]. > > Change imgp->interpreted to an unsigned char to add one extra bit for > future use. > > With this change, one can execute a shell script from a 64bit host native > make and still get the binmisc image activator to fire for the script > interpreter. Prior to this, execution would fail. > > Phabric: https://reviews.freebsd.org/D696 > Reviewed by: jhb@ > MFC after: 4 weeks > > Modified: > head/sys/kern/imgact_binmisc.c > head/sys/kern/imgact_shell.c > head/sys/sys/imgact.h > > Modified: head/sys/kern/imgact_binmisc.c > ============================================================================== > --- head/sys/kern/imgact_binmisc.c Thu Sep 4 21:28:25 2014 (r271140) > +++ head/sys/kern/imgact_binmisc.c Thu Sep 4 21:31:25 2014 (r271141) > @@ -600,12 +600,12 @@ imgact_binmisc_exec(struct image_params > } > > /* No interpreter nesting allowed. */ > - if (imgp->interpreted) { > + if (imgp->interpreted & IMGACT_BINMISC) { > mtx_unlock(&interp_list_mtx); > return (ENOEXEC); > } > Unrealated, but I have to ask: can't this be converted to an rmlock? -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 22:51:23 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4372188A for ; Fri, 5 Sep 2014 22:51:23 +0000 (UTC) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com [209.85.215.47]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B64651AED for ; Fri, 5 Sep 2014 22:51:22 +0000 (UTC) Received: by mail-la0-f47.google.com with SMTP id el20so6242401lab.34 for ; Fri, 05 Sep 2014 15:51:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=K0TJAeFe7oAYpxjQvt2VbN+9v4jClV9XzS8Xgnj3vgI=; b=cfCKqwOXlwAqTuKxDJbdbgEAetHAULPnxthZeotB/wOpEq/NXFNCZnhxDyfHgSbtzb 4eoM06BKN+kOp3MZ/R9QHXhvsoM3bJwF2+WOa4Xix1AofQwHWY7QfNNkQLn4m+MfNfIQ XT17pCSnmP7DSAiXSxnhvr6NMj3XprRHasRZS7wSc84XKT4AloxhLohLXJoVg3q8yu8b s8fWErVDpW6PzI8nuXQ5k2pCrmqIM7eqEeWWaTCQY56GmnGmWvNud96bsFT2DUHV+Agc Yp34vCeTT8D3zXNjYzC3WqtiZEy1nMn5xqE+NFCSFu8X2XI8CMOGibYHulrt+LhEFI+v aOiQ== X-Gm-Message-State: ALoCoQksznJWk7RSXfTOUKkYJJlxHkwVU+Hw22dgKiZGY6zD4L5VOkA1Z1cwL+VwnzS+fs0sUd9s X-Received: by 10.112.158.199 with SMTP id ww7mr13914041lbb.71.1409957473467; Fri, 05 Sep 2014 15:51:13 -0700 (PDT) Received: from raynote.ddteam.net (12-162-133-95.pool.ukrtel.net. [95.133.162.12]) by mx.google.com with ESMTPSA id s7sm1150472lby.45.2014.09.05.15.51.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Sep 2014 15:51:12 -0700 (PDT) Date: Sat, 6 Sep 2014 01:48:59 +0300 From: Aleksandr Rybalko To: Alexey Dokuchaev Subject: Re: svn commit: r271023 - stable/10/sys/dev/vt Message-Id: <20140906014859.1c31f3aac5c84605ec6155dc@ddteam.net> In-Reply-To: <20140905163433.GA80322@FreeBSD.org> References: <201409031400.s83E0bK6049810@svn.freebsd.org> <20140903140757.GA7494@FreeBSD.org> <20140903145753.GA25935@FreeBSD.org> <54082B57.6070007@FreeBSD.org> <20140905163433.GA80322@FreeBSD.org> X-Mailer: Sylpheed 3.4.2 (GTK+ 2.24.22; amd64-portbld-freebsd11.0) Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 8bit Cc: "src-committers@freebsd.org" , Ed Maste , svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , svn-src-stable-10@freebsd.org, =?KOI8-U?Q?Jean-S=E9bastien_P=E9dron?= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 22:51:23 -0000 Hi Alexey! On Fri, 5 Sep 2014 16:34:34 +0000 Alexey Dokuchaev wrote: > On Thu, Sep 04, 2014 at 11:05:27AM +0200, Jean-Sébastien Pédron wrote: > > One bug in vt(4) was that the mouse cursor position, even if it was > > invisible before moused(8) starts, was always considered "dirty" and > > required a redraw. The default position being [0;0], each new character > > written would trigger a full refresh of the screen from [0;0] to the > > position of this character. > > For quite a while (since I started using vt(4)) I'm observing a rather > annoying thing: sometimes small area of screen would get selected like if > pressed mouse button or something. If I do a long build on the console, > periodically, white rectangle (selected area) will suddenly pop up and > scroll away. Is this a known thing? It can be very annoyting for text > editing on the console, as these sporadic "selects" are overwriting my > selection buffer contents with whatever was on the screen at that time > when they suddenly appear. (Rat itself it motionless while it happens.) Yeah, it is known. It is due different logic than in syscons(4). vt(4) save not skected text, but position inside history buffer. Return to old (well known syscons(4)) behaviour is in TODO. > > > Those two problems combined explain the slownness of vt(4), especially > > with discrete GPU and virtual machines; i915 users were mostly spared. > > > > Regarding the incorrect refresh when vt-switching, it was caused by a > > race between the redraw thread and the switch. The redraw thread was not > > stopped during a switch. Therefore, if the thread ran while the switch > > was in progress, it could mark the screen as "up-to-date" even though it > > displayed the wrong data. > > > > One change did reduce the vt-switch time specifically: in vt_vga, a > > switch triggers a clear of the video memory. The loop did read from the > > video memory, then wrote 8 black pixels. The useless read was removed. > > I must say that after I rebuilt my -CURRENT kernel today, vt(4) behaves > much nicer than few weeks ago: switching is fast, no damaged screen any- > more (both before and after I do "kldload i915kms"). Good work guys, and > thanks for explanations! > > ./danfe > -- Aleksandr Rybalko From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 23:30:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A1D5494; Fri, 5 Sep 2014 23:30:26 +0000 (UTC) Received: from mail-qg0-x236.google.com (mail-qg0-x236.google.com [IPv6:2607:f8b0:400d:c04::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DACE01E69; Fri, 5 Sep 2014 23:30:25 +0000 (UTC) Received: by mail-qg0-f54.google.com with SMTP id q108so5202730qgd.41 for ; Fri, 05 Sep 2014 16:30:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=+LBI1b7P+DbOISbCuANyPfyqhgnzrbbAGawtISn9hSg=; b=f7+c3/AeDZrSR81vTBMGfEnXA0vkemX0KvlJNMDHDfHlC6L0/MJcOnb0O2qk4ibDCc z+jkRSjXXOHW35n22hEIyWunJbmYHNxaCKIprU9HPrE+avYmar51bz+VPeoeYZHEmcG1 Cy844BYaUOrH0noK17tB4FcW9nQiZCNahSdcWdoH07WqxB3zxnXWH3N/eHzknQk3IPQt alwrdJpB+iAgRwt1wGYKm2FzrPM9zyeMCvn3okNYQ7i2U95I2t85szOxKYAHak7E1x2/ e8ww0lTq6EpjmNn84q3/fO+6XmwkmbyLf4pOjfHp6cU4RQvjutbIdby9kpJKM3t9vwxF mrxw== MIME-Version: 1.0 X-Received: by 10.224.151.69 with SMTP id b5mr23562606qaw.37.1409959824710; Fri, 05 Sep 2014 16:30:24 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.39.139 with HTTP; Fri, 5 Sep 2014 16:30:24 -0700 (PDT) In-Reply-To: References: <201409051950.s85JoI3r000416@svn.freebsd.org> <20140905195410.GA722@dft-labs.eu> Date: Fri, 5 Sep 2014 16:30:24 -0700 X-Google-Sender-Auth: 1slcYaK-PkLvHcLHi_e7zdopuyE Message-ID: Subject: Re: svn commit: r271182 - head/sys/kern From: Adrian Chadd To: Garrett Cooper Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Mateusz Guzik , "src-committers@freebsd.org" , Gleb Smirnoff X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 23:30:26 -0000 How's this look? adrian@testbox1:~/work/freebsd/head/src % svnlite diff sys/kern/ Index: sys/kern/uipc_socket.c =================================================================== --- sys/kern/uipc_socket.c (revision 271182) +++ sys/kern/uipc_socket.c (working copy) @@ -448,10 +448,12 @@ mac_socket_destroy(so); #endif CURVNET_SET(so->so_vnet); - if (V_socket_hhh[HHOOK_SOCKET_CLOSE]->hhh_nhooks > 0) + if (V_socket_hhh[HHOOK_SOCKET_CLOSE]->hhh_nhooks > 0) { hhook_run_socket(so, NULL, HHOOK_SOCKET_CLOSE); - CURVNET_RESTORE(); - + CURVNET_RESTORE(); + } else { + CURVNET_RESTORE(); + } crfree(so->so_cred); khelp_destroy_osd(&so->osd); sx_destroy(&so->so_snd.sb_sx); @@ -3245,6 +3247,7 @@ filt_soread(struct knote *kn, long hint) { struct socket *so; + int ret; so = kn->kn_fp->f_data; SOCKBUF_LOCK_ASSERT(&so->so_rcv); @@ -3266,11 +3269,15 @@ } CURVNET_SET(so->so_vnet); - if (V_socket_hhh[HHOOK_FILT_SOREAD]->hhh_nhooks > 0) + if (V_socket_hhh[HHOOK_FILT_SOREAD]->hhh_nhooks > 0) { /* This hook returning non-zero indicates an event, not error */ - return (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD)); - CURVNET_RESTORE(); - + ret = (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD)); + CURVNET_RESTORE(); + return (ret); + } else { + CURVNET_RESTORE(); + } + return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 23:36:24 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44900654; Fri, 5 Sep 2014 23:36:24 +0000 (UTC) Received: from mail-wg0-x234.google.com (mail-wg0-x234.google.com [IPv6:2a00:1450:400c:c00::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C1841F17; Fri, 5 Sep 2014 23:36:23 +0000 (UTC) Received: by mail-wg0-f52.google.com with SMTP id m15so12344865wgh.35 for ; Fri, 05 Sep 2014 16:36:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=5K02UaCExTtY21L0Uq+DAxZq50TmnuyxA2gl4r7VyVg=; b=FNnDgSSmf4a0iWBU9nwhangMT8WjFYBJCth++ftkGtjgnQLNF252YxVwoG53gVex9l afSJtzsv6CyeeNFwaNmU2wQanexMlk/LF1cdDmPzlbiqp/shKBeaVbwEUhduedaVrE9C 35C9oIDiFDvBbMWCEPiis6VdNieFT65YQQ2gud363QXH/mppHg3ol1cmz8XQdjxWGDKm xjj5bIwAUvuTMfQoV5BZVl6//LlFDO7FL1eyot6Y9hR4SLNbAWIekjyiTXU33jcxxoKV UPcgMBDlhbKiwvlln9cpv87IU+WtKzELUA+rqZWZuRovl7SA0uhJCNA31h7wB1FZr6UR QPmw== X-Received: by 10.180.85.136 with SMTP id h8mr6793112wiz.67.1409960181252; Fri, 05 Sep 2014 16:36:21 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id r19sm3451621wik.0.2014.09.05.16.36.19 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 05 Sep 2014 16:36:20 -0700 (PDT) Date: Sat, 6 Sep 2014 01:36:12 +0200 From: Mateusz Guzik To: Adrian Chadd Subject: Re: svn commit: r271182 - head/sys/kern Message-ID: <20140905233612.GF722@dft-labs.eu> References: <201409051950.s85JoI3r000416@svn.freebsd.org> <20140905195410.GA722@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 23:36:24 -0000 On Fri, Sep 05, 2014 at 04:30:24PM -0700, Adrian Chadd wrote: > How's this look? > Malformed. :-P I would prefer: diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index c6c3152..de72da5 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -3245,6 +3245,7 @@ static int filt_soread(struct knote *kn, long hint) { struct socket *so; + int ret; so = kn->kn_fp->f_data; SOCKBUF_LOCK_ASSERT(&so->so_rcv); @@ -3267,11 +3268,12 @@ filt_soread(struct knote *kn, long hint) CURVNET_SET(so->so_vnet); if (V_socket_hhh[HHOOK_FILT_SOREAD]->hhh_nhooks > 0) - /* This hook returning non-zero indicates an event, not error */ - return (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD)); + ret = hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD); + else + ret = 0; CURVNET_RESTORE(); - return (0); + return (ret); } static void But I'm fine either way. > > adrian@testbox1:~/work/freebsd/head/src % svnlite diff sys/kern/ > > Index: sys/kern/uipc_socket.c > > =================================================================== > > --- sys/kern/uipc_socket.c (revision 271182) > > +++ sys/kern/uipc_socket.c (working copy) > > @@ -448,10 +448,12 @@ > > mac_socket_destroy(so); > > #endif > > CURVNET_SET(so->so_vnet); > > - if (V_socket_hhh[HHOOK_SOCKET_CLOSE]->hhh_nhooks > 0) > > + if (V_socket_hhh[HHOOK_SOCKET_CLOSE]->hhh_nhooks > 0) { > > hhook_run_socket(so, NULL, HHOOK_SOCKET_CLOSE); > > - CURVNET_RESTORE(); > > - > > + CURVNET_RESTORE(); > > + } else { > > + CURVNET_RESTORE(); > > + } > > crfree(so->so_cred); > > khelp_destroy_osd(&so->osd); > > sx_destroy(&so->so_snd.sb_sx); > > @@ -3245,6 +3247,7 @@ > > filt_soread(struct knote *kn, long hint) > > { > > struct socket *so; > > + int ret; > > > > so = kn->kn_fp->f_data; > > SOCKBUF_LOCK_ASSERT(&so->so_rcv); > > @@ -3266,11 +3269,15 @@ > > } > > > > CURVNET_SET(so->so_vnet); > > - if (V_socket_hhh[HHOOK_FILT_SOREAD]->hhh_nhooks > 0) > > + if (V_socket_hhh[HHOOK_FILT_SOREAD]->hhh_nhooks > 0) { > > /* This hook returning non-zero indicates an event, not error */ > > - return (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD)); > > - CURVNET_RESTORE(); > > - > > + ret = (hhook_run_socket(so, NULL, HHOOK_FILT_SOREAD)); > > + CURVNET_RESTORE(); > > + return (ret); > > + } else { > > + CURVNET_RESTORE(); > > + } > > + > > return (0); > > } -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Fri Sep 5 23:56:26 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B3BDA7B; Fri, 5 Sep 2014 23:56:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 372FC1147; Fri, 5 Sep 2014 23:56:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s85NuQqX019296; Fri, 5 Sep 2014 23:56:26 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s85NuQIg019295; Fri, 5 Sep 2014 23:56:26 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201409052356.s85NuQIg019295@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Fri, 5 Sep 2014 23:56:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271183 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 23:56:26 -0000 Author: mjg Date: Fri Sep 5 23:56:25 2014 New Revision: 271183 URL: http://svnweb.freebsd.org/changeset/base/271183 Log: Plug unnecessary fp assignments in kern_fcntl. No functional changes. Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Fri Sep 5 19:50:18 2014 (r271182) +++ head/sys/kern/kern_descrip.c Fri Sep 5 23:56:25 2014 (r271183) @@ -509,7 +509,7 @@ kern_fcntl(struct thread *td, int fd, in case F_GETFD: FILEDESC_SLOCK(fdp); - if ((fp = fget_locked(fdp, fd)) == NULL) { + if (fget_locked(fdp, fd) == NULL) { FILEDESC_SUNLOCK(fdp); error = EBADF; break; @@ -522,7 +522,7 @@ kern_fcntl(struct thread *td, int fd, in case F_SETFD: FILEDESC_XLOCK(fdp); - if ((fp = fget_locked(fdp, fd)) == NULL) { + if (fget_locked(fdp, fd) == NULL) { FILEDESC_XUNLOCK(fdp); error = EBADF; break; From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 04:33:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF689E29; Sat, 6 Sep 2014 04:33:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A1331E85; Sat, 6 Sep 2014 04:33:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s864Xclo051403; Sat, 6 Sep 2014 04:33:38 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s864Xbc8051396; Sat, 6 Sep 2014 04:33:37 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201409060433.s864Xbc8051396@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 6 Sep 2014 04:33:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r271184 - in stable/9: sys/netinet6 usr.bin/netstat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 04:33:38 -0000 Author: markj Date: Sat Sep 6 04:33:37 2014 New Revision: 271184 URL: http://svnweb.freebsd.org/changeset/base/271184 Log: MFC r270348: Add some missing checks for unsupported interfaces (e.g. pflog(4)) when handling ioctls. While here, remove duplicated checks for a NULL ifp in in6_control(): this check is already done near the beginning of the function. MFC r270349: Suppress warnings when retrieving protocol stats from interfaces that don't support IPv6 (e.g. pflog(4)). PR: 189117 Modified: stable/9/sys/netinet6/in6.c stable/9/sys/netinet6/scope6.c stable/9/sys/netinet6/scope6_var.h stable/9/usr.bin/netstat/inet6.c Directory Properties: stable/9/sys/ (props changed) stable/9/usr.bin/netstat/ (props changed) Modified: stable/9/sys/netinet6/in6.c ============================================================================== --- stable/9/sys/netinet6/in6.c Fri Sep 5 23:56:25 2014 (r271183) +++ stable/9/sys/netinet6/in6.c Sat Sep 6 04:33:37 2014 (r271184) @@ -284,7 +284,7 @@ in6_control(struct socket *so, u_long cm return (mrt6_ioctl ? mrt6_ioctl(cmd, data) : EOPNOTSUPP); } - switch(cmd) { + switch (cmd) { case SIOCAADDRCTL_POLICY: case SIOCDADDRCTL_POLICY: if (td != NULL) { @@ -356,14 +356,10 @@ in6_control(struct socket *so, u_long cm if (error) return (error); } - return (scope6_set(ifp, - (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); + /* FALLTHROUGH */ case SIOCGSCOPE6: - return (scope6_get(ifp, - (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); case SIOCGSCOPE6DEF: - return (scope6_get_default((struct scope6_id *) - ifr->ifr_ifru.ifru_scope_id)); + return (scope6_ioctl(cmd, data, ifp)); } switch (cmd) { @@ -494,6 +490,13 @@ in6_control(struct socket *so, u_long cm if (error) goto out; } + /* FALLTHROUGH */ + case SIOCGIFSTAT_IN6: + case SIOCGIFSTAT_ICMP6: + if (ifp->if_afdata[AF_INET6] == NULL) { + error = EPFNOSUPPORT; + goto out; + } break; case SIOCGIFADDR_IN6: @@ -569,10 +572,6 @@ in6_control(struct socket *so, u_long cm break; case SIOCGIFSTAT_IN6: - if (ifp == NULL) { - error = EINVAL; - goto out; - } bzero(&ifr->ifr_ifru.ifru_stat, sizeof(ifr->ifr_ifru.ifru_stat)); ifr->ifr_ifru.ifru_stat = @@ -580,10 +579,6 @@ in6_control(struct socket *so, u_long cm break; case SIOCGIFSTAT_ICMP6: - if (ifp == NULL) { - error = EINVAL; - goto out; - } bzero(&ifr->ifr_ifru.ifru_icmp6stat, sizeof(ifr->ifr_ifru.ifru_icmp6stat)); ifr->ifr_ifru.ifru_icmp6stat = @@ -799,7 +794,7 @@ in6_control(struct socket *so, u_long cm } default: - if (ifp == NULL || ifp->if_ioctl == 0) { + if (ifp->if_ioctl == NULL) { error = EOPNOTSUPP; goto out; } Modified: stable/9/sys/netinet6/scope6.c ============================================================================== --- stable/9/sys/netinet6/scope6.c Fri Sep 5 23:56:25 2014 (r271183) +++ stable/9/sys/netinet6/scope6.c Sat Sep 6 04:33:37 2014 (r271184) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -72,6 +73,9 @@ static VNET_DEFINE(struct scope6_id, sid #define SID(ifp) \ (((struct in6_ifextra *)(ifp)->if_afdata[AF_INET6])->scope6_id) +static int scope6_get(struct ifnet *, struct scope6_id *); +static int scope6_set(struct ifnet *, struct scope6_id *); + void scope6_init(void) { @@ -115,6 +119,30 @@ scope6_ifdetach(struct scope6_id *sid) } int +scope6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp) +{ + struct in6_ifreq *ifr; + + if (ifp->if_afdata[AF_INET6] == NULL) + return (EPFNOSUPPORT); + + ifr = (struct in6_ifreq *)data; + switch (cmd) { + case SIOCSSCOPE6: + return (scope6_set(ifp, + (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); + case SIOCGSCOPE6: + return (scope6_get(ifp, + (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); + case SIOCGSCOPE6DEF: + return (scope6_get_default( + (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); + default: + return (EOPNOTSUPP); + } +} + +static int scope6_set(struct ifnet *ifp, struct scope6_id *idlist) { int i; @@ -177,7 +205,7 @@ scope6_set(struct ifnet *ifp, struct sco return (error); } -int +static int scope6_get(struct ifnet *ifp, struct scope6_id *idlist) { struct scope6_id *sid; @@ -196,7 +224,6 @@ scope6_get(struct ifnet *ifp, struct sco return (0); } - /* * Get a scope of the address. Node-local, link-local, site-local or global. */ Modified: stable/9/sys/netinet6/scope6_var.h ============================================================================== --- stable/9/sys/netinet6/scope6_var.h Fri Sep 5 23:56:25 2014 (r271183) +++ stable/9/sys/netinet6/scope6_var.h Sat Sep 6 04:33:37 2014 (r271184) @@ -45,8 +45,7 @@ struct scope6_id { void scope6_init(void); struct scope6_id *scope6_ifattach(struct ifnet *); void scope6_ifdetach(struct scope6_id *); -int scope6_set(struct ifnet *, struct scope6_id *); -int scope6_get(struct ifnet *, struct scope6_id *); +int scope6_ioctl(u_long cmd, caddr_t data, struct ifnet *); void scope6_setdefault(struct ifnet *); int scope6_get_default(struct scope6_id *); u_int32_t scope6_addr2default(struct in6_addr *); Modified: stable/9/usr.bin/netstat/inet6.c ============================================================================== --- stable/9/usr.bin/netstat/inet6.c Fri Sep 5 23:56:25 2014 (r271183) +++ stable/9/usr.bin/netstat/inet6.c Sat Sep 6 04:33:37 2014 (r271184) @@ -540,13 +540,13 @@ ip6_ifstats(char *ifname) } strcpy(ifr.ifr_name, ifname); - printf("ip6 on %s:\n", ifr.ifr_name); - if (ioctl(s, SIOCGIFSTAT_IN6, (char *)&ifr) < 0) { - perror("Warning: ioctl(SIOCGIFSTAT_IN6)"); + if (errno != EPFNOSUPPORT) + perror("Warning: ioctl(SIOCGIFSTAT_IN6)"); goto end; } + printf("ip6 on %s:\n", ifr.ifr_name); p(ifs6_in_receive, "\t%ju total input datagram%s\n"); p(ifs6_in_hdrerr, "\t%ju datagram%s with invalid header received\n"); p(ifs6_in_toobig, "\t%ju datagram%s exceeded MTU received\n"); @@ -945,13 +945,13 @@ icmp6_ifstats(char *ifname) } strcpy(ifr.ifr_name, ifname); - printf("icmp6 on %s:\n", ifr.ifr_name); - if (ioctl(s, SIOCGIFSTAT_ICMP6, (char *)&ifr) < 0) { - perror("Warning: ioctl(SIOCGIFSTAT_ICMP6)"); + if (errno != EPFNOSUPPORT) + perror("Warning: ioctl(SIOCGIFSTAT_ICMP6)"); goto end; } + printf("icmp6 on %s:\n", ifr.ifr_name); p(ifs6_in_msg, "\t%ju total input message%s\n"); p(ifs6_in_error, "\t%ju total input error message%s\n"); p(ifs6_in_dstunreach, "\t%ju input destination unreachable error%s\n"); From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 04:39:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99F8BFD0; Sat, 6 Sep 2014 04:39:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8476C1EBD; Sat, 6 Sep 2014 04:39:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s864dR66052581; Sat, 6 Sep 2014 04:39:27 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s864dQe1052576; Sat, 6 Sep 2014 04:39:26 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201409060439.s864dQe1052576@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 6 Sep 2014 04:39:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271185 - in stable/10: sys/netinet6 usr.bin/netstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 04:39:27 -0000 Author: markj Date: Sat Sep 6 04:39:26 2014 New Revision: 271185 URL: http://svnweb.freebsd.org/changeset/base/271185 Log: MFC r270348: Add some missing checks for unsupported interfaces (e.g. pflog(4)) when handling ioctls. While here, remove duplicated checks for a NULL ifp in in6_control(): this check is already done near the beginning of the function. MFC r270349: Suppress warnings when retrieving protocol stats from interfaces that don't support IPv6 (e.g. pflog(4)). PR: 189117 Approved by: re (gjb) Modified: stable/10/sys/netinet6/in6.c stable/10/sys/netinet6/scope6.c stable/10/sys/netinet6/scope6_var.h stable/10/usr.bin/netstat/inet6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/in6.c ============================================================================== --- stable/10/sys/netinet6/in6.c Sat Sep 6 04:33:37 2014 (r271184) +++ stable/10/sys/netinet6/in6.c Sat Sep 6 04:39:26 2014 (r271185) @@ -293,7 +293,7 @@ in6_control(struct socket *so, u_long cm return (mrt6_ioctl ? mrt6_ioctl(cmd, data) : EOPNOTSUPP); } - switch(cmd) { + switch (cmd) { case SIOCAADDRCTL_POLICY: case SIOCDADDRCTL_POLICY: if (td != NULL) { @@ -365,14 +365,10 @@ in6_control(struct socket *so, u_long cm if (error) return (error); } - return (scope6_set(ifp, - (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); + /* FALLTHROUGH */ case SIOCGSCOPE6: - return (scope6_get(ifp, - (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); case SIOCGSCOPE6DEF: - return (scope6_get_default((struct scope6_id *) - ifr->ifr_ifru.ifru_scope_id)); + return (scope6_ioctl(cmd, data, ifp)); } switch (cmd) { @@ -503,6 +499,13 @@ in6_control(struct socket *so, u_long cm if (error) goto out; } + /* FALLTHROUGH */ + case SIOCGIFSTAT_IN6: + case SIOCGIFSTAT_ICMP6: + if (ifp->if_afdata[AF_INET6] == NULL) { + error = EPFNOSUPPORT; + goto out; + } break; case SIOCGIFADDR_IN6: @@ -578,10 +581,6 @@ in6_control(struct socket *so, u_long cm break; case SIOCGIFSTAT_IN6: - if (ifp == NULL) { - error = EINVAL; - goto out; - } COUNTER_ARRAY_COPY(((struct in6_ifextra *) ifp->if_afdata[AF_INET6])->in6_ifstat, &ifr->ifr_ifru.ifru_stat, @@ -589,10 +588,6 @@ in6_control(struct socket *so, u_long cm break; case SIOCGIFSTAT_ICMP6: - if (ifp == NULL) { - error = EINVAL; - goto out; - } COUNTER_ARRAY_COPY(((struct in6_ifextra *) ifp->if_afdata[AF_INET6])->icmp6_ifstat, &ifr->ifr_ifru.ifru_icmp6stat, @@ -825,7 +820,7 @@ in6_control(struct socket *so, u_long cm } default: - if (ifp == NULL || ifp->if_ioctl == 0) { + if (ifp->if_ioctl == NULL) { error = EOPNOTSUPP; goto out; } Modified: stable/10/sys/netinet6/scope6.c ============================================================================== --- stable/10/sys/netinet6/scope6.c Sat Sep 6 04:33:37 2014 (r271184) +++ stable/10/sys/netinet6/scope6.c Sat Sep 6 04:39:26 2014 (r271185) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -78,6 +79,9 @@ static VNET_DEFINE(struct scope6_id, sid #define SID(ifp) \ (((struct in6_ifextra *)(ifp)->if_afdata[AF_INET6])->scope6_id) +static int scope6_get(struct ifnet *, struct scope6_id *); +static int scope6_set(struct ifnet *, struct scope6_id *); + void scope6_init(void) { @@ -121,6 +125,30 @@ scope6_ifdetach(struct scope6_id *sid) } int +scope6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp) +{ + struct in6_ifreq *ifr; + + if (ifp->if_afdata[AF_INET6] == NULL) + return (EPFNOSUPPORT); + + ifr = (struct in6_ifreq *)data; + switch (cmd) { + case SIOCSSCOPE6: + return (scope6_set(ifp, + (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); + case SIOCGSCOPE6: + return (scope6_get(ifp, + (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); + case SIOCGSCOPE6DEF: + return (scope6_get_default( + (struct scope6_id *)ifr->ifr_ifru.ifru_scope_id)); + default: + return (EOPNOTSUPP); + } +} + +static int scope6_set(struct ifnet *ifp, struct scope6_id *idlist) { int i; @@ -183,7 +211,7 @@ scope6_set(struct ifnet *ifp, struct sco return (error); } -int +static int scope6_get(struct ifnet *ifp, struct scope6_id *idlist) { struct scope6_id *sid; @@ -202,7 +230,6 @@ scope6_get(struct ifnet *ifp, struct sco return (0); } - /* * Get a scope of the address. Node-local, link-local, site-local or global. */ Modified: stable/10/sys/netinet6/scope6_var.h ============================================================================== --- stable/10/sys/netinet6/scope6_var.h Sat Sep 6 04:33:37 2014 (r271184) +++ stable/10/sys/netinet6/scope6_var.h Sat Sep 6 04:39:26 2014 (r271185) @@ -50,8 +50,7 @@ VNET_DECLARE(int, deembed_scopeid); void scope6_init(void); struct scope6_id *scope6_ifattach(struct ifnet *); void scope6_ifdetach(struct scope6_id *); -int scope6_set(struct ifnet *, struct scope6_id *); -int scope6_get(struct ifnet *, struct scope6_id *); +int scope6_ioctl(u_long cmd, caddr_t data, struct ifnet *); void scope6_setdefault(struct ifnet *); int scope6_get_default(struct scope6_id *); u_int32_t scope6_addr2default(struct in6_addr *); Modified: stable/10/usr.bin/netstat/inet6.c ============================================================================== --- stable/10/usr.bin/netstat/inet6.c Sat Sep 6 04:33:37 2014 (r271184) +++ stable/10/usr.bin/netstat/inet6.c Sat Sep 6 04:39:26 2014 (r271185) @@ -540,13 +540,13 @@ ip6_ifstats(char *ifname) } strcpy(ifr.ifr_name, ifname); - printf("ip6 on %s:\n", ifr.ifr_name); - if (ioctl(s, SIOCGIFSTAT_IN6, (char *)&ifr) < 0) { - perror("Warning: ioctl(SIOCGIFSTAT_IN6)"); + if (errno != EPFNOSUPPORT) + perror("Warning: ioctl(SIOCGIFSTAT_IN6)"); goto end; } + printf("ip6 on %s:\n", ifr.ifr_name); p(ifs6_in_receive, "\t%ju total input datagram%s\n"); p(ifs6_in_hdrerr, "\t%ju datagram%s with invalid header received\n"); p(ifs6_in_toobig, "\t%ju datagram%s exceeded MTU received\n"); @@ -945,13 +945,13 @@ icmp6_ifstats(char *ifname) } strcpy(ifr.ifr_name, ifname); - printf("icmp6 on %s:\n", ifr.ifr_name); - if (ioctl(s, SIOCGIFSTAT_ICMP6, (char *)&ifr) < 0) { - perror("Warning: ioctl(SIOCGIFSTAT_ICMP6)"); + if (errno != EPFNOSUPPORT) + perror("Warning: ioctl(SIOCGIFSTAT_ICMP6)"); goto end; } + printf("icmp6 on %s:\n", ifr.ifr_name); p(ifs6_in_msg, "\t%ju total input message%s\n"); p(ifs6_in_error, "\t%ju total input error message%s\n"); p(ifs6_in_dstunreach, "\t%ju input destination unreachable error%s\n"); From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 08:00:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB56F993; Sat, 6 Sep 2014 08:00:48 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 428061329; Sat, 6 Sep 2014 08:00:48 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s8680gPN054878 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 6 Sep 2014 11:00:42 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua s8680gPN054878 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s8680gYW054876; Sat, 6 Sep 2014 11:00:42 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 6 Sep 2014 11:00:42 +0300 From: Konstantin Belousov To: John Baldwin Subject: Re: svn commit: r270850 - in head/sys: i386/i386 i386/include i386/isa x86/acpica Message-ID: <20140906080042.GT2737@kib.kiev.ua> References: <201408301748.s7UHmc6H059701@svn.freebsd.org> <3070015.668SIdAzOX@ralph.baldwin.cx> <20140905084305.GN2737@kib.kiev.ua> <201409051044.05853.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="b/WH2/j5QGsRzh1z" Content-Disposition: inline In-Reply-To: <201409051044.05853.jhb@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 08:00:48 -0000 --b/WH2/j5QGsRzh1z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 05, 2014 at 10:44:05AM -0400, John Baldwin wrote: > On Friday, September 05, 2014 4:43:05 am Konstantin Belousov wrote: > > On Thu, Sep 04, 2014 at 10:50:25PM -0400, John Baldwin wrote: > > > On Tuesday, September 02, 2014 06:41:27 PM Konstantin Belousov wrote: > > > > On Tue, Sep 02, 2014 at 11:00:57AM -0400, John Baldwin wrote: > > > > > I thought about that. I could easily make a parallel array, or p= erhaps > > > > > use a separate 'susppcb' structure that includes a pcb and the sa= vefpu > > > > > union and change susppcbs to be an array of those. Which do you = prefer?=20 > > > > > If we want to move some state out of the PCB on amd64 into this, = then a > > > > > separate struct for susppcbs might be the sanest. > > > >=20 > > > > Yes, separate structure seems to be a way forward. > > >=20 > > > Please see www.freebsd.org/~jhb/patches/susppcb.patch Note that I mo= ved > > > fpususpend() out into a C function on amd64 so that resumectx() could= still=20 > > > operate on just a pcb. This also makes savectx and resumectx more sy= mmetric > > > and matches what I ended up doing on i386. This is tested for suspen= d and > > > resume on both i386 and amd64. > >=20 > > The implementation of fpuresume() in C is definitely an improvement. > >=20 > > You only moved the fpu context to the susppcb, I think this is good for > > now, we will want to move other bits later. > >=20 > > Do we need to keep pcb layout for KBI compat ? I remember that pcb > > size is asserted to properly fit into pcpu area for percpu zones. > > But why keep the layout ? I.e. moving all padding bits to the end. >=20 > I wasn't sure. I thought the padding was there for ABI reasons. If we d= on't > need KBI compat, I would much rather consolidate all the padding at the e= nd. The padding is due to functional requirements. I do not see KBI requirements that would cause us to keep the layout, at least in HEAD. >=20 > > There is one weird detail, not touched by your patch. Amd64 resume > > path calls initializecpu(), while i386 does not. I do not see any > > use for the call, the reload of CRX registers by trampoline/resumectx > > should already set everything to working state. E.g., enabling XMM > > in CR4 after fpu state is restored looks strange. >=20 > I can test that. >=20 > > Overall, it looks fine. Do you prefer to have alloc_fpusave() on i386 ? >=20 > Well, it might be nice to have XSAVE on i386. I'm not sure if Intel has > any 32-bit only chips planned that will use AVX or MPX, etc. If they are, > then I do think AVX on i386 would be nice to have. Barring XSAVE I think > we can just use a static savefpu on i386 for now. I mean that having alloc_fpusave() would allow to avoid several #ifdefs by using pointer to save area on i386 as well. >=20 > We might also consider removing support for 486sx CPUs and requiring an > on-CPU FPU for i386. If we do that we might able to use a common fpu.c > which would be even nicer. IMO merging fpu.c and npx.c is very non-trivial. First obstacle is the differences between i386 and amd64 fpu context layouts (software-imposed). --b/WH2/j5QGsRzh1z Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUCr8qAAoJEJDCuSvBvK1BtI8P/2SMZcJeEbBmY3QWrMtN71Kq PzaG6dccA19dH7zowqtr3ApLCd4L27qmlKZZ7uez4xgb8NxayPLPyW/zXZ+/a3Jc WKpyXZCtiYewwKceBG+XkToAL/XWZR9QnjJBLpqyFcpWY3croM0sEtqn9VWUFuPS R3YQzo3ogw+IblA9HOYfnLYQAXbkHQtTipzes7iZd/xrCLc3HOwdIqnIQW5nq5i1 xsTUTlbS+8+SCfLRRh1AfWJd3GaSc/kcQMJ5BFO8QA1jdm3g8gnEZXoQutaogvnG k539IkudaPXASZG0LD2Y9IFNBa1IkP8AGNj8N5byjU8PfknymBEJx1DBOGb2g5kM hUBtwPkKOUdNSR1izQELmsvQAlKcrF8Z6zjgXlWDyha0LcknKalUiEDBz4dnMtbC OPdsnAl9+nLM6JcSZ5xIKtPQzJItBlp4E88fTGn5DKQ8ZRKtm96+Sfkkjts7X1ix 6jQRaoZL1ipKlXa5arUPKJZq1lFG6k4Arug5MgDoyc4yzFpj1WMY8i5wcizwsjow TYniJOgGMjwjPBBuqD8U5EBG3aHnCK1uj0y7rUC86OcMfcaoRXxSukUkzzkbfsVA h3m5yp4VOSXzby89GMlcJXW/yz+yEX4cLR/8A7il5c8cKU4u/f5yzDHEJm36q9+s QoJb2Nc81IBUTP79q++L =dFVS -----END PGP SIGNATURE----- --b/WH2/j5QGsRzh1z-- From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 08:48:59 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2B1E206; Sat, 6 Sep 2014 08:48:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC8301984; Sat, 6 Sep 2014 08:48:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s868mwmd066921; Sat, 6 Sep 2014 08:48:58 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s868mwgm066917; Sat, 6 Sep 2014 08:48:58 GMT (envelope-from br@FreeBSD.org) Message-Id: <201409060848.s868mwgm066917@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Sat, 6 Sep 2014 08:48:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271186 - in head/sys: arm/altera/socfpga boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 08:48:59 -0000 Author: br Date: Sat Sep 6 08:48:57 2014 New Revision: 271186 URL: http://svnweb.freebsd.org/changeset/base/271186 Log: Add FPGA Manager driver. This driver allows to program FPGA core from FreeBSD userspace running on ARM core. Sponsored by: DARPA, AFRL Added: head/sys/arm/altera/socfpga/socfpga_common.h (contents, props changed) head/sys/arm/altera/socfpga/socfpga_manager.c (contents, props changed) Modified: head/sys/arm/altera/socfpga/files.socfpga head/sys/boot/fdt/dts/arm/socfpga.dtsi Modified: head/sys/arm/altera/socfpga/files.socfpga ============================================================================== --- head/sys/arm/altera/socfpga/files.socfpga Sat Sep 6 04:39:26 2014 (r271185) +++ head/sys/arm/altera/socfpga/files.socfpga Sat Sep 6 08:48:57 2014 (r271186) @@ -15,3 +15,4 @@ arm/arm/mpcore_timer.c standard arm/altera/socfpga/socfpga_common.c standard arm/altera/socfpga/socfpga_machdep.c standard +arm/altera/socfpga/socfpga_manager.c standard Added: head/sys/arm/altera/socfpga/socfpga_common.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/altera/socfpga/socfpga_common.h Sat Sep 6 08:48:57 2014 (r271186) @@ -0,0 +1,44 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#define READ4(_sc, _reg) \ + bus_space_read_4(_sc->bst, _sc->bsh, _reg) +#define WRITE4(_sc, _reg, _val) \ + bus_space_write_4(_sc->bst, _sc->bsh, _reg, _val) +#define READ2(_sc, _reg) \ + bus_space_read_2(_sc->bst, _sc->bsh, _reg) +#define WRITE2(_sc, _reg, _val) \ + bus_space_write_2(_sc->bst, _sc->bsh, _reg, _val) +#define READ1(_sc, _reg) \ + bus_space_read_1(_sc->bst, _sc->bsh, _reg) +#define WRITE1(_sc, _reg, _val) \ + bus_space_write_1(_sc->bst, _sc->bsh, _reg, _val) Added: head/sys/arm/altera/socfpga/socfpga_manager.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/altera/socfpga/socfpga_manager.c Sat Sep 6 08:48:57 2014 (r271186) @@ -0,0 +1,436 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/* + * Altera FPGA Manager. + * Chapter 4, Cyclone V Device Handbook (CV-5V2 2014.07.22) + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +/* FPGA Manager Module Registers */ +#define FPGAMGR_STAT 0x0 /* Status Register */ +#define STAT_MSEL_MASK 0x1f +#define STAT_MSEL_SHIFT 3 +#define STAT_MODE_SHIFT 0 +#define STAT_MODE_MASK 0x7 +#define FPGAMGR_CTRL 0x4 /* Control Register */ +#define CTRL_AXICFGEN (1 << 8) +#define CTRL_CDRATIO_MASK 0x3 +#define CTRL_CDRATIO_SHIFT 6 +#define CTRL_CFGWDTH_MASK 1 +#define CTRL_CFGWDTH_SHIFT 9 +#define CTRL_NCONFIGPULL (1 << 2) +#define CTRL_NCE (1 << 1) +#define CTRL_EN (1 << 0) +#define FPGAMGR_DCLKCNT 0x8 /* DCLK Count Register */ +#define FPGAMGR_DCLKSTAT 0xC /* DCLK Status Register */ +#define FPGAMGR_GPO 0x10 /* General-Purpose Output Register */ +#define FPGAMGR_GPI 0x14 /* General-Purpose Input Register */ +#define FPGAMGR_MISCI 0x18 /* Miscellaneous Input Register */ + +/* Configuration Monitor (MON) Registers */ +#define GPIO_INTEN 0x830 /* Interrupt Enable Register */ +#define GPIO_INTMASK 0x834 /* Interrupt Mask Register */ +#define GPIO_INTTYPE_LEVEL 0x838 /* Interrupt Level Register */ +#define GPIO_INT_POLARITY 0x83C /* Interrupt Polarity Register */ +#define GPIO_INTSTATUS 0x840 /* Interrupt Status Register */ +#define GPIO_RAW_INTSTATUS 0x844 /* Raw Interrupt Status Register */ +#define GPIO_PORTA_EOI 0x84C /* Clear Interrupt Register */ +#define PORTA_EOI_NS (1 << 0) +#define GPIO_EXT_PORTA 0x850 /* External Port A Register */ +#define GPIO_LS_SYNC 0x860 /* Synchronization Level Register */ +#define GPIO_VER_ID_CODE 0x86C /* GPIO Version Register */ +#define GPIO_CONFIG_REG2 0x870 /* Configuration Register 2 */ +#define GPIO_CONFIG_REG1 0x874 /* Configuration Register 1 */ + +#define MSEL_PP16_FAST_NOAES_NODC 0x0 +#define MSEL_PP16_FAST_AES_NODC 0x1 +#define MSEL_PP16_FAST_AESOPT_DC 0x2 +#define MSEL_PP16_SLOW_NOAES_NODC 0x4 +#define MSEL_PP16_SLOW_AES_NODC 0x5 +#define MSEL_PP16_SLOW_AESOPT_DC 0x6 +#define MSEL_PP32_FAST_NOAES_NODC 0x8 +#define MSEL_PP32_FAST_AES_NODC 0x9 +#define MSEL_PP32_FAST_AESOPT_DC 0xa +#define MSEL_PP32_SLOW_NOAES_NODC 0xc +#define MSEL_PP32_SLOW_AES_NODC 0xd +#define MSEL_PP32_SLOW_AESOPT_DC 0xe + +#define CFGWDTH_16 0 +#define CFGWDTH_32 1 + +#define CDRATIO_1 0 +#define CDRATIO_2 1 +#define CDRATIO_4 2 +#define CDRATIO_8 3 + +#define FPGAMGR_MODE_POWEROFF 0x0 +#define FPGAMGR_MODE_RESET 0x1 +#define FPGAMGR_MODE_CONFIG 0x2 +#define FPGAMGR_MODE_INIT 0x3 +#define FPGAMGR_MODE_USER 0x4 + +struct cfgmgr_mode { + int msel; + int cfgwdth; + int cdratio; +}; + +static struct cfgmgr_mode cfgmgr_modes[] = { + { MSEL_PP16_FAST_NOAES_NODC, CFGWDTH_16, CDRATIO_1 }, + { MSEL_PP16_FAST_AES_NODC, CFGWDTH_16, CDRATIO_2 }, + { MSEL_PP16_FAST_AESOPT_DC, CFGWDTH_16, CDRATIO_4 }, + { MSEL_PP16_SLOW_NOAES_NODC, CFGWDTH_16, CDRATIO_1 }, + { MSEL_PP16_SLOW_AES_NODC, CFGWDTH_16, CDRATIO_2 }, + { MSEL_PP16_SLOW_AESOPT_DC, CFGWDTH_16, CDRATIO_4 }, + { MSEL_PP32_FAST_NOAES_NODC, CFGWDTH_32, CDRATIO_1 }, + { MSEL_PP32_FAST_AES_NODC, CFGWDTH_32, CDRATIO_4 }, + { MSEL_PP32_FAST_AESOPT_DC, CFGWDTH_32, CDRATIO_8 }, + { MSEL_PP32_SLOW_NOAES_NODC, CFGWDTH_32, CDRATIO_1 }, + { MSEL_PP32_SLOW_AES_NODC, CFGWDTH_32, CDRATIO_4 }, + { MSEL_PP32_SLOW_AESOPT_DC, CFGWDTH_32, CDRATIO_8 }, + { -1, -1, -1 }, +}; + +struct fpgamgr_softc { + struct resource *res[3]; + bus_space_tag_t bst; + bus_space_handle_t bsh; + bus_space_tag_t bst_data; + bus_space_handle_t bsh_data; + struct cdev *mgr_cdev; + device_t dev; +}; + +static struct resource_spec fpgamgr_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_MEMORY, 1, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { -1, 0 } +}; + +static int +fpgamgr_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "altr,fpga-mgr")) + return (ENXIO); + + device_set_desc(dev, "FPGA Manager"); + return (BUS_PROBE_DEFAULT); +} + +static int +fpgamgr_state_get(struct fpgamgr_softc *sc) +{ + int reg; + + reg = READ4(sc, FPGAMGR_STAT); + reg >>= STAT_MODE_SHIFT; + reg &= STAT_MODE_MASK; + + return reg; +} + +static int +fpgamgr_state_wait(struct fpgamgr_softc *sc, int state) +{ + int tout; + + tout = 1000; + while (tout > 0) { + if (fpgamgr_state_get(sc) == state) + break; + tout--; + DELAY(10); + } + if (tout == 0) { + return (1); + } + + return (0); +} + +static int +fpga_open(struct cdev *dev __unused, int flags __unused, + int fmt __unused, struct thread *td __unused) +{ + struct fpgamgr_softc *sc; + struct cfgmgr_mode *mode; + int msel; + int reg; + int i; + + sc = dev->si_drv1; + + msel = READ4(sc, FPGAMGR_STAT); + msel >>= STAT_MSEL_SHIFT; + msel &= STAT_MSEL_MASK; + + mode = NULL; + for (i = 0; cfgmgr_modes[i].msel != -1; i++) { + if (msel == cfgmgr_modes[i].msel) { + mode = &cfgmgr_modes[i]; + break; + } + } + if (mode == NULL) { + device_printf(sc->dev, "Can't configure: unknown mode\n"); + return (ENXIO); + } + + reg = READ4(sc, FPGAMGR_CTRL); + reg &= ~(CTRL_CDRATIO_MASK << CTRL_CDRATIO_SHIFT); + reg |= (mode->cdratio << CTRL_CDRATIO_SHIFT); + reg &= ~(CTRL_CFGWDTH_MASK << CTRL_CFGWDTH_SHIFT); + reg |= (mode->cfgwdth << CTRL_CFGWDTH_SHIFT); + reg &= ~(CTRL_NCE); + WRITE4(sc, FPGAMGR_CTRL, reg); + + /* Enable configuration */ + reg = READ4(sc, FPGAMGR_CTRL); + reg |= (CTRL_EN); + WRITE4(sc, FPGAMGR_CTRL, reg); + + /* Reset FPGA */ + reg = READ4(sc, FPGAMGR_CTRL); + reg |= (CTRL_NCONFIGPULL); + WRITE4(sc, FPGAMGR_CTRL, reg); + + /* Wait reset state */ + if (fpgamgr_state_wait(sc, FPGAMGR_MODE_RESET)) { + device_printf(sc->dev, "Can't get RESET state\n"); + return (ENXIO); + } + + /* Release from reset */ + reg = READ4(sc, FPGAMGR_CTRL); + reg &= ~(CTRL_NCONFIGPULL); + WRITE4(sc, FPGAMGR_CTRL, reg); + + if (fpgamgr_state_wait(sc, FPGAMGR_MODE_CONFIG)) { + device_printf(sc->dev, "Can't get CONFIG state\n"); + return (ENXIO); + } + + /* Clear nSTATUS edge interrupt */ + WRITE4(sc, GPIO_PORTA_EOI, PORTA_EOI_NS); + + /* Enter configuration state */ + reg = READ4(sc, FPGAMGR_CTRL); + reg |= (CTRL_AXICFGEN); + WRITE4(sc, FPGAMGR_CTRL, reg); + + return (0); +} + +static int +fpga_wait_dclk_pulses(struct fpgamgr_softc *sc, int npulses) +{ + int tout; + + /* Clear done bit, if any */ + if (READ4(sc, FPGAMGR_DCLKSTAT) != 0) + WRITE4(sc, FPGAMGR_DCLKSTAT, 0x1); + + /* Request DCLK pulses */ + WRITE4(sc, FPGAMGR_DCLKCNT, npulses); + + /* Wait finish */ + tout = 1000; + while (tout > 0) { + if (READ4(sc, FPGAMGR_DCLKSTAT) == 1) { + WRITE4(sc, FPGAMGR_DCLKSTAT, 0x1); + break; + } + tout--; + DELAY(10); + } + if (tout == 0) { + return (1); + } + + return (0); +} + +static int +fpga_close(struct cdev *dev __unused, int flags __unused, + int fmt __unused, struct thread *td __unused) +{ + struct fpgamgr_softc *sc; + int reg; + + sc = dev->si_drv1; + + reg = READ4(sc, GPIO_EXT_PORTA); + if ((reg & (1 << 10)) == 0) { + device_printf(sc->dev, "Err: configuration failed\n"); + return (ENXIO); + } + + /* Exit configuration state */ + reg = READ4(sc, FPGAMGR_CTRL); + reg &= ~(CTRL_AXICFGEN); + WRITE4(sc, FPGAMGR_CTRL, reg); + + /* Wait dclk pulses */ + if (fpga_wait_dclk_pulses(sc, 4)) { + device_printf(sc->dev, "Can't proceed 4 dclk pulses\n"); + return (ENXIO); + } + + if (fpgamgr_state_wait(sc, FPGAMGR_MODE_USER)) { + device_printf(sc->dev, "Can't get USER mode\n"); + return (ENXIO); + } + + /* Disable configuration */ + reg = READ4(sc, FPGAMGR_CTRL); + reg &= ~(CTRL_EN); + WRITE4(sc, FPGAMGR_CTRL, reg); + + return (0); +} + +static int +fpga_write(struct cdev *dev, struct uio *uio, int ioflag) +{ + struct fpgamgr_softc *sc; + int buffer; + + sc = dev->si_drv1; + + /* + * Device supports 4-byte copy only. + * TODO: add padding for <4 bytes. + */ + + while (uio->uio_resid > 0) { + uiomove(&buffer, 4, uio); + bus_space_write_4(sc->bst_data, sc->bsh_data, + 0x0, buffer); + } + + return (0); +} + +static int +fpga_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, + struct thread *td) +{ + + return (0); +} + +static struct cdevsw fpga_cdevsw = { + .d_version = D_VERSION, + .d_open = fpga_open, + .d_close = fpga_close, + .d_write = fpga_write, + .d_ioctl = fpga_ioctl, + .d_name = "FPGA Manager", +}; + +static int +fpgamgr_attach(device_t dev) +{ + struct fpgamgr_softc *sc; + + sc = device_get_softc(dev); + sc->dev = dev; + + if (bus_alloc_resources(dev, fpgamgr_spec, sc->res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + /* Memory interface */ + sc->bst = rman_get_bustag(sc->res[0]); + sc->bsh = rman_get_bushandle(sc->res[0]); + sc->bst_data = rman_get_bustag(sc->res[1]); + sc->bsh_data = rman_get_bushandle(sc->res[1]); + + sc->mgr_cdev = make_dev(&fpga_cdevsw, 0, UID_ROOT, GID_WHEEL, + 0600, "fpga%d", device_get_unit(sc->dev)); + + if (sc->mgr_cdev == NULL) { + device_printf(dev, "Failed to create character device.\n"); + return (ENXIO); + } + + sc->mgr_cdev->si_drv1 = sc; + + return (0); +} + +static device_method_t fpgamgr_methods[] = { + DEVMETHOD(device_probe, fpgamgr_probe), + DEVMETHOD(device_attach, fpgamgr_attach), + { 0, 0 } +}; + +static driver_t fpgamgr_driver = { + "fpgamgr", + fpgamgr_methods, + sizeof(struct fpgamgr_softc), +}; + +static devclass_t fpgamgr_devclass; + +DRIVER_MODULE(fpgamgr, simplebus, fpgamgr_driver, fpgamgr_devclass, 0, 0); Modified: head/sys/boot/fdt/dts/arm/socfpga.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/socfpga.dtsi Sat Sep 6 04:39:26 2014 (r271185) +++ head/sys/boot/fdt/dts/arm/socfpga.dtsi Sat Sep 6 08:48:57 2014 (r271186) @@ -69,6 +69,14 @@ interrupt-parent = < &GIC >; }; + fpgamgr: fpgamgr@ff706000 { + compatible = "altr,fpga-mgr"; + reg = <0xff706000 0x1000>, /* FPGAMGRREGS */ + <0xffb90000 0x1000>; /* FPGAMGRDATA */ + interrupts = < 207 >; + interrupt-parent = <&GIC>; + }; + serial0: serial@ffc02000 { compatible = "ns16550"; reg = <0xffc02000 0x1000>; From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 09:03:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1EE944DE; Sat, 6 Sep 2014 09:03:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A0391AEB; Sat, 6 Sep 2014 09:03:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8693DiY075544; Sat, 6 Sep 2014 09:03:13 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8693DFV075543; Sat, 6 Sep 2014 09:03:13 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201409060903.s8693DFV075543@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sat, 6 Sep 2014 09:03:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271187 - head/usr.sbin/ctld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 09:03:14 -0000 Author: trasz Date: Sat Sep 6 09:03:13 2014 New Revision: 271187 URL: http://svnweb.freebsd.org/changeset/base/271187 Log: Avoid ctld(8) crash on getaddrinfo(3) failure. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/ctld/ctld.c Modified: head/usr.sbin/ctld/ctld.c ============================================================================== --- head/usr.sbin/ctld/ctld.c Sat Sep 6 08:48:57 2014 (r271186) +++ head/usr.sbin/ctld/ctld.c Sat Sep 6 09:03:13 2014 (r271187) @@ -561,8 +561,10 @@ portal_new(struct portal_group *pg) static void portal_delete(struct portal *portal) { + TAILQ_REMOVE(&portal->p_portal_group->pg_portals, portal, p_next); - freeaddrinfo(portal->p_ai); + if (portal->p_ai != NULL) + freeaddrinfo(portal->p_ai); free(portal->p_listen); free(portal); } @@ -633,8 +635,7 @@ portal_group_add_listen(struct portal_gr arg = portal->p_listen; if (arg[0] == '\0') { log_warnx("empty listen address"); - free(portal->p_listen); - free(portal); + portal_delete(portal); return (1); } if (arg[0] == '[') { @@ -646,8 +647,7 @@ portal_group_add_listen(struct portal_gr if (arg == NULL) { log_warnx("invalid listen address %s", portal->p_listen); - free(portal->p_listen); - free(portal); + portal_delete(portal); return (1); } if (arg[0] == '\0') { @@ -657,8 +657,7 @@ portal_group_add_listen(struct portal_gr } else { log_warnx("invalid listen address %s", portal->p_listen); - free(portal->p_listen); - free(portal); + portal_delete(portal); return (1); } } else { @@ -691,8 +690,7 @@ portal_group_add_listen(struct portal_gr if (error != 0) { log_warnx("getaddrinfo for %s failed: %s", portal->p_listen, gai_strerror(error)); - free(portal->p_listen); - free(portal); + portal_delete(portal); return (1); } From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 10:45:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6637911B; Sat, 6 Sep 2014 10:45:31 +0000 (UTC) Received: from nibbler.fubar.geek.nz (nibbler.fubar.geek.nz [199.48.134.198]) by mx1.freebsd.org (Postfix) with ESMTP id 22D3914B2; Sat, 6 Sep 2014 10:45:30 +0000 (UTC) Received: from bender.lan (97e07ab1.skybroadband.com [151.224.122.177]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id 9B6875CBF4; Sat, 6 Sep 2014 10:45:20 +0000 (UTC) Date: Sat, 6 Sep 2014 11:45:14 +0100 From: Andrew Turner To: Ruslan Bukin Subject: Re: svn commit: r271186 - in head/sys: arm/altera/socfpga boot/fdt/dts/arm Message-ID: <20140906114514.5c9f7223@bender.lan> In-Reply-To: <201409060848.s868mwgm066917@svn.freebsd.org> References: <201409060848.s868mwgm066917@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 10:45:31 -0000 On Sat, 6 Sep 2014 08:48:58 +0000 (UTC) Ruslan Bukin wrote: > Author: br > Date: Sat Sep 6 08:48:57 2014 > New Revision: 271186 > URL: http://svnweb.freebsd.org/changeset/base/271186 > > Log: > Add FPGA Manager driver. This driver allows to program FPGA core > from FreeBSD userspace running on ARM core. A few comments below. Andrew ... > Added: head/sys/arm/altera/socfpga/socfpga_common.h > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is > newly added) +++ head/sys/arm/altera/socfpga/socfpga_common.h > Sat Sep 6 08:48:57 2014 (r271186) @@ -0,0 +1,44 @@ > +/*- > + * Copyright (c) 2014 Ruslan Bukin > + * All rights reserved. > + * > + * This software was developed by SRI International and the > University of > + * Cambridge Computer Laboratory under DARPA/AFRL contract > (FA8750-10-C-0237) > + * ("CTSRD"), as part of the DARPA CRASH research programme. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above > copyright > + * notice, this list of conditions and the following disclaimer > in the > + * documentation and/or other materials provided with the > distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS > IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, > THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A > PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE > LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE > GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS > INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN > ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE > POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +#define READ4(_sc, _reg) \ > + bus_space_read_4(_sc->bst, _sc->bsh, _reg) > +#define WRITE4(_sc, _reg, _val) \ > + bus_space_write_4(_sc->bst, _sc->bsh, _reg, _val) > +#define READ2(_sc, _reg) \ > + bus_space_read_2(_sc->bst, _sc->bsh, _reg) > +#define WRITE2(_sc, _reg, _val) \ > + bus_space_write_2(_sc->bst, _sc->bsh, _reg, _val) > +#define READ1(_sc, _reg) \ > + bus_space_read_1(_sc->bst, _sc->bsh, _reg) > +#define WRITE1(_sc, _reg, _val) \ > + bus_space_write_1(_sc->bst, _sc->bsh, _reg, _val) Why are these in a header when the softc is in a .c file? Also why not use bus_read_n, e.g. READ4 would become: #define READ4(_sc, _reg) bus_read_4((_sc)->res[0], _reg) > > Added: head/sys/arm/altera/socfpga/socfpga_manager.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is > newly added) +++ head/sys/arm/altera/socfpga/socfpga_manager.c > Sat Sep 6 08:48:57 2014 (r271186) @@ -0,0 +1,436 @@ > +/*- > + * Copyright (c) 2014 Ruslan Bukin > + * All rights reserved. > + * > + * This software was developed by SRI International and the > University of > + * Cambridge Computer Laboratory under DARPA/AFRL contract > (FA8750-10-C-0237) > + * ("CTSRD"), as part of the DARPA CRASH research programme. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above > copyright > + * notice, this list of conditions and the following disclaimer > in the > + * documentation and/or other materials provided with the > distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS > IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, > THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A > PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE > LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE > GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS > INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN > CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN > ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE > POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +/* > + * Altera FPGA Manager. > + * Chapter 4, Cyclone V Device Handbook (CV-5V2 2014.07.22) > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > + > +#include > + > +/* FPGA Manager Module Registers */ > +#define FPGAMGR_STAT 0x0 /* Status > Register */ +#define STAT_MSEL_MASK 0x1f > +#define STAT_MSEL_SHIFT 3 > +#define STAT_MODE_SHIFT 0 > +#define STAT_MODE_MASK 0x7 > +#define FPGAMGR_CTRL 0x4 /* Control > Register */ +#define CTRL_AXICFGEN (1 << 8) > +#define CTRL_CDRATIO_MASK 0x3 > +#define CTRL_CDRATIO_SHIFT 6 > +#define CTRL_CFGWDTH_MASK 1 > +#define CTRL_CFGWDTH_SHIFT 9 > +#define CTRL_NCONFIGPULL (1 << 2) > +#define CTRL_NCE (1 << 1) > +#define CTRL_EN (1 << 0) > +#define FPGAMGR_DCLKCNT 0x8 /* DCLK > Count Register */ +#define FPGAMGR_DCLKSTAT > 0xC /* DCLK Status Register */ +#define > FPGAMGR_GPO 0x10 /* General-Purpose Output > Register */ +#define FPGAMGR_GPI 0x14 /* > General-Purpose Input Register */ +#define > FPGAMGR_MISCI 0x18 /* Miscellaneous Input > Register */ + +/* Configuration Monitor (MON) Registers */ > +#define GPIO_INTEN 0x830 /* Interrupt > Enable Register */ +#define GPIO_INTMASK > 0x834 /* Interrupt Mask Register */ +#define > GPIO_INTTYPE_LEVEL 0x838 /* Interrupt Level Register */ > +#define GPIO_INT_POLARITY 0x83C /* Interrupt > Polarity Register */ +#define GPIO_INTSTATUS > 0x840 /* Interrupt Status Register */ +#define > GPIO_RAW_INTSTATUS 0x844 /* Raw Interrupt Status > Register */ +#define GPIO_PORTA_EOI > 0x84C /* Clear Interrupt Register */ +#define > PORTA_EOI_NS (1 << 0) +#define > GPIO_EXT_PORTA 0x850 /* External Port A > Register */ +#define GPIO_LS_SYNC > 0x860 /* Synchronization Level Register */ +#define > GPIO_VER_ID_CODE 0x86C /* GPIO Version Register */ > +#define GPIO_CONFIG_REG2 0x870 /* Configuration > Register 2 */ +#define GPIO_CONFIG_REG1 0x874 /* > Configuration Register 1 */ + +#define > MSEL_PP16_FAST_NOAES_NODC 0x0 +#define > MSEL_PP16_FAST_AES_NODC 0x1 +#define > MSEL_PP16_FAST_AESOPT_DC 0x2 +#define > MSEL_PP16_SLOW_NOAES_NODC 0x4 +#define > MSEL_PP16_SLOW_AES_NODC 0x5 +#define > MSEL_PP16_SLOW_AESOPT_DC 0x6 +#define > MSEL_PP32_FAST_NOAES_NODC 0x8 +#define > MSEL_PP32_FAST_AES_NODC 0x9 +#define > MSEL_PP32_FAST_AESOPT_DC 0xa +#define > MSEL_PP32_SLOW_NOAES_NODC 0xc +#define > MSEL_PP32_SLOW_AES_NODC 0xd +#define > MSEL_PP32_SLOW_AESOPT_DC 0xe + +#define > CFGWDTH_16 0 +#define CFGWDTH_32 1 + > +#define CDRATIO_1 0 +#define CDRATIO_2 1 > +#define CDRATIO_4 2 +#define CDRATIO_8 3 > + > +#define FPGAMGR_MODE_POWEROFF 0x0 > +#define FPGAMGR_MODE_RESET 0x1 > +#define FPGAMGR_MODE_CONFIG 0x2 > +#define FPGAMGR_MODE_INIT 0x3 > +#define FPGAMGR_MODE_USER 0x4 > + > +struct cfgmgr_mode { > + int msel; > + int cfgwdth; > + int cdratio; > +}; > + > +static struct cfgmgr_mode cfgmgr_modes[] = { > + { MSEL_PP16_FAST_NOAES_NODC, CFGWDTH_16, CDRATIO_1 }, > + { MSEL_PP16_FAST_AES_NODC, CFGWDTH_16, CDRATIO_2 }, > + { MSEL_PP16_FAST_AESOPT_DC, CFGWDTH_16, CDRATIO_4 }, > + { MSEL_PP16_SLOW_NOAES_NODC, CFGWDTH_16, CDRATIO_1 }, > + { MSEL_PP16_SLOW_AES_NODC, CFGWDTH_16, CDRATIO_2 }, > + { MSEL_PP16_SLOW_AESOPT_DC, CFGWDTH_16, CDRATIO_4 }, > + { MSEL_PP32_FAST_NOAES_NODC, CFGWDTH_32, CDRATIO_1 }, > + { MSEL_PP32_FAST_AES_NODC, CFGWDTH_32, CDRATIO_4 }, > + { MSEL_PP32_FAST_AESOPT_DC, CFGWDTH_32, CDRATIO_8 }, > + { MSEL_PP32_SLOW_NOAES_NODC, CFGWDTH_32, CDRATIO_1 }, > + { MSEL_PP32_SLOW_AES_NODC, CFGWDTH_32, CDRATIO_4 }, > + { MSEL_PP32_SLOW_AESOPT_DC, CFGWDTH_32, CDRATIO_8 }, > + { -1, -1, -1 }, > +}; > + > +struct fpgamgr_softc { > + struct resource *res[3]; > + bus_space_tag_t bst; > + bus_space_handle_t bsh; > + bus_space_tag_t bst_data; > + bus_space_handle_t bsh_data; > + struct cdev *mgr_cdev; > + device_t dev; > +}; > + > +static struct resource_spec fpgamgr_spec[] = { > + { SYS_RES_MEMORY, 0, RF_ACTIVE }, > + { SYS_RES_MEMORY, 1, RF_ACTIVE }, > + { SYS_RES_IRQ, 0, RF_ACTIVE }, > + { -1, 0 } > +}; > + > +static int > +fpgamgr_probe(device_t dev) You have probe here, but the attach function is a long way below? I normally look for the attach straight after probe as they are somewhat related. > +{ > + > + if (!ofw_bus_status_okay(dev)) > + return (ENXIO); > + > + if (!ofw_bus_is_compatible(dev, "altr,fpga-mgr")) > + return (ENXIO); > + > + device_set_desc(dev, "FPGA Manager"); > + return (BUS_PROBE_DEFAULT); > +} > + ... > + > +static int > +fpga_open(struct cdev *dev __unused, int flags __unused, dev is used. > + int fmt __unused, struct thread *td __unused) > +{ > + struct fpgamgr_softc *sc; > + struct cfgmgr_mode *mode; > + int msel; > + int reg; > + int i; > + > + sc = dev->si_drv1; Here > + > + msel = READ4(sc, FPGAMGR_STAT); > + msel >>= STAT_MSEL_SHIFT; > + msel &= STAT_MSEL_MASK; > + > + mode = NULL; > + for (i = 0; cfgmgr_modes[i].msel != -1; i++) { > + if (msel == cfgmgr_modes[i].msel) { > + mode = &cfgmgr_modes[i]; > + break; > + } > + } > + if (mode == NULL) { > + device_printf(sc->dev, "Can't configure: unknown > mode\n"); > + return (ENXIO); > + } > + > + reg = READ4(sc, FPGAMGR_CTRL); > + reg &= ~(CTRL_CDRATIO_MASK << CTRL_CDRATIO_SHIFT); > + reg |= (mode->cdratio << CTRL_CDRATIO_SHIFT); > + reg &= ~(CTRL_CFGWDTH_MASK << CTRL_CFGWDTH_SHIFT); > + reg |= (mode->cfgwdth << CTRL_CFGWDTH_SHIFT); > + reg &= ~(CTRL_NCE); > + WRITE4(sc, FPGAMGR_CTRL, reg); > + > + /* Enable configuration */ > + reg = READ4(sc, FPGAMGR_CTRL); > + reg |= (CTRL_EN); > + WRITE4(sc, FPGAMGR_CTRL, reg); > + > + /* Reset FPGA */ > + reg = READ4(sc, FPGAMGR_CTRL); > + reg |= (CTRL_NCONFIGPULL); > + WRITE4(sc, FPGAMGR_CTRL, reg); > + > + /* Wait reset state */ > + if (fpgamgr_state_wait(sc, FPGAMGR_MODE_RESET)) { > + device_printf(sc->dev, "Can't get RESET state\n"); > + return (ENXIO); > + } > + > + /* Release from reset */ > + reg = READ4(sc, FPGAMGR_CTRL); > + reg &= ~(CTRL_NCONFIGPULL); > + WRITE4(sc, FPGAMGR_CTRL, reg); > + > + if (fpgamgr_state_wait(sc, FPGAMGR_MODE_CONFIG)) { > + device_printf(sc->dev, "Can't get CONFIG state\n"); > + return (ENXIO); > + } > + > + /* Clear nSTATUS edge interrupt */ > + WRITE4(sc, GPIO_PORTA_EOI, PORTA_EOI_NS); > + > + /* Enter configuration state */ > + reg = READ4(sc, FPGAMGR_CTRL); > + reg |= (CTRL_AXICFGEN); > + WRITE4(sc, FPGAMGR_CTRL, reg); > + > + return (0); > +} > + > +static int > +fpga_wait_dclk_pulses(struct fpgamgr_softc *sc, int npulses) > +{ > + int tout; > + > + /* Clear done bit, if any */ > + if (READ4(sc, FPGAMGR_DCLKSTAT) != 0) > + WRITE4(sc, FPGAMGR_DCLKSTAT, 0x1); > + > + /* Request DCLK pulses */ > + WRITE4(sc, FPGAMGR_DCLKCNT, npulses); > + > + /* Wait finish */ > + tout = 1000; > + while (tout > 0) { > + if (READ4(sc, FPGAMGR_DCLKSTAT) == 1) { > + WRITE4(sc, FPGAMGR_DCLKSTAT, 0x1); > + break; > + } > + tout--; > + DELAY(10); > + } > + if (tout == 0) { > + return (1); > + } > + > + return (0); > +} > + > +static int > +fpga_close(struct cdev *dev __unused, int flags __unused, dev is also used in this function. > + int fmt __unused, struct thread *td __unused) > +{ > + struct fpgamgr_softc *sc; > + int reg; > + > + sc = dev->si_drv1; > + > + reg = READ4(sc, GPIO_EXT_PORTA); > + if ((reg & (1 << 10)) == 0) { What is magic about bit 10? > + device_printf(sc->dev, "Err: configuration > failed\n"); > + return (ENXIO); > + } > + > + /* Exit configuration state */ > + reg = READ4(sc, FPGAMGR_CTRL); > + reg &= ~(CTRL_AXICFGEN); > + WRITE4(sc, FPGAMGR_CTRL, reg); > + > + /* Wait dclk pulses */ > + if (fpga_wait_dclk_pulses(sc, 4)) { > + device_printf(sc->dev, "Can't proceed 4 dclk > pulses\n"); > + return (ENXIO); > + } > + > + if (fpgamgr_state_wait(sc, FPGAMGR_MODE_USER)) { > + device_printf(sc->dev, "Can't get USER mode\n"); > + return (ENXIO); > + } > + > + /* Disable configuration */ > + reg = READ4(sc, FPGAMGR_CTRL); > + reg &= ~(CTRL_EN); > + WRITE4(sc, FPGAMGR_CTRL, reg); > + > + return (0); > +} > + > +static int > +fpga_write(struct cdev *dev, struct uio *uio, int ioflag) > +{ > + struct fpgamgr_softc *sc; > + int buffer; > + > + sc = dev->si_drv1; > + > + /* > + * Device supports 4-byte copy only. > + * TODO: add padding for <4 bytes. > + */ > + > + while (uio->uio_resid > 0) { > + uiomove(&buffer, 4, uio); > + bus_space_write_4(sc->bst_data, sc->bsh_data, > + 0x0, buffer); > + } > + > + return (0); > +} > + > +static int > +fpga_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, > + struct thread *td) > +{ > + > + return (0); > +} > + > +static struct cdevsw fpga_cdevsw = { > + .d_version = D_VERSION, > + .d_open = fpga_open, > + .d_close = fpga_close, > + .d_write = fpga_write, > + .d_ioctl = fpga_ioctl, > + .d_name = "FPGA Manager", > +}; > + > +static int > +fpgamgr_attach(device_t dev) > +{ > + struct fpgamgr_softc *sc; > + > + sc = device_get_softc(dev); > + sc->dev = dev; > + > + if (bus_alloc_resources(dev, fpgamgr_spec, sc->res)) { > + device_printf(dev, "could not allocate resources\n"); > + return (ENXIO); > + } > + > + /* Memory interface */ > + sc->bst = rman_get_bustag(sc->res[0]); > + sc->bsh = rman_get_bushandle(sc->res[0]); These are unneeded if you use bus_read_n/bus_write_n. > + sc->bst_data = rman_get_bustag(sc->res[1]); > + sc->bsh_data = rman_get_bushandle(sc->res[1]); > + > + sc->mgr_cdev = make_dev(&fpga_cdevsw, 0, UID_ROOT, GID_WHEEL, > + 0600, "fpga%d", device_get_unit(sc->dev)); > + > + if (sc->mgr_cdev == NULL) { > + device_printf(dev, "Failed to create character > device.\n"); > + return (ENXIO); > + } > + > + sc->mgr_cdev->si_drv1 = sc; > + > + return (0); > +} > + ... From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 11:19:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D093AE16; Sat, 6 Sep 2014 11:19:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC0091960; Sat, 6 Sep 2014 11:19:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86BJCE6037950; Sat, 6 Sep 2014 11:19:12 GMT (envelope-from joel@FreeBSD.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86BJCe6037949; Sat, 6 Sep 2014 11:19:12 GMT (envelope-from joel@FreeBSD.org) Message-Id: <201409061119.s86BJCe6037949@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: joel set sender to joel@FreeBSD.org using -f From: Joel Dahl Date: Sat, 6 Sep 2014 11:19:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271188 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 11:19:12 -0000 Author: joel (doc committer) Date: Sat Sep 6 11:19:12 2014 New Revision: 271188 URL: http://svnweb.freebsd.org/changeset/base/271188 Log: mdoc: remove superfluous paragraph macro. Modified: head/share/man/man4/uled.4 Modified: head/share/man/man4/uled.4 ============================================================================== --- head/share/man/man4/uled.4 Sat Sep 6 09:03:13 2014 (r271187) +++ head/share/man/man4/uled.4 Sat Sep 6 11:19:12 2014 (r271188) @@ -73,7 +73,6 @@ struct uled_color { uint8_t blue; }; .Ed -.Pp .It Dv ULED_SET_COLOR The command sets LED colors with values for RGB. It uses the same structure as above. From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 12:01:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93209C0B; Sat, 6 Sep 2014 12:01:37 +0000 (UTC) Received: from bsdpad.com (xc1.bsdpad.com [195.154.136.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 535EE1DD3; Sat, 6 Sep 2014 12:01:36 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bsdpad.com) by bsdpad.com with smtp (Exim 4.83 (FreeBSD)) (envelope-from ) id 1XQEfU-000GS5-1G; Sat, 06 Sep 2014 13:00:36 +0100 Received: by bsdpad.com (nbSMTP-1.00) for uid 1001 br@bsdpad.com; Sat, 6 Sep 2014 13:00:36 +0100 (BST) Date: Sat, 6 Sep 2014 13:00:35 +0100 From: Ruslan Bukin To: Andrew Turner Subject: Re: svn commit: r271186 - in head/sys: arm/altera/socfpga boot/fdt/dts/arm Message-ID: <20140906120035.GA62565@bsdpad.com> References: <201409060848.s868mwgm066917@svn.freebsd.org> <20140906114514.5c9f7223@bender.lan> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MGYHOYXEY6WxJCY8" Content-Disposition: inline In-Reply-To: <20140906114514.5c9f7223@bender.lan> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 12:01:37 -0000 --MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline On Sat, Sep 06, 2014 at 11:45:14AM +0100, Andrew Turner wrote: > > +#define WRITE1(_sc, _reg, _val) \ > > + bus_space_write_1(_sc->bst, _sc->bsh, _reg, _val) > > Why are these in a header when the softc is in a .c file? Also why not > use bus_read_n, e.g. READ4 would become: > > #define READ4(_sc, _reg) bus_read_4((_sc)->res[0], _reg) > > I want to use these defines in other socfpga drivers, so I leaved it in header file. Is that fine ? Excellent review, thanks. I've prepared the patch Ruslan --MGYHOYXEY6WxJCY8 Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="patch.socfpga.0" Index: sys/arm/altera/socfpga/socfpga_common.h =================================================================== --- sys/arm/altera/socfpga/socfpga_common.h (revision 271188) +++ sys/arm/altera/socfpga/socfpga_common.h (working copy) @@ -30,15 +30,9 @@ * $FreeBSD$ */ -#define READ4(_sc, _reg) \ - bus_space_read_4(_sc->bst, _sc->bsh, _reg) -#define WRITE4(_sc, _reg, _val) \ - bus_space_write_4(_sc->bst, _sc->bsh, _reg, _val) -#define READ2(_sc, _reg) \ - bus_space_read_2(_sc->bst, _sc->bsh, _reg) -#define WRITE2(_sc, _reg, _val) \ - bus_space_write_2(_sc->bst, _sc->bsh, _reg, _val) -#define READ1(_sc, _reg) \ - bus_space_read_1(_sc->bst, _sc->bsh, _reg) -#define WRITE1(_sc, _reg, _val) \ - bus_space_write_1(_sc->bst, _sc->bsh, _reg, _val) +#define READ4(_sc, _reg) bus_read_4((_sc)->res[0], _reg) +#define READ2(_sc, _reg) bus_read_2((_sc)->res[0], _reg) +#define READ1(_sc, _reg) bus_read_1((_sc)->res[0], _reg) +#define WRITE4(_sc, _reg, _val) bus_write_4((_sc)->res[0], _reg, _val) +#define WRITE2(_sc, _reg, _val) bus_write_2((_sc)->res[0], _reg, _val) +#define WRITE1(_sc, _reg, _val) bus_write_1((_sc)->res[0], _reg, _val) Index: sys/arm/altera/socfpga/socfpga_manager.c =================================================================== --- sys/arm/altera/socfpga/socfpga_manager.c (revision 271188) +++ sys/arm/altera/socfpga/socfpga_manager.c (working copy) @@ -91,6 +91,7 @@ #define GPIO_PORTA_EOI 0x84C /* Clear Interrupt Register */ #define PORTA_EOI_NS (1 << 0) #define GPIO_EXT_PORTA 0x850 /* External Port A Register */ +#define EXT_PORTA_CDP (1 << 10) /* Configuration done */ #define GPIO_LS_SYNC 0x860 /* Synchronization Level Register */ #define GPIO_VER_ID_CODE 0x86C /* GPIO Version Register */ #define GPIO_CONFIG_REG2 0x870 /* Configuration Register 2 */ @@ -147,8 +148,6 @@ struct fpgamgr_softc { struct resource *res[3]; - bus_space_tag_t bst; - bus_space_handle_t bsh; bus_space_tag_t bst_data; bus_space_handle_t bsh_data; struct cdev *mgr_cdev; @@ -163,20 +162,6 @@ }; static int -fpgamgr_probe(device_t dev) -{ - - if (!ofw_bus_status_okay(dev)) - return (ENXIO); - - if (!ofw_bus_is_compatible(dev, "altr,fpga-mgr")) - return (ENXIO); - - device_set_desc(dev, "FPGA Manager"); - return (BUS_PROBE_DEFAULT); -} - -static int fpgamgr_state_get(struct fpgamgr_softc *sc) { int reg; @@ -208,7 +193,7 @@ } static int -fpga_open(struct cdev *dev __unused, int flags __unused, +fpga_open(struct cdev *dev, int flags __unused, int fmt __unused, struct thread *td __unused) { struct fpgamgr_softc *sc; @@ -310,7 +295,7 @@ } static int -fpga_close(struct cdev *dev __unused, int flags __unused, +fpga_close(struct cdev *dev, int flags __unused, int fmt __unused, struct thread *td __unused) { struct fpgamgr_softc *sc; @@ -319,7 +304,7 @@ sc = dev->si_drv1; reg = READ4(sc, GPIO_EXT_PORTA); - if ((reg & (1 << 10)) == 0) { + if ((reg & EXT_PORTA_CDP) == 0) { device_printf(sc->dev, "Err: configuration failed\n"); return (ENXIO); } @@ -388,6 +373,20 @@ }; static int +fpgamgr_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "altr,fpga-mgr")) + return (ENXIO); + + device_set_desc(dev, "FPGA Manager"); + return (BUS_PROBE_DEFAULT); +} + +static int fpgamgr_attach(device_t dev) { struct fpgamgr_softc *sc; @@ -401,8 +400,6 @@ } /* Memory interface */ - sc->bst = rman_get_bustag(sc->res[0]); - sc->bsh = rman_get_bushandle(sc->res[0]); sc->bst_data = rman_get_bustag(sc->res[1]); sc->bsh_data = rman_get_bushandle(sc->res[1]); --MGYHOYXEY6WxJCY8-- From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 13:21:07 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C32E6EE; Sat, 6 Sep 2014 13:21:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2C2B179C; Sat, 6 Sep 2014 13:21:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86DL7SJ095887; Sat, 6 Sep 2014 13:21:07 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86DL7BA095886; Sat, 6 Sep 2014 13:21:07 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201409061321.s86DL7BA095886@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 6 Sep 2014 13:21:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271189 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 13:21:08 -0000 Author: andrew Date: Sat Sep 6 13:21:07 2014 New Revision: 271189 URL: http://svnweb.freebsd.org/changeset/base/271189 Log: Allow us to use the virtual timer. It is currently disabled, but should be usable as the default timer in place of the physical timer. We are guaranteed to have access to the virtual timer, but when running under a hypervisor may not have access to the physical. Differential Revision: https://reviews.freebsd.org/D588 Modified: head/sys/arm/arm/generic_timer.c Modified: head/sys/arm/arm/generic_timer.c ============================================================================== --- head/sys/arm/arm/generic_timer.c Sat Sep 6 11:19:12 2014 (r271188) +++ head/sys/arm/arm/generic_timer.c Sat Sep 6 13:21:07 2014 (r271189) @@ -67,7 +67,7 @@ __FBSDID("$FreeBSD$"); #define GT_CNTKCTL_PL0PTEN (1 << 9) /* PL0 Physical timer reg access */ #define GT_CNTKCTL_PL0VTEN (1 << 8) /* PL0 Virtual timer reg access */ -#define GT_CNTKCTL_EVNTI (1 << 4) /* Virtual counter event bits */ +#define GT_CNTKCTL_EVNTI (0xf << 4) /* Virtual counter event bits */ #define GT_CNTKCTL_EVNTDIR (1 << 3) /* Virtual counter event transition */ #define GT_CNTKCTL_EVNTEN (1 << 2) /* Enables virtual counter events */ #define GT_CNTKCTL_PL0VCTEN (1 << 1) /* PL0 CNTVCT and CNTFRQ access */ @@ -78,6 +78,7 @@ struct arm_tmr_softc { void *ihl[4]; uint32_t clkfreq; struct eventtimer et; + bool physical; }; static struct arm_tmr_softc *arm_tmr_sc = NULL; @@ -101,81 +102,83 @@ static struct timecounter arm_tmr_timeco .tc_quality = 1000, }; -static inline int +static int get_freq(void) { uint32_t val; + /* cntfrq */ __asm volatile("mrc p15, 0, %0, c14, c0, 0" : "=r" (val)); return (val); } -static inline int -set_freq(uint32_t val) -{ - - __asm volatile("mcr p15, 0, %[val], c14, c0, 0" : : - [val] "r" (val)); - isb(); - - return (val); -} - - -static inline long -get_cntpct(void) +static long +get_cntxct(bool physical) { uint64_t val; - __asm volatile("mrrc p15, 0, %Q0, %R0, c14" : "=r" (val)); + isb(); + if (physical) + /* cntpct */ + __asm volatile("mrrc p15, 0, %Q0, %R0, c14" : "=r" (val)); + else + /* cntvct */ + __asm volatile("mrrc p15, 1, %Q0, %R0, c14" : "=r" (val)); return (val); } -static inline int -set_ctrl(uint32_t val) +static int +set_ctrl(uint32_t val, bool physical) { - __asm volatile("mcr p15, 0, %[val], c14, c2, 1" : : - [val] "r" (val)); + if (physical) + /* cntp_ctl */ + __asm volatile("mcr p15, 0, %[val], c14, c2, 1" : : + [val] "r" (val)); + else + /* cntv_ctl */ + __asm volatile("mcr p15, 0, %[val], c14, c3, 1" : : + [val] "r" (val)); isb(); return (0); } -static inline int -set_tval(uint32_t val) +static int +set_tval(uint32_t val, bool physical) { - __asm volatile("mcr p15, 0, %[val], c14, c2, 0" : : - [val] "r" (val)); + if (physical) + /* cntp_tval */ + __asm volatile("mcr p15, 0, %[val], c14, c2, 0" : : + [val] "r" (val)); + else + /* cntv_tval */ + __asm volatile("mcr p15, 0, %[val], c14, c3, 0" : : + [val] "r" (val)); isb(); return (0); } -static inline int -get_ctrl(void) -{ - uint32_t val; - - __asm volatile("mrc p15, 0, %0, c14, c2, 1" : "=r" (val)); - - return (val); -} - -static inline int -get_tval(void) +static int +get_ctrl(bool physical) { uint32_t val; - __asm volatile("mrc p15, 0, %0, c14, c2, 0" : "=r" (val)); + if (physical) + /* cntp_ctl */ + __asm volatile("mrc p15, 0, %0, c14, c2, 1" : "=r" (val)); + else + /* cntv_ctl */ + __asm volatile("mrc p15, 0, %0, c14, c3, 1" : "=r" (val)); return (val); } -static inline void +static void disable_user_access(void) { uint32_t cntkctl; @@ -191,7 +194,7 @@ static unsigned arm_tmr_get_timecount(struct timecounter *tc) { - return (get_cntpct()); + return (get_cntxct(arm_tmr_sc->physical)); } static int @@ -204,11 +207,11 @@ arm_tmr_start(struct eventtimer *et, sbi if (first != 0) { counts = ((uint32_t)et->et_frequency * first) >> 32; - ctrl = get_ctrl(); + ctrl = get_ctrl(sc->physical); ctrl &= ~GT_CTRL_INT_MASK; ctrl |= GT_CTRL_ENABLE; - set_tval(counts); - set_ctrl(ctrl); + set_tval(counts, sc->physical); + set_ctrl(ctrl, sc->physical); return (0); } @@ -219,11 +222,14 @@ arm_tmr_start(struct eventtimer *et, sbi static int arm_tmr_stop(struct eventtimer *et) { + struct arm_tmr_softc *sc; int ctrl; - ctrl = get_ctrl(); + sc = (struct arm_tmr_softc *)et->et_priv; + + ctrl = get_ctrl(sc->physical); ctrl &= GT_CTRL_ENABLE; - set_ctrl(ctrl); + set_ctrl(ctrl, sc->physical); return (0); } @@ -235,10 +241,10 @@ arm_tmr_intr(void *arg) int ctrl; sc = (struct arm_tmr_softc *)arg; - ctrl = get_ctrl(); + ctrl = get_ctrl(sc->physical); if (ctrl & GT_CTRL_INT_STAT) { ctrl |= GT_CTRL_INT_MASK; - set_ctrl(ctrl); + set_ctrl(ctrl, sc->physical); } if (sc->et.et_active) @@ -295,12 +301,14 @@ arm_tmr_attach(device_t dev) if (bus_alloc_resources(dev, timer_spec, sc->res)) { device_printf(dev, "could not allocate resources\n"); return (ENXIO); - }; + } + + sc->physical = true; arm_tmr_sc = sc; - /* Setup secure and non-secure IRQs handler */ - for (i = 0; i < 2; i++) { + /* Setup secure, non-secure and virtual IRQs handler */ + for (i = 0; i < 3; i++) { error = bus_setup_intr(dev, sc->res[i], INTR_TYPE_CLK, arm_tmr_intr, NULL, sc, &sc->ihl[i]); if (error) { @@ -381,10 +389,10 @@ DELAY(int usec) else counts = usec * counts_per_usec; - first = get_cntpct(); + first = get_cntxct(arm_tmr_sc->physical); while (counts > 0) { - last = get_cntpct(); + last = get_cntxct(arm_tmr_sc->physical); counts -= (int32_t)(last - first); first = last; } From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 14:17:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 36A1E338; Sat, 6 Sep 2014 14:17:52 +0000 (UTC) Date: Sat, 6 Sep 2014 14:17:52 +0000 From: Alexey Dokuchaev To: Aleksandr Rybalko Subject: Re: svn commit: r271023 - stable/10/sys/dev/vt Message-ID: <20140906141752.GA45915@FreeBSD.org> References: <201409031400.s83E0bK6049810@svn.freebsd.org> <20140903140757.GA7494@FreeBSD.org> <20140903145753.GA25935@FreeBSD.org> <54082B57.6070007@FreeBSD.org> <20140905163433.GA80322@FreeBSD.org> <20140906014859.1c31f3aac5c84605ec6155dc@ddteam.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140906014859.1c31f3aac5c84605ec6155dc@ddteam.net> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "src-committers@freebsd.org" , Ed Maste , svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , svn-src-stable-10@freebsd.org, =?koi8-r?Q?Jean-S=E9bastien_P=E9dron?= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 14:17:52 -0000 On Sat, Sep 06, 2014 at 01:48:59AM +0300, Aleksandr Rybalko wrote: > On Fri, 5 Sep 2014 16:34:34 +0000 > Alexey Dokuchaev wrote: > > For quite a while (since I started using vt(4)) I'm observing a rather > > annoying thing: sometimes small area of screen would get selected like if > > pressed mouse button or something. If I do a long build on the console, > > periodically, white rectangle (selected area) will suddenly pop up and > > scroll away. Is this a known thing? It can be very annoying for text > > editing on the console, as these sporadic "selects" are overwriting my > > selection buffer contents with whatever was on the screen at that time > > when they suddenly appear. (Rat itself it motionless while it happens.) > > Yeah, it is known. It is due different logic than in syscons(4). vt(4) save > not skected text, but position inside history buffer. > Return to old (well known syscons(4)) behaviour is in TODO. Noted. It would be nice if vt(4) also regained syscons(4) feature of buffer pasting with Shift-Ins (right now I have to press the middle mouse button to do it). If you could also allow scrolling with Shift-PgUp/PgDn (akin to xterm), not just via pressing ScrollLock first, it would make vt(4) even more awesome. ./danfe From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 15:11:36 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2AC6BB0B; Sat, 6 Sep 2014 15:11:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F07241139; Sat, 6 Sep 2014 15:11:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86FBZP8050027; Sat, 6 Sep 2014 15:11:35 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86FBZAB050025; Sat, 6 Sep 2014 15:11:35 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409061511.s86FBZAB050025@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Sep 2014 15:11:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271190 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 15:11:36 -0000 Author: ian Date: Sat Sep 6 15:11:35 2014 New Revision: 271190 URL: http://svnweb.freebsd.org/changeset/base/271190 Log: Add OF_xref_from_node_strict() which returns -1 if there is no xref handle for the node. The default routine returns the untranslated handle, which is sometimes useful, but sometimes you really need to know there's no entry in the xref<->node<->device translation table. Modified: head/sys/dev/ofw/openfirm.c head/sys/dev/ofw/openfirm.h Modified: head/sys/dev/ofw/openfirm.c ============================================================================== --- head/sys/dev/ofw/openfirm.c Sat Sep 6 13:21:07 2014 (r271189) +++ head/sys/dev/ofw/openfirm.c Sat Sep 6 15:11:35 2014 (r271190) @@ -554,15 +554,15 @@ OF_node_from_xref(phandle_t xref) return (node); } -phandle_t -OF_xref_from_node(phandle_t node) +static phandle_t +xref_from_node(phandle_t node, phandle_t notfoundvalue) { struct xrefinfo *xi; phandle_t xref; if (xref_init_done) { if ((xi = xrefinfo_find(node, FIND_BY_NODE)) == NULL) - return (node); + return (notfoundvalue); return (xi->xref); } @@ -570,10 +570,24 @@ OF_xref_from_node(phandle_t node) -1 && OF_getencprop(node, "ibm,phandle", &xref, sizeof(xref)) == -1 && OF_getencprop(node, "linux,phandle", &xref, sizeof(xref)) == -1) - return (node); + return (notfoundvalue); return (xref); } +phandle_t +OF_xref_from_node(phandle_t node) +{ + + return (xref_from_node(node, node)); +} + +phandle_t +OF_xref_from_node_strict(phandle_t node) +{ + + return (xref_from_node(node, -1)); +} + device_t OF_device_from_xref(phandle_t xref) { Modified: head/sys/dev/ofw/openfirm.h ============================================================================== --- head/sys/dev/ofw/openfirm.h Sat Sep 6 13:21:07 2014 (r271189) +++ head/sys/dev/ofw/openfirm.h Sat Sep 6 15:11:35 2014 (r271190) @@ -128,10 +128,12 @@ ssize_t OF_package_to_path(phandle_t no * Some OF implementations (IBM, FDT) have a concept of effective phandles * used for device-tree cross-references. Given one of these, returns the * real phandle. If one can't be found (or running on OF implementations - * without this property), returns its input. + * without this property), OF_xref_from_node() returns its input, while the + * strict version returns -1. */ phandle_t OF_node_from_xref(phandle_t xref); phandle_t OF_xref_from_node(phandle_t node); +phandle_t OF_xref_from_node_strict(phandle_t node); /* * When properties contain references to other nodes using xref handles it is From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 15:15:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9158C5A; Sat, 6 Sep 2014 15:15:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B43421151; Sat, 6 Sep 2014 15:15:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86FF69t051436; Sat, 6 Sep 2014 15:15:06 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86FF6jF051435; Sat, 6 Sep 2014 15:15:06 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409061515.s86FF6jF051435@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 6 Sep 2014 15:15:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271191 - stable/10/sys/i386/i386 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 15:15:06 -0000 Author: jhb Date: Sat Sep 6 15:15:06 2014 New Revision: 271191 URL: http://svnweb.freebsd.org/changeset/base/271191 Log: MFC 270826: MFamd64: Add a machdep.bootmethod sysctl to inform the installer which firmware method was used for booting. This is hardcoded to BIOS on i386. PR: 192962 Approved by: re (gjb) Modified: stable/10/sys/i386/i386/machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/i386/i386/machdep.c ============================================================================== --- stable/10/sys/i386/i386/machdep.c Sat Sep 6 15:11:35 2014 (r271190) +++ stable/10/sys/i386/i386/machdep.c Sat Sep 6 15:15:06 2014 (r271191) @@ -1636,6 +1636,10 @@ u_long bootdev; /* not a struct cdev *- SYSCTL_ULONG(_machdep, OID_AUTO, guessed_bootdev, CTLFLAG_RD, &bootdev, 0, "Maybe the Boot device (not in struct cdev *format)"); +static char bootmethod[16] = "BIOS"; +SYSCTL_STRING(_machdep, OID_AUTO, bootmethod, CTLFLAG_RD, bootmethod, 0, + "System firmware boot method"); + /* * Initialize 386 and configure to run kernel */ From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 15:23:31 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1352DFDC; Sat, 6 Sep 2014 15:23:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1661127D; Sat, 6 Sep 2014 15:23:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86FNUK5055962; Sat, 6 Sep 2014 15:23:30 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86FNSbY055950; Sat, 6 Sep 2014 15:23:28 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409061523.s86FNSbY055950@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 6 Sep 2014 15:23:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271192 - in head/sys: amd64/amd64 amd64/include dev/acpica i386/i386 i386/include sparc64/pci x86/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 15:23:31 -0000 Author: jhb Date: Sat Sep 6 15:23:28 2014 New Revision: 271192 URL: http://svnweb.freebsd.org/changeset/base/271192 Log: Create a separate structure for per-CPU state saved across suspend and resume that is a superset of a pcb. Move the FPU state out of the pcb and into this new structure. As part of this, move the FPU resume code on amd64 into a C function. This allows resumectx() to still operate only on a pcb and more closely mirrors the i386 code. Reviewed by: kib (earlier version) Modified: head/sys/amd64/amd64/cpu_switch.S head/sys/amd64/amd64/fpu.c head/sys/amd64/amd64/genassym.c head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/include/fpu.h head/sys/amd64/include/pcb.h head/sys/dev/acpica/acpi.c head/sys/i386/i386/mp_machdep.c head/sys/i386/include/pcb.h head/sys/sparc64/pci/psycho.c head/sys/x86/acpica/acpi_wakeup.c Modified: head/sys/amd64/amd64/cpu_switch.S ============================================================================== --- head/sys/amd64/amd64/cpu_switch.S Sat Sep 6 15:15:06 2014 (r271191) +++ head/sys/amd64/amd64/cpu_switch.S Sat Sep 6 15:23:28 2014 (r271192) @@ -399,10 +399,6 @@ ENTRY(savectx) rdmsr movl %eax,PCB_SFMASK(%rdi) movl %edx,PCB_SFMASK+4(%rdi) - movl xsave_mask,%eax - movl %eax,PCB_XSMASK(%rdi) - movl xsave_mask+4,%eax - movl %eax,PCB_XSMASK+4(%rdi) sgdt PCB_GDT(%rdi) sidt PCB_IDT(%rdi) @@ -467,12 +463,9 @@ ENTRY(resumectx) movl PCB_SFMASK(%rdi),%eax wrmsr - /* Restore CR0 except for FPU mode. */ + /* Restore CR0, CR2, CR4 and CR3. */ movq PCB_CR0(%rdi),%rax - andq $~(CR0_EM | CR0_TS),%rax movq %rax,%cr0 - - /* Restore CR2, CR4 and CR3. */ movq PCB_CR2(%rdi),%rax movq %rax,%cr2 movq PCB_CR4(%rdi),%rax @@ -510,26 +503,6 @@ ENTRY(resumectx) movq PCB_DR7(%rdi),%rax movq %rax,%dr7 - /* Restore FPU state. */ - fninit - movq PCB_FPUSUSPEND(%rdi),%rbx - movq PCB_XSMASK(%rdi),%rax - testq %rax,%rax - jz 1f - movq %rax,%rdx - shrq $32,%rdx - movl $XCR0,%ecx - xsetbv - xrstor (%rbx) - jmp 2f -1: - fxrstor (%rbx) -2: - - /* Reload CR0. */ - movq PCB_CR0(%rdi),%rax - movq %rax,%cr0 - /* Restore other callee saved registers. */ movq PCB_R15(%rdi),%r15 movq PCB_R14(%rdi),%r14 Modified: head/sys/amd64/amd64/fpu.c ============================================================================== --- head/sys/amd64/amd64/fpu.c Sat Sep 6 15:15:06 2014 (r271191) +++ head/sys/amd64/amd64/fpu.c Sat Sep 6 15:23:28 2014 (r271192) @@ -173,6 +173,20 @@ fpususpend(void *addr) load_cr0(cr0); } +void +fpuresume(void *addr) +{ + u_long cr0; + + cr0 = rcr0(); + stop_emulating(); + fninit(); + if (use_xsave) + load_xcr(XCR0, xsave_mask); + fpurestore(addr); + load_cr0(cr0); +} + /* * Enable XSAVE if supported and allowed by user. * Calculate the xsave_mask. Modified: head/sys/amd64/amd64/genassym.c ============================================================================== --- head/sys/amd64/amd64/genassym.c Sat Sep 6 15:15:06 2014 (r271191) +++ head/sys/amd64/amd64/genassym.c Sat Sep 6 15:23:28 2014 (r271192) @@ -163,8 +163,6 @@ ASSYM(PCB_STAR, offsetof(struct pcb, pcb ASSYM(PCB_LSTAR, offsetof(struct pcb, pcb_lstar)); ASSYM(PCB_CSTAR, offsetof(struct pcb, pcb_cstar)); ASSYM(PCB_SFMASK, offsetof(struct pcb, pcb_sfmask)); -ASSYM(PCB_XSMASK, offsetof(struct pcb, pcb_xsmask)); -ASSYM(PCB_FPUSUSPEND, offsetof(struct pcb, pcb_fpususpend)); ASSYM(PCB_SIZE, sizeof(struct pcb)); ASSYM(PCB_FULL_IRET, PCB_FULL_IRET); ASSYM(PCB_DBREGS, PCB_DBREGS); Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Sat Sep 6 15:15:06 2014 (r271191) +++ head/sys/amd64/amd64/mp_machdep.c Sat Sep 6 15:23:28 2014 (r271192) @@ -102,7 +102,7 @@ char *nmi_stack; void *dpcpu; struct pcb stoppcbs[MAXCPU]; -struct pcb **susppcbs; +struct susppcb **susppcbs; /* Variables needed for SMP tlb shootdown. */ vm_offset_t smp_tlb_addr2; @@ -1461,11 +1461,12 @@ cpususpend_handler(void) mtx_assert(&smp_ipi_mtx, MA_NOTOWNED); cpu = PCPU_GET(cpuid); - if (savectx(susppcbs[cpu])) { - fpususpend(susppcbs[cpu]->pcb_fpususpend); + if (savectx(&susppcbs[cpu]->sp_pcb)) { + fpususpend(susppcbs[cpu]->sp_fpususpend); wbinvd(); CPU_SET_ATOMIC(cpu, &suspended_cpus); } else { + fpuresume(susppcbs[cpu]->sp_fpususpend); pmap_init_pat(); initializecpu(); PCPU_SET(switchtime, 0); Modified: head/sys/amd64/include/fpu.h ============================================================================== --- head/sys/amd64/include/fpu.h Sat Sep 6 15:15:06 2014 (r271191) +++ head/sys/amd64/include/fpu.h Sat Sep 6 15:23:28 2014 (r271192) @@ -58,6 +58,7 @@ int fpuformat(void); int fpugetregs(struct thread *td); void fpuinit(void); void fpurestore(void *addr); +void fpuresume(void *addr); void fpusave(void *addr); int fpusetregs(struct thread *td, struct savefpu *addr, char *xfpustate, size_t xfpustate_size); Modified: head/sys/amd64/include/pcb.h ============================================================================== --- head/sys/amd64/include/pcb.h Sat Sep 6 15:15:06 2014 (r271191) +++ head/sys/amd64/include/pcb.h Sat Sep 6 15:23:28 2014 (r271192) @@ -97,14 +97,18 @@ struct pcb { register_t pcb_lstar; register_t pcb_cstar; register_t pcb_sfmask; - register_t pcb_xsmask; - - /* fpu context for suspend/resume */ - void *pcb_fpususpend; struct savefpu *pcb_save; - uint64_t pcb_pad[3]; + uint64_t pcb_pad[5]; +}; + +/* Per-CPU state saved during suspend and resume. */ +struct susppcb { + struct pcb sp_pcb; + + /* fpu context for suspend/resume */ + void *sp_fpususpend; }; #endif Modified: head/sys/dev/acpica/acpi.c ============================================================================== --- head/sys/dev/acpica/acpi.c Sat Sep 6 15:15:06 2014 (r271191) +++ head/sys/dev/acpica/acpi.c Sat Sep 6 15:23:28 2014 (r271192) @@ -1211,6 +1211,11 @@ acpi_set_resource(device_t dev, device_t if (!(type == SYS_RES_IOPORT && start == CONF1_ADDR_PORT)) #endif { + if (bootverbose) + device_printf(dev, + "Ignoring %s range %#lx-%#lx for %s\n", + type == SYS_RES_MEMORY ? "memory" : "I/O", + start, start + count - 1, acpi_name(ad->ad_handle)); AcpiOsFree(devinfo); return (0); } Modified: head/sys/i386/i386/mp_machdep.c ============================================================================== --- head/sys/i386/i386/mp_machdep.c Sat Sep 6 15:15:06 2014 (r271191) +++ head/sys/i386/i386/mp_machdep.c Sat Sep 6 15:23:28 2014 (r271192) @@ -147,7 +147,7 @@ void *bootstacks[MAXCPU]; static void *dpcpu; struct pcb stoppcbs[MAXCPU]; -struct pcb **susppcbs = NULL; +struct susppcb **susppcbs; /* Variables needed for SMP tlb shootdown. */ vm_offset_t smp_tlb_addr1; @@ -1521,12 +1521,12 @@ cpususpend_handler(void) mtx_assert(&smp_ipi_mtx, MA_NOTOWNED); cpu = PCPU_GET(cpuid); - if (savectx(susppcbs[cpu])) { - npxsuspend(&susppcbs[cpu]->pcb_fpususpend); + if (savectx(&susppcbs[cpu]->sp_pcb)) { + npxsuspend(&susppcbs[cpu]->sp_fpususpend); wbinvd(); CPU_SET_ATOMIC(cpu, &suspended_cpus); } else { - npxresume(&susppcbs[cpu]->pcb_fpususpend); + npxresume(&susppcbs[cpu]->sp_fpususpend); pmap_init_pat(); PCPU_SET(switchtime, 0); PCPU_SET(switchticks, ticks); Modified: head/sys/i386/include/pcb.h ============================================================================== --- head/sys/i386/include/pcb.h Sat Sep 6 15:15:06 2014 (r271191) +++ head/sys/i386/include/pcb.h Sat Sep 6 15:23:28 2014 (r271192) @@ -90,8 +90,11 @@ struct pcb { struct region_descriptor pcb_idt; uint16_t pcb_ldt; uint16_t pcb_tr; +}; - union savefpu pcb_fpususpend; +struct susppcb { + struct pcb sp_pcb; + union savefpu sp_fpususpend; }; #ifdef _KERNEL Modified: head/sys/sparc64/pci/psycho.c ============================================================================== --- head/sys/sparc64/pci/psycho.c Sat Sep 6 15:15:06 2014 (r271191) +++ head/sys/sparc64/pci/psycho.c Sat Sep 6 15:23:28 2014 (r271192) @@ -448,24 +448,30 @@ psycho_attach(device_t dev) i = OF_getprop_alloc(node, "ranges", sizeof(*range), (void **)&range); /* - * Make sure that the expected ranges are present. The - * OFW_PCI_CS_MEM64 one is not currently used though. - */ - if (i != PSYCHO_NRANGE) - panic("%s: unsupported number of ranges", __func__); - /* * Find the addresses of the various bus spaces. * There should not be multiple ones of one kind. * The physical start addresses of the ranges are the configuration, * memory and I/O handles. */ - for (i = 0; i < PSYCHO_NRANGE; i++) { + for (; i >= 0; i--) { j = OFW_PCI_RANGE_CS(&range[i]); if (sc->sc_pci_bh[j] != 0) panic("%s: duplicate range for space %d", __func__, j); sc->sc_pci_bh[j] = OFW_PCI_RANGE_PHYS(&range[i]); } + + /* + * Make sure that the expected ranges are present. The + * OFW_PCI_CS_MEM64 one is not currently used. + */ + if (sc->sc_pci_bh[OFW_PCI_CS_CONFIG] == 0) + panic("%s: missing CONFIG range", __func__); + if (sc->sc_pci_bh[OFW_PCI_CS_IO] == 0) + panic("%s: missing IO range", __func__); + if (sc->sc_pci_bh[OFW_PCI_CS_MEM32] == 0) + panic("%s: missing MEM32 range", __func__); + free(range, M_OFWPROP); /* Register the softc, this is needed for paired Psychos. */ Modified: head/sys/x86/acpica/acpi_wakeup.c ============================================================================== --- head/sys/x86/acpica/acpi_wakeup.c Sat Sep 6 15:15:06 2014 (r271191) +++ head/sys/x86/acpica/acpi_wakeup.c Sat Sep 6 15:23:28 2014 (r271192) @@ -75,10 +75,10 @@ extern int acpi_resume_beep; extern int acpi_reset_video; #ifdef SMP -extern struct pcb **susppcbs; +extern struct susppcb **susppcbs; static cpuset_t suspcpus; #else -static struct pcb **susppcbs; +static struct susppcb **susppcbs; #endif static void *acpi_alloc_wakeup_handler(void); @@ -117,14 +117,15 @@ acpi_stop_beep(void *arg) static int acpi_wakeup_ap(struct acpi_softc *sc, int cpu) { + struct pcb *pcb; int vector = (WAKECODE_PADDR(sc) >> 12) & 0xff; int apic_id = cpu_apic_ids[cpu]; int ms; - 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, - susppcbs[cpu]->pcb_gdt.rd_base); + pcb = &susppcbs[cpu]->sp_pcb; + WAKECODE_FIXUP(wakeup_pcb, struct pcb *, pcb); + WAKECODE_FIXUP(wakeup_gdt, uint16_t, pcb->pcb_gdt.rd_limit); + WAKECODE_FIXUP(wakeup_gdt + 2, uint64_t, pcb->pcb_gdt.rd_base); ipi_startup(apic_id, vector); @@ -188,6 +189,7 @@ int acpi_sleep_machdep(struct acpi_softc *sc, int state) { ACPI_STATUS status; + struct pcb *pcb; if (sc->acpi_wakeaddr == 0ul) return (-1); /* couldn't alloc wake memory */ @@ -204,11 +206,12 @@ acpi_sleep_machdep(struct acpi_softc *sc intr_suspend(); - if (savectx(susppcbs[0])) { + pcb = &susppcbs[0]->sp_pcb; + if (savectx(pcb)) { #ifdef __amd64__ - fpususpend(susppcbs[0]->pcb_fpususpend); + fpususpend(susppcbs[0]->sp_fpususpend); #elif defined(DEV_NPX) - npxsuspend(&susppcbs[0]->pcb_fpususpend); + npxsuspend(&susppcbs[0]->sp_fpususpend); #endif #ifdef SMP if (!CPU_EMPTY(&suspcpus) && suspend_cpus(suspcpus) == 0) { @@ -221,13 +224,11 @@ acpi_sleep_machdep(struct acpi_softc *sc WAKECODE_FIXUP(reset_video, uint8_t, (acpi_reset_video != 0)); #ifndef __amd64__ - WAKECODE_FIXUP(wakeup_cr4, register_t, susppcbs[0]->pcb_cr4); + WAKECODE_FIXUP(wakeup_cr4, register_t, pcb->pcb_cr4); #endif - WAKECODE_FIXUP(wakeup_pcb, struct pcb *, susppcbs[0]); - WAKECODE_FIXUP(wakeup_gdt, uint16_t, - susppcbs[0]->pcb_gdt.rd_limit); - WAKECODE_FIXUP(wakeup_gdt + 2, uint64_t, - susppcbs[0]->pcb_gdt.rd_base); + WAKECODE_FIXUP(wakeup_pcb, struct pcb *, pcb); + WAKECODE_FIXUP(wakeup_gdt, uint16_t, pcb->pcb_gdt.rd_limit); + WAKECODE_FIXUP(wakeup_gdt + 2, uint64_t, pcb->pcb_gdt.rd_base); /* Call ACPICA to enter the desired sleep state */ if (state == ACPI_STATE_S4 && sc->acpi_s4bios) @@ -244,8 +245,10 @@ acpi_sleep_machdep(struct acpi_softc *sc for (;;) ia32_pause(); } else { -#ifdef DEV_NPX - npxresume(&susppcbs[0]->pcb_fpususpend); +#ifdef __amd64__ + fpuresume(susppcbs[0]->sp_fpususpend); +#elif defined(DEV_NPX) + npxresume(&susppcbs[0]->sp_fpususpend); #endif } @@ -325,7 +328,7 @@ acpi_alloc_wakeup_handler(void) for (i = 0; i < mp_ncpus; i++) { susppcbs[i] = malloc(sizeof(**susppcbs), M_DEVBUF, M_WAITOK); #ifdef __amd64__ - susppcbs[i]->pcb_fpususpend = alloc_fpusave(M_WAITOK); + susppcbs[i]->sp_fpususpend = alloc_fpusave(M_WAITOK); #endif } From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 15:24:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A37BE1DB; Sat, 6 Sep 2014 15:24:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E3A61289; Sat, 6 Sep 2014 15:24:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86FOmnH056185; Sat, 6 Sep 2014 15:24:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86FOmLs056184; Sat, 6 Sep 2014 15:24:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409061524.s86FOmLs056184@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 6 Sep 2014 15:24:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271193 - stable/10/sys/dev/sound/pcm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 15:24:48 -0000 Author: mav Date: Sat Sep 6 15:24:48 2014 New Revision: 271193 URL: http://svnweb.freebsd.org/changeset/base/271193 Log: MFC r269228: Add support for SOUND_MIXER_INFO IOCTL, used by gstreamer. Submitted by: Dmitry Luhtionov Approved by: re (marius) Modified: stable/10/sys/dev/sound/pcm/mixer.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/pcm/mixer.c ============================================================================== --- stable/10/sys/dev/sound/pcm/mixer.c Sat Sep 6 15:23:28 2014 (r271192) +++ stable/10/sys/dev/sound/pcm/mixer.c Sat Sep 6 15:24:48 2014 (r271193) @@ -1222,6 +1222,15 @@ mixer_ioctl(struct cdev *i_dev, u_long c return (ret); } +static void +mixer_mixerinfo(struct snd_mixer *m, mixer_info *mi) +{ + bzero((void *)mi, sizeof(*mi)); + strlcpy(mi->id, m->name, sizeof(mi->id)); + strlcpy(mi->name, device_get_desc(m->dev), sizeof(mi->name)); + mi->modify_counter = m->modify_counter; +} + /* * XXX Make sure you can guarantee concurrency safety before calling this * function, be it through Giant, PCM_*, etc ! @@ -1280,6 +1289,10 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo *arg_i = SOUND_VERSION; ret = 0; goto done; + case SOUND_MIXER_INFO: + mixer_mixerinfo(m, (mixer_info *)arg); + ret = 0; + goto done; } if ((cmd & ~0xff) == MIXER_WRITE(0)) { if (j == SOUND_MIXER_RECSRC) From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 15:26:04 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0582D30E; Sat, 6 Sep 2014 15:26:04 +0000 (UTC) Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF6BC1294; Sat, 6 Sep 2014 15:26:03 +0000 (UTC) Received: from zeppelin.tachypleus.net (polaris.tachypleus.net [75.101.50.44]) (authenticated bits=0) by c.mail.sonic.net (8.14.9/8.14.9) with ESMTP id s86FPtll018241 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 6 Sep 2014 08:25:56 -0700 Message-ID: <540B2783.9020808@freebsd.org> Date: Sat, 06 Sep 2014 08:25:55 -0700 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r271190 - head/sys/dev/ofw References: <201409061511.s86FBZAB050025@svn.freebsd.org> In-Reply-To: <201409061511.s86FBZAB050025@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVZmO0r8jtSlUxk5DAZ5bcqgG2qZUG3YrdEg67GsWoEd2oizSIzS2d/Lbz+8EJ8dSMMvkneYTGJMY2+pl489d/ACxBt/+x0Ez7c= X-Sonic-ID: C;6GhBGNo15BGh9EpcoK8kYw== M;MuC7GNo15BGh9EpcoK8kYw== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 15:26:04 -0000 What is this for? The way the specification works here explicitly requires this fallback. -Nathan On 09/06/14 08:11, Ian Lepore wrote: > Author: ian > Date: Sat Sep 6 15:11:35 2014 > New Revision: 271190 > URL: http://svnweb.freebsd.org/changeset/base/271190 > > Log: > Add OF_xref_from_node_strict() which returns -1 if there is no xref handle > for the node. The default routine returns the untranslated handle, which > is sometimes useful, but sometimes you really need to know there's no > entry in the xref<->node<->device translation table. > > Modified: > head/sys/dev/ofw/openfirm.c > head/sys/dev/ofw/openfirm.h > > Modified: head/sys/dev/ofw/openfirm.c > ============================================================================== > --- head/sys/dev/ofw/openfirm.c Sat Sep 6 13:21:07 2014 (r271189) > +++ head/sys/dev/ofw/openfirm.c Sat Sep 6 15:11:35 2014 (r271190) > @@ -554,15 +554,15 @@ OF_node_from_xref(phandle_t xref) > return (node); > } > > -phandle_t > -OF_xref_from_node(phandle_t node) > +static phandle_t > +xref_from_node(phandle_t node, phandle_t notfoundvalue) > { > struct xrefinfo *xi; > phandle_t xref; > > if (xref_init_done) { > if ((xi = xrefinfo_find(node, FIND_BY_NODE)) == NULL) > - return (node); > + return (notfoundvalue); > return (xi->xref); > } > > @@ -570,10 +570,24 @@ OF_xref_from_node(phandle_t node) > -1 && OF_getencprop(node, "ibm,phandle", &xref, > sizeof(xref)) == -1 && OF_getencprop(node, > "linux,phandle", &xref, sizeof(xref)) == -1) > - return (node); > + return (notfoundvalue); > return (xref); > } > > +phandle_t > +OF_xref_from_node(phandle_t node) > +{ > + > + return (xref_from_node(node, node)); > +} > + > +phandle_t > +OF_xref_from_node_strict(phandle_t node) > +{ > + > + return (xref_from_node(node, -1)); > +} > + > device_t > OF_device_from_xref(phandle_t xref) > { > > Modified: head/sys/dev/ofw/openfirm.h > ============================================================================== > --- head/sys/dev/ofw/openfirm.h Sat Sep 6 13:21:07 2014 (r271189) > +++ head/sys/dev/ofw/openfirm.h Sat Sep 6 15:11:35 2014 (r271190) > @@ -128,10 +128,12 @@ ssize_t OF_package_to_path(phandle_t no > * Some OF implementations (IBM, FDT) have a concept of effective phandles > * used for device-tree cross-references. Given one of these, returns the > * real phandle. If one can't be found (or running on OF implementations > - * without this property), returns its input. > + * without this property), OF_xref_from_node() returns its input, while the > + * strict version returns -1. > */ > phandle_t OF_node_from_xref(phandle_t xref); > phandle_t OF_xref_from_node(phandle_t node); > +phandle_t OF_xref_from_node_strict(phandle_t node); > > /* > * When properties contain references to other nodes using xref handles it is > From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 15:26:39 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B35DC44E; Sat, 6 Sep 2014 15:26:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E68112A0; Sat, 6 Sep 2014 15:26:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86FQdi6056500; Sat, 6 Sep 2014 15:26:39 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86FQduk056498; Sat, 6 Sep 2014 15:26:39 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409061526.s86FQduk056498@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 6 Sep 2014 15:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271194 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 15:26:39 -0000 Author: mav Date: Sat Sep 6 15:26:38 2014 New Revision: 271194 URL: http://svnweb.freebsd.org/changeset/base/271194 Log: MFC r270423: Restore pre-r239157 handling of sched_yield(), when thread time slice was aborted, allowing other threads to run. Without this change thread is just rescheduled again, that was illustrated by provided test tool. PR: 192926 Submitted by: eric@vangyzen.net Approved by: re (marius) Modified: stable/10/sys/kern/sched_4bsd.c stable/10/sys/kern/sched_ule.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sched_4bsd.c ============================================================================== --- stable/10/sys/kern/sched_4bsd.c Sat Sep 6 15:24:48 2014 (r271193) +++ stable/10/sys/kern/sched_4bsd.c Sat Sep 6 15:26:38 2014 (r271194) @@ -983,7 +983,8 @@ sched_switch(struct thread *td, struct t sched_load_rem(); td->td_lastcpu = td->td_oncpu; - preempted = !(td->td_flags & TDF_SLICEEND); + preempted = !((td->td_flags & TDF_SLICEEND) || + (flags & SWT_RELINQUISH)); td->td_flags &= ~(TDF_NEEDRESCHED | TDF_SLICEEND); td->td_owepreempt = 0; td->td_oncpu = NOCPU; Modified: stable/10/sys/kern/sched_ule.c ============================================================================== --- stable/10/sys/kern/sched_ule.c Sat Sep 6 15:24:48 2014 (r271193) +++ stable/10/sys/kern/sched_ule.c Sat Sep 6 15:26:38 2014 (r271194) @@ -1862,7 +1862,8 @@ sched_switch(struct thread *td, struct t ts->ts_rltick = ticks; td->td_lastcpu = td->td_oncpu; td->td_oncpu = NOCPU; - preempted = !(td->td_flags & TDF_SLICEEND); + preempted = !((td->td_flags & TDF_SLICEEND) || + (flags & SWT_RELINQUISH)); td->td_flags &= ~(TDF_NEEDRESCHED | TDF_SLICEEND); td->td_owepreempt = 0; if (!TD_IS_IDLETHREAD(td)) From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 15:30:58 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4609C5F7; Sat, 6 Sep 2014 15:30:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3158D12C6; Sat, 6 Sep 2014 15:30:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86FUwge059861; Sat, 6 Sep 2014 15:30:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86FUvCl059859; Sat, 6 Sep 2014 15:30:57 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409061530.s86FUvCl059859@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 6 Sep 2014 15:30:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r271195 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 15:30:58 -0000 Author: mav Date: Sat Sep 6 15:30:57 2014 New Revision: 271195 URL: http://svnweb.freebsd.org/changeset/base/271195 Log: MFC r270423: Restore pre-r239157 handling of sched_yield(), when thread time slice was aborted, allowing other threads to run. Without this change thread is just rescheduled again, that was illustrated by provided test tool. PR: 192926 Submitted by: eric@vangyzen.net Modified: stable/9/sys/kern/sched_4bsd.c stable/9/sys/kern/sched_ule.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/kern/sched_4bsd.c ============================================================================== --- stable/9/sys/kern/sched_4bsd.c Sat Sep 6 15:26:38 2014 (r271194) +++ stable/9/sys/kern/sched_4bsd.c Sat Sep 6 15:30:57 2014 (r271195) @@ -983,7 +983,8 @@ sched_switch(struct thread *td, struct t sched_load_rem(); td->td_lastcpu = td->td_oncpu; - preempted = !(td->td_flags & TDF_SLICEEND); + preempted = !((td->td_flags & TDF_SLICEEND) || + (flags & SWT_RELINQUISH)); td->td_flags &= ~(TDF_NEEDRESCHED | TDF_SLICEEND); td->td_owepreempt = 0; td->td_oncpu = NOCPU; Modified: stable/9/sys/kern/sched_ule.c ============================================================================== --- stable/9/sys/kern/sched_ule.c Sat Sep 6 15:26:38 2014 (r271194) +++ stable/9/sys/kern/sched_ule.c Sat Sep 6 15:30:57 2014 (r271195) @@ -1830,7 +1830,8 @@ sched_switch(struct thread *td, struct t ts->ts_rltick = ticks; td->td_lastcpu = td->td_oncpu; td->td_oncpu = NOCPU; - preempted = !(td->td_flags & TDF_SLICEEND); + preempted = !((td->td_flags & TDF_SLICEEND) || + (flags & SWT_RELINQUISH)); td->td_flags &= ~(TDF_NEEDRESCHED | TDF_SLICEEND); td->td_owepreempt = 0; if (!TD_IS_IDLETHREAD(td)) From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 15:34:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50CA0833; Sat, 6 Sep 2014 15:34:40 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1168B137B; Sat, 6 Sep 2014 15:34:39 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XQI0b-000G6L-QN; Sat, 06 Sep 2014 15:34:37 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s86FYae5015588; Sat, 6 Sep 2014 09:34:36 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX180S/J7hPptC1+ffOizrxtM X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: svn commit: r271190 - head/sys/dev/ofw From: Ian Lepore To: Nathan Whitehorn In-Reply-To: <540B2783.9020808@freebsd.org> References: <201409061511.s86FBZAB050025@svn.freebsd.org> <540B2783.9020808@freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Sat, 06 Sep 2014 09:34:36 -0600 Message-ID: <1410017676.1150.356.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 15:34:40 -0000 On Sat, 2014-09-06 at 08:25 -0700, Nathan Whitehorn wrote: > What is this for? The way the specification works here explicitly > requires this fallback. > -Nathan > It's for determining whether there is an entry in the device<->xref list. If a node has no xref phandle property there will be no entry for it in the list and thus no way to record or retrieve a device association. I found myself coding the "if it has a phandle, or an ibm,phandle, or a linux,phandle" incantation, then realized that all that figuring-out work was done at init time when the xref list is built, I just needed a way to get the result. -- Ian > On 09/06/14 08:11, Ian Lepore wrote: > > Author: ian > > Date: Sat Sep 6 15:11:35 2014 > > New Revision: 271190 > > URL: http://svnweb.freebsd.org/changeset/base/271190 > > > > Log: > > Add OF_xref_from_node_strict() which returns -1 if there is no xref handle > > for the node. The default routine returns the untranslated handle, which > > is sometimes useful, but sometimes you really need to know there's no > > entry in the xref<->node<->device translation table. > > > > Modified: > > head/sys/dev/ofw/openfirm.c > > head/sys/dev/ofw/openfirm.h > > > > Modified: head/sys/dev/ofw/openfirm.c > > ============================================================================== > > --- head/sys/dev/ofw/openfirm.c Sat Sep 6 13:21:07 2014 (r271189) > > +++ head/sys/dev/ofw/openfirm.c Sat Sep 6 15:11:35 2014 (r271190) > > @@ -554,15 +554,15 @@ OF_node_from_xref(phandle_t xref) > > return (node); > > } > > > > -phandle_t > > -OF_xref_from_node(phandle_t node) > > +static phandle_t > > +xref_from_node(phandle_t node, phandle_t notfoundvalue) > > { > > struct xrefinfo *xi; > > phandle_t xref; > > > > if (xref_init_done) { > > if ((xi = xrefinfo_find(node, FIND_BY_NODE)) == NULL) > > - return (node); > > + return (notfoundvalue); > > return (xi->xref); > > } > > > > @@ -570,10 +570,24 @@ OF_xref_from_node(phandle_t node) > > -1 && OF_getencprop(node, "ibm,phandle", &xref, > > sizeof(xref)) == -1 && OF_getencprop(node, > > "linux,phandle", &xref, sizeof(xref)) == -1) > > - return (node); > > + return (notfoundvalue); > > return (xref); > > } > > > > +phandle_t > > +OF_xref_from_node(phandle_t node) > > +{ > > + > > + return (xref_from_node(node, node)); > > +} > > + > > +phandle_t > > +OF_xref_from_node_strict(phandle_t node) > > +{ > > + > > + return (xref_from_node(node, -1)); > > +} > > + > > device_t > > OF_device_from_xref(phandle_t xref) > > { > > > > Modified: head/sys/dev/ofw/openfirm.h > > ============================================================================== > > --- head/sys/dev/ofw/openfirm.h Sat Sep 6 13:21:07 2014 (r271189) > > +++ head/sys/dev/ofw/openfirm.h Sat Sep 6 15:11:35 2014 (r271190) > > @@ -128,10 +128,12 @@ ssize_t OF_package_to_path(phandle_t no > > * Some OF implementations (IBM, FDT) have a concept of effective phandles > > * used for device-tree cross-references. Given one of these, returns the > > * real phandle. If one can't be found (or running on OF implementations > > - * without this property), returns its input. > > + * without this property), OF_xref_from_node() returns its input, while the > > + * strict version returns -1. > > */ > > phandle_t OF_node_from_xref(phandle_t xref); > > phandle_t OF_xref_from_node(phandle_t node); > > +phandle_t OF_xref_from_node_strict(phandle_t node); > > > > /* > > * When properties contain references to other nodes using xref handles it is > > > From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 15:37:55 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3E07990; Sat, 6 Sep 2014 15:37:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF5BF139B; Sat, 6 Sep 2014 15:37:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86Fbtvl061424; Sat, 6 Sep 2014 15:37:55 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86FbtLY061423; Sat, 6 Sep 2014 15:37:55 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409061537.s86FbtLY061423@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 6 Sep 2014 15:37:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271196 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 15:37:55 -0000 Author: mav Date: Sat Sep 6 15:37:55 2014 New Revision: 271196 URL: http://svnweb.freebsd.org/changeset/base/271196 Log: Fix typo in comments. Submitted by: Benedict Reuschling MFC after: 6 days Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Sat Sep 6 15:30:57 2014 (r271195) +++ head/sys/dev/ahci/ahci.c Sat Sep 6 15:37:55 2014 (r271196) @@ -1535,8 +1535,9 @@ ahci_execute_transaction(struct ahci_slo /* * Marvell HBAs with non-RAID firmware do not wait for * readiness after soft reset, so we have to wait here. - * Marvell RAIDs have no this problem, but instead sometimes - * forget to update FIS receive area, breaking this wait. + * Marvell RAIDs do not have this problem, but instead + * sometimes forget to update FIS receive area, breaking + * this wait. */ if ((ch->quirks & AHCI_Q_NOBSYRES) == 0 && (ch->quirks & AHCI_Q_ATI_PMP_BUG) == 0 && From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 15:39:03 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE86BAD1; Sat, 6 Sep 2014 15:39:02 +0000 (UTC) Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D358C13A3; Sat, 6 Sep 2014 15:39:02 +0000 (UTC) Received: from zeppelin.tachypleus.net (polaris.tachypleus.net [75.101.50.44]) (authenticated bits=0) by c.mail.sonic.net (8.14.9/8.14.9) with ESMTP id s86Fd0oh031419 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 6 Sep 2014 08:39:01 -0700 Message-ID: <540B2A94.4090201@freebsd.org> Date: Sat, 06 Sep 2014 08:39:00 -0700 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Ian Lepore Subject: Re: svn commit: r271190 - head/sys/dev/ofw References: <201409061511.s86FBZAB050025@svn.freebsd.org> <540B2783.9020808@freebsd.org> <1410017676.1150.356.camel@revolution.hippie.lan> In-Reply-To: <1410017676.1150.356.camel@revolution.hippie.lan> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVbjB3dvfc4QCRL4bZYXSiQzVA2HFeqU1occLgeIycaeo9nfX+hcuHBAInSJTKJ2NUcfyCin65Xe3F6Qg6nJSObGmNRtyp30KD4= X-Sonic-ID: C;AvJZ7Ns15BGCX0pcoK8kYw== M;UkSe7Ns15BGCX0pcoK8kYw== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 15:39:03 -0000 On 09/06/14 08:34, Ian Lepore wrote: > On Sat, 2014-09-06 at 08:25 -0700, Nathan Whitehorn wrote: >> What is this for? The way the specification works here explicitly >> requires this fallback. >> -Nathan >> > It's for determining whether there is an entry in the device<->xref > list. If a node has no xref phandle property there will be no entry for > it in the list and thus no way to record or retrieve a device > association. I found myself coding the "if it has a phandle, or an > ibm,phandle, or a linux,phandle" incantation, then realized that all > that figuring-out work was done at init time when the xref list is > built, I just needed a way to get the result. This isn't true. On most but not all real OF systems, which use, or will use, the same mechanism, there is no distinction between "regular" and "cross-reference" phandles and device tree cross-references still exist with no explicit phandle property. So registering a device without a phandle property has to to work, and has to fall back to the regular phandle 100% of the time. What may be true is that no single device tree has a mixture of implicit and explicit cross-reference handles, so you could set a flag or something. But it's probably not worth it. Do you have a concrete example where you cared about this? -Nathan > -- Ian > >> On 09/06/14 08:11, Ian Lepore wrote: >>> Author: ian >>> Date: Sat Sep 6 15:11:35 2014 >>> New Revision: 271190 >>> URL: http://svnweb.freebsd.org/changeset/base/271190 >>> >>> Log: >>> Add OF_xref_from_node_strict() which returns -1 if there is no xref handle >>> for the node. The default routine returns the untranslated handle, which >>> is sometimes useful, but sometimes you really need to know there's no >>> entry in the xref<->node<->device translation table. >>> >>> Modified: >>> head/sys/dev/ofw/openfirm.c >>> head/sys/dev/ofw/openfirm.h >>> >>> Modified: head/sys/dev/ofw/openfirm.c >>> ============================================================================== >>> --- head/sys/dev/ofw/openfirm.c Sat Sep 6 13:21:07 2014 (r271189) >>> +++ head/sys/dev/ofw/openfirm.c Sat Sep 6 15:11:35 2014 (r271190) >>> @@ -554,15 +554,15 @@ OF_node_from_xref(phandle_t xref) >>> return (node); >>> } >>> >>> -phandle_t >>> -OF_xref_from_node(phandle_t node) >>> +static phandle_t >>> +xref_from_node(phandle_t node, phandle_t notfoundvalue) >>> { >>> struct xrefinfo *xi; >>> phandle_t xref; >>> >>> if (xref_init_done) { >>> if ((xi = xrefinfo_find(node, FIND_BY_NODE)) == NULL) >>> - return (node); >>> + return (notfoundvalue); >>> return (xi->xref); >>> } >>> >>> @@ -570,10 +570,24 @@ OF_xref_from_node(phandle_t node) >>> -1 && OF_getencprop(node, "ibm,phandle", &xref, >>> sizeof(xref)) == -1 && OF_getencprop(node, >>> "linux,phandle", &xref, sizeof(xref)) == -1) >>> - return (node); >>> + return (notfoundvalue); >>> return (xref); >>> } >>> >>> +phandle_t >>> +OF_xref_from_node(phandle_t node) >>> +{ >>> + >>> + return (xref_from_node(node, node)); >>> +} >>> + >>> +phandle_t >>> +OF_xref_from_node_strict(phandle_t node) >>> +{ >>> + >>> + return (xref_from_node(node, -1)); >>> +} >>> + >>> device_t >>> OF_device_from_xref(phandle_t xref) >>> { >>> >>> Modified: head/sys/dev/ofw/openfirm.h >>> ============================================================================== >>> --- head/sys/dev/ofw/openfirm.h Sat Sep 6 13:21:07 2014 (r271189) >>> +++ head/sys/dev/ofw/openfirm.h Sat Sep 6 15:11:35 2014 (r271190) >>> @@ -128,10 +128,12 @@ ssize_t OF_package_to_path(phandle_t no >>> * Some OF implementations (IBM, FDT) have a concept of effective phandles >>> * used for device-tree cross-references. Given one of these, returns the >>> * real phandle. If one can't be found (or running on OF implementations >>> - * without this property), returns its input. >>> + * without this property), OF_xref_from_node() returns its input, while the >>> + * strict version returns -1. >>> */ >>> phandle_t OF_node_from_xref(phandle_t xref); >>> phandle_t OF_xref_from_node(phandle_t node); >>> +phandle_t OF_xref_from_node_strict(phandle_t node); >>> >>> /* >>> * When properties contain references to other nodes using xref handles it is >>> > From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 15:45:10 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC145E2B; Sat, 6 Sep 2014 15:45:10 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B35214C2; Sat, 6 Sep 2014 15:45:09 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XQIAn-000G58-2S; Sat, 06 Sep 2014 15:45:09 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s86Fj8pe015621; Sat, 6 Sep 2014 09:45:08 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+qymkkWQ6IPjrKnljNoaYQ X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: svn commit: r271190 - head/sys/dev/ofw From: Ian Lepore To: Nathan Whitehorn In-Reply-To: <540B2A94.4090201@freebsd.org> References: <201409061511.s86FBZAB050025@svn.freebsd.org> <540B2783.9020808@freebsd.org> <1410017676.1150.356.camel@revolution.hippie.lan> <540B2A94.4090201@freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Sat, 06 Sep 2014 09:45:07 -0600 Message-ID: <1410018307.1150.358.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 15:45:11 -0000 On Sat, 2014-09-06 at 08:39 -0700, Nathan Whitehorn wrote: > On 09/06/14 08:34, Ian Lepore wrote: > > On Sat, 2014-09-06 at 08:25 -0700, Nathan Whitehorn wrote: > >> What is this for? The way the specification works here explicitly > >> requires this fallback. > >> -Nathan > >> > > It's for determining whether there is an entry in the device<->xref > > list. If a node has no xref phandle property there will be no entry for > > it in the list and thus no way to record or retrieve a device > > association. I found myself coding the "if it has a phandle, or an > > ibm,phandle, or a linux,phandle" incantation, then realized that all > > that figuring-out work was done at init time when the xref list is > > built, I just needed a way to get the result. > > This isn't true. On most but not all real OF systems, which use, or will > use, the same mechanism, there is no distinction between "regular" and > "cross-reference" phandles and device tree cross-references still exist > with no explicit phandle property. So registering a device without a > phandle property has to to work, and has to fall back to the regular > phandle 100% of the time. > Oh. That wasn't clear when you helped me last week with the xref list stuff. I'll have to rework that a bit to meet the requirements you list above. -- Ian > What may be true is that no single device tree has a mixture of implicit > and explicit cross-reference handles, so you could set a flag or > something. But it's probably not worth it. Do you have a concrete > example where you cared about this? > -Nathan > > > -- Ian > > > >> On 09/06/14 08:11, Ian Lepore wrote: > >>> Author: ian > >>> Date: Sat Sep 6 15:11:35 2014 > >>> New Revision: 271190 > >>> URL: http://svnweb.freebsd.org/changeset/base/271190 > >>> > >>> Log: > >>> Add OF_xref_from_node_strict() which returns -1 if there is no xref handle > >>> for the node. The default routine returns the untranslated handle, which > >>> is sometimes useful, but sometimes you really need to know there's no > >>> entry in the xref<->node<->device translation table. > >>> > >>> Modified: > >>> head/sys/dev/ofw/openfirm.c > >>> head/sys/dev/ofw/openfirm.h > >>> > >>> Modified: head/sys/dev/ofw/openfirm.c > >>> ============================================================================== > >>> --- head/sys/dev/ofw/openfirm.c Sat Sep 6 13:21:07 2014 (r271189) > >>> +++ head/sys/dev/ofw/openfirm.c Sat Sep 6 15:11:35 2014 (r271190) > >>> @@ -554,15 +554,15 @@ OF_node_from_xref(phandle_t xref) > >>> return (node); > >>> } > >>> > >>> -phandle_t > >>> -OF_xref_from_node(phandle_t node) > >>> +static phandle_t > >>> +xref_from_node(phandle_t node, phandle_t notfoundvalue) > >>> { > >>> struct xrefinfo *xi; > >>> phandle_t xref; > >>> > >>> if (xref_init_done) { > >>> if ((xi = xrefinfo_find(node, FIND_BY_NODE)) == NULL) > >>> - return (node); > >>> + return (notfoundvalue); > >>> return (xi->xref); > >>> } > >>> > >>> @@ -570,10 +570,24 @@ OF_xref_from_node(phandle_t node) > >>> -1 && OF_getencprop(node, "ibm,phandle", &xref, > >>> sizeof(xref)) == -1 && OF_getencprop(node, > >>> "linux,phandle", &xref, sizeof(xref)) == -1) > >>> - return (node); > >>> + return (notfoundvalue); > >>> return (xref); > >>> } > >>> > >>> +phandle_t > >>> +OF_xref_from_node(phandle_t node) > >>> +{ > >>> + > >>> + return (xref_from_node(node, node)); > >>> +} > >>> + > >>> +phandle_t > >>> +OF_xref_from_node_strict(phandle_t node) > >>> +{ > >>> + > >>> + return (xref_from_node(node, -1)); > >>> +} > >>> + > >>> device_t > >>> OF_device_from_xref(phandle_t xref) > >>> { > >>> > >>> Modified: head/sys/dev/ofw/openfirm.h > >>> ============================================================================== > >>> --- head/sys/dev/ofw/openfirm.h Sat Sep 6 13:21:07 2014 (r271189) > >>> +++ head/sys/dev/ofw/openfirm.h Sat Sep 6 15:11:35 2014 (r271190) > >>> @@ -128,10 +128,12 @@ ssize_t OF_package_to_path(phandle_t no > >>> * Some OF implementations (IBM, FDT) have a concept of effective phandles > >>> * used for device-tree cross-references. Given one of these, returns the > >>> * real phandle. If one can't be found (or running on OF implementations > >>> - * without this property), returns its input. > >>> + * without this property), OF_xref_from_node() returns its input, while the > >>> + * strict version returns -1. > >>> */ > >>> phandle_t OF_node_from_xref(phandle_t xref); > >>> phandle_t OF_xref_from_node(phandle_t node); > >>> +phandle_t OF_xref_from_node_strict(phandle_t node); > >>> > >>> /* > >>> * When properties contain references to other nodes using xref handles it is > >>> > > > > From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 15:45:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AEAA0F67; Sat, 6 Sep 2014 15:45:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8041114C6; Sat, 6 Sep 2014 15:45:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86Fjkgw065961; Sat, 6 Sep 2014 15:45:46 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86FjknW065959; Sat, 6 Sep 2014 15:45:46 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409061545.s86FjknW065959@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 6 Sep 2014 15:45:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271197 - in head/sys/x86: include x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 15:45:46 -0000 Author: kib Date: Sat Sep 6 15:45:45 2014 New Revision: 271197 URL: http://svnweb.freebsd.org/changeset/base/271197 Log: Add more bits for the XSAVE features from CPUID 0xd, sub-function 1 %eax report. Print the XSAVE features 0xd/1 in the boot banner. The printcpuinfo() is executed late enough so that XSAVE is already enabled. There is no known to me off the shelf hardware that implements any feature bits except XSAVEOPT, the list is taken from SDM rev. 50. The banner printing will allow us to note the hardware arrival. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/include/specialreg.h head/sys/x86/x86/identcpu.c Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Sat Sep 6 15:37:55 2014 (r271196) +++ head/sys/x86/include/specialreg.h Sat Sep 6 15:45:45 2014 (r271197) @@ -296,6 +296,9 @@ * CPUID instruction 0xd Processor Extended State Enumeration Sub-leaf 1 */ #define CPUID_EXTSTATE_XSAVEOPT 0x00000001 +#define CPUID_EXTSTATE_XSAVEC 0x00000002 +#define CPUID_EXTSTATE_XINUSE 0x00000004 +#define CPUID_EXTSTATE_XSAVES 0x00000008 /* * AMD extended function 8000_0007h edx info Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Sat Sep 6 15:37:55 2014 (r271196) +++ head/sys/x86/x86/identcpu.c Sat Sep 6 15:45:45 2014 (r271197) @@ -932,6 +932,19 @@ printcpuinfo(void) ); } + if ((cpu_feature2 & CPUID2_XSAVE) != 0) { + cpuid_count(0xd, 0x1, regs); + if (regs[0] != 0) { + printf("\n XSAVE Features=0x%b", + regs[0], + "\020" + "\001XSAVEOPT" + "\002XSAVEC" + "\003XINUSE" + "\004XSAVES"); + } + } + if (via_feature_rng != 0 || via_feature_xcrypt != 0) print_via_padlock_info(); From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 17:33:42 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30B476C8; Sat, 6 Sep 2014 17:33:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C25E1F57; Sat, 6 Sep 2014 17:33:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86HXfkI020975; Sat, 6 Sep 2014 17:33:41 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86HXfTK020974; Sat, 6 Sep 2014 17:33:41 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201409061733.s86HXfTK020974@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sat, 6 Sep 2014 17:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271198 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 17:33:42 -0000 Author: andrew Date: Sat Sep 6 17:33:41 2014 New Revision: 271198 URL: http://svnweb.freebsd.org/changeset/base/271198 Log: Fixthe spelling of ehci Modified: head/sys/arm/freescale/imx/files.imx51 Modified: head/sys/arm/freescale/imx/files.imx51 ============================================================================== --- head/sys/arm/freescale/imx/files.imx51 Sat Sep 6 15:45:45 2014 (r271197) +++ head/sys/arm/freescale/imx/files.imx51 Sat Sep 6 17:33:41 2014 (r271198) @@ -37,7 +37,7 @@ dev/ata/chipsets/ata-fsl.c optional imx dev/uart/uart_dev_imx.c optional uart # USB OH3 controller (1 OTG, 3 EHCI) -arm/freescale/imx/imx_nop_usbphy.c optional echi +arm/freescale/imx/imx_nop_usbphy.c optional ehci dev/usb/controller/ehci_imx.c optional ehci # Watchdog From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 17:51:01 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5557B4F; Sat, 6 Sep 2014 17:51:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A73C210BC; Sat, 6 Sep 2014 17:51:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86Hp0l4030057; Sat, 6 Sep 2014 17:51:00 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86Hp0Vc030052; Sat, 6 Sep 2014 17:51:00 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409061751.s86Hp0Vc030052@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Sep 2014 17:51:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271199 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 17:51:02 -0000 Author: ian Date: Sat Sep 6 17:50:59 2014 New Revision: 271199 URL: http://svnweb.freebsd.org/changeset/base/271199 Log: Revert rr271190, it was based on a misunderstanding. The problem of non-existant device<->xref info needs to be handled by creating the info, which will come in a subsequent commit. Modified: head/sys/dev/ofw/openfirm.c head/sys/dev/ofw/openfirm.h Modified: head/sys/dev/ofw/openfirm.c ============================================================================== --- head/sys/dev/ofw/openfirm.c Sat Sep 6 17:33:41 2014 (r271198) +++ head/sys/dev/ofw/openfirm.c Sat Sep 6 17:50:59 2014 (r271199) @@ -554,15 +554,15 @@ OF_node_from_xref(phandle_t xref) return (node); } -static phandle_t -xref_from_node(phandle_t node, phandle_t notfoundvalue) +phandle_t +OF_xref_from_node(phandle_t node) { struct xrefinfo *xi; phandle_t xref; if (xref_init_done) { if ((xi = xrefinfo_find(node, FIND_BY_NODE)) == NULL) - return (notfoundvalue); + return (node); return (xi->xref); } @@ -570,24 +570,10 @@ xref_from_node(phandle_t node, phandle_t -1 && OF_getencprop(node, "ibm,phandle", &xref, sizeof(xref)) == -1 && OF_getencprop(node, "linux,phandle", &xref, sizeof(xref)) == -1) - return (notfoundvalue); + return (node); return (xref); } -phandle_t -OF_xref_from_node(phandle_t node) -{ - - return (xref_from_node(node, node)); -} - -phandle_t -OF_xref_from_node_strict(phandle_t node) -{ - - return (xref_from_node(node, -1)); -} - device_t OF_device_from_xref(phandle_t xref) { Modified: head/sys/dev/ofw/openfirm.h ============================================================================== --- head/sys/dev/ofw/openfirm.h Sat Sep 6 17:33:41 2014 (r271198) +++ head/sys/dev/ofw/openfirm.h Sat Sep 6 17:50:59 2014 (r271199) @@ -128,12 +128,10 @@ ssize_t OF_package_to_path(phandle_t no * Some OF implementations (IBM, FDT) have a concept of effective phandles * used for device-tree cross-references. Given one of these, returns the * real phandle. If one can't be found (or running on OF implementations - * without this property), OF_xref_from_node() returns its input, while the - * strict version returns -1. + * without this property), returns its input. */ phandle_t OF_node_from_xref(phandle_t xref); phandle_t OF_xref_from_node(phandle_t node); -phandle_t OF_xref_from_node_strict(phandle_t node); /* * When properties contain references to other nodes using xref handles it is From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 18:04:29 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id CF001E3C; Sat, 6 Sep 2014 18:04:29 +0000 (UTC) Date: Sat, 6 Sep 2014 18:04:29 +0000 From: Alexey Dokuchaev To: Aleksandr Rybalko Subject: Re: svn commit: r271023 - stable/10/sys/dev/vt Message-ID: <20140906180429.GA24852@FreeBSD.org> References: <201409031400.s83E0bK6049810@svn.freebsd.org> <20140903140757.GA7494@FreeBSD.org> <20140903145753.GA25935@FreeBSD.org> <54082B57.6070007@FreeBSD.org> <20140905163433.GA80322@FreeBSD.org> <20140906014859.1c31f3aac5c84605ec6155dc@ddteam.net> <20140906141752.GA45915@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140906141752.GA45915@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "src-committers@freebsd.org" , Ed Maste , svn-src-stable@freebsd.org, "svn-src-all@freebsd.org" , svn-src-stable-10@freebsd.org, =?koi8-r?Q?Jean-S=E9bastien_P=E9dron?= X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 18:04:29 -0000 On Sat, Sep 06, 2014 at 02:17:52PM +0000, Alexey Dokuchaev wrote: > Noted. It would be nice if vt(4) also regained syscons(4) feature of buffer > pasting with Shift-Ins (right now I have to press the middle mouse button to > do it). I think I'm talking about this commit by ache@: https://svnweb.freebsd.org/base?view=revision&revision=74119 ./danfe From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 18:08:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63DD5F7F; Sat, 6 Sep 2014 18:08:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F60612C8; Sat, 6 Sep 2014 18:08:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86I8MaL036009; Sat, 6 Sep 2014 18:08:22 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86I8LvX036006; Sat, 6 Sep 2014 18:08:21 GMT (envelope-from br@FreeBSD.org) Message-Id: <201409061808.s86I8LvX036006@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Sat, 6 Sep 2014 18:08:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271200 - head/sys/arm/altera/socfpga X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 18:08:22 -0000 Author: br Date: Sat Sep 6 18:08:21 2014 New Revision: 271200 URL: http://svnweb.freebsd.org/changeset/base/271200 Log: o Remove __unused attribute on variables which actually used o Unmagic 'configuration done' bit o Move probe() to place before attach() for better navigation o Use bus_read_n instead of bus_space_read_n functions Pointed out by: andrew Sponsored by: DARPA, AFRL Modified: head/sys/arm/altera/socfpga/socfpga_common.h head/sys/arm/altera/socfpga/socfpga_manager.c Modified: head/sys/arm/altera/socfpga/socfpga_common.h ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_common.h Sat Sep 6 17:50:59 2014 (r271199) +++ head/sys/arm/altera/socfpga/socfpga_common.h Sat Sep 6 18:08:21 2014 (r271200) @@ -30,15 +30,9 @@ * $FreeBSD$ */ -#define READ4(_sc, _reg) \ - bus_space_read_4(_sc->bst, _sc->bsh, _reg) -#define WRITE4(_sc, _reg, _val) \ - bus_space_write_4(_sc->bst, _sc->bsh, _reg, _val) -#define READ2(_sc, _reg) \ - bus_space_read_2(_sc->bst, _sc->bsh, _reg) -#define WRITE2(_sc, _reg, _val) \ - bus_space_write_2(_sc->bst, _sc->bsh, _reg, _val) -#define READ1(_sc, _reg) \ - bus_space_read_1(_sc->bst, _sc->bsh, _reg) -#define WRITE1(_sc, _reg, _val) \ - bus_space_write_1(_sc->bst, _sc->bsh, _reg, _val) +#define READ4(_sc, _reg) bus_read_4((_sc)->res[0], _reg) +#define READ2(_sc, _reg) bus_read_2((_sc)->res[0], _reg) +#define READ1(_sc, _reg) bus_read_1((_sc)->res[0], _reg) +#define WRITE4(_sc, _reg, _val) bus_write_4((_sc)->res[0], _reg, _val) +#define WRITE2(_sc, _reg, _val) bus_write_2((_sc)->res[0], _reg, _val) +#define WRITE1(_sc, _reg, _val) bus_write_1((_sc)->res[0], _reg, _val) Modified: head/sys/arm/altera/socfpga/socfpga_manager.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_manager.c Sat Sep 6 17:50:59 2014 (r271199) +++ head/sys/arm/altera/socfpga/socfpga_manager.c Sat Sep 6 18:08:21 2014 (r271200) @@ -91,6 +91,7 @@ __FBSDID("$FreeBSD$"); #define GPIO_PORTA_EOI 0x84C /* Clear Interrupt Register */ #define PORTA_EOI_NS (1 << 0) #define GPIO_EXT_PORTA 0x850 /* External Port A Register */ +#define EXT_PORTA_CDP (1 << 10) /* Configuration done */ #define GPIO_LS_SYNC 0x860 /* Synchronization Level Register */ #define GPIO_VER_ID_CODE 0x86C /* GPIO Version Register */ #define GPIO_CONFIG_REG2 0x870 /* Configuration Register 2 */ @@ -147,8 +148,6 @@ static struct cfgmgr_mode cfgmgr_modes[] struct fpgamgr_softc { struct resource *res[3]; - bus_space_tag_t bst; - bus_space_handle_t bsh; bus_space_tag_t bst_data; bus_space_handle_t bsh_data; struct cdev *mgr_cdev; @@ -163,20 +162,6 @@ static struct resource_spec fpgamgr_spec }; static int -fpgamgr_probe(device_t dev) -{ - - if (!ofw_bus_status_okay(dev)) - return (ENXIO); - - if (!ofw_bus_is_compatible(dev, "altr,fpga-mgr")) - return (ENXIO); - - device_set_desc(dev, "FPGA Manager"); - return (BUS_PROBE_DEFAULT); -} - -static int fpgamgr_state_get(struct fpgamgr_softc *sc) { int reg; @@ -208,7 +193,7 @@ fpgamgr_state_wait(struct fpgamgr_softc } static int -fpga_open(struct cdev *dev __unused, int flags __unused, +fpga_open(struct cdev *dev, int flags __unused, int fmt __unused, struct thread *td __unused) { struct fpgamgr_softc *sc; @@ -310,7 +295,7 @@ fpga_wait_dclk_pulses(struct fpgamgr_sof } static int -fpga_close(struct cdev *dev __unused, int flags __unused, +fpga_close(struct cdev *dev, int flags __unused, int fmt __unused, struct thread *td __unused) { struct fpgamgr_softc *sc; @@ -319,7 +304,7 @@ fpga_close(struct cdev *dev __unused, in sc = dev->si_drv1; reg = READ4(sc, GPIO_EXT_PORTA); - if ((reg & (1 << 10)) == 0) { + if ((reg & EXT_PORTA_CDP) == 0) { device_printf(sc->dev, "Err: configuration failed\n"); return (ENXIO); } @@ -388,6 +373,20 @@ static struct cdevsw fpga_cdevsw = { }; static int +fpgamgr_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "altr,fpga-mgr")) + return (ENXIO); + + device_set_desc(dev, "FPGA Manager"); + return (BUS_PROBE_DEFAULT); +} + +static int fpgamgr_attach(device_t dev) { struct fpgamgr_softc *sc; @@ -401,8 +400,6 @@ fpgamgr_attach(device_t dev) } /* Memory interface */ - sc->bst = rman_get_bustag(sc->res[0]); - sc->bsh = rman_get_bushandle(sc->res[0]); sc->bst_data = rman_get_bustag(sc->res[1]); sc->bsh_data = rman_get_bushandle(sc->res[1]); From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 18:20:51 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E711557; Sat, 6 Sep 2014 18:20:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A4AB13CF; Sat, 6 Sep 2014 18:20:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86IKpfM042261; Sat, 6 Sep 2014 18:20:51 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86IKpnw042259; Sat, 6 Sep 2014 18:20:51 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201409061820.s86IKpnw042259@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 6 Sep 2014 18:20:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271201 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 18:20:51 -0000 Author: imp Date: Sat Sep 6 18:20:50 2014 New Revision: 271201 URL: http://svnweb.freebsd.org/changeset/base/271201 Log: Restore order of interrupt setup. Minor problems can result by setting up the interrupts too early: Reviewed by: mav@ Sponsored by: Netflix Modified: head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci_pci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Sat Sep 6 18:08:21 2014 (r271200) +++ head/sys/dev/ahci/ahci.c Sat Sep 6 18:20:50 2014 (r271201) @@ -229,6 +229,15 @@ ahci_attach(device_t dev) ahci_ctlr_setup(dev); + /* Setup interrupts. */ + if (ahci_setup_interrupt(dev)) { + bus_dma_tag_destroy(ctlr->dma_tag); + bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, + ctlr->r_mem); + rman_fini(&ctlr->sc_iomem); + return ENXIO; + } + i = 0; for (u = ctlr->ichannels; u != 0; u >>= 1) i += (u & 1); Modified: head/sys/dev/ahci/ahci_pci.c ============================================================================== --- head/sys/dev/ahci/ahci_pci.c Sat Sep 6 18:08:21 2014 (r271200) +++ head/sys/dev/ahci/ahci_pci.c Sat Sep 6 18:20:50 2014 (r271201) @@ -417,13 +417,6 @@ ahci_pci_attach(device_t dev) ctlr->numirqs = 1; } - if (ahci_setup_interrupt(dev)) { - if (ctlr->msi) - pci_release_msi(dev); - bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem); - return ENXIO; - } - error = ahci_attach(dev); if (error != 0) if (ctlr->msi) From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 18:43:18 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A7CE966; Sat, 6 Sep 2014 18:43:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EA02017B8; Sat, 6 Sep 2014 18:43:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86IhHW2054857; Sat, 6 Sep 2014 18:43:17 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86IhHMJ054856; Sat, 6 Sep 2014 18:43:17 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409061843.s86IhHMJ054856@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 6 Sep 2014 18:43:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271202 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 18:43:18 -0000 Author: ian Date: Sat Sep 6 18:43:17 2014 New Revision: 271202 URL: http://svnweb.freebsd.org/changeset/base/271202 Log: When registering an association between a device and an xref phandle, create an entry in the xref list if one doesn't already exist for the given handle. On a system that uses phandle properties, the init-time scan of the tree which builds the xref list will pre-create entries for every xref handle that exists in the data. On systems where the xref and node handles are synonymous there is no phandle property in referenced nodes, and the xref list will initialize to an empty state. In the latter case, we still need to be able to associate a device_t with an xref handle, so we create list entries on the fly as needed. Since the node and xref handles are synonymous, we have all the info needed to create a list entry at device registration time. The downside to this change is that it basically allows on the fly creation of xref handles as synonyms of node handles, and the association of a device_t with them. Whether this is a bug or a feature is in the eye of the beholder, I guess. Modified: head/sys/dev/ofw/openfirm.c Modified: head/sys/dev/ofw/openfirm.c ============================================================================== --- head/sys/dev/ofw/openfirm.c Sat Sep 6 18:20:50 2014 (r271201) +++ head/sys/dev/ofw/openfirm.c Sat Sep 6 18:43:17 2014 (r271202) @@ -62,7 +62,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include +#include +#include #include #include @@ -92,6 +95,7 @@ struct xrefinfo { }; static SLIST_HEAD(, xrefinfo) xreflist = SLIST_HEAD_INITIALIZER(xreflist); +static struct mtx xreflist_lock; static boolean_t xref_init_done; #define FIND_BY_XREF 0 @@ -138,6 +142,12 @@ static void xrefinfo_init(void *unsed) { + /* + * There is no locking during this init because it runs much earlier + * than any of the clients/consumers of the xref list data, but we do + * initialize the mutex that will be used for access later. + */ + mtx_init(&xreflist_lock, "OF xreflist lock", NULL, MTX_DEF); xrefinfo_create(OF_peer(0)); xref_init_done = true; } @@ -146,17 +156,35 @@ SYSINIT(xrefinfo, SI_SUB_KMEM, SI_ORDER_ static struct xrefinfo * xrefinfo_find(phandle_t phandle, int find_by) { - struct xrefinfo * xi; + struct xrefinfo *rv, *xi; + rv = NULL; + mtx_lock(&xreflist_lock); SLIST_FOREACH(xi, &xreflist, next_entry) { - if (find_by == FIND_BY_XREF && phandle == xi->xref) - return (xi); - else if (find_by == FIND_BY_NODE && phandle == xi->node) - return (xi); - else if (find_by == FIND_BY_DEV && phandle == (uintptr_t)xi->dev) - return (xi); + if ((find_by == FIND_BY_XREF && phandle == xi->xref) || + (find_by == FIND_BY_NODE && phandle == xi->node) || + (find_by == FIND_BY_DEV && phandle == (uintptr_t)xi->dev)) { + rv = xi; + break; + } } - return (NULL); + mtx_unlock(&xreflist_lock); + return (rv); +} + +static struct xrefinfo * +xrefinfo_add(phandle_t node, phandle_t xref, device_t dev) +{ + struct xrefinfo *xi; + + xi = malloc(sizeof(*xi), M_OFWPROP, M_WAITOK); + xi->node = node; + xi->xref = xref; + xi->dev = dev; + mtx_lock(&xreflist_lock); + SLIST_INSERT_HEAD(&xreflist, xi, next_entry); + mtx_unlock(&xreflist_lock); + return (xi); } /* @@ -605,10 +633,17 @@ OF_device_register_xref(phandle_t xref, { struct xrefinfo *xi; + /* + * If the given xref handle doesn't already exist in the list then we + * add a list entry. In theory this can only happen on a system where + * nodes don't contain phandle properties and xref and node handles are + * synonymous, so the xref handle is added as the node handle as well. + */ if (xref_init_done) { if ((xi = xrefinfo_find(xref, FIND_BY_XREF)) == NULL) - return (ENXIO); - xi->dev = dev; + xrefinfo_add(xref, xref, dev); + else + xi->dev = dev; return (0); } panic("Attempt to register device before xreflist_init"); From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 19:12:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D68422F1; Sat, 6 Sep 2014 19:12:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0FCA1A96; Sat, 6 Sep 2014 19:12:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86JCFWR069522; Sat, 6 Sep 2014 19:12:15 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86JCF13069516; Sat, 6 Sep 2014 19:12:15 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201409061912.s86JCF13069516@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 6 Sep 2014 19:12:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271204 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 19:12:16 -0000 Author: tuexen Date: Sat Sep 6 19:12:14 2014 New Revision: 271204 URL: http://svnweb.freebsd.org/changeset/base/271204 Log: Fix the handling of sysctl variables when used with VIMAGE. While there do some cleanup of the code. MFC after: 1 week Modified: head/sys/netinet/sctp_constants.h head/sys/netinet/sctp_os_bsd.h head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_sysctl.h Modified: head/sys/netinet/sctp_constants.h ============================================================================== --- head/sys/netinet/sctp_constants.h Sat Sep 6 19:02:52 2014 (r271203) +++ head/sys/netinet/sctp_constants.h Sat Sep 6 19:12:14 2014 (r271204) @@ -267,18 +267,9 @@ __FBSDID("$FreeBSD$"); /* how many addresses per assoc remote and local */ #define SCTP_SCALE_FOR_ADDR 2 -/* default AUTO_ASCONF mode enable(1)/disable(0) value (sysctl) */ -#define SCTP_DEFAULT_AUTO_ASCONF 1 - /* default MULTIPLE_ASCONF mode enable(1)/disable(0) value (sysctl) */ #define SCTP_DEFAULT_MULTIPLE_ASCONFS 0 -/* default MOBILITY_BASE mode enable(1)/disable(0) value (sysctl) */ -#define SCTP_DEFAULT_MOBILITY_BASE 0 - -/* default MOBILITY_FASTHANDOFF mode enable(1)/disable(0) value (sysctl) */ -#define SCTP_DEFAULT_MOBILITY_FASTHANDOFF 0 - /* * Theshold for rwnd updates, we have to read (sb_hiwat >> * SCTP_RWND_HIWAT_SHIFT) before we will look to see if we need to send a Modified: head/sys/netinet/sctp_os_bsd.h ============================================================================== --- head/sys/netinet/sctp_os_bsd.h Sat Sep 6 19:02:52 2014 (r271203) +++ head/sys/netinet/sctp_os_bsd.h Sat Sep 6 19:12:14 2014 (r271204) @@ -152,16 +152,10 @@ MALLOC_DECLARE(SCTP_M_MCORE); #define V_system_base_info VNET(system_base_info) #define SCTP_BASE_INFO(__m) V_system_base_info.sctppcbinfo.__m #define SCTP_BASE_STATS V_system_base_info.sctpstat -#define SCTP_BASE_STATS_SYSCTL VNET_NAME(system_base_info.sctpstat) -#define SCTP_BASE_STAT(__m) V_system_base_info.sctpstat.__m -#define SCTP_BASE_SYSCTL(__m) VNET_NAME(system_base_info.sctpsysctl.__m) +#define SCTP_BASE_STAT(__m) V_system_base_info.sctpstat.__m +#define SCTP_BASE_SYSCTL(__m) V_system_base_info.sctpsysctl.__m #define SCTP_BASE_VAR(__m) V_system_base_info.__m -/* - * - */ -#define USER_ADDR_NULL (NULL) /* FIX ME: temp */ - #define SCTP_PRINTF(params...) printf(params) #if defined(SCTP_DEBUG) #define SCTPDBG(level, params...) \ @@ -175,9 +169,9 @@ MALLOC_DECLARE(SCTP_M_MCORE); #define SCTPDBG_ADDR(level, addr) \ { \ do { \ - if (SCTP_BASE_SYSCTL(sctp_debug_on) & level ) { \ - sctp_print_address(addr); \ - } \ + if (SCTP_BASE_SYSCTL(sctp_debug_on) & level ) { \ + sctp_print_address(addr); \ + } \ } while (0); \ } #else Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Sat Sep 6 19:02:52 2014 (r271203) +++ head/sys/netinet/sctp_sysctl.c Sat Sep 6 19:12:14 2014 (r271204) @@ -105,9 +105,7 @@ sctp_init_sysctls() SCTP_BASE_SYSCTL(sctp_min_residual) = SCTPCTL_MIN_RESIDUAL_DEFAULT; SCTP_BASE_SYSCTL(sctp_max_retran_chunk) = SCTPCTL_MAX_RETRAN_CHUNK_DEFAULT; SCTP_BASE_SYSCTL(sctp_logging_level) = SCTPCTL_LOGGING_LEVEL_DEFAULT; - /* JRS - Variable for default congestion control module */ SCTP_BASE_SYSCTL(sctp_default_cc_module) = SCTPCTL_DEFAULT_CC_MODULE_DEFAULT; - /* RS - Variable for default stream scheduling module */ SCTP_BASE_SYSCTL(sctp_default_ss_module) = SCTPCTL_DEFAULT_SS_MODULE_DEFAULT; SCTP_BASE_SYSCTL(sctp_default_frag_interleave) = SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DEFAULT; SCTP_BASE_SYSCTL(sctp_mobility_base) = SCTPCTL_MOBILITY_BASE_DEFAULT; @@ -139,7 +137,7 @@ sctp_init_sysctls() /* It returns an upper limit. No filtering is done here */ static unsigned int -number_of_addresses(struct sctp_inpcb *inp) +sctp_sysctl_number_of_addresses(struct sctp_inpcb *inp) { unsigned int cnt; struct sctp_vrf *vrf; @@ -189,7 +187,7 @@ number_of_addresses(struct sctp_inpcb *i } static int -copy_out_local_addresses(struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sysctl_req *req) +sctp_sysctl_copy_out_local_addresses(struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sysctl_req *req) { struct sctp_ifn *sctp_ifn; struct sctp_ifa *sctp_ifa; @@ -355,7 +353,7 @@ copy_out_local_addresses(struct sctp_inp * sysctl functions */ static int -sctp_assoclist(SYSCTL_HANDLER_ARGS) +sctp_sysctl_handle_assoclist(SYSCTL_HANDLER_ARGS) { unsigned int number_of_endpoints; unsigned int number_of_local_addresses; @@ -377,14 +375,14 @@ sctp_assoclist(SYSCTL_HANDLER_ARGS) number_of_remote_addresses = 0; SCTP_INP_INFO_RLOCK(); - if (req->oldptr == USER_ADDR_NULL) { + if (req->oldptr == NULL) { LIST_FOREACH(inp, &SCTP_BASE_INFO(listhead), sctp_list) { SCTP_INP_RLOCK(inp); number_of_endpoints++; - number_of_local_addresses += number_of_addresses(inp); + number_of_local_addresses += sctp_sysctl_number_of_addresses(inp); LIST_FOREACH(stcb, &inp->sctp_asoc_list, sctp_tcblist) { number_of_associations++; - number_of_local_addresses += number_of_addresses(inp); + number_of_local_addresses += sctp_sysctl_number_of_addresses(inp); TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { number_of_remote_addresses++; } @@ -401,7 +399,7 @@ sctp_assoclist(SYSCTL_HANDLER_ARGS) req->oldidx = (n + n / 8); return (0); } - if (req->newptr != USER_ADDR_NULL) { + if (req->newptr != NULL) { SCTP_INP_INFO_RUNLOCK(); SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_SYSCTL, EPERM); return (EPERM); @@ -439,7 +437,7 @@ sctp_assoclist(SYSCTL_HANDLER_ARGS) } SCTP_INP_INFO_RLOCK(); SCTP_INP_RLOCK(inp); - error = copy_out_local_addresses(inp, NULL, req); + error = sctp_sysctl_copy_out_local_addresses(inp, NULL, req); if (error) { SCTP_INP_DECR_REF(inp); return (error); @@ -490,7 +488,7 @@ sctp_assoclist(SYSCTL_HANDLER_ARGS) } SCTP_INP_INFO_RLOCK(); SCTP_INP_RLOCK(inp); - error = copy_out_local_addresses(inp, stcb, req); + error = sctp_sysctl_copy_out_local_addresses(inp, stcb, req); if (error) { SCTP_INP_DECR_REF(inp); atomic_subtract_int(&stcb->asoc.refcnt, 1); @@ -558,196 +556,97 @@ skip: return (error); } - -#define RANGECHK(var, min, max) \ - if ((var) < (min)) { (var) = (min); } \ - else if ((var) > (max)) { (var) = (max); } - static int -sysctl_sctp_udp_tunneling_check(SYSCTL_HANDLER_ARGS) +sctp_sysctl_handle_udp_tunneling(SYSCTL_HANDLER_ARGS) { int error; - uint32_t old_sctp_udp_tunneling_port; + uint32_t old, new; SCTP_INP_INFO_RLOCK(); - old_sctp_udp_tunneling_port = SCTP_BASE_SYSCTL(sctp_udp_tunneling_port); + old = SCTP_BASE_SYSCTL(sctp_udp_tunneling_port); SCTP_INP_INFO_RUNLOCK(); - error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); - if (error == 0) { - RANGECHK(SCTP_BASE_SYSCTL(sctp_udp_tunneling_port), SCTPCTL_UDP_TUNNELING_PORT_MIN, SCTPCTL_UDP_TUNNELING_PORT_MAX); - if (old_sctp_udp_tunneling_port == SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)) { - error = 0; - goto out; - } - SCTP_INP_INFO_WLOCK(); - if (old_sctp_udp_tunneling_port) { - sctp_over_udp_stop(); - } - if (SCTP_BASE_SYSCTL(sctp_udp_tunneling_port)) { - if (sctp_over_udp_start()) { - SCTP_BASE_SYSCTL(sctp_udp_tunneling_port) = 0; + new = old; + error = sysctl_handle_int(oidp, &new, 0, req); + if ((error == 0) && + (req->newptr != NULL)) { + if ((new < SCTPCTL_UDP_TUNNELING_PORT_MIN) || + (new > SCTPCTL_UDP_TUNNELING_PORT_MAX)) { + error = EINVAL; + } else { + SCTP_INP_INFO_WLOCK(); + SCTP_BASE_SYSCTL(sctp_udp_tunneling_port) = new; + if (old != 0) { + sctp_over_udp_stop(); + } + if (new != 0) { + error = sctp_over_udp_start(); } + SCTP_INP_INFO_WUNLOCK(); } - SCTP_INP_INFO_WUNLOCK(); } -out: return (error); } static int -sysctl_sctp_check(SYSCTL_HANDLER_ARGS) +sctp_sysctl_handle_auth(SYSCTL_HANDLER_ARGS) { int error; + uint32_t new; - error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); - if (error == 0) { - RANGECHK(SCTP_BASE_SYSCTL(sctp_sendspace), SCTPCTL_MAXDGRAM_MIN, SCTPCTL_MAXDGRAM_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_recvspace), SCTPCTL_RECVSPACE_MIN, SCTPCTL_RECVSPACE_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_auto_asconf), SCTPCTL_AUTOASCONF_MIN, SCTPCTL_AUTOASCONF_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_ecn_enable), SCTPCTL_ECN_ENABLE_MIN, SCTPCTL_ECN_ENABLE_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_pr_enable), SCTPCTL_PR_ENABLE_MIN, SCTPCTL_PR_ENABLE_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_reconfig_enable), SCTPCTL_RECONFIG_ENABLE_MIN, SCTPCTL_RECONFIG_ENABLE_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_nrsack_enable), SCTPCTL_NRSACK_ENABLE_MIN, SCTPCTL_NRSACK_ENABLE_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_pktdrop_enable), SCTPCTL_PKTDROP_ENABLE_MIN, SCTPCTL_PKTDROP_ENABLE_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_strict_sacks), SCTPCTL_STRICT_SACKS_MIN, SCTPCTL_STRICT_SACKS_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_peer_chunk_oh), SCTPCTL_PEER_CHKOH_MIN, SCTPCTL_PEER_CHKOH_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_max_burst_default), SCTPCTL_MAXBURST_MIN, SCTPCTL_MAXBURST_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_fr_max_burst_default), SCTPCTL_FRMAXBURST_MIN, SCTPCTL_FRMAXBURST_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_max_chunks_on_queue), SCTPCTL_MAXCHUNKS_MIN, SCTPCTL_MAXCHUNKS_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_hashtblsize), SCTPCTL_TCBHASHSIZE_MIN, SCTPCTL_TCBHASHSIZE_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_pcbtblsize), SCTPCTL_PCBHASHSIZE_MIN, SCTPCTL_PCBHASHSIZE_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_min_split_point), SCTPCTL_MIN_SPLIT_POINT_MIN, SCTPCTL_MIN_SPLIT_POINT_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_chunkscale), SCTPCTL_CHUNKSCALE_MIN, SCTPCTL_CHUNKSCALE_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_delayed_sack_time_default), SCTPCTL_DELAYED_SACK_TIME_MIN, SCTPCTL_DELAYED_SACK_TIME_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_sack_freq_default), SCTPCTL_SACK_FREQ_MIN, SCTPCTL_SACK_FREQ_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_system_free_resc_limit), SCTPCTL_SYS_RESOURCE_MIN, SCTPCTL_SYS_RESOURCE_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_asoc_free_resc_limit), SCTPCTL_ASOC_RESOURCE_MIN, SCTPCTL_ASOC_RESOURCE_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_heartbeat_interval_default), SCTPCTL_HEARTBEAT_INTERVAL_MIN, SCTPCTL_HEARTBEAT_INTERVAL_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_pmtu_raise_time_default), SCTPCTL_PMTU_RAISE_TIME_MIN, SCTPCTL_PMTU_RAISE_TIME_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_shutdown_guard_time_default), SCTPCTL_SHUTDOWN_GUARD_TIME_MIN, SCTPCTL_SHUTDOWN_GUARD_TIME_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_secret_lifetime_default), SCTPCTL_SECRET_LIFETIME_MIN, SCTPCTL_SECRET_LIFETIME_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_rto_max_default), SCTPCTL_RTO_MAX_MIN, SCTPCTL_RTO_MAX_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_rto_min_default), SCTPCTL_RTO_MIN_MIN, SCTPCTL_RTO_MIN_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_rto_initial_default), SCTPCTL_RTO_INITIAL_MIN, SCTPCTL_RTO_INITIAL_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_init_rto_max_default), SCTPCTL_INIT_RTO_MAX_MIN, SCTPCTL_INIT_RTO_MAX_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_valid_cookie_life_default), SCTPCTL_VALID_COOKIE_LIFE_MIN, SCTPCTL_VALID_COOKIE_LIFE_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_init_rtx_max_default), SCTPCTL_INIT_RTX_MAX_MIN, SCTPCTL_INIT_RTX_MAX_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_assoc_rtx_max_default), SCTPCTL_ASSOC_RTX_MAX_MIN, SCTPCTL_ASSOC_RTX_MAX_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_path_rtx_max_default), SCTPCTL_PATH_RTX_MAX_MIN, SCTPCTL_PATH_RTX_MAX_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_path_pf_threshold), SCTPCTL_PATH_PF_THRESHOLD_MIN, SCTPCTL_PATH_PF_THRESHOLD_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_add_more_threshold), SCTPCTL_ADD_MORE_ON_OUTPUT_MIN, SCTPCTL_ADD_MORE_ON_OUTPUT_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_nr_incoming_streams_default), SCTPCTL_INCOMING_STREAMS_MIN, SCTPCTL_INCOMING_STREAMS_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_nr_outgoing_streams_default), SCTPCTL_OUTGOING_STREAMS_MIN, SCTPCTL_OUTGOING_STREAMS_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_cmt_on_off), SCTPCTL_CMT_ON_OFF_MIN, SCTPCTL_CMT_ON_OFF_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_cmt_use_dac), SCTPCTL_CMT_USE_DAC_MIN, SCTPCTL_CMT_USE_DAC_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_use_cwnd_based_maxburst), SCTPCTL_CWND_MAXBURST_MIN, SCTPCTL_CWND_MAXBURST_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_nat_friendly), SCTPCTL_NAT_FRIENDLY_MIN, SCTPCTL_NAT_FRIENDLY_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_L2_abc_variable), SCTPCTL_ABC_L_VAR_MIN, SCTPCTL_ABC_L_VAR_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_mbuf_threshold_count), SCTPCTL_MAX_CHAINED_MBUFS_MIN, SCTPCTL_MAX_CHAINED_MBUFS_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_do_drain), SCTPCTL_DO_SCTP_DRAIN_MIN, SCTPCTL_DO_SCTP_DRAIN_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_hb_maxburst), SCTPCTL_HB_MAX_BURST_MIN, SCTPCTL_HB_MAX_BURST_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_abort_if_one_2_one_hits_limit), SCTPCTL_ABORT_AT_LIMIT_MIN, SCTPCTL_ABORT_AT_LIMIT_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_strict_data_order), SCTPCTL_STRICT_DATA_ORDER_MIN, SCTPCTL_STRICT_DATA_ORDER_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_min_residual), SCTPCTL_MIN_RESIDUAL_MIN, SCTPCTL_MIN_RESIDUAL_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_max_retran_chunk), SCTPCTL_MAX_RETRAN_CHUNK_MIN, SCTPCTL_MAX_RETRAN_CHUNK_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_logging_level), SCTPCTL_LOGGING_LEVEL_MIN, SCTPCTL_LOGGING_LEVEL_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_default_cc_module), SCTPCTL_DEFAULT_CC_MODULE_MIN, SCTPCTL_DEFAULT_CC_MODULE_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_default_ss_module), SCTPCTL_DEFAULT_SS_MODULE_MIN, SCTPCTL_DEFAULT_SS_MODULE_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_default_frag_interleave), SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MIN, SCTPCTL_DEFAULT_FRAG_INTERLEAVE_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_vtag_time_wait), SCTPCTL_TIME_WAIT_MIN, SCTPCTL_TIME_WAIT_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_buffer_splitting), SCTPCTL_BUFFER_SPLITTING_MIN, SCTPCTL_BUFFER_SPLITTING_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_initial_cwnd), SCTPCTL_INITIAL_CWND_MIN, SCTPCTL_INITIAL_CWND_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_rttvar_bw), SCTPCTL_RTTVAR_BW_MIN, SCTPCTL_RTTVAR_BW_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_rttvar_rtt), SCTPCTL_RTTVAR_RTT_MIN, SCTPCTL_RTTVAR_RTT_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_rttvar_eqret), SCTPCTL_RTTVAR_EQRET_MIN, SCTPCTL_RTTVAR_EQRET_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_steady_step), SCTPCTL_RTTVAR_STEADYS_MIN, SCTPCTL_RTTVAR_STEADYS_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_use_dccc_ecn), SCTPCTL_RTTVAR_DCCCECN_MIN, SCTPCTL_RTTVAR_DCCCECN_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_mobility_base), SCTPCTL_MOBILITY_BASE_MIN, SCTPCTL_MOBILITY_BASE_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_mobility_fasthandoff), SCTPCTL_MOBILITY_FASTHANDOFF_MIN, SCTPCTL_MOBILITY_FASTHANDOFF_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_enable_sack_immediately), SCTPCTL_SACK_IMMEDIATELY_ENABLE_MIN, SCTPCTL_SACK_IMMEDIATELY_ENABLE_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_inits_include_nat_friendly), SCTPCTL_NAT_FRIENDLY_INITS_MIN, SCTPCTL_NAT_FRIENDLY_INITS_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_blackhole), SCTPCTL_BLACKHOLE_MIN, SCTPCTL_BLACKHOLE_MAX); - RANGECHK(SCTP_BASE_SYSCTL(sctp_diag_info_code), SCTPCTL_DIAG_INFO_CODE_MIN, SCTPCTL_DIAG_INFO_CODE_MAX); - -#ifdef SCTP_DEBUG - RANGECHK(SCTP_BASE_SYSCTL(sctp_debug_on), SCTPCTL_DEBUG_MIN, SCTPCTL_DEBUG_MAX); -#endif -#if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) - RANGECHK(SCTP_BASE_SYSCTL(sctp_output_unlocked), SCTPCTL_OUTPUT_UNLOCKED_MIN, SCTPCTL_OUTPUT_UNLOCKED_MAX); -#endif + new = SCTP_BASE_SYSCTL(sctp_auth_enable); + error = sysctl_handle_int(oidp, &new, 0, req); + if ((error == 0) && + (req->newptr != NULL)) { + if ((new < SCTPCTL_AUTH_ENABLE_MIN) || + (new > SCTPCTL_AUTH_ENABLE_MAX) || + ((new == 0) && (SCTP_BASE_SYSCTL(sctp_asconf_enable) == 1))) { + error = EINVAL; + } else { + SCTP_BASE_SYSCTL(sctp_auth_enable) = new; + } } return (error); } static int -sysctl_sctp_auth_check(SYSCTL_HANDLER_ARGS) +sctp_sysctl_handle_asconf(SYSCTL_HANDLER_ARGS) { int error; + uint32_t new; - error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); - if (error == 0) { - if (SCTP_BASE_SYSCTL(sctp_auth_enable) < SCTPCTL_AUTH_ENABLE_MIN) { - SCTP_BASE_SYSCTL(sctp_auth_enable) = SCTPCTL_AUTH_ENABLE_MIN; - } - if (SCTP_BASE_SYSCTL(sctp_auth_enable) > SCTPCTL_AUTH_ENABLE_MAX) { - SCTP_BASE_SYSCTL(sctp_auth_enable) = SCTPCTL_AUTH_ENABLE_MAX; - } - if ((SCTP_BASE_SYSCTL(sctp_auth_enable) == 0) && - (SCTP_BASE_SYSCTL(sctp_asconf_enable) == 1)) { - /* - * You can't disable AUTH with disabling ASCONF - * first - */ - SCTP_BASE_SYSCTL(sctp_auth_enable) = 1; + new = SCTP_BASE_SYSCTL(sctp_asconf_enable); + error = sysctl_handle_int(oidp, &new, 0, req); + if ((error == 0) && + (req->newptr != NULL)) { + if ((new < SCTPCTL_ASCONF_ENABLE_MIN) || + (new > SCTPCTL_ASCONF_ENABLE_MAX) || + ((new == 1) && (SCTP_BASE_SYSCTL(sctp_auth_enable) == 0))) { + error = EINVAL; + } else { + SCTP_BASE_SYSCTL(sctp_asconf_enable) = new; } } return (error); } static int -sysctl_sctp_asconf_check(SYSCTL_HANDLER_ARGS) +sctp_sysctl_handle_stats(SYSCTL_HANDLER_ARGS) { int error; - error = sysctl_handle_int(oidp, oidp->oid_arg1, oidp->oid_arg2, req); - if (error == 0) { - if (SCTP_BASE_SYSCTL(sctp_asconf_enable) < SCTPCTL_ASCONF_ENABLE_MIN) { - SCTP_BASE_SYSCTL(sctp_asconf_enable) = SCTPCTL_ASCONF_ENABLE_MIN; - } - if (SCTP_BASE_SYSCTL(sctp_asconf_enable) > SCTPCTL_ASCONF_ENABLE_MAX) { - SCTP_BASE_SYSCTL(sctp_asconf_enable) = SCTPCTL_ASCONF_ENABLE_MAX; - } - if ((SCTP_BASE_SYSCTL(sctp_asconf_enable) == 1) && - (SCTP_BASE_SYSCTL(sctp_auth_enable) == 0)) { - /* - * You can't enable ASCONF without enabling AUTH - * first - */ - SCTP_BASE_SYSCTL(sctp_asconf_enable) = 0; - } - } - return (error); -} +#if defined(SMP) && defined(SCTP_USE_PERCPU_STAT) + int cpu; + struct sctpstat sb, *sarry; -#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) -static int -sysctl_stat_get(SYSCTL_HANDLER_ARGS) -{ - int cpu, error; - struct sctpstat sb, *sarry, *cpin = NULL; +#endif - if ((req->newptr) && (req->newlen == sizeof(struct sctpstat))) { - /* - * User wants us to clear or at least reset the counters to - * the specified values. - */ - cpin = (struct sctpstat *)req->newptr; - } else if (req->newptr) { - /* Must be a stat structure */ + if ((req->newptr != NULL) && + (req->newlen != sizeof(struct sctpstat))) { return (EINVAL); } - memset(&sb, 0, sizeof(sb)); +#if defined(SMP) && defined(SCTP_USE_PERCPU_STAT) + memset(&sb, 0, sizeof(struct sctpstat)); for (cpu = 0; cpu < mp_maxid; cpu++) { sarry = &SCTP_BASE_STATS[cpu]; if (sarry->sctps_discontinuitytime.tv_sec > sb.sctps_discontinuitytime.tv_sec) { @@ -875,19 +774,29 @@ sysctl_stat_get(SYSCTL_HANDLER_ARGS) sb.sctps_send_burst_avoid += sarry->sctps_send_burst_avoid; sb.sctps_send_cwnd_avoid += sarry->sctps_send_cwnd_avoid; sb.sctps_fwdtsn_map_over += sarry->sctps_fwdtsn_map_over; - if (cpin) { - memcpy(sarry, cpin, sizeof(struct sctpstat)); + if (req->newptr != NULL) { + memcpy(sarry, req->newptr, sizeof(struct sctpstat)); } } - error = SYSCTL_OUT(req, &sb, sizeof(sb)); + error = SYSCTL_OUT(req, &sb, sizeof(struct sctpstat)); +#else + error = SYSCTL_OUT(req, &SCTP_BASE_STATS, sizeof(struct sctpstat)); +#endif return (error); } -#endif - #if defined(SCTP_LOCAL_TRACE_BUF) static int -sysctl_sctp_cleartrace(SYSCTL_HANDLER_ARGS) +sctp_sysctl_handle_trace_log(SYSCTL_HANDLER_ARGS) +{ + int error; + + error = SYSCTL_OUT(req, &SCTP_BASE_SYSCTL(sctp_log), sizeof(struct sctp_log)); + return (error); +} + +static int +sctp_sysctl_handle_trace_log_clear(SYSCTL_HANDLER_ARGS) { int error = 0; @@ -897,326 +806,119 @@ sysctl_sctp_cleartrace(SYSCTL_HANDLER_AR #endif +#define SCTP_UINT_SYSCTL(mib_name, var_name, prefix) \ + static int \ + sctp_sysctl_handle_##mib_name(SYSCTL_HANDLER_ARGS) \ + { \ + int error; \ + uint32_t new; \ + \ + new = SCTP_BASE_SYSCTL(var_name); \ + error = sysctl_handle_int(oidp, &new, 0, req); \ + if ((error == 0) && (req->newptr != NULL)) { \ + if ((new < prefix##_MIN) || \ + (new > prefix##_MAX)) { \ + error = EINVAL; \ + } else { \ + SCTP_BASE_SYSCTL(var_name) = new; \ + } \ + } \ + return (error); \ + } \ + SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, mib_name, \ + CTLTYPE_UINT | CTLFLAG_RW, NULL, 0, \ + sctp_sysctl_handle_##mib_name, "UI", prefix##_DESC); /* * sysctl definitions */ -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, sendspace, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_sendspace), 0, sysctl_sctp_check, "IU", - SCTPCTL_MAXDGRAM_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, recvspace, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_recvspace), 0, sysctl_sctp_check, "IU", - SCTPCTL_RECVSPACE_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, auto_asconf, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_auto_asconf), 0, sysctl_sctp_check, "IU", - SCTPCTL_AUTOASCONF_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, ecn_enable, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_ecn_enable), 0, sysctl_sctp_check, "IU", - SCTPCTL_ECN_ENABLE_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, pr_enable, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_pr_enable), 0, sysctl_sctp_check, "IU", - SCTPCTL_PR_ENABLE_DESC); - +SCTP_UINT_SYSCTL(sendspace, sctp_sendspace, SCTPCTL_MAXDGRAM) +SCTP_UINT_SYSCTL(recvspace, sctp_recvspace, SCTPCTL_RECVSPACE) +SCTP_UINT_SYSCTL(auto_asconf, sctp_auto_asconf, SCTPCTL_AUTOASCONF) +SCTP_UINT_SYSCTL(ecn_enable, sctp_ecn_enable, SCTPCTL_ECN_ENABLE) +SCTP_UINT_SYSCTL(pr_enable, sctp_pr_enable, SCTPCTL_PR_ENABLE) SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, auth_enable, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_auth_enable), 0, sysctl_sctp_auth_check, "IU", - SCTPCTL_AUTH_ENABLE_DESC); - + NULL, 0, sctp_sysctl_handle_auth, "IU", SCTPCTL_AUTH_ENABLE_DESC); SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, asconf_enable, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_asconf_enable), 0, sysctl_sctp_asconf_check, "IU", - SCTPCTL_ASCONF_ENABLE_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, reconfig_enable, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_reconfig_enable), 0, sysctl_sctp_check, "IU", - SCTPCTL_RECONFIG_ENABLE_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, nrsack_enable, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_nrsack_enable), 0, sysctl_sctp_check, "IU", - SCTPCTL_NRSACK_ENABLE_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, pktdrop_enable, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_pktdrop_enable), 0, sysctl_sctp_check, "IU", - SCTPCTL_PKTDROP_ENABLE_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, strict_sacks, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_strict_sacks), 0, sysctl_sctp_check, "IU", - SCTPCTL_STRICT_SACKS_DESC); - - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, peer_chkoh, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_peer_chunk_oh), 0, sysctl_sctp_check, "IU", - SCTPCTL_PEER_CHKOH_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, maxburst, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_max_burst_default), 0, sysctl_sctp_check, "IU", - SCTPCTL_MAXBURST_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, fr_maxburst, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_fr_max_burst_default), 0, sysctl_sctp_check, "IU", - SCTPCTL_FRMAXBURST_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, maxchunks, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_max_chunks_on_queue), 0, sysctl_sctp_check, "IU", - SCTPCTL_MAXCHUNKS_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, tcbhashsize, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_hashtblsize), 0, sysctl_sctp_check, "IU", - SCTPCTL_TCBHASHSIZE_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, pcbhashsize, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_pcbtblsize), 0, sysctl_sctp_check, "IU", - SCTPCTL_PCBHASHSIZE_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, min_split_point, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_min_split_point), 0, sysctl_sctp_check, "IU", - SCTPCTL_MIN_SPLIT_POINT_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, chunkscale, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_chunkscale), 0, sysctl_sctp_check, "IU", - SCTPCTL_CHUNKSCALE_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, delayed_sack_time, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_delayed_sack_time_default), 0, sysctl_sctp_check, "IU", - SCTPCTL_DELAYED_SACK_TIME_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, sack_freq, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_sack_freq_default), 0, sysctl_sctp_check, "IU", - SCTPCTL_SACK_FREQ_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, sys_resource, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_system_free_resc_limit), 0, sysctl_sctp_check, "IU", - SCTPCTL_SYS_RESOURCE_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, asoc_resource, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_asoc_free_resc_limit), 0, sysctl_sctp_check, "IU", - SCTPCTL_ASOC_RESOURCE_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, heartbeat_interval, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_heartbeat_interval_default), 0, sysctl_sctp_check, "IU", - SCTPCTL_HEARTBEAT_INTERVAL_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, pmtu_raise_time, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_pmtu_raise_time_default), 0, sysctl_sctp_check, "IU", - SCTPCTL_PMTU_RAISE_TIME_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, shutdown_guard_time, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_shutdown_guard_time_default), 0, sysctl_sctp_check, "IU", - SCTPCTL_SHUTDOWN_GUARD_TIME_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, secret_lifetime, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_secret_lifetime_default), 0, sysctl_sctp_check, "IU", - SCTPCTL_SECRET_LIFETIME_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, rto_max, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_rto_max_default), 0, sysctl_sctp_check, "IU", - SCTPCTL_RTO_MAX_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, rto_min, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_rto_min_default), 0, sysctl_sctp_check, "IU", - SCTPCTL_RTO_MIN_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, rto_initial, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_rto_initial_default), 0, sysctl_sctp_check, "IU", - SCTPCTL_RTO_INITIAL_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, init_rto_max, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_init_rto_max_default), 0, sysctl_sctp_check, "IU", - SCTPCTL_INIT_RTO_MAX_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, valid_cookie_life, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_valid_cookie_life_default), 0, sysctl_sctp_check, "IU", - SCTPCTL_VALID_COOKIE_LIFE_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, init_rtx_max, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_init_rtx_max_default), 0, sysctl_sctp_check, "IU", - SCTPCTL_INIT_RTX_MAX_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, assoc_rtx_max, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_assoc_rtx_max_default), 0, sysctl_sctp_check, "IU", - SCTPCTL_ASSOC_RTX_MAX_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, path_rtx_max, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_path_rtx_max_default), 0, sysctl_sctp_check, "IU", - SCTPCTL_PATH_RTX_MAX_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, path_pf_threshold, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_path_pf_threshold), 0, sysctl_sctp_check, "IU", - SCTPCTL_PATH_PF_THRESHOLD_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, add_more_on_output, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_add_more_threshold), 0, sysctl_sctp_check, "IU", - SCTPCTL_ADD_MORE_ON_OUTPUT_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, incoming_streams, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_nr_incoming_streams_default), 0, sysctl_sctp_check, "IU", - SCTPCTL_INCOMING_STREAMS_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, outgoing_streams, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_nr_outgoing_streams_default), 0, sysctl_sctp_check, "IU", - SCTPCTL_OUTGOING_STREAMS_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, cmt_on_off, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_cmt_on_off), 0, sysctl_sctp_check, "IU", - SCTPCTL_CMT_ON_OFF_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, cmt_use_dac, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_cmt_use_dac), 0, sysctl_sctp_check, "IU", - SCTPCTL_CMT_USE_DAC_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, cwnd_maxburst, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_use_cwnd_based_maxburst), 0, sysctl_sctp_check, "IU", - SCTPCTL_CWND_MAXBURST_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, nat_friendly, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_nat_friendly), 0, sysctl_sctp_check, "IU", - SCTPCTL_NAT_FRIENDLY_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, abc_l_var, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_L2_abc_variable), 0, sysctl_sctp_check, "IU", - SCTPCTL_ABC_L_VAR_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, max_chained_mbufs, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_mbuf_threshold_count), 0, sysctl_sctp_check, "IU", - SCTPCTL_MAX_CHAINED_MBUFS_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, do_sctp_drain, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_do_drain), 0, sysctl_sctp_check, "IU", - SCTPCTL_DO_SCTP_DRAIN_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, hb_max_burst, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_hb_maxburst), 0, sysctl_sctp_check, "IU", - SCTPCTL_HB_MAX_BURST_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, abort_at_limit, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_abort_if_one_2_one_hits_limit), 0, sysctl_sctp_check, "IU", - SCTPCTL_ABORT_AT_LIMIT_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, strict_data_order, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_strict_data_order), 0, sysctl_sctp_check, "IU", - SCTPCTL_STRICT_DATA_ORDER_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, min_residual, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_min_residual), 0, sysctl_sctp_check, "IU", - SCTPCTL_MIN_RESIDUAL_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, max_retran_chunk, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_max_retran_chunk), 0, sysctl_sctp_check, "IU", - SCTPCTL_MAX_RETRAN_CHUNK_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, log_level, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_logging_level), 0, sysctl_sctp_check, "IU", - SCTPCTL_LOGGING_LEVEL_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, default_cc_module, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_default_cc_module), 0, sysctl_sctp_check, "IU", - SCTPCTL_DEFAULT_CC_MODULE_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, default_ss_module, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_default_ss_module), 0, sysctl_sctp_check, "IU", - SCTPCTL_DEFAULT_SS_MODULE_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, default_frag_interleave, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_default_frag_interleave), 0, sysctl_sctp_check, "IU", - SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, mobility_base, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_mobility_base), 0, sysctl_sctp_check, "IU", - SCTPCTL_MOBILITY_BASE_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, mobility_fasthandoff, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_mobility_fasthandoff), 0, sysctl_sctp_check, "IU", - SCTPCTL_MOBILITY_FASTHANDOFF_DESC); - + NULL, 0, sctp_sysctl_handle_asconf, "IU", SCTPCTL_ASCONF_ENABLE_DESC); +SCTP_UINT_SYSCTL(reconfig_enable, sctp_reconfig_enable, SCTPCTL_RECONFIG_ENABLE) +SCTP_UINT_SYSCTL(nrsack_enable, sctp_nrsack_enable, SCTPCTL_NRSACK_ENABLE) +SCTP_UINT_SYSCTL(pktdrop_enable, sctp_pktdrop_enable, SCTPCTL_PKTDROP_ENABLE) +SCTP_UINT_SYSCTL(strict_sacks, sctp_strict_sacks, SCTPCTL_STRICT_SACKS) +SCTP_UINT_SYSCTL(peer_chkoh, sctp_peer_chunk_oh, SCTPCTL_PEER_CHKOH) +SCTP_UINT_SYSCTL(maxburst, sctp_max_burst_default, SCTPCTL_MAXBURST) +SCTP_UINT_SYSCTL(fr_maxburst, sctp_fr_max_burst_default, SCTPCTL_FRMAXBURST) +SCTP_UINT_SYSCTL(maxchunks, sctp_max_chunks_on_queue, SCTPCTL_MAXCHUNKS) +SCTP_UINT_SYSCTL(tcbhashsize, sctp_hashtblsize, SCTPCTL_TCBHASHSIZE) +SCTP_UINT_SYSCTL(pcbhashsize, sctp_pcbtblsize, SCTPCTL_PCBHASHSIZE) +SCTP_UINT_SYSCTL(min_split_point, sctp_min_split_point, SCTPCTL_MIN_SPLIT_POINT) +SCTP_UINT_SYSCTL(chunkscale, sctp_chunkscale, SCTPCTL_CHUNKSCALE) +SCTP_UINT_SYSCTL(delayed_sack_time, sctp_delayed_sack_time_default, SCTPCTL_DELAYED_SACK_TIME) +SCTP_UINT_SYSCTL(sack_freq, sctp_sack_freq_default, SCTPCTL_SACK_FREQ) +SCTP_UINT_SYSCTL(sys_resource, sctp_system_free_resc_limit, SCTPCTL_SYS_RESOURCE) +SCTP_UINT_SYSCTL(asoc_resource, sctp_asoc_free_resc_limit, SCTPCTL_ASOC_RESOURCE) +SCTP_UINT_SYSCTL(heartbeat_interval, sctp_heartbeat_interval_default, SCTPCTL_HEARTBEAT_INTERVAL) +SCTP_UINT_SYSCTL(pmtu_raise_time, sctp_pmtu_raise_time_default, SCTPCTL_PMTU_RAISE_TIME) +SCTP_UINT_SYSCTL(shutdown_guard_time, sctp_shutdown_guard_time_default, SCTPCTL_SHUTDOWN_GUARD_TIME) +SCTP_UINT_SYSCTL(secret_lifetime, sctp_secret_lifetime_default, SCTPCTL_SECRET_LIFETIME) +SCTP_UINT_SYSCTL(rto_max, sctp_rto_max_default, SCTPCTL_RTO_MAX) +SCTP_UINT_SYSCTL(rto_min, sctp_rto_min_default, SCTPCTL_RTO_MIN) +SCTP_UINT_SYSCTL(rto_initial, sctp_rto_initial_default, SCTPCTL_RTO_INITIAL) +SCTP_UINT_SYSCTL(init_rto_max, sctp_init_rto_max_default, SCTPCTL_INIT_RTO_MAX) +SCTP_UINT_SYSCTL(valid_cookie_life, sctp_valid_cookie_life_default, SCTPCTL_VALID_COOKIE_LIFE) +SCTP_UINT_SYSCTL(init_rtx_max, sctp_init_rtx_max_default, SCTPCTL_INIT_RTX_MAX) +SCTP_UINT_SYSCTL(assoc_rtx_max, sctp_assoc_rtx_max_default, SCTPCTL_ASSOC_RTX_MAX) +SCTP_UINT_SYSCTL(path_rtx_max, sctp_path_rtx_max_default, SCTPCTL_PATH_RTX_MAX) +SCTP_UINT_SYSCTL(path_pf_threshold, sctp_path_pf_threshold, SCTPCTL_PATH_PF_THRESHOLD) +SCTP_UINT_SYSCTL(add_more_on_output, sctp_add_more_threshold, SCTPCTL_ADD_MORE_ON_OUTPUT) +SCTP_UINT_SYSCTL(incoming_streams, sctp_nr_incoming_streams_default, SCTPCTL_INCOMING_STREAMS) +SCTP_UINT_SYSCTL(outgoing_streams, sctp_nr_outgoing_streams_default, SCTPCTL_OUTGOING_STREAMS) +SCTP_UINT_SYSCTL(cmt_on_off, sctp_cmt_on_off, SCTPCTL_CMT_ON_OFF) +SCTP_UINT_SYSCTL(cmt_use_dac, sctp_cmt_use_dac, SCTPCTL_CMT_USE_DAC) +SCTP_UINT_SYSCTL(cwnd_maxburst, sctp_use_cwnd_based_maxburst, SCTPCTL_CWND_MAXBURST) +SCTP_UINT_SYSCTL(nat_friendly, sctp_nat_friendly, SCTPCTL_NAT_FRIENDLY) +SCTP_UINT_SYSCTL(abc_l_var, sctp_L2_abc_variable, SCTPCTL_ABC_L_VAR) +SCTP_UINT_SYSCTL(max_chained_mbufs, sctp_mbuf_threshold_count, SCTPCTL_MAX_CHAINED_MBUFS) +SCTP_UINT_SYSCTL(do_sctp_drain, sctp_do_drain, SCTPCTL_DO_SCTP_DRAIN) +SCTP_UINT_SYSCTL(hb_max_burst, sctp_hb_maxburst, SCTPCTL_HB_MAX_BURST) +SCTP_UINT_SYSCTL(abort_at_limit, sctp_abort_if_one_2_one_hits_limit, SCTPCTL_ABORT_AT_LIMIT) +SCTP_UINT_SYSCTL(strict_data_order, sctp_strict_data_order, SCTPCTL_STRICT_DATA_ORDER) +SCTP_UINT_SYSCTL(min_residual, sctp_min_residual, SCTPCTL_MIN_RESIDUAL) +SCTP_UINT_SYSCTL(max_retran_chunk, sctp_max_retran_chunk, SCTPCTL_MAX_RETRAN_CHUNK) +SCTP_UINT_SYSCTL(log_level, sctp_logging_level, SCTPCTL_LOGGING_LEVEL) +SCTP_UINT_SYSCTL(default_cc_module, sctp_default_cc_module, SCTPCTL_DEFAULT_CC_MODULE) +SCTP_UINT_SYSCTL(default_ss_module, sctp_default_ss_module, SCTPCTL_DEFAULT_SS_MODULE) +SCTP_UINT_SYSCTL(default_frag_interleave, sctp_default_frag_interleave, SCTPCTL_DEFAULT_FRAG_INTERLEAVE) +SCTP_UINT_SYSCTL(mobility_base, sctp_mobility_base, SCTPCTL_MOBILITY_BASE) +SCTP_UINT_SYSCTL(mobility_fasthandoff, sctp_mobility_fasthandoff, SCTPCTL_MOBILITY_FASTHANDOFF) #if defined(SCTP_LOCAL_TRACE_BUF) -SYSCTL_VNET_STRUCT(_net_inet_sctp, OID_AUTO, log, CTLFLAG_RD, - &SCTP_BASE_SYSCTL(sctp_log), sctp_log, - "SCTP logging (struct sctp_log)"); - +SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, log, CTLTYPE_STRUCT | CTLFLAG_RD, + NULL, 0, sctp_sysctl_handle_trace_log, "S,sctplog", "SCTP logging (struct sctp_log)"); SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, clear_trace, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_log), 0, sysctl_sctp_cleartrace, "IU", - "Clear SCTP Logging buffer"); + NULL, 0, sctp_sysctl_handle_trace_log_clear, "IU", "Clear SCTP Logging buffer"); #endif - SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, udp_tunneling_port, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_udp_tunneling_port), 0, sysctl_sctp_udp_tunneling_check, "IU", - SCTPCTL_UDP_TUNNELING_PORT_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, enable_sack_immediately, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_enable_sack_immediately), 0, sysctl_sctp_check, "IU", - SCTPCTL_SACK_IMMEDIATELY_ENABLE_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, nat_friendly_init, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_inits_include_nat_friendly), 0, sysctl_sctp_check, "IU", - SCTPCTL_NAT_FRIENDLY_INITS_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, vtag_time_wait, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_vtag_time_wait), 0, sysctl_sctp_check, "IU", - SCTPCTL_TIME_WAIT_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, buffer_splitting, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_buffer_splitting), 0, sysctl_sctp_check, "IU", - SCTPCTL_BUFFER_SPLITTING_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, initial_cwnd, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_initial_cwnd), 0, sysctl_sctp_check, "IU", - SCTPCTL_INITIAL_CWND_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, rttvar_bw, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_rttvar_bw), 0, sysctl_sctp_check, "IU", - SCTPCTL_RTTVAR_BW_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, rttvar_rtt, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_rttvar_rtt), 0, sysctl_sctp_check, "IU", - SCTPCTL_RTTVAR_RTT_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, rttvar_eqret, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_rttvar_eqret), 0, sysctl_sctp_check, "IU", - SCTPCTL_RTTVAR_EQRET_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, rttvar_steady_step, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_steady_step), 0, sysctl_sctp_check, "IU", - SCTPCTL_RTTVAR_STEADYS_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, use_dcccecn, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_use_dccc_ecn), 0, sysctl_sctp_check, "IU", - SCTPCTL_RTTVAR_DCCCECN_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, blackhole, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_blackhole), 0, sysctl_sctp_check, "IU", - SCTPCTL_BLACKHOLE_DESC); - -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, diag_info_code, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_diag_info_code), 0, sysctl_sctp_check, "IU", - SCTPCTL_DIAG_INFO_CODE_DESC); - + NULL, 0, sctp_sysctl_handle_udp_tunneling, "IU", SCTPCTL_UDP_TUNNELING_PORT_DESC); +SCTP_UINT_SYSCTL(enable_sack_immediately, sctp_enable_sack_immediately, SCTPCTL_SACK_IMMEDIATELY_ENABLE) +SCTP_UINT_SYSCTL(nat_friendly_init, sctp_inits_include_nat_friendly, SCTPCTL_NAT_FRIENDLY_INITS) +SCTP_UINT_SYSCTL(vtag_time_wait, sctp_vtag_time_wait, SCTPCTL_TIME_WAIT) +SCTP_UINT_SYSCTL(buffer_splitting, sctp_buffer_splitting, SCTPCTL_BUFFER_SPLITTING) +SCTP_UINT_SYSCTL(initial_cwnd, sctp_initial_cwnd, SCTPCTL_INITIAL_CWND) +SCTP_UINT_SYSCTL(rttvar_bw, sctp_rttvar_bw, SCTPCTL_RTTVAR_BW) +SCTP_UINT_SYSCTL(rttvar_rtt, sctp_rttvar_rtt, SCTPCTL_RTTVAR_RTT) +SCTP_UINT_SYSCTL(rttvar_eqret, sctp_rttvar_eqret, SCTPCTL_RTTVAR_EQRET) +SCTP_UINT_SYSCTL(rttvar_steady_step, sctp_steady_step, SCTPCTL_RTTVAR_STEADYS) +SCTP_UINT_SYSCTL(use_dcccecn, sctp_use_dccc_ecn, SCTPCTL_RTTVAR_DCCCECN) +SCTP_UINT_SYSCTL(blackhole, sctp_blackhole, SCTPCTL_BLACKHOLE) +SCTP_UINT_SYSCTL(diag_info_code, sctp_diag_info_code, SCTPCTL_DIAG_INFO_CODE) #ifdef SCTP_DEBUG -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, debug, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_debug_on), 0, sysctl_sctp_check, "IU", - SCTPCTL_DEBUG_DESC); +SCTP_UINT_SYSCTL(debug, sctp_debug_on, SCTPCTL_DEBUG) #endif - - #if defined(__APPLE__) || defined(SCTP_SO_LOCK_TESTING) -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, output_unlocked, CTLTYPE_UINT | CTLFLAG_RW, - &SCTP_BASE_SYSCTL(sctp_output_unlocked), 0, sysctl_sctp_check, "IU", - SCTPCTL_OUTPUT_UNLOCKED_DESC); -#endif - -#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) -SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, stats, - CTLTYPE_STRUCT | CTLFLAG_RW, - 0, 0, sysctl_stat_get, "S,sctpstat", - "SCTP statistics (struct sctp_stat)"); -#else -SYSCTL_VNET_STRUCT(_net_inet_sctp, OID_AUTO, stats, CTLFLAG_RW, - &SCTP_BASE_STATS_SYSCTL, sctpstat, - "SCTP statistics (struct sctp_stat)"); +SCTP_UINT_SYSCTL(output_unlocked, sctp_output_unlocked, SCTPCTL_OUTPUT_UNLOCKED) #endif - +SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, stats, CTLTYPE_STRUCT | CTLFLAG_RW, + NULL, 0, sctp_sysctl_handle_stats, "S,sctpstat", "SCTP statistics (struct sctp_stat)"); SYSCTL_VNET_PROC(_net_inet_sctp, OID_AUTO, assoclist, CTLTYPE_OPAQUE | CTLFLAG_RD, - 0, 0, sctp_assoclist, - "S,xassoc", "List of active SCTP associations"); + NULL, 0, sctp_sysctl_handle_assoclist, "S,xassoc", "List of active SCTP associations"); Modified: head/sys/netinet/sctp_sysctl.h ============================================================================== --- head/sys/netinet/sctp_sysctl.h Sat Sep 6 19:02:52 2014 (r271203) +++ head/sys/netinet/sctp_sysctl.h Sat Sep 6 19:12:14 2014 (r271204) @@ -143,7 +143,7 @@ struct sctp_sysctl { #define SCTPCTL_AUTOASCONF_DESC "Enable SCTP Auto-ASCONF" #define SCTPCTL_AUTOASCONF_MIN 0 #define SCTPCTL_AUTOASCONF_MAX 1 -#define SCTPCTL_AUTOASCONF_DEFAULT SCTP_DEFAULT_AUTO_ASCONF +#define SCTPCTL_AUTOASCONF_DEFAULT 1 /* autoasconf: Enable SCTP Auto-ASCONF */ #define SCTPCTL_MULTIPLEASCONFS_DESC "Enable SCTP Muliple-ASCONFs" @@ -474,13 +474,13 @@ struct sctp_sysctl { #define SCTPCTL_MOBILITY_BASE_DESC "Enable SCTP base mobility" #define SCTPCTL_MOBILITY_BASE_MIN 0 #define SCTPCTL_MOBILITY_BASE_MAX 1 -#define SCTPCTL_MOBILITY_BASE_DEFAULT SCTP_DEFAULT_MOBILITY_BASE +#define SCTPCTL_MOBILITY_BASE_DEFAULT 0 /* mobility_fasthandoff: Enable SCTP fast handoff support */ #define SCTPCTL_MOBILITY_FASTHANDOFF_DESC "Enable SCTP fast handoff" #define SCTPCTL_MOBILITY_FASTHANDOFF_MIN 0 #define SCTPCTL_MOBILITY_FASTHANDOFF_MAX 1 -#define SCTPCTL_MOBILITY_FASTHANDOFF_DEFAULT SCTP_DEFAULT_MOBILITY_FASTHANDOFF +#define SCTPCTL_MOBILITY_FASTHANDOFF_DEFAULT 0 /* Enable SCTP/UDP tunneling port */ #define SCTPCTL_UDP_TUNNELING_PORT_DESC "Set the SCTP/UDP tunneling port" From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 19:17:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67EA0612; Sat, 6 Sep 2014 19:17:00 +0000 (UTC) Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E5331AD1; Sat, 6 Sep 2014 19:16:59 +0000 (UTC) Received: from zeppelin.tachypleus.net (polaris.tachypleus.net [75.101.50.44]) (authenticated bits=0) by c.mail.sonic.net (8.14.9/8.14.9) with ESMTP id s86JGu0C022796 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 6 Sep 2014 12:16:57 -0700 Message-ID: <540B5DA8.3080601@freebsd.org> Date: Sat, 06 Sep 2014 12:16:56 -0700 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r271202 - head/sys/dev/ofw References: <201409061843.s86IhHMJ054856@svn.freebsd.org> In-Reply-To: <201409061843.s86IhHMJ054856@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVbSeCFrWlii72fyLpzyJ4Za+ZgKmzM/AodZHrEzSCQ8eRq3es6tTMuuUeLfO4khe+KdpuItFem6kSyJFRKZ2WFoskKDM/xKkuI= X-Sonic-ID: C;+P84Xvo15BGjnEpcoK8kYw== M;+KiUXvo15BGjnEpcoK8kYw== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 19:17:00 -0000 Not looking at the code: what happens if you ask for the node corresponding to a phandle but the device corresponding to that phandle has not registered yet and it has an implicit crossreference mapping? -Nathan On 09/06/14 11:43, Ian Lepore wrote: > Author: ian > Date: Sat Sep 6 18:43:17 2014 > New Revision: 271202 > URL: http://svnweb.freebsd.org/changeset/base/271202 > > Log: > When registering an association between a device and an xref phandle, create > an entry in the xref list if one doesn't already exist for the given handle. > > On a system that uses phandle properties, the init-time scan of the tree > which builds the xref list will pre-create entries for every xref handle > that exists in the data. On systems where the xref and node handles are > synonymous there is no phandle property in referenced nodes, and the xref > list will initialize to an empty state. In the latter case, we still need > to be able to associate a device_t with an xref handle, so we create list > entries on the fly as needed. Since the node and xref handles are > synonymous, we have all the info needed to create a list entry at device > registration time. > > The downside to this change is that it basically allows on the fly creation > of xref handles as synonyms of node handles, and the association of a > device_t with them. Whether this is a bug or a feature is in the eye of > the beholder, I guess. > > Modified: > head/sys/dev/ofw/openfirm.c > > Modified: head/sys/dev/ofw/openfirm.c > ============================================================================== > --- head/sys/dev/ofw/openfirm.c Sat Sep 6 18:20:50 2014 (r271201) > +++ head/sys/dev/ofw/openfirm.c Sat Sep 6 18:43:17 2014 (r271202) > @@ -62,7 +62,10 @@ __FBSDID("$FreeBSD$"); > > #include > #include > +#include > #include > +#include > +#include > #include > #include > > @@ -92,6 +95,7 @@ struct xrefinfo { > }; > > static SLIST_HEAD(, xrefinfo) xreflist = SLIST_HEAD_INITIALIZER(xreflist); > +static struct mtx xreflist_lock; > static boolean_t xref_init_done; > > #define FIND_BY_XREF 0 > @@ -138,6 +142,12 @@ static void > xrefinfo_init(void *unsed) > { > > + /* > + * There is no locking during this init because it runs much earlier > + * than any of the clients/consumers of the xref list data, but we do > + * initialize the mutex that will be used for access later. > + */ > + mtx_init(&xreflist_lock, "OF xreflist lock", NULL, MTX_DEF); > xrefinfo_create(OF_peer(0)); > xref_init_done = true; > } > @@ -146,17 +156,35 @@ SYSINIT(xrefinfo, SI_SUB_KMEM, SI_ORDER_ > static struct xrefinfo * > xrefinfo_find(phandle_t phandle, int find_by) > { > - struct xrefinfo * xi; > + struct xrefinfo *rv, *xi; > > + rv = NULL; > + mtx_lock(&xreflist_lock); > SLIST_FOREACH(xi, &xreflist, next_entry) { > - if (find_by == FIND_BY_XREF && phandle == xi->xref) > - return (xi); > - else if (find_by == FIND_BY_NODE && phandle == xi->node) > - return (xi); > - else if (find_by == FIND_BY_DEV && phandle == (uintptr_t)xi->dev) > - return (xi); > + if ((find_by == FIND_BY_XREF && phandle == xi->xref) || > + (find_by == FIND_BY_NODE && phandle == xi->node) || > + (find_by == FIND_BY_DEV && phandle == (uintptr_t)xi->dev)) { > + rv = xi; > + break; > + } > } > - return (NULL); > + mtx_unlock(&xreflist_lock); > + return (rv); > +} > + > +static struct xrefinfo * > +xrefinfo_add(phandle_t node, phandle_t xref, device_t dev) > +{ > + struct xrefinfo *xi; > + > + xi = malloc(sizeof(*xi), M_OFWPROP, M_WAITOK); > + xi->node = node; > + xi->xref = xref; > + xi->dev = dev; > + mtx_lock(&xreflist_lock); > + SLIST_INSERT_HEAD(&xreflist, xi, next_entry); > + mtx_unlock(&xreflist_lock); > + return (xi); > } > > /* > @@ -605,10 +633,17 @@ OF_device_register_xref(phandle_t xref, > { > struct xrefinfo *xi; > > + /* > + * If the given xref handle doesn't already exist in the list then we > + * add a list entry. In theory this can only happen on a system where > + * nodes don't contain phandle properties and xref and node handles are > + * synonymous, so the xref handle is added as the node handle as well. > + */ > if (xref_init_done) { > if ((xi = xrefinfo_find(xref, FIND_BY_XREF)) == NULL) > - return (ENXIO); > - xi->dev = dev; > + xrefinfo_add(xref, xref, dev); > + else > + xi->dev = dev; > return (0); > } > panic("Attempt to register device before xreflist_init"); > From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 19:38:41 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96B6AA2D; Sat, 6 Sep 2014 19:38:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7644C1C94; Sat, 6 Sep 2014 19:38:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86JcfGX080265; Sat, 6 Sep 2014 19:38:41 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86JcfLT080264; Sat, 6 Sep 2014 19:38:41 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201409061938.s86JcfLT080264@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 6 Sep 2014 19:38:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271205 - stable/10/sys/powerpc/powermac X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 19:38:41 -0000 Author: jhibbits Date: Sat Sep 6 19:38:40 2014 New Revision: 271205 URL: http://svnweb.freebsd.org/changeset/base/271205 Log: MFC r259657,r264205,r264207: r259657: Add suspend/resume capabilities to the ATI backlight ppc driver. With this, also shut off the display (DPMS-style) and disable the clocking when the backlight level is set to 0. This is taken from the radeonkms driver (radeon_legacy_encoders.c) which doesn't yet support PowerPC. r264205,r264207: Fix the ATI backlight driver off/on handling. Now this driver works correctly with the ATI Radeon 9700 in the PowerBook G4 1.67GHz. Code shamelessly taken in spirit from the radeonkms driver, which I hope will make this driver redundant in the future. Approved by: re (marius) Relnotes: yes (not suspend/resume, but the rest) Modified: stable/10/sys/powerpc/powermac/atibl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/powermac/atibl.c ============================================================================== --- stable/10/sys/powerpc/powermac/atibl.c Sat Sep 6 19:12:14 2014 (r271204) +++ stable/10/sys/powerpc/powermac/atibl.c Sat Sep 6 19:38:40 2014 (r271205) @@ -52,10 +52,21 @@ __FBSDID("$FreeBSD$"); #define RADEON_LVDS_BL_MOD_EN (1 << 16) #define RADEON_LVDS_DIGON (1 << 18) #define RADEON_LVDS_BLON (1 << 19) +#define RADEON_LVDS_PLL_CNTL 0x02d4 +#define RADEON_LVDS_PLL_EN (1 << 16) +#define RADEON_LVDS_PLL_RESET (1 << 17) +#define RADEON_PIXCLKS_CNTL 0x002d +#define RADEON_PIXCLK_LVDS_ALWAYS_ONb (1 << 14) +#define RADEON_DISP_PWR_MAN 0x0d08 +#define RADEON_AUTO_PWRUP_EN (1 << 26) +#define RADEON_CLOCK_CNTL_DATA 0x000c +#define RADEON_CLOCK_CNTL_INDEX 0x0008 +#define RADEON_PLL_WR_EN (1 << 7) +#define RADEON_CRTC_GEN_CNTL 0x0050 struct atibl_softc { - device_t dev; struct resource *sc_memr; + int sc_level; }; static void atibl_identify(driver_t *driver, device_t parent); @@ -63,13 +74,17 @@ static int atibl_probe(device_t dev); static int atibl_attach(device_t dev); static int atibl_setlevel(struct atibl_softc *sc, int newlevel); static int atibl_getlevel(struct atibl_softc *sc); +static int atibl_resume(device_t dev); +static int atibl_suspend(device_t dev); static int atibl_sysctl(SYSCTL_HANDLER_ARGS); static device_method_t atibl_methods[] = { /* Device interface */ - DEVMETHOD(device_identify, atibl_identify), - DEVMETHOD(device_probe, atibl_probe), - DEVMETHOD(device_attach, atibl_attach), + DEVMETHOD(device_identify, atibl_identify), + DEVMETHOD(device_probe, atibl_probe), + DEVMETHOD(device_attach, atibl_attach), + DEVMETHOD(device_suspend, atibl_suspend), + DEVMETHOD(device_resume, atibl_resume), {0, 0}, }; @@ -136,16 +151,62 @@ atibl_attach(device_t dev) tree = device_get_sysctl_tree(dev); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "level", CTLTYPE_INT | CTLFLAG_RW, sc, 0, - atibl_sysctl, "I", "Backlight level (0-100)"); + "level", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + atibl_sysctl, "I", "Backlight level (0-100)"); return (0); } +static uint32_t __inline +atibl_pll_rreg(struct atibl_softc *sc, uint32_t reg) +{ + uint32_t data, save, tmp; + + bus_write_1(sc->sc_memr, RADEON_CLOCK_CNTL_INDEX, + ((reg & 0x3f) | RADEON_PLL_WR_EN)); + (void)bus_read_4(sc->sc_memr, RADEON_CLOCK_CNTL_DATA); + (void)bus_read_4(sc->sc_memr, RADEON_CRTC_GEN_CNTL); + + data = bus_read_4(sc->sc_memr, RADEON_CLOCK_CNTL_DATA); + + /* Only necessary on R300, bt won't hurt others. */ + save = bus_read_4(sc->sc_memr, RADEON_CLOCK_CNTL_INDEX); + tmp = save & (~0x3f | RADEON_PLL_WR_EN); + bus_write_4(sc->sc_memr, RADEON_CLOCK_CNTL_INDEX, tmp); + tmp = bus_read_4(sc->sc_memr, RADEON_CLOCK_CNTL_DATA); + bus_write_4(sc->sc_memr, RADEON_CLOCK_CNTL_INDEX, save); + + return data; +} + +static void __inline +atibl_pll_wreg(struct atibl_softc *sc, uint32_t reg, uint32_t val) +{ + uint32_t save, tmp; + + bus_write_1(sc->sc_memr, RADEON_CLOCK_CNTL_INDEX, + ((reg & 0x3f) | RADEON_PLL_WR_EN)); + (void)bus_read_4(sc->sc_memr, RADEON_CLOCK_CNTL_DATA); + (void)bus_read_4(sc->sc_memr, RADEON_CRTC_GEN_CNTL); + + bus_write_4(sc->sc_memr, RADEON_CLOCK_CNTL_DATA, val); + DELAY(5000); + + /* Only necessary on R300, bt won't hurt others. */ + save = bus_read_4(sc->sc_memr, RADEON_CLOCK_CNTL_INDEX); + tmp = save & (~0x3f | RADEON_PLL_WR_EN); + bus_write_4(sc->sc_memr, RADEON_CLOCK_CNTL_INDEX, tmp); + tmp = bus_read_4(sc->sc_memr, RADEON_CLOCK_CNTL_DATA); + bus_write_4(sc->sc_memr, RADEON_CLOCK_CNTL_INDEX, save); +} + static int atibl_setlevel(struct atibl_softc *sc, int newlevel) { uint32_t lvds_gen_cntl; + uint32_t lvds_pll_cntl; + uint32_t pixclks_cntl; + uint32_t disp_pwr_reg; if (newlevel > 100) newlevel = 100; @@ -153,13 +214,43 @@ atibl_setlevel(struct atibl_softc *sc, i if (newlevel < 0) newlevel = 0; - newlevel = (newlevel * 5) / 2 + 5; lvds_gen_cntl = bus_read_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL); - lvds_gen_cntl |= RADEON_LVDS_BL_MOD_EN; - lvds_gen_cntl &= ~RADEON_LVDS_BL_MOD_LEVEL_MASK; - lvds_gen_cntl |= (newlevel << RADEON_LVDS_BL_MOD_LEVEL_SHIFT) & - RADEON_LVDS_BL_MOD_LEVEL_MASK; - bus_write_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL, lvds_gen_cntl); + + if (newlevel > 0) { + newlevel = (newlevel * 5) / 2 + 5; + disp_pwr_reg = bus_read_4(sc->sc_memr, RADEON_DISP_PWR_MAN); + disp_pwr_reg |= RADEON_AUTO_PWRUP_EN; + bus_write_4(sc->sc_memr, RADEON_DISP_PWR_MAN, disp_pwr_reg); + lvds_pll_cntl = bus_read_4(sc->sc_memr, RADEON_LVDS_PLL_CNTL); + lvds_pll_cntl |= RADEON_LVDS_PLL_EN; + bus_write_4(sc->sc_memr, RADEON_LVDS_PLL_CNTL, lvds_pll_cntl); + lvds_pll_cntl &= ~RADEON_LVDS_PLL_RESET; + bus_write_4(sc->sc_memr, RADEON_LVDS_PLL_CNTL, lvds_pll_cntl); + DELAY(1000); + + lvds_gen_cntl &= ~(RADEON_LVDS_DISPLAY_DIS | + RADEON_LVDS_BL_MOD_LEVEL_MASK); + lvds_gen_cntl |= RADEON_LVDS_ON | RADEON_LVDS_EN | + RADEON_LVDS_DIGON | RADEON_LVDS_BLON; + lvds_gen_cntl |= (newlevel << RADEON_LVDS_BL_MOD_LEVEL_SHIFT) & + RADEON_LVDS_BL_MOD_LEVEL_MASK; + lvds_gen_cntl |= RADEON_LVDS_BL_MOD_EN; + DELAY(200000); + bus_write_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL, lvds_gen_cntl); + } else { + pixclks_cntl = atibl_pll_rreg(sc, RADEON_PIXCLKS_CNTL); + atibl_pll_wreg(sc, RADEON_PIXCLKS_CNTL, + pixclks_cntl & ~RADEON_PIXCLK_LVDS_ALWAYS_ONb); + lvds_gen_cntl |= RADEON_LVDS_DISPLAY_DIS; + lvds_gen_cntl &= ~(RADEON_LVDS_BL_MOD_EN | RADEON_LVDS_BL_MOD_LEVEL_MASK); + bus_write_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL, lvds_gen_cntl); + lvds_gen_cntl &= ~(RADEON_LVDS_ON | RADEON_LVDS_EN); + DELAY(200000); + bus_write_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL, lvds_gen_cntl); + + atibl_pll_wreg(sc, RADEON_PIXCLKS_CNTL, pixclks_cntl); + DELAY(200000); + } return (0); } @@ -173,13 +264,39 @@ atibl_getlevel(struct atibl_softc *sc) lvds_gen_cntl = bus_read_4(sc->sc_memr, RADEON_LVDS_GEN_CNTL); level = ((lvds_gen_cntl & RADEON_LVDS_BL_MOD_LEVEL_MASK) >> - RADEON_LVDS_BL_MOD_LEVEL_SHIFT); - level = ((level - 5) * 2) / 5; + RADEON_LVDS_BL_MOD_LEVEL_SHIFT); + if (level != 0) + level = ((level - 5) * 2) / 5; return (level); } static int +atibl_suspend(device_t dev) +{ + struct atibl_softc *sc; + + sc = device_get_softc(dev); + + sc->sc_level = atibl_getlevel(sc); + atibl_setlevel(sc, 0); + + return (0); +} + +static int +atibl_resume(device_t dev) +{ + struct atibl_softc *sc; + + sc = device_get_softc(dev); + + atibl_setlevel(sc, sc->sc_level); + + return (0); +} + +static int atibl_sysctl(SYSCTL_HANDLER_ARGS) { struct atibl_softc *sc; From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 19:39:12 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E64E9B58; Sat, 6 Sep 2014 19:39:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1F941C98; Sat, 6 Sep 2014 19:39:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86JdCVV080410; Sat, 6 Sep 2014 19:39:12 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86JdCWf080409; Sat, 6 Sep 2014 19:39:12 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409061939.s86JdCWf080409@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 6 Sep 2014 19:39:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271206 - head/sys/x86/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 19:39:13 -0000 Author: kib Date: Sat Sep 6 19:39:12 2014 New Revision: 271206 URL: http://svnweb.freebsd.org/changeset/base/271206 Log: SDM rev. 50 defines the use of the next 8 bytes in the xstate header. It is the compaction bitmask, with the highest bit defining if compact format of the xsave area is used at all. Adjust the definition of struct xstate_hdr, provide define for bit 63. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/include/fpu.h Modified: head/sys/x86/include/fpu.h ============================================================================== --- head/sys/x86/include/fpu.h Sat Sep 6 19:38:40 2014 (r271205) +++ head/sys/x86/include/fpu.h Sat Sep 6 19:39:12 2014 (r271206) @@ -150,9 +150,11 @@ struct savefpu { struct xstate_hdr { uint64_t xstate_bv; - uint8_t xstate_rsrv0[16]; + uint64_t xstate_xcomp_bv; + uint8_t xstate_rsrv0[8]; uint8_t xstate_rsrv[40]; }; +#define XSTATE_XCOMP_BV_COMPACT (1ULL << 63) struct savexmm_xstate { struct xstate_hdr sx_hd; From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 19:40:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94612CA8; Sat, 6 Sep 2014 19:40:09 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54B991CA6; Sat, 6 Sep 2014 19:40:09 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XQLqB-0005BA-T0; Sat, 06 Sep 2014 19:40:08 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s86Je6nK015936; Sat, 6 Sep 2014 13:40:06 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/zprqVhuVIyJNbWbgKHqj7 X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: svn commit: r271202 - head/sys/dev/ofw From: Ian Lepore To: Nathan Whitehorn In-Reply-To: <540B5DA8.3080601@freebsd.org> References: <201409061843.s86IhHMJ054856@svn.freebsd.org> <540B5DA8.3080601@freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Sat, 06 Sep 2014 13:40:06 -0600 Message-ID: <1410032406.1150.370.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 19:40:09 -0000 On Sat, 2014-09-06 at 12:16 -0700, Nathan Whitehorn wrote: > Not looking at the code: what happens if you ask for the node > corresponding to a phandle but the device corresponding to that phandle > has not registered yet and it has an implicit crossreference mapping? > -Nathan > The node<->xref behavior is the same as it has always been: if there isn't a phandle property in a node to supply an xref handle then the node and xref handles are the synonyms. The only thing that has changed is that with my first implementation an xref handle had exist (meaning it had to have been discovered as a phandle property during the init-time scan of the tree) before you could associate a device_t with it. Now you can make associations on the fly whether the data author intended for such associations to exist or not. I can't decide whether that's a good or a bad thing. -- Ian > On 09/06/14 11:43, Ian Lepore wrote: > > Author: ian > > Date: Sat Sep 6 18:43:17 2014 > > New Revision: 271202 > > URL: http://svnweb.freebsd.org/changeset/base/271202 > > > > Log: > > When registering an association between a device and an xref phandle, create > > an entry in the xref list if one doesn't already exist for the given handle. > > > > On a system that uses phandle properties, the init-time scan of the tree > > which builds the xref list will pre-create entries for every xref handle > > that exists in the data. On systems where the xref and node handles are > > synonymous there is no phandle property in referenced nodes, and the xref > > list will initialize to an empty state. In the latter case, we still need > > to be able to associate a device_t with an xref handle, so we create list > > entries on the fly as needed. Since the node and xref handles are > > synonymous, we have all the info needed to create a list entry at device > > registration time. > > > > The downside to this change is that it basically allows on the fly creation > > of xref handles as synonyms of node handles, and the association of a > > device_t with them. Whether this is a bug or a feature is in the eye of > > the beholder, I guess. > > > > Modified: > > head/sys/dev/ofw/openfirm.c > > > > Modified: head/sys/dev/ofw/openfirm.c > > ============================================================================== > > --- head/sys/dev/ofw/openfirm.c Sat Sep 6 18:20:50 2014 (r271201) > > +++ head/sys/dev/ofw/openfirm.c Sat Sep 6 18:43:17 2014 (r271202) > > @@ -62,7 +62,10 @@ __FBSDID("$FreeBSD$"); > > > > #include > > #include > > +#include > > #include > > +#include > > +#include > > #include > > #include > > > > @@ -92,6 +95,7 @@ struct xrefinfo { > > }; > > > > static SLIST_HEAD(, xrefinfo) xreflist = SLIST_HEAD_INITIALIZER(xreflist); > > +static struct mtx xreflist_lock; > > static boolean_t xref_init_done; > > > > #define FIND_BY_XREF 0 > > @@ -138,6 +142,12 @@ static void > > xrefinfo_init(void *unsed) > > { > > > > + /* > > + * There is no locking during this init because it runs much earlier > > + * than any of the clients/consumers of the xref list data, but we do > > + * initialize the mutex that will be used for access later. > > + */ > > + mtx_init(&xreflist_lock, "OF xreflist lock", NULL, MTX_DEF); > > xrefinfo_create(OF_peer(0)); > > xref_init_done = true; > > } > > @@ -146,17 +156,35 @@ SYSINIT(xrefinfo, SI_SUB_KMEM, SI_ORDER_ > > static struct xrefinfo * > > xrefinfo_find(phandle_t phandle, int find_by) > > { > > - struct xrefinfo * xi; > > + struct xrefinfo *rv, *xi; > > > > + rv = NULL; > > + mtx_lock(&xreflist_lock); > > SLIST_FOREACH(xi, &xreflist, next_entry) { > > - if (find_by == FIND_BY_XREF && phandle == xi->xref) > > - return (xi); > > - else if (find_by == FIND_BY_NODE && phandle == xi->node) > > - return (xi); > > - else if (find_by == FIND_BY_DEV && phandle == (uintptr_t)xi->dev) > > - return (xi); > > + if ((find_by == FIND_BY_XREF && phandle == xi->xref) || > > + (find_by == FIND_BY_NODE && phandle == xi->node) || > > + (find_by == FIND_BY_DEV && phandle == (uintptr_t)xi->dev)) { > > + rv = xi; > > + break; > > + } > > } > > - return (NULL); > > + mtx_unlock(&xreflist_lock); > > + return (rv); > > +} > > + > > +static struct xrefinfo * > > +xrefinfo_add(phandle_t node, phandle_t xref, device_t dev) > > +{ > > + struct xrefinfo *xi; > > + > > + xi = malloc(sizeof(*xi), M_OFWPROP, M_WAITOK); > > + xi->node = node; > > + xi->xref = xref; > > + xi->dev = dev; > > + mtx_lock(&xreflist_lock); > > + SLIST_INSERT_HEAD(&xreflist, xi, next_entry); > > + mtx_unlock(&xreflist_lock); > > + return (xi); > > } > > > > /* > > @@ -605,10 +633,17 @@ OF_device_register_xref(phandle_t xref, > > { > > struct xrefinfo *xi; > > > > + /* > > + * If the given xref handle doesn't already exist in the list then we > > + * add a list entry. In theory this can only happen on a system where > > + * nodes don't contain phandle properties and xref and node handles are > > + * synonymous, so the xref handle is added as the node handle as well. > > + */ > > if (xref_init_done) { > > if ((xi = xrefinfo_find(xref, FIND_BY_XREF)) == NULL) > > - return (ENXIO); > > - xi->dev = dev; > > + xrefinfo_add(xref, xref, dev); > > + else > > + xi->dev = dev; > > return (0); > > } > > panic("Attempt to register device before xreflist_init"); > > > From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 19:43:49 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08623E3E; Sat, 6 Sep 2014 19:43:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E839F1D3F; Sat, 6 Sep 2014 19:43:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86JhmTM084403; Sat, 6 Sep 2014 19:43:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86JhmK4084402; Sat, 6 Sep 2014 19:43:48 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201409061943.s86JhmK4084402@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 6 Sep 2014 19:43:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271207 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 19:43:49 -0000 Author: mav Date: Sat Sep 6 19:43:48 2014 New Revision: 271207 URL: http://svnweb.freebsd.org/changeset/base/271207 Log: Save one register read (AHCI_IS) for AHCI controllers with only one port. For controllers with only one port (like PCIe or M.2 SSDs) interrupt can come from only one source, and skipping read saves few percents of CPU time. MFC after: 1 month H/W donated by: I/O Switch Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Sat Sep 6 19:39:12 2014 (r271206) +++ head/sys/dev/ahci/ahci.c Sat Sep 6 19:43:48 2014 (r271207) @@ -359,7 +359,9 @@ ahci_setup_interrupt(device_t dev) for (i = 0; i < ctlr->numirqs; i++) { ctlr->irqs[i].ctlr = ctlr; ctlr->irqs[i].r_irq_rid = i + (ctlr->msi ? 1 : 0); - if (ctlr->numirqs == 1 || i >= ctlr->channels || + if (ctlr->channels == 1 && !ctlr->ccc) + ctlr->irqs[i].mode = AHCI_IRQ_MODE_ONE; + else if (ctlr->numirqs == 1 || i >= ctlr->channels || (ctlr->ccc && i == ctlr->cccv)) ctlr->irqs[i].mode = AHCI_IRQ_MODE_ALL; else if (i == ctlr->numirqs - 1) From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 19:47:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F776FF2; Sat, 6 Sep 2014 19:47:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B30B1D55; Sat, 6 Sep 2014 19:47:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86Jlb2t085059; Sat, 6 Sep 2014 19:47:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86JlbQL085058; Sat, 6 Sep 2014 19:47:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201409061947.s86JlbQL085058@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 6 Sep 2014 19:47:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271208 - head/sys/x86/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 19:47:38 -0000 Author: kib Date: Sat Sep 6 19:47:37 2014 New Revision: 271208 URL: http://svnweb.freebsd.org/changeset/base/271208 Log: Add a define for index of IA32_XSS MSR, which is, per SDM rev. 50, an analog of XCR0 for ring 0 FPU state, used by XSAVES and XRSTORS. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/include/specialreg.h Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Sat Sep 6 19:43:48 2014 (r271207) +++ head/sys/x86/include/specialreg.h Sat Sep 6 19:47:37 2014 (r271208) @@ -490,6 +490,8 @@ #define MSR_APIC_DCR_TIMER 0x83e #define MSR_APIC_SELF_IPI 0x83f +#define MSR_IA32_XSS 0xda0 + /* * Constants related to MSR's. */ From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 20:03:25 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 789EF45A; Sat, 6 Sep 2014 20:03:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63E5F1ED7; Sat, 6 Sep 2014 20:03:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86K3Pck094144; Sat, 6 Sep 2014 20:03:25 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86K3PAG094143; Sat, 6 Sep 2014 20:03:25 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201409062003.s86K3PAG094143@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 6 Sep 2014 20:03:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271209 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 20:03:25 -0000 Author: tuexen Date: Sat Sep 6 20:03:24 2014 New Revision: 271209 URL: http://svnweb.freebsd.org/changeset/base/271209 Log: Fix a leak of an address, if the address is scheduled for removal and the stack is torn down. Thanks to Peter Bostroem and Jiayang Liu from Google for reporting the issue. MFC after: 1 week Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sat Sep 6 19:47:37 2014 (r271208) +++ head/sys/netinet/sctp_pcb.c Sat Sep 6 20:03:24 2014 (r271209) @@ -5976,6 +5976,9 @@ sctp_pcb_finish(void) LIST_FOREACH_SAFE(wi, &SCTP_BASE_INFO(addr_wq), sctp_nxt_addr, nwi) { LIST_REMOVE(wi, sctp_nxt_addr); SCTP_DECR_LADDR_COUNT(); + if (wi->action == SCTP_DEL_IP_ADDRESS) { + SCTP_FREE(wi->ifa, SCTP_M_IFA); + } SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_laddr), wi); } SCTP_WQ_ADDR_UNLOCK(); From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 20:09:00 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBC035C8; Sat, 6 Sep 2014 20:08:59 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 824481EF8; Sat, 6 Sep 2014 20:08:59 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 84359B95E; Sat, 6 Sep 2014 16:08:57 -0400 (EDT) From: John Baldwin To: Konstantin Belousov Subject: Re: svn commit: r270850 - in head/sys: i386/i386 i386/include i386/isa x86/acpica Date: Sat, 06 Sep 2014 16:04:49 -0400 Message-ID: <1432043.pIBGVXe1sj@ralph.baldwin.cx> User-Agent: KMail/4.10.5 (FreeBSD/10.0-STABLE; KDE/4.10.5; amd64; ; ) In-Reply-To: <201409051044.05853.jhb@freebsd.org> References: <201408301748.s7UHmc6H059701@svn.freebsd.org> <20140905084305.GN2737@kib.kiev.ua> <201409051044.05853.jhb@freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sat, 06 Sep 2014 16:08:57 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 20:09:00 -0000 On Friday, September 05, 2014 10:44:05 AM John Baldwin wrote: > On Friday, September 05, 2014 4:43:05 am Konstantin Belousov wrote: > > There is one weird detail, not touched by your patch. Amd64 resume > > path calls initializecpu(), while i386 does not. I do not see any > > use for the call, the reload of CRX registers by trampoline/resumectx > > should already set everything to working state. E.g., enabling XMM > > in CR4 after fpu state is restored looks strange. > > I can test that. I looked at this, and I actually think calling initializecpu() is correct. It is true that it will set bits in CR4 that are already set, but it also does vendor-specific initialization (e.g. init_amd() and init_via() on amd64 set MSRs, and on i386 there is a lot more of those, though most of the CPUs with extra settings probably do not support SMP or run in ACPI systems). We could either save and restore those various vendor-specific MSRs and registers in suspend/resume, or just call initializecpu() to set their values. The latter approach seems simpler, so I chose that route. In immediate terms, it should fix enabling PG_NX in MSR_EFER on i386 + PAE resume, but it also makes the AP startup case simpler and closer to the amd64 code. I also moved some code that set MSRs out of printcpuinfo() in identcpu.c and into initializecpu() instead. Finally, I split initializecpucache() out similar to how it is split on amd64. Ah, I see one bug I will fix in my tree, pc98's machdep.c needs the change to call initializecpucache(). --- //depot/vendor/freebsd/src/sys/i386/i386/initcpu.c +++ //depot/user/jhb/acpipci/i386/i386/initcpu.c @@ -59,6 +59,12 @@ static void init_6x86(void); #endif /* I486_CPU */ +#if defined(I586_CPU) && defined(CPU_WT_ALLOC) +static void enable_K5_wt_alloc(void); +static void enable_K6_wt_alloc(void); +static void enable_K6_2_wt_alloc(void); +#endif + #ifdef I686_CPU static void init_6x86MX(void); static void init_ppro(void); @@ -527,6 +533,8 @@ intr_restore(saveintr); } +static int ppro_apic_used = -1; + static void init_ppro(void) { @@ -535,9 +543,29 @@ /* * Local APIC should be disabled if it is not going to be used. */ - apicbase = rdmsr(MSR_APICBASE); - apicbase &= ~APICBASE_ENABLED; - wrmsr(MSR_APICBASE, apicbase); + if (ppro_apic_used != 1) { + apicbase = rdmsr(MSR_APICBASE); + apicbase &= ~APICBASE_ENABLED; + wrmsr(MSR_APICBASE, apicbase); + ppro_apic_used = 0; + } +} + +/* + * If the local APIC is going to be used after being disabled above, + * re-enable it and don't disable it in the future. + */ +void +ppro_reenable_apic(void) +{ + u_int64_t apicbase; + + if (ppro_apic_used == 0) { + apicbase = rdmsr(MSR_APICBASE); + apicbase |= APICBASE_ENABLED; + wrmsr(MSR_APICBASE, apicbase); + ppro_apic_used = 1; + } } /* @@ -646,20 +674,6 @@ } #endif -/* - * Initialize CR4 (Control register 4) to enable SSE instructions. - */ -void -enable_sse(void) -{ -#if defined(CPU_ENABLE_SSE) - if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) { - load_cr4(rcr4() | CR4_FXSR | CR4_XMM); - cpu_fxsr = hw_instruction_sse = 1; - } -#endif -} - extern int elf32_nxstack; void @@ -692,6 +706,27 @@ #ifdef I586_CPU case CPU_586: switch (cpu_vendor_id) { + case CPU_VENDOR_AMD: +#ifdef CPU_WT_ALLOC + if (((cpu_id & 0x0f0) > 0) && + ((cpu_id & 0x0f0) < 0x60) && + ((cpu_id & 0x00f) > 3)) + enable_K5_wt_alloc(); + else if (((cpu_id & 0x0f0) > 0x80) || + (((cpu_id & 0x0f0) == 0x80) && + (cpu_id & 0x00f) > 0x07)) + enable_K6_2_wt_alloc(); + else if ((cpu_id & 0x0f0) > 0x50) + enable_K6_wt_alloc(); +#endif + if ((cpu_id & 0xf0) == 0xa0) + /* + * Make sure the TSC runs through + * suspension, otherwise we can't use + * it as timecounter + */ + wrmsr(0x1900, rdmsr(0x1900) | 0x20ULL); + break; case CPU_VENDOR_CENTAUR: init_winchip(); break; @@ -762,7 +797,17 @@ default: break; } - enable_sse(); +#if defined(CPU_ENABLE_SSE) + if ((cpu_feature & CPUID_XMM) && (cpu_feature & CPUID_FXSR)) { + load_cr4(rcr4() | CR4_FXSR | CR4_XMM); + cpu_fxsr = hw_instruction_sse = 1; + } +#endif +} + +void +initializecpucache(void) +{ /* * CPUID with %eax = 1, %ebx returns @@ -839,7 +884,7 @@ * Enable write allocate feature of AMD processors. * Following two functions require the Maxmem variable being set. */ -void +static void enable_K5_wt_alloc(void) { u_int64_t msr; @@ -885,7 +930,7 @@ } } -void +static void enable_K6_wt_alloc(void) { quad_t size; @@ -945,7 +990,7 @@ intr_restore(saveintr); } -void +static void enable_K6_2_wt_alloc(void) { quad_t size; --- //depot/vendor/freebsd/src/sys/i386/i386/machdep.c +++ //depot/user/jhb/acpipci/i386/i386/machdep.c @@ -2753,6 +2753,7 @@ setidt(IDT_GP, &IDTVEC(prot), SDT_SYS386TGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); initializecpu(); /* Initialize CPU registers */ + initializecpucache(); /* make an initial tss so cpu can get interrupt stack on syscall! */ /* Note: -16 is so we can grow the trapframe if we came from vm86 */ --- //depot/vendor/freebsd/src/sys/i386/i386/mp_machdep.c +++ //depot/user/jhb/acpipci/i386/i386/mp_machdep.c @@ -745,25 +745,15 @@ /* set up CPU registers and state */ cpu_setregs(); + /* set up SSE/NX registers */ + initializecpu(); + /* set up FPU state on the AP */ npxinit(); - /* set up SSE registers */ - enable_sse(); - if (cpu_ops.cpu_init) cpu_ops.cpu_init(); -#ifdef PAE - /* Enable the PTE no-execute bit. */ - if ((amd_feature & AMDID_NX) != 0) { - uint64_t msr; - - msr = rdmsr(MSR_EFER) | EFER_NXE; - wrmsr(MSR_EFER, msr); - } -#endif - /* A quick check from sanity claus */ cpuid = PCPU_GET(cpuid); if (PCPU_GET(apic_id) != lapic_id()) { @@ -1528,6 +1518,7 @@ } else { npxresume(&susppcbs[cpu]->sp_fpususpend); pmap_init_pat(); + initializecpu(); PCPU_SET(switchtime, 0); PCPU_SET(switchticks, ticks); --- //depot/vendor/freebsd/src/sys/i386/include/md_var.h +++ //depot/user/jhb/acpipci/i386/include/md_var.h @@ -99,14 +99,9 @@ void dump_add_page(vm_paddr_t); void dump_drop_page(vm_paddr_t); void finishidentcpu(void); -#if defined(I586_CPU) && defined(CPU_WT_ALLOC) -void enable_K5_wt_alloc(void); -void enable_K6_wt_alloc(void); -void enable_K6_2_wt_alloc(void); -#endif -void enable_sse(void); void fillw(int /*u_short*/ pat, void *base, size_t cnt); void initializecpu(void); +void initializecpucache(void); void i686_pagezero(void *addr); void sse2_pagezero(void *addr); void init_AMD_Elan_sc520(void); @@ -114,6 +109,7 @@ int isa_nmi(int cd); vm_paddr_t kvtop(void *addr); void panicifcpuunsupported(void); +void ppro_reenable_apic(void); void printcpuinfo(void); void setidt(int idx, alias_for_inthand_t *func, int typ, int dpl, int selec); int user_dbreg_trap(void); --- //depot/vendor/freebsd/src/sys/i386/xen/mp_machdep.c +++ //depot/user/jhb/acpipci/i386/xen/mp_machdep.c @@ -602,17 +602,8 @@ npxinit(); #if 0 - /* set up SSE registers */ - enable_sse(); -#endif -#if 0 && defined(PAE) - /* Enable the PTE no-execute bit. */ - if ((amd_feature & AMDID_NX) != 0) { - uint64_t msr; - - msr = rdmsr(MSR_EFER) | EFER_NXE; - wrmsr(MSR_EFER, msr); - } + /* set up SSE/NX registers */ + initializecpu(); #endif #if 0 /* A quick check from sanity claus */ --- //depot/vendor/freebsd/src/sys/x86/x86/identcpu.c +++ //depot/user/jhb/acpipci/x86/x86/identcpu.c @@ -405,30 +405,11 @@ break; case 0x5a0: strcat(cpu_model, "Geode LX"); - /* - * Make sure the TSC runs through suspension, - * otherwise we can't use it as timecounter - */ - wrmsr(0x1900, rdmsr(0x1900) | 0x20ULL); break; default: strcat(cpu_model, "Unknown"); break; } -#if defined(I586_CPU) && defined(CPU_WT_ALLOC) - if ((cpu_id & 0xf00) == 0x500) { - if (((cpu_id & 0x0f0) > 0) - && ((cpu_id & 0x0f0) < 0x60) - && ((cpu_id & 0x00f) > 3)) - enable_K5_wt_alloc(); - else if (((cpu_id & 0x0f0) > 0x80) - || (((cpu_id & 0x0f0) == 0x80) - && (cpu_id & 0x00f) > 0x07)) - enable_K6_2_wt_alloc(); - else if ((cpu_id & 0x0f0) > 0x50) - enable_K6_wt_alloc(); - } -#endif #else if ((cpu_id & 0xf00) == 0xf00) strcat(cpu_model, "AMD64 Processor"); --- //depot/vendor/freebsd/src/sys/x86/x86/local_apic.c +++ //depot/user/jhb/acpipci/x86/x86/local_apic.c @@ -55,7 +55,6 @@ #include #include -#include #include #include #include @@ -1331,9 +1330,6 @@ apic_init(void *dummy __unused) { struct apic_enumerator *enumerator; -#ifndef __amd64__ - uint64_t apic_base; -#endif int retval, best; /* We only support built in local APICs. */ @@ -1375,12 +1371,7 @@ * CPUs during early startup. We need to turn the local APIC back * on on such CPUs now. */ - if (cpu == CPU_686 && cpu_vendor_id == CPU_VENDOR_INTEL && - (cpu_id & 0xff0) == 0x610) { - apic_base = rdmsr(MSR_APICBASE); - apic_base |= APICBASE_ENABLED; - wrmsr(MSR_APICBASE, apic_base); - } + ppro_reenable_apic(); #endif /* Probe the CPU's in the system. */ -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 20:16:46 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A4EB92E; Sat, 6 Sep 2014 20:16:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15B131FC9; Sat, 6 Sep 2014 20:16:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86KGjgf099649; Sat, 6 Sep 2014 20:16:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86KGjEh099648; Sat, 6 Sep 2014 20:16:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201409062016.s86KGjEh099648@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 6 Sep 2014 20:16:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271210 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 20:16:46 -0000 Author: gjb Date: Sat Sep 6 20:16:45 2014 New Revision: 271210 URL: http://svnweb.freebsd.org/changeset/base/271210 Log: MFC r271043: Update the autofs(5) manual to reflect it first appeared iN FreeBSD 10.1-RELEASE. Approved by: re (marius) Sponsored by: The FreeBSD Foundation Modified: stable/10/share/man/man5/autofs.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man5/autofs.5 ============================================================================== --- stable/10/share/man/man5/autofs.5 Sat Sep 6 20:03:24 2014 (r271209) +++ stable/10/share/man/man5/autofs.5 Sat Sep 6 20:16:45 2014 (r271210) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 14, 2014 +.Dd September 3, 2014 .Dt AUTOFS 5 .Os .Sh NAME @@ -90,7 +90,7 @@ filesystems specified in The .Nm driver first appeared in -.Fx 10.2 . +.Fx 10.1 . .Sh AUTHORS The .Nm From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 20:41:59 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F24898D7; Sat, 6 Sep 2014 20:41:58 +0000 (UTC) Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6D6F1379; Sat, 6 Sep 2014 20:41:58 +0000 (UTC) Received: from zeppelin.tachypleus.net (polaris.tachypleus.net [75.101.50.44]) (authenticated bits=0) by c.mail.sonic.net (8.14.9/8.14.9) with ESMTP id s86KftEI014037 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Sat, 6 Sep 2014 13:41:56 -0700 Message-ID: <540B7193.8060601@freebsd.org> Date: Sat, 06 Sep 2014 13:41:55 -0700 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: Ian Lepore Subject: Re: svn commit: r271202 - head/sys/dev/ofw References: <201409061843.s86IhHMJ054856@svn.freebsd.org> <540B5DA8.3080601@freebsd.org> <1410032406.1150.370.camel@revolution.hippie.lan> In-Reply-To: <1410032406.1150.370.camel@revolution.hippie.lan> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVZ5sIj8gt8EWHdlNQIJQfF7g8qmtuQFDYZGzMVimm99B9FZdCDiFIizs5/Su+gZ2vSgqxjtFqppuPv7Xy5kRkH79wjNxogP/H8= X-Sonic-ID: C;5hktPQY25BGELUpcoK8kYw== M;BI+ePQY25BGELUpcoK8kYw== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 20:41:59 -0000 On 09/06/14 12:40, Ian Lepore wrote: > On Sat, 2014-09-06 at 12:16 -0700, Nathan Whitehorn wrote: >> Not looking at the code: what happens if you ask for the node >> corresponding to a phandle but the device corresponding to that phandle >> has not registered yet and it has an implicit crossreference mapping? >> -Nathan >> > The node<->xref behavior is the same as it has always been: if there > isn't a phandle property in a node to supply an xref handle then the > node and xref handles are the synonyms. > > The only thing that has changed is that with my first implementation an > xref handle had exist (meaning it had to have been discovered as a > phandle property during the init-time scan of the tree) before you could > associate a device_t with it. Now you can make associations on the fly > whether the data author intended for such associations to exist or not. > I can't decide whether that's a good or a bad thing. > > -- Ian Thanks for the explanation! That seems like the most reasonable approach. -Nathan >> On 09/06/14 11:43, Ian Lepore wrote: >>> Author: ian >>> Date: Sat Sep 6 18:43:17 2014 >>> New Revision: 271202 >>> URL: http://svnweb.freebsd.org/changeset/base/271202 >>> >>> Log: >>> When registering an association between a device and an xref phandle, create >>> an entry in the xref list if one doesn't already exist for the given handle. >>> >>> On a system that uses phandle properties, the init-time scan of the tree >>> which builds the xref list will pre-create entries for every xref handle >>> that exists in the data. On systems where the xref and node handles are >>> synonymous there is no phandle property in referenced nodes, and the xref >>> list will initialize to an empty state. In the latter case, we still need >>> to be able to associate a device_t with an xref handle, so we create list >>> entries on the fly as needed. Since the node and xref handles are >>> synonymous, we have all the info needed to create a list entry at device >>> registration time. >>> >>> The downside to this change is that it basically allows on the fly creation >>> of xref handles as synonyms of node handles, and the association of a >>> device_t with them. Whether this is a bug or a feature is in the eye of >>> the beholder, I guess. >>> >>> Modified: >>> head/sys/dev/ofw/openfirm.c >>> >>> Modified: head/sys/dev/ofw/openfirm.c >>> ============================================================================== >>> --- head/sys/dev/ofw/openfirm.c Sat Sep 6 18:20:50 2014 (r271201) >>> +++ head/sys/dev/ofw/openfirm.c Sat Sep 6 18:43:17 2014 (r271202) >>> @@ -62,7 +62,10 @@ __FBSDID("$FreeBSD$"); >>> >>> #include >>> #include >>> +#include >>> #include >>> +#include >>> +#include >>> #include >>> #include >>> >>> @@ -92,6 +95,7 @@ struct xrefinfo { >>> }; >>> >>> static SLIST_HEAD(, xrefinfo) xreflist = SLIST_HEAD_INITIALIZER(xreflist); >>> +static struct mtx xreflist_lock; >>> static boolean_t xref_init_done; >>> >>> #define FIND_BY_XREF 0 >>> @@ -138,6 +142,12 @@ static void >>> xrefinfo_init(void *unsed) >>> { >>> >>> + /* >>> + * There is no locking during this init because it runs much earlier >>> + * than any of the clients/consumers of the xref list data, but we do >>> + * initialize the mutex that will be used for access later. >>> + */ >>> + mtx_init(&xreflist_lock, "OF xreflist lock", NULL, MTX_DEF); >>> xrefinfo_create(OF_peer(0)); >>> xref_init_done = true; >>> } >>> @@ -146,17 +156,35 @@ SYSINIT(xrefinfo, SI_SUB_KMEM, SI_ORDER_ >>> static struct xrefinfo * >>> xrefinfo_find(phandle_t phandle, int find_by) >>> { >>> - struct xrefinfo * xi; >>> + struct xrefinfo *rv, *xi; >>> >>> + rv = NULL; >>> + mtx_lock(&xreflist_lock); >>> SLIST_FOREACH(xi, &xreflist, next_entry) { >>> - if (find_by == FIND_BY_XREF && phandle == xi->xref) >>> - return (xi); >>> - else if (find_by == FIND_BY_NODE && phandle == xi->node) >>> - return (xi); >>> - else if (find_by == FIND_BY_DEV && phandle == (uintptr_t)xi->dev) >>> - return (xi); >>> + if ((find_by == FIND_BY_XREF && phandle == xi->xref) || >>> + (find_by == FIND_BY_NODE && phandle == xi->node) || >>> + (find_by == FIND_BY_DEV && phandle == (uintptr_t)xi->dev)) { >>> + rv = xi; >>> + break; >>> + } >>> } >>> - return (NULL); >>> + mtx_unlock(&xreflist_lock); >>> + return (rv); >>> +} >>> + >>> +static struct xrefinfo * >>> +xrefinfo_add(phandle_t node, phandle_t xref, device_t dev) >>> +{ >>> + struct xrefinfo *xi; >>> + >>> + xi = malloc(sizeof(*xi), M_OFWPROP, M_WAITOK); >>> + xi->node = node; >>> + xi->xref = xref; >>> + xi->dev = dev; >>> + mtx_lock(&xreflist_lock); >>> + SLIST_INSERT_HEAD(&xreflist, xi, next_entry); >>> + mtx_unlock(&xreflist_lock); >>> + return (xi); >>> } >>> >>> /* >>> @@ -605,10 +633,17 @@ OF_device_register_xref(phandle_t xref, >>> { >>> struct xrefinfo *xi; >>> >>> + /* >>> + * If the given xref handle doesn't already exist in the list then we >>> + * add a list entry. In theory this can only happen on a system where >>> + * nodes don't contain phandle properties and xref and node handles are >>> + * synonymous, so the xref handle is added as the node handle as well. >>> + */ >>> if (xref_init_done) { >>> if ((xi = xrefinfo_find(xref, FIND_BY_XREF)) == NULL) >>> - return (ENXIO); >>> - xi->dev = dev; >>> + xrefinfo_add(xref, xref, dev); >>> + else >>> + xi->dev = dev; >>> return (0); >>> } >>> panic("Attempt to register device before xreflist_init"); >>> > From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 21:15:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A653114C; Sat, 6 Sep 2014 21:15:38 +0000 (UTC) Received: from mail-qg0-x234.google.com (mail-qg0-x234.google.com [IPv6:2607:f8b0:400d:c04::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2A0BF17A3; Sat, 6 Sep 2014 21:15:38 +0000 (UTC) Received: by mail-qg0-f52.google.com with SMTP id z60so13197737qgd.25 for ; Sat, 06 Sep 2014 14:15:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=R+eRqtsFVXAdVAesgLzEP6zQ+jYw9fprdA6Y0o0ZmVs=; b=C+/33rQBXm6PSYQ+aiaW2iHgAkudSlLSGuUehZYnSZ645m1x22cV4CR0fNrutV76RF mTbRQ6OPUXw32V7x6QznE3/CDwNM3rBkQd2DUJ8LziTuk8OuMRJmnCDpDF4vmfDJyr6z QzV5ZBG6PD71XiITzRJpBjCRCTqCeCbCZM9GZ2d9zzSVc2c2Mis+GicBK749pjTNIhqH dTHCI+RT1mMlXGYN53gDRY0qPGjyzBt22FsJHhyayVrqtTs5ezwal4yZPuxTbd4m5xX/ SoUmWcHy48Er5HX3TqrZdRm30fM2kIfOD4KkYpFsImtvDECzEO5lHt5qLI0P/w7X14Mx hbCA== MIME-Version: 1.0 X-Received: by 10.229.136.133 with SMTP id r5mr4240280qct.31.1410038137338; Sat, 06 Sep 2014 14:15:37 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.39.139 with HTTP; Sat, 6 Sep 2014 14:15:37 -0700 (PDT) In-Reply-To: <53e0a76b.5936.428818a9@svn.freebsd.org> References: <53e0a76b.5936.428818a9@svn.freebsd.org> Date: Sat, 6 Sep 2014 14:15:37 -0700 X-Google-Sender-Auth: pMMc_ByL1TfuomHd2Qy5sqWcc7g Message-ID: Subject: Re: svn commit: r269577 - in head/sys: amd64/include arm/arm arm/include conf i386/i386 i386/include kern mips/include mips/mips powerpc/include powerpc/powerpc sparc64/include sparc64/sparc64 sys From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 21:15:38 -0000 Hi Gleb! This commit has broken mips32 on my 128MB RAM routerstation pro board. I've tested the commit before this one (and it works). I've also tested today's -HEAD as there was some subsequent fixes to the sfbuf code. It hasn't completely fixed things - I still see processes throwing VM errors: umass0:0:0: Attached to scbus0 Trying to mount root from ufs:redboot/rootfs.uzip []... warning: no time-of-day clock registered, system time will not be set accurately da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: Serial Number 000000009451 da0: 40.000MB/s transfers da0: 3902MB (7991296 512 byte sectors: 255H 63S/T 497C) da0: quirks=0x3 Aug 28 08:07:57 init: login_getclass: unknown class 'daemon' BAD_PAGE_FAULT: pid 27 tid 100045 (mount), uid 0: pc 0x40514dd0 got a read fault (type 0x2) at 0x4040011c Trapframe Register Dump: zero: 0 at: 0x7fffffff v0: 0 v1: 0x404000fc a0: 0x54 a1: 0x40400000 a2: 0 a3: 0x1 t0: 0 t1: 0x40c0300c t2: 0x40800168 t3: 0x2f t4: 0x40c00030 t5: 0 t6: 0x748 t7: 0x402c70 t8: 0x13 t9: 0x40514d58 s0: 0x3 s1: 0x40418798 s2: 0 s3: 0x404ec4 s4: 0x40418798 s5: 0x40418798 s6: 0 s7: 0 k0: 0 k1: 0 gp: 0x405ec910 sp: 0x7ffee348 s8: 0 ra: 0x4051534c sr: 0xfc13 mullo: 0x6719 mulhi: 0xc badvaddr: 0x4040011c cause: 0x8 pc: 0x40514dd0 Page table info for pc address 0x40514dd0: pde = 0x813da000, pte = 0xa00569da Dumping 4 words starting at pc address 0x40514dd0: 8c700020 32030ff0 00032102 240300ff Page table info for bad address 0x4040011c: pde = 0x813da000, pte = 0 pid 27 (mount), uid 0: exited on signal 11 *** Populating /var .. .. so how can we debug what's going on? -a On 5 August 2014 02:44, Gleb Smirnoff wrote: > Author: glebius > Date: Tue Aug 5 09:44:10 2014 > New Revision: 269577 > URL: http://svnweb.freebsd.org/changeset/base/269577 > > Log: > Merge all MD sf_buf allocators into one MI, residing in kern/subr_sfbuf.c > The MD allocators were very common, however there were some minor > differencies. These differencies were all consolidated in the MI allocator, > under ifdefs. The defines from machine/vmparam.h turn on features required > for a particular machine. For details look in the comment in sys/sf_buf.h. > > As result no MD code left in sys/*/*/vm_machdep.c. Some arches still have > machine/sf_buf.h, which is usually quite small. > > Tested by: glebius (i386), tuexen (arm32), kevlo (arm32) > Reviewed by: kib > Sponsored by: Netflix > Sponsored by: Nginx, Inc. > > Added: > head/sys/kern/subr_sfbuf.c (contents, props changed) > Deleted: > head/sys/powerpc/include/sf_buf.h > head/sys/sparc64/include/sf_buf.h > Modified: > head/sys/amd64/include/sf_buf.h > head/sys/arm/arm/vm_machdep.c > head/sys/arm/include/sf_buf.h > head/sys/arm/include/vmparam.h > head/sys/conf/files.arm > head/sys/conf/files.i386 > head/sys/conf/files.mips > head/sys/conf/files.pc98 > head/sys/conf/files.powerpc > head/sys/conf/files.sparc64 > head/sys/i386/i386/vm_machdep.c > head/sys/i386/include/sf_buf.h > head/sys/i386/include/vmparam.h > head/sys/mips/include/sf_buf.h > head/sys/mips/include/vmparam.h > head/sys/mips/mips/vm_machdep.c > head/sys/powerpc/include/vmparam.h > head/sys/powerpc/powerpc/vm_machdep.c > head/sys/sparc64/include/vmparam.h > head/sys/sparc64/sparc64/vm_machdep.c > head/sys/sys/sf_buf.h > > Modified: head/sys/amd64/include/sf_buf.h > ============================================================================== > --- head/sys/amd64/include/sf_buf.h Tue Aug 5 09:35:25 2014 (r269576) > +++ head/sys/amd64/include/sf_buf.h Tue Aug 5 09:44:10 2014 (r269577) > @@ -29,42 +29,23 @@ > #ifndef _MACHINE_SF_BUF_H_ > #define _MACHINE_SF_BUF_H_ > > -#include > -#include > -#include > - > /* > * On this machine, the only purpose for which sf_buf is used is to implement > * an opaque pointer required by the machine-independent parts of the kernel. > * That pointer references the vm_page that is "mapped" by the sf_buf. The > * actual mapping is provided by the direct virtual-to-physical mapping. > */ > -struct sf_buf; > - > -static inline struct sf_buf * > -sf_buf_alloc(struct vm_page *m, int pri) > -{ > - > - return ((struct sf_buf *)m); > -} > - > -static inline void > -sf_buf_free(struct sf_buf *sf) > -{ > -} > - > -static __inline vm_offset_t > +static inline vm_offset_t > sf_buf_kva(struct sf_buf *sf) > { > > return (PHYS_TO_DMAP(VM_PAGE_TO_PHYS((vm_page_t)sf))); > } > > -static __inline vm_page_t > +static inline vm_page_t > sf_buf_page(struct sf_buf *sf) > { > > return ((vm_page_t)sf); > } > - > #endif /* !_MACHINE_SF_BUF_H_ */ > > Modified: head/sys/arm/arm/vm_machdep.c > ============================================================================== > --- head/sys/arm/arm/vm_machdep.c Tue Aug 5 09:35:25 2014 (r269576) > +++ head/sys/arm/arm/vm_machdep.c Tue Aug 5 09:44:10 2014 (r269577) > @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > -#include > #include > #include > #include > @@ -83,42 +82,6 @@ __FBSDID("$FreeBSD$"); > CTASSERT(sizeof(struct switchframe) == 24); > CTASSERT(sizeof(struct trapframe) == 80); > > -#ifndef NSFBUFS > -#define NSFBUFS (512 + maxusers * 16) > -#endif > - > -static int nsfbufs; > -static int nsfbufspeak; > -static int nsfbufsused; > - > -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, > - "Maximum number of sendfile(2) sf_bufs available"); > -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0, > - "Number of sendfile(2) sf_bufs at peak usage"); > -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, > - "Number of sendfile(2) sf_bufs in use"); > - > -static void sf_buf_init(void *arg); > -SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL); > - > -LIST_HEAD(sf_head, sf_buf); > - > -/* > - * A hash table of active sendfile(2) buffers > - */ > -static struct sf_head *sf_buf_active; > -static u_long sf_buf_hashmask; > - > -#define SF_BUF_HASH(m) (((m) - vm_page_array) & sf_buf_hashmask) > - > -static TAILQ_HEAD(, sf_buf) sf_buf_freelist; > -static u_int sf_buf_alloc_want; > - > -/* > - * A lock used to synchronize access to the hash table and free list > - */ > -static struct mtx sf_buf_lock; > - > /* > * Finish a fork operation, with process p2 nearly set up. > * Copy and update the pcb, set up the stack so that the child > @@ -184,106 +147,6 @@ cpu_thread_swapout(struct thread *td) > { > } > > -/* > - * Detatch mapped page and release resources back to the system. > - */ > -void > -sf_buf_free(struct sf_buf *sf) > -{ > - > - mtx_lock(&sf_buf_lock); > - sf->ref_count--; > - if (sf->ref_count == 0) { > - TAILQ_INSERT_TAIL(&sf_buf_freelist, sf, free_entry); > - nsfbufsused--; > - pmap_kremove(sf->kva); > - sf->m = NULL; > - LIST_REMOVE(sf, list_entry); > - if (sf_buf_alloc_want > 0) > - wakeup(&sf_buf_freelist); > - } > - mtx_unlock(&sf_buf_lock); > -} > - > -/* > - * Allocate a pool of sf_bufs (sendfile(2) or "super-fast" if you prefer. :-)) > - */ > -static void > -sf_buf_init(void *arg) > -{ > - struct sf_buf *sf_bufs; > - vm_offset_t sf_base; > - int i; > - > - nsfbufs = NSFBUFS; > - TUNABLE_INT_FETCH("kern.ipc.nsfbufs", &nsfbufs); > - > - sf_buf_active = hashinit(nsfbufs, M_TEMP, &sf_buf_hashmask); > - TAILQ_INIT(&sf_buf_freelist); > - sf_base = kva_alloc(nsfbufs * PAGE_SIZE); > - sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP, > - M_NOWAIT | M_ZERO); > - for (i = 0; i < nsfbufs; i++) { > - sf_bufs[i].kva = sf_base + i * PAGE_SIZE; > - TAILQ_INSERT_TAIL(&sf_buf_freelist, &sf_bufs[i], free_entry); > - } > - sf_buf_alloc_want = 0; > - mtx_init(&sf_buf_lock, "sf_buf", NULL, MTX_DEF); > -} > - > -/* > - * Get an sf_buf from the freelist. Will block if none are available. > - */ > -struct sf_buf * > -sf_buf_alloc(struct vm_page *m, int flags) > -{ > - struct sf_head *hash_list; > - struct sf_buf *sf; > - int error; > - > - hash_list = &sf_buf_active[SF_BUF_HASH(m)]; > - mtx_lock(&sf_buf_lock); > - LIST_FOREACH(sf, hash_list, list_entry) { > - if (sf->m == m) { > - sf->ref_count++; > - if (sf->ref_count == 1) { > - TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry); > - nsfbufsused++; > - nsfbufspeak = imax(nsfbufspeak, nsfbufsused); > - } > - goto done; > - } > - } > - while ((sf = TAILQ_FIRST(&sf_buf_freelist)) == NULL) { > - if (flags & SFB_NOWAIT) > - goto done; > - sf_buf_alloc_want++; > - SFSTAT_INC(sf_allocwait); > - error = msleep(&sf_buf_freelist, &sf_buf_lock, > - (flags & SFB_CATCH) ? PCATCH | PVM : PVM, "sfbufa", 0); > - sf_buf_alloc_want--; > - > - > - /* > - * If we got a signal, don't risk going back to sleep. > - */ > - if (error) > - goto done; > - } > - TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry); > - if (sf->m != NULL) > - LIST_REMOVE(sf, list_entry); > - LIST_INSERT_HEAD(hash_list, sf, list_entry); > - sf->ref_count = 1; > - sf->m = m; > - nsfbufsused++; > - nsfbufspeak = imax(nsfbufspeak, nsfbufsused); > - pmap_kenter(sf->kva, VM_PAGE_TO_PHYS(sf->m)); > -done: > - mtx_unlock(&sf_buf_lock); > - return (sf); > -} > - > void > cpu_set_syscall_retval(struct thread *td, int error) > { > > Modified: head/sys/arm/include/sf_buf.h > ============================================================================== > --- head/sys/arm/include/sf_buf.h Tue Aug 5 09:35:25 2014 (r269576) > +++ head/sys/arm/include/sf_buf.h Tue Aug 5 09:44:10 2014 (r269577) > @@ -29,33 +29,18 @@ > #ifndef _MACHINE_SF_BUF_H_ > #define _MACHINE_SF_BUF_H_ > > -#include > - > -struct vm_page; > - > -struct sf_buf { > - LIST_ENTRY(sf_buf) list_entry; /* list of buffers */ > - TAILQ_ENTRY(sf_buf) free_entry; /* list of buffers */ > - struct vm_page *m; /* currently mapped page */ > - vm_offset_t kva; /* va of mapping */ > - int ref_count; /* usage of this mapping */ > -}; > - > -static __inline vm_offset_t > -sf_buf_kva(struct sf_buf *sf) > +static inline void > +sf_buf_map(struct sf_buf *sf, int flags) > { > > - return (sf->kva); > + pmap_kenter(sf->kva, VM_PAGE_TO_PHYS(sf->m)); > } > > -static __inline struct vm_page * > -sf_buf_page(struct sf_buf *sf) > +static inline int > +sf_buf_unmap(struct sf_buf *sf) > { > > - return (sf->m); > + pmap_kremove(sf->kva); > + return (1); > } > - > -struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); > -void sf_buf_free(struct sf_buf *sf); > - > #endif /* !_MACHINE_SF_BUF_H_ */ > > Modified: head/sys/arm/include/vmparam.h > ============================================================================== > --- head/sys/arm/include/vmparam.h Tue Aug 5 09:35:25 2014 (r269576) > +++ head/sys/arm/include/vmparam.h Tue Aug 5 09:44:10 2014 (r269577) > @@ -170,4 +170,7 @@ extern vm_offset_t vm_max_kernel_address > #define VM_MAX_AUTOTUNE_MAXUSERS 384 > #endif > > +#define SFBUF > +#define SFBUF_MAP > + > #endif /* _MACHINE_VMPARAM_H_ */ > > Modified: head/sys/conf/files.arm > ============================================================================== > --- head/sys/conf/files.arm Tue Aug 5 09:35:25 2014 (r269576) > +++ head/sys/conf/files.arm Tue Aug 5 09:44:10 2014 (r269577) > @@ -77,6 +77,7 @@ font.h optional sc \ > clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8" > kern/subr_busdma_bufalloc.c standard > kern/subr_dummy_vdso_tc.c standard > +kern/subr_sfbuf.c standard > libkern/arm/aeabi_unwind.c standard > libkern/arm/divsi3.S standard > libkern/arm/ffs.S standard > > Modified: head/sys/conf/files.i386 > ============================================================================== > --- head/sys/conf/files.i386 Tue Aug 5 09:35:25 2014 (r269576) > +++ head/sys/conf/files.i386 Tue Aug 5 09:44:10 2014 (r269577) > @@ -520,6 +520,7 @@ isa/vga_isa.c optional vga > kern/kern_clocksource.c standard > kern/imgact_aout.c optional compat_aout > kern/imgact_gzip.c optional gzip > +kern/subr_sfbuf.c standard > libkern/divdi3.c standard > libkern/flsll.c standard > libkern/memmove.c standard > > Modified: head/sys/conf/files.mips > ============================================================================== > --- head/sys/conf/files.mips Tue Aug 5 09:35:25 2014 (r269576) > +++ head/sys/conf/files.mips Tue Aug 5 09:44:10 2014 (r269577) > @@ -51,6 +51,7 @@ mips/mips/vm_machdep.c standard > kern/kern_clocksource.c standard > kern/link_elf_obj.c standard > kern/subr_dummy_vdso_tc.c standard > +kern/subr_sfbuf.c optional mips | mipsel | mipsn32 > > # gcc/clang runtime > libkern/ffsl.c standard > > Modified: head/sys/conf/files.pc98 > ============================================================================== > --- head/sys/conf/files.pc98 Tue Aug 5 09:35:25 2014 (r269576) > +++ head/sys/conf/files.pc98 Tue Aug 5 09:44:10 2014 (r269577) > @@ -205,6 +205,7 @@ i386/svr4/svr4_machdep.c optional compat > kern/kern_clocksource.c standard > kern/imgact_aout.c optional compat_aout > kern/imgact_gzip.c optional gzip > +kern/subr_sfbuf.c standard > libkern/divdi3.c standard > libkern/flsll.c standard > libkern/memmove.c standard > > Modified: head/sys/conf/files.powerpc > ============================================================================== > --- head/sys/conf/files.powerpc Tue Aug 5 09:35:25 2014 (r269576) > +++ head/sys/conf/files.powerpc Tue Aug 5 09:44:10 2014 (r269577) > @@ -71,6 +71,7 @@ dev/vt/hw/ofwfb/ofwfb.c optional vt aim > kern/kern_clocksource.c standard > kern/subr_dummy_vdso_tc.c standard > kern/syscalls.c optional ktr > +kern/subr_sfbuf.c standard > libkern/ashldi3.c optional powerpc > libkern/ashrdi3.c optional powerpc > libkern/bcmp.c standard > > Modified: head/sys/conf/files.sparc64 > ============================================================================== > --- head/sys/conf/files.sparc64 Tue Aug 5 09:35:25 2014 (r269576) > +++ head/sys/conf/files.sparc64 Tue Aug 5 09:44:10 2014 (r269577) > @@ -64,6 +64,7 @@ dev/vt/hw/ofwfb/ofwfb.c optional vt > kern/kern_clocksource.c standard > kern/subr_dummy_vdso_tc.c standard > kern/syscalls.c optional ktr > +kern/subr_sfbuf.c standard > libkern/ffs.c standard > libkern/ffsl.c standard > libkern/fls.c standard > > Modified: head/sys/i386/i386/vm_machdep.c > ============================================================================== > --- head/sys/i386/i386/vm_machdep.c Tue Aug 5 09:35:25 2014 (r269576) > +++ head/sys/i386/i386/vm_machdep.c Tue Aug 5 09:44:10 2014 (r269577) > @@ -118,38 +118,6 @@ static u_int cpu_reset_proxyid; > static volatile u_int cpu_reset_proxy_active; > #endif > > -static int nsfbufs; > -static int nsfbufspeak; > -static int nsfbufsused; > - > -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, > - "Maximum number of sendfile(2) sf_bufs available"); > -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0, > - "Number of sendfile(2) sf_bufs at peak usage"); > -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, > - "Number of sendfile(2) sf_bufs in use"); > - > -static void sf_buf_init(void *arg); > -SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL); > - > -LIST_HEAD(sf_head, sf_buf); > - > -/* > - * A hash table of active sendfile(2) buffers > - */ > -static struct sf_head *sf_buf_active; > -static u_long sf_buf_hashmask; > - > -#define SF_BUF_HASH(m) (((m) - vm_page_array) & sf_buf_hashmask) > - > -static TAILQ_HEAD(, sf_buf) sf_buf_freelist; > -static u_int sf_buf_alloc_want; > - > -/* > - * A lock used to synchronize access to the hash table and free list > - */ > -static struct mtx sf_buf_lock; > - > extern int _ucodesel, _udatasel; > > /* > @@ -750,121 +718,12 @@ cpu_reset_real() > } > > /* > - * Allocate a pool of sf_bufs (sendfile(2) or "super-fast" if you prefer. :-)) > - */ > -static void > -sf_buf_init(void *arg) > -{ > - struct sf_buf *sf_bufs; > - vm_offset_t sf_base; > - int i; > - > - nsfbufs = NSFBUFS; > - TUNABLE_INT_FETCH("kern.ipc.nsfbufs", &nsfbufs); > - > - sf_buf_active = hashinit(nsfbufs, M_TEMP, &sf_buf_hashmask); > - TAILQ_INIT(&sf_buf_freelist); > - sf_base = kva_alloc(nsfbufs * PAGE_SIZE); > - sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP, > - M_NOWAIT | M_ZERO); > - for (i = 0; i < nsfbufs; i++) { > - sf_bufs[i].kva = sf_base + i * PAGE_SIZE; > - TAILQ_INSERT_TAIL(&sf_buf_freelist, &sf_bufs[i], free_entry); > - } > - sf_buf_alloc_want = 0; > - mtx_init(&sf_buf_lock, "sf_buf", NULL, MTX_DEF); > -} > - > -/* > - * Invalidate the cache lines that may belong to the page, if > - * (possibly old) mapping of the page by sf buffer exists. Returns > - * TRUE when mapping was found and cache invalidated. > - */ > -boolean_t > -sf_buf_invalidate_cache(vm_page_t m) > -{ > - struct sf_head *hash_list; > - struct sf_buf *sf; > - boolean_t ret; > - > - hash_list = &sf_buf_active[SF_BUF_HASH(m)]; > - ret = FALSE; > - mtx_lock(&sf_buf_lock); > - LIST_FOREACH(sf, hash_list, list_entry) { > - if (sf->m == m) { > - /* > - * Use pmap_qenter to update the pte for > - * existing mapping, in particular, the PAT > - * settings are recalculated. > - */ > - pmap_qenter(sf->kva, &m, 1); > - pmap_invalidate_cache_range(sf->kva, sf->kva + > - PAGE_SIZE); > - ret = TRUE; > - break; > - } > - } > - mtx_unlock(&sf_buf_lock); > - return (ret); > -} > - > -/* > * Get an sf_buf from the freelist. May block if none are available. > */ > -struct sf_buf * > -sf_buf_alloc(struct vm_page *m, int flags) > +void > +sf_buf_map(struct sf_buf *sf, int flags) > { > pt_entry_t opte, *ptep; > - struct sf_head *hash_list; > - struct sf_buf *sf; > -#ifdef SMP > - cpuset_t other_cpus; > - u_int cpuid; > -#endif > - int error; > - > - KASSERT(curthread->td_pinned > 0 || (flags & SFB_CPUPRIVATE) == 0, > - ("sf_buf_alloc(SFB_CPUPRIVATE): curthread not pinned")); > - hash_list = &sf_buf_active[SF_BUF_HASH(m)]; > - mtx_lock(&sf_buf_lock); > - LIST_FOREACH(sf, hash_list, list_entry) { > - if (sf->m == m) { > - sf->ref_count++; > - if (sf->ref_count == 1) { > - TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry); > - nsfbufsused++; > - nsfbufspeak = imax(nsfbufspeak, nsfbufsused); > - } > -#ifdef SMP > - goto shootdown; > -#else > - goto done; > -#endif > - } > - } > - while ((sf = TAILQ_FIRST(&sf_buf_freelist)) == NULL) { > - if (flags & SFB_NOWAIT) > - goto done; > - sf_buf_alloc_want++; > - SFSTAT_INC(sf_allocwait); > - error = msleep(&sf_buf_freelist, &sf_buf_lock, > - (flags & SFB_CATCH) ? PCATCH | PVM : PVM, "sfbufa", 0); > - sf_buf_alloc_want--; > - > - /* > - * If we got a signal, don't risk going back to sleep. > - */ > - if (error) > - goto done; > - } > - TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry); > - if (sf->m != NULL) > - LIST_REMOVE(sf, list_entry); > - LIST_INSERT_HEAD(hash_list, sf, list_entry); > - sf->ref_count = 1; > - sf->m = m; > - nsfbufsused++; > - nsfbufspeak = imax(nsfbufspeak, nsfbufsused); > > /* > * Update the sf_buf's virtual-to-physical mapping, flushing the > @@ -876,11 +735,11 @@ sf_buf_alloc(struct vm_page *m, int flag > ptep = vtopte(sf->kva); > opte = *ptep; > #ifdef XEN > - PT_SET_MA(sf->kva, xpmap_ptom(VM_PAGE_TO_PHYS(m)) | pgeflag > - | PG_RW | PG_V | pmap_cache_bits(m->md.pat_mode, 0)); > + PT_SET_MA(sf->kva, xpmap_ptom(VM_PAGE_TO_PHYS(sf->m)) | pgeflag > + | PG_RW | PG_V | pmap_cache_bits(sf->m->md.pat_mode, 0)); > #else > - *ptep = VM_PAGE_TO_PHYS(m) | pgeflag | PG_RW | PG_V | > - pmap_cache_bits(m->md.pat_mode, 0); > + *ptep = VM_PAGE_TO_PHYS(sf->m) | pgeflag | PG_RW | PG_V | > + pmap_cache_bits(sf->m->md.pat_mode, 0); > #endif > > /* > @@ -892,7 +751,21 @@ sf_buf_alloc(struct vm_page *m, int flag > #ifdef SMP > if ((opte & (PG_V | PG_A)) == (PG_V | PG_A)) > CPU_ZERO(&sf->cpumask); > -shootdown: > + > + sf_buf_shootdown(sf, flags); > +#else > + if ((opte & (PG_V | PG_A)) == (PG_V | PG_A)) > + pmap_invalidate_page(kernel_pmap, sf->kva); > +#endif > +} > + > +#ifdef SMP > +void > +sf_buf_shootdown(struct sf_buf *sf, int flags) > +{ > + cpuset_t other_cpus; > + u_int cpuid; > + > sched_pin(); > cpuid = PCPU_GET(cpuid); > if (!CPU_ISSET(cpuid, &sf->cpumask)) { > @@ -909,42 +782,50 @@ shootdown: > } > } > sched_unpin(); > -#else > - if ((opte & (PG_V | PG_A)) == (PG_V | PG_A)) > - pmap_invalidate_page(kernel_pmap, sf->kva); > -#endif > -done: > - mtx_unlock(&sf_buf_lock); > - return (sf); > } > +#endif > > /* > - * Remove a reference from the given sf_buf, adding it to the free > - * list when its reference count reaches zero. A freed sf_buf still, > - * however, retains its virtual-to-physical mapping until it is > - * recycled or reactivated by sf_buf_alloc(9). > + * MD part of sf_buf_free(). > */ > -void > -sf_buf_free(struct sf_buf *sf) > +int > +sf_buf_unmap(struct sf_buf *sf) > { > - > - mtx_lock(&sf_buf_lock); > - sf->ref_count--; > - if (sf->ref_count == 0) { > - TAILQ_INSERT_TAIL(&sf_buf_freelist, sf, free_entry); > - nsfbufsused--; > #ifdef XEN > + /* > + * Xen doesn't like having dangling R/W mappings > + */ > + pmap_qremove(sf->kva, 1); > + return (1); > +#else > + return (0); > +#endif > +} > + > +static void > +sf_buf_invalidate(struct sf_buf *sf) > +{ > + vm_page_t m = sf->m; > + > + /* > + * Use pmap_qenter to update the pte for > + * existing mapping, in particular, the PAT > + * settings are recalculated. > + */ > + pmap_qenter(sf->kva, &m, 1); > + pmap_invalidate_cache_range(sf->kva, sf->kva + PAGE_SIZE); > +} > + > /* > - * Xen doesn't like having dangling R/W mappings > + * Invalidate the cache lines that may belong to the page, if > + * (possibly old) mapping of the page by sf buffer exists. Returns > + * TRUE when mapping was found and cache invalidated. > */ > - pmap_qremove(sf->kva, 1); > - sf->m = NULL; > - LIST_REMOVE(sf, list_entry); > -#endif > - if (sf_buf_alloc_want > 0) > - wakeup(&sf_buf_freelist); > - } > - mtx_unlock(&sf_buf_lock); > +boolean_t > +sf_buf_invalidate_cache(vm_page_t m) > +{ > + > + return (sf_buf_process_page(m, sf_buf_invalidate)); > } > > /* > > Modified: head/sys/i386/include/sf_buf.h > ============================================================================== > --- head/sys/i386/include/sf_buf.h Tue Aug 5 09:35:25 2014 (r269576) > +++ head/sys/i386/include/sf_buf.h Tue Aug 5 09:44:10 2014 (r269577) > @@ -1,5 +1,5 @@ > /*- > - * Copyright (c) 2003, 2005 Alan L. Cox > + * Copyright (c) 2014 Gleb Smirnoff > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > @@ -29,39 +29,8 @@ > #ifndef _MACHINE_SF_BUF_H_ > #define _MACHINE_SF_BUF_H_ > > -#include > -#include > - > -struct vm_page; > - > -struct sf_buf { > - LIST_ENTRY(sf_buf) list_entry; /* list of buffers */ > - TAILQ_ENTRY(sf_buf) free_entry; /* list of buffers */ > - struct vm_page *m; /* currently mapped page */ > - vm_offset_t kva; /* va of mapping */ > - int ref_count; /* usage of this mapping */ > -#ifdef SMP > - cpuset_t cpumask; /* cpus on which mapping is valid */ > -#endif > -}; > - > -struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); > -void sf_buf_free(struct sf_buf *sf); > - > -static __inline vm_offset_t > -sf_buf_kva(struct sf_buf *sf) > -{ > - > - return (sf->kva); > -} > - > -static __inline struct vm_page * > -sf_buf_page(struct sf_buf *sf) > -{ > - > - return (sf->m); > -} > - > -boolean_t sf_buf_invalidate_cache(vm_page_t m); > +void sf_buf_map(struct sf_buf *, int); > +int sf_buf_unmap(struct sf_buf *); > +boolean_t sf_buf_invalidate_cache(vm_page_t); > > #endif /* !_MACHINE_SF_BUF_H_ */ > > Modified: head/sys/i386/include/vmparam.h > ============================================================================== > --- head/sys/i386/include/vmparam.h Tue Aug 5 09:35:25 2014 (r269576) > +++ head/sys/i386/include/vmparam.h Tue Aug 5 09:44:10 2014 (r269577) > @@ -198,4 +198,9 @@ > #define VM_MAX_AUTOTUNE_MAXUSERS 384 > #endif > > +#define SFBUF > +#define SFBUF_MAP > +#define SFBUF_CPUSET > +#define SFBUF_PROCESS_PAGE > + > #endif /* _MACHINE_VMPARAM_H_ */ > > Added: head/sys/kern/subr_sfbuf.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/kern/subr_sfbuf.c Tue Aug 5 09:44:10 2014 (r269577) > @@ -0,0 +1,226 @@ > +/*- > + * Copyright (c) 2014 Gleb Smirnoff > + * Copyright (c) 2003, 2005 Alan L. Cox > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > + > +#ifndef NSFBUFS > +#define NSFBUFS (512 + maxusers * 16) > +#endif > + > +static int nsfbufs; > +static int nsfbufspeak; > +static int nsfbufsused; > + > +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, > + "Maximum number of sendfile(2) sf_bufs available"); > +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0, > + "Number of sendfile(2) sf_bufs at peak usage"); > +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, > + "Number of sendfile(2) sf_bufs in use"); > + > +static void sf_buf_init(void *arg); > +SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL); > + > +LIST_HEAD(sf_head, sf_buf); > + > +/* > + * A hash table of active sendfile(2) buffers > + */ > +static struct sf_head *sf_buf_active; > +static u_long sf_buf_hashmask; > + > +#define SF_BUF_HASH(m) (((m) - vm_page_array) & sf_buf_hashmask) > + > +static TAILQ_HEAD(, sf_buf) sf_buf_freelist; > +static u_int sf_buf_alloc_want; > + > +/* > + * A lock used to synchronize access to the hash table and free list > + */ > +static struct mtx sf_buf_lock; > + > +/* > + * Allocate a pool of sf_bufs (sendfile(2) or "super-fast" if you prefer. :-)) > + */ > +static void > +sf_buf_init(void *arg) > +{ > + struct sf_buf *sf_bufs; > + vm_offset_t sf_base; > + int i; > + > +#ifdef SFBUF_OPTIONAL_DIRECT_MAP > + if (SFBUF_OPTIONAL_DIRECT_MAP) > + return; > +#endif > + > + nsfbufs = NSFBUFS; > + TUNABLE_INT_FETCH("kern.ipc.nsfbufs", &nsfbufs); > + > + sf_buf_active = hashinit(nsfbufs, M_TEMP, &sf_buf_hashmask); > + TAILQ_INIT(&sf_buf_freelist); > + sf_base = kva_alloc(nsfbufs * PAGE_SIZE); > + sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP, > + M_NOWAIT | M_ZERO); > + KASSERT(sf_bufs, ("%s: malloc failure", __func__)); > + for (i = 0; i < nsfbufs; i++) { > + sf_bufs[i].kva = sf_base + i * PAGE_SIZE; > + TAILQ_INSERT_TAIL(&sf_buf_freelist, &sf_bufs[i], free_entry); > + } > + sf_buf_alloc_want = 0; > + mtx_init(&sf_buf_lock, "sf_buf", NULL, MTX_DEF); > +} > + > +/* > + * Get an sf_buf from the freelist. May block if none are available. > + */ > +struct sf_buf * > +sf_buf_alloc(struct vm_page *m, int flags) > +{ > + struct sf_head *hash_list; > + struct sf_buf *sf; > + int error; > + > +#ifdef SFBUF_OPTIONAL_DIRECT_MAP > + if (SFBUF_OPTIONAL_DIRECT_MAP) > + return ((struct sf_buf *)m); > +#endif > + > + KASSERT(curthread->td_pinned > 0 || (flags & SFB_CPUPRIVATE) == 0, > + ("sf_buf_alloc(SFB_CPUPRIVATE): curthread not pinned")); > + hash_list = &sf_buf_active[SF_BUF_HASH(m)]; > + mtx_lock(&sf_buf_lock); > + LIST_FOREACH(sf, hash_list, list_entry) { > + if (sf->m == m) { > + sf->ref_count++; > + if (sf->ref_count == 1) { > + TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry); > + nsfbufsused++; > + nsfbufspeak = imax(nsfbufspeak, nsfbufsused); > + } > +#if defined(SMP) && defined(SFBUF_CPUSET) > + sf_buf_shootdown(sf, flags); > +#endif > + goto done; > + } > + } > + while ((sf = TAILQ_FIRST(&sf_buf_freelist)) == NULL) { > + if (flags & SFB_NOWAIT) > + goto done; > + sf_buf_alloc_want++; > + SFSTAT_INC(sf_allocwait); > + error = msleep(&sf_buf_freelist, &sf_buf_lock, > + (flags & SFB_CATCH) ? PCATCH | PVM : PVM, "sfbufa", 0); > + sf_buf_alloc_want--; > + > + /* > + * If we got a signal, don't risk going back to sleep. > + */ > + if (error) > + goto done; > + } > + TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry); > + if (sf->m != NULL) > + LIST_REMOVE(sf, list_entry); > + LIST_INSERT_HEAD(hash_list, sf, list_entry); > + sf->ref_count = 1; > + sf->m = m; > + nsfbufsused++; > + nsfbufspeak = imax(nsfbufspeak, nsfbufsused); > + sf_buf_map(sf, flags); > +done: > + mtx_unlock(&sf_buf_lock); > + return (sf); > +} > + > +/* > + * Remove a reference from the given sf_buf, adding it to the free > + * list when its reference count reaches zero. A freed sf_buf still, > + * however, retains its virtual-to-physical mapping until it is > + * recycled or reactivated by sf_buf_alloc(9). > + */ > +void > +sf_buf_free(struct sf_buf *sf) > +{ > + > +#ifdef SFBUF_OPTIONAL_DIRECT_MAP > + if (SFBUF_OPTIONAL_DIRECT_MAP) > + return; > +#endif > + > + mtx_lock(&sf_buf_lock); > + sf->ref_count--; > + if (sf->ref_count == 0) { > + TAILQ_INSERT_TAIL(&sf_buf_freelist, sf, free_entry); > + nsfbufsused--; > + if (sf_buf_unmap(sf)) { > + sf->m = NULL; > + LIST_REMOVE(sf, list_entry); > + } > + if (sf_buf_alloc_want > 0) > + wakeup(&sf_buf_freelist); > + } > + mtx_unlock(&sf_buf_lock); > +} > + > +#ifdef SFBUF_PROCESS_PAGE > +/* > + * Run callback function on sf_buf that holds a certain page. > + */ > +boolean_t > +sf_buf_process_page(vm_page_t m, void (*cb)(struct sf_buf *)) > +{ > + struct sf_head *hash_list; > + struct sf_buf *sf; > + > + hash_list = &sf_buf_active[SF_BUF_HASH(m)]; > + mtx_lock(&sf_buf_lock); > + LIST_FOREACH(sf, hash_list, list_entry) { > + if (sf->m == m) { > + cb(sf); > + mtx_unlock(&sf_buf_lock); > + return (TRUE); > + } > + } > + mtx_unlock(&sf_buf_lock); > + return (FALSE); > +} > +#endif /* SFBUF_PROCESS_PAGE */ > > Modified: head/sys/mips/include/sf_buf.h > ============================================================================== > --- head/sys/mips/include/sf_buf.h Tue Aug 5 09:35:25 2014 (r269576) > +++ head/sys/mips/include/sf_buf.h Tue Aug 5 09:44:10 2014 (r269577) > @@ -29,31 +29,9 @@ > #ifndef _MACHINE_SF_BUF_H_ > #define _MACHINE_SF_BUF_H_ > > -#ifdef __mips_n64 > -#include > -#include > -#include > -#else > -#include > -#endif > - > -#ifdef __mips_n64 > -/* In 64 bit the whole memory is directly mapped */ > -struct sf_buf; > +#ifdef __mips_n64 /* In 64 bit the whole memory is directly mapped */ > > -static inline struct sf_buf * > -sf_buf_alloc(struct vm_page *m, int pri) > -{ > - > - return ((struct sf_buf *)m); > -} > - > -static inline void > -sf_buf_free(struct sf_buf *sf) > -{ > -} > - > -static __inline vm_offset_t > +static inline vm_offset_t > sf_buf_kva(struct sf_buf *sf) > { > vm_page_t m; > @@ -62,38 +40,12 @@ sf_buf_kva(struct sf_buf *sf) > return (MIPS_PHYS_TO_DIRECT(VM_PAGE_TO_PHYS(m))); > } > > -static __inline struct vm_page * > +static inline struct vm_page * > sf_buf_page(struct sf_buf *sf) > { > > return ((vm_page_t)sf); > } > > -#else /* ! __mips_n64 */ > -struct vm_page; > - > -struct sf_buf { > - SLIST_ENTRY(sf_buf) free_list; /* list of free buffer slots */ > - struct vm_page *m; /* currently mapped page */ > - vm_offset_t kva; /* va of mapping */ > -}; > - > -struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); > -void sf_buf_free(struct sf_buf *sf); > - > -static __inline vm_offset_t > -sf_buf_kva(struct sf_buf *sf) > -{ > - > - return (sf->kva); > -} > - > -static __inline struct vm_page * > -sf_buf_page(struct sf_buf *sf) > -{ > - > - return (sf->m); > -} > #endif /* __mips_n64 */ > - > #endif /* !_MACHINE_SF_BUF_H_ */ > > Modified: head/sys/mips/include/vmparam.h > ============================================================================== > --- head/sys/mips/include/vmparam.h Tue Aug 5 09:35:25 2014 (r269576) > +++ head/sys/mips/include/vmparam.h Tue Aug 5 09:44:10 2014 (r269577) > @@ -187,4 +187,8 @@ > > #define ZERO_REGION_SIZE (64 * 1024) /* 64KB */ > > +#ifndef __mips_n64 > +#define SFBUF > +#endif > + > #endif /* !_MACHINE_VMPARAM_H_ */ > > Modified: head/sys/mips/mips/vm_machdep.c > ============================================================================== > --- head/sys/mips/mips/vm_machdep.c Tue Aug 5 09:35:25 2014 (r269576) > +++ head/sys/mips/mips/vm_machdep.c Tue Aug 5 09:44:10 2014 (r269577) > @@ -76,9 +76,6 @@ __FBSDID("$FreeBSD$"); > > #include > #include > -#ifndef __mips_n64 > -#include > -#endif > > /* Duplicated from asm.h */ > #if defined(__mips_o32) > @@ -92,38 +89,6 @@ __FBSDID("$FreeBSD$"); > #define CALLFRAME_SIZ (SZREG * 4) > #endif > > -#ifndef __mips_n64 > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 21:23:15 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 250204AA; Sat, 6 Sep 2014 21:23:15 +0000 (UTC) Received: from mail-qc0-x231.google.com (mail-qc0-x231.google.com [IPv6:2607:f8b0:400d:c01::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9CC761886; Sat, 6 Sep 2014 21:23:14 +0000 (UTC) Received: by mail-qc0-f177.google.com with SMTP id i8so13519470qcq.8 for ; Sat, 06 Sep 2014 14:23:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=q8lf2dd0gTaWb94Iq6a6+53ElZIM5YMcajUK85vPGo4=; b=vvrIZGE/chNa3QskC91P4Jf+eu2uB1JaZ9AIvjPsu2IFHawcMYAM81Ii+Ao6FupNvB 3mZu1l3oE4uuCfPaUyyrsJgjZIu/bPKO8D4jG+e1+kB4vr/Ka11Q9owk7Xr/F9aunZwr y+9J6Q0fL7SbjPmj+5x9ukBuzdfJ+5PEEwk1GYrHzFshWLv0qy9XKRk4xgc6rEeiZ0EG 8wV1AwJg0bxjEsAUMjY35bHninpozpgVeC8HJ3YSkNSwlDMIOzcDcwVtkmhbOyBonKHD xYYl2VVdVfC8z6g93ONoUS31WjNOj9TT6NMUUMOlr0b7ZAVxshMegfT5P16xBeJyBkKO F4qA== MIME-Version: 1.0 X-Received: by 10.224.36.4 with SMTP id r4mr29512264qad.69.1410038593753; Sat, 06 Sep 2014 14:23:13 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.39.139 with HTTP; Sat, 6 Sep 2014 14:23:13 -0700 (PDT) In-Reply-To: References: <53e0a76b.5936.428818a9@svn.freebsd.org> Date: Sat, 6 Sep 2014 14:23:13 -0700 X-Google-Sender-Auth: wxxAl1udBQihPZp-iQ6WFObKrOU Message-ID: Subject: Re: svn commit: r269577 - in head/sys: amd64/include arm/arm arm/include conf i386/i386 i386/include kern mips/include mips/mips powerpc/include powerpc/powerpc sparc64/include sparc64/sparc64 sys From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 21:23:15 -0000 . and I've submitted this as a bug: Bug: 193400 Note: this is a mipseb platform, not a mipsel platform. -a On 6 September 2014 14:15, Adrian Chadd wrote: > Hi Gleb! > > This commit has broken mips32 on my 128MB RAM routerstation pro board. > > I've tested the commit before this one (and it works). > > I've also tested today's -HEAD as there was some subsequent fixes to > the sfbuf code. It hasn't completely fixed things - I still see > processes throwing VM errors: > > umass0:0:0: Attached to scbus0 > Trying to mount root from ufs:redboot/rootfs.uzip []... > warning: no time-of-day clock registered, system time will not be set accurately > da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 > da0: Removable Direct Access SCSI-0 device > da0: Serial Number 000000009451 > da0: 40.000MB/s transfers > da0: 3902MB (7991296 512 byte sectors: 255H 63S/T 497C) > da0: quirks=0x3 > Aug 28 08:07:57 init: login_getclass: unknown class 'daemon' > BAD_PAGE_FAULT: pid 27 tid 100045 (mount), uid 0: pc 0x40514dd0 got a > read fault (type 0x2) at 0x4040011c > Trapframe Register Dump: > zero: 0 at: 0x7fffffff v0: 0 v1: 0x404000fc > a0: 0x54 a1: 0x40400000 a2: 0 a3: 0x1 > t0: 0 t1: 0x40c0300c t2: 0x40800168 t3: 0x2f > t4: 0x40c00030 t5: 0 t6: 0x748 t7: 0x402c70 > t8: 0x13 t9: 0x40514d58 s0: 0x3 s1: 0x40418798 > s2: 0 s3: 0x404ec4 s4: 0x40418798 s5: 0x40418798 > s6: 0 s7: 0 k0: 0 k1: 0 > gp: 0x405ec910 sp: 0x7ffee348 s8: 0 ra: 0x4051534c > sr: 0xfc13 mullo: 0x6719 mulhi: 0xc badvaddr: 0x4040011c > cause: 0x8 pc: 0x40514dd0 > Page table info for pc address 0x40514dd0: pde = 0x813da000, pte = 0xa00569da > Dumping 4 words starting at pc address 0x40514dd0: > 8c700020 32030ff0 00032102 240300ff > Page table info for bad address 0x4040011c: pde = 0x813da000, pte = 0 > pid 27 (mount), uid 0: exited on signal 11 > *** Populating /var .. > > .. so how can we debug what's going on? > > > > -a > > > On 5 August 2014 02:44, Gleb Smirnoff wrote: >> Author: glebius >> Date: Tue Aug 5 09:44:10 2014 >> New Revision: 269577 >> URL: http://svnweb.freebsd.org/changeset/base/269577 >> >> Log: >> Merge all MD sf_buf allocators into one MI, residing in kern/subr_sfbuf.c >> The MD allocators were very common, however there were some minor >> differencies. These differencies were all consolidated in the MI allocator, >> under ifdefs. The defines from machine/vmparam.h turn on features required >> for a particular machine. For details look in the comment in sys/sf_buf.h. >> >> As result no MD code left in sys/*/*/vm_machdep.c. Some arches still have >> machine/sf_buf.h, which is usually quite small. >> >> Tested by: glebius (i386), tuexen (arm32), kevlo (arm32) >> Reviewed by: kib >> Sponsored by: Netflix >> Sponsored by: Nginx, Inc. >> >> Added: >> head/sys/kern/subr_sfbuf.c (contents, props changed) >> Deleted: >> head/sys/powerpc/include/sf_buf.h >> head/sys/sparc64/include/sf_buf.h >> Modified: >> head/sys/amd64/include/sf_buf.h >> head/sys/arm/arm/vm_machdep.c >> head/sys/arm/include/sf_buf.h >> head/sys/arm/include/vmparam.h >> head/sys/conf/files.arm >> head/sys/conf/files.i386 >> head/sys/conf/files.mips >> head/sys/conf/files.pc98 >> head/sys/conf/files.powerpc >> head/sys/conf/files.sparc64 >> head/sys/i386/i386/vm_machdep.c >> head/sys/i386/include/sf_buf.h >> head/sys/i386/include/vmparam.h >> head/sys/mips/include/sf_buf.h >> head/sys/mips/include/vmparam.h >> head/sys/mips/mips/vm_machdep.c >> head/sys/powerpc/include/vmparam.h >> head/sys/powerpc/powerpc/vm_machdep.c >> head/sys/sparc64/include/vmparam.h >> head/sys/sparc64/sparc64/vm_machdep.c >> head/sys/sys/sf_buf.h >> >> Modified: head/sys/amd64/include/sf_buf.h >> ============================================================================== >> --- head/sys/amd64/include/sf_buf.h Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/amd64/include/sf_buf.h Tue Aug 5 09:44:10 2014 (r269577) >> @@ -29,42 +29,23 @@ >> #ifndef _MACHINE_SF_BUF_H_ >> #define _MACHINE_SF_BUF_H_ >> >> -#include >> -#include >> -#include >> - >> /* >> * On this machine, the only purpose for which sf_buf is used is to implement >> * an opaque pointer required by the machine-independent parts of the kernel. >> * That pointer references the vm_page that is "mapped" by the sf_buf. The >> * actual mapping is provided by the direct virtual-to-physical mapping. >> */ >> -struct sf_buf; >> - >> -static inline struct sf_buf * >> -sf_buf_alloc(struct vm_page *m, int pri) >> -{ >> - >> - return ((struct sf_buf *)m); >> -} >> - >> -static inline void >> -sf_buf_free(struct sf_buf *sf) >> -{ >> -} >> - >> -static __inline vm_offset_t >> +static inline vm_offset_t >> sf_buf_kva(struct sf_buf *sf) >> { >> >> return (PHYS_TO_DMAP(VM_PAGE_TO_PHYS((vm_page_t)sf))); >> } >> >> -static __inline vm_page_t >> +static inline vm_page_t >> sf_buf_page(struct sf_buf *sf) >> { >> >> return ((vm_page_t)sf); >> } >> - >> #endif /* !_MACHINE_SF_BUF_H_ */ >> >> Modified: head/sys/arm/arm/vm_machdep.c >> ============================================================================== >> --- head/sys/arm/arm/vm_machdep.c Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/arm/arm/vm_machdep.c Tue Aug 5 09:44:10 2014 (r269577) >> @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); >> #include >> #include >> #include >> -#include >> #include >> #include >> #include >> @@ -83,42 +82,6 @@ __FBSDID("$FreeBSD$"); >> CTASSERT(sizeof(struct switchframe) == 24); >> CTASSERT(sizeof(struct trapframe) == 80); >> >> -#ifndef NSFBUFS >> -#define NSFBUFS (512 + maxusers * 16) >> -#endif >> - >> -static int nsfbufs; >> -static int nsfbufspeak; >> -static int nsfbufsused; >> - >> -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, >> - "Maximum number of sendfile(2) sf_bufs available"); >> -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0, >> - "Number of sendfile(2) sf_bufs at peak usage"); >> -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, >> - "Number of sendfile(2) sf_bufs in use"); >> - >> -static void sf_buf_init(void *arg); >> -SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL); >> - >> -LIST_HEAD(sf_head, sf_buf); >> - >> -/* >> - * A hash table of active sendfile(2) buffers >> - */ >> -static struct sf_head *sf_buf_active; >> -static u_long sf_buf_hashmask; >> - >> -#define SF_BUF_HASH(m) (((m) - vm_page_array) & sf_buf_hashmask) >> - >> -static TAILQ_HEAD(, sf_buf) sf_buf_freelist; >> -static u_int sf_buf_alloc_want; >> - >> -/* >> - * A lock used to synchronize access to the hash table and free list >> - */ >> -static struct mtx sf_buf_lock; >> - >> /* >> * Finish a fork operation, with process p2 nearly set up. >> * Copy and update the pcb, set up the stack so that the child >> @@ -184,106 +147,6 @@ cpu_thread_swapout(struct thread *td) >> { >> } >> >> -/* >> - * Detatch mapped page and release resources back to the system. >> - */ >> -void >> -sf_buf_free(struct sf_buf *sf) >> -{ >> - >> - mtx_lock(&sf_buf_lock); >> - sf->ref_count--; >> - if (sf->ref_count == 0) { >> - TAILQ_INSERT_TAIL(&sf_buf_freelist, sf, free_entry); >> - nsfbufsused--; >> - pmap_kremove(sf->kva); >> - sf->m = NULL; >> - LIST_REMOVE(sf, list_entry); >> - if (sf_buf_alloc_want > 0) >> - wakeup(&sf_buf_freelist); >> - } >> - mtx_unlock(&sf_buf_lock); >> -} >> - >> -/* >> - * Allocate a pool of sf_bufs (sendfile(2) or "super-fast" if you prefer. :-)) >> - */ >> -static void >> -sf_buf_init(void *arg) >> -{ >> - struct sf_buf *sf_bufs; >> - vm_offset_t sf_base; >> - int i; >> - >> - nsfbufs = NSFBUFS; >> - TUNABLE_INT_FETCH("kern.ipc.nsfbufs", &nsfbufs); >> - >> - sf_buf_active = hashinit(nsfbufs, M_TEMP, &sf_buf_hashmask); >> - TAILQ_INIT(&sf_buf_freelist); >> - sf_base = kva_alloc(nsfbufs * PAGE_SIZE); >> - sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP, >> - M_NOWAIT | M_ZERO); >> - for (i = 0; i < nsfbufs; i++) { >> - sf_bufs[i].kva = sf_base + i * PAGE_SIZE; >> - TAILQ_INSERT_TAIL(&sf_buf_freelist, &sf_bufs[i], free_entry); >> - } >> - sf_buf_alloc_want = 0; >> - mtx_init(&sf_buf_lock, "sf_buf", NULL, MTX_DEF); >> -} >> - >> -/* >> - * Get an sf_buf from the freelist. Will block if none are available. >> - */ >> -struct sf_buf * >> -sf_buf_alloc(struct vm_page *m, int flags) >> -{ >> - struct sf_head *hash_list; >> - struct sf_buf *sf; >> - int error; >> - >> - hash_list = &sf_buf_active[SF_BUF_HASH(m)]; >> - mtx_lock(&sf_buf_lock); >> - LIST_FOREACH(sf, hash_list, list_entry) { >> - if (sf->m == m) { >> - sf->ref_count++; >> - if (sf->ref_count == 1) { >> - TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry); >> - nsfbufsused++; >> - nsfbufspeak = imax(nsfbufspeak, nsfbufsused); >> - } >> - goto done; >> - } >> - } >> - while ((sf = TAILQ_FIRST(&sf_buf_freelist)) == NULL) { >> - if (flags & SFB_NOWAIT) >> - goto done; >> - sf_buf_alloc_want++; >> - SFSTAT_INC(sf_allocwait); >> - error = msleep(&sf_buf_freelist, &sf_buf_lock, >> - (flags & SFB_CATCH) ? PCATCH | PVM : PVM, "sfbufa", 0); >> - sf_buf_alloc_want--; >> - >> - >> - /* >> - * If we got a signal, don't risk going back to sleep. >> - */ >> - if (error) >> - goto done; >> - } >> - TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry); >> - if (sf->m != NULL) >> - LIST_REMOVE(sf, list_entry); >> - LIST_INSERT_HEAD(hash_list, sf, list_entry); >> - sf->ref_count = 1; >> - sf->m = m; >> - nsfbufsused++; >> - nsfbufspeak = imax(nsfbufspeak, nsfbufsused); >> - pmap_kenter(sf->kva, VM_PAGE_TO_PHYS(sf->m)); >> -done: >> - mtx_unlock(&sf_buf_lock); >> - return (sf); >> -} >> - >> void >> cpu_set_syscall_retval(struct thread *td, int error) >> { >> >> Modified: head/sys/arm/include/sf_buf.h >> ============================================================================== >> --- head/sys/arm/include/sf_buf.h Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/arm/include/sf_buf.h Tue Aug 5 09:44:10 2014 (r269577) >> @@ -29,33 +29,18 @@ >> #ifndef _MACHINE_SF_BUF_H_ >> #define _MACHINE_SF_BUF_H_ >> >> -#include >> - >> -struct vm_page; >> - >> -struct sf_buf { >> - LIST_ENTRY(sf_buf) list_entry; /* list of buffers */ >> - TAILQ_ENTRY(sf_buf) free_entry; /* list of buffers */ >> - struct vm_page *m; /* currently mapped page */ >> - vm_offset_t kva; /* va of mapping */ >> - int ref_count; /* usage of this mapping */ >> -}; >> - >> -static __inline vm_offset_t >> -sf_buf_kva(struct sf_buf *sf) >> +static inline void >> +sf_buf_map(struct sf_buf *sf, int flags) >> { >> >> - return (sf->kva); >> + pmap_kenter(sf->kva, VM_PAGE_TO_PHYS(sf->m)); >> } >> >> -static __inline struct vm_page * >> -sf_buf_page(struct sf_buf *sf) >> +static inline int >> +sf_buf_unmap(struct sf_buf *sf) >> { >> >> - return (sf->m); >> + pmap_kremove(sf->kva); >> + return (1); >> } >> - >> -struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); >> -void sf_buf_free(struct sf_buf *sf); >> - >> #endif /* !_MACHINE_SF_BUF_H_ */ >> >> Modified: head/sys/arm/include/vmparam.h >> ============================================================================== >> --- head/sys/arm/include/vmparam.h Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/arm/include/vmparam.h Tue Aug 5 09:44:10 2014 (r269577) >> @@ -170,4 +170,7 @@ extern vm_offset_t vm_max_kernel_address >> #define VM_MAX_AUTOTUNE_MAXUSERS 384 >> #endif >> >> +#define SFBUF >> +#define SFBUF_MAP >> + >> #endif /* _MACHINE_VMPARAM_H_ */ >> >> Modified: head/sys/conf/files.arm >> ============================================================================== >> --- head/sys/conf/files.arm Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/conf/files.arm Tue Aug 5 09:44:10 2014 (r269577) >> @@ -77,6 +77,7 @@ font.h optional sc \ >> clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8" >> kern/subr_busdma_bufalloc.c standard >> kern/subr_dummy_vdso_tc.c standard >> +kern/subr_sfbuf.c standard >> libkern/arm/aeabi_unwind.c standard >> libkern/arm/divsi3.S standard >> libkern/arm/ffs.S standard >> >> Modified: head/sys/conf/files.i386 >> ============================================================================== >> --- head/sys/conf/files.i386 Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/conf/files.i386 Tue Aug 5 09:44:10 2014 (r269577) >> @@ -520,6 +520,7 @@ isa/vga_isa.c optional vga >> kern/kern_clocksource.c standard >> kern/imgact_aout.c optional compat_aout >> kern/imgact_gzip.c optional gzip >> +kern/subr_sfbuf.c standard >> libkern/divdi3.c standard >> libkern/flsll.c standard >> libkern/memmove.c standard >> >> Modified: head/sys/conf/files.mips >> ============================================================================== >> --- head/sys/conf/files.mips Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/conf/files.mips Tue Aug 5 09:44:10 2014 (r269577) >> @@ -51,6 +51,7 @@ mips/mips/vm_machdep.c standard >> kern/kern_clocksource.c standard >> kern/link_elf_obj.c standard >> kern/subr_dummy_vdso_tc.c standard >> +kern/subr_sfbuf.c optional mips | mipsel | mipsn32 >> >> # gcc/clang runtime >> libkern/ffsl.c standard >> >> Modified: head/sys/conf/files.pc98 >> ============================================================================== >> --- head/sys/conf/files.pc98 Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/conf/files.pc98 Tue Aug 5 09:44:10 2014 (r269577) >> @@ -205,6 +205,7 @@ i386/svr4/svr4_machdep.c optional compat >> kern/kern_clocksource.c standard >> kern/imgact_aout.c optional compat_aout >> kern/imgact_gzip.c optional gzip >> +kern/subr_sfbuf.c standard >> libkern/divdi3.c standard >> libkern/flsll.c standard >> libkern/memmove.c standard >> >> Modified: head/sys/conf/files.powerpc >> ============================================================================== >> --- head/sys/conf/files.powerpc Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/conf/files.powerpc Tue Aug 5 09:44:10 2014 (r269577) >> @@ -71,6 +71,7 @@ dev/vt/hw/ofwfb/ofwfb.c optional vt aim >> kern/kern_clocksource.c standard >> kern/subr_dummy_vdso_tc.c standard >> kern/syscalls.c optional ktr >> +kern/subr_sfbuf.c standard >> libkern/ashldi3.c optional powerpc >> libkern/ashrdi3.c optional powerpc >> libkern/bcmp.c standard >> >> Modified: head/sys/conf/files.sparc64 >> ============================================================================== >> --- head/sys/conf/files.sparc64 Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/conf/files.sparc64 Tue Aug 5 09:44:10 2014 (r269577) >> @@ -64,6 +64,7 @@ dev/vt/hw/ofwfb/ofwfb.c optional vt >> kern/kern_clocksource.c standard >> kern/subr_dummy_vdso_tc.c standard >> kern/syscalls.c optional ktr >> +kern/subr_sfbuf.c standard >> libkern/ffs.c standard >> libkern/ffsl.c standard >> libkern/fls.c standard >> >> Modified: head/sys/i386/i386/vm_machdep.c >> ============================================================================== >> --- head/sys/i386/i386/vm_machdep.c Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/i386/i386/vm_machdep.c Tue Aug 5 09:44:10 2014 (r269577) >> @@ -118,38 +118,6 @@ static u_int cpu_reset_proxyid; >> static volatile u_int cpu_reset_proxy_active; >> #endif >> >> -static int nsfbufs; >> -static int nsfbufspeak; >> -static int nsfbufsused; >> - >> -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, >> - "Maximum number of sendfile(2) sf_bufs available"); >> -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0, >> - "Number of sendfile(2) sf_bufs at peak usage"); >> -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, >> - "Number of sendfile(2) sf_bufs in use"); >> - >> -static void sf_buf_init(void *arg); >> -SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL); >> - >> -LIST_HEAD(sf_head, sf_buf); >> - >> -/* >> - * A hash table of active sendfile(2) buffers >> - */ >> -static struct sf_head *sf_buf_active; >> -static u_long sf_buf_hashmask; >> - >> -#define SF_BUF_HASH(m) (((m) - vm_page_array) & sf_buf_hashmask) >> - >> -static TAILQ_HEAD(, sf_buf) sf_buf_freelist; >> -static u_int sf_buf_alloc_want; >> - >> -/* >> - * A lock used to synchronize access to the hash table and free list >> - */ >> -static struct mtx sf_buf_lock; >> - >> extern int _ucodesel, _udatasel; >> >> /* >> @@ -750,121 +718,12 @@ cpu_reset_real() >> } >> >> /* >> - * Allocate a pool of sf_bufs (sendfile(2) or "super-fast" if you prefer. :-)) >> - */ >> -static void >> -sf_buf_init(void *arg) >> -{ >> - struct sf_buf *sf_bufs; >> - vm_offset_t sf_base; >> - int i; >> - >> - nsfbufs = NSFBUFS; >> - TUNABLE_INT_FETCH("kern.ipc.nsfbufs", &nsfbufs); >> - >> - sf_buf_active = hashinit(nsfbufs, M_TEMP, &sf_buf_hashmask); >> - TAILQ_INIT(&sf_buf_freelist); >> - sf_base = kva_alloc(nsfbufs * PAGE_SIZE); >> - sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP, >> - M_NOWAIT | M_ZERO); >> - for (i = 0; i < nsfbufs; i++) { >> - sf_bufs[i].kva = sf_base + i * PAGE_SIZE; >> - TAILQ_INSERT_TAIL(&sf_buf_freelist, &sf_bufs[i], free_entry); >> - } >> - sf_buf_alloc_want = 0; >> - mtx_init(&sf_buf_lock, "sf_buf", NULL, MTX_DEF); >> -} >> - >> -/* >> - * Invalidate the cache lines that may belong to the page, if >> - * (possibly old) mapping of the page by sf buffer exists. Returns >> - * TRUE when mapping was found and cache invalidated. >> - */ >> -boolean_t >> -sf_buf_invalidate_cache(vm_page_t m) >> -{ >> - struct sf_head *hash_list; >> - struct sf_buf *sf; >> - boolean_t ret; >> - >> - hash_list = &sf_buf_active[SF_BUF_HASH(m)]; >> - ret = FALSE; >> - mtx_lock(&sf_buf_lock); >> - LIST_FOREACH(sf, hash_list, list_entry) { >> - if (sf->m == m) { >> - /* >> - * Use pmap_qenter to update the pte for >> - * existing mapping, in particular, the PAT >> - * settings are recalculated. >> - */ >> - pmap_qenter(sf->kva, &m, 1); >> - pmap_invalidate_cache_range(sf->kva, sf->kva + >> - PAGE_SIZE); >> - ret = TRUE; >> - break; >> - } >> - } >> - mtx_unlock(&sf_buf_lock); >> - return (ret); >> -} >> - >> -/* >> * Get an sf_buf from the freelist. May block if none are available. >> */ >> -struct sf_buf * >> -sf_buf_alloc(struct vm_page *m, int flags) >> +void >> +sf_buf_map(struct sf_buf *sf, int flags) >> { >> pt_entry_t opte, *ptep; >> - struct sf_head *hash_list; >> - struct sf_buf *sf; >> -#ifdef SMP >> - cpuset_t other_cpus; >> - u_int cpuid; >> -#endif >> - int error; >> - >> - KASSERT(curthread->td_pinned > 0 || (flags & SFB_CPUPRIVATE) == 0, >> - ("sf_buf_alloc(SFB_CPUPRIVATE): curthread not pinned")); >> - hash_list = &sf_buf_active[SF_BUF_HASH(m)]; >> - mtx_lock(&sf_buf_lock); >> - LIST_FOREACH(sf, hash_list, list_entry) { >> - if (sf->m == m) { >> - sf->ref_count++; >> - if (sf->ref_count == 1) { >> - TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry); >> - nsfbufsused++; >> - nsfbufspeak = imax(nsfbufspeak, nsfbufsused); >> - } >> -#ifdef SMP >> - goto shootdown; >> -#else >> - goto done; >> -#endif >> - } >> - } >> - while ((sf = TAILQ_FIRST(&sf_buf_freelist)) == NULL) { >> - if (flags & SFB_NOWAIT) >> - goto done; >> - sf_buf_alloc_want++; >> - SFSTAT_INC(sf_allocwait); >> - error = msleep(&sf_buf_freelist, &sf_buf_lock, >> - (flags & SFB_CATCH) ? PCATCH | PVM : PVM, "sfbufa", 0); >> - sf_buf_alloc_want--; >> - >> - /* >> - * If we got a signal, don't risk going back to sleep. >> - */ >> - if (error) >> - goto done; >> - } >> - TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry); >> - if (sf->m != NULL) >> - LIST_REMOVE(sf, list_entry); >> - LIST_INSERT_HEAD(hash_list, sf, list_entry); >> - sf->ref_count = 1; >> - sf->m = m; >> - nsfbufsused++; >> - nsfbufspeak = imax(nsfbufspeak, nsfbufsused); >> >> /* >> * Update the sf_buf's virtual-to-physical mapping, flushing the >> @@ -876,11 +735,11 @@ sf_buf_alloc(struct vm_page *m, int flag >> ptep = vtopte(sf->kva); >> opte = *ptep; >> #ifdef XEN >> - PT_SET_MA(sf->kva, xpmap_ptom(VM_PAGE_TO_PHYS(m)) | pgeflag >> - | PG_RW | PG_V | pmap_cache_bits(m->md.pat_mode, 0)); >> + PT_SET_MA(sf->kva, xpmap_ptom(VM_PAGE_TO_PHYS(sf->m)) | pgeflag >> + | PG_RW | PG_V | pmap_cache_bits(sf->m->md.pat_mode, 0)); >> #else >> - *ptep = VM_PAGE_TO_PHYS(m) | pgeflag | PG_RW | PG_V | >> - pmap_cache_bits(m->md.pat_mode, 0); >> + *ptep = VM_PAGE_TO_PHYS(sf->m) | pgeflag | PG_RW | PG_V | >> + pmap_cache_bits(sf->m->md.pat_mode, 0); >> #endif >> >> /* >> @@ -892,7 +751,21 @@ sf_buf_alloc(struct vm_page *m, int flag >> #ifdef SMP >> if ((opte & (PG_V | PG_A)) == (PG_V | PG_A)) >> CPU_ZERO(&sf->cpumask); >> -shootdown: >> + >> + sf_buf_shootdown(sf, flags); >> +#else >> + if ((opte & (PG_V | PG_A)) == (PG_V | PG_A)) >> + pmap_invalidate_page(kernel_pmap, sf->kva); >> +#endif >> +} >> + >> +#ifdef SMP >> +void >> +sf_buf_shootdown(struct sf_buf *sf, int flags) >> +{ >> + cpuset_t other_cpus; >> + u_int cpuid; >> + >> sched_pin(); >> cpuid = PCPU_GET(cpuid); >> if (!CPU_ISSET(cpuid, &sf->cpumask)) { >> @@ -909,42 +782,50 @@ shootdown: >> } >> } >> sched_unpin(); >> -#else >> - if ((opte & (PG_V | PG_A)) == (PG_V | PG_A)) >> - pmap_invalidate_page(kernel_pmap, sf->kva); >> -#endif >> -done: >> - mtx_unlock(&sf_buf_lock); >> - return (sf); >> } >> +#endif >> >> /* >> - * Remove a reference from the given sf_buf, adding it to the free >> - * list when its reference count reaches zero. A freed sf_buf still, >> - * however, retains its virtual-to-physical mapping until it is >> - * recycled or reactivated by sf_buf_alloc(9). >> + * MD part of sf_buf_free(). >> */ >> -void >> -sf_buf_free(struct sf_buf *sf) >> +int >> +sf_buf_unmap(struct sf_buf *sf) >> { >> - >> - mtx_lock(&sf_buf_lock); >> - sf->ref_count--; >> - if (sf->ref_count == 0) { >> - TAILQ_INSERT_TAIL(&sf_buf_freelist, sf, free_entry); >> - nsfbufsused--; >> #ifdef XEN >> + /* >> + * Xen doesn't like having dangling R/W mappings >> + */ >> + pmap_qremove(sf->kva, 1); >> + return (1); >> +#else >> + return (0); >> +#endif >> +} >> + >> +static void >> +sf_buf_invalidate(struct sf_buf *sf) >> +{ >> + vm_page_t m = sf->m; >> + >> + /* >> + * Use pmap_qenter to update the pte for >> + * existing mapping, in particular, the PAT >> + * settings are recalculated. >> + */ >> + pmap_qenter(sf->kva, &m, 1); >> + pmap_invalidate_cache_range(sf->kva, sf->kva + PAGE_SIZE); >> +} >> + >> /* >> - * Xen doesn't like having dangling R/W mappings >> + * Invalidate the cache lines that may belong to the page, if >> + * (possibly old) mapping of the page by sf buffer exists. Returns >> + * TRUE when mapping was found and cache invalidated. >> */ >> - pmap_qremove(sf->kva, 1); >> - sf->m = NULL; >> - LIST_REMOVE(sf, list_entry); >> -#endif >> - if (sf_buf_alloc_want > 0) >> - wakeup(&sf_buf_freelist); >> - } >> - mtx_unlock(&sf_buf_lock); >> +boolean_t >> +sf_buf_invalidate_cache(vm_page_t m) >> +{ >> + >> + return (sf_buf_process_page(m, sf_buf_invalidate)); >> } >> >> /* >> >> Modified: head/sys/i386/include/sf_buf.h >> ============================================================================== >> --- head/sys/i386/include/sf_buf.h Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/i386/include/sf_buf.h Tue Aug 5 09:44:10 2014 (r269577) >> @@ -1,5 +1,5 @@ >> /*- >> - * Copyright (c) 2003, 2005 Alan L. Cox >> + * Copyright (c) 2014 Gleb Smirnoff >> * All rights reserved. >> * >> * Redistribution and use in source and binary forms, with or without >> @@ -29,39 +29,8 @@ >> #ifndef _MACHINE_SF_BUF_H_ >> #define _MACHINE_SF_BUF_H_ >> >> -#include >> -#include >> - >> -struct vm_page; >> - >> -struct sf_buf { >> - LIST_ENTRY(sf_buf) list_entry; /* list of buffers */ >> - TAILQ_ENTRY(sf_buf) free_entry; /* list of buffers */ >> - struct vm_page *m; /* currently mapped page */ >> - vm_offset_t kva; /* va of mapping */ >> - int ref_count; /* usage of this mapping */ >> -#ifdef SMP >> - cpuset_t cpumask; /* cpus on which mapping is valid */ >> -#endif >> -}; >> - >> -struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); >> -void sf_buf_free(struct sf_buf *sf); >> - >> -static __inline vm_offset_t >> -sf_buf_kva(struct sf_buf *sf) >> -{ >> - >> - return (sf->kva); >> -} >> - >> -static __inline struct vm_page * >> -sf_buf_page(struct sf_buf *sf) >> -{ >> - >> - return (sf->m); >> -} >> - >> -boolean_t sf_buf_invalidate_cache(vm_page_t m); >> +void sf_buf_map(struct sf_buf *, int); >> +int sf_buf_unmap(struct sf_buf *); >> +boolean_t sf_buf_invalidate_cache(vm_page_t); >> >> #endif /* !_MACHINE_SF_BUF_H_ */ >> >> Modified: head/sys/i386/include/vmparam.h >> ============================================================================== >> --- head/sys/i386/include/vmparam.h Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/i386/include/vmparam.h Tue Aug 5 09:44:10 2014 (r269577) >> @@ -198,4 +198,9 @@ >> #define VM_MAX_AUTOTUNE_MAXUSERS 384 >> #endif >> >> +#define SFBUF >> +#define SFBUF_MAP >> +#define SFBUF_CPUSET >> +#define SFBUF_PROCESS_PAGE >> + >> #endif /* _MACHINE_VMPARAM_H_ */ >> >> Added: head/sys/kern/subr_sfbuf.c >> ============================================================================== >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/sys/kern/subr_sfbuf.c Tue Aug 5 09:44:10 2014 (r269577) >> @@ -0,0 +1,226 @@ >> +/*- >> + * Copyright (c) 2014 Gleb Smirnoff >> + * Copyright (c) 2003, 2005 Alan L. Cox >> + * All rights reserved. >> + * >> + * Redistribution and use in source and binary forms, with or without >> + * modification, are permitted provided that the following conditions >> + * are met: >> + * 1. Redistributions of source code must retain the above copyright >> + * notice, this list of conditions and the following disclaimer. >> + * 2. Redistributions in binary form must reproduce the above copyright >> + * notice, this list of conditions and the following disclaimer in the >> + * documentation and/or other materials provided with the distribution. >> + * >> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND >> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE >> + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE >> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL >> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS >> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) >> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT >> + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY >> + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF >> + * SUCH DAMAGE. >> + */ >> + >> +#include >> +__FBSDID("$FreeBSD$"); >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +#include >> +#include >> +#include >> + >> +#ifndef NSFBUFS >> +#define NSFBUFS (512 + maxusers * 16) >> +#endif >> + >> +static int nsfbufs; >> +static int nsfbufspeak; >> +static int nsfbufsused; >> + >> +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, >> + "Maximum number of sendfile(2) sf_bufs available"); >> +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0, >> + "Number of sendfile(2) sf_bufs at peak usage"); >> +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, >> + "Number of sendfile(2) sf_bufs in use"); >> + >> +static void sf_buf_init(void *arg); >> +SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL); >> + >> +LIST_HEAD(sf_head, sf_buf); >> + >> +/* >> + * A hash table of active sendfile(2) buffers >> + */ >> +static struct sf_head *sf_buf_active; >> +static u_long sf_buf_hashmask; >> + >> +#define SF_BUF_HASH(m) (((m) - vm_page_array) & sf_buf_hashmask) >> + >> +static TAILQ_HEAD(, sf_buf) sf_buf_freelist; >> +static u_int sf_buf_alloc_want; >> + >> +/* >> + * A lock used to synchronize access to the hash table and free list >> + */ >> +static struct mtx sf_buf_lock; >> + >> +/* >> + * Allocate a pool of sf_bufs (sendfile(2) or "super-fast" if you prefer. :-)) >> + */ >> +static void >> +sf_buf_init(void *arg) >> +{ >> + struct sf_buf *sf_bufs; >> + vm_offset_t sf_base; >> + int i; >> + >> +#ifdef SFBUF_OPTIONAL_DIRECT_MAP >> + if (SFBUF_OPTIONAL_DIRECT_MAP) >> + return; >> +#endif >> + >> + nsfbufs = NSFBUFS; >> + TUNABLE_INT_FETCH("kern.ipc.nsfbufs", &nsfbufs); >> + >> + sf_buf_active = hashinit(nsfbufs, M_TEMP, &sf_buf_hashmask); >> + TAILQ_INIT(&sf_buf_freelist); >> + sf_base = kva_alloc(nsfbufs * PAGE_SIZE); >> + sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP, >> + M_NOWAIT | M_ZERO); >> + KASSERT(sf_bufs, ("%s: malloc failure", __func__)); >> + for (i = 0; i < nsfbufs; i++) { >> + sf_bufs[i].kva = sf_base + i * PAGE_SIZE; >> + TAILQ_INSERT_TAIL(&sf_buf_freelist, &sf_bufs[i], free_entry); >> + } >> + sf_buf_alloc_want = 0; >> + mtx_init(&sf_buf_lock, "sf_buf", NULL, MTX_DEF); >> +} >> + >> +/* >> + * Get an sf_buf from the freelist. May block if none are available. >> + */ >> +struct sf_buf * >> +sf_buf_alloc(struct vm_page *m, int flags) >> +{ >> + struct sf_head *hash_list; >> + struct sf_buf *sf; >> + int error; >> + >> +#ifdef SFBUF_OPTIONAL_DIRECT_MAP >> + if (SFBUF_OPTIONAL_DIRECT_MAP) >> + return ((struct sf_buf *)m); >> +#endif >> + >> + KASSERT(curthread->td_pinned > 0 || (flags & SFB_CPUPRIVATE) == 0, >> + ("sf_buf_alloc(SFB_CPUPRIVATE): curthread not pinned")); >> + hash_list = &sf_buf_active[SF_BUF_HASH(m)]; >> + mtx_lock(&sf_buf_lock); >> + LIST_FOREACH(sf, hash_list, list_entry) { >> + if (sf->m == m) { >> + sf->ref_count++; >> + if (sf->ref_count == 1) { >> + TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry); >> + nsfbufsused++; >> + nsfbufspeak = imax(nsfbufspeak, nsfbufsused); >> + } >> +#if defined(SMP) && defined(SFBUF_CPUSET) >> + sf_buf_shootdown(sf, flags); >> +#endif >> + goto done; >> + } >> + } >> + while ((sf = TAILQ_FIRST(&sf_buf_freelist)) == NULL) { >> + if (flags & SFB_NOWAIT) >> + goto done; >> + sf_buf_alloc_want++; >> + SFSTAT_INC(sf_allocwait); >> + error = msleep(&sf_buf_freelist, &sf_buf_lock, >> + (flags & SFB_CATCH) ? PCATCH | PVM : PVM, "sfbufa", 0); >> + sf_buf_alloc_want--; >> + >> + /* >> + * If we got a signal, don't risk going back to sleep. >> + */ >> + if (error) >> + goto done; >> + } >> + TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry); >> + if (sf->m != NULL) >> + LIST_REMOVE(sf, list_entry); >> + LIST_INSERT_HEAD(hash_list, sf, list_entry); >> + sf->ref_count = 1; >> + sf->m = m; >> + nsfbufsused++; >> + nsfbufspeak = imax(nsfbufspeak, nsfbufsused); >> + sf_buf_map(sf, flags); >> +done: >> + mtx_unlock(&sf_buf_lock); >> + return (sf); >> +} >> + >> +/* >> + * Remove a reference from the given sf_buf, adding it to the free >> + * list when its reference count reaches zero. A freed sf_buf still, >> + * however, retains its virtual-to-physical mapping until it is >> + * recycled or reactivated by sf_buf_alloc(9). >> + */ >> +void >> +sf_buf_free(struct sf_buf *sf) >> +{ >> + >> +#ifdef SFBUF_OPTIONAL_DIRECT_MAP >> + if (SFBUF_OPTIONAL_DIRECT_MAP) >> + return; >> +#endif >> + >> + mtx_lock(&sf_buf_lock); >> + sf->ref_count--; >> + if (sf->ref_count == 0) { >> + TAILQ_INSERT_TAIL(&sf_buf_freelist, sf, free_entry); >> + nsfbufsused--; >> + if (sf_buf_unmap(sf)) { >> + sf->m = NULL; >> + LIST_REMOVE(sf, list_entry); >> + } >> + if (sf_buf_alloc_want > 0) >> + wakeup(&sf_buf_freelist); >> + } >> + mtx_unlock(&sf_buf_lock); >> +} >> + >> +#ifdef SFBUF_PROCESS_PAGE >> +/* >> + * Run callback function on sf_buf that holds a certain page. >> + */ >> +boolean_t >> +sf_buf_process_page(vm_page_t m, void (*cb)(struct sf_buf *)) >> +{ >> + struct sf_head *hash_list; >> + struct sf_buf *sf; >> + >> + hash_list = &sf_buf_active[SF_BUF_HASH(m)]; >> + mtx_lock(&sf_buf_lock); >> + LIST_FOREACH(sf, hash_list, list_entry) { >> + if (sf->m == m) { >> + cb(sf); >> + mtx_unlock(&sf_buf_lock); >> + return (TRUE); >> + } >> + } >> + mtx_unlock(&sf_buf_lock); >> + return (FALSE); >> +} >> +#endif /* SFBUF_PROCESS_PAGE */ >> >> Modified: head/sys/mips/include/sf_buf.h >> ============================================================================== >> --- head/sys/mips/include/sf_buf.h Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/mips/include/sf_buf.h Tue Aug 5 09:44:10 2014 (r269577) >> @@ -29,31 +29,9 @@ >> #ifndef _MACHINE_SF_BUF_H_ >> #define _MACHINE_SF_BUF_H_ >> >> -#ifdef __mips_n64 >> -#include >> -#include >> -#include >> -#else >> -#include >> -#endif >> - >> -#ifdef __mips_n64 >> -/* In 64 bit the whole memory is directly mapped */ >> -struct sf_buf; >> +#ifdef __mips_n64 /* In 64 bit the whole memory is directly mapped */ >> >> -static inline struct sf_buf * >> -sf_buf_alloc(struct vm_page *m, int pri) >> -{ >> - >> - return ((struct sf_buf *)m); >> -} >> - >> -static inline void >> -sf_buf_free(struct sf_buf *sf) >> -{ >> -} >> - >> -static __inline vm_offset_t >> +static inline vm_offset_t >> sf_buf_kva(struct sf_buf *sf) >> { >> vm_page_t m; >> @@ -62,38 +40,12 @@ sf_buf_kva(struct sf_buf *sf) >> return (MIPS_PHYS_TO_DIRECT(VM_PAGE_TO_PHYS(m))); >> } >> >> -static __inline struct vm_page * >> +static inline struct vm_page * >> sf_buf_page(struct sf_buf *sf) >> { >> >> return ((vm_page_t)sf); >> } >> >> -#else /* ! __mips_n64 */ >> -struct vm_page; >> - >> -struct sf_buf { >> - SLIST_ENTRY(sf_buf) free_list; /* list of free buffer slots */ >> - struct vm_page *m; /* currently mapped page */ >> - vm_offset_t kva; /* va of mapping */ >> -}; >> - >> -struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); >> -void sf_buf_free(struct sf_buf *sf); >> - >> -static __inline vm_offset_t >> -sf_buf_kva(struct sf_buf *sf) >> -{ >> - >> - return (sf->kva); >> -} >> - >> -static __inline struct vm_page * >> -sf_buf_page(struct sf_buf *sf) >> -{ >> - >> - return (sf->m); >> -} >> #endif /* __mips_n64 */ >> - >> #endif /* !_MACHINE_SF_BUF_H_ */ >> >> Modified: head/sys/mips/include/vmparam.h >> ============================================================================== >> --- head/sys/mips/include/vmparam.h Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/mips/include/vmparam.h Tue Aug 5 09:44:10 2014 (r269577) >> @@ -187,4 +187,8 @@ >> >> #define ZERO_REGION_SIZE (64 * 1024) /* 64KB */ >> >> +#ifndef __mips_n64 >> +#define SFBUF >> +#endif >> + >> #endif /* !_MACHINE_VMPARAM_H_ */ >> >> Modified: head/sys/mips/mips/vm_machdep.c >> ============================================================================== >> --- head/sys/mips/mips/vm_machdep.c Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/mips/mips/vm_machdep.c Tue Aug 5 09:44:10 2014 (r269577) >> @@ -76,9 +76,6 @@ __FBSDID("$FreeBSD$"); >> >> #include >> #include >> -#ifndef __mips_n64 >> -#include >> -#endif >> >> /* Duplicated from asm.h */ >> #if defined(__mips_o32) >> @@ -92,38 +89,6 @@ __FBSDID("$FreeBSD$"); >> #define CALLFRAME_SIZ (SZREG * 4) >> #endif >> >> -#ifndef __mips_n64 >> >> *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** >> From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 22:02:19 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68CA4AB5; Sat, 6 Sep 2014 22:02:19 +0000 (UTC) Received: from pp2.rice.edu (proofpoint2.mail.rice.edu [128.42.201.101]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0486A1BA3; Sat, 6 Sep 2014 22:02:18 +0000 (UTC) Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.14.5/8.14.5) with SMTP id s86M2BC0019942; Sat, 6 Sep 2014 17:02:11 -0500 Received: from mh3.mail.rice.edu (mh3.mail.rice.edu [128.42.199.10]) by pp2.rice.edu with ESMTP id 1p7nyb09a3-1; Sat, 06 Sep 2014 17:02:10 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh3.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh3.mail.rice.edu (Postfix) with ESMTPSA id 20D014003F; Sat, 6 Sep 2014 17:02:00 -0500 (CDT) Message-ID: <540B8457.2020500@rice.edu> Date: Sat, 06 Sep 2014 17:01:59 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Adrian Chadd , Gleb Smirnoff Subject: Re: svn commit: r269577 - in head/sys: amd64/include arm/arm arm/include conf i386/i386 i386/include kern mips/include mips/mips powerpc/include powerpc/powerpc sparc64/include sparc64/sparc64 sys References: <53e0a76b.5936.428818a9@svn.freebsd.org> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=3.91514137776383e-08 kscore.compositescore=0 circleOfTrustscore=0 compositescore=0.714301145562988 urlsuspect_oldscore=0.714301145562988 suspectscore=13 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=0 rbsscore=0.714301145562988 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1409060253 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 22:02:19 -0000 On 09/06/2014 16:15, Adrian Chadd wrote: > Hi Gleb! > > This commit has broken mips32 on my 128MB RAM routerstation pro board. > > I've tested the commit before this one (and it works). > > I've also tested today's -HEAD as there was some subsequent fixes to > the sfbuf code. It hasn't completely fixed things - I still see > processes throwing VM errors: Before this commit, the sf_buf code did not cache mappings on MIPS. Now, it does. So, I suspect that you're experiencing cache consistency issues. To return to the pre-commit state, you'll need to define machine-dependent sf_buf_{un,}map() functions in mips/include/sf_buf.h for mips32 that call pmap_q{remove,enter}, respectively. Look at arm for a similar configuration. > umass0:0:0: Attached to scbus0 > Trying to mount root from ufs:redboot/rootfs.uzip []... > warning: no time-of-day clock registered, system time will not be set accurately > da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 > da0: Removable Direct Access SCSI-0 device > da0: Serial Number 000000009451 > da0: 40.000MB/s transfers > da0: 3902MB (7991296 512 byte sectors: 255H 63S/T 497C) > da0: quirks=0x3 > Aug 28 08:07:57 init: login_getclass: unknown class 'daemon' > BAD_PAGE_FAULT: pid 27 tid 100045 (mount), uid 0: pc 0x40514dd0 got a > read fault (type 0x2) at 0x4040011c > Trapframe Register Dump: > zero: 0 at: 0x7fffffff v0: 0 v1: 0x404000fc > a0: 0x54 a1: 0x40400000 a2: 0 a3: 0x1 > t0: 0 t1: 0x40c0300c t2: 0x40800168 t3: 0x2f > t4: 0x40c00030 t5: 0 t6: 0x748 t7: 0x402c70 > t8: 0x13 t9: 0x40514d58 s0: 0x3 s1: 0x40418798 > s2: 0 s3: 0x404ec4 s4: 0x40418798 s5: 0x40418798 > s6: 0 s7: 0 k0: 0 k1: 0 > gp: 0x405ec910 sp: 0x7ffee348 s8: 0 ra: 0x4051534c > sr: 0xfc13 mullo: 0x6719 mulhi: 0xc badvaddr: 0x4040011c > cause: 0x8 pc: 0x40514dd0 > Page table info for pc address 0x40514dd0: pde = 0x813da000, pte = 0xa00569da > Dumping 4 words starting at pc address 0x40514dd0: > 8c700020 32030ff0 00032102 240300ff > Page table info for bad address 0x4040011c: pde = 0x813da000, pte = 0 > pid 27 (mount), uid 0: exited on signal 11 > *** Populating /var .. > > .. so how can we debug what's going on? > > > > -a > > > On 5 August 2014 02:44, Gleb Smirnoff wrote: >> Author: glebius >> Date: Tue Aug 5 09:44:10 2014 >> New Revision: 269577 >> URL: http://svnweb.freebsd.org/changeset/base/269577 >> >> Log: >> Merge all MD sf_buf allocators into one MI, residing in kern/subr_sfbuf.c >> The MD allocators were very common, however there were some minor >> differencies. These differencies were all consolidated in the MI allocator, >> under ifdefs. The defines from machine/vmparam.h turn on features required >> for a particular machine. For details look in the comment in sys/sf_buf.h. >> >> As result no MD code left in sys/*/*/vm_machdep.c. Some arches still have >> machine/sf_buf.h, which is usually quite small. >> >> Tested by: glebius (i386), tuexen (arm32), kevlo (arm32) >> Reviewed by: kib >> Sponsored by: Netflix >> Sponsored by: Nginx, Inc. >> >> Added: >> head/sys/kern/subr_sfbuf.c (contents, props changed) >> Deleted: >> head/sys/powerpc/include/sf_buf.h >> head/sys/sparc64/include/sf_buf.h >> Modified: >> head/sys/amd64/include/sf_buf.h >> head/sys/arm/arm/vm_machdep.c >> head/sys/arm/include/sf_buf.h >> head/sys/arm/include/vmparam.h >> head/sys/conf/files.arm >> head/sys/conf/files.i386 >> head/sys/conf/files.mips >> head/sys/conf/files.pc98 >> head/sys/conf/files.powerpc >> head/sys/conf/files.sparc64 >> head/sys/i386/i386/vm_machdep.c >> head/sys/i386/include/sf_buf.h >> head/sys/i386/include/vmparam.h >> head/sys/mips/include/sf_buf.h >> head/sys/mips/include/vmparam.h >> head/sys/mips/mips/vm_machdep.c >> head/sys/powerpc/include/vmparam.h >> head/sys/powerpc/powerpc/vm_machdep.c >> head/sys/sparc64/include/vmparam.h >> head/sys/sparc64/sparc64/vm_machdep.c >> head/sys/sys/sf_buf.h >> >> Modified: head/sys/amd64/include/sf_buf.h >> ============================================================================== >> --- head/sys/amd64/include/sf_buf.h Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/amd64/include/sf_buf.h Tue Aug 5 09:44:10 2014 (r269577) >> @@ -29,42 +29,23 @@ >> #ifndef _MACHINE_SF_BUF_H_ >> #define _MACHINE_SF_BUF_H_ >> >> -#include >> -#include >> -#include >> - >> /* >> * On this machine, the only purpose for which sf_buf is used is to implement >> * an opaque pointer required by the machine-independent parts of the kernel. >> * That pointer references the vm_page that is "mapped" by the sf_buf. The >> * actual mapping is provided by the direct virtual-to-physical mapping. >> */ >> -struct sf_buf; >> - >> -static inline struct sf_buf * >> -sf_buf_alloc(struct vm_page *m, int pri) >> -{ >> - >> - return ((struct sf_buf *)m); >> -} >> - >> -static inline void >> -sf_buf_free(struct sf_buf *sf) >> -{ >> -} >> - >> -static __inline vm_offset_t >> +static inline vm_offset_t >> sf_buf_kva(struct sf_buf *sf) >> { >> >> return (PHYS_TO_DMAP(VM_PAGE_TO_PHYS((vm_page_t)sf))); >> } >> >> -static __inline vm_page_t >> +static inline vm_page_t >> sf_buf_page(struct sf_buf *sf) >> { >> >> return ((vm_page_t)sf); >> } >> - >> #endif /* !_MACHINE_SF_BUF_H_ */ >> >> Modified: head/sys/arm/arm/vm_machdep.c >> ============================================================================== >> --- head/sys/arm/arm/vm_machdep.c Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/arm/arm/vm_machdep.c Tue Aug 5 09:44:10 2014 (r269577) >> @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); >> #include >> #include >> #include >> -#include >> #include >> #include >> #include >> @@ -83,42 +82,6 @@ __FBSDID("$FreeBSD$"); >> CTASSERT(sizeof(struct switchframe) == 24); >> CTASSERT(sizeof(struct trapframe) == 80); >> >> -#ifndef NSFBUFS >> -#define NSFBUFS (512 + maxusers * 16) >> -#endif >> - >> -static int nsfbufs; >> -static int nsfbufspeak; >> -static int nsfbufsused; >> - >> -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, >> - "Maximum number of sendfile(2) sf_bufs available"); >> -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0, >> - "Number of sendfile(2) sf_bufs at peak usage"); >> -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, >> - "Number of sendfile(2) sf_bufs in use"); >> - >> -static void sf_buf_init(void *arg); >> -SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL); >> - >> -LIST_HEAD(sf_head, sf_buf); >> - >> -/* >> - * A hash table of active sendfile(2) buffers >> - */ >> -static struct sf_head *sf_buf_active; >> -static u_long sf_buf_hashmask; >> - >> -#define SF_BUF_HASH(m) (((m) - vm_page_array) & sf_buf_hashmask) >> - >> -static TAILQ_HEAD(, sf_buf) sf_buf_freelist; >> -static u_int sf_buf_alloc_want; >> - >> -/* >> - * A lock used to synchronize access to the hash table and free list >> - */ >> -static struct mtx sf_buf_lock; >> - >> /* >> * Finish a fork operation, with process p2 nearly set up. >> * Copy and update the pcb, set up the stack so that the child >> @@ -184,106 +147,6 @@ cpu_thread_swapout(struct thread *td) >> { >> } >> >> -/* >> - * Detatch mapped page and release resources back to the system. >> - */ >> -void >> -sf_buf_free(struct sf_buf *sf) >> -{ >> - >> - mtx_lock(&sf_buf_lock); >> - sf->ref_count--; >> - if (sf->ref_count == 0) { >> - TAILQ_INSERT_TAIL(&sf_buf_freelist, sf, free_entry); >> - nsfbufsused--; >> - pmap_kremove(sf->kva); >> - sf->m = NULL; >> - LIST_REMOVE(sf, list_entry); >> - if (sf_buf_alloc_want > 0) >> - wakeup(&sf_buf_freelist); >> - } >> - mtx_unlock(&sf_buf_lock); >> -} >> - >> -/* >> - * Allocate a pool of sf_bufs (sendfile(2) or "super-fast" if you prefer. :-)) >> - */ >> -static void >> -sf_buf_init(void *arg) >> -{ >> - struct sf_buf *sf_bufs; >> - vm_offset_t sf_base; >> - int i; >> - >> - nsfbufs = NSFBUFS; >> - TUNABLE_INT_FETCH("kern.ipc.nsfbufs", &nsfbufs); >> - >> - sf_buf_active = hashinit(nsfbufs, M_TEMP, &sf_buf_hashmask); >> - TAILQ_INIT(&sf_buf_freelist); >> - sf_base = kva_alloc(nsfbufs * PAGE_SIZE); >> - sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP, >> - M_NOWAIT | M_ZERO); >> - for (i = 0; i < nsfbufs; i++) { >> - sf_bufs[i].kva = sf_base + i * PAGE_SIZE; >> - TAILQ_INSERT_TAIL(&sf_buf_freelist, &sf_bufs[i], free_entry); >> - } >> - sf_buf_alloc_want = 0; >> - mtx_init(&sf_buf_lock, "sf_buf", NULL, MTX_DEF); >> -} >> - >> -/* >> - * Get an sf_buf from the freelist. Will block if none are available. >> - */ >> -struct sf_buf * >> -sf_buf_alloc(struct vm_page *m, int flags) >> -{ >> - struct sf_head *hash_list; >> - struct sf_buf *sf; >> - int error; >> - >> - hash_list = &sf_buf_active[SF_BUF_HASH(m)]; >> - mtx_lock(&sf_buf_lock); >> - LIST_FOREACH(sf, hash_list, list_entry) { >> - if (sf->m == m) { >> - sf->ref_count++; >> - if (sf->ref_count == 1) { >> - TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry); >> - nsfbufsused++; >> - nsfbufspeak = imax(nsfbufspeak, nsfbufsused); >> - } >> - goto done; >> - } >> - } >> - while ((sf = TAILQ_FIRST(&sf_buf_freelist)) == NULL) { >> - if (flags & SFB_NOWAIT) >> - goto done; >> - sf_buf_alloc_want++; >> - SFSTAT_INC(sf_allocwait); >> - error = msleep(&sf_buf_freelist, &sf_buf_lock, >> - (flags & SFB_CATCH) ? PCATCH | PVM : PVM, "sfbufa", 0); >> - sf_buf_alloc_want--; >> - >> - >> - /* >> - * If we got a signal, don't risk going back to sleep. >> - */ >> - if (error) >> - goto done; >> - } >> - TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry); >> - if (sf->m != NULL) >> - LIST_REMOVE(sf, list_entry); >> - LIST_INSERT_HEAD(hash_list, sf, list_entry); >> - sf->ref_count = 1; >> - sf->m = m; >> - nsfbufsused++; >> - nsfbufspeak = imax(nsfbufspeak, nsfbufsused); >> - pmap_kenter(sf->kva, VM_PAGE_TO_PHYS(sf->m)); >> -done: >> - mtx_unlock(&sf_buf_lock); >> - return (sf); >> -} >> - >> void >> cpu_set_syscall_retval(struct thread *td, int error) >> { >> >> Modified: head/sys/arm/include/sf_buf.h >> ============================================================================== >> --- head/sys/arm/include/sf_buf.h Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/arm/include/sf_buf.h Tue Aug 5 09:44:10 2014 (r269577) >> @@ -29,33 +29,18 @@ >> #ifndef _MACHINE_SF_BUF_H_ >> #define _MACHINE_SF_BUF_H_ >> >> -#include >> - >> -struct vm_page; >> - >> -struct sf_buf { >> - LIST_ENTRY(sf_buf) list_entry; /* list of buffers */ >> - TAILQ_ENTRY(sf_buf) free_entry; /* list of buffers */ >> - struct vm_page *m; /* currently mapped page */ >> - vm_offset_t kva; /* va of mapping */ >> - int ref_count; /* usage of this mapping */ >> -}; >> - >> -static __inline vm_offset_t >> -sf_buf_kva(struct sf_buf *sf) >> +static inline void >> +sf_buf_map(struct sf_buf *sf, int flags) >> { >> >> - return (sf->kva); >> + pmap_kenter(sf->kva, VM_PAGE_TO_PHYS(sf->m)); >> } >> >> -static __inline struct vm_page * >> -sf_buf_page(struct sf_buf *sf) >> +static inline int >> +sf_buf_unmap(struct sf_buf *sf) >> { >> >> - return (sf->m); >> + pmap_kremove(sf->kva); >> + return (1); >> } >> - >> -struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); >> -void sf_buf_free(struct sf_buf *sf); >> - >> #endif /* !_MACHINE_SF_BUF_H_ */ >> >> Modified: head/sys/arm/include/vmparam.h >> ============================================================================== >> --- head/sys/arm/include/vmparam.h Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/arm/include/vmparam.h Tue Aug 5 09:44:10 2014 (r269577) >> @@ -170,4 +170,7 @@ extern vm_offset_t vm_max_kernel_address >> #define VM_MAX_AUTOTUNE_MAXUSERS 384 >> #endif >> >> +#define SFBUF >> +#define SFBUF_MAP >> + >> #endif /* _MACHINE_VMPARAM_H_ */ >> >> Modified: head/sys/conf/files.arm >> ============================================================================== >> --- head/sys/conf/files.arm Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/conf/files.arm Tue Aug 5 09:44:10 2014 (r269577) >> @@ -77,6 +77,7 @@ font.h optional sc \ >> clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8" >> kern/subr_busdma_bufalloc.c standard >> kern/subr_dummy_vdso_tc.c standard >> +kern/subr_sfbuf.c standard >> libkern/arm/aeabi_unwind.c standard >> libkern/arm/divsi3.S standard >> libkern/arm/ffs.S standard >> >> Modified: head/sys/conf/files.i386 >> ============================================================================== >> --- head/sys/conf/files.i386 Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/conf/files.i386 Tue Aug 5 09:44:10 2014 (r269577) >> @@ -520,6 +520,7 @@ isa/vga_isa.c optional vga >> kern/kern_clocksource.c standard >> kern/imgact_aout.c optional compat_aout >> kern/imgact_gzip.c optional gzip >> +kern/subr_sfbuf.c standard >> libkern/divdi3.c standard >> libkern/flsll.c standard >> libkern/memmove.c standard >> >> Modified: head/sys/conf/files.mips >> ============================================================================== >> --- head/sys/conf/files.mips Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/conf/files.mips Tue Aug 5 09:44:10 2014 (r269577) >> @@ -51,6 +51,7 @@ mips/mips/vm_machdep.c standard >> kern/kern_clocksource.c standard >> kern/link_elf_obj.c standard >> kern/subr_dummy_vdso_tc.c standard >> +kern/subr_sfbuf.c optional mips | mipsel | mipsn32 >> >> # gcc/clang runtime >> libkern/ffsl.c standard >> >> Modified: head/sys/conf/files.pc98 >> ============================================================================== >> --- head/sys/conf/files.pc98 Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/conf/files.pc98 Tue Aug 5 09:44:10 2014 (r269577) >> @@ -205,6 +205,7 @@ i386/svr4/svr4_machdep.c optional compat >> kern/kern_clocksource.c standard >> kern/imgact_aout.c optional compat_aout >> kern/imgact_gzip.c optional gzip >> +kern/subr_sfbuf.c standard >> libkern/divdi3.c standard >> libkern/flsll.c standard >> libkern/memmove.c standard >> >> Modified: head/sys/conf/files.powerpc >> ============================================================================== >> --- head/sys/conf/files.powerpc Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/conf/files.powerpc Tue Aug 5 09:44:10 2014 (r269577) >> @@ -71,6 +71,7 @@ dev/vt/hw/ofwfb/ofwfb.c optional vt aim >> kern/kern_clocksource.c standard >> kern/subr_dummy_vdso_tc.c standard >> kern/syscalls.c optional ktr >> +kern/subr_sfbuf.c standard >> libkern/ashldi3.c optional powerpc >> libkern/ashrdi3.c optional powerpc >> libkern/bcmp.c standard >> >> Modified: head/sys/conf/files.sparc64 >> ============================================================================== >> --- head/sys/conf/files.sparc64 Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/conf/files.sparc64 Tue Aug 5 09:44:10 2014 (r269577) >> @@ -64,6 +64,7 @@ dev/vt/hw/ofwfb/ofwfb.c optional vt >> kern/kern_clocksource.c standard >> kern/subr_dummy_vdso_tc.c standard >> kern/syscalls.c optional ktr >> +kern/subr_sfbuf.c standard >> libkern/ffs.c standard >> libkern/ffsl.c standard >> libkern/fls.c standard >> >> Modified: head/sys/i386/i386/vm_machdep.c >> ============================================================================== >> --- head/sys/i386/i386/vm_machdep.c Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/i386/i386/vm_machdep.c Tue Aug 5 09:44:10 2014 (r269577) >> @@ -118,38 +118,6 @@ static u_int cpu_reset_proxyid; >> static volatile u_int cpu_reset_proxy_active; >> #endif >> >> -static int nsfbufs; >> -static int nsfbufspeak; >> -static int nsfbufsused; >> - >> -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, >> - "Maximum number of sendfile(2) sf_bufs available"); >> -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0, >> - "Number of sendfile(2) sf_bufs at peak usage"); >> -SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, >> - "Number of sendfile(2) sf_bufs in use"); >> - >> -static void sf_buf_init(void *arg); >> -SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL); >> - >> -LIST_HEAD(sf_head, sf_buf); >> - >> -/* >> - * A hash table of active sendfile(2) buffers >> - */ >> -static struct sf_head *sf_buf_active; >> -static u_long sf_buf_hashmask; >> - >> -#define SF_BUF_HASH(m) (((m) - vm_page_array) & sf_buf_hashmask) >> - >> -static TAILQ_HEAD(, sf_buf) sf_buf_freelist; >> -static u_int sf_buf_alloc_want; >> - >> -/* >> - * A lock used to synchronize access to the hash table and free list >> - */ >> -static struct mtx sf_buf_lock; >> - >> extern int _ucodesel, _udatasel; >> >> /* >> @@ -750,121 +718,12 @@ cpu_reset_real() >> } >> >> /* >> - * Allocate a pool of sf_bufs (sendfile(2) or "super-fast" if you prefer. :-)) >> - */ >> -static void >> -sf_buf_init(void *arg) >> -{ >> - struct sf_buf *sf_bufs; >> - vm_offset_t sf_base; >> - int i; >> - >> - nsfbufs = NSFBUFS; >> - TUNABLE_INT_FETCH("kern.ipc.nsfbufs", &nsfbufs); >> - >> - sf_buf_active = hashinit(nsfbufs, M_TEMP, &sf_buf_hashmask); >> - TAILQ_INIT(&sf_buf_freelist); >> - sf_base = kva_alloc(nsfbufs * PAGE_SIZE); >> - sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP, >> - M_NOWAIT | M_ZERO); >> - for (i = 0; i < nsfbufs; i++) { >> - sf_bufs[i].kva = sf_base + i * PAGE_SIZE; >> - TAILQ_INSERT_TAIL(&sf_buf_freelist, &sf_bufs[i], free_entry); >> - } >> - sf_buf_alloc_want = 0; >> - mtx_init(&sf_buf_lock, "sf_buf", NULL, MTX_DEF); >> -} >> - >> -/* >> - * Invalidate the cache lines that may belong to the page, if >> - * (possibly old) mapping of the page by sf buffer exists. Returns >> - * TRUE when mapping was found and cache invalidated. >> - */ >> -boolean_t >> -sf_buf_invalidate_cache(vm_page_t m) >> -{ >> - struct sf_head *hash_list; >> - struct sf_buf *sf; >> - boolean_t ret; >> - >> - hash_list = &sf_buf_active[SF_BUF_HASH(m)]; >> - ret = FALSE; >> - mtx_lock(&sf_buf_lock); >> - LIST_FOREACH(sf, hash_list, list_entry) { >> - if (sf->m == m) { >> - /* >> - * Use pmap_qenter to update the pte for >> - * existing mapping, in particular, the PAT >> - * settings are recalculated. >> - */ >> - pmap_qenter(sf->kva, &m, 1); >> - pmap_invalidate_cache_range(sf->kva, sf->kva + >> - PAGE_SIZE); >> - ret = TRUE; >> - break; >> - } >> - } >> - mtx_unlock(&sf_buf_lock); >> - return (ret); >> -} >> - >> -/* >> * Get an sf_buf from the freelist. May block if none are available. >> */ >> -struct sf_buf * >> -sf_buf_alloc(struct vm_page *m, int flags) >> +void >> +sf_buf_map(struct sf_buf *sf, int flags) >> { >> pt_entry_t opte, *ptep; >> - struct sf_head *hash_list; >> - struct sf_buf *sf; >> -#ifdef SMP >> - cpuset_t other_cpus; >> - u_int cpuid; >> -#endif >> - int error; >> - >> - KASSERT(curthread->td_pinned > 0 || (flags & SFB_CPUPRIVATE) == 0, >> - ("sf_buf_alloc(SFB_CPUPRIVATE): curthread not pinned")); >> - hash_list = &sf_buf_active[SF_BUF_HASH(m)]; >> - mtx_lock(&sf_buf_lock); >> - LIST_FOREACH(sf, hash_list, list_entry) { >> - if (sf->m == m) { >> - sf->ref_count++; >> - if (sf->ref_count == 1) { >> - TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry); >> - nsfbufsused++; >> - nsfbufspeak = imax(nsfbufspeak, nsfbufsused); >> - } >> -#ifdef SMP >> - goto shootdown; >> -#else >> - goto done; >> -#endif >> - } >> - } >> - while ((sf = TAILQ_FIRST(&sf_buf_freelist)) == NULL) { >> - if (flags & SFB_NOWAIT) >> - goto done; >> - sf_buf_alloc_want++; >> - SFSTAT_INC(sf_allocwait); >> - error = msleep(&sf_buf_freelist, &sf_buf_lock, >> - (flags & SFB_CATCH) ? PCATCH | PVM : PVM, "sfbufa", 0); >> - sf_buf_alloc_want--; >> - >> - /* >> - * If we got a signal, don't risk going back to sleep. >> - */ >> - if (error) >> - goto done; >> - } >> - TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry); >> - if (sf->m != NULL) >> - LIST_REMOVE(sf, list_entry); >> - LIST_INSERT_HEAD(hash_list, sf, list_entry); >> - sf->ref_count = 1; >> - sf->m = m; >> - nsfbufsused++; >> - nsfbufspeak = imax(nsfbufspeak, nsfbufsused); >> >> /* >> * Update the sf_buf's virtual-to-physical mapping, flushing the >> @@ -876,11 +735,11 @@ sf_buf_alloc(struct vm_page *m, int flag >> ptep = vtopte(sf->kva); >> opte = *ptep; >> #ifdef XEN >> - PT_SET_MA(sf->kva, xpmap_ptom(VM_PAGE_TO_PHYS(m)) | pgeflag >> - | PG_RW | PG_V | pmap_cache_bits(m->md.pat_mode, 0)); >> + PT_SET_MA(sf->kva, xpmap_ptom(VM_PAGE_TO_PHYS(sf->m)) | pgeflag >> + | PG_RW | PG_V | pmap_cache_bits(sf->m->md.pat_mode, 0)); >> #else >> - *ptep = VM_PAGE_TO_PHYS(m) | pgeflag | PG_RW | PG_V | >> - pmap_cache_bits(m->md.pat_mode, 0); >> + *ptep = VM_PAGE_TO_PHYS(sf->m) | pgeflag | PG_RW | PG_V | >> + pmap_cache_bits(sf->m->md.pat_mode, 0); >> #endif >> >> /* >> @@ -892,7 +751,21 @@ sf_buf_alloc(struct vm_page *m, int flag >> #ifdef SMP >> if ((opte & (PG_V | PG_A)) == (PG_V | PG_A)) >> CPU_ZERO(&sf->cpumask); >> -shootdown: >> + >> + sf_buf_shootdown(sf, flags); >> +#else >> + if ((opte & (PG_V | PG_A)) == (PG_V | PG_A)) >> + pmap_invalidate_page(kernel_pmap, sf->kva); >> +#endif >> +} >> + >> +#ifdef SMP >> +void >> +sf_buf_shootdown(struct sf_buf *sf, int flags) >> +{ >> + cpuset_t other_cpus; >> + u_int cpuid; >> + >> sched_pin(); >> cpuid = PCPU_GET(cpuid); >> if (!CPU_ISSET(cpuid, &sf->cpumask)) { >> @@ -909,42 +782,50 @@ shootdown: >> } >> } >> sched_unpin(); >> -#else >> - if ((opte & (PG_V | PG_A)) == (PG_V | PG_A)) >> - pmap_invalidate_page(kernel_pmap, sf->kva); >> -#endif >> -done: >> - mtx_unlock(&sf_buf_lock); >> - return (sf); >> } >> +#endif >> >> /* >> - * Remove a reference from the given sf_buf, adding it to the free >> - * list when its reference count reaches zero. A freed sf_buf still, >> - * however, retains its virtual-to-physical mapping until it is >> - * recycled or reactivated by sf_buf_alloc(9). >> + * MD part of sf_buf_free(). >> */ >> -void >> -sf_buf_free(struct sf_buf *sf) >> +int >> +sf_buf_unmap(struct sf_buf *sf) >> { >> - >> - mtx_lock(&sf_buf_lock); >> - sf->ref_count--; >> - if (sf->ref_count == 0) { >> - TAILQ_INSERT_TAIL(&sf_buf_freelist, sf, free_entry); >> - nsfbufsused--; >> #ifdef XEN >> + /* >> + * Xen doesn't like having dangling R/W mappings >> + */ >> + pmap_qremove(sf->kva, 1); >> + return (1); >> +#else >> + return (0); >> +#endif >> +} >> + >> +static void >> +sf_buf_invalidate(struct sf_buf *sf) >> +{ >> + vm_page_t m = sf->m; >> + >> + /* >> + * Use pmap_qenter to update the pte for >> + * existing mapping, in particular, the PAT >> + * settings are recalculated. >> + */ >> + pmap_qenter(sf->kva, &m, 1); >> + pmap_invalidate_cache_range(sf->kva, sf->kva + PAGE_SIZE); >> +} >> + >> /* >> - * Xen doesn't like having dangling R/W mappings >> + * Invalidate the cache lines that may belong to the page, if >> + * (possibly old) mapping of the page by sf buffer exists. Returns >> + * TRUE when mapping was found and cache invalidated. >> */ >> - pmap_qremove(sf->kva, 1); >> - sf->m = NULL; >> - LIST_REMOVE(sf, list_entry); >> -#endif >> - if (sf_buf_alloc_want > 0) >> - wakeup(&sf_buf_freelist); >> - } >> - mtx_unlock(&sf_buf_lock); >> +boolean_t >> +sf_buf_invalidate_cache(vm_page_t m) >> +{ >> + >> + return (sf_buf_process_page(m, sf_buf_invalidate)); >> } >> >> /* >> >> Modified: head/sys/i386/include/sf_buf.h >> ============================================================================== >> --- head/sys/i386/include/sf_buf.h Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/i386/include/sf_buf.h Tue Aug 5 09:44:10 2014 (r269577) >> @@ -1,5 +1,5 @@ >> /*- >> - * Copyright (c) 2003, 2005 Alan L. Cox >> + * Copyright (c) 2014 Gleb Smirnoff >> * All rights reserved. >> * >> * Redistribution and use in source and binary forms, with or without >> @@ -29,39 +29,8 @@ >> #ifndef _MACHINE_SF_BUF_H_ >> #define _MACHINE_SF_BUF_H_ >> >> -#include >> -#include >> - >> -struct vm_page; >> - >> -struct sf_buf { >> - LIST_ENTRY(sf_buf) list_entry; /* list of buffers */ >> - TAILQ_ENTRY(sf_buf) free_entry; /* list of buffers */ >> - struct vm_page *m; /* currently mapped page */ >> - vm_offset_t kva; /* va of mapping */ >> - int ref_count; /* usage of this mapping */ >> -#ifdef SMP >> - cpuset_t cpumask; /* cpus on which mapping is valid */ >> -#endif >> -}; >> - >> -struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); >> -void sf_buf_free(struct sf_buf *sf); >> - >> -static __inline vm_offset_t >> -sf_buf_kva(struct sf_buf *sf) >> -{ >> - >> - return (sf->kva); >> -} >> - >> -static __inline struct vm_page * >> -sf_buf_page(struct sf_buf *sf) >> -{ >> - >> - return (sf->m); >> -} >> - >> -boolean_t sf_buf_invalidate_cache(vm_page_t m); >> +void sf_buf_map(struct sf_buf *, int); >> +int sf_buf_unmap(struct sf_buf *); >> +boolean_t sf_buf_invalidate_cache(vm_page_t); >> >> #endif /* !_MACHINE_SF_BUF_H_ */ >> >> Modified: head/sys/i386/include/vmparam.h >> ============================================================================== >> --- head/sys/i386/include/vmparam.h Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/i386/include/vmparam.h Tue Aug 5 09:44:10 2014 (r269577) >> @@ -198,4 +198,9 @@ >> #define VM_MAX_AUTOTUNE_MAXUSERS 384 >> #endif >> >> +#define SFBUF >> +#define SFBUF_MAP >> +#define SFBUF_CPUSET >> +#define SFBUF_PROCESS_PAGE >> + >> #endif /* _MACHINE_VMPARAM_H_ */ >> >> Added: head/sys/kern/subr_sfbuf.c >> ============================================================================== >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/sys/kern/subr_sfbuf.c Tue Aug 5 09:44:10 2014 (r269577) >> @@ -0,0 +1,226 @@ >> +/*- >> + * Copyright (c) 2014 Gleb Smirnoff >> + * Copyright (c) 2003, 2005 Alan L. Cox >> + * All rights reserved. >> + * >> + * Redistribution and use in source and binary forms, with or without >> + * modification, are permitted provided that the following conditions >> + * are met: >> + * 1. Redistributions of source code must retain the above copyright >> + * notice, this list of conditions and the following disclaimer. >> + * 2. Redistributions in binary form must reproduce the above copyright >> + * notice, this list of conditions and the following disclaimer in the >> + * documentation and/or other materials provided with the distribution. >> + * >> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND >> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE >> + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE >> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL >> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS >> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) >> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT >> + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY >> + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF >> + * SUCH DAMAGE. >> + */ >> + >> +#include >> +__FBSDID("$FreeBSD$"); >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +#include >> +#include >> +#include >> + >> +#ifndef NSFBUFS >> +#define NSFBUFS (512 + maxusers * 16) >> +#endif >> + >> +static int nsfbufs; >> +static int nsfbufspeak; >> +static int nsfbufsused; >> + >> +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, >> + "Maximum number of sendfile(2) sf_bufs available"); >> +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufspeak, CTLFLAG_RD, &nsfbufspeak, 0, >> + "Number of sendfile(2) sf_bufs at peak usage"); >> +SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, >> + "Number of sendfile(2) sf_bufs in use"); >> + >> +static void sf_buf_init(void *arg); >> +SYSINIT(sock_sf, SI_SUB_MBUF, SI_ORDER_ANY, sf_buf_init, NULL); >> + >> +LIST_HEAD(sf_head, sf_buf); >> + >> +/* >> + * A hash table of active sendfile(2) buffers >> + */ >> +static struct sf_head *sf_buf_active; >> +static u_long sf_buf_hashmask; >> + >> +#define SF_BUF_HASH(m) (((m) - vm_page_array) & sf_buf_hashmask) >> + >> +static TAILQ_HEAD(, sf_buf) sf_buf_freelist; >> +static u_int sf_buf_alloc_want; >> + >> +/* >> + * A lock used to synchronize access to the hash table and free list >> + */ >> +static struct mtx sf_buf_lock; >> + >> +/* >> + * Allocate a pool of sf_bufs (sendfile(2) or "super-fast" if you prefer. :-)) >> + */ >> +static void >> +sf_buf_init(void *arg) >> +{ >> + struct sf_buf *sf_bufs; >> + vm_offset_t sf_base; >> + int i; >> + >> +#ifdef SFBUF_OPTIONAL_DIRECT_MAP >> + if (SFBUF_OPTIONAL_DIRECT_MAP) >> + return; >> +#endif >> + >> + nsfbufs = NSFBUFS; >> + TUNABLE_INT_FETCH("kern.ipc.nsfbufs", &nsfbufs); >> + >> + sf_buf_active = hashinit(nsfbufs, M_TEMP, &sf_buf_hashmask); >> + TAILQ_INIT(&sf_buf_freelist); >> + sf_base = kva_alloc(nsfbufs * PAGE_SIZE); >> + sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP, >> + M_NOWAIT | M_ZERO); >> + KASSERT(sf_bufs, ("%s: malloc failure", __func__)); >> + for (i = 0; i < nsfbufs; i++) { >> + sf_bufs[i].kva = sf_base + i * PAGE_SIZE; >> + TAILQ_INSERT_TAIL(&sf_buf_freelist, &sf_bufs[i], free_entry); >> + } >> + sf_buf_alloc_want = 0; >> + mtx_init(&sf_buf_lock, "sf_buf", NULL, MTX_DEF); >> +} >> + >> +/* >> + * Get an sf_buf from the freelist. May block if none are available. >> + */ >> +struct sf_buf * >> +sf_buf_alloc(struct vm_page *m, int flags) >> +{ >> + struct sf_head *hash_list; >> + struct sf_buf *sf; >> + int error; >> + >> +#ifdef SFBUF_OPTIONAL_DIRECT_MAP >> + if (SFBUF_OPTIONAL_DIRECT_MAP) >> + return ((struct sf_buf *)m); >> +#endif >> + >> + KASSERT(curthread->td_pinned > 0 || (flags & SFB_CPUPRIVATE) == 0, >> + ("sf_buf_alloc(SFB_CPUPRIVATE): curthread not pinned")); >> + hash_list = &sf_buf_active[SF_BUF_HASH(m)]; >> + mtx_lock(&sf_buf_lock); >> + LIST_FOREACH(sf, hash_list, list_entry) { >> + if (sf->m == m) { >> + sf->ref_count++; >> + if (sf->ref_count == 1) { >> + TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry); >> + nsfbufsused++; >> + nsfbufspeak = imax(nsfbufspeak, nsfbufsused); >> + } >> +#if defined(SMP) && defined(SFBUF_CPUSET) >> + sf_buf_shootdown(sf, flags); >> +#endif >> + goto done; >> + } >> + } >> + while ((sf = TAILQ_FIRST(&sf_buf_freelist)) == NULL) { >> + if (flags & SFB_NOWAIT) >> + goto done; >> + sf_buf_alloc_want++; >> + SFSTAT_INC(sf_allocwait); >> + error = msleep(&sf_buf_freelist, &sf_buf_lock, >> + (flags & SFB_CATCH) ? PCATCH | PVM : PVM, "sfbufa", 0); >> + sf_buf_alloc_want--; >> + >> + /* >> + * If we got a signal, don't risk going back to sleep. >> + */ >> + if (error) >> + goto done; >> + } >> + TAILQ_REMOVE(&sf_buf_freelist, sf, free_entry); >> + if (sf->m != NULL) >> + LIST_REMOVE(sf, list_entry); >> + LIST_INSERT_HEAD(hash_list, sf, list_entry); >> + sf->ref_count = 1; >> + sf->m = m; >> + nsfbufsused++; >> + nsfbufspeak = imax(nsfbufspeak, nsfbufsused); >> + sf_buf_map(sf, flags); >> +done: >> + mtx_unlock(&sf_buf_lock); >> + return (sf); >> +} >> + >> +/* >> + * Remove a reference from the given sf_buf, adding it to the free >> + * list when its reference count reaches zero. A freed sf_buf still, >> + * however, retains its virtual-to-physical mapping until it is >> + * recycled or reactivated by sf_buf_alloc(9). >> + */ >> +void >> +sf_buf_free(struct sf_buf *sf) >> +{ >> + >> +#ifdef SFBUF_OPTIONAL_DIRECT_MAP >> + if (SFBUF_OPTIONAL_DIRECT_MAP) >> + return; >> +#endif >> + >> + mtx_lock(&sf_buf_lock); >> + sf->ref_count--; >> + if (sf->ref_count == 0) { >> + TAILQ_INSERT_TAIL(&sf_buf_freelist, sf, free_entry); >> + nsfbufsused--; >> + if (sf_buf_unmap(sf)) { >> + sf->m = NULL; >> + LIST_REMOVE(sf, list_entry); >> + } >> + if (sf_buf_alloc_want > 0) >> + wakeup(&sf_buf_freelist); >> + } >> + mtx_unlock(&sf_buf_lock); >> +} >> + >> +#ifdef SFBUF_PROCESS_PAGE >> +/* >> + * Run callback function on sf_buf that holds a certain page. >> + */ >> +boolean_t >> +sf_buf_process_page(vm_page_t m, void (*cb)(struct sf_buf *)) >> +{ >> + struct sf_head *hash_list; >> + struct sf_buf *sf; >> + >> + hash_list = &sf_buf_active[SF_BUF_HASH(m)]; >> + mtx_lock(&sf_buf_lock); >> + LIST_FOREACH(sf, hash_list, list_entry) { >> + if (sf->m == m) { >> + cb(sf); >> + mtx_unlock(&sf_buf_lock); >> + return (TRUE); >> + } >> + } >> + mtx_unlock(&sf_buf_lock); >> + return (FALSE); >> +} >> +#endif /* SFBUF_PROCESS_PAGE */ >> >> Modified: head/sys/mips/include/sf_buf.h >> ============================================================================== >> --- head/sys/mips/include/sf_buf.h Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/mips/include/sf_buf.h Tue Aug 5 09:44:10 2014 (r269577) >> @@ -29,31 +29,9 @@ >> #ifndef _MACHINE_SF_BUF_H_ >> #define _MACHINE_SF_BUF_H_ >> >> -#ifdef __mips_n64 >> -#include >> -#include >> -#include >> -#else >> -#include >> -#endif >> - >> -#ifdef __mips_n64 >> -/* In 64 bit the whole memory is directly mapped */ >> -struct sf_buf; >> +#ifdef __mips_n64 /* In 64 bit the whole memory is directly mapped */ >> >> -static inline struct sf_buf * >> -sf_buf_alloc(struct vm_page *m, int pri) >> -{ >> - >> - return ((struct sf_buf *)m); >> -} >> - >> -static inline void >> -sf_buf_free(struct sf_buf *sf) >> -{ >> -} >> - >> -static __inline vm_offset_t >> +static inline vm_offset_t >> sf_buf_kva(struct sf_buf *sf) >> { >> vm_page_t m; >> @@ -62,38 +40,12 @@ sf_buf_kva(struct sf_buf *sf) >> return (MIPS_PHYS_TO_DIRECT(VM_PAGE_TO_PHYS(m))); >> } >> >> -static __inline struct vm_page * >> +static inline struct vm_page * >> sf_buf_page(struct sf_buf *sf) >> { >> >> return ((vm_page_t)sf); >> } >> >> -#else /* ! __mips_n64 */ >> -struct vm_page; >> - >> -struct sf_buf { >> - SLIST_ENTRY(sf_buf) free_list; /* list of free buffer slots */ >> - struct vm_page *m; /* currently mapped page */ >> - vm_offset_t kva; /* va of mapping */ >> -}; >> - >> -struct sf_buf * sf_buf_alloc(struct vm_page *m, int flags); >> -void sf_buf_free(struct sf_buf *sf); >> - >> -static __inline vm_offset_t >> -sf_buf_kva(struct sf_buf *sf) >> -{ >> - >> - return (sf->kva); >> -} >> - >> -static __inline struct vm_page * >> -sf_buf_page(struct sf_buf *sf) >> -{ >> - >> - return (sf->m); >> -} >> #endif /* __mips_n64 */ >> - >> #endif /* !_MACHINE_SF_BUF_H_ */ >> >> Modified: head/sys/mips/include/vmparam.h >> ============================================================================== >> --- head/sys/mips/include/vmparam.h Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/mips/include/vmparam.h Tue Aug 5 09:44:10 2014 (r269577) >> @@ -187,4 +187,8 @@ >> >> #define ZERO_REGION_SIZE (64 * 1024) /* 64KB */ >> >> +#ifndef __mips_n64 >> +#define SFBUF >> +#endif >> + >> #endif /* !_MACHINE_VMPARAM_H_ */ >> >> Modified: head/sys/mips/mips/vm_machdep.c >> ============================================================================== >> --- head/sys/mips/mips/vm_machdep.c Tue Aug 5 09:35:25 2014 (r269576) >> +++ head/sys/mips/mips/vm_machdep.c Tue Aug 5 09:44:10 2014 (r269577) >> @@ -76,9 +76,6 @@ __FBSDID("$FreeBSD$"); >> >> #include >> #include >> -#ifndef __mips_n64 >> -#include >> -#endif >> >> /* Duplicated from asm.h */ >> #if defined(__mips_o32) >> @@ -92,38 +89,6 @@ __FBSDID("$FreeBSD$"); >> #define CALLFRAME_SIZ (SZREG * 4) >> #endif >> >> -#ifndef __mips_n64 >> >> *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** >> > > From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 22:17:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 281C4E2E; Sat, 6 Sep 2014 22:17:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07A4C1CA1; Sat, 6 Sep 2014 22:17:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86MHtgu058746; Sat, 6 Sep 2014 22:17:55 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86MHtgJ058741; Sat, 6 Sep 2014 22:17:55 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201409062217.s86MHtgJ058741@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Sat, 6 Sep 2014 22:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271211 - in stable/10/sys/ia64: ia64 include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 22:17:56 -0000 Author: marcel Date: Sat Sep 6 22:17:54 2014 New Revision: 271211 URL: http://svnweb.freebsd.org/changeset/base/271211 Log: Fix the PCPU access macros. It was found that the PCPU pointer, when held in register r13, is used outside the bounds of critical_enter() and critical_exit() by virtue of optimizations performed by the compiler. The net effect being that address computations of fields in the PCPU structure could be relative to the PCPU structure of the CPU on which the address computation was performed and not related to the CPU that executes the actual load or store operation. The typical failure mode being that the per-CPU cache of UMA got corrupted due to accesses from other CPUs. Adding more volatile decorating to the register expression does not help. The thinking being that volatile is assumed to work on memory references and not register references. Thus, the fix is to perform the address computation using a volatile inline assembly statement. Additionally, since the reference is fundamentally non-atomic on ia64 by virtue of have a distinct address computation followed by the actual load or store operation, it is required to wrap the entire PCPU access in a critical section. With PCPU_GET and friends requiring curthread now that they're in a critical section, low-level use of these macros in functions like cpu_switch() is not possible anymore. Consequently, a second order set of changes is needed to avoid using PCPU_GET and friends where curthread is either not set yet, or in the process of being changed. In those cases, explicit dereferencing of pcpup is needed. In those cases it is also possible to do that. This is a direct commit to stable/10. Approved by: re@ (marius) Modified: stable/10/sys/ia64/ia64/highfp.c stable/10/sys/ia64/ia64/machdep.c stable/10/sys/ia64/ia64/mp_machdep.c stable/10/sys/ia64/ia64/xtrace.c stable/10/sys/ia64/include/pcpu.h Modified: stable/10/sys/ia64/ia64/highfp.c ============================================================================== --- stable/10/sys/ia64/ia64/highfp.c Sat Sep 6 20:16:45 2014 (r271210) +++ stable/10/sys/ia64/ia64/highfp.c Sat Sep 6 22:17:54 2014 (r271211) @@ -171,8 +171,8 @@ ia64_highfp_save_ipi(void) td->td_pcb->pcb_fpcpu = NULL; PCPU_SET(fpcurthread, NULL); } + wakeup(PCPU_PTR(fpcurthread)); mtx_unlock_spin(&ia64_highfp_mtx); - wakeup(&PCPU_GET(fpcurthread)); return ((td != NULL) ? 1 : 0); } Modified: stable/10/sys/ia64/ia64/machdep.c ============================================================================== --- stable/10/sys/ia64/ia64/machdep.c Sat Sep 6 20:16:45 2014 (r271210) +++ stable/10/sys/ia64/ia64/machdep.c Sat Sep 6 22:17:54 2014 (r271211) @@ -458,7 +458,7 @@ cpu_switch(struct thread *old, struct th #ifdef COMPAT_FREEBSD32 ia32_savectx(oldpcb); #endif - if (PCPU_GET(fpcurthread) == old) + if (pcpup->pc_fpcurthread == old) old->td_frame->tf_special.psr |= IA64_PSR_DFH; if (!savectx(oldpcb)) { newpcb = new->td_pcb; @@ -472,13 +472,13 @@ cpu_switch(struct thread *old, struct th cpu_spinwait(); #endif - PCPU_SET(curthread, new); + pcpup->pc_curthread = new; #ifdef COMPAT_FREEBSD32 ia32_restorectx(newpcb); #endif - if (PCPU_GET(fpcurthread) == new) + if (pcpup->pc_fpcurthread == new) new->td_frame->tf_special.psr &= ~IA64_PSR_DFH; restorectx(newpcb); /* We should not get here. */ @@ -500,7 +500,7 @@ cpu_throw(struct thread *old __unused, s cpu_spinwait(); #endif - PCPU_SET(curthread, new); + pcpup->pc_curthread = new; #ifdef COMPAT_FREEBSD32 ia32_restorectx(newpcb); @@ -833,7 +833,7 @@ ia64_init(void) pcpu_init(pcpup, 0, sizeof(pcpu0)); dpcpu_init(ia64_physmem_alloc(DPCPU_SIZE, PAGE_SIZE), 0); cpu_pcpu_setup(pcpup, ~0U, ia64_get_lid()); - PCPU_SET(curthread, &thread0); + pcpup->pc_curthread = &thread0; /* * Initialize the console before we print anything out. Modified: stable/10/sys/ia64/ia64/mp_machdep.c ============================================================================== --- stable/10/sys/ia64/ia64/mp_machdep.c Sat Sep 6 20:16:45 2014 (r271210) +++ stable/10/sys/ia64/ia64/mp_machdep.c Sat Sep 6 22:17:54 2014 (r271211) @@ -222,7 +222,7 @@ ia64_ap_startup(void) ia64_ap_state.as_trace = 0x108; - vhpt = PCPU_GET(md.vhpt); + vhpt = pcpup->pc_md.vhpt; map_vhpt(vhpt); ia64_set_pta(vhpt + (1 << 8) + (pmap_vhpt_log2size << 2) + 1); ia64_srlz_i(); @@ -246,8 +246,8 @@ ia64_ap_startup(void) cpu_spinwait(); /* Initialize curthread. */ - KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread")); - PCPU_SET(curthread, PCPU_GET(idlethread)); + KASSERT(pcpup->pc_idlethread != NULL, ("no idle thread")); + pcpup->pc_curthread = pcpup->pc_idlethread; pmap_invalidate_all(); Modified: stable/10/sys/ia64/ia64/xtrace.c ============================================================================== --- stable/10/sys/ia64/ia64/xtrace.c Sat Sep 6 20:16:45 2014 (r271210) +++ stable/10/sys/ia64/ia64/xtrace.c Sat Sep 6 22:17:54 2014 (r271211) @@ -94,7 +94,7 @@ ia64_xtrace_init_common(vm_paddr_t pa) __asm __volatile("mov psr.l=%0" :: "r" (psr)); ia64_srlz_i(); - PCPU_SET(md.xtrace_tail, ia64_xtrace_base); + pcpup->pc_md.xtrace_tail = ia64_xtrace_base; ia64_set_k3(ia64_xtrace_base); } @@ -119,7 +119,7 @@ ia64_xtrace_init_ap(void *buf) ia64_set_k3(0); return; } - PCPU_SET(md.xtrace_buffer, buf); + pcpup->pc_md.xtrace_buffer = buf; pa = ia64_tpa((uintptr_t)buf); ia64_xtrace_init_common(pa); } @@ -140,7 +140,7 @@ ia64_xtrace_init_bsp(void) ia64_set_k3(0); return; } - PCPU_SET(md.xtrace_buffer, buf); + pcpup->pc_md.xtrace_buffer = buf; pa = IA64_RR_MASK((uintptr_t)buf); ia64_xtrace_init_common(pa); } Modified: stable/10/sys/ia64/include/pcpu.h ============================================================================== --- stable/10/sys/ia64/include/pcpu.h Sat Sep 6 20:16:45 2014 (r271210) +++ stable/10/sys/ia64/include/pcpu.h Sat Sep 6 22:17:54 2014 (r271211) @@ -31,6 +31,7 @@ #define _MACHINE_PCPU_H_ #include +#include #include struct pcpu_stats { @@ -85,16 +86,48 @@ __curthread(void) } #define curthread (__curthread()) -#define PCPU_GET(member) (pcpup->pc_ ## member) +#define __pcpu_offset(name) __offsetof(struct pcpu, name) +#define __pcpu_type(name) __typeof(((struct pcpu *)0)->name) + +#define PCPU_ADD(name, val) \ + do { \ + __pcpu_type(pc_ ## name) *nmp; \ + critical_enter(); \ + __asm __volatile("add %0=%1,r13;;" : \ + "=r"(nmp) : "i"(__pcpu_offset(pc_ ## name))); \ + *nmp += val; \ + critical_exit(); \ + } while (0) + +#define PCPU_GET(name) \ + ({ __pcpu_type(pc_ ## name) *nmp; \ + __pcpu_type(pc_ ## name) res; \ + critical_enter(); \ + __asm __volatile("add %0=%1,r13;;" : \ + "=r"(nmp) : "i"(__pcpu_offset(pc_ ## name))); \ + res = *nmp; \ + critical_exit(); \ + res; \ + }) -/* - * XXX The implementation of this operation should be made atomic - * with respect to preemption. - */ -#define PCPU_ADD(member, value) (pcpup->pc_ ## member += (value)) #define PCPU_INC(member) PCPU_ADD(member, 1) -#define PCPU_PTR(member) (&pcpup->pc_ ## member) -#define PCPU_SET(member,value) (pcpup->pc_ ## member = (value)) + +#define PCPU_PTR(name) \ + ({ __pcpu_type(pc_ ## name) *nmp; \ + __asm __volatile("add %0=%1,r13;;" : \ + "=r"(nmp) : "i"(__pcpu_offset(pc_ ## name))); \ + nmp; \ + }) + +#define PCPU_SET(name, val) \ + do { \ + __pcpu_type(pc_ ## name) *nmp; \ + critical_enter(); \ + __asm __volatile("add %0=%1,r13;;" : \ + "=r"(nmp) : "i"(__pcpu_offset(pc_ ## name))); \ + *nmp = val; \ + critical_exit(); \ + } while (0) #endif /* _KERNEL */ From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 22:36:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F2C1285; Sat, 6 Sep 2014 22:36:37 +0000 (UTC) Received: from mail-qg0-x236.google.com (mail-qg0-x236.google.com [IPv6:2607:f8b0:400d:c04::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF8E21E0E; Sat, 6 Sep 2014 22:36:36 +0000 (UTC) Received: by mail-qg0-f54.google.com with SMTP id q108so6309758qgd.13 for ; Sat, 06 Sep 2014 15:36:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=tLXb0JB2ebmZlrCYy/ufPp1DtuRUWWxgm4ktzULFzPs=; b=XLHi9Pbijad2Yzzr6ksW+OFIJzySgEK6EFXK3/eFvW0aHlcFRvd4cmWyt1wUIlw+wM woH7ipVcVL+WRAlaep0MRALeDPSLrwHwb7aNo01S4ZyT7PVnHTZC3dqUDl0CaZtcgfNV WEZl8sgurKRo97chMDdXL2JKwta2+t8lG3HjWSPIoKzWo5+NuLCF7bqTilljcTCynCl0 D+hANvGXQQtAfUY8A6i9ZlysTOYxzPjM6K0Yx0wDGXSTK9YN4Z5USmIyFPIkBkN5lvej D1pXIqWFy810cD4BlhuPQovHCEbp/qh/6a0tT1PdFEM2q3+fo3k/82e6vHdyBzHynehJ mTbA== MIME-Version: 1.0 X-Received: by 10.224.151.69 with SMTP id b5mr30403076qaw.37.1410042995029; Sat, 06 Sep 2014 15:36:35 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.39.139 with HTTP; Sat, 6 Sep 2014 15:36:34 -0700 (PDT) In-Reply-To: <540B8457.2020500@rice.edu> References: <53e0a76b.5936.428818a9@svn.freebsd.org> <540B8457.2020500@rice.edu> Date: Sat, 6 Sep 2014 15:36:34 -0700 X-Google-Sender-Auth: 8503W6r2Cub12BLIB2TgtmJ4uDk Message-ID: Subject: Re: svn commit: r269577 - in head/sys: amd64/include arm/arm arm/include conf i386/i386 i386/include kern mips/include mips/mips powerpc/include powerpc/powerpc sparc64/include sparc64/sparc64 sys From: Adrian Chadd To: Alan Cox Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 22:36:37 -0000 On 6 September 2014 15:01, Alan Cox wrote: > On 09/06/2014 16:15, Adrian Chadd wrote: >> Hi Gleb! >> >> This commit has broken mips32 on my 128MB RAM routerstation pro board. >> >> I've tested the commit before this one (and it works). >> >> I've also tested today's -HEAD as there was some subsequent fixes to >> the sfbuf code. It hasn't completely fixed things - I still see >> processes throwing VM errors: > > > Before this commit, the sf_buf code did not cache mappings on MIPS. > Now, it does. So, I suspect that you're experiencing cache consistency > issues. To return to the pre-commit state, you'll need to define > machine-dependent sf_buf_{un,}map() functions in mips/include/sf_buf.h > for mips32 that call pmap_q{remove,enter}, respectively. Look at arm > for a similar configuration. Yup, I just noticed that, fixed it, and updated the bug (bug 193400.) Is this something that should be fixed in the vm/pmap code somewhere, or is this just the correct behaviour? -a From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 22:37:48 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F986493; Sat, 6 Sep 2014 22:37:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 473D21E23; Sat, 6 Sep 2014 22:37:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86Mbm5o068311; Sat, 6 Sep 2014 22:37:48 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86Mbm05068310; Sat, 6 Sep 2014 22:37:48 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201409062237.s86Mbm05068310@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 6 Sep 2014 22:37:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r271212 - stable/10/sys/powerpc/aim X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 22:37:48 -0000 Author: jhibbits Date: Sat Sep 6 22:37:47 2014 New Revision: 271212 URL: http://svnweb.freebsd.org/changeset/base/271212 Log: MFC r269701: Set the si_code appropriately for exception-caused signals. LLDB checks the si_code, and aborts if a code isn't known. Approved by: re (gjb) Relnotes: yes Modified: stable/10/sys/powerpc/aim/trap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/powerpc/aim/trap.c ============================================================================== --- stable/10/sys/powerpc/aim/trap.c Sat Sep 6 22:17:54 2014 (r271211) +++ stable/10/sys/powerpc/aim/trap.c Sat Sep 6 22:37:47 2014 (r271212) @@ -197,6 +197,7 @@ trap(struct trapframe *frame) case EXC_TRC: frame->srr1 &= ~PSL_SE; sig = SIGTRAP; + ucode = TRAP_TRACE; break; #ifdef __powerpc64__ @@ -204,13 +205,17 @@ trap(struct trapframe *frame) case EXC_DSE: if (handle_user_slb_spill(&p->p_vmspace->vm_pmap, (type == EXC_ISE) ? frame->srr0 : - frame->cpu.aim.dar) != 0) + frame->cpu.aim.dar) != 0) { sig = SIGSEGV; + ucode = SEGV_MAPERR; + } break; #endif case EXC_DSI: case EXC_ISI: sig = trap_pfault(frame, 1); + if (sig == SIGSEGV) + ucode = SEGV_MAPERR; break; case EXC_SC: @@ -245,8 +250,10 @@ trap(struct trapframe *frame) break; case EXC_ALI: - if (fix_unaligned(td, frame) != 0) + if (fix_unaligned(td, frame) != 0) { sig = SIGBUS; + ucode = BUS_ADRALN; + } else frame->srr0 += 4; break; @@ -264,8 +271,16 @@ trap(struct trapframe *frame) } #endif sig = SIGTRAP; + ucode = TRAP_BRKPT; } else { sig = ppc_instr_emulate(frame, td->td_pcb); + if (sig == SIGILL) { + if (frame->srr1 & EXC_PGM_PRIV) + ucode = ILL_PRVOPC; + else if (frame->srr1 & EXC_PGM_ILLEGAL) + ucode = ILL_ILLOPC; + } else if (sig == SIGFPE) + ucode = FPE_FLTINV; /* Punt for now, invalid operation. */ } break; @@ -276,6 +291,7 @@ trap(struct trapframe *frame) * but it at least prevents the kernel from dying. */ sig = SIGBUS; + ucode = BUS_OBJERR; break; default: From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 22:38:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F6885C4; Sat, 6 Sep 2014 22:38:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AF0C1E2A; Sat, 6 Sep 2014 22:38:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s86McXi5068467; Sat, 6 Sep 2014 22:38:33 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s86McXJE068463; Sat, 6 Sep 2014 22:38:33 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201409062238.s86McXJE068463@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 6 Sep 2014 22:38:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271213 - head/sys/mips/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 22:38:33 -0000 Author: adrian Date: Sat Sep 6 22:38:32 2014 New Revision: 271213 URL: http://svnweb.freebsd.org/changeset/base/271213 Log: Implement local sfbuf_map and sfbuf_unmap for MIPS32. The pre-rework behaviour was not to keep the cached mappings around after the sfbuf was used but instead to recycle said mappings. PR: kern/193400 Modified: head/sys/mips/include/sf_buf.h head/sys/mips/include/vmparam.h Modified: head/sys/mips/include/sf_buf.h ============================================================================== --- head/sys/mips/include/sf_buf.h Sat Sep 6 22:37:47 2014 (r271212) +++ head/sys/mips/include/sf_buf.h Sat Sep 6 22:38:32 2014 (r271213) @@ -48,4 +48,23 @@ sf_buf_page(struct sf_buf *sf) } #endif /* __mips_n64 */ + +#ifndef __mips_n64 /* in 32 bit mode we manage our own mappings */ + +static inline void +sf_buf_map(struct sf_buf *sf, int flags) +{ + + pmap_qenter(sf->kva, &sf->m, 1); +} + +static inline int +sf_buf_unmap(struct sf_buf *sf) +{ + pmap_qremove(sf->kva, 1); + return (1); +} + +#endif /* ! __mips_n64 */ + #endif /* !_MACHINE_SF_BUF_H_ */ Modified: head/sys/mips/include/vmparam.h ============================================================================== --- head/sys/mips/include/vmparam.h Sat Sep 6 22:37:47 2014 (r271212) +++ head/sys/mips/include/vmparam.h Sat Sep 6 22:38:32 2014 (r271213) @@ -189,6 +189,7 @@ #ifndef __mips_n64 #define SFBUF +#define SFBUF_MAP #endif #endif /* !_MACHINE_VMPARAM_H_ */ From owner-svn-src-all@FreeBSD.ORG Sat Sep 6 23:03:14 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B783CA9; Sat, 6 Sep 2014 23:03:14 +0000 (UTC) Received: from pp2.rice.edu (proofpoint2.mail.rice.edu [128.42.201.101]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47FA510BA; Sat, 6 Sep 2014 23:03:13 +0000 (UTC) Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.14.5/8.14.5) with SMTP id s86N2Nmj012874; Sat, 6 Sep 2014 18:03:11 -0500 Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by pp2.rice.edu with ESMTP id 1p7nyb09nm-1; Sat, 06 Sep 2014 18:03:10 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh11.mail.rice.edu (Postfix) with ESMTPSA id 5D1D84C01C5; Sat, 6 Sep 2014 18:03:10 -0500 (CDT) Message-ID: <540B92AD.6020905@rice.edu> Date: Sat, 06 Sep 2014 18:03:09 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r269577 - in head/sys: amd64/include arm/arm arm/include conf i386/i386 i386/include kern mips/include mips/mips powerpc/include powerpc/powerpc sparc64/include sparc64/sparc64 sys References: <53e0a76b.5936.428818a9@svn.freebsd.org> <540B8457.2020500@rice.edu> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=0 kscore.compositescore=0 circleOfTrustscore=0 compositescore=0.605690798989426 urlsuspect_oldscore=0.00569079898942585 suspectscore=3 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=1 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=0 rbsscore=0.605690798989426 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1409060267 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Sep 2014 23:03:14 -0000 On 09/06/2014 17:36, Adrian Chadd wrote: > On 6 September 2014 15:01, Alan Cox wrote: >> On 09/06/2014 16:15, Adrian Chadd wrote: >>> Hi Gleb! >>> >>> This commit has broken mips32 on my 128MB RAM routerstation pro board. >>> >>> I've tested the commit before this one (and it works). >>> >>> I've also tested today's -HEAD as there was some subsequent fixes to >>> the sfbuf code. It hasn't completely fixed things - I still see >>> processes throwing VM errors: >> >> Before this commit, the sf_buf code did not cache mappings on MIPS. >> Now, it does. So, I suspect that you're experiencing cache consistency >> issues. To return to the pre-commit state, you'll need to define >> machine-dependent sf_buf_{un,}map() functions in mips/include/sf_buf.h >> for mips32 that call pmap_q{remove,enter}, respectively. Look at arm >> for a similar configuration. > Yup, I just noticed that, fixed it, and updated the bug (bug 193400.) > > Is this something that should be fixed in the vm/pmap code somewhere, > or is this just the correct behaviour? No. However, if you feel like tinkering, you could replace the body of sf_buf_unmap() with mips_dcache_wbinv_range_index(va, PAGE_SIZE); return (0); and see what happens. Can you remind me what the cache configuration is on mip32? Does software only have to worry about I and D cache consistency?