svn commit: r308329 - head/usr.bin/ministat
Author: cperciva Date: Sat Nov 5 06:33:39 2016 New Revision: 308329 URL: https://svnweb.freebsd.org/changeset/base/308329 Log: Reduce the bogosity of ministat's % difference calculations. The previous calculation used an approximation which was only valid in cases where the means being compared were similar; this resulted in very odd claims being made, e.g. that 0 +/- 0 is a difference of -100% +/- 1% from 100 +/- 1. The new calculation scales sample standard deviations by the means, and yields approximately correct percentage difference bounds providing that the reference population is bounded away from zero. (In the case where the values being compared are not sufficiently bounded away from zero, the distribution of ratios becomes much harder to calculate, and is not likely to be useful anyway.) Note that when ministat is used for its intended purpose of determining whether two samples are statistically different, this change is unlikely to have any noticeable effect; in such cases the means will be similar enough that the correction applied here will be minimal. Modified: head/usr.bin/ministat/ministat.c Modified: head/usr.bin/ministat/ministat.c == --- head/usr.bin/ministat/ministat.cSat Nov 5 04:40:58 2016 (r308328) +++ head/usr.bin/ministat/ministat.cSat Nov 5 06:33:39 2016 (r308329) @@ -232,6 +232,7 @@ static void Relative(struct dataset *ds, struct dataset *rs, int confidx) { double spool, s, d, e, t; + double re; int i; i = ds->n + rs->n - 2; @@ -246,11 +247,16 @@ Relative(struct dataset *ds, struct data d = Avg(ds) - Avg(rs); e = t * s; + re = (ds->n - 1) * Var(ds) + (rs->n - 1) * Var(rs) * + (Avg(ds) * Avg(ds)) / (Avg(rs) * Avg(rs)); + re *= (ds->n + rs->n) / (ds->n * rs->n * (ds->n + rs->n - 2.0)); + re = t * sqrt(re); + if (fabs(d) > e) { printf("Difference at %.1f%% confidence\n", studentpct[confidx]); printf("%g +/- %g\n", d, e); - printf("%g%% +/- %g%%\n", d * 100 / Avg(rs), e * 100 / Avg(rs)); + printf("%g%% +/- %g%%\n", d * 100 / Avg(rs), re * 100 / Avg(rs)); printf("(Student's t, pooled s = %g)\n", spool); } else { printf("No difference proven at %.1f%% confidence\n", ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308328 - in stable/11/sys: arm/nvidia dev/extres/regulator
Author: mmel Date: Sat Nov 5 04:40:58 2016 New Revision: 308328 URL: https://svnweb.freebsd.org/changeset/base/308328 Log: MFC r307558: REGULATOR: Move functions for handling with regulator ranges to common file. They can be useful for other PMICs. Modified: stable/11/sys/arm/nvidia/as3722_regulators.c stable/11/sys/dev/extres/regulator/regulator.c stable/11/sys/dev/extres/regulator/regulator.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/nvidia/as3722_regulators.c == --- stable/11/sys/arm/nvidia/as3722_regulators.cSat Nov 5 04:36:12 2016(r308327) +++ stable/11/sys/arm/nvidia/as3722_regulators.cSat Nov 5 04:40:58 2016(r308328) @@ -71,13 +71,6 @@ enum as3722_reg_id { AS3722_REG_ID_LDO11, }; -struct regulator_range { - u_int min_uvolt; - u_int step_uvolt; - u_int min_sel; - u_int max_sel; -}; - /* Regulator HW definition. */ struct reg_def { @@ -107,40 +100,32 @@ struct as3722_reg_sc { int enable_usec; }; -#defineRANGE_INIT(_min_sel, _max_sel, _min_uvolt, _step_uvolt) \ -{ \ - .min_sel= _min_sel, \ - .max_sel= _max_sel, \ - .min_uvolt = _min_uvolt, \ - .step_uvolt = _step_uvolt, \ -} - static struct regulator_range as3722_sd016_ranges[] = { - RANGE_INIT(0x00, 0x00, 0, 0), - RANGE_INIT(0x01, 0x5A, 61, 1), + REG_RANGE_INIT(0x00, 0x00, 0, 0), + REG_RANGE_INIT(0x01, 0x5A, 61, 1), }; static struct regulator_range as3722_sd0_lv_ranges[] = { - RANGE_INIT(0x00, 0x00, 0, 0), - RANGE_INIT(0x01, 0x6E, 41, 1), + REG_RANGE_INIT(0x00, 0x00, 0, 0), + REG_RANGE_INIT(0x01, 0x6E, 41, 1), }; static struct regulator_range as3722_sd_ranges[] = { - RANGE_INIT(0x00, 0x00, 0, 0), - RANGE_INIT(0x01, 0x40, 612500, 12500), - RANGE_INIT(0x41, 0x70, 1425000, 25000), - RANGE_INIT(0x71, 0x7F, 265, 5), + REG_RANGE_INIT(0x00, 0x00, 0, 0), + REG_RANGE_INIT(0x01, 0x40, 612500, 12500), + REG_RANGE_INIT(0x41, 0x70, 1425000, 25000), + REG_RANGE_INIT(0x71, 0x7F, 265, 5), }; static struct regulator_range as3722_ldo3_ranges[] = { - RANGE_INIT(0x00, 0x00, 0, 0), - RANGE_INIT(0x01, 0x2D, 62, 2), + REG_RANGE_INIT(0x00, 0x00, 0, 0), + REG_RANGE_INIT(0x01, 0x2D, 62, 2), }; static struct regulator_range as3722_ldo_ranges[] = { - RANGE_INIT(0x00, 0x00, 0, 0), - RANGE_INIT(0x01, 0x24, 825000, 25000), - RANGE_INIT(0x40, 0x7F, 1725000, 25000), + REG_RANGE_INIT(0x00, 0x00, 0, 0), + REG_RANGE_INIT(0x01, 0x24, 825000, 25000), + REG_RANGE_INIT(0x40, 0x7F, 1725000, 25000), }; static struct reg_def as3722s_def[] = { @@ -402,87 +387,6 @@ DEFINE_CLASS_1(as3722_regnode, as3722_re sizeof(struct as3722_reg_sc), regnode_class); static int -regulator_range_sel_to_volt(struct as3722_reg_sc *sc, uint8_t sel, int *volt) -{ - struct regulator_range *range; - struct reg_def *def; - int i; - - def = sc->def; - if (def->nranges == 0) - panic("Voltage regulator have zero ranges\n"); - - for (i = 0; i < def->nranges ; i++) { - range = def->ranges + i; - - if (!(sel >= range->min_sel && - sel <= range->max_sel)) - continue; - - sel -= range->min_sel; - - *volt = range->min_uvolt + sel * range->step_uvolt; - return (0); - } - - return (ERANGE); -} - -static int -regulator_range_volt_to_sel(struct as3722_reg_sc *sc, int min_uvolt, -int max_uvolt, uint8_t *out_sel) -{ - struct regulator_range *range; - struct reg_def *def; - uint8_t sel; - int uvolt; - int rv, i; - - def = sc->def; - if (def->nranges == 0) - panic("Voltage regulator have zero ranges\n"); - - for (i = 0; i < def->nranges; i++) { - range = def->ranges + i; - uvolt = range->min_uvolt + - (range->max_sel - range->min_sel) * range->step_uvolt; - - if ((min_uvolt > uvolt) || - (max_uvolt < range->min_uvolt)) - continue; - - if (min_uvolt <= range->min_uvolt) - min_uvolt = range->min_uvolt; - - /* If step is zero then range is fixed voltage range. */ - if (r
svn commit: r308327 - stable/11/sys/arm/include
Author: mmel Date: Sat Nov 5 04:36:12 2016 New Revision: 308327 URL: https://svnweb.freebsd.org/changeset/base/308327 Log: MFC r306667,r306668: r306667: ARM: Add atomic_swap_64(). It's need by linuxkpi and drm-next-4.7. r306668: ARM: Add mising early clobber modifier in atomic_swap_32(). Modified: stable/11/sys/arm/include/atomic-v6.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/include/atomic-v6.h == --- stable/11/sys/arm/include/atomic-v6.h Sat Nov 5 04:32:46 2016 (r308326) +++ stable/11/sys/arm/include/atomic-v6.h Sat Nov 5 04:36:12 2016 (r308327) @@ -652,7 +652,7 @@ atomic_swap_32(volatile uint32_t *p, uin " teq %[exf], #0 \n" " it ne \n" " bne 1b \n" - : [ret] "=r" (ret), + : [ret] "=&r" (ret), [exf] "=&r" (exflag) : [val] "r" (v), [ptr] "r" (p) @@ -660,6 +660,26 @@ atomic_swap_32(volatile uint32_t *p, uin return (ret); } +static __inline uint64_t +atomic_swap_64(volatile uint64_t *p, uint64_t v) +{ + uint64_t ret; + uint32_t exflag; + + __asm __volatile( + "1: ldrexd %Q[ret], %R[ret], [%[ptr]] \n" + " strexd %[exf], %Q[val], %R[val], [%[ptr]] \n" + " teq %[exf], #0 \n" + " it ne \n" + " bne 1b \n" + : [ret] "=&r" (ret), + [exf] "=&r" (exflag) + : [val] "r" (v), + [ptr] "r" (p) + : "cc", "memory"); + return (ret); +} + #undef ATOMIC_ACQ_REL #undef ATOMIC_ACQ_REL_LONG ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308326 - stable/11/sys/arm/nvidia
Author: mmel Date: Sat Nov 5 04:32:46 2016 New Revision: 308326 URL: https://svnweb.freebsd.org/changeset/base/308326 Log: MFC r30: TEGRA: Fix PCIe link timeout. Modified: stable/11/sys/arm/nvidia/tegra_pcie.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/nvidia/tegra_pcie.c == --- stable/11/sys/arm/nvidia/tegra_pcie.c Sat Nov 5 04:30:44 2016 (r308325) +++ stable/11/sys/arm/nvidia/tegra_pcie.c Sat Nov 5 04:32:46 2016 (r308326) @@ -293,7 +293,8 @@ tegra_pci_get_ranges(phandle_t node, st #define RP_LINK_CONTROL_STATUS_DL_LINK_ACTIVE 0x2000 #define RP_LINK_CONTROL_STATUS_LINKSTAT_MASK 0x3fff -#defineTEGRA_PCIE_LINKUP_TIMEOUT 200 +/* Wait 50 ms (per port) for link. */ +#defineTEGRA_PCIE_LINKUP_TIMEOUT 5 #defineDEBUG #ifdef DEBUG @@ -1257,6 +1258,7 @@ tegra_pcib_wait_for_link(struct tegra_pc RP_VEND_XP, 4); if (reg & RP_VEND_XP_DL_UP) break; + DELAY(1); } if (i <= 0) @@ -1268,6 +1270,7 @@ tegra_pcib_wait_for_link(struct tegra_pc if (reg & RP_LINK_CONTROL_STATUS_DL_LINK_ACTIVE) break; + DELAY(1); } if (i <= 0) return (ETIMEDOUT); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308325 - in stable/11/sys/arm: allwinner amlogic/aml8726 at91 broadcom/bcm2835 freescale/imx lpc mv rockchip ti ti/am335x ti/omap4 ti/twl xscale/i8134x xscale/ixp425
Author: mmel Date: Sat Nov 5 04:30:44 2016 New Revision: 308325 URL: https://svnweb.freebsd.org/changeset/base/308325 Log: MFC r306902: ARM: Remove unused includes. Modified: stable/11/sys/arm/allwinner/a10_gpio.c stable/11/sys/arm/allwinner/aw_wdog.c stable/11/sys/arm/amlogic/aml8726/aml8726_machdep.c stable/11/sys/arm/amlogic/aml8726/aml8726_wdt.c stable/11/sys/arm/at91/at91_aic.c stable/11/sys/arm/at91/at91_cfata.c stable/11/sys/arm/at91/at91_mci.c stable/11/sys/arm/at91/at91_pit.c stable/11/sys/arm/at91/at91_pmc.c stable/11/sys/arm/at91/at91_st.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_dma.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_spi.c stable/11/sys/arm/broadcom/bcm2835/bcm2835_wdog.c stable/11/sys/arm/freescale/imx/imx51_ipuv3.c stable/11/sys/arm/freescale/imx/imx51_ipuv3_fbd.c stable/11/sys/arm/lpc/lpc_fb.c stable/11/sys/arm/lpc/lpc_gpio.c stable/11/sys/arm/lpc/lpc_mmc.c stable/11/sys/arm/lpc/lpc_spi.c stable/11/sys/arm/mv/mpic.c stable/11/sys/arm/rockchip/rk30xx_gpio.c stable/11/sys/arm/rockchip/rk30xx_wdog.c stable/11/sys/arm/ti/am335x/am335x_gpio.c stable/11/sys/arm/ti/am335x/am335x_lcd_syscons.c stable/11/sys/arm/ti/am335x/am335x_scm_padconf.c stable/11/sys/arm/ti/omap4/omap4_prcm_clks.c stable/11/sys/arm/ti/ti_cpuid.c stable/11/sys/arm/ti/ti_pinmux.c stable/11/sys/arm/ti/ti_prcm.c stable/11/sys/arm/ti/ti_scm.c stable/11/sys/arm/ti/twl/twl.c stable/11/sys/arm/ti/twl/twl_clks.c stable/11/sys/arm/ti/twl/twl_vreg.c stable/11/sys/arm/xscale/i8134x/i80321_timer.c stable/11/sys/arm/xscale/i8134x/i80321_wdog.c stable/11/sys/arm/xscale/ixp425/avila_ata.c stable/11/sys/arm/xscale/ixp425/ixp425_intr.h stable/11/sys/arm/xscale/ixp425/ixp425_npe.c stable/11/sys/arm/xscale/ixp425/ixp425_qmgr.c stable/11/sys/arm/xscale/ixp425/ixp425_timer.c stable/11/sys/arm/xscale/ixp425/ixp425_wdog.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/allwinner/a10_gpio.c == --- stable/11/sys/arm/allwinner/a10_gpio.c Sat Nov 5 04:17:32 2016 (r308324) +++ stable/11/sys/arm/allwinner/a10_gpio.c Sat Nov 5 04:30:44 2016 (r308325) @@ -41,8 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include #include Modified: stable/11/sys/arm/allwinner/aw_wdog.c == --- stable/11/sys/arm/allwinner/aw_wdog.c Sat Nov 5 04:17:32 2016 (r308324) +++ stable/11/sys/arm/allwinner/aw_wdog.c Sat Nov 5 04:30:44 2016 (r308325) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: stable/11/sys/arm/amlogic/aml8726/aml8726_machdep.c == --- stable/11/sys/arm/amlogic/aml8726/aml8726_machdep.c Sat Nov 5 04:17:32 2016(r308324) +++ stable/11/sys/arm/amlogic/aml8726/aml8726_machdep.c Sat Nov 5 04:30:44 2016(r308325) @@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include Modified: stable/11/sys/arm/amlogic/aml8726/aml8726_wdt.c == --- stable/11/sys/arm/amlogic/aml8726/aml8726_wdt.c Sat Nov 5 04:17:32 2016(r308324) +++ stable/11/sys/arm/amlogic/aml8726/aml8726_wdt.c Sat Nov 5 04:30:44 2016(r308325) @@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include Modified: stable/11/sys/arm/at91/at91_aic.c == --- stable/11/sys/arm/at91/at91_aic.c Sat Nov 5 04:17:32 2016 (r308324) +++ stable/11/sys/arm/at91/at91_aic.c Sat Nov 5 04:30:44 2016 (r308325) @@ -38,8 +38,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include #include #include Modified: stable/11/sys/arm/at91/at91_cfata.c == --- stable/11/sys/arm/at91/at91_cfata.c Sat Nov 5 04:17:32 2016 (r308324) +++ stable/11/sys/arm/at91/at91_cfata.c Sat Nov 5 04:30:44 2016 (r308325) @@ -47,8 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include #include Modified: stable/11/sys/arm/at91/at91_mci.c == --- stable/11/sys/arm/at91/at91_mci.c Sat Nov 5 04:17:32 2016 (r308324) +++ stable/11/sys/arm/at91/at91_mci.c Sat Nov 5 04:30:44 2016 (r308325) @@ -51,8 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include #include #include Modified: stable/11/sys/arm/at91/at91_pit.c
svn commit: r308324 - in stable/11/sys: arm/allwinner arm/allwinner/clk arm/nvidia arm/nvidia/tegra124 dev/dwc dev/extres/clk dev/extres/hwreset dev/extres/phy dev/extres/regulator dev/iicbus/twsi ...
Author: mmel Date: Sat Nov 5 04:17:32 2016 New Revision: 308324 URL: https://svnweb.freebsd.org/changeset/base/308324 Log: MFC r302523,r302528: r302523: Add clk_get_by_ofw_node_index, which is like clk_get_by_ofw_index but operates on a specific OF node instead of the pass in device's OF node. r302528: EXTRES: Add OF node as argument to all _get_by_ofw_() functions. In some cases, the driver must handle given properties located in specific OF subnode. Instead of creating duplicate set of function, add 'node' as argument to existing functions, defaulting it to device OF node. Modified: stable/11/sys/arm/allwinner/a10_ahci.c stable/11/sys/arm/allwinner/a10_codec.c stable/11/sys/arm/allwinner/a10_dmac.c stable/11/sys/arm/allwinner/a10_ehci.c stable/11/sys/arm/allwinner/a10_fb.c stable/11/sys/arm/allwinner/a10_gpio.c stable/11/sys/arm/allwinner/a10_hdmi.c stable/11/sys/arm/allwinner/a10_mmc.c stable/11/sys/arm/allwinner/aw_if_dwc.c stable/11/sys/arm/allwinner/aw_rsb.c stable/11/sys/arm/allwinner/aw_usbphy.c stable/11/sys/arm/allwinner/clk/aw_ahbclk.c stable/11/sys/arm/allwinner/clk/aw_apbclk.c stable/11/sys/arm/allwinner/clk/aw_axiclk.c stable/11/sys/arm/allwinner/clk/aw_codecclk.c stable/11/sys/arm/allwinner/clk/aw_cpuclk.c stable/11/sys/arm/allwinner/clk/aw_cpusclk.c stable/11/sys/arm/allwinner/clk/aw_debeclk.c stable/11/sys/arm/allwinner/clk/aw_gate.c stable/11/sys/arm/allwinner/clk/aw_gmacclk.c stable/11/sys/arm/allwinner/clk/aw_hdmiclk.c stable/11/sys/arm/allwinner/clk/aw_lcdclk.c stable/11/sys/arm/allwinner/clk/aw_mmcclk.c stable/11/sys/arm/allwinner/clk/aw_modclk.c stable/11/sys/arm/allwinner/clk/aw_pll.c stable/11/sys/arm/allwinner/clk/aw_usbclk.c stable/11/sys/arm/allwinner/if_awg.c stable/11/sys/arm/allwinner/if_emac.c stable/11/sys/arm/nvidia/tegra124/tegra124_cpufreq.c stable/11/sys/arm/nvidia/tegra124/tegra124_pmc.c stable/11/sys/arm/nvidia/tegra124/tegra124_xusbpadctl.c stable/11/sys/arm/nvidia/tegra_ahci.c stable/11/sys/arm/nvidia/tegra_efuse.c stable/11/sys/arm/nvidia/tegra_ehci.c stable/11/sys/arm/nvidia/tegra_i2c.c stable/11/sys/arm/nvidia/tegra_pcie.c stable/11/sys/arm/nvidia/tegra_rtc.c stable/11/sys/arm/nvidia/tegra_sdhci.c stable/11/sys/arm/nvidia/tegra_soctherm.c stable/11/sys/arm/nvidia/tegra_uart.c stable/11/sys/arm/nvidia/tegra_usbphy.c stable/11/sys/dev/dwc/if_dwc.c stable/11/sys/dev/extres/clk/clk.c stable/11/sys/dev/extres/clk/clk.h stable/11/sys/dev/extres/clk/clk_fixed.c stable/11/sys/dev/extres/hwreset/hwreset.c stable/11/sys/dev/extres/hwreset/hwreset.h stable/11/sys/dev/extres/phy/phy.c stable/11/sys/dev/extres/phy/phy.h stable/11/sys/dev/extres/regulator/regulator.c stable/11/sys/dev/extres/regulator/regulator.h stable/11/sys/dev/iicbus/twsi/a10_twsi.c stable/11/sys/dev/uart/uart_dev_snps.c stable/11/sys/dev/usb/controller/generic_ohci.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/arm/allwinner/a10_ahci.c == --- stable/11/sys/arm/allwinner/a10_ahci.c Sat Nov 5 01:01:50 2016 (r308323) +++ stable/11/sys/arm/allwinner/a10_ahci.c Sat Nov 5 04:17:32 2016 (r308324) @@ -313,12 +313,12 @@ ahci_a10_attach(device_t dev) return (ENXIO); /* Enable clocks */ - error = clk_get_by_ofw_index(dev, 0, &clk_pll); + error = clk_get_by_ofw_index(dev, 0, 0, &clk_pll); if (error != 0) { device_printf(dev, "Cannot get PLL clock\n"); goto fail; } - error = clk_get_by_ofw_index(dev, 1, &clk_gate); + error = clk_get_by_ofw_index(dev, 0, 1, &clk_gate); if (error != 0) { device_printf(dev, "Cannot get gate clock\n"); goto fail; Modified: stable/11/sys/arm/allwinner/a10_codec.c == --- stable/11/sys/arm/allwinner/a10_codec.c Sat Nov 5 01:01:50 2016 (r308323) +++ stable/11/sys/arm/allwinner/a10_codec.c Sat Nov 5 04:17:32 2016 (r308324) @@ -786,12 +786,12 @@ a10codec_attach(device_t dev) } /* Get clocks */ - error = clk_get_by_ofw_name(dev, "apb", &clk_apb); + error = clk_get_by_ofw_name(dev, 0, "apb", &clk_apb); if (error != 0) { device_printf(dev, "cannot find apb clock\n"); goto fail; } - error = clk_get_by_ofw_name(dev, "codec", &clk_codec); + error = clk_get_by_ofw_name(dev, 0, "codec", &clk_codec); if (error != 0) { device_printf(dev, "cannot find codec clock\n"); goto fail; Modified: stable/11/sys/arm/allwinner/a10_dmac.c == --- stable/11/sys/arm/allwinner/a10_dmac.c
svn commit: r308323 - svnadmin/conf
Author: rwatson Date: Sat Nov 5 01:01:50 2016 New Revision: 308323 URL: https://svnweb.freebsd.org/changeset/base/308323 Log: Unshackle jonathan from the chains of mentorship: he has [more than] done his time. Modified: svnadmin/conf/mentors Modified: svnadmin/conf/mentors == --- svnadmin/conf/mentors Fri Nov 4 22:03:41 2016(r308322) +++ svnadmin/conf/mentors Sat Nov 5 01:01:50 2016(r308323) @@ -23,7 +23,6 @@ eri gnn Co-mentor: thompsa ivadaszadrian Co-mentor: cognet jceel trasz jkhrwatson -jonathan rwatson jwdrmacklem kadesaiken Co-mentor: scottl, ambrisko karels gnn ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308322 - stable/10/sys/dev/cxgbe
Author: jhb Date: Fri Nov 4 22:03:41 2016 New Revision: 308322 URL: https://svnweb.freebsd.org/changeset/base/308322 Log: MFC 302313: cxgbe(4): Avoid a NULL dereference while dumping the L2 table. Entries used by switching filters that rewrite L2 information do not have any associated ifnet. Modified: stable/10/sys/dev/cxgbe/t4_l2t.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_l2t.c == --- stable/10/sys/dev/cxgbe/t4_l2t.cFri Nov 4 21:59:27 2016 (r308321) +++ stable/10/sys/dev/cxgbe/t4_l2t.cFri Nov 4 22:03:41 2016 (r308322) @@ -306,7 +306,6 @@ sysctl_l2t(SYSCTL_HANDLER_ARGS) } /* -* XXX: e->ifp may not be around. * XXX: IPv6 addresses may not align properly in the output. */ sbuf_printf(sb, "\n%4u %-15s %02x:%02x:%02x:%02x:%02x:%02x %4d" @@ -315,7 +314,7 @@ sysctl_l2t(SYSCTL_HANDLER_ARGS) e->dmac[3], e->dmac[4], e->dmac[5], e->vlan & 0xfff, vlan_prio(e), e->lport, l2e_state(e), atomic_load_acq_int(&e->refcnt), - e->ifp->if_xname); + e->ifp ? e->ifp->if_xname : "-"); skip: mtx_unlock(&e->lock); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308321 - in stable/10: sys/dev/cxgbe tools/tools/cxgbetool
Author: jhb Date: Fri Nov 4 21:59:27 2016 New Revision: 308321 URL: https://svnweb.freebsd.org/changeset/base/308321 Log: MFC 301516,301520,301531,301535,301540,301542,301628: Traffic scheduling updates. 301516: cxgbetool: Allow max-rate > 10Gbps for rate-limited traffic. 301520: cxgbe(4): Create a reusable struct type for scheduling class parameters. 301531: cxgbe(4): Break up set_sched_class. Validate the channel number and min/max rates against their actual limits (which are chip and port specific) instead of hardcoded constants. 301535: cxgbe(4): Track the state of the hardware traffic schedulers in the driver. This works as long as everyone uses set_sched_class_params to program them. 301540: cxgbe(4): Provide information about traffic classes in the sysctl mib. 301542: cxgbe(4): A couple of fixes to set_sched_queue. - Validate the scheduling class against the actual limit (which is chip specific) instead of a magic number. - Return an error if an attempt is made to manipulate the tx queues of a VI that hasn't been initialized. 301628: cxgbe(4): Add a sysctl to manage the binding of a txq to a traffic class. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/t4_ioctl.h stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/t4_sge.c stable/10/tools/tools/cxgbetool/cxgbetool.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/adapter.h == --- stable/10/sys/dev/cxgbe/adapter.h Fri Nov 4 21:52:48 2016 (r308320) +++ stable/10/sys/dev/cxgbe/adapter.h Fri Nov 4 21:59:27 2016 (r308321) @@ -48,6 +48,7 @@ #include #include "offload.h" +#include "t4_ioctl.h" #include "common/t4_msg.h" #include "firmware/t4fw_interface.h" @@ -261,6 +262,17 @@ struct vi_info { uint8_t hw_addr[ETHER_ADDR_LEN]; /* factory MAC address, won't change */ }; +enum { + /* tx_sched_class flags */ + TX_SC_OK= (1 << 0), /* Set up in hardware, active. */ +}; + +struct tx_sched_class { + int refcount; + int flags; + struct t4_sched_class_params params; +}; + struct port_info { device_t dev; struct adapter *adapter; @@ -270,6 +282,8 @@ struct port_info { int up_vis; int uld_vis; + struct tx_sched_class *tc; /* traffic classes for this channel */ + struct mtx pi_lock; char lockname[16]; unsigned long flags; @@ -523,6 +537,7 @@ struct sge_txq { struct tx_sdesc *sdesc; /* KVA of software descriptor ring */ struct sglist *gl; __be32 cpl_ctrl0; /* for convenience */ + int tc_idx; /* traffic class */ struct task tx_reclaim_task; /* stats for common events first */ Modified: stable/10/sys/dev/cxgbe/t4_ioctl.h == --- stable/10/sys/dev/cxgbe/t4_ioctl.h Fri Nov 4 21:52:48 2016 (r308320) +++ stable/10/sys/dev/cxgbe/t4_ioctl.h Fri Nov 4 21:59:27 2016 (r308321) @@ -215,6 +215,20 @@ struct t4_filter { struct t4_filter_specification fs; }; +/* Tx Scheduling Class parameters */ +struct t4_sched_class_params { + int8_t level; /* scheduler hierarchy level */ + int8_t mode; /* per-class or per-flow */ + int8_t rateunit; /* bit or packet rate */ + int8_t ratemode; /* %port relative or kbps absolute */ + int8_t channel; /* scheduler channel [0..N] */ + int8_t cl;/* scheduler class [0..N] */ + int32_t minrate; /* minimum rate */ + int32_t maxrate; /* maximum rate */ + int16_t weight;/* percent weight */ + int16_t pktsize; /* average packet size */ +}; + /* * Support for "sched-class" command to allow a TX Scheduling Class to be * programmed with various parameters. @@ -226,19 +240,7 @@ struct t4_sched_params { struct {/* sub-command SCHED_CLASS_CONFIG */ int8_t minmax;/* minmax enable */ } config; - struct {/* sub-command SCHED_CLASS_PARAMS */ - int8_t level; /* scheduler hierarchy level */ - int8_t mode; /* per-class or per-flow */ - int8_t rateunit; /* bit or packet rate */ - int8_t ratemode; /* %port relative or kbps - absolute */ - int8_t channel; /* scheduler channel [0..N] */ - int8_t cl;/* scheduler class [0..N] */ - int32_t minrate; /* minimum rate */
svn commit: r308320 - stable/10/sys/dev/cxgbe
Author: jhb Date: Fri Nov 4 21:52:48 2016 New Revision: 308320 URL: https://svnweb.freebsd.org/changeset/base/308320 Log: MFC 297883: cxgbe(4): Always dispatch all work requests that have been written to the descriptor ring before leaving drain_wrq_wr_list. Modified: stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_sge.c == --- stable/10/sys/dev/cxgbe/t4_sge.cFri Nov 4 21:48:22 2016 (r308319) +++ stable/10/sys/dev/cxgbe/t4_sge.cFri Nov 4 21:52:48 2016 (r308320) @@ -1750,7 +1750,8 @@ drain_wrq_wr_list(struct adapter *sc, st MPASS(TAILQ_EMPTY(&wrq->incomplete_wrs)); wr = STAILQ_FIRST(&wrq->wr_list); MPASS(wr != NULL); /* Must be called with something useful to do */ - dbdiff = IDXDIFF(eq->pidx, eq->dbidx, eq->sidx); + MPASS(eq->pidx == eq->dbidx); + dbdiff = 0; do { eq->cidx = read_hw_cidx(eq); @@ -1762,7 +1763,7 @@ drain_wrq_wr_list(struct adapter *sc, st MPASS(wr->wrq == wrq); n = howmany(wr->wr_len, EQ_ESIZE); if (available < n) - return; + break; dst = (void *)&eq->desc[eq->pidx]; if (__predict_true(eq->sidx - eq->pidx > n)) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308319 - stable/10/sys/dev/cxgbe/common
Author: jhb Date: Fri Nov 4 21:48:22 2016 New Revision: 308319 URL: https://svnweb.freebsd.org/changeset/base/308319 Log: MFC 297875: cxgbe(4): Always read the entire mailbox into the reply buffer. The size of the reply can be different from the size of the command in case a debug firmware asserts. fw_asrt() needs the entire reply in order to decode the location of the assert. Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c == --- stable/10/sys/dev/cxgbe/common/t4_hw.c Fri Nov 4 21:43:10 2016 (r308318) +++ stable/10/sys/dev/cxgbe/common/t4_hw.c Fri Nov 4 21:48:22 2016 (r308319) @@ -378,7 +378,7 @@ int t4_wr_mbox_meat_timeout(struct adapt /* * Retrieve the command reply and release the mailbox. */ - get_mbox_rpl(adap, cmd_rpl, size/8, data_reg); + get_mbox_rpl(adap, cmd_rpl, MBOX_LEN/8, data_reg); t4_write_reg(adap, ctl_reg, V_MBOWNER(X_MBOWNER_NONE)); CH_DUMP_MBOX(adap, mbox, data_reg); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308318 - in stable/10/sys: dev/cxgbe dev/cxgbe/tom kern modules/cxgbe/if_cxgbe sys
Author: jhb Date: Fri Nov 4 21:43:10 2016 New Revision: 308318 URL: https://svnweb.freebsd.org/changeset/base/308318 Log: MFC 297776,29,297779: Add DDB commands to cxgbe(4). 297776: Add a function to lookup a device_t object by name. This just walks the global list of devices looking for one with the requested name. The one use case outside of devctl2's implementation is for DDB commands that wish to lookup devices by name. 29: Add a 'show t4 tcb ' command to dump a TCB from DDB. This allows the contents of a TCB to be extracted from a T4/T5 card in DDB after a panic. 297779: Add a 'show t4 devlog ' DDB command. This command displays the adapter's firmware device log similar to the dev..misc.devlog sysctl. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/tom/t4_ddp.c stable/10/sys/kern/subr_bus.c stable/10/sys/modules/cxgbe/if_cxgbe/Makefile stable/10/sys/sys/bus.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c == --- stable/10/sys/dev/cxgbe/t4_main.c Fri Nov 4 21:10:02 2016 (r308317) +++ stable/10/sys/dev/cxgbe/t4_main.c Fri Nov 4 21:43:10 2016 (r308318) @@ -28,6 +28,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_ddb.h" #include "opt_inet.h" #include "opt_inet6.h" @@ -64,6 +65,10 @@ __FBSDID("$FreeBSD$"); #include #include #endif +#ifdef DDB +#include +#include +#endif #include "common/common.h" #include "common/t4_msg.h" @@ -9095,6 +9100,179 @@ tweak_tunables(void) t4_intr_types &= INTR_MSIX | INTR_MSI | INTR_INTX; } +#ifdef DDB +static void +t4_dump_tcb(struct adapter *sc, int tid) +{ + uint32_t base, i, j, off, pf, reg, save, tcb_addr, win_pos; + + reg = PCIE_MEM_ACCESS_REG(A_PCIE_MEM_ACCESS_OFFSET, 2); + save = t4_read_reg(sc, reg); + base = sc->memwin[2].mw_base; + + /* Dump TCB for the tid */ + tcb_addr = t4_read_reg(sc, A_TP_CMM_TCB_BASE); + tcb_addr += tid * TCB_SIZE; + + if (is_t4(sc)) { + pf = 0; + win_pos = tcb_addr & ~0xf; /* start must be 16B aligned */ + } else { + pf = V_PFNUM(sc->pf); + win_pos = tcb_addr & ~0x7f; /* start must be 128B aligned */ + } + t4_write_reg(sc, reg, win_pos | pf); + t4_read_reg(sc, reg); + + off = tcb_addr - win_pos; + for (i = 0; i < 4; i++) { + uint32_t buf[8]; + for (j = 0; j < 8; j++, off += 4) + buf[j] = htonl(t4_read_reg(sc, base + off)); + + db_printf("%08x %08x %08x %08x %08x %08x %08x %08x\n", + buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], + buf[7]); + } + + t4_write_reg(sc, reg, save); + t4_read_reg(sc, reg); +} + +static void +t4_dump_devlog(struct adapter *sc) +{ + struct devlog_params *dparams = &sc->params.devlog; + struct fw_devlog_e e; + int i, first, j, m, nentries, rc; + uint64_t ftstamp = UINT64_MAX; + + if (dparams->start == 0) { + db_printf("devlog params not valid\n"); + return; + } + + nentries = dparams->size / sizeof(struct fw_devlog_e); + m = fwmtype_to_hwmtype(dparams->memtype); + + /* Find the first entry. */ + first = -1; + for (i = 0; i < nentries && !db_pager_quit; i++) { + rc = -t4_mem_read(sc, m, dparams->start + i * sizeof(e), + sizeof(e), (void *)&e); + if (rc != 0) + break; + + if (e.timestamp == 0) + break; + + e.timestamp = be64toh(e.timestamp); + if (e.timestamp < ftstamp) { + ftstamp = e.timestamp; + first = i; + } + } + + if (first == -1) + return; + + i = first; + do { + rc = -t4_mem_read(sc, m, dparams->start + i * sizeof(e), + sizeof(e), (void *)&e); + if (rc != 0) + return; + + if (e.timestamp == 0) + return; + + e.timestamp = be64toh(e.timestamp); + e.seqno = be32toh(e.seqno); + for (j = 0; j < 8; j++) + e.params[j] = be32toh(e.params[j]); + + db_printf("%10d %15ju %8s %8s ", + e.seqno, e.timestamp, + (e.level < nitems(devlog_level_strings) ? + devlog_level_strings[e.level] : "UNKNOWN"), + (e.facility < nitems(devlog_facility_strings) ? + devlog_facility_strings[e.facility] : "UNKNOWN")); + db_printf(e.fmt, e.params[0], e.params[1
svn commit: r308316 - stable/10/sys/dev/cxgbe
Author: jhb Date: Fri Nov 4 21:02:33 2016 New Revision: 308316 URL: https://svnweb.freebsd.org/changeset/base/308316 Log: MFC 297194: cxgbe(4): Be consistent and call ETHER_BPF_MTAP before writing anything to the descriptor ring no matter what path the frame takes within the driver's tx. Modified: stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_sge.c == --- stable/10/sys/dev/cxgbe/t4_sge.cFri Nov 4 20:56:28 2016 (r308315) +++ stable/10/sys/dev/cxgbe/t4_sge.cFri Nov 4 21:02:33 2016 (r308316) @@ -2362,8 +2362,8 @@ eth_tx(struct mp_ring *r, u_int cidx, u_ } else { total++; remaining--; - n = write_txpkt_wr(txq, (void *)wr, m0, available); ETHER_BPF_MTAP(ifp, m0); + n = write_txpkt_wr(txq, (void *)wr, m0, available); } MPASS(n >= 1 && n <= available && n <= SGE_MAX_WR_NDESC); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308315 - in stable/10/sys/dev/cxgbe: . common
Author: jhb Date: Fri Nov 4 20:56:28 2016 New Revision: 308315 URL: https://svnweb.freebsd.org/changeset/base/308315 Log: MFC 296975: cxgbe(4): Tidy up PAUSE frame accounting. Figure out if the chip is counting PAUSE frames in the "normal" stats and take them out if it is. This fixes a bug in the tx stats because the default hardware behavior is different for Tx and Rx but the driver was treating both the same way. The result was that OPACKETS, OBYTES, and OMCASTS were under-reported (if tx_pause > 0) before this change. Note that the mac_stats sysctl still gives you the raw value of these statistics straight from the device registers. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/common/t4_hw.c == --- stable/10/sys/dev/cxgbe/common/t4_hw.c Fri Nov 4 20:49:59 2016 (r308314) +++ stable/10/sys/dev/cxgbe/common/t4_hw.c Fri Nov 4 20:56:28 2016 (r308315) @@ -5612,6 +5612,7 @@ void t4_get_port_stats_offset(struct ada void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p) { u32 bgmap = t4_get_mps_bg_map(adap, idx); + u32 stat_ctl; #define GET_STAT(name) \ t4_read_reg64(adap, \ @@ -5619,6 +5620,8 @@ void t4_get_port_stats(struct adapter *a T5_PORT_REG(idx, A_MPS_PORT_STAT_##name##_L))) #define GET_STAT_COM(name) t4_read_reg64(adap, A_MPS_STAT_##name##_L) + stat_ctl = t4_read_reg(adap, A_MPS_STAT_CTL); + p->tx_pause = GET_STAT(TX_PORT_PAUSE); p->tx_octets= GET_STAT(TX_PORT_BYTES); p->tx_frames= GET_STAT(TX_PORT_FRAMES); @@ -5643,6 +5646,12 @@ void t4_get_port_stats(struct adapter *a p->tx_ppp6 = GET_STAT(TX_PORT_PPP6); p->tx_ppp7 = GET_STAT(TX_PORT_PPP7); + if (stat_ctl & F_COUNTPAUSESTATTX) { + p->tx_frames -= p->tx_pause; + p->tx_octets -= p->tx_pause * 64; + p->tx_mcast_frames -= p->tx_pause; + } + p->rx_pause = GET_STAT(RX_PORT_PAUSE); p->rx_octets= GET_STAT(RX_PORT_BYTES); p->rx_frames= GET_STAT(RX_PORT_FRAMES); @@ -5671,6 +5680,12 @@ void t4_get_port_stats(struct adapter *a p->rx_ppp6 = GET_STAT(RX_PORT_PPP6); p->rx_ppp7 = GET_STAT(RX_PORT_PPP7); + if (stat_ctl & F_COUNTPAUSESTATRX) { + p->rx_frames -= p->rx_pause; + p->rx_octets -= p->rx_pause * 64; + p->rx_mcast_frames -= p->rx_pause; + } + p->rx_ovflow0 = (bgmap & 1) ? GET_STAT_COM(RX_BG_0_MAC_DROP_FRAME) : 0; p->rx_ovflow1 = (bgmap & 2) ? GET_STAT_COM(RX_BG_1_MAC_DROP_FRAME) : 0; p->rx_ovflow2 = (bgmap & 4) ? GET_STAT_COM(RX_BG_2_MAC_DROP_FRAME) : 0; Modified: stable/10/sys/dev/cxgbe/t4_main.c == --- stable/10/sys/dev/cxgbe/t4_main.c Fri Nov 4 20:49:59 2016 (r308314) +++ stable/10/sys/dev/cxgbe/t4_main.c Fri Nov 4 20:56:28 2016 (r308315) @@ -4346,12 +4346,12 @@ cxgbe_refresh_stats(struct adapter *sc, t4_get_port_stats(sc, pi->tx_chan, s); - ifp->if_opackets = s->tx_frames - s->tx_pause; - ifp->if_ipackets = s->rx_frames - s->rx_pause; - ifp->if_obytes = s->tx_octets - s->tx_pause * 64; - ifp->if_ibytes = s->rx_octets - s->rx_pause * 64; - ifp->if_omcasts = s->tx_mcast_frames - s->tx_pause; - ifp->if_imcasts = s->rx_mcast_frames - s->rx_pause; + ifp->if_opackets = s->tx_frames; + ifp->if_ipackets = s->rx_frames; + ifp->if_obytes = s->tx_octets; + ifp->if_ibytes = s->rx_octets; + ifp->if_omcasts = s->tx_mcast_frames; + ifp->if_imcasts = s->rx_mcast_frames; ifp->if_iqdrops = s->rx_ovflow0 + s->rx_ovflow1 + s->rx_ovflow2 + s->rx_ovflow3 + s->rx_trunc0 + s->rx_trunc1 + s->rx_trunc2 + s->rx_trunc3; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308314 - head/usr.bin/sed
Author: pfg Date: Fri Nov 4 20:49:59 2016 New Revision: 308314 URL: https://svnweb.freebsd.org/changeset/base/308314 Log: sed(1): add LEGACY_BSDSED_COMPAT compile-time flag. In r297602, which included a __FreeBSD_version bump to 1100105, we changed sed 'i' and 'a' from discarding whitespaces to conform with what GNU and sysvish sed do. There are arguments in favor of keeping the old behavior but the new behavior is also useful for migration purposes. It seems important to at least consider the case of developers depending on the previous behavior, so add a CFLAG to enable the old behaviour. PR: 213474 MFC after:5 days Modified: head/usr.bin/sed/compile.c Modified: head/usr.bin/sed/compile.c == --- head/usr.bin/sed/compile.c Fri Nov 4 20:38:26 2016(r308313) +++ head/usr.bin/sed/compile.c Fri Nov 4 20:49:59 2016(r308314) @@ -746,6 +746,9 @@ compile_text(void) while (cu_fgets(lbuf, sizeof(lbuf), NULL) != NULL) { op = s = text + size; p = lbuf; +#ifdef LEGACY_BSDSED_COMPAT + EATSPACE(); +#endif for (esc_nl = 0; *p != '\0'; p++) { if (*p == '\\' && p[1] != '\0' && *++p == '\n') esc_nl = 1; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308313 - in stable/10/sys/dev/cxgbe: . firmware
Author: jhb Date: Fri Nov 4 20:38:26 2016 New Revision: 308313 URL: https://svnweb.freebsd.org/changeset/base/308313 Log: MFC 296950,296951: Configuration updates. 296950: cxgbe(4): Update some register settings in the default configuration files to match the "uwire" configuration. 296951: cxgbe(4): Enable additional capabilities in the default configuration files. All features with FreeBSD drivers of some kind are now in the default configuration. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/firmware/t4fw_cfg.txt stable/10/sys/dev/cxgbe/firmware/t5fw_cfg.txt stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/firmware/t4fw_cfg.txt == --- stable/10/sys/dev/cxgbe/firmware/t4fw_cfg.txt Fri Nov 4 20:32:49 2016(r308312) +++ stable/10/sys/dev/cxgbe/firmware/t4fw_cfg.txt Fri Nov 4 20:38:26 2016(r308313) @@ -10,7 +10,7 @@ [global] rss_glb_config_mode = basicvirtual - rss_glb_config_options = tnlmapen, hashtoeplitz, tnlalllkp + rss_glb_config_options = tnlmapen,hashtoeplitz,tnlalllkp sge_timer_value = 1, 5, 10, 50, 100, 200# usecs @@ -20,28 +20,29 @@ # disable TP_PARA_REG3.RxFragEn reg[0x7d6c] = 0x/0x7000 - # TP_SHIFT_CNT - reg[0x7dc0] = 0x62f8849 + reg[0x7dc0] = 0x0e2f8849# TP_SHIFT_CNT filterMode = fragmentation, mpshittype, protocol, vlan, port, fcoe filterMask = protocol, fcoe - # TP rx and tx channels (0 = auto). + tp_pmrx = 36, 512 + tp_pmrx_pagesize = 64K + + # TP number of RX channels (0 = auto) tp_nrxch = 0 - tp_ntxch = 0 - # TP rx and tx payload memory (% of the total EDRAM + DDR3). - tp_pmrx = 38, 512 - tp_pmtx = 60, 512 - tp_pmrx_pagesize = 64K + tp_pmtx = 46, 512 tp_pmtx_pagesize = 64K - # cluster, lan, or wan. - tp_tcptuning = lan + # TP number of TX channels (0 = auto) + tp_ntxch = 0 # TP OFLD MTUs tp_mtus = 88, 256, 512, 576, 808, 1024, 1280, 1488, 1500, 2002, 2048, 4096, 4352, 8192, 9000, 9600 + # cluster, lan, or wan. + tp_tcptuning = lan + # PFs 0-3. These get 8 MSI/8 MSI-X vectors each. VFs are supported by # these 4 PFs only. Not used here at all. [function "0"] @@ -91,10 +92,14 @@ pmask = all # driver will mask off features it won't use - protocol = ofld + protocol = ofld, rddp, rdmac, iscsi_initiator_pdu, iscsi_target_pdu tp_l2t = 4096 tp_ddp = 2 + tp_ddp_iscsi = 2 + tp_stag = 2 + tp_pbl = 5 + tp_rq = 7 # TCAM has 8K cells; each region must start at a multiple of 128 cell. # Each entry in these categories takes 4 cells each. nhash will use the @@ -166,7 +171,7 @@ [fini] version = 0x1 - checksum = 0x98210e18 + checksum = 0x76b034e0 # # $FreeBSD$ # Modified: stable/10/sys/dev/cxgbe/firmware/t5fw_cfg.txt == --- stable/10/sys/dev/cxgbe/firmware/t5fw_cfg.txt Fri Nov 4 20:32:49 2016(r308312) +++ stable/10/sys/dev/cxgbe/firmware/t5fw_cfg.txt Fri Nov 4 20:38:26 2016(r308313) @@ -10,12 +10,33 @@ [global] rss_glb_config_mode = basicvirtual - rss_glb_config_options = tnlmapen, hashtoeplitz, tnlalllkp + rss_glb_config_options = tnlmapen,hashtoeplitz,tnlalllkp # PL_TIMEOUT register - pl_timeout_value = 200 # the timeout value in units of us + pl_timeout_value = 1# the timeout value in units of us - sge_timer_value = 1, 5, 10, 50, 100, 200# usecs + # SGE_THROTTLE_CONTROL + bar2throttlecount = 500 # bar2throttlecount in us + + sge_timer_value = 1, 5, 10, 50, 100, 200# SGE_TIMER_VALUE* in usecs + + reg[0x1124] = 0x0400/0x0400 # SGE_CONTROL2, enable VFIFO; if + # SGE_VFIFO_SIZE is not set, then + # firmware will set it up in function + # of number of egress queues used + + reg[0x1130] = 0x00d5ffeb# SGE_DBP_FETCH_THRESHOLD, fetch + # threshold set to queue depth + # minus 128-entries for FL and HP + # queues, and 0xfff for LP which + # prompts the firmware to set it up + # in function of egress queues + # used + + reg[0x113c] = 0x0002ffc0# SGE_VFIFO_SIZE, set to 0x2ffc0 which +
svn commit: r308312 - head/usr.sbin/vidcontrol
Author: emaste Date: Fri Nov 4 20:32:49 2016 New Revision: 308312 URL: https://svnweb.freebsd.org/changeset/base/308312 Log: vidcontrol: improve error handling in vt(4) font loading PR: 209078 Reported by: ect...@gmail.com Reviewed by: Oliver Pinter Differential Revision:https://reviews.freebsd.org/D8176 Modified: head/usr.sbin/vidcontrol/vidcontrol.c Modified: head/usr.sbin/vidcontrol/vidcontrol.c == --- head/usr.sbin/vidcontrol/vidcontrol.c Fri Nov 4 20:30:15 2016 (r308311) +++ head/usr.sbin/vidcontrol/vidcontrol.c Fri Nov 4 20:32:49 2016 (r308312) @@ -393,11 +393,15 @@ load_vt4mappingtable(unsigned int nmappi if (nmappings == 0) return (NULL); - t = malloc(sizeof *t * nmappings); + if ((t = malloc(sizeof *t * nmappings)) == NULL) { + warn("malloc"); + return (NULL); + } if (fread(t, sizeof *t * nmappings, 1, f) != 1) { - perror("mappings"); - exit(1); + warn("read mappings"); + free(t); + return (NULL); } for (i = 0; i < nmappings; i++) { @@ -422,7 +426,7 @@ load_default_vt4font(void) } } -static int +static void load_vt4font(FILE *f) { struct vt4font_header fh; @@ -431,13 +435,13 @@ load_vt4font(FILE *f) unsigned int i; if (fread(&fh, sizeof fh, 1, f) != 1) { - perror("file_header"); - return (1); + warn("read file_header"); + return; } if (memcmp(fh.magic, "VFNT0002", 8) != 0) { - fprintf(stderr, "Bad magic\n"); - return (1); + warnx("bad magic in font file\n"); + return; } for (i = 0; i < VFNT_MAPS; i++) @@ -447,21 +451,26 @@ load_vt4font(FILE *f) vfnt.height = fh.height; glyphsize = howmany(vfnt.width, 8) * vfnt.height * vfnt.glyph_count; - vfnt.glyphs = malloc(glyphsize); + if ((vfnt.glyphs = malloc(glyphsize)) == NULL) { + warn("malloc"); + return; + } if (fread(vfnt.glyphs, glyphsize, 1, f) != 1) { - perror("glyphs"); - return (1); + warn("read glyphs"); + free(vfnt.glyphs); + return; } for (i = 0; i < VFNT_MAPS; i++) vfnt.map[i] = load_vt4mappingtable(vfnt.map_count[i], f); - if (ioctl(STDIN_FILENO, PIO_VFONT, &vfnt) == -1) { - perror("PIO_VFONT"); - return (1); - } - return (0); + if (ioctl(STDIN_FILENO, PIO_VFONT, &vfnt) == -1) + warn("PIO_VFONT"); + + for (i = 0; i < VFNT_MAPS; i++) + free(vfnt.map[i]); + free(vfnt.glyphs); } /* @@ -511,8 +520,7 @@ load_font(const char *type, const char * } if (vt4_mode) { - if(load_vt4font(fd)) - warn("failed to load font \"%s\"", filename); + load_vt4font(fd); fclose(fd); return; } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308311 - in stable/10/sys/dev/cxgbe: . common
Author: jhb Date: Fri Nov 4 20:30:15 2016 New Revision: 308311 URL: https://svnweb.freebsd.org/changeset/base/308311 Log: MFC 296018,296640,296641,296689,296735,296949: Fixes for sysctl handlers. 296018: cxgbe(4): Add a sysctl to retrieve the maximum speed/bandwidth supported by a port. dev.cxgbe..max_speed dev.cxl..max_speed 296640: cxgbe(4): Add a sysctl for the event capture mask of the TP block's logic analyzer. dev.t5nex..misc.tp_la_mask dev.t4nex..misc.tp_la_mask 296641: cxgbe(4): Add sysctls to display the TP microcode version and the expansion rom version (if there's one). trantor:~# sysctl dev.t4nex dev.t5nex | grep _version dev.t4nex.0.firmware_version: 1.15.28.0 dev.t4nex.0.tp_version: 0.1.9.4 dev.t5nex.0.firmware_version: 1.15.28.0 dev.t5nex.0.exprom_version: 1.0.0.68 dev.t5nex.0.tp_version: 0.1.4.9 296689: cxgbe(4): sysctls to display the TOE's TCP timers. cask:~# sysctl -d dev.t5nex.0.toe dev.t5nex.0.toe.finwait2_timer: FINWAIT2 timer (us) dev.t5nex.0.toe.initial_srtt: Initial SRTT (us) dev.t5nex.0.toe.keepalive_intvl: Keepidle interval (us) dev.t5nex.0.toe.keepalive_idle: Keepidle idle timer (us) dev.t5nex.0.toe.persist_max: Persist timer max (us) dev.t5nex.0.toe.persist_min: Persist timer min (us) dev.t5nex.0.toe.rexmt_max: Retransmit max (us) dev.t5nex.0.toe.rexmt_min: Retransmit min (us) dev.t5nex.0.toe.dack_timer: DACK timer (us) dev.t5nex.0.toe.dack_tick: DACK tick (us) dev.t5nex.0.toe.timestamp_tick: TCP timestamp tick (us) dev.t5nex.0.toe.timer_tick: TP timer tick (us) ... cask:~# sysctl dev.t5nex.0.toe dev.t5nex.0.toe.finwait2_timer: 9765440 dev.t5nex.0.toe.initial_srtt: 244128 dev.t5nex.0.toe.keepalive_intvl: 73240800 dev.t5nex.0.toe.keepalive_idle: 7031116800 dev.t5nex.0.toe.persist_max: 9765440 dev.t5nex.0.toe.persist_min: 976544 dev.t5nex.0.toe.rexmt_max: 9765440 dev.t5nex.0.toe.rexmt_min: 244128 dev.t5nex.0.toe.dack_timer: 19520 dev.t5nex.0.toe.dack_tick: 32.768 dev.t5nex.0.toe.timestamp_tick: 1048.576 dev.t5nex.0.toe.timer_tick: 32.768 ... 296735: Fix the following gcc warnings on sparc64, when TCP_OFFLOAD is not defined: sys/dev/cxgbe/t4_main.c:7474: warning: 'sysctl_tp_tick' defined but not used sys/dev/cxgbe/t4_main.c:7505: warning: 'sysctl_tp_dack_timer' defined but not used sys/dev/cxgbe/t4_main.c:7519: warning: 'sysctl_tp_timer' defined but not used This just adds a bunch of #ifdef TCP_OFFLOAD in the right places. 296949: cxgbe(4): Remove a couple of pointless assignments in sysctl_meminfo. Do not display range if start = stop (this is a workaround for some unused regions). Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/common/common.h stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/adapter.h == --- stable/10/sys/dev/cxgbe/adapter.h Fri Nov 4 20:06:32 2016 (r308310) +++ stable/10/sys/dev/cxgbe/adapter.h Fri Nov 4 20:30:15 2016 (r308311) @@ -787,7 +787,9 @@ struct adapter { int tracer_valid; /* bitmap of valid tracers */ int tracer_enabled; /* bitmap of enabled tracers */ - char fw_version[32]; + char fw_version[16]; + char tp_version[16]; + char exprom_version[16]; char cfg_file[32]; u_int cfcsum; struct adapter_params params; @@ -1015,6 +1017,22 @@ is_40G_port(const struct port_info *pi) } static inline int +port_top_speed(const struct port_info *pi) +{ + + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_100G) + return (100); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_40G) + return (40); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_10G) + return (10); + if (pi->link_cfg.supported & FW_PORT_CAP_SPEED_1G) + return (1); + + return (0); +} + +static inline int tx_resume_threshold(struct sge_eq *eq) { Modified: stable/10/sys/dev/cxgbe/common/common.h == --- stable/10/sys/dev/cxgbe/common/common.h Fri Nov 4 20:06:32 2016 (r308310) +++ stable/10/sys/dev/cxgbe/common/common.h Fri Nov 4 20:30:15 2016 (r308311) @@ -290,6 +290,7 @@ struct adapter_params { unsigned int fw_vers; unsigned int tp_vers; + unsigned int exprom_vers; unsigned short mtus[NMTUS]; unsigned short a_wnd[NCCTRL_WIN]; Modified: stable/10/sys/dev/cxgbe/t4_main.c == --- stable/10/sys/dev/cxgbe/t4_main.c Fri Nov 4 20:06:32 2016 (r308310) +++ stable/10/sys/dev/cxgbe/t4_main.c Fri Nov 4 20:30:15 201
svn commit: r308310 - head/sys/boot/fdt/dts/arm
Author: manu Date: Fri Nov 4 20:06:32 2016 New Revision: 308310 URL: https://svnweb.freebsd.org/changeset/base/308310 Log: Add AXP221 node in our BananaPi M2 dts. Modified: head/sys/boot/fdt/dts/arm/bananapim2.dts Modified: head/sys/boot/fdt/dts/arm/bananapim2.dts == --- head/sys/boot/fdt/dts/arm/bananapim2.dtsFri Nov 4 20:02:52 2016 (r308309) +++ head/sys/boot/fdt/dts/arm/bananapim2.dtsFri Nov 4 20:06:32 2016 (r308310) @@ -31,3 +31,15 @@ &mmc2 { status = "disabled"; }; + +&p2wi { + status = "okay"; + axp22x: pmic@68 { + compatible = "x-powers,axp221"; + reg = <0x68>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + }; +}; + +#include "axp22x.dtsi" ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308309 - head/sys/arm/allwinner
Author: manu Date: Fri Nov 4 20:02:52 2016 New Revision: 308309 URL: https://svnweb.freebsd.org/changeset/base/308309 Log: Add support for AXP221 Power Management Unit. AXP221 is used on board with A31/A31S and is mostly compatible with AXP209. Regulators, GPIO and Sensors are supported. MFC after:2 weeks Modified: head/sys/arm/allwinner/axp209.c head/sys/arm/allwinner/axp209reg.h Modified: head/sys/arm/allwinner/axp209.c == --- head/sys/arm/allwinner/axp209.c Fri Nov 4 19:35:49 2016 (r308308) +++ head/sys/arm/allwinner/axp209.c Fri Nov 4 20:02:52 2016 (r308309) @@ -27,9 +27,11 @@ #include __FBSDID("$FreeBSD$"); + /* -* X-Power AXP209 PMU for Allwinner SoCs +* X-Power AXP209/AXP211 PMU for Allwinner SoCs */ + #include #include #include @@ -61,9 +63,9 @@ __FBSDID("$FreeBSD$"); #include "gpio_if.h" #include "regdev_if.h" -MALLOC_DEFINE(M_AXP209_REG, "Axp209 regulator", "Axp209 power regulator"); +MALLOC_DEFINE(M_AXP2XX_REG, "Axp2XX regulator", "Axp2XX power regulator"); -struct axp209_regdef { +struct axp2xx_regdef { intptr_tid; char*name; uint8_t enable_reg; @@ -77,7 +79,7 @@ struct axp209_regdef { int voltage_nstep; }; -static struct axp209_regdef axp209_regdefs[] = { +static struct axp2xx_regdef axp209_regdefs[] = { { .id = AXP209_REG_ID_DCDC2, .name = "dcdc2", @@ -129,36 +131,503 @@ static struct axp209_regdef axp209_regde }, }; -struct axp209_reg_sc { +static struct axp2xx_regdef axp221_regdefs[] = { + { + .id = AXP221_REG_ID_DLDO1, + .name = "dldo1", + .enable_reg = AXP221_POWERCTL_2, + .enable_mask = AXP221_POWERCTL2_DLDO1, + .voltage_reg = AXP221_REG_DLDO1_VOLTAGE, + .voltage_mask = 0x1f, + .voltage_min = 700, + .voltage_max = 3300, + .voltage_step = 100, + .voltage_nstep = 26, + }, + { + .id = AXP221_REG_ID_DLDO2, + .name = "dldo2", + .enable_reg = AXP221_POWERCTL_2, + .enable_mask = AXP221_POWERCTL2_DLDO2, + .voltage_reg = AXP221_REG_DLDO2_VOLTAGE, + .voltage_mask = 0x1f, + .voltage_min = 700, + .voltage_max = 3300, + .voltage_step = 100, + .voltage_nstep = 26, + }, + { + .id = AXP221_REG_ID_DLDO3, + .name = "dldo3", + .enable_reg = AXP221_POWERCTL_2, + .enable_mask = AXP221_POWERCTL2_DLDO3, + .voltage_reg = AXP221_REG_DLDO3_VOLTAGE, + .voltage_mask = 0x1f, + .voltage_min = 700, + .voltage_max = 3300, + .voltage_step = 100, + .voltage_nstep = 26, + }, + { + .id = AXP221_REG_ID_DLDO4, + .name = "dldo4", + .enable_reg = AXP221_POWERCTL_2, + .enable_mask = AXP221_POWERCTL2_DLDO4, + .voltage_reg = AXP221_REG_DLDO4_VOLTAGE, + .voltage_mask = 0x1f, + .voltage_min = 700, + .voltage_max = 3300, + .voltage_step = 100, + .voltage_nstep = 26, + }, + { + .id = AXP221_REG_ID_ELDO1, + .name = "eldo1", + .enable_reg = AXP221_POWERCTL_2, + .enable_mask = AXP221_POWERCTL2_ELDO1, + .voltage_reg = AXP221_REG_ELDO1_VOLTAGE, + .voltage_mask = 0x1f, + .voltage_min = 700, + .voltage_max = 3300, + .voltage_step = 100, + .voltage_nstep = 26, + }, + { + .id = AXP221_REG_ID_ELDO2, + .name = "eldo2", + .enable_reg = AXP221_POWERCTL_2, + .enable_mask = AXP221_POWERCTL2_ELDO2, + .voltage_reg = AXP221_REG_ELDO2_VOLTAGE, + .voltage_mask = 0x1f, + .voltage_min = 700, + .voltage_max = 3300, + .voltage_step = 100, + .voltage_nstep = 26, + }, + { + .id = AXP221_REG_ID_ELDO3, + .name = "eldo3", + .enable_reg = AXP221_POWERCTL_2, + .enable_mask = AXP221_POWERCTL2_ELDO3, + .voltage_reg = AXP221_REG_ELDO3_VOLTAGE, + .voltage_mask = 0x1f, + .voltage_min = 700, + .voltage_max = 3300, + .voltage_step = 100, + .voltage_nstep = 26, + }, + { + .id = AXP221_REG_ID_DC5LDO, + .name = "dc5ldo", + .enable_reg = AXP221_POWERCTL_1, + .enable_mask
svn commit: r308308 - in head: . gnu/lib gnu/lib/libgcc lib
Author: emaste Date: Fri Nov 4 19:35:49 2016 New Revision: 308308 URL: https://svnweb.freebsd.org/changeset/base/308308 Log: Connect new LLVM-based libgcc_eh & libgcc_s to the build Compiler-rt and LLVM's libunwind provide a suitable replacement for libgcc.a, libgcc_eh.a, and libgcc_s.so. Remove the now-unused LLVM_LIBUNWIND block from gnu/lib/libgcc. PR: 213480 [exp-run] Reviewed by: brooks, ed Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D8189 Modified: head/Makefile.inc1 head/gnu/lib/Makefile head/gnu/lib/libgcc/Makefile head/lib/Makefile Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Fri Nov 4 19:23:52 2016(r308307) +++ head/Makefile.inc1 Fri Nov 4 19:35:49 2016(r308308) @@ -2001,7 +2001,7 @@ libraries: .MAKE .PHONY # # static libgcc.a prerequisite for shared libc # -_prereq_libs= gnu/lib/libgcc lib/libcompiler_rt +_prereq_libs= lib/libcompiler_rt .if ${MK_SSP} != "no" _prereq_libs+= gnu/lib/libssp/libssp_nonshared .endif @@ -2013,7 +2013,6 @@ _prereq_libs+= gnu/lib/libssp/libssp_non # _startup_libs= gnu/lib/csu _startup_libs+=lib/csu -_startup_libs+=gnu/lib/libgcc _startup_libs+=lib/libcompiler_rt _startup_libs+=lib/libc _startup_libs+=lib/libc_nonshared @@ -2021,11 +2020,27 @@ _startup_libs+= lib/libc_nonshared _startup_libs+=lib/libcxxrt .endif +.if ${MK_LLVM_LIBUNWIND} != "no" +_prereq_libs+= lib/libgcc_eh lib/libgcc_s +_startup_libs+=lib/libgcc_eh lib/libgcc_s + +lib/libgcc_s__L: lib/libc__L +lib/libgcc_s__L: lib/libc_nonshared__L +.if ${MK_LIBCPLUSPLUS} != "no" +lib/libcxxrt__L: lib/libgcc_s__L +.endif + +.else # MK_LLVM_LIBUNWIND == no + +_prereq_libs+= gnu/lib/libgcc +_startup_libs+=gnu/lib/libgcc + gnu/lib/libgcc__L: lib/libc__L gnu/lib/libgcc__L: lib/libc_nonshared__L .if ${MK_LIBCPLUSPLUS} != "no" lib/libcxxrt__L: gnu/lib/libgcc__L .endif +.endif _prebuild_libs=${_kerberos5_lib_libasn1} \ ${_kerberos5_lib_libhdb} \ Modified: head/gnu/lib/Makefile == --- head/gnu/lib/Makefile Fri Nov 4 19:23:52 2016(r308307) +++ head/gnu/lib/Makefile Fri Nov 4 19:35:49 2016(r308308) @@ -3,8 +3,6 @@ .include SUBDIR=csu -SUBDIR+= libgcc - SUBDIR.${MK_DIALOG}+= libdialog SUBDIR.${MK_GCC}+= libgcov libgomp SUBDIR.${MK_SSP}+= libssp @@ -19,6 +17,10 @@ SUBDIR+= libreadline SUBDIR+= libregex .endif +.if ${MK_LLVM_LIBUNWIND} == "no" +SUBDIR+= libgcc +.endif + # libsupc++ uses libstdc++ headers, although 'make includes' should # have taken care of that already. .if ${MK_GNUCXX} != "no" Modified: head/gnu/lib/libgcc/Makefile == --- head/gnu/lib/libgcc/MakefileFri Nov 4 19:23:52 2016 (r308307) +++ head/gnu/lib/libgcc/MakefileFri Nov 4 19:35:49 2016 (r308308) @@ -4,9 +4,6 @@ PACKAGE=clibs GCCDIR=${.CURDIR}/../../../contrib/gcc GCCLIB=${.CURDIR}/../../../contrib/gcclibs CCDIR= ${.CURDIR}/../../usr.bin/cc -COMPILERRTDIR= ${.CURDIR}/../../../contrib/compiler-rt -UNWINDINCDIR= ${.CURDIR}/../../../contrib/llvm/projects/libunwind/include -UNWINDSRCDIR= ${.CURDIR}/../../../contrib/llvm/projects/libunwind/src SHLIB_NAME=libgcc_s.so.1 SHLIBDIR?= /lib @@ -74,33 +71,6 @@ LIB2FUNCS+= _floatdi${mode} _floatundi${ LIB2ADD = $(LIB2FUNCS_EXTRA) LIB2ADD_ST = $(LIB2FUNCS_STATIC_EXTRA) -# Additional sources to handle exceptions; overridden by targets as needed. -.if ${MK_LLVM_LIBUNWIND} != "no" - -.PATH: ${COMPILERRTDIR}/lib/builtins -.PATH: ${UNWINDSRCDIR} -LIB2ADDEH = gcc_personality_v0.c \ - int_util.c \ - Unwind-EHABI.cpp \ - Unwind-sjlj.c \ - UnwindLevel1-gcc-ext.c \ - UnwindLevel1.c \ - UnwindRegistersRestore.S \ - UnwindRegistersSave.S \ - libunwind.cpp - -CFLAGS+= -I${UNWINDINCDIR} -I${.CURDIR} -D_LIBUNWIND_IS_NATIVE_ONLY -.if empty(CXXFLAGS:M-std=*) -CXXFLAGS+= -std=c++11 -.endif -CXXFLAGS+= -fno-rtti -STATIC_CXXFLAGS+= -fvisibility=hidden -fPIC -.if ${MK_DIRDEPS_BUILD} == "yes" -# Avoid dependency on lib/libc++ -CFLAGS+= -I${SRCTOP}/contrib/libc++/include -.endif - -.else # MK_LLVM_LIBUNWIND .if ${TARGET_CPUARCH} == "arm" LIB2ADDEH =unwind-arm.c libunwind-arm.S pr-support.c unwind-c.c @@ -109,8 +79,6 @@ LIB2ADDEH = unwind-dw2.c unwind-dw2-fde- unwind-c.c .endif -.endif # MK_LLVM_LIBUNWIND - LIB2ADDEHSTATIC = $(LIB2ADDEH) LIB2ADDEHSHARED = $(LIB2ADDEH) @@ -202,14 +170,7 @@ LIB2_DIVMOD_FUNCS:= ${LIB2_DIVMOD_FUNCS: .endif COMMONHDRS=tm.h tconfig.h options.h gthr-default.h -.if
svn commit: r308307 - head/sys/arm/allwinner
Author: manu Date: Fri Nov 4 19:23:52 2016 New Revision: 308307 URL: https://svnweb.freebsd.org/changeset/base/308307 Log: Fix r308306 by spelling variable correctly. Modified: head/sys/arm/allwinner/aw_cir.c Modified: head/sys/arm/allwinner/aw_cir.c == --- head/sys/arm/allwinner/aw_cir.c Fri Nov 4 19:21:11 2016 (r308306) +++ head/sys/arm/allwinner/aw_cir.c Fri Nov 4 19:23:52 2016 (r308307) @@ -390,7 +390,7 @@ aw_ir_attach(device_t dev) uint32_t val = 0; clk_ir = clk_gate = NULL; - rst_abp = NULL; + rst_apb = NULL; sc = device_get_softc(dev); sc->dev = dev; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308306 - head/sys/arm/allwinner
Author: manu Date: Fri Nov 4 19:21:11 2016 New Revision: 308306 URL: https://svnweb.freebsd.org/changeset/base/308306 Log: Set rst_apb to NULL to avoid panic when release. Modified: head/sys/arm/allwinner/aw_cir.c Modified: head/sys/arm/allwinner/aw_cir.c == --- head/sys/arm/allwinner/aw_cir.c Fri Nov 4 19:07:12 2016 (r308305) +++ head/sys/arm/allwinner/aw_cir.c Fri Nov 4 19:21:11 2016 (r308306) @@ -390,6 +390,7 @@ aw_ir_attach(device_t dev) uint32_t val = 0; clk_ir = clk_gate = NULL; + rst_abp = NULL; sc = device_get_softc(dev); sc->dev = dev; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308305 - in stable/10/sys/dev/cxgbe: . common
Author: jhb Date: Fri Nov 4 19:07:12 2016 New Revision: 308305 URL: https://svnweb.freebsd.org/changeset/base/308305 Log: MFC 296552,296596,296603,296624,296627: Fixes related to memory windows. 296552: cxgbe(4): Rename regwin_lock to reg_lock. It is used to protect access to indirect registers only. 296596: cxgbe(4): Allow the addr/len pair that is being validated in validate_mem_range to span multiple memory types. Update validate_mt_off_len to use validate_mem_range. 296603: cxgbe(4): Add general purpose routines that offer safe access to the chip's memory windows. Convert existing users of these windows to the new routines. 296624: cxgbe(4): Fix bug in r296603. The memory window needs to be repositioned if the start address isn't in the window already. One of the bounds check used the end address instead. 296627: cxgbe(4): Improvements to the code that deals with the firmware's log. - Query the location of the log very early during attach. Refresh the location later after establishing contact with the firmware. - Save the log's location as a flat address in devlog_params. - Use a memory window instead of backdoor access to the EDC/MC to read the log. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/common/common.h stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/adapter.h == --- stable/10/sys/dev/cxgbe/adapter.h Fri Nov 4 18:45:06 2016 (r308304) +++ stable/10/sys/dev/cxgbe/adapter.h Fri Nov 4 19:07:12 2016 (r308305) @@ -435,6 +435,29 @@ struct hw_buf_info { }; enum { + NUM_MEMWIN = 3, + + MEMWIN0_APERTURE = 2048, + MEMWIN0_BASE = 0x1b800, + + MEMWIN1_APERTURE = 32768, + MEMWIN1_BASE = 0x28000, + + MEMWIN2_APERTURE_T4 = 65536, + MEMWIN2_BASE_T4 = 0x3, + + MEMWIN2_APERTURE_T5 = 128 * 1024, + MEMWIN2_BASE_T5 = 0x6, +}; + +struct memwin { + struct rwlock mw_lock __aligned(CACHE_LINE_SIZE); + uint32_t mw_base; /* constant after setup_memwin */ + uint32_t mw_aperture; /* ditto */ + uint32_t mw_curpos; /* protected by mw_lock */ +}; + +enum { FL_STARVING = (1 << 0), /* on the adapter's list of starving fl's */ FL_DOOMED = (1 << 1), /* about to be destroyed */ FL_BUF_PACKING = (1 << 2), /* buffer packing enabled */ @@ -791,7 +814,9 @@ struct adapter { TAILQ_HEAD(, sge_fl) sfl; struct callout sfl_callout; - struct mtx regwin_lock; /* for indirect reads and memory windows */ + struct mtx reg_lock;/* for indirect register access */ + + struct memwin memwin[NUM_MEMWIN]; /* memory windows */ an_handler_t an_handler __aligned(CACHE_LINE_SIZE); fw_msg_handler_t fw_msg_handler[7]; /* NUM_FW6_TYPES */ Modified: stable/10/sys/dev/cxgbe/common/common.h == --- stable/10/sys/dev/cxgbe/common/common.h Fri Nov 4 18:45:06 2016 (r308304) +++ stable/10/sys/dev/cxgbe/common/common.h Fri Nov 4 19:07:12 2016 (r308305) @@ -52,20 +52,6 @@ enum { enum { MEM_EDC0, MEM_EDC1, MEM_MC, MEM_MC0 = MEM_MC, MEM_MC1 }; -enum { - MEMWIN0_APERTURE = 2048, - MEMWIN0_BASE = 0x1b800, - - MEMWIN1_APERTURE = 32768, - MEMWIN1_BASE = 0x28000, - - MEMWIN2_APERTURE_T4 = 65536, - MEMWIN2_BASE_T4 = 0x3, - - MEMWIN2_APERTURE_T5 = 128 * 1024, - MEMWIN2_BASE_T5 = 0x6, -}; - enum dev_master { MASTER_CANT, MASTER_MAY, MASTER_MUST }; enum dev_state { DEV_STATE_UNINIT, DEV_STATE_INIT, DEV_STATE_ERR }; @@ -76,11 +62,6 @@ enum { PAUSE_AUTONEG = 1 << 2 }; -struct memwin { - uint32_t base; - uint32_t aperture; -}; - struct port_stats { u64 tx_octets;/* total # of octets in good frames */ u64 tx_frames;/* all good frames */ @@ -281,6 +262,7 @@ struct devlog_params { u32 memtype;/* which memory (FW_MEMTYPE_* ) */ u32 start; /* start of log in firmware memory */ u32 size; /* size of log */ + u32 addr; /* start address in flat addr space */ }; /* Stores chip specific parameters */ Modified: stable/10/sys/dev/cxgbe/t4_main.c == --- stable/10/sys/dev/cxgbe/t4_main.c Fri Nov 4 18:45:06 2016 (r308304) +++ stable/10/sys/dev/cxgbe/t4_main.c Fri Nov 4 19:07:12 2016 (r308305) @@ -417,12 +417,17 @@ struct filter_entry { static int map_bars_0_and_4(struct adapter *); static int map_bar_2(struct a
svn commit: r308304 - in stable/10: sys/conf sys/dev/cxgbe sys/dev/cxgbe/common sys/dev/cxgbe/firmware sys/dev/cxgbe/iw_cxgbe sys/dev/cxgbe/tom sys/modules/cxgbe/t4_firmware sys/modules/cxgbe/t5_fi...
Author: jhb Date: Fri Nov 4 18:45:06 2016 New Revision: 308304 URL: https://svnweb.freebsd.org/changeset/base/308304 Log: MFC 295778,296249,296333,296383,296471,296478,296481,296485,296488-296491, 296493-296496,296544,296710-296711,297863,299685: Catch up to changes to the internal shared code. Note that this merge includes two different firmware updates, but the effective change is to update to the last version (1.15.37.0). As such, I've trimmed the log message of the first update (1.15.28.0). In addition, the M_WAIT macro added in t4_regs.h had to be renamed to CXGBE_M_WAIT to avoid a collision on 10.x that is not present on 11. 295778: cxgbe: catch up with the latest hardware-related definitions. 296249: cxgbe(4): Update T5 and T4 firmwares to 1.15.28.0. 296333: cxgbe(4): First of many changes to reduce diffs with internal shared code: - Rename some CamelCase variables. - s/t4_link_start/t4_link_l1cfg/g - Pull in t4_get_port_type_description. - Move t4_wait_op_done to t4_hw.c. - Flip the order of the RDMA stats. - Remove unsused function t4_iq_start_stop. - Move t4_wait_op_done and t4_wait_op_done_val to t4_hw.c 296383: cxgbe(4): Very basic T6 awareness. This is part of ongoing work to update to the latest internal shared code. - Add a chip_params structure to keep track of hardware constants for all generations of Terminators handled by cxgbe. - Update t4_hw_pci_read_cfg4 to work with T6. - Update the hardware debug sysctls (hidden within dev...misc.*) to work with T6. Most of the changes are in the decoders for the CIM logic analyzer and the MPS TCAM. - Acquire the regwin lock around indirect register accesses. 296471: cxgbe(4): Updated register dumps. - Get the list of registers to read during a regdump from the shared code instead of the OS specific code. This follows a similar move internally. The shared code includes the list for T6. - Update cxgbetool to be able to decode T5 VF, T6, and T6 VF register dumps (and catch up with some updates to T4 and T5 register decode). 296478: cxgbe(4): Add a struct sge_params to store per-adapter SGE parameters. Move the code that reads all the parameters to t4_init_sge_params in the shared code. Use these per-adapter values instead of globals. 296481: cxgbe(4): Overhaul the shared code that deals with the chip's TP block, which is responsible for filtering and RSS. Add the ability to use filters that match on PF/VF (aka "VNIC id") while here. This is mutually exclusive with filtering on outer VLAN tag with Q-in-Q. 296485: cxgbe(4): Update the interrupt handlers for hardware errors. 296488: cxgbe(4): Updates to mailbox routines in the shared code. 296489: cxgbe(4): Updates to the shared routines that deal with the serial EEPROM, flash, and VPD. 296490: cxgbe(4): Remove __devinit and SPEED_ as part of catch up with internal shared code. 296491: cxgbe(4): Updates to shared routines that get/set various parameters via the firmware. 296493: cxgbe(4): Use t4_link_down_rc_str in shared code to decode the reason the link is down, instead of doing it in OS specific code. 296494: cxgbe(4): Many new functions in the shared code, unused at this time. 296495: cxgbe(4): Fix t4_tp_get_rdma_stats. 296496: cxgbe(4): Minor updates to the shared routines that deal with firmware images. 296544: cxgbe(4): Reshuffle and rototill t4_hw.c, solely to reduce diffs with the internal shared code. 296710: cxgbe(4): Catch up with the latest list of card capabilities as reported by the firmware. 296711: cxgbe(4): Fix typo in previous commit. 297863: Rename the 'M_B' macro in t4_regs.h to 'CXGBE_M_B'. This fixes a conflict with the M_B macro in powerpc's exposed by the recent addition of DDB commands to the cxgbe driver. 299685: cxgbe(4): Update T5 and T4 firmwares to 1.15.37.0. These firmwares were obtained from the "Chelsio T5/T4 Unified Wire v2.12.0.3 for Linux" release. Changes since 1.14.4.0 (which is the firmware in -STABLE branches) are in the "Release Notes" accompanying the Unified Wire release and are copy-pasted here as well. 22.1. T5 Firmware + Version : 1.15.37.0 Date: 04/27/2016 FIXES - BASE: - Fixed an issue in FW_RSS_VI_CONFIG_CMD handling where the default ingress queue was ignored. - Fixed an issue where adapter failed to load fw by adjusting DRAM frequency. - Fixed an issue in watchdog which was causing VM bring-up failure after reboot. - Fixed 40G link failures with some switches when auto-negotiation enabled. - Fixed to improve on link bring-up time. - Per port buffer groups size doubled to improve performance.
svn commit: r308303 - stable/10/tools/tools/cxgbetool
Author: jhb Date: Fri Nov 4 18:16:00 2016 New Revision: 308303 URL: https://svnweb.freebsd.org/changeset/base/308303 Log: MFC 287297,296236: Cleanups to cxgbetool. 287297: - Replace N(a)/N(i)/N(T)/LEN(a)/ARRAY_SIZE(a) with nitems() - Add missing for err() and for sysctlbyname() - NULL -> 0 for 5th parameter of sysctlbyname() Note, the original commit touched several files under tools/tools, but this commit only includes changes to cxgbetool. 296236: Fix some whitespace nits in cxgbetool.c. No functional change. Sponsored by: Chelsio Communications Modified: stable/10/tools/tools/cxgbetool/cxgbetool.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/tools/cxgbetool/cxgbetool.c == --- stable/10/tools/tools/cxgbetool/cxgbetool.c Fri Nov 4 17:55:50 2016 (r308302) +++ stable/10/tools/tools/cxgbetool/cxgbetool.c Fri Nov 4 18:16:00 2016 (r308303) @@ -28,29 +28,30 @@ #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 +#include +#include +#include +#include +#include +#include +#include +#include #include "t4_ioctl.h" -#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) #define in_range(val, lo, hi) ( val < 0 || (val <= hi && val >= lo)) #definemax(x, y) ((x) > (y) ? (x) : (y)) @@ -345,7 +346,7 @@ dump_regs_t4(int argc, const char *argv[ T4_MODREGS(xgmac) }; - return dump_regs_table(argc, argv, regs, t4_mod, ARRAY_SIZE(t4_mod)); + return dump_regs_table(argc, argv, regs, t4_mod, nitems(t4_mod)); } #undef T4_MODREGS @@ -360,8 +361,7 @@ dump_regs_t4vf(int argc, const char *arg { "cim", t4vf_cim_regs }, }; - return dump_regs_table(argc, argv, regs, t4vf_mod, - ARRAY_SIZE(t4vf_mod)); + return dump_regs_table(argc, argv, regs, t4vf_mod, nitems(t4vf_mod)); } #define T5_MODREGS(name) { #name, t5_##name##_regs } @@ -398,7 +398,7 @@ dump_regs_t5(int argc, const char *argv[ { "hma", t5_hma_t5_regs } }; - return dump_regs_table(argc, argv, regs, t5_mod, ARRAY_SIZE(t5_mod)); + return dump_regs_table(argc, argv, regs, t5_mod, nitems(t5_mod)); } #undef T5_MODREGS @@ -446,47 +446,47 @@ do_show_info_header(uint32_t mode) { uint32_t i; - printf ("%4s %8s", "Idx", "Hits"); + printf("%4s %8s", "Idx", "Hits"); for (i = T4_FILTER_FCoE; i <= T4_FILTER_IP_FRAGMENT; i <<= 1) { switch (mode & i) { case T4_FILTER_FCoE: - printf (" FCoE"); + printf(" FCoE"); break; case T4_FILTER_PORT: - printf (" Port"); + printf(" Port"); break; case T4_FILTER_VNIC: - printf (" vld:VNIC"); + printf(" vld:VNIC"); break; case T4_FILTER_VLAN: - printf (" vld:VLAN"); + printf(" vld:VLAN"); break; case T4_FILTER_IP_TOS: - printf (" TOS"); + printf(" TOS"); break; case T4_FILTER_IP_PROTO: - printf (" Prot"); + printf(" Prot"); break; case T4_FILTER_ETH_TYPE: - printf (" EthType"); + printf(" EthType"); break; case T4_FILTER_MAC_IDX: - printf (" MACIdx"); + printf(" MACIdx"); break; case T4_FILTER_MPS_HIT_TYPE: - printf (" MPS"); + printf(" MPS"); break; case T4_FILTER_IP_FRAGMENT: - printf (" Frag"); + printf(" Frag"); break; default: @@ -866,7 +866,7 @@ get_filter_mode(void) if (mode & T4_FILTER_IP_SADDR) printf("sip "); - + if (mode & T4_FILTER_IP_DADDR) printf("dip "); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308302 - in stable: 10/contrib/tzdata 11/contrib/tzdata 9/contrib/tzdata
Author: gjb Date: Fri Nov 4 17:55:50 2016 New Revision: 308302 URL: https://svnweb.freebsd.org/changeset/base/308302 Log: MFC r308270: MFV r308265: Update tzdata to 2016i. Sponsored by: The FreeBSD Foundation Added: stable/9/contrib/tzdata/CONTRIBUTING - copied unchanged from r308270, head/contrib/tzdata/CONTRIBUTING stable/9/contrib/tzdata/LICENSE - copied unchanged from r308270, head/contrib/tzdata/LICENSE stable/9/contrib/tzdata/Makefile - copied unchanged from r308270, head/contrib/tzdata/Makefile stable/9/contrib/tzdata/NEWS - copied unchanged from r308270, head/contrib/tzdata/NEWS stable/9/contrib/tzdata/README - copied unchanged from r308270, head/contrib/tzdata/README stable/9/contrib/tzdata/Theory - copied unchanged from r308270, head/contrib/tzdata/Theory stable/9/contrib/tzdata/backzone - copied unchanged from r308270, head/contrib/tzdata/backzone stable/9/contrib/tzdata/checklinks.awk - copied unchanged from r308270, head/contrib/tzdata/checklinks.awk stable/9/contrib/tzdata/checktab.awk - copied unchanged from r308270, head/contrib/tzdata/checktab.awk stable/9/contrib/tzdata/leapseconds.awk - copied unchanged from r308270, head/contrib/tzdata/leapseconds.awk stable/9/contrib/tzdata/version - copied unchanged from r308270, head/contrib/tzdata/version stable/9/contrib/tzdata/zoneinfo2tdf.pl - copied unchanged from r308270, head/contrib/tzdata/zoneinfo2tdf.pl Modified: stable/9/contrib/tzdata/antarctica stable/9/contrib/tzdata/asia stable/9/contrib/tzdata/australasia stable/9/contrib/tzdata/europe stable/9/contrib/tzdata/zone.tab stable/9/contrib/tzdata/zone1970.tab Directory Properties: stable/9/contrib/tzdata/ (props changed) Changes in other areas also in this revision: Added: stable/10/contrib/tzdata/CONTRIBUTING - copied unchanged from r308270, head/contrib/tzdata/CONTRIBUTING stable/10/contrib/tzdata/LICENSE - copied unchanged from r308270, head/contrib/tzdata/LICENSE stable/10/contrib/tzdata/Makefile - copied unchanged from r308270, head/contrib/tzdata/Makefile stable/10/contrib/tzdata/NEWS - copied unchanged from r308270, head/contrib/tzdata/NEWS stable/10/contrib/tzdata/README - copied unchanged from r308270, head/contrib/tzdata/README stable/10/contrib/tzdata/Theory - copied unchanged from r308270, head/contrib/tzdata/Theory stable/10/contrib/tzdata/backzone - copied unchanged from r308270, head/contrib/tzdata/backzone stable/10/contrib/tzdata/checklinks.awk - copied unchanged from r308270, head/contrib/tzdata/checklinks.awk stable/10/contrib/tzdata/checktab.awk - copied unchanged from r308270, head/contrib/tzdata/checktab.awk stable/10/contrib/tzdata/leapseconds.awk - copied unchanged from r308270, head/contrib/tzdata/leapseconds.awk stable/10/contrib/tzdata/version - copied unchanged from r308270, head/contrib/tzdata/version stable/10/contrib/tzdata/zoneinfo2tdf.pl - copied unchanged from r308270, head/contrib/tzdata/zoneinfo2tdf.pl stable/11/contrib/tzdata/CONTRIBUTING - copied unchanged from r308270, head/contrib/tzdata/CONTRIBUTING stable/11/contrib/tzdata/LICENSE - copied unchanged from r308270, head/contrib/tzdata/LICENSE stable/11/contrib/tzdata/Makefile - copied unchanged from r308270, head/contrib/tzdata/Makefile stable/11/contrib/tzdata/NEWS - copied unchanged from r308270, head/contrib/tzdata/NEWS stable/11/contrib/tzdata/README - copied unchanged from r308270, head/contrib/tzdata/README stable/11/contrib/tzdata/Theory - copied unchanged from r308270, head/contrib/tzdata/Theory stable/11/contrib/tzdata/backzone - copied unchanged from r308270, head/contrib/tzdata/backzone stable/11/contrib/tzdata/checklinks.awk - copied unchanged from r308270, head/contrib/tzdata/checklinks.awk stable/11/contrib/tzdata/checktab.awk - copied unchanged from r308270, head/contrib/tzdata/checktab.awk stable/11/contrib/tzdata/leapseconds.awk - copied unchanged from r308270, head/contrib/tzdata/leapseconds.awk stable/11/contrib/tzdata/version - copied unchanged from r308270, head/contrib/tzdata/version stable/11/contrib/tzdata/zoneinfo2tdf.pl - copied unchanged from r308270, head/contrib/tzdata/zoneinfo2tdf.pl Modified: stable/10/contrib/tzdata/antarctica stable/10/contrib/tzdata/asia stable/10/contrib/tzdata/australasia stable/10/contrib/tzdata/europe stable/10/contrib/tzdata/zone.tab stable/10/contrib/tzdata/zone1970.tab stable/11/contrib/tzdata/antarctica stable/11/contrib/tzdata/asia stable/11/contrib/tzdata/australasia stable/11/contrib/tzdata/europe stable/11/contrib/tzdata/zone.tab stable/11/contrib/tzdata/zone1970.tab Directory Properties: stable/10/ (props changed) stable/11/ (props changed) Copied: stable/9/contrib/tzdata/CONTRIBUTING (from r308270, head/contrib/tzdata/CONTRIBU
svn commit: r308302 - in stable: 10/contrib/tzdata 11/contrib/tzdata 9/contrib/tzdata
Author: gjb Date: Fri Nov 4 17:55:50 2016 New Revision: 308302 URL: https://svnweb.freebsd.org/changeset/base/308302 Log: MFC r308270: MFV r308265: Update tzdata to 2016i. Sponsored by: The FreeBSD Foundation Added: stable/10/contrib/tzdata/CONTRIBUTING - copied unchanged from r308270, head/contrib/tzdata/CONTRIBUTING stable/10/contrib/tzdata/LICENSE - copied unchanged from r308270, head/contrib/tzdata/LICENSE stable/10/contrib/tzdata/Makefile - copied unchanged from r308270, head/contrib/tzdata/Makefile stable/10/contrib/tzdata/NEWS - copied unchanged from r308270, head/contrib/tzdata/NEWS stable/10/contrib/tzdata/README - copied unchanged from r308270, head/contrib/tzdata/README stable/10/contrib/tzdata/Theory - copied unchanged from r308270, head/contrib/tzdata/Theory stable/10/contrib/tzdata/backzone - copied unchanged from r308270, head/contrib/tzdata/backzone stable/10/contrib/tzdata/checklinks.awk - copied unchanged from r308270, head/contrib/tzdata/checklinks.awk stable/10/contrib/tzdata/checktab.awk - copied unchanged from r308270, head/contrib/tzdata/checktab.awk stable/10/contrib/tzdata/leapseconds.awk - copied unchanged from r308270, head/contrib/tzdata/leapseconds.awk stable/10/contrib/tzdata/version - copied unchanged from r308270, head/contrib/tzdata/version stable/10/contrib/tzdata/zoneinfo2tdf.pl - copied unchanged from r308270, head/contrib/tzdata/zoneinfo2tdf.pl Modified: stable/10/contrib/tzdata/antarctica stable/10/contrib/tzdata/asia stable/10/contrib/tzdata/australasia stable/10/contrib/tzdata/europe stable/10/contrib/tzdata/zone.tab stable/10/contrib/tzdata/zone1970.tab Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Added: stable/11/contrib/tzdata/CONTRIBUTING - copied unchanged from r308270, head/contrib/tzdata/CONTRIBUTING stable/11/contrib/tzdata/LICENSE - copied unchanged from r308270, head/contrib/tzdata/LICENSE stable/11/contrib/tzdata/Makefile - copied unchanged from r308270, head/contrib/tzdata/Makefile stable/11/contrib/tzdata/NEWS - copied unchanged from r308270, head/contrib/tzdata/NEWS stable/11/contrib/tzdata/README - copied unchanged from r308270, head/contrib/tzdata/README stable/11/contrib/tzdata/Theory - copied unchanged from r308270, head/contrib/tzdata/Theory stable/11/contrib/tzdata/backzone - copied unchanged from r308270, head/contrib/tzdata/backzone stable/11/contrib/tzdata/checklinks.awk - copied unchanged from r308270, head/contrib/tzdata/checklinks.awk stable/11/contrib/tzdata/checktab.awk - copied unchanged from r308270, head/contrib/tzdata/checktab.awk stable/11/contrib/tzdata/leapseconds.awk - copied unchanged from r308270, head/contrib/tzdata/leapseconds.awk stable/11/contrib/tzdata/version - copied unchanged from r308270, head/contrib/tzdata/version stable/11/contrib/tzdata/zoneinfo2tdf.pl - copied unchanged from r308270, head/contrib/tzdata/zoneinfo2tdf.pl stable/9/contrib/tzdata/CONTRIBUTING - copied unchanged from r308270, head/contrib/tzdata/CONTRIBUTING stable/9/contrib/tzdata/LICENSE - copied unchanged from r308270, head/contrib/tzdata/LICENSE stable/9/contrib/tzdata/Makefile - copied unchanged from r308270, head/contrib/tzdata/Makefile stable/9/contrib/tzdata/NEWS - copied unchanged from r308270, head/contrib/tzdata/NEWS stable/9/contrib/tzdata/README - copied unchanged from r308270, head/contrib/tzdata/README stable/9/contrib/tzdata/Theory - copied unchanged from r308270, head/contrib/tzdata/Theory stable/9/contrib/tzdata/backzone - copied unchanged from r308270, head/contrib/tzdata/backzone stable/9/contrib/tzdata/checklinks.awk - copied unchanged from r308270, head/contrib/tzdata/checklinks.awk stable/9/contrib/tzdata/checktab.awk - copied unchanged from r308270, head/contrib/tzdata/checktab.awk stable/9/contrib/tzdata/leapseconds.awk - copied unchanged from r308270, head/contrib/tzdata/leapseconds.awk stable/9/contrib/tzdata/version - copied unchanged from r308270, head/contrib/tzdata/version stable/9/contrib/tzdata/zoneinfo2tdf.pl - copied unchanged from r308270, head/contrib/tzdata/zoneinfo2tdf.pl Modified: stable/11/contrib/tzdata/antarctica stable/11/contrib/tzdata/asia stable/11/contrib/tzdata/australasia stable/11/contrib/tzdata/europe stable/11/contrib/tzdata/zone.tab stable/11/contrib/tzdata/zone1970.tab stable/9/contrib/tzdata/antarctica stable/9/contrib/tzdata/asia stable/9/contrib/tzdata/australasia stable/9/contrib/tzdata/europe stable/9/contrib/tzdata/zone.tab stable/9/contrib/tzdata/zone1970.tab Directory Properties: stable/11/ (props changed) stable/9/contrib/tzdata/ (props changed) Copied: stable/10/contrib/tzdata/CONTRIBUTING (from r308270, head/contrib/tzdata/CONTRIB
svn commit: r308302 - in stable: 10/contrib/tzdata 11/contrib/tzdata 9/contrib/tzdata
Author: gjb Date: Fri Nov 4 17:55:50 2016 New Revision: 308302 URL: https://svnweb.freebsd.org/changeset/base/308302 Log: MFC r308270: MFV r308265: Update tzdata to 2016i. Sponsored by: The FreeBSD Foundation Added: stable/11/contrib/tzdata/CONTRIBUTING - copied unchanged from r308270, head/contrib/tzdata/CONTRIBUTING stable/11/contrib/tzdata/LICENSE - copied unchanged from r308270, head/contrib/tzdata/LICENSE stable/11/contrib/tzdata/Makefile - copied unchanged from r308270, head/contrib/tzdata/Makefile stable/11/contrib/tzdata/NEWS - copied unchanged from r308270, head/contrib/tzdata/NEWS stable/11/contrib/tzdata/README - copied unchanged from r308270, head/contrib/tzdata/README stable/11/contrib/tzdata/Theory - copied unchanged from r308270, head/contrib/tzdata/Theory stable/11/contrib/tzdata/backzone - copied unchanged from r308270, head/contrib/tzdata/backzone stable/11/contrib/tzdata/checklinks.awk - copied unchanged from r308270, head/contrib/tzdata/checklinks.awk stable/11/contrib/tzdata/checktab.awk - copied unchanged from r308270, head/contrib/tzdata/checktab.awk stable/11/contrib/tzdata/leapseconds.awk - copied unchanged from r308270, head/contrib/tzdata/leapseconds.awk stable/11/contrib/tzdata/version - copied unchanged from r308270, head/contrib/tzdata/version stable/11/contrib/tzdata/zoneinfo2tdf.pl - copied unchanged from r308270, head/contrib/tzdata/zoneinfo2tdf.pl Modified: stable/11/contrib/tzdata/antarctica stable/11/contrib/tzdata/asia stable/11/contrib/tzdata/australasia stable/11/contrib/tzdata/europe stable/11/contrib/tzdata/zone.tab stable/11/contrib/tzdata/zone1970.tab Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Added: stable/10/contrib/tzdata/CONTRIBUTING - copied unchanged from r308270, head/contrib/tzdata/CONTRIBUTING stable/10/contrib/tzdata/LICENSE - copied unchanged from r308270, head/contrib/tzdata/LICENSE stable/10/contrib/tzdata/Makefile - copied unchanged from r308270, head/contrib/tzdata/Makefile stable/10/contrib/tzdata/NEWS - copied unchanged from r308270, head/contrib/tzdata/NEWS stable/10/contrib/tzdata/README - copied unchanged from r308270, head/contrib/tzdata/README stable/10/contrib/tzdata/Theory - copied unchanged from r308270, head/contrib/tzdata/Theory stable/10/contrib/tzdata/backzone - copied unchanged from r308270, head/contrib/tzdata/backzone stable/10/contrib/tzdata/checklinks.awk - copied unchanged from r308270, head/contrib/tzdata/checklinks.awk stable/10/contrib/tzdata/checktab.awk - copied unchanged from r308270, head/contrib/tzdata/checktab.awk stable/10/contrib/tzdata/leapseconds.awk - copied unchanged from r308270, head/contrib/tzdata/leapseconds.awk stable/10/contrib/tzdata/version - copied unchanged from r308270, head/contrib/tzdata/version stable/10/contrib/tzdata/zoneinfo2tdf.pl - copied unchanged from r308270, head/contrib/tzdata/zoneinfo2tdf.pl stable/9/contrib/tzdata/CONTRIBUTING - copied unchanged from r308270, head/contrib/tzdata/CONTRIBUTING stable/9/contrib/tzdata/LICENSE - copied unchanged from r308270, head/contrib/tzdata/LICENSE stable/9/contrib/tzdata/Makefile - copied unchanged from r308270, head/contrib/tzdata/Makefile stable/9/contrib/tzdata/NEWS - copied unchanged from r308270, head/contrib/tzdata/NEWS stable/9/contrib/tzdata/README - copied unchanged from r308270, head/contrib/tzdata/README stable/9/contrib/tzdata/Theory - copied unchanged from r308270, head/contrib/tzdata/Theory stable/9/contrib/tzdata/backzone - copied unchanged from r308270, head/contrib/tzdata/backzone stable/9/contrib/tzdata/checklinks.awk - copied unchanged from r308270, head/contrib/tzdata/checklinks.awk stable/9/contrib/tzdata/checktab.awk - copied unchanged from r308270, head/contrib/tzdata/checktab.awk stable/9/contrib/tzdata/leapseconds.awk - copied unchanged from r308270, head/contrib/tzdata/leapseconds.awk stable/9/contrib/tzdata/version - copied unchanged from r308270, head/contrib/tzdata/version stable/9/contrib/tzdata/zoneinfo2tdf.pl - copied unchanged from r308270, head/contrib/tzdata/zoneinfo2tdf.pl Modified: stable/10/contrib/tzdata/antarctica stable/10/contrib/tzdata/asia stable/10/contrib/tzdata/australasia stable/10/contrib/tzdata/europe stable/10/contrib/tzdata/zone.tab stable/10/contrib/tzdata/zone1970.tab stable/9/contrib/tzdata/antarctica stable/9/contrib/tzdata/asia stable/9/contrib/tzdata/australasia stable/9/contrib/tzdata/europe stable/9/contrib/tzdata/zone.tab stable/9/contrib/tzdata/zone1970.tab Directory Properties: stable/10/ (props changed) stable/9/contrib/tzdata/ (props changed) Copied: stable/11/contrib/tzdata/CONTRIBUTING (from r308270, head/contrib/tzdata/CONTRIB
svn commit: r308301 - in head/sys/dev: mpr mps
Author: scottl Date: Fri Nov 4 17:25:47 2016 New Revision: 308301 URL: https://svnweb.freebsd.org/changeset/base/308301 Log: Record the LogInfo field when reporting the IOCStatus. Helps in debugging errors. Submitted by: slm Obtained from:Netflix MFC after:3 days Modified: head/sys/dev/mpr/mpr_sas.c head/sys/dev/mps/mps_sas.c Modified: head/sys/dev/mpr/mpr_sas.c == --- head/sys/dev/mpr/mpr_sas.c Fri Nov 4 17:13:47 2016(r308300) +++ head/sys/dev/mpr/mpr_sas.c Fri Nov 4 17:25:47 2016(r308301) @@ -2496,8 +2496,9 @@ mprsas_scsiio_complete(struct mpr_softc */ mprsas_set_ccbstatus(ccb, CAM_REQ_CMP_ERR); mprsas_log_command(cm, MPR_INFO, - "terminated ioc %x scsi %x state %x xfer %u\n", - le16toh(rep->IOCStatus), rep->SCSIStatus, rep->SCSIState, + "terminated ioc %x loginfo %x scsi %x state %x xfer %u\n", + le16toh(rep->IOCStatus), le32toh(rep->IOCLogInfo), + rep->SCSIStatus, rep->SCSIState, le32toh(rep->TransferCount)); break; case MPI2_IOCSTATUS_INVALID_FUNCTION: @@ -2512,8 +2513,9 @@ mprsas_scsiio_complete(struct mpr_softc case MPI2_IOCSTATUS_SCSI_TASK_MGMT_FAILED: default: mprsas_log_command(cm, MPR_XINFO, - "completed ioc %x scsi %x state %x xfer %u\n", - le16toh(rep->IOCStatus), rep->SCSIStatus, rep->SCSIState, + "completed ioc %x loginfo %x scsi %x state %x xfer %u\n", + le16toh(rep->IOCStatus), le32toh(rep->IOCLogInfo), + rep->SCSIStatus, rep->SCSIState, le32toh(rep->TransferCount)); csio->resid = cm->cm_length; mprsas_set_ccbstatus(ccb, CAM_REQ_CMP_ERR); Modified: head/sys/dev/mps/mps_sas.c == --- head/sys/dev/mps/mps_sas.c Fri Nov 4 17:13:47 2016(r308300) +++ head/sys/dev/mps/mps_sas.c Fri Nov 4 17:25:47 2016(r308301) @@ -2446,8 +2446,9 @@ mpssas_scsiio_complete(struct mps_softc */ mpssas_set_ccbstatus(ccb, CAM_REQ_CMP_ERR); mpssas_log_command(cm, MPS_INFO, - "terminated ioc %x scsi %x state %x xfer %u\n", - le16toh(rep->IOCStatus), rep->SCSIStatus, rep->SCSIState, + "terminated ioc %x loginfo %x scsi %x state %x xfer %u\n", + le16toh(rep->IOCStatus), le32toh(rep->IOCLogInfo), + rep->SCSIStatus, rep->SCSIState, le32toh(rep->TransferCount)); break; case MPI2_IOCSTATUS_INVALID_FUNCTION: @@ -2462,8 +2463,9 @@ mpssas_scsiio_complete(struct mps_softc case MPI2_IOCSTATUS_SCSI_TASK_MGMT_FAILED: default: mpssas_log_command(cm, MPS_XINFO, - "completed ioc %x scsi %x state %x xfer %u\n", - le16toh(rep->IOCStatus), rep->SCSIStatus, rep->SCSIState, + "completed ioc %x loginfo %x scsi %x state %x xfer %u\n", + le16toh(rep->IOCStatus), le32toh(rep->IOCLogInfo), + rep->SCSIStatus, rep->SCSIState, le32toh(rep->TransferCount)); csio->resid = cm->cm_length; mpssas_set_ccbstatus(ccb, CAM_REQ_CMP_ERR); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308300 - head/sys/arm/allwinner/clk
Author: manu Date: Fri Nov 4 17:13:47 2016 New Revision: 308300 URL: https://svnweb.freebsd.org/changeset/base/308300 Log: For AHB clock we need to set the assigned parents for cpufreq(4) to work. MFC after:2 weeks Modified: head/sys/arm/allwinner/clk/aw_ahbclk.c Modified: head/sys/arm/allwinner/clk/aw_ahbclk.c == --- head/sys/arm/allwinner/clk/aw_ahbclk.c Fri Nov 4 17:08:52 2016 (r308299) +++ head/sys/arm/allwinner/clk/aw_ahbclk.c Fri Nov 4 17:13:47 2016 (r308300) @@ -350,6 +350,12 @@ aw_ahbclk_attach(device_t dev) goto fail; } + error = clk_set_assigned(dev, node); + if (error != 0) { + device_printf(dev, "cannot set assigned parents: %d\n", error); + goto fail; + } + if (bootverbose) clkdom_dump(clkdom); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308299 - head/sys/cam/scsi
Author: scottl Date: Fri Nov 4 17:08:52 2016 New Revision: 308299 URL: https://svnweb.freebsd.org/changeset/base/308299 Log: If the da periph probe state machine gets an asc=0x44 error, the periph is not going to recover until the system is reset. Treat it as a special case and don't allow it to fall through to quasi-success. Reviewed by: ken, imp Obtained from:Netflix MFC after:3 days Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c == --- head/sys/cam/scsi/scsi_da.c Fri Nov 4 17:04:45 2016(r308298) +++ head/sys/cam/scsi/scsi_da.c Fri Nov 4 17:08:52 2016(r308299) @@ -4310,8 +4310,14 @@ dadone(struct cam_periph *periph, union * direct access or optical disk device, * as long as it doesn't return a "Logical * unit not supported" (0x25) error. +* "Internal Target Failure" (0x44) is also +* special and typically means that the +* device is a SATA drive behind a SATL +* translation that's fallen into a +* terminally fatal state. */ - if ((have_sense) && (asc != 0x25) + if ((have_sense) +&& (asc != 0x25) && (asc != 0x44) && (error_code == SSD_CURRENT_ERROR)) { const char *sense_key_desc; const char *asc_desc; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308298 - head/sys/dev/extres/clk
Author: manu Date: Fri Nov 4 17:04:45 2016 New Revision: 308298 URL: https://svnweb.freebsd.org/changeset/base/308298 Log: Add clk_set_assigned assigned-clock-parents are DT properties used to configure some default parent clocks on one node. Reviewed by: mmel MFC after:2 weeks Modified: head/sys/dev/extres/clk/clk.c head/sys/dev/extres/clk/clk.h Modified: head/sys/dev/extres/clk/clk.c == --- head/sys/dev/extres/clk/clk.c Fri Nov 4 17:02:42 2016 (r308297) +++ head/sys/dev/extres/clk/clk.c Fri Nov 4 17:04:45 2016 (r308298) @@ -1196,7 +1196,47 @@ clk_get_by_id(device_t dev, struct clkdo #ifdef FDT int -clk_get_by_ofw_index(device_t dev, phandle_t cnode, int idx, clk_t *clk) +clk_set_assigned(device_t dev, phandle_t node) +{ + clk_t clk, clk_parent; + int error, nclocks, i; + + error = ofw_bus_parse_xref_list_get_length(node, + "assigned-clock-parents", "#clock-cells", &nclocks); + + if (error != 0) { + device_printf(dev, "cannot parse assigned-clock-parents property\n"); + return (error); + } + + for (i = 0; i < nclocks; i++) { + error = clk_get_by_ofw_index_prop(dev, 0, + "assigned-clock-parents", i, &clk_parent); + if (error != 0) { + device_printf(dev, "cannot get parent %d\n", i); + return (error); + } + + error = clk_get_by_ofw_index_prop(dev, 0, "assigned-clocks", + i, &clk); + if (error != 0) { + device_printf(dev, "cannot get assigned clock %d\n", i); + clk_release(clk_parent); + return (error); + } + + error = clk_set_parent_by_clk(clk, clk_parent); + clk_release(clk_parent); + clk_release(clk); + if (error != 0) + return (error); + } + + return (0); +} + +int +clk_get_by_ofw_index_prop(device_t dev, phandle_t cnode, const char *prop, int idx, clk_t *clk) { phandle_t parent, *cells; device_t clockdev; @@ -1214,7 +1254,7 @@ clk_get_by_ofw_index(device_t dev, phand } - rv = ofw_bus_parse_xref_list_alloc(cnode, "clocks", "#clock-cells", idx, + rv = ofw_bus_parse_xref_list_alloc(cnode, prop, "#clock-cells", idx, &parent, &ncells, &cells); if (rv != 0) { return (rv); @@ -1247,6 +1287,12 @@ done: } int +clk_get_by_ofw_index(device_t dev, phandle_t cnode, int idx, clk_t *clk) +{ + return (clk_get_by_ofw_index_prop(dev, cnode, "clocks", idx, clk)); +} + +int clk_get_by_ofw_name(device_t dev, phandle_t cnode, const char *name, clk_t *clk) { int rv, idx; Modified: head/sys/dev/extres/clk/clk.h == --- head/sys/dev/extres/clk/clk.h Fri Nov 4 17:02:42 2016 (r308297) +++ head/sys/dev/extres/clk/clk.h Fri Nov 4 17:04:45 2016 (r308298) @@ -129,7 +129,9 @@ int clk_set_parent_by_clk(clk_t clk, clk const char *clk_get_name(clk_t clk); #ifdef FDT +int clk_set_assigned(device_t dev, phandle_t node); int clk_get_by_ofw_index(device_t dev, phandle_t node, int idx, clk_t *clk); +int clk_get_by_ofw_index_prop(device_t dev, phandle_t cnode, const char *prop, int idx, clk_t *clk); int clk_get_by_ofw_name(device_t dev, phandle_t node, const char *name, clk_t *clk); int clk_parse_ofw_out_names(device_t dev, phandle_t node, ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308297 - head/bin/freebsd-version
Author: des Date: Fri Nov 4 17:02:42 2016 New Revision: 308297 URL: https://svnweb.freebsd.org/changeset/base/308297 Log: Use what(1) instead of strings(1). It's simpler and always available. PR: 213665 Submitted by: Pawel Worach MFC after:1 week Modified: head/bin/freebsd-version/freebsd-version.sh.in Modified: head/bin/freebsd-version/freebsd-version.sh.in == --- head/bin/freebsd-version/freebsd-version.sh.in Fri Nov 4 16:56:36 2016(r308296) +++ head/bin/freebsd-version/freebsd-version.sh.in Fri Nov 4 17:02:42 2016(r308297) @@ -36,7 +36,7 @@ USERLAND_VERSION="@@REVISION@@-@@BRANCH@ : ${LOADER_CONF_FILES:=$LOADER_DIR/defaults/loader.conf $LOADER_DIR/loader.conf $LOADER_DIR/loader.conf.local} LOADER_RE1='^\([A-Z_a-z][0-9A-Z_a-z]*=[-./0-9A-Z_a-z]\{1,\}\).*$' LOADER_RE2='^\([A-Z_a-z][0-9A-Z_a-z]*="[-./0-9A-Z_a-z]\{1,\}"\).*$' -KERNEL_RE='^@(#)@@TYPE@@ \([-.0-9A-Za-z]\{1,\}\) .*$' +KERNEL_RE='^@@TYPE@@ \([-.0-9A-Za-z]\{1,\}\) .*$' progname=$(basename $0) @@ -67,7 +67,7 @@ kernel_version() { if [ ! -f "$kernfile" -o ! -r "$kernfile" ] ; then error "unable to locate kernel" fi - strings "$kernfile" | sed -n "s/$KERNEL_RE/\\1/p" + what -qs "$kernfile" | sed -n "s/$KERNEL_RE/\\1/p" } # ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308296 - head/sys/cam/scsi
Author: scottl Date: Fri Nov 4 16:56:36 2016 New Revision: 308296 URL: https://svnweb.freebsd.org/changeset/base/308296 Log: asc/ascq 44/0 is typically a non-transient, permanent error (at least until the components are reset). Therefore retries are pointless. This is very visible in SATL systems, for example an LSI SAS controller and a SATA HDD/SSD. Reviewed by: ken Obtained from:Netflix MFC after:3 days Modified: head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/scsi/scsi_all.c == --- head/sys/cam/scsi/scsi_all.cFri Nov 4 16:24:38 2016 (r308295) +++ head/sys/cam/scsi/scsi_all.cFri Nov 4 16:56:36 2016 (r308296) @@ -2331,7 +2331,7 @@ static struct asc_table_entry asc_table[ { SST(0x43, 0x00, SS_RDEF, "Message error") }, /* DTLPWROMAEBKVF */ - { SST(0x44, 0x00, SS_RDEF, + { SST(0x44, 0x00, SS_FATAL | EIO, "Internal target failure") }, /* DT P MAEBKVF */ { SST(0x44, 0x01, SS_RDEF, /* XXX TBD */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r308295 - in head/sys: conf dev/gpio
> On Nov 4, 2016, at 9:24 AM, Oleksandr Tymoshenko wrote: > > Author: gonzo > Date: Fri Nov 4 16:24:38 2016 > New Revision: 308295 > URL: https://svnweb.freebsd.org/changeset/base/308295 > > Log: > [gpio] Add GPIO driver for Intel Bay Trail SoC > > Bay Trail has three banks of GPIOs exposed to userland as /dev/gpiocN, > where N is 1, 2, and 3. Pins in each bank are pre-named to match names This should have been “where N is 0, 1, and 2" ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308295 - in head/sys: conf dev/gpio
Author: gonzo Date: Fri Nov 4 16:24:38 2016 New Revision: 308295 URL: https://svnweb.freebsd.org/changeset/base/308295 Log: [gpio] Add GPIO driver for Intel Bay Trail SoC Bay Trail has three banks of GPIOs exposed to userland as /dev/gpiocN, where N is 1, 2, and 3. Pins in each bank are pre-named to match names on boards schematics: GPIO_S0_SCnn, GPIO_S0_NCnn, and GPIO_S5_nn. Controller supports edge-triggered and level-triggered interrupts but current version of the driver does not have interrupts support Added: head/sys/dev/gpio/bytgpio.c (contents, props changed) Modified: head/sys/conf/files.amd64 head/sys/conf/files.i386 Modified: head/sys/conf/files.amd64 == --- head/sys/conf/files.amd64 Fri Nov 4 15:44:00 2016(r308294) +++ head/sys/conf/files.amd64 Fri Nov 4 16:24:38 2016(r308295) @@ -270,6 +270,7 @@ dev/fdc/fdc.c optionalfdc dev/fdc/fdc_acpi.c optionalfdc dev/fdc/fdc_isa.c optionalfdc isa dev/fdc/fdc_pccard.c optionalfdc pccard +dev/gpio/bytgpio.c optionalbytgpio dev/hpt27xx/hpt27xx_os_bsd.c optionalhpt27xx dev/hpt27xx/hpt27xx_osm_bsd.c optionalhpt27xx dev/hpt27xx/hpt27xx_config.c optionalhpt27xx Modified: head/sys/conf/files.i386 == --- head/sys/conf/files.i386Fri Nov 4 15:44:00 2016(r308294) +++ head/sys/conf/files.i386Fri Nov 4 16:24:38 2016(r308295) @@ -225,6 +225,7 @@ dev/fe/if_fe_isa.c optional fe isa dev/glxiic/glxiic.coptional glxiic dev/glxsb/glxsb.c optional glxsb dev/glxsb/glxsb_hash.c optional glxsb +dev/gpio/bytgpio.c optionalbytgpio dev/hpt27xx/hpt27xx_os_bsd.c optional hpt27xx dev/hpt27xx/hpt27xx_osm_bsd.c optional hpt27xx dev/hpt27xx/hpt27xx_config.c optional hpt27xx Added: head/sys/dev/gpio/bytgpio.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/gpio/bytgpio.c Fri Nov 4 16:24:38 2016(r308295) @@ -0,0 +1,435 @@ +/*- + * Copyright (c) 2016 Oleksandr Tymoshenko + * 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 "opt_acpi.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#include "gpio_if.h" + +/** + * Macros for driver mutex locking + */ +#defineBYTGPIO_LOCK(_sc) mtx_lock_spin(&(_sc)->sc_mtx) +#defineBYTGPIO_UNLOCK(_sc) mtx_unlock_spin(&(_sc)->sc_mtx) +#defineBYTGPIO_LOCK_INIT(_sc) \ + mtx_init(&_sc->sc_mtx, device_get_nameunit((_sc)->sc_dev), \ + "bytgpio", MTX_SPIN) +#defineBYTGPIO_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) +#defineBYTGPIO_ASSERT_LOCKED(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) +#defineBYTGPIO_ASSERT_UNLOCKED(_sc)mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED) + +struct bytgpio_softc { + ACPI_HANDLE sc_handle; + device_tsc_dev; + device_tsc_busdev; + struct mtx sc_mtx; + int sc_mem_rid; + struct resource *sc_mem_res; + int sc_npins; + const char* sc_bank_prefix; + const int *sc_pinpad_map;
svn commit: r308294 - head/lib/libgcc_s
Author: emaste Date: Fri Nov 4 15:44:00 2016 New Revision: 308294 URL: https://svnweb.freebsd.org/changeset/base/308294 Log: libgcc_s: make unspecified shlib symbols local We want only symbols explicitly specified in the Version.map. Sponsored by: The FreeBSD Foundation Modified: head/lib/libgcc_s/Version.map Modified: head/lib/libgcc_s/Version.map == --- head/lib/libgcc_s/Version.map Fri Nov 4 15:11:51 2016 (r308293) +++ head/lib/libgcc_s/Version.map Fri Nov 4 15:44:00 2016 (r308294) @@ -3,6 +3,7 @@ */ GCC_3.0 { +global: __absvdi2; __absvsi2; __addvdi3; @@ -62,6 +63,8 @@ GCC_3.0 { _Unwind_Resume; _Unwind_SetGR; _Unwind_SetIP; +local: + *; }; GCC_3.3 { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308293 - head/usr.bin/fortune/datfiles
Author: vangyzen Date: Fri Nov 4 15:11:51 2016 New Revision: 308293 URL: https://svnweb.freebsd.org/changeset/base/308293 Log: Fix grammar in a fortune. Modified: head/usr.bin/fortune/datfiles/fortunes Modified: head/usr.bin/fortune/datfiles/fortunes == --- head/usr.bin/fortune/datfiles/fortunes Fri Nov 4 14:06:21 2016 (r308292) +++ head/usr.bin/fortune/datfiles/fortunes Fri Nov 4 15:11:51 2016 (r308293) @@ -58947,7 +58947,7 @@ You're not drunk if you can lie on the f % You're not my type. For that matter, you're not even my species!!! % -You're reasoning is excellent -- it's +Your reasoning is excellent -- it's only your basic assumptions that are wrong. % You're ugly and your mother dresses you funny. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308292 - in stable/10: etc/autofs usr.bin/showmount
Author: trasz Date: Fri Nov 4 14:06:21 2016 New Revision: 308292 URL: https://svnweb.freebsd.org/changeset/base/308292 Log: MFC r297207: Make the autofs(5) -hosts map more robust, primarily to make it correctly handle NFS shares containing whitespace. This also adds the -E parameter to showmount(8). PR: 207596 Differential Revision:https://reviews.freebsd.org/D5649 Modified: stable/10/etc/autofs/special_hosts stable/10/usr.bin/showmount/showmount.8 stable/10/usr.bin/showmount/showmount.c Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/autofs/special_hosts == --- stable/10/etc/autofs/special_hosts Fri Nov 4 13:59:57 2016 (r308291) +++ stable/10/etc/autofs/special_hosts Fri Nov 4 14:06:21 2016 (r308292) @@ -10,8 +10,8 @@ if [ $# -eq 0 ]; then exit 0 fi -out=`showmount -e "$1"` +out=`showmount -E "$1"` [ $? -eq 0 ] || exit 1 echo "$out" | awk -v host="$1" \ -'NR > 1 { printf "%s\t%s:%s ", $1, host, $1 } END { printf "\n" }' +'{ printf "\"%s\"\t\"%s:%s\" ", $0, host, $0 } END { printf "\n" }' Modified: stable/10/usr.bin/showmount/showmount.8 == --- stable/10/usr.bin/showmount/showmount.8 Fri Nov 4 13:59:57 2016 (r308291) +++ stable/10/usr.bin/showmount/showmount.8 Fri Nov 4 14:06:21 2016 (r308292) @@ -31,7 +31,7 @@ .\" @(#)showmount.88.3 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd August 16, 2014 +.Dd March 20, 2016 .Dt SHOWMOUNT 8 .Os .Sh NAME @@ -40,6 +40,7 @@ .Sh SYNOPSIS .Nm .Op Fl a | d +.Op Fl E .Op Fl e .Op Fl 1 .Op Fl 3 @@ -73,6 +74,12 @@ List all mount points in the form: .Ed .It Fl d List directory paths of mount points instead of hosts. +.It Fl E +Show the +.Ar host Ns 's +exports list in a script-friendly format. +Client addresses and the header are not shown, and special +characters are escaped. .It Fl e Show the .Ar host Ns 's Modified: stable/10/usr.bin/showmount/showmount.c == --- stable/10/usr.bin/showmount/showmount.c Fri Nov 4 13:59:57 2016 (r308291) +++ stable/10/usr.bin/showmount/showmount.c Fri Nov 4 14:06:21 2016 (r308292) @@ -61,13 +61,15 @@ static const char rcsid[] = #include #include #include +#include /* Constant defs */ #defineALL 1 #defineDIRS2 -#defineDODUMP 0x1 -#defineDOEXPORTS 0x2 +#defineDODUMP 0x1 +#defineDOEXPORTS 0x2 +#defineDOPARSABLEEXPORTS 0x4 struct mountlist { struct mountlist *ml_left; @@ -108,13 +110,14 @@ int tcp_callrpc(const char *host, int pr int main(int argc, char **argv) { + char strvised[MNTPATHLEN * 4 + 1]; register struct exportslist *exp; register struct grouplist *grp; register int rpcs = 0, mntvers = 3; const char *host; - int ch, estat; + int ch, estat, nbytes; - while ((ch = getopt(argc, argv, "ade13")) != -1) + while ((ch = getopt(argc, argv, "adEe13")) != -1) switch (ch) { case 'a': if (type == 0) { @@ -130,6 +133,9 @@ main(int argc, char **argv) } else usage(); break; + case 'E': + rpcs |= DOPARSABLEEXPORTS; + break; case 'e': rpcs |= DOEXPORTS; break; @@ -146,6 +152,13 @@ main(int argc, char **argv) argc -= optind; argv += optind; + if ((rpcs & DOPARSABLEEXPORTS) != 0) { + if ((rpcs & DOEXPORTS) != 0) + errx(1, "-E cannot be used with -e"); + if ((rpcs & DODUMP) != 0) + errx(1, "-E cannot be used with -a or -d"); + } + if (argc > 0) host = *argv; else @@ -161,7 +174,7 @@ main(int argc, char **argv) clnt_perrno(estat); errx(1, "can't do mountdump rpc"); } - if (rpcs & DOEXPORTS) + if (rpcs & (DOEXPORTS | DOPARSABLEEXPORTS)) if ((estat = tcp_callrpc(host, MOUNTPROG, mntvers, MOUNTPROC_EXPORT, (xdrproc_t)xdr_void, (char *)0, (xdrproc_t)xdr_exportslist, (char *)&exportslist)) != 0) { @@ -202,6 +215,17 @@ main(int argc, char **argv) exp = exp->ex_next; } } + if (rpcs & DOPARSABLEEXPORTS) { + exp = exportslist; + while (exp) { + nbytes = strsnvis(strvised, sizeof(strvised), + exp
svn commit: r308291 - stable/10/share/man/man5
Author: trasz Date: Fri Nov 4 13:59:57 2016 New Revision: 308291 URL: https://svnweb.freebsd.org/changeset/base/308291 Log: MFC r287032: Tweak the "rctl_enable" description to not give the impression of being disabled by default. Modified: stable/10/share/man/man5/rc.conf.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man5/rc.conf.5 == --- stable/10/share/man/man5/rc.conf.5 Fri Nov 4 13:51:10 2016 (r308290) +++ stable/10/share/man/man5/rc.conf.5 Fri Nov 4 13:59:57 2016 (r308291) @@ -4508,9 +4508,9 @@ polled at a 1-second interval. The default is 30. .It Va rctl_enable .Pq Vt bool -Set to -.Dq Li YES -to load +If set to +.Dq Li YES , +load .Xr rctl 8 rules from the defined ruleset. The kernel must be built with ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308290 - stable/10/sys/conf
Author: trasz Date: Fri Nov 4 13:51:10 2016 New Revision: 308290 URL: https://svnweb.freebsd.org/changeset/base/308290 Log: MFC r292210: Fix kernel build with "options GEOM_MOUNTVER". Previously it was only working as a kernel module. PR: 205026 Modified: stable/10/sys/conf/options Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/options == --- stable/10/sys/conf/options Fri Nov 4 13:07:54 2016(r308289) +++ stable/10/sys/conf/options Fri Nov 4 13:51:10 2016(r308290) @@ -106,6 +106,7 @@ GEOM_LABEL opt_geom.h GEOM_LINUX_LVM opt_geom.h GEOM_MBR opt_geom.h GEOM_MIRRORopt_geom.h +GEOM_MOUNTVER opt_geom.h GEOM_MULTIPATH opt_geom.h GEOM_NOP opt_geom.h GEOM_PART_APM opt_geom.h ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308289 - head/sys/riscv/riscv
Author: br Date: Fri Nov 4 13:07:54 2016 New Revision: 308289 URL: https://svnweb.freebsd.org/changeset/base/308289 Log: System Binary Interface (SBI) page was moved in latest version of Berkeley Boot Loader (BBL) due to code size increase. We will need to dehardcode this somehow. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Modified: head/sys/riscv/riscv/locore.S Modified: head/sys/riscv/riscv/locore.S == --- head/sys/riscv/riscv/locore.S Fri Nov 4 12:58:50 2016 (r308288) +++ head/sys/riscv/riscv/locore.S Fri Nov 4 13:07:54 2016 (r308289) @@ -137,7 +137,7 @@ _start: /* Create an L3 page for SBI */ la s1, pagetable_l3_sbi - li s2, 0x80009000 + li s2, 0x8000b000 srlis2, s2, PAGE_SHIFT li a5, 511 li t4, PTE_V | PTE_RX | PTE_W ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308288 - head/sys/vm
Author: kib Date: Fri Nov 4 12:58:50 2016 New Revision: 308288 URL: https://svnweb.freebsd.org/changeset/base/308288 Log: Do not sleep in vm_wait() if pagedaemon did not yet started. Panic instead. Requests which cannot be satisfied by allocators at boot time often have unrealizable parameters. Waiting for the pagedaemon' start would hang the boot if done in the thread0 context and just never succeed if executed from another thread. In fact, for very early stages, sleep attempt panics with obscure diagnostic about the scheduler state, and explicit panic in vm_wait() makes the investigation much shorter by cut off the examination of the thread and scheduler. Theoretically, some subsystem might grab a resource to exhaustion, and free it later in the boot process. If this unlikely scenario does appear for real, the way to diagnose the trouble can be revisited. Reported by: emaste Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after:2 weeks Differential revision:https://reviews.freebsd.org/D8421 Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c == --- head/sys/vm/vm_page.c Fri Nov 4 11:40:11 2016(r308287) +++ head/sys/vm/vm_page.c Fri Nov 4 12:58:50 2016(r308288) @@ -2738,6 +2738,8 @@ vm_wait(void) msleep(&vm_pageout_pages_needed, &vm_page_queue_free_mtx, PDROP | PSWP, "VMWait", 0); } else { + if (__predict_false(pageproc == NULL)) + panic("vm_wait in early boot"); if (!vm_pageout_wanted) { vm_pageout_wanted = true; wakeup(&vm_pageout_wanted); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r308287 - head/sys/arm/nvidia/tegra124
Author: mmel Date: Fri Nov 4 11:40:11 2016 New Revision: 308287 URL: https://svnweb.freebsd.org/changeset/base/308287 Log: TEGRA: Fix numerous issues in clock code. Define and export clocks related to XUSB driver. Modified: head/sys/arm/nvidia/tegra124/tegra124_car.c head/sys/arm/nvidia/tegra124/tegra124_clk_per.c head/sys/arm/nvidia/tegra124/tegra124_clk_pll.c Modified: head/sys/arm/nvidia/tegra124/tegra124_car.c == --- head/sys/arm/nvidia/tegra124/tegra124_car.c Fri Nov 4 11:39:19 2016 (r308286) +++ head/sys/arm/nvidia/tegra124/tegra124_car.c Fri Nov 4 11:40:11 2016 (r308287) @@ -191,13 +191,13 @@ PLIST(mux_plle_src) = {"pllE_src1", "pll PLIST(mux_plld_out0_plld2_out0) = {"pllD_out0", "pllD2_out0"}; PLIST(mux_pllmcp_clkm) = {"pllM_out0", "pllC_out0", "pllP_out0", "clk_m", "pllM_UD", "pllC2_out0", "pllC3_out0", "pllC_UD"}; -PLIST(mux_xusb_hs) = {"pc_xusb_ss", "pllU_60"}; +PLIST(mux_xusb_hs) = {"xusb_ss_div2", "pllU_60"}; PLIST(mux_xusb_ss) = {"pc_xusb_ss", "osc_div_clk"}; /* Clocks ajusted online. */ static struct clk_fixed_def fixed_clk_m = - FRATE(0, "clk_m", 1200); + FRATE(TEGRA124_CLK_CLK_M, "clk_m", 1200); static struct clk_fixed_def fixed_osc_div_clk = FACT(0, "osc_div_clk", "clk_m", 1, 1); @@ -222,6 +222,10 @@ static struct clk_fixed_def tegra124_fix FRATE(0, "audio3", 1000), FRATE(0, "audio4", 1000), FRATE(0, "ext_vimclk", 1000), + + /* XUSB */ + FACT(TEGRA124_CLK_XUSB_SS_DIV2, "xusb_ss_div2", "xusb_ss", 1, 2), + }; @@ -239,7 +243,7 @@ static struct clk_mux_def tegra124_mux_c MUX(0, "emc_mux", mux_pllmcp_clkm, CLK_SOURCE_EMC, 29, 3), /* USB. */ - MUX(0, "xusb_hs", mux_xusb_hs, CLK_SOURCE_XUSB_SS, 25, 1), + MUX(TEGRA124_CLK_XUSB_HS_SRC, "xusb_hs", mux_xusb_hs, CLK_SOURCE_XUSB_SS, 25, 1), MUX(0, "xusb_ss_mux", mux_xusb_ss, CLK_SOURCE_XUSB_SS, 24, 1), }; @@ -249,7 +253,7 @@ static struct clk_gate_def tegra124_gate /* Core clocks. */ GATE_PLL(0, "pllC_out1", "pllC_out1_div", PLLC_OUT, 0), GATE_PLL(0, "pllM_out1", "pllM_out1_div", PLLM_OUT, 0), - GATE_PLL(0, "pllU_480", "pllU_out", PLLU_BASE, 22), + GATE_PLL(TEGRA124_CLK_PLL_U_480M, "pllU_480", "pllU_out", PLLU_BASE, 22), GATE_PLL(0, "pllP_outX0", "pllP_outX0_div", PLLP_RESHIFT, 0), GATE_PLL(0, "pllP_out1", "pllP_out1_div", PLLP_OUTA, 0), GATE_PLL(0, "pllP_out2", "pllP_out2_div", PLLP_OUTA, 16), Modified: head/sys/arm/nvidia/tegra124/tegra124_clk_per.c == --- head/sys/arm/nvidia/tegra124/tegra124_clk_per.c Fri Nov 4 11:39:19 2016(r308286) +++ head/sys/arm/nvidia/tegra124/tegra124_clk_per.c Fri Nov 4 11:40:11 2016(r308287) @@ -41,6 +41,15 @@ __FBSDID("$FreeBSD$"); #include #include "tegra124_car.h" +/* The TEGRA124_CLK_XUSB_GATE is missing in current + * DT bindings, define it localy + */ +#ifdef TEGRA124_CLK_XUSB_GATE +#error "TEGRA124_CLK_XUSB_GATE is now defined, revisit XUSB code!" +#else +#define TEGRA124_CLK_XUSB_GATE 143 +#endif + /* Bits in base register. */ #definePERLCK_AMUX_MASK0x0F #definePERLCK_AMUX_SHIFT 16 @@ -175,7 +184,7 @@ PLIST(mux_sep_audio) = "spdif_in", "i2s0", "i2s1", "i2s2", "i2s4", "pllA_out0", "ext_vimclk"}; -static uint32_t clk_enabale_reg[] = { +static uint32_t clk_enable_reg[] = { CLK_OUT_ENB_L, CLK_OUT_ENB_H, CLK_OUT_ENB_U, @@ -285,7 +294,7 @@ static struct pgate_def pgate_def[] = { GATE(CSUS, "sus_out", "clk_m", U(28)), /* GATE(DEVD2_OUT, "devd2_out", "clk_m", U(29)), */ /* GATE(DEVD1_OUT, "devd1_out", "clk_m", U(30)), */ - GATE(XUSB_DEV_SRC, "xusb_core_dev", "pc_xusb_core_dev", U(31)), + GATE(XUSB_DEV, "xusb_core_dev", "pc_xusb_core_dev", U(31)), /* bank V -> 96-127 */ /* GATE(CPUG, "cpug", "clk_m", V(0)), */ @@ -328,7 +337,7 @@ static struct pgate_def pgate_def[] = { /* GATE(HDMI_IOBIST, "hdmi_iobist", "clk_m", W(11)), */ /* GATE(SATA_IOBIST, "sata_iobist", "clk_m", W(12)), */ /* GATE(MIPI_IOBIST, "mipi_iobist", "clk_m", W(13)), */ - /* GATE(XUSB_IOBIST, "xusb_iobist", "clk_m", W(15)), */ + GATE(XUSB_GATE, "xusb_gate", "clk_m", W(15)), GATE(CILAB, "cilab", "pc_cilab", W(16)), GATE(CILCD, "cilcd", "pc_cilcd", W(17)), GATE(CILE, "cile", "pc_cile", W(18)), @@ -337,10 +346,10 @@ static struct pgate_def pgate_def[] = { GATE(ENTROPY, "entropy", "pc_entropy", W(21)), GATE(AMX, "amx", "pc_amx", W(25)), GATE(ADX, "adx", "pc_adx", W(26)), - GATE(DFLL_REF, "dvfs_ref", "pc_dvfs_ref", X(27)), - GATE(DFLL_SOC, "dvfs_soc", "pc_dvfs_soc", X(27)), - GATE(XUSB_SS_SRC, "xusb_ss", "xusb_ss_mux", X(28)), -
svn commit: r308286 - in head/sys/arm/nvidia: . tegra124
Author: mmel Date: Fri Nov 4 11:39:19 2016 New Revision: 308286 URL: https://svnweb.freebsd.org/changeset/base/308286 Log: TEGRA: Add basic driver for memory controller. For now, it only reports memory and SMMU access errors. Added: head/sys/arm/nvidia/tegra_mc.c (contents, props changed) Modified: head/sys/arm/nvidia/tegra124/files.tegra124 Modified: head/sys/arm/nvidia/tegra124/files.tegra124 == --- head/sys/arm/nvidia/tegra124/files.tegra124 Fri Nov 4 04:47:08 2016 (r308285) +++ head/sys/arm/nvidia/tegra124/files.tegra124 Fri Nov 4 11:39:19 2016 (r308286) @@ -33,6 +33,7 @@ arm/nvidia/tegra_efuse.c standard arm/nvidia/tegra_soctherm_if.m standard arm/nvidia/tegra_soctherm.cstandard arm/nvidia/tegra_lic.c standard +arm/nvidia/tegra_mc.c standard #arm/nvidia/tegra_hda.coptionalsnd_hda #arm/nvidia/drm2/hdmi.coptionaldrm2 #arm/nvidia/drm2/tegra_drm_if.moptionaldrm2 Added: head/sys/arm/nvidia/tegra_mc.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/nvidia/tegra_mc.c Fri Nov 4 11:39:19 2016 (r308286) @@ -0,0 +1,311 @@ +/*- + * Copyright (c) 2016 Michal Meloun + * 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$"); + +/* + * Memory controller driver for Tegra SoCs. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include "clock_if.h" + +#defineMC_INTSTATUS0x000 +#defineMC_INTMASK 0x004 +#define MC_INT_DECERR_MTS (1 << 16) +#define MC_INT_SECERR_SEC (1 << 13) +#define MC_INT_DECERR_VPR (1 << 12) +#define MC_INT_INVALID_APB_ASID_UPDATE (1 << 11) +#define MC_INT_INVALID_SMMU_PAGE (1 << 10) +#define MC_INT_ARBITRATION_EMEM(1 << 9) +#define MC_INT_SECURITY_VIOLATION (1 << 8) +#define MC_INT_DECERR_EMEM (1 << 6) +#define MC_INT_INT_MASK(MC_INT_DECERR_MTS | \ +MC_INT_SECERR_SEC |\ +MC_INT_DECERR_VPR |\ +MC_INT_INVALID_APB_ASID_UPDATE | \ +MC_INT_INVALID_SMMU_PAGE | \ +MC_INT_ARBITRATION_EMEM | \ +MC_INT_SECURITY_VIOLATION |\ +MC_INT_DECERR_EMEM) + +#defineMC_ERR_STATUS 0x008 +#define MC_ERR_TYPE(x) (((x) >> 28) & 0x7) +#define MC_ERR_TYPE_DECERR_EMEM2 +#define MC_ERR_TYPE_SECURITY_TRUSTZONE 3 +#define MC_ERR_TYPE_SECURITY_CARVEOUT 4 +#define MC_ERR_TYPE_INVALID_SMMU_PAGE 6 +#define MC_ERR_INVALID_SMMU_PAGE_READABLE (1 << 27) +#define MC_ERR_INVALID_SMMU_PAGE_WRITABLE (1 << 26) +#define MC_ERR_INVALID_SMMU_PAGE_NONSECURE (1 << 25) +#define MC_ERR_ADR_HI(x) (((x) >> 20) & 0x3) +#define MC_ERR_SWAP
Re: svn commit: r308217 - in head/sys/dev: mpr mps
Bezüglich Scott Long's Nachricht vom 02.11.2016 16:13 (localtime): > Author: scottl > Date: Wed Nov 2 15:13:25 2016 > New Revision: 308217 > URL: https://svnweb.freebsd.org/changeset/base/308217 > > Log: > Add a fallback to the device mapper logic. We've seen systems in the field > that are apparently misconfigured by the manufacturer and cause the mapping > logic to fail. The fallback allows drive numbers to be assigned based on > the > PHY number that they're attached to. Add sysctls and tunables to overrid > this new behavior, but they should be considered only necessary for > debugging. Thanks a lot, this is welcome not only for debugging! I had a hard time finding out how to get rid of static driveserial-targetID assigning. And more surprising, this affects only IT-fw. When using the same controller in IR-mode, mapping is done (correctly) slot-based. In IT-mode, every drive got a consecutive target ID which was static, and even persistent over firmware updates. There's only one possibility with LSIUtil(1.71) to erase /"persitent non-manufacturing config pages/". But I guess this hard drive-targetID assigning is triggered by the driver, namely the mps(4) in FreeBSD. I did quick tests on windows and IT-mode, where I think I saw slot (or Phy?) based assigning. If it's really mps(4) who decides to store driveserial-targetID numbering in the /"persitent non-manufacturing config pages/" of the controller, mpsutil(8) should be able to reset. Otherwise replacing failed drives, or - even mor confusing - rearranging drive/zpool layouts is very unsatisfying. Maybe "-1" should be mentioned with sysctl decription, otherwise this is another very hard to find/influence behaviour. Thanks, -harry ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"