From 1e4c615dacada14b45828f1ea4ba81ed1e0ad8f8 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Fri, 11 Jul 2014 00:10:56 +0100 Subject: [PATCH 01/45] Rebase Utilute and BeagleBone patches, Minaor ARM updates --- arm-beagle.patch | 460 +++++++++++++++++++++++++++++++++++++++++ arm-imx6-utilite.patch | 54 +++++ config-armv7 | 4 + kernel.spec | 8 + 4 files changed, 526 insertions(+) create mode 100644 arm-beagle.patch create mode 100644 arm-imx6-utilite.patch diff --git a/arm-beagle.patch b/arm-beagle.patch new file mode 100644 index 000000000..5e2d8abdc --- /dev/null +++ b/arm-beagle.patch @@ -0,0 +1,460 @@ +Bugzilla: 1012025 +Upstream-status: In beagle github repository https://github.com/beagleboard/kernel + +From b5a2528c89fc8049b2a6a750634c14983e33d00f Mon Sep 17 00:00:00 2001 +From: Robert Nelson +Date: Fri, 27 Dec 2013 13:05:09 -0600 +Subject: [PATCH] arm: dts: am335x-boneblack: lcdc add panel-info + +Signed-off-by: Robert Nelson +--- + arch/arm/boot/dts/am335x-boneblack.dts | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts +index 6b71ad9..09ffbd8 100644 +--- a/arch/arm/boot/dts/am335x-boneblack.dts ++++ b/arch/arm/boot/dts/am335x-boneblack.dts +@@ -74,5 +74,18 @@ + pinctrl-0 = <&nxp_hdmi_bonelt_pins>; + pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>; + status = "okay"; ++ ++ panel-info { ++ bpp = <16>; ++ ac-bias = <255>; ++ ac-bias-intrpt = <0>; ++ dma-burst-sz = <16>; ++ fdd = <16>; ++ sync-edge = <1>; ++ sync-ctrl = <1>; ++ raster-order = <0>; ++ fifo-th = <0>; ++ invert-pxl-clk; ++ }; + }; + }; +-- +1.8.5.1 + +From 1da083a002581520dd358b8b8e097078000d12b9 Mon Sep 17 00:00:00 2001 +From: Robert Nelson +Date: Fri, 27 Dec 2013 13:14:19 -0600 +Subject: [PATCH 2/2] arm: dts: am335x-boneblack: add cpu0 opp points + +Signed-off-by: Robert Nelson +--- + arch/arm/boot/dts/am335x-boneblack.dts | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/arch/arm/boot/dts/am335x-boneblack.dts b/arch/arm/boot/dts/am335x-boneblack.dts +index 09ffbd8..f213ccd 100644 +--- a/arch/arm/boot/dts/am335x-boneblack.dts ++++ b/arch/arm/boot/dts/am335x-boneblack.dts +@@ -67,6 +67,24 @@ + }; + + / { ++ cpus { ++ cpu@0 { ++ cpu0-supply = <&dcdc2_reg>; ++ /* ++ * To consider voltage drop between PMIC and SoC, ++ * tolerance value is reduced to 2% from 4% and ++ * voltage value is increased as a precaution. ++ */ ++ operating-points = < ++ /* kHz uV */ ++ 1000000 1325000 ++ 800000 1300000 ++ 600000 1112000 ++ 300000 969000 ++ >; ++ }; ++ }; ++ + hdmi { + compatible = "ti,tilcdc,slave"; + i2c = <&i2c0>; +-- +1.8.5.1 + +From 8551d8aa7d3e002da2097e7e902fb96fceb8694e Mon Sep 17 00:00:00 2001 +From: Robert Nelson +Date: Tue, 31 Dec 2013 11:17:45 -0600 +Subject: [PATCH 3/3] arm: dts: am335x-bone-common: enable and use i2c2 + +Signed-off-by: Robert Nelson +--- + arch/arm/boot/dts/am335x-bone-common.dtsi | 39 +++++++++++++++++++++++++++++++ + 1 file changed, 39 insertions(+) + +diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi +index e3f27ec..54366b6 100644 +--- a/arch/arm/boot/dts/am335x-bone-common.dtsi ++++ b/arch/arm/boot/dts/am335x-bone-common.dtsi +@@ -84,6 +84,13 @@ + >; + }; + ++ i2c2_pins: pinmux_i2c2_pins { ++ pinctrl-single,pins = < ++ 0x178 0x73 /* (SLEWCTRL_SLOW | PIN_INPUT_PULLUP | MUX_MODE3) uart1_ctsn.i2c2_sda */ ++ 0x17c 0x73 /* (SLEWCTRL_SLOW | PIN_INPUT_PULLUP | MUX_MODE3) uart1_rtsn.i2c2_scl */ ++ >; ++ }; ++ + uart0_pins: pinmux_uart0_pins { + pinctrl-single,pins = < + 0x170 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart0_rxd.uart0_rxd */ +@@ -220,6 +227,38 @@ + reg = <0x24>; + }; + ++ baseboard_eeprom: baseboard_eeprom@50 { ++ compatible = "at,24c256"; ++ reg = <0x50>; ++ }; ++}; ++ ++&i2c2 { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c2_pins>; ++ ++ clock-frequency = <100000>; ++ ++ cape_eeprom0: cape_eeprom0@54 { ++ compatible = "at,24c256"; ++ reg = <0x54>; ++ }; ++ ++ cape_eeprom1: cape_eeprom1@55 { ++ compatible = "at,24c256"; ++ reg = <0x55>; ++ }; ++ ++ cape_eeprom2: cape_eeprom2@56 { ++ compatible = "at,24c256"; ++ reg = <0x56>; ++ }; ++ ++ cape_eeprom3: cape_eeprom3@57 { ++ compatible = "at,24c256"; ++ reg = <0x57>; ++ }; + }; + + /include/ "tps65217.dtsi" +-- +1.8.5.2 + +From a3099dc53a47d1694a5b575580ec3406dc429bf8 Mon Sep 17 00:00:00 2001 +From: Robert Nelson +Date: Tue, 31 Dec 2013 14:18:00 -0600 +Subject: [PATCH 4/4] arm: dts: am335x-bone-common: setup default pinmux + http://elinux.org/Basic_Proto_Cape + +Signed-off-by: Robert Nelson +--- + arch/arm/boot/dts/am335x-bone-common.dtsi | 130 ++++++++++++++++++++++++++++++ + 1 file changed, 130 insertions(+) + +diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi +index e4571af..f85cabc 100644 +--- a/arch/arm/boot/dts/am335x-bone-common.dtsi ++++ b/arch/arm/boot/dts/am335x-bone-common.dtsi +@@ -98,6 +98,13 @@ + >; + }; + ++ uart1_pins: pinmux_uart1_pins { ++ pinctrl-single,pins = < ++ 0x180 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart1_rxd.uart1_rxd */ ++ 0x184 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* uart1_txd.uart1_txd */ ++ >; ++ }; ++ + clkout2_pin: pinmux_clkout2_pin { + pinctrl-single,pins = < + 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ +@@ -178,6 +185,33 @@ + 0x1c (PIN_INPUT_PULLUP | MUX_MODE1) /* gpmc_ad7.mmc1_dat7 */ + >; + }; ++ ++ spi0_pins: pinmux_spi0_pins { ++ pinctrl-single,pins = < ++ 0x150 (PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_sclk.spi0_sclk */ ++ 0x154 (PIN_INPUT_PULLUP | MUX_MODE0) /* spi0_d0.spi0_d0 */ ++ 0x158 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* spi0_d1.spi0_d1 */ ++ 0x15c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* spi0_cs0.spi0_cs0 */ ++ >; ++ }; ++ ++ ehrpwm1_pin_p9_14: pinmux_ehrpwm1_pin_p9_14 { ++ pinctrl-single,pins = < ++ 0x048 0x6 /* P9_14 (ZCZ ball U14) | MODE 6 */ ++ >; ++ }; ++ ++ ehrpwm1_pin_p9_16: pinmux_ehrpwm1_pin_p9_16 { ++ pinctrl-single,pins = < ++ 0x04c 0x6 /* P9_16 (ZCZ ball T14) | MODE 6 */ ++ >; ++ }; ++ ++ ecap0_pin_p9_42: pinmux_ecap0_pin_p9_42 { ++ pinctrl-single,pins = < ++ 0x164 0x0 /* P9_42 (ZCZ ball C18) | MODE 0 */ ++ >; ++ }; + }; + + &uart0 { +@@ -187,6 +221,13 @@ + status = "okay"; + }; + ++&uart1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart1_pins>; ++ ++ status = "okay"; ++}; ++ + &usb { + status = "okay"; + +@@ -261,6 +302,56 @@ + }; + }; + ++&epwmss0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&ecap0_pin_p9_42>; ++ status = "okay"; ++ ++ ecap@48300100 { ++ status = "okay"; ++ }; ++}; ++ ++&epwmss1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = < ++ &ehrpwm1_pin_p9_14 ++ &ehrpwm1_pin_p9_16 ++ >; ++ ++ status = "okay"; ++ ++ ehrpwm@48302200 { ++ status = "okay"; ++ }; ++}; ++ ++&spi0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spi0_pins>; ++ status = "okay"; ++ ++ spidev0: spi@0 { ++ compatible = "spidev"; ++ reg = <0>; ++ spi-max-frequency = <16000000>; ++ spi-cpha; ++ }; ++ ++ spidev1: spi@1 { ++ compatible = "spidev"; ++ reg = <1>; ++ spi-max-frequency = <16000000>; ++ }; ++}; ++ ++&tscadc { ++ status = "okay"; ++ adc { ++ ti,adc-channels = <4 5 6>; ++ }; ++}; ++ + /include/ "tps65217.dtsi" + + &tps { +@@ -336,3 +427,42 @@ + cd-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>; + cd-inverted; + }; ++ ++/ { ++ ocp { ++ //FIXME: these pwm's still need work, this guild isn't working.. ++ //http://elinux.org/EBC_Exercise_13_Pulse_Width_Modulation ++ pwm_test_P9_14@0 { ++ compatible = "pwm_test"; ++ pwms = <&ehrpwm1 0 500000 1>; ++ pwm-names = "PWM_P9_14"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&ehrpwm1_pin_p9_14>; ++ enabled = <1>; ++ duty = <0>; ++ status = "okay"; ++ }; ++ ++ pwm_test_P9_16@0 { ++ compatible = "pwm_test"; ++ pwms = <&ehrpwm1 0 500000 1>; ++ pwm-names = "PWM_P9_16"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&ehrpwm1_pin_p9_16>; ++ enabled = <1>; ++ duty = <0>; ++ status = "okay"; ++ }; ++ ++ pwm_test_P9_42 { ++ compatible = "pwm_test"; ++ pwms = <&ecap0 0 500000 1>; ++ pwm-names = "PWM_P9_42"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&ecap0_pin_p9_42>; ++ enabled = <1>; ++ duty = <0>; ++ status = "okay"; ++ }; ++ }; ++}; +-- +1.8.5.2 + +From b6e2c817edfc6d73874cf833daffe1be6c7ed8bb Mon Sep 17 00:00:00 2001 +From: Robert Nelson +Date: Thu, 13 Mar 2014 14:18:52 -0500 +Subject: [PATCH] arm: dts: am335x-bone-common: add + uart2_pins/uart4_pins/uart5_pins + +Signed-off-by: Robert Nelson +--- + arch/arm/boot/dts/am335x-bone-common.dtsi | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi +index f85cabc..5270d18 100644 +--- a/arch/arm/boot/dts/am335x-bone-common.dtsi ++++ b/arch/arm/boot/dts/am335x-bone-common.dtsi +@@ -105,6 +105,27 @@ + >; + }; + ++ uart2_pins: pinmux_uart2_pins { ++ pinctrl-single,pins = < ++ 0x150 0x21 /* spi0_sclk.uart2_rxd | MODE1 */ ++ 0x154 0x01 /* spi0_d0.uart2_txd | MODE1 */ ++ >; ++ }; ++ ++ uart4_pins: pinmux_uart4_pins { ++ pinctrl-single,pins = < ++ 0x070 0x26 /* gpmc_wait0.uart4_rxd | MODE6 */ ++ 0x074 0x06 /* gpmc_wpn.uart4_txd | MODE6 */ ++ >; ++ }; ++ ++ uart5_pins: pinmux_uart5_pins { ++ pinctrl-single,pins = < ++ 0x0C4 0x24 /* lcd_data9.uart5_rxd | MODE4 */ ++ 0x0C0 0x04 /* lcd_data8.uart5_txd | MODE4 */ ++ >; ++ }; ++ + clkout2_pin: pinmux_clkout2_pin { + pinctrl-single,pins = < + 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ +-- +1.9.0 + +From 72567452d5d6007010597158f6afd00e2bf07579 Mon Sep 17 00:00:00 2001 +From: Pantelis Antoniou +Date: Sat, 15 Sep 2012 12:00:41 +0300 +Subject: [PATCH] pinctrl: pinctrl-single must be initialized early. + +When using pinctrl-single to handle i2c initialization, it has +to be done early. Whether this is the best way to do so, is an +exercise left to the reader. +--- + drivers/pinctrl/pinctrl-single.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c +index 829b98c..5107dcf 100644 +--- a/drivers/pinctrl/pinctrl-single.c ++++ b/drivers/pinctrl/pinctrl-single.c +@@ -2039,7 +2039,17 @@ static struct platform_driver pcs_driver = { + #endif + }; + +-module_platform_driver(pcs_driver); ++static int __init pcs_init(void) ++{ ++ return platform_driver_register(&pcs_driver); ++} ++postcore_initcall(pcs_init); ++ ++static void __exit pcs_exit(void) ++{ ++ platform_driver_unregister(&pcs_driver); ++} ++module_exit(pcs_exit); + + MODULE_AUTHOR("Tony Lindgren "); + MODULE_DESCRIPTION("One-register-per-pin type device tree based pinctrl driver"); +-- +1.8.5.2 + +From b6e2c817edfc6d73874cf833daffe1be6c7ed8bb Mon Sep 17 00:00:00 2001 +From: Robert Nelson +Date: Thu, 13 Mar 2014 14:18:52 -0500 +Subject: [PATCH] arm: dts: am335x-bone-common: add + uart2_pins/uart4_pins/uart5_pins + +Signed-off-by: Robert Nelson +--- + arch/arm/boot/dts/am335x-bone-common.dtsi | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi +index f85cabc..5270d18 100644 +--- a/arch/arm/boot/dts/am335x-bone-common.dtsi ++++ b/arch/arm/boot/dts/am335x-bone-common.dtsi +@@ -105,6 +105,27 @@ + >; + }; + ++ uart2_pins: pinmux_uart2_pins { ++ pinctrl-single,pins = < ++ 0x150 0x21 /* spi0_sclk.uart2_rxd | MODE1 */ ++ 0x154 0x01 /* spi0_d0.uart2_txd | MODE1 */ ++ >; ++ }; ++ ++ uart4_pins: pinmux_uart4_pins { ++ pinctrl-single,pins = < ++ 0x070 0x26 /* gpmc_wait0.uart4_rxd | MODE6 */ ++ 0x074 0x06 /* gpmc_wpn.uart4_txd | MODE6 */ ++ >; ++ }; ++ ++ uart5_pins: pinmux_uart5_pins { ++ pinctrl-single,pins = < ++ 0x0C4 0x24 /* lcd_data9.uart5_rxd | MODE4 */ ++ 0x0C0 0x04 /* lcd_data8.uart5_txd | MODE4 */ ++ >; ++ }; ++ + clkout2_pin: pinmux_clkout2_pin { + pinctrl-single,pins = < + 0x1b4 (PIN_OUTPUT_PULLDOWN | MUX_MODE3) /* xdma_event_intr1.clkout2 */ +-- +1.9.0 diff --git a/arm-imx6-utilite.patch b/arm-imx6-utilite.patch new file mode 100644 index 000000000..bb0747202 --- /dev/null +++ b/arm-imx6-utilite.patch @@ -0,0 +1,54 @@ +diff --git a/arch/arm/boot/dts/imx6q-cm-fx6.dts b/arch/arm/boot/dts/imx6q-cm-fx6.dts +index 99b46f8..8b6ddd1 100644 +--- a/arch/arm/boot/dts/imx6q-cm-fx6.dts ++++ b/arch/arm/boot/dts/imx6q-cm-fx6.dts +@@ -97,11 +97,49 @@ + MX6QDL_PAD_KEY_ROW0__UART4_RX_DATA 0x1b0b1 + >; + }; ++ ++ pinctrl_usdhc1: usdhc1grp { ++ fsl,pins = < ++ MX6QDL_PAD_SD1_CMD__SD1_CMD 0x17059 ++ MX6QDL_PAD_SD1_CLK__SD1_CLK 0x10059 ++ MX6QDL_PAD_SD1_DAT0__SD1_DATA0 0x17059 ++ MX6QDL_PAD_SD1_DAT1__SD1_DATA1 0x17059 ++ MX6QDL_PAD_SD1_DAT2__SD1_DATA2 0x17059 ++ MX6QDL_PAD_SD1_DAT3__SD1_DATA3 0x17059 ++ >; ++ }; ++ ++ pinctrl_usdhc3: usdhc3grp { ++ fsl,pins = < ++ MX6QDL_PAD_SD3_CMD__SD3_CMD 0x17059 ++ MX6QDL_PAD_SD3_CLK__SD3_CLK 0x10059 ++ MX6QDL_PAD_SD3_DAT0__SD3_DATA0 0x17059 ++ MX6QDL_PAD_SD3_DAT1__SD3_DATA1 0x17059 ++ MX6QDL_PAD_SD3_DAT2__SD3_DATA2 0x17059 ++ MX6QDL_PAD_SD3_DAT3__SD3_DATA3 0x17059 ++ >; ++ }; + }; + }; + ++&sata { ++ status = "okay"; ++}; ++ + &uart4 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart4>; + status = "okay"; + }; ++ ++&usdhc1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_usdhc1>; ++ status = "okay"; ++}; ++ ++&usdhc3 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_usdhc3>; ++ status = "okay"; ++}; diff --git a/config-armv7 b/config-armv7 index e032333b2..e28a01642 100644 --- a/config-armv7 +++ b/config-armv7 @@ -171,6 +171,7 @@ CONFIG_REGULATOR_PALMAS=y CONFIG_REGULATOR_PBIAS=m CONFIG_RTC_DRV_PALMAS=m CONFIG_OMAP5_DSS_HDMI=y +CONFIG_OMAP5_DSS_HDMI_AUDIO=y CONFIG_WL_TI=y CONFIG_WLCORE_SDIO=m @@ -656,6 +657,9 @@ CONFIG_XILINX_VDMA=m CONFIG_SND_SOC_ADI=m CONFIG_SND_SOC_ADI_AXI_I2S=m CONFIG_SND_SOC_ADI_AXI_SPDIF=m +CONFIG_XILLYBUS=m +CONFIG_XILLYBUS_PCIE=m +CONFIG_XILLYBUS_OF=m # Multi function devices CONFIG_MFD_88PM800=m diff --git a/kernel.spec b/kernel.spec index 340a7a9f2..4b5a42990 100644 --- a/kernel.spec +++ b/kernel.spec @@ -600,6 +600,8 @@ Patch15000: nowatchdog-on-virt.patch # ARMv7 Patch21020: arm-tegra-usb-no-reset-linux33.patch +Patch21021: arm-beagle.patch +Patch21022: arm-imx6-utilite.patch #rhbz 754518 Patch21235: scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch @@ -1234,6 +1236,8 @@ ApplyPatch 0001-lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch # ARM # ApplyPatch arm-tegra-usb-no-reset-linux33.patch +ApplyPatch arm-beagle.patch +ApplyPatch arm-imx6-utilite.patch # # bugfixes to drivers and filesystems @@ -2242,6 +2246,10 @@ fi # ||----w | # || || %changelog +* Thu Jul 10 2014 Peter Robinson +- Rebase Utilute and BeagleBone patches +- Minaor ARM updates + * Wed Jul 09 2014 Josh Boyer - 3.16.0-0.rc4.git2.1 - Linux v3.16-rc4-28-g163e40743f73 - Fix bogus vdso .build-id links (rhbz 1117563) From 31f322bef26ce8f380fbd8bdf43ee8f5706b7e1a Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Fri, 11 Jul 2014 10:15:09 +0100 Subject: [PATCH 02/45] fix typo --- kernel.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel.spec b/kernel.spec index 4b5a42990..8bf43adef 100644 --- a/kernel.spec +++ b/kernel.spec @@ -2248,7 +2248,7 @@ fi %changelog * Thu Jul 10 2014 Peter Robinson - Rebase Utilute and BeagleBone patches -- Minaor ARM updates +- Minor ARM updates * Wed Jul 09 2014 Josh Boyer - 3.16.0-0.rc4.git2.1 - Linux v3.16-rc4-28-g163e40743f73 From 55d9b16baaa26daaf5e410aa0b39eb43baf952ce Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Fri, 11 Jul 2014 15:17:32 +0100 Subject: [PATCH 03/45] Enable ISL12057 RTC for ARM (NetGear ReadyNAS) --- config-armv7 | 1 + kernel.spec | 1 + 2 files changed, 2 insertions(+) diff --git a/config-armv7 b/config-armv7 index e28a01642..5b4b2ab42 100644 --- a/config-armv7 +++ b/config-armv7 @@ -44,6 +44,7 @@ CONFIG_PINCTRL_DOVE=y CONFIG_EDAC_MV64X60=m CONFIG_RTC_DRV_S35390A=m CONFIG_RTC_DRV_88PM80X=m +CONFIG_RTC_DRV_ISL12057=m CONFIG_RTC_DRV_MV=m CONFIG_MVNETA=m CONFIG_GPIO_MVEBU=y diff --git a/kernel.spec b/kernel.spec index 8bf43adef..bd05aa910 100644 --- a/kernel.spec +++ b/kernel.spec @@ -2249,6 +2249,7 @@ fi * Thu Jul 10 2014 Peter Robinson - Rebase Utilute and BeagleBone patches - Minor ARM updates +- Enable ISL12057 RTC for ARM (NetGear ReadyNAS) * Wed Jul 09 2014 Josh Boyer - 3.16.0-0.rc4.git2.1 - Linux v3.16-rc4-28-g163e40743f73 From 566922f05faeb16f9aba607a432a4fbe14f26252 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Fri, 11 Jul 2014 10:35:55 -0400 Subject: [PATCH 04/45] Linux v3.16-rc4-120-g85d90faed31e --- kernel.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel.spec b/kernel.spec index bd05aa910..21256a59b 100644 --- a/kernel.spec +++ b/kernel.spec @@ -69,7 +69,7 @@ Summary: The Linux kernel # The rc snapshot level %define rcrev 4 # The git snapshot level -%define gitrev 2 +%define gitrev 3 # Set rpm version accordingly %define rpmversion 3.%{upstream_sublevel}.0 %endif @@ -2246,6 +2246,9 @@ fi # ||----w | # || || %changelog +* Fri Jul 11 2014 Josh Boyer - 3.16.0-0.rc4.git3.1 +- Linux v3.16-rc4-120-g85d90faed31e + * Thu Jul 10 2014 Peter Robinson - Rebase Utilute and BeagleBone patches - Minor ARM updates diff --git a/sources b/sources index fb9a4088e..29c400c6d 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ 97ca1625bb40368dc41b9a7971549071 linux-3.15.tar.xz ef8f4db937f521a7e323ec589536ba25 perf-man-3.15.tar.gz 523886ec26aa36e0a93ab85b9717e2f6 patch-3.16-rc4.xz -c3a9dc73e2e1db849fcf8b7502c742a7 patch-3.16-rc4-git2.xz +83e7078f6b073f123f1de849a73a1a95 patch-3.16-rc4-git3.xz From e10ca618501e67503dedab7bc60019cae73adc11 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Fri, 11 Jul 2014 12:28:27 -0400 Subject: [PATCH 05/45] Drop intel pstate patches. Fixup arm64 patch --- intel_pstate-Fix-setting-VID.patch | 133 -------------- ...tion-of-max-min_perf_pct-sysfs-files.patch | 97 ----------- ...bit-if-turbo-disabled-or-unavailable.patch | 163 ------------------ kernel-arm64.patch | 139 +-------------- kernel.spec | 8 - 5 files changed, 3 insertions(+), 537 deletions(-) delete mode 100644 intel_pstate-Fix-setting-VID.patch delete mode 100644 intel_pstate-Update-documentation-of-max-min_perf_pct-sysfs-files.patch delete mode 100644 intel_pstate-dont-touch-turbo-bit-if-turbo-disabled-or-unavailable.patch diff --git a/intel_pstate-Fix-setting-VID.patch b/intel_pstate-Fix-setting-VID.patch deleted file mode 100644 index a71432c59..000000000 --- a/intel_pstate-Fix-setting-VID.patch +++ /dev/null @@ -1,133 +0,0 @@ - -Delivered-To: jwboyer@gmail.com -Received: by 10.76.6.212 with SMTP id d20csp423274oaa; - Fri, 20 Jun 2014 07:30:34 -0700 (PDT) -X-Received: by 10.66.141.165 with SMTP id rp5mr5252763pab.90.1403274633343; - Fri, 20 Jun 2014 07:30:33 -0700 (PDT) -Return-Path: -Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) - by mx.google.com with ESMTP id xz4si10079103pac.71.2014.06.20.07.29.38 - for ; - Fri, 20 Jun 2014 07:30:33 -0700 (PDT) -Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; -Authentication-Results: mx.google.com; - spf=neutral (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) smtp.mail=stable-owner@vger.kernel.org; - dkim=neutral (body hash did not verify) header.i=@; - dmarc=fail (p=NONE dis=NONE) header.from=gmail.com -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S1752826AbaFTO2N (ORCPT + 73 others); - Fri, 20 Jun 2014 10:28:13 -0400 -Received: from mail-pb0-f42.google.com ([209.85.160.42]:38213 "EHLO - mail-pb0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org - with ESMTP id S1752069AbaFTO2M (ORCPT - ); Fri, 20 Jun 2014 10:28:12 -0400 -Received: by mail-pb0-f42.google.com with SMTP id ma3so3196581pbc.29 - for ; Fri, 20 Jun 2014 07:28:11 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20120113; - h=from:to:cc:subject:date:message-id:in-reply-to:references; - bh=9oo+zXKxjbr7v1snerKTk1H7F9TqWZtlTUz/dYa9Mtc=; - b=dYHB8IsNt7nWot8Da4/spNLtKjWeMlpQv+LpR+c7Y8DUuJe1lcMqt6NeLHZcOBUv2Y - Y6Bw8IIE3DYaVUFzakB2oBRCHaQJwqERAb0+y8zVt4lkxRh6AOjeR6coDk9oE8sDQmkN - zZzv3mR6rd2sE6CkRFwkJUJgHRd5DgluDU96k7OKLEzJpuq+6BrvwPto8TU6ZMkmQiqj - pRP0ics6FdaE7GtFE6XmEjGYSnsAFzUn8ycgFPjZU39PhkhTDottomejlUEEs8NORxn3 - eYxzh48Ae/P9JTgydBpMpUkpsb+86akHDWoTWG3z6D6mwCzFl9dNmUL43j/ONVjf6pPh - wopw== -X-Received: by 10.66.122.70 with SMTP id lq6mr5211252pab.51.1403274491745; - Fri, 20 Jun 2014 07:28:11 -0700 (PDT) -Received: from echolake.localdomain (static-50-43-41-81.bvtn.or.frontiernet.net. [50.43.41.81]) - by mx.google.com with ESMTPSA id vx10sm44287848pac.17.2014.06.20.07.28.09 - for - (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); - Fri, 20 Jun 2014 07:28:10 -0700 (PDT) -From: dirk.brandewie@gmail.com -X-Google-Original-From: dirk.j.brandewie@intel.com -To: linux-pm@vger.kernel.org -Cc: rjw@rjwysocki.net, dirk.brandewie@gmail.com, - stable@vger.kernel.org, Dirk Brandewie -Subject: [PATCH 1/3] intel_pstate: Fix setting VID -Date: Fri, 20 Jun 2014 07:27:58 -0700 -Message-Id: <1403274480-10593-2-git-send-email-dirk.j.brandewie@intel.com> -X-Mailer: git-send-email 1.9.0 -In-Reply-To: <1403274480-10593-1-git-send-email-dirk.j.brandewie@intel.com> -References: <1403274480-10593-1-git-send-email-dirk.j.brandewie@intel.com> -Sender: stable-owner@vger.kernel.org -Precedence: bulk -List-ID: -X-Mailing-List: stable@vger.kernel.org - -From: Dirk Brandewie - -Commit 21855ff5 intel_pstate: Set turbo VID for BayTrail introduced -setting the turbo VID which is required to prevent a machine check on -some Baytrail SKUs under heavy graphics based workloads. The -docmumentation update that brought the requirement to light also -changed the bit mask used for enumerating P state and VID values from -0x7f to 0x3f. - -This change returns the mask value to 0x7f. - -Tested with the Intel NUC DN2820FYK, -BIOS version FYBYT10H.86A.0034.2014.0513.1413 with v3.16-rc1 and -v3.14.8 kernel versions. - -Reported-by: Rune Reterson -Reported-by: Eric Eickmeyer -Tested-by: Rune Reterson -Tested-by: Eric Eickmeyer - -References: https://bugzilla.kernel.org/show_bug.cgi?id=77951 - -Cc: Cc: Stable [3.13+] -Signed-off-by: Dirk Brandewie ---- - drivers/cpufreq/intel_pstate.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c -index 924bb2d..74376d6 100644 ---- a/drivers/cpufreq/intel_pstate.c -+++ b/drivers/cpufreq/intel_pstate.c -@@ -357,21 +357,21 @@ static int byt_get_min_pstate(void) - { - u64 value; - rdmsrl(BYT_RATIOS, value); -- return (value >> 8) & 0x3F; -+ return (value >> 8) & 0x7F; - } - - static int byt_get_max_pstate(void) - { - u64 value; - rdmsrl(BYT_RATIOS, value); -- return (value >> 16) & 0x3F; -+ return (value >> 16) & 0x7F; - } - - static int byt_get_turbo_pstate(void) - { - u64 value; - rdmsrl(BYT_TURBO_RATIOS, value); -- return value & 0x3F; -+ return value & 0x7F; - } - - static void byt_set_pstate(struct cpudata *cpudata, int pstate) -@@ -405,8 +405,8 @@ static void byt_get_vid(struct cpudata *cpudata) - - - rdmsrl(BYT_VIDS, value); -- cpudata->vid.min = int_tofp((value >> 8) & 0x3f); -- cpudata->vid.max = int_tofp((value >> 16) & 0x3f); -+ cpudata->vid.min = int_tofp((value >> 8) & 0x7f); -+ cpudata->vid.max = int_tofp((value >> 16) & 0x7f); - cpudata->vid.ratio = div_fp( - cpudata->vid.max - cpudata->vid.min, - int_tofp(cpudata->pstate.max_pstate - --- -1.9.0 - --- -To unsubscribe from this list: send the line "unsubscribe stable" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/intel_pstate-Update-documentation-of-max-min_perf_pct-sysfs-files.patch b/intel_pstate-Update-documentation-of-max-min_perf_pct-sysfs-files.patch deleted file mode 100644 index 304b6009b..000000000 --- a/intel_pstate-Update-documentation-of-max-min_perf_pct-sysfs-files.patch +++ /dev/null @@ -1,97 +0,0 @@ - -Delivered-To: jwboyer@gmail.com -Received: by 10.76.6.212 with SMTP id d20csp423275oaa; - Fri, 20 Jun 2014 07:30:34 -0700 (PDT) -X-Received: by 10.68.190.98 with SMTP id gp2mr5272210pbc.88.1403274634321; - Fri, 20 Jun 2014 07:30:34 -0700 (PDT) -Return-Path: -Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) - by mx.google.com with ESMTP id hp1si10074557pad.83.2014.06.20.07.29.43 - for ; - Fri, 20 Jun 2014 07:30:34 -0700 (PDT) -Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; -Authentication-Results: mx.google.com; - spf=neutral (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) smtp.mail=stable-owner@vger.kernel.org; - dkim=neutral (body hash did not verify) header.i=@; - dmarc=fail (p=NONE dis=NONE) header.from=gmail.com -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S1752837AbaFTO2Q (ORCPT + 73 others); - Fri, 20 Jun 2014 10:28:16 -0400 -Received: from mail-pa0-f44.google.com ([209.85.220.44]:49238 "EHLO - mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org - with ESMTP id S1752834AbaFTO2P (ORCPT - ); Fri, 20 Jun 2014 10:28:15 -0400 -Received: by mail-pa0-f44.google.com with SMTP id rd3so3177765pab.17 - for ; Fri, 20 Jun 2014 07:28:15 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20120113; - h=from:to:cc:subject:date:message-id:in-reply-to:references; - bh=rsR1AnYOOFONegcKUuZzrIkP/Fwwpd8RySrcXDcatYE=; - b=H8hEI3Sg3lQRMr4ADxJtNpRGhyOTkP+gFC3du64xhLqVHicLrvtD06Wz7Vv0AowO52 - JpoocTnE8lUQvSMqev+LIh83DoFZxvYqrWqv0815LcZATxquRCPfNw8py9uTm3o0ABIy - PhXPM7UO278Ov67fqu63akRwHfrgtd22iXkHcn68ZqbTvdfo/jJlMcgRVoysP8XNPoIV - FZ4uVsHsjcx77zgA6A8t22vG5eozHRabvcvyxAp8eC/GwSjlWRFN7ETD28w4muvZcbFm - PFDieDk7detiTEqFyXncStI0i81Ezun+IyWnPnI1EOqPXKLoFaUiyxmw6Z7iOWLs0166 - NLoA== -X-Received: by 10.68.193.100 with SMTP id hn4mr5166204pbc.50.1403274495186; - Fri, 20 Jun 2014 07:28:15 -0700 (PDT) -Received: from echolake.localdomain (static-50-43-41-81.bvtn.or.frontiernet.net. [50.43.41.81]) - by mx.google.com with ESMTPSA id vx10sm44287848pac.17.2014.06.20.07.28.13 - for - (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); - Fri, 20 Jun 2014 07:28:13 -0700 (PDT) -From: dirk.brandewie@gmail.com -X-Google-Original-From: dirk.j.brandewie@intel.com -To: linux-pm@vger.kernel.org -Cc: rjw@rjwysocki.net, dirk.brandewie@gmail.com, - stable@vger.kernel.org, Dirk Brandewie -Subject: [PATCH 3/3] intel_pstate: Update documentation of {max,min}_perf_pct sysfs files -Date: Fri, 20 Jun 2014 07:28:00 -0700 -Message-Id: <1403274480-10593-4-git-send-email-dirk.j.brandewie@intel.com> -X-Mailer: git-send-email 1.9.0 -In-Reply-To: <1403274480-10593-1-git-send-email-dirk.j.brandewie@intel.com> -References: <1403274480-10593-1-git-send-email-dirk.j.brandewie@intel.com> -Sender: stable-owner@vger.kernel.org -Precedence: bulk -List-ID: -X-Mailing-List: stable@vger.kernel.org - -From: Dirk Brandewie - -Update documentation to make the interpretation of the values clearer - -References: https://bugzilla.kernel.org/show_bug.cgi?id=64251 - -Cc: Stable [3.13+] -Signed-off-by: Dirk Brandewie ---- - Documentation/cpu-freq/intel-pstate.txt | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/Documentation/cpu-freq/intel-pstate.txt b/Documentation/cpu-freq/intel-pstate.txt -index e742d21..a69ffe1 100644 ---- a/Documentation/cpu-freq/intel-pstate.txt -+++ b/Documentation/cpu-freq/intel-pstate.txt -@@ -15,10 +15,13 @@ New sysfs files for controlling P state selection have been added to - /sys/devices/system/cpu/intel_pstate/ - - max_perf_pct: limits the maximum P state that will be requested by -- the driver stated as a percentage of the available performance. -+ the driver stated as a percentage of the available performance. The -+ available (P states) performance may be reduced by the no_turbo -+ setting described below. - - min_perf_pct: limits the minimum P state that will be requested by -- the driver stated as a percentage of the available performance. -+ the driver stated as a percentage of the max (non-turbo) -+ performance level. - - no_turbo: limits the driver to selecting P states below the turbo - frequency range. --- -1.9.0 - --- -To unsubscribe from this list: send the line "unsubscribe stable" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/intel_pstate-dont-touch-turbo-bit-if-turbo-disabled-or-unavailable.patch b/intel_pstate-dont-touch-turbo-bit-if-turbo-disabled-or-unavailable.patch deleted file mode 100644 index 5d66cbb88..000000000 --- a/intel_pstate-dont-touch-turbo-bit-if-turbo-disabled-or-unavailable.patch +++ /dev/null @@ -1,163 +0,0 @@ - -Delivered-To: jwboyer@gmail.com -Received: by 10.76.6.212 with SMTP id d20csp423277oaa; - Fri, 20 Jun 2014 07:30:35 -0700 (PDT) -X-Received: by 10.68.139.36 with SMTP id qv4mr5223355pbb.82.1403274634649; - Fri, 20 Jun 2014 07:30:34 -0700 (PDT) -Return-Path: -Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) - by mx.google.com with ESMTP id qv2si9954447pbb.188.2014.06.20.07.29.40 - for ; - Fri, 20 Jun 2014 07:30:34 -0700 (PDT) -Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; -Authentication-Results: mx.google.com; - spf=neutral (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) smtp.mail=stable-owner@vger.kernel.org; - dkim=neutral (body hash did not verify) header.i=@; - dmarc=fail (p=NONE dis=NONE) header.from=gmail.com -Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand - id S1752836AbaFTO2P (ORCPT + 73 others); - Fri, 20 Jun 2014 10:28:15 -0400 -Received: from mail-pb0-f51.google.com ([209.85.160.51]:46198 "EHLO - mail-pb0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org - with ESMTP id S1752834AbaFTO2N (ORCPT - ); Fri, 20 Jun 2014 10:28:13 -0400 -Received: by mail-pb0-f51.google.com with SMTP id rp16so3192728pbb.10 - for ; Fri, 20 Jun 2014 07:28:13 -0700 (PDT) -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=20120113; - h=from:to:cc:subject:date:message-id:in-reply-to:references; - bh=d4snuLkO7yJL099uI4N/+0VV5Rt4O8Cw+AAMmj8igq8=; - b=Hmy0dMfQu3uRTZzAq3zGf2sfVMhRUxySItx4tChAq3aaQAehBA+1vqEHeiQ6ZNpXrD - BJfbmvByR/d4G55woGKZbyOPL/t5XzkVVUuefHgKvEDjWbHns/RYax+lgRFI4Cb1aLEe - 4u1/8cZ29BpFQ/yVW2D6/K6uwcJ6MQRK8lZISKjf/9oxZLg6vEeR4JGC70qo6yDHeUlu - VUQ3RrvKJ7NQw2nXTxAPuAvNEd+JCbKp6zO6gi6jET5vAQnevlrx+LxMjKssXI+QjXsH - N11ImMdOmbmBUgEIkFctpViP+fOFMTfkwIMh05FSQZtcy3NVF5kEUHR8N3B2klbGBYln - TJ8w== -X-Received: by 10.68.133.163 with SMTP id pd3mr5111437pbb.166.1403274493273; - Fri, 20 Jun 2014 07:28:13 -0700 (PDT) -Received: from echolake.localdomain (static-50-43-41-81.bvtn.or.frontiernet.net. [50.43.41.81]) - by mx.google.com with ESMTPSA id vx10sm44287848pac.17.2014.06.20.07.28.11 - for - (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); - Fri, 20 Jun 2014 07:28:12 -0700 (PDT) -From: dirk.brandewie@gmail.com -X-Google-Original-From: dirk.j.brandewie@intel.com -To: linux-pm@vger.kernel.org -Cc: rjw@rjwysocki.net, dirk.brandewie@gmail.com, - stable@vger.kernel.org, Dirk Brandewie -Subject: [PATCH 2/3] intel_pstate: don't touch turbo bit if turbo disabled or unavailable. -Date: Fri, 20 Jun 2014 07:27:59 -0700 -Message-Id: <1403274480-10593-3-git-send-email-dirk.j.brandewie@intel.com> -X-Mailer: git-send-email 1.9.0 -In-Reply-To: <1403274480-10593-1-git-send-email-dirk.j.brandewie@intel.com> -References: <1403274480-10593-1-git-send-email-dirk.j.brandewie@intel.com> -Sender: stable-owner@vger.kernel.org -Precedence: bulk -List-ID: -X-Mailing-List: stable@vger.kernel.org - -From: Dirk Brandewie - -If turbo is disabled in the BIOS bit 38 should be set in -MSR_IA32_MISC_ENABLE register per section 14.3.2.1 of the SDM Vol 3 -document 325384-050US Feb 2014. If this bit is set do *not* attempt -to disable trubo via the MSR_IA32_PERF_CTL register. On some systems -trying to disable turbo via MSR_IA32_PERF_CTL will cause subsequent -writes to MSR_IA32_PERF_CTL not take affect, in fact reading -MSR_IA32_PERF_CTL will not show the IDA/Turbo DISENGAGE bit(32) as -set. A write of bit 32 to zero returns to normal operation. - -Also deal with the case where the processor does not support -turbo and the BIOS does not report the fact in MSR_IA32_MISC_ENABLE -but does report the max and turbo P states as the same value. - -References: https://bugzilla.kernel.org/show_bug.cgi?id=64251 - -Cc: Stable [3.13+] -Signed-off-by: Dirk Brandewie ---- - drivers/cpufreq/intel_pstate.c | 22 ++++++++++++++++------ - 1 file changed, 16 insertions(+), 6 deletions(-) - -diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c -index 74376d6..127ead8 100644 ---- a/drivers/cpufreq/intel_pstate.c -+++ b/drivers/cpufreq/intel_pstate.c -@@ -128,6 +128,7 @@ static struct pstate_funcs pstate_funcs; - - struct perf_limits { - int no_turbo; -+ int turbo_disabled; - int max_perf_pct; - int min_perf_pct; - int32_t max_perf; -@@ -287,7 +288,10 @@ static ssize_t store_no_turbo(struct kobject *a, struct attribute *b, - if (ret != 1) - return -EINVAL; - limits.no_turbo = clamp_t(int, input, 0 , 1); -- -+ if (limits.turbo_disabled) { -+ pr_warn("Turbo disabled by BIOS or unavailable on processor\n"); -+ limits.no_turbo = limits.turbo_disabled; -+ } - return count; - } - -@@ -381,7 +385,7 @@ static void byt_set_pstate(struct cpudata *cpudata, int pstate) - u32 vid; - - val = pstate << 8; -- if (limits.no_turbo) -+ if (limits.no_turbo && !limits.turbo_disabled) - val |= (u64)1 << 32; - - vid_fp = cpudata->vid.min + mul_fp( -@@ -448,7 +452,7 @@ static void core_set_pstate(struct cpudata *cpudata, int pstate) - u64 val; - - val = pstate << 8; -- if (limits.no_turbo) -+ if (limits.no_turbo && !limits.turbo_disabled) - val |= (u64)1 << 32; - - wrmsrl_on_cpu(cpudata->cpu, MSR_IA32_PERF_CTL, val); -@@ -741,7 +745,7 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy) - limits.min_perf = int_tofp(1); - limits.max_perf_pct = 100; - limits.max_perf = int_tofp(1); -- limits.no_turbo = 0; -+ limits.no_turbo = limits.turbo_disabled; - return 0; - } - limits.min_perf_pct = (policy->min * 100) / policy->cpuinfo.max_freq; -@@ -784,6 +788,7 @@ static int intel_pstate_cpu_init(struct cpufreq_policy *policy) - { - struct cpudata *cpu; - int rc; -+ u64 misc_en; - - rc = intel_pstate_init_cpu(policy->cpu); - if (rc) -@@ -791,8 +796,13 @@ static int intel_pstate_cpu_init(struct cpufreq_policy *policy) - - cpu = all_cpu_data[policy->cpu]; - -- if (!limits.no_turbo && -- limits.min_perf_pct == 100 && limits.max_perf_pct == 100) -+ rdmsrl(MSR_IA32_MISC_ENABLE, misc_en); -+ if (misc_en & MSR_IA32_MISC_ENABLE_TURBO_DISABLE || -+ cpu->pstate.max_pstate == cpu->pstate.turbo_pstate) { -+ limits.turbo_disabled = 1; -+ limits.no_turbo = 1; -+ } -+ if (limits.min_perf_pct == 100 && limits.max_perf_pct == 100) - policy->policy = CPUFREQ_POLICY_PERFORMANCE; - else - policy->policy = CPUFREQ_POLICY_POWERSAVE; --- -1.9.0 - --- -To unsubscribe from this list: send the line "unsubscribe stable" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/kernel-arm64.patch b/kernel-arm64.patch index 05249a97e..1a0154ffd 100644 --- a/kernel-arm64.patch +++ b/kernel-arm64.patch @@ -623,26 +623,6 @@ Date: Mon Jun 2 05:18:35 2014 -0700 Signed-off-by: Saurabh Tangri Signed-off-by: Matt Fleming -commit 026545c8ed8737f6686036326a80498ae14d7fe5 -Author: Suman Tripathi -Date: Thu Jun 19 06:51:32 2014 -0400 - - ata: Fix the dma state machine lockup for the IDENTIFY DEVICE PIO mode command. - - This patch fixes the dma state machine lockup due to the processing - of IDENTIFY DEVICE PIO mode command. The X-Gene AHCI controller - has an errata in which it cannot clear the BSY bit after - receiving the PIO setup FIS and results the dma state machine to go - into the CMFatalErrorUpdate state resulting in the dma state - machine lockup. This patch also removes the dma restart workaround - from the read_id function as the read_id function is only called by - libata layer for ATA_INTERNAL commands. But for somecases eg: - PORT MULTIPLIER and udev, the framework will enumerate using SCSI - commands and it will not call read_id function. - - Signed-off-by: Loc Ho - Signed-off-by: Suman Tripathi - commit 7750926fa769afc57a2d9ea4491e83b3d3e1e562 Author: Suman Tripathi Date: Thu Jun 19 06:50:08 2014 -0400 @@ -2828,131 +2808,18 @@ index 0000000..1b9c4c3 + return !!acpi_gbl_reduced_hardware; +} diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h -index 05882e4..1db67a7 100644 +index 5513296e5e2e..89b8646b912b 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h -@@ -373,6 +373,8 @@ int ahci_do_softreset(struct ata_link *link, unsigned int *class, - +@@ -375,6 +375,8 @@ unsigned int ahci_qc_issue(struct ata_queued_cmd *qc); int ahci_stop_engine(struct ata_port *ap); + void ahci_start_fis_rx(struct ata_port *ap); void ahci_start_engine(struct ata_port *ap); +int ahci_restart_engine(struct ata_port *ap); +void ahci_sw_activity(struct ata_link *link); int ahci_check_ready(struct ata_link *link); int ahci_kick_engine(struct ata_port *ap); int ahci_port_resume(struct ata_port *ap); -diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c -index 042a9bb..81fbdc9 100644 ---- a/drivers/ata/ahci_xgene.c -+++ b/drivers/ata/ahci_xgene.c -@@ -78,6 +78,7 @@ - struct xgene_ahci_context { - struct ahci_host_priv *hpriv; - struct device *dev; -+ u8 last_cmd[MAX_AHCI_CHN_PERCTR]; /* tracking the last command */ - void __iomem *csr_core; /* Core CSR address of IP */ - void __iomem *csr_diag; /* Diag CSR address of IP */ - void __iomem *csr_axi; /* AXI CSR address of IP */ -@@ -98,20 +99,72 @@ static int xgene_ahci_init_memram(struct xgene_ahci_context *ctx) - } - - /** -+ * xgene_ahci_qc_issue - Issue commands to the device -+ * @qc: Command to issue -+ * -+ * Due to H/W errata, for the IENTIFY DEVICE command -+ * controller is unable to clear the BSY bit after -+ * receiving the PIO setup FIS and results the dma -+ * state machine to go into the CMFatalErrorUpdate -+ * state resulting in the dma state machine lockup. -+ * By restarting the dma engine to move it removes -+ * the controller out of lock up state. -+ */ -+static unsigned int xgene_ahci_qc_issue(struct ata_queued_cmd *qc) -+{ -+ struct ata_port *ap = qc->ap; -+ void __iomem *port_mmio = ahci_port_base(ap); -+ struct ahci_port_priv *pp = ap->private_data; -+ struct ahci_host_priv *hpriv = ap->host->private_data; -+ struct xgene_ahci_context *ctx = hpriv->plat_data; -+ -+ /* Keep track of the currently active link. It will be used -+ * in completion path to determine whether NCQ phase is in -+ * progress. -+ */ -+ pp->active_link = qc->dev->link; -+ -+ /* -+ * Restart the dma engine if the last cmd issued -+ * is IDENTIFY DEVICE command -+ */ -+ if (unlikely(ctx->last_cmd[ap->port_no] == ATA_CMD_ID_ATA)) -+ ahci_restart_engine(ap); -+ -+ if (qc->tf.protocol == ATA_PROT_NCQ) -+ writel(1 << qc->tag, port_mmio + PORT_SCR_ACT); -+ -+ if (pp->fbs_enabled && pp->fbs_last_dev != qc->dev->link->pmp) { -+ u32 fbs = readl(port_mmio + PORT_FBS); -+ fbs &= ~(PORT_FBS_DEV_MASK | PORT_FBS_DEC); -+ fbs |= qc->dev->link->pmp << PORT_FBS_DEV_OFFSET; -+ writel(fbs, port_mmio + PORT_FBS); -+ pp->fbs_last_dev = qc->dev->link->pmp; -+ } -+ -+ writel(1 << qc->tag, port_mmio + PORT_CMD_ISSUE); -+ -+ /* Save the last command issued */ -+ ctx->last_cmd[ap->port_no] = qc->tf.command; -+ -+ ahci_sw_activity(qc->dev->link); -+ -+ return 0; -+} -+ -+/** - * xgene_ahci_read_id - Read ID data from the specified device - * @dev: device - * @tf: proposed taskfile - * @id: data buffer - * - * This custom read ID function is required due to the fact that the HW -- * does not support DEVSLP and the controller state machine may get stuck -- * after processing the ID query command. -+ * does not support DEVSLP. - */ - static unsigned int xgene_ahci_read_id(struct ata_device *dev, - struct ata_taskfile *tf, u16 *id) - { - u32 err_mask; -- void __iomem *port_mmio = ahci_port_base(dev->link->ap); - - err_mask = ata_do_dev_read_id(dev, tf, id); - if (err_mask) -@@ -133,16 +186,6 @@ static unsigned int xgene_ahci_read_id(struct ata_device *dev, - */ - id[ATA_ID_FEATURE_SUPP] &= ~(1 << 8); - -- /* -- * Due to HW errata, restart the port if no other command active. -- * Otherwise the controller may get stuck. -- */ -- if (!readl(port_mmio + PORT_CMD_ISSUE)) { -- writel(PORT_CMD_FIS_RX, port_mmio + PORT_CMD); -- readl(port_mmio + PORT_CMD); /* Force a barrier */ -- writel(PORT_CMD_FIS_RX | PORT_CMD_START, port_mmio + PORT_CMD); -- readl(port_mmio + PORT_CMD); /* Force a barrier */ -- } - return 0; - } - -@@ -300,6 +343,7 @@ static struct ata_port_operations xgene_ahci_ops = { - .host_stop = xgene_ahci_host_stop, - .hardreset = xgene_ahci_hardreset, - .read_id = xgene_ahci_read_id, -+ .qc_issue = xgene_ahci_qc_issue, - }; - - static const struct ata_port_info xgene_ahci_port_info = { diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index 40ea583..3ec5dc7 100644 --- a/drivers/ata/libahci.c diff --git a/kernel.spec b/kernel.spec index 21256a59b..f52266ce3 100644 --- a/kernel.spec +++ b/kernel.spec @@ -631,10 +631,6 @@ Patch26005: eeepc-wmi-Add-no-backlight-quirk-for-Asus-H87I-PLUS-.patch Patch26013: acpi-video-Add-use-native-backlight-quirk-for-the-Th.patch Patch26014: acpi-video-Add-use_native_backlight-quirk-for-HP-Pro.patch -Patch25102: intel_pstate-Fix-setting-VID.patch -Patch25103: intel_pstate-dont-touch-turbo-bit-if-turbo-disabled-or-unavailable.patch -Patch25104: intel_pstate-Update-documentation-of-max-min_perf_pct-sysfs-files.patch - Patch25109: revert-input-wacom-testing-result-shows-get_report-is-unnecessary.patch #rhbz 1021036, submitted upstream @@ -1357,10 +1353,6 @@ ApplyPatch eeepc-wmi-Add-no-backlight-quirk-for-Asus-H87I-PLUS-.patch ApplyPatch acpi-video-Add-use-native-backlight-quirk-for-the-Th.patch ApplyPatch acpi-video-Add-use_native_backlight-quirk-for-HP-Pro.patch -ApplyPatch intel_pstate-Fix-setting-VID.patch -ApplyPatch intel_pstate-dont-touch-turbo-bit-if-turbo-disabled-or-unavailable.patch -ApplyPatch intel_pstate-Update-documentation-of-max-min_perf_pct-sysfs-files.patch - ApplyPatch revert-input-wacom-testing-result-shows-get_report-is-unnecessary.patch #rhbz 1021036, submitted upstream From 1e17b30367b8bf801de5a498b4739cdd5408f255 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Sat, 12 Jul 2014 18:37:53 -0400 Subject: [PATCH 06/45] fix license handling. no build here, it can wait for the next kernel build to be applied --- kernel.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel.spec b/kernel.spec index f52266ce3..1b50f1d1c 100644 --- a/kernel.spec +++ b/kernel.spec @@ -2175,6 +2175,8 @@ fi %if %{1}\ %{expand:%%files -f kernel-%{?2:%{2}-}core.list %{?2:%{2}-}core}\ %defattr(-,root,root)\ +%{!?_licensedir:%global license %%doc}\ +%license linux-%{KVERREL}/COPYING\ /%{image_install_path}/%{?-k:%{-k*}}%{!?-k:vmlinuz}-%{KVERREL}%{?2:+%{2}}\ /%{image_install_path}/.vmlinuz-%{KVERREL}%{?2:+%{2}}.hmac \ %ifarch %{arm} aarch64\ @@ -2238,6 +2240,9 @@ fi # ||----w | # || || %changelog +* Sat Jul 12 2014 Tom Callaway +- Fix license handling (I hope) + * Fri Jul 11 2014 Josh Boyer - 3.16.0-0.rc4.git3.1 - Linux v3.16-rc4-120-g85d90faed31e From 1b96f577c5be303b4ce1bb803773f1965b296e3a Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Mon, 14 Jul 2014 09:39:24 -0400 Subject: [PATCH 07/45] Linux v3.16-rc5 - Fix i915 regression with external monitors (rhbz 1117008) - Disable debugging options. --- ...reverse-dp-link-param-selection-pref.patch | 43 +++++++ config-generic | 6 +- config-nodebug | 118 +++++++++--------- config-x86-generic | 2 +- kernel.spec | 17 ++- sources | 3 +- 6 files changed, 121 insertions(+), 68 deletions(-) create mode 100644 Revert-drm-i915-reverse-dp-link-param-selection-pref.patch diff --git a/Revert-drm-i915-reverse-dp-link-param-selection-pref.patch b/Revert-drm-i915-reverse-dp-link-param-selection-pref.patch new file mode 100644 index 000000000..25aff2f13 --- /dev/null +++ b/Revert-drm-i915-reverse-dp-link-param-selection-pref.patch @@ -0,0 +1,43 @@ +Bugzilla: 1117008 +Upstream-status: Sent to intel-gfx + +From b22370f0cf68e49ddcb3dd7033aba5ff6454dfcc Mon Sep 17 00:00:00 2001 +From: Dave Airlie +Date: Mon, 14 Jul 2014 10:54:20 +1000 +Subject: [PATCH] Revert "drm/i915: reverse dp link param selection, prefer + fast over wide again" + +This reverts commit 38aecea0ccbb909d635619cba22f1891e589b434. + +This breaks Haswell Thinkpad + Lenovo dock in SST mode with a HDMI monitor attached. + +Before this we can 1920x1200 mode, after this we only ever get 1024x768, and +a lot of deferring. + +This didn't revert clean, but this should be fine. + +bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1117008 +Cc: stable@vger.kernel.org # v3.15 +Signed-off-by: Dave Airlie +--- + drivers/gpu/drm/i915/intel_dp.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c +index 2a00cb8..61963d3 100644 +--- a/drivers/gpu/drm/i915/intel_dp.c ++++ b/drivers/gpu/drm/i915/intel_dp.c +@@ -833,8 +833,8 @@ intel_dp_compute_config(struct intel_encoder *encoder, + mode_rate = intel_dp_link_required(adjusted_mode->crtc_clock, + bpp); + +- for (lane_count = min_lane_count; lane_count <= max_lane_count; lane_count <<= 1) { +- for (clock = min_clock; clock <= max_clock; clock++) { ++ for (clock = min_clock; clock <= max_clock; clock++) { ++ for (lane_count = min_lane_count; lane_count <= max_lane_count; lane_count <<= 1) { + link_clock = drm_dp_bw_code_to_link_rate(bws[clock]); + link_avail = intel_dp_max_data_rate(link_clock, + lane_count); +-- +1.9.3 + diff --git a/config-generic b/config-generic index c6adc57dd..f2f6f2767 100644 --- a/config-generic +++ b/config-generic @@ -1695,13 +1695,13 @@ CONFIG_B43_SDIO=y CONFIG_B43_BCMA=y # CONFIG_B43_BCMA_EXTRA is not set CONFIG_B43_BCMA_PIO=y -CONFIG_B43_DEBUG=y +# CONFIG_B43_DEBUG is not set CONFIG_B43_PHY_LP=y CONFIG_B43_PHY_N=y CONFIG_B43_PHY_HT=y # CONFIG_B43_FORCE_PIO is not set CONFIG_B43LEGACY=m -CONFIG_B43LEGACY_DEBUG=y +# CONFIG_B43LEGACY_DEBUG is not set CONFIG_B43LEGACY_DMA=y CONFIG_B43LEGACY_PIO=y CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y @@ -4641,7 +4641,7 @@ CONFIG_PM_DEBUG=y # CONFIG_DPM_WATCHDOG is not set # revisit this in debug CONFIG_PM_TRACE=y CONFIG_PM_TRACE_RTC=y -CONFIG_PM_TEST_SUSPEND=y +# CONFIG_PM_TEST_SUSPEND is not set CONFIG_PM_RUNTIME=y # CONFIG_PM_OPP is not set # CONFIG_PM_AUTOSLEEP is not set diff --git a/config-nodebug b/config-nodebug index 360f418d4..e16a37b57 100644 --- a/config-nodebug +++ b/config-nodebug @@ -2,101 +2,101 @@ CONFIG_SND_VERBOSE_PRINTK=y CONFIG_SND_DEBUG=y CONFIG_SND_PCM_XRUN_DEBUG=y -CONFIG_DEBUG_ATOMIC_SLEEP=y +# CONFIG_DEBUG_ATOMIC_SLEEP is not set -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y -CONFIG_DEBUG_RT_MUTEXES=y -CONFIG_DEBUG_LOCK_ALLOC=y -CONFIG_LOCK_TORTURE_TEST=m -CONFIG_PROVE_LOCKING=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_PROVE_RCU=y +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_LOCK_TORTURE_TEST is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_PROVE_RCU is not set # CONFIG_PROVE_RCU_REPEATEDLY is not set -CONFIG_DEBUG_PER_CPU_MAPS=y +# CONFIG_DEBUG_PER_CPU_MAPS is not set CONFIG_CPUMASK_OFFSTACK=y -CONFIG_CPU_NOTIFIER_ERROR_INJECT=m +# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set -CONFIG_FAULT_INJECTION=y -CONFIG_FAILSLAB=y -CONFIG_FAIL_PAGE_ALLOC=y -CONFIG_FAIL_MAKE_REQUEST=y -CONFIG_FAULT_INJECTION_DEBUG_FS=y -CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y -CONFIG_FAIL_IO_TIMEOUT=y -CONFIG_FAIL_MMC_REQUEST=y +# CONFIG_FAULT_INJECTION is not set +# CONFIG_FAILSLAB is not set +# CONFIG_FAIL_PAGE_ALLOC is not set +# CONFIG_FAIL_MAKE_REQUEST is not set +# CONFIG_FAULT_INJECTION_DEBUG_FS is not set +# CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set +# CONFIG_FAIL_IO_TIMEOUT is not set +# CONFIG_FAIL_MMC_REQUEST is not set -CONFIG_LOCK_STAT=y +# CONFIG_LOCK_STAT is not set -CONFIG_DEBUG_STACK_USAGE=y +# CONFIG_DEBUG_STACK_USAGE is not set -CONFIG_ACPI_DEBUG=y +# CONFIG_ACPI_DEBUG is not set # CONFIG_ACPI_DEBUG_FUNC_TRACE is not set -CONFIG_DEBUG_SG=y -CONFIG_DEBUG_PI_LIST=y +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_PI_LIST is not set # CONFIG_DEBUG_PAGEALLOC is not set -CONFIG_DEBUG_WRITECOUNT=y -CONFIG_DEBUG_OBJECTS=y +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_OBJECTS is not set # CONFIG_DEBUG_OBJECTS_SELFTEST is not set -CONFIG_DEBUG_OBJECTS_FREE=y -CONFIG_DEBUG_OBJECTS_TIMERS=y -CONFIG_DEBUG_OBJECTS_RCU_HEAD=y +# CONFIG_DEBUG_OBJECTS_FREE is not set +# CONFIG_DEBUG_OBJECTS_TIMERS is not set +# CONFIG_DEBUG_OBJECTS_RCU_HEAD is not set CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1 -CONFIG_X86_PTDUMP=y -CONFIG_EFI_PGT_DUMP=y +# CONFIG_X86_PTDUMP is not set +# CONFIG_EFI_PGT_DUMP is not set -CONFIG_CAN_DEBUG_DEVICES=y +# CONFIG_CAN_DEBUG_DEVICES is not set -CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y +# CONFIG_SYSCTL_SYSCALL_CHECK is not set -CONFIG_DEBUG_NOTIFIERS=y +# CONFIG_DEBUG_NOTIFIERS is not set -CONFIG_DMA_API_DEBUG=y +# CONFIG_DMA_API_DEBUG is not set -CONFIG_MMIOTRACE=y +# CONFIG_MMIOTRACE is not set -CONFIG_DEBUG_CREDENTIALS=y +# CONFIG_DEBUG_CREDENTIALS is not set # off in both production debug and nodebug builds, # on in rawhide nodebug builds -CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -CONFIG_EXT4_DEBUG=y +# CONFIG_EXT4_DEBUG is not set # CONFIG_XFS_WARN is not set -CONFIG_DEBUG_PERF_USE_VMALLOC=y +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_JBD2_DEBUG=y +# CONFIG_JBD2_DEBUG is not set -CONFIG_NFSD_FAULT_INJECTION=y +# CONFIG_NFSD_FAULT_INJECTION is not set -CONFIG_DEBUG_BLK_CGROUP=y +# CONFIG_DEBUG_BLK_CGROUP is not set -CONFIG_DRBD_FAULT_INJECTION=y +# CONFIG_DRBD_FAULT_INJECTION is not set -CONFIG_ATH_DEBUG=y -CONFIG_CARL9170_DEBUGFS=y -CONFIG_IWLWIFI_DEVICE_TRACING=y +# CONFIG_ATH_DEBUG is not set +# CONFIG_CARL9170_DEBUGFS is not set +# CONFIG_IWLWIFI_DEVICE_TRACING is not set # CONFIG_RTLWIFI_DEBUG is not set -CONFIG_DEBUG_OBJECTS_WORK=y +# CONFIG_DEBUG_OBJECTS_WORK is not set -CONFIG_DMADEVICES_DEBUG=y -CONFIG_DMADEVICES_VDEBUG=y +# CONFIG_DMADEVICES_DEBUG is not set +# CONFIG_DMADEVICES_VDEBUG is not set CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_CEPH_LIB_PRETTYDEBUG=y -CONFIG_QUOTA_DEBUG=y +# CONFIG_CEPH_LIB_PRETTYDEBUG is not set +# CONFIG_QUOTA_DEBUG is not set CONFIG_PCI_DEFAULT_USE_CRS=y @@ -104,18 +104,18 @@ CONFIG_KGDB_KDB=y CONFIG_KDB_KEYBOARD=y CONFIG_KDB_CONTINUE_CATASTROPHIC=0 -CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y +# CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER is not set # CONFIG_PERCPU_TEST is not set -CONFIG_TEST_LIST_SORT=y +# CONFIG_TEST_LIST_SORT is not set # CONFIG_TEST_STRING_HELPERS is not set -CONFIG_DETECT_HUNG_TASK=y +# CONFIG_DETECT_HUNG_TASK is not set CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set -CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y +# CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK is not set -CONFIG_DEBUG_KMEMLEAK=y +# CONFIG_DEBUG_KMEMLEAK is not set CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=1024 # CONFIG_DEBUG_KMEMLEAK_TEST is not set CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y @@ -126,7 +126,7 @@ CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y # CONFIG_SPI_DEBUG is not set -CONFIG_X86_DEBUG_STATIC_CPU_HAS=y +# CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set # CONFIG_SCHEDSTATS is not set # CONFIG_LATENCYTOP is not set diff --git a/config-x86-generic b/config-x86-generic index 997bc472a..7968fdaea 100644 --- a/config-x86-generic +++ b/config-x86-generic @@ -334,7 +334,7 @@ CONFIG_SP5100_TCO=m # CONFIG_MEMTEST is not set # CONFIG_DEBUG_TLBFLUSH is not set -CONFIG_MAXSMP=y +# CONFIG_MAXSMP is not set CONFIG_HP_ILO=m diff --git a/kernel.spec b/kernel.spec index 1b50f1d1c..8c6f4fc82 100644 --- a/kernel.spec +++ b/kernel.spec @@ -67,9 +67,9 @@ Summary: The Linux kernel # The next upstream release sublevel (base_sublevel+1) %define upstream_sublevel %(echo $((%{base_sublevel} + 1))) # The rc snapshot level -%define rcrev 4 +%define rcrev 5 # The git snapshot level -%define gitrev 3 +%define gitrev 0 # Set rpm version accordingly %define rpmversion 3.%{upstream_sublevel}.0 %endif @@ -130,7 +130,7 @@ Summary: The Linux kernel # Set debugbuildsenabled to 1 for production (build separate debug kernels) # and 0 for rawhide (all kernels are debug kernels). # See also 'make debug' and 'make release'. -%define debugbuildsenabled 0 +%define debugbuildsenabled 1 # Want to build a vanilla kernel build without any non-upstream patches? %define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0} @@ -636,6 +636,9 @@ Patch25109: revert-input-wacom-testing-result-shows-get_report-is-unnecessary.pa #rhbz 1021036, submitted upstream Patch25110: 0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch +#rhbz 1117008 +Patch25111: Revert-drm-i915-reverse-dp-link-param-selection-pref.patch + # git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel Patch30000: kernel-arm64.patch @@ -1358,6 +1361,9 @@ ApplyPatch revert-input-wacom-testing-result-shows-get_report-is-unnecessary.pat #rhbz 1021036, submitted upstream ApplyPatch 0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch +#rhbz 1117008 +ApplyPatch Revert-drm-i915-reverse-dp-link-param-selection-pref.patch + %if 0%{?aarch64patches} ApplyPatch kernel-arm64.patch %ifnarch aarch64 # this is stupid, but i want to notice before secondary koji does. @@ -2240,6 +2246,11 @@ fi # ||----w | # || || %changelog +* Mon Jul 14 2014 Josh Boyer - 3.16.0-0.rc5.git0.1 +- Linux v3.16-rc5 +- Fix i915 regression with external monitors (rhbz 1117008) +- Disable debugging options. + * Sat Jul 12 2014 Tom Callaway - Fix license handling (I hope) diff --git a/sources b/sources index 29c400c6d..f9b7dfef3 100644 --- a/sources +++ b/sources @@ -1,4 +1,3 @@ 97ca1625bb40368dc41b9a7971549071 linux-3.15.tar.xz ef8f4db937f521a7e323ec589536ba25 perf-man-3.15.tar.gz -523886ec26aa36e0a93ab85b9717e2f6 patch-3.16-rc4.xz -83e7078f6b073f123f1de849a73a1a95 patch-3.16-rc4-git3.xz +8704867c524f3016a33b17a721334126 patch-3.16-rc5.xz From 4eb1075e8cf8f0bf547a1f9d512f53e7e7a3c849 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Wed, 16 Jul 2014 14:35:50 -0400 Subject: [PATCH 08/45] Linux v3.16-rc5-130-g2da294474093 - Reenable debugging options. --- config-generic | 6 +-- config-nodebug | 118 ++++++++++++++++++++++----------------------- config-x86-generic | 2 +- kernel.spec | 8 ++- sources | 1 + 5 files changed, 70 insertions(+), 65 deletions(-) diff --git a/config-generic b/config-generic index f2f6f2767..c6adc57dd 100644 --- a/config-generic +++ b/config-generic @@ -1695,13 +1695,13 @@ CONFIG_B43_SDIO=y CONFIG_B43_BCMA=y # CONFIG_B43_BCMA_EXTRA is not set CONFIG_B43_BCMA_PIO=y -# CONFIG_B43_DEBUG is not set +CONFIG_B43_DEBUG=y CONFIG_B43_PHY_LP=y CONFIG_B43_PHY_N=y CONFIG_B43_PHY_HT=y # CONFIG_B43_FORCE_PIO is not set CONFIG_B43LEGACY=m -# CONFIG_B43LEGACY_DEBUG is not set +CONFIG_B43LEGACY_DEBUG=y CONFIG_B43LEGACY_DMA=y CONFIG_B43LEGACY_PIO=y CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y @@ -4641,7 +4641,7 @@ CONFIG_PM_DEBUG=y # CONFIG_DPM_WATCHDOG is not set # revisit this in debug CONFIG_PM_TRACE=y CONFIG_PM_TRACE_RTC=y -# CONFIG_PM_TEST_SUSPEND is not set +CONFIG_PM_TEST_SUSPEND=y CONFIG_PM_RUNTIME=y # CONFIG_PM_OPP is not set # CONFIG_PM_AUTOSLEEP is not set diff --git a/config-nodebug b/config-nodebug index e16a37b57..360f418d4 100644 --- a/config-nodebug +++ b/config-nodebug @@ -2,101 +2,101 @@ CONFIG_SND_VERBOSE_PRINTK=y CONFIG_SND_DEBUG=y CONFIG_SND_PCM_XRUN_DEBUG=y -# CONFIG_DEBUG_ATOMIC_SLEEP is not set +CONFIG_DEBUG_ATOMIC_SLEEP=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_LOCK_TORTURE_TEST is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_PROVE_RCU is not set +CONFIG_DEBUG_MUTEXES=y +CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y +CONFIG_DEBUG_RT_MUTEXES=y +CONFIG_DEBUG_LOCK_ALLOC=y +CONFIG_LOCK_TORTURE_TEST=m +CONFIG_PROVE_LOCKING=y +CONFIG_DEBUG_SPINLOCK=y +CONFIG_PROVE_RCU=y # CONFIG_PROVE_RCU_REPEATEDLY is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set +CONFIG_DEBUG_PER_CPU_MAPS=y CONFIG_CPUMASK_OFFSTACK=y -# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set +CONFIG_CPU_NOTIFIER_ERROR_INJECT=m -# CONFIG_FAULT_INJECTION is not set -# CONFIG_FAILSLAB is not set -# CONFIG_FAIL_PAGE_ALLOC is not set -# CONFIG_FAIL_MAKE_REQUEST is not set -# CONFIG_FAULT_INJECTION_DEBUG_FS is not set -# CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set -# CONFIG_FAIL_IO_TIMEOUT is not set -# CONFIG_FAIL_MMC_REQUEST is not set +CONFIG_FAULT_INJECTION=y +CONFIG_FAILSLAB=y +CONFIG_FAIL_PAGE_ALLOC=y +CONFIG_FAIL_MAKE_REQUEST=y +CONFIG_FAULT_INJECTION_DEBUG_FS=y +CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y +CONFIG_FAIL_IO_TIMEOUT=y +CONFIG_FAIL_MMC_REQUEST=y -# CONFIG_LOCK_STAT is not set +CONFIG_LOCK_STAT=y -# CONFIG_DEBUG_STACK_USAGE is not set +CONFIG_DEBUG_STACK_USAGE=y -# CONFIG_ACPI_DEBUG is not set +CONFIG_ACPI_DEBUG=y # CONFIG_ACPI_DEBUG_FUNC_TRACE is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_PI_LIST is not set +CONFIG_DEBUG_SG=y +CONFIG_DEBUG_PI_LIST=y # CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_OBJECTS is not set +CONFIG_DEBUG_WRITECOUNT=y +CONFIG_DEBUG_OBJECTS=y # CONFIG_DEBUG_OBJECTS_SELFTEST is not set -# CONFIG_DEBUG_OBJECTS_FREE is not set -# CONFIG_DEBUG_OBJECTS_TIMERS is not set -# CONFIG_DEBUG_OBJECTS_RCU_HEAD is not set +CONFIG_DEBUG_OBJECTS_FREE=y +CONFIG_DEBUG_OBJECTS_TIMERS=y +CONFIG_DEBUG_OBJECTS_RCU_HEAD=y CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1 -# CONFIG_X86_PTDUMP is not set -# CONFIG_EFI_PGT_DUMP is not set +CONFIG_X86_PTDUMP=y +CONFIG_EFI_PGT_DUMP=y -# CONFIG_CAN_DEBUG_DEVICES is not set +CONFIG_CAN_DEBUG_DEVICES=y -# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_SYSCTL_SYSCALL_CHECK is not set +CONFIG_SYSCTL_SYSCALL_CHECK=y -# CONFIG_DEBUG_NOTIFIERS is not set +CONFIG_DEBUG_NOTIFIERS=y -# CONFIG_DMA_API_DEBUG is not set +CONFIG_DMA_API_DEBUG=y -# CONFIG_MMIOTRACE is not set +CONFIG_MMIOTRACE=y -# CONFIG_DEBUG_CREDENTIALS is not set +CONFIG_DEBUG_CREDENTIALS=y # off in both production debug and nodebug builds, # on in rawhide nodebug builds -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y -# CONFIG_EXT4_DEBUG is not set +CONFIG_EXT4_DEBUG=y # CONFIG_XFS_WARN is not set -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set +CONFIG_DEBUG_PERF_USE_VMALLOC=y -# CONFIG_JBD2_DEBUG is not set +CONFIG_JBD2_DEBUG=y -# CONFIG_NFSD_FAULT_INJECTION is not set +CONFIG_NFSD_FAULT_INJECTION=y -# CONFIG_DEBUG_BLK_CGROUP is not set +CONFIG_DEBUG_BLK_CGROUP=y -# CONFIG_DRBD_FAULT_INJECTION is not set +CONFIG_DRBD_FAULT_INJECTION=y -# CONFIG_ATH_DEBUG is not set -# CONFIG_CARL9170_DEBUGFS is not set -# CONFIG_IWLWIFI_DEVICE_TRACING is not set +CONFIG_ATH_DEBUG=y +CONFIG_CARL9170_DEBUGFS=y +CONFIG_IWLWIFI_DEVICE_TRACING=y # CONFIG_RTLWIFI_DEBUG is not set -# CONFIG_DEBUG_OBJECTS_WORK is not set +CONFIG_DEBUG_OBJECTS_WORK=y -# CONFIG_DMADEVICES_DEBUG is not set -# CONFIG_DMADEVICES_VDEBUG is not set +CONFIG_DMADEVICES_DEBUG=y +CONFIG_DMADEVICES_VDEBUG=y CONFIG_PM_ADVANCED_DEBUG=y -# CONFIG_CEPH_LIB_PRETTYDEBUG is not set -# CONFIG_QUOTA_DEBUG is not set +CONFIG_CEPH_LIB_PRETTYDEBUG=y +CONFIG_QUOTA_DEBUG=y CONFIG_PCI_DEFAULT_USE_CRS=y @@ -104,18 +104,18 @@ CONFIG_KGDB_KDB=y CONFIG_KDB_KEYBOARD=y CONFIG_KDB_CONTINUE_CATASTROPHIC=0 -# CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER is not set +CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y # CONFIG_PERCPU_TEST is not set -# CONFIG_TEST_LIST_SORT is not set +CONFIG_TEST_LIST_SORT=y # CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_DETECT_HUNG_TASK is not set +CONFIG_DETECT_HUNG_TASK=y CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set -# CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK is not set +CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y -# CONFIG_DEBUG_KMEMLEAK is not set +CONFIG_DEBUG_KMEMLEAK=y CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=1024 # CONFIG_DEBUG_KMEMLEAK_TEST is not set CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y @@ -126,7 +126,7 @@ CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y # CONFIG_SPI_DEBUG is not set -# CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set +CONFIG_X86_DEBUG_STATIC_CPU_HAS=y # CONFIG_SCHEDSTATS is not set # CONFIG_LATENCYTOP is not set diff --git a/config-x86-generic b/config-x86-generic index 7968fdaea..997bc472a 100644 --- a/config-x86-generic +++ b/config-x86-generic @@ -334,7 +334,7 @@ CONFIG_SP5100_TCO=m # CONFIG_MEMTEST is not set # CONFIG_DEBUG_TLBFLUSH is not set -# CONFIG_MAXSMP is not set +CONFIG_MAXSMP=y CONFIG_HP_ILO=m diff --git a/kernel.spec b/kernel.spec index 8c6f4fc82..0ad7c1aa8 100644 --- a/kernel.spec +++ b/kernel.spec @@ -69,7 +69,7 @@ Summary: The Linux kernel # The rc snapshot level %define rcrev 5 # The git snapshot level -%define gitrev 0 +%define gitrev 1 # Set rpm version accordingly %define rpmversion 3.%{upstream_sublevel}.0 %endif @@ -130,7 +130,7 @@ Summary: The Linux kernel # Set debugbuildsenabled to 1 for production (build separate debug kernels) # and 0 for rawhide (all kernels are debug kernels). # See also 'make debug' and 'make release'. -%define debugbuildsenabled 1 +%define debugbuildsenabled 0 # Want to build a vanilla kernel build without any non-upstream patches? %define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0} @@ -2246,6 +2246,10 @@ fi # ||----w | # || || %changelog +* Wed Jul 16 2014 Josh Boyer - 3.16.0-0.rc5.git1.1 +- Linux v3.16-rc5-130-g2da294474093 +- Reenable debugging options. + * Mon Jul 14 2014 Josh Boyer - 3.16.0-0.rc5.git0.1 - Linux v3.16-rc5 - Fix i915 regression with external monitors (rhbz 1117008) diff --git a/sources b/sources index f9b7dfef3..5ec5d2a4c 100644 --- a/sources +++ b/sources @@ -1,3 +1,4 @@ 97ca1625bb40368dc41b9a7971549071 linux-3.15.tar.xz ef8f4db937f521a7e323ec589536ba25 perf-man-3.15.tar.gz 8704867c524f3016a33b17a721334126 patch-3.16-rc5.xz +f4365c588e60b4fb107c366f9577cfee patch-3.16-rc5-git1.xz From b8207bb9c872b5a129747a1e64dff488394b1715 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Wed, 16 Jul 2014 17:43:32 -0400 Subject: [PATCH 09/45] Enable hermes prism driver (rhbz 1120393) --- config-generic | 2 +- kernel.spec | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config-generic b/config-generic index c6adc57dd..cb3787b1b 100644 --- a/config-generic +++ b/config-generic @@ -1718,7 +1718,7 @@ CONFIG_BRCMFMAC_USB=y # CONFIG_SYSTEMPORT is not set CONFIG_HERMES=m CONFIG_HERMES_CACHE_FW_ON_INIT=y -# CONFIG_HERMES_PRISM is not set +CONFIG_HERMES_PRISM=y CONFIG_NORTEL_HERMES=m CONFIG_PCI_HERMES=m CONFIG_PLX_HERMES=m diff --git a/kernel.spec b/kernel.spec index 0ad7c1aa8..8602362e9 100644 --- a/kernel.spec +++ b/kernel.spec @@ -2246,6 +2246,9 @@ fi # ||----w | # || || %changelog +* Wed Jul 16 2014 Josh Boyer +- Enable hermes prism driver (rhbz 1120393) + * Wed Jul 16 2014 Josh Boyer - 3.16.0-0.rc5.git1.1 - Linux v3.16-rc5-130-g2da294474093 - Reenable debugging options. From ed1c634a18c7be693150da3bd284076151e82da3 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Thu, 17 Jul 2014 12:30:00 -0400 Subject: [PATCH 10/45] Linux v3.16-rc5-143-gb6603fe574af --- kernel.spec | 5 ++++- sources | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel.spec b/kernel.spec index 8602362e9..02244c5a1 100644 --- a/kernel.spec +++ b/kernel.spec @@ -69,7 +69,7 @@ Summary: The Linux kernel # The rc snapshot level %define rcrev 5 # The git snapshot level -%define gitrev 1 +%define gitrev 2 # Set rpm version accordingly %define rpmversion 3.%{upstream_sublevel}.0 %endif @@ -2246,6 +2246,9 @@ fi # ||----w | # || || %changelog +* Thu Jul 17 2014 Josh Boyer - 3.16.0-0.rc5.git2.1 +- Linux v3.16-rc5-143-gb6603fe574af + * Wed Jul 16 2014 Josh Boyer - Enable hermes prism driver (rhbz 1120393) diff --git a/sources b/sources index 5ec5d2a4c..99ff6de99 100644 --- a/sources +++ b/sources @@ -2,3 +2,4 @@ ef8f4db937f521a7e323ec589536ba25 perf-man-3.15.tar.gz 8704867c524f3016a33b17a721334126 patch-3.16-rc5.xz f4365c588e60b4fb107c366f9577cfee patch-3.16-rc5-git1.xz +b1762183567ee901e78f16fa37f204af patch-3.15-rc5-git2.xz From da8a986ca096620cf381f87b0df39f65e9def79e Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Fri, 18 Jul 2014 17:48:52 -0400 Subject: [PATCH 11/45] Upload the correct sources... --- sources | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sources b/sources index 99ff6de99..9468c8d10 100644 --- a/sources +++ b/sources @@ -1,5 +1,4 @@ 97ca1625bb40368dc41b9a7971549071 linux-3.15.tar.xz ef8f4db937f521a7e323ec589536ba25 perf-man-3.15.tar.gz 8704867c524f3016a33b17a721334126 patch-3.16-rc5.xz -f4365c588e60b4fb107c366f9577cfee patch-3.16-rc5-git1.xz -b1762183567ee901e78f16fa37f204af patch-3.15-rc5-git2.xz +b0127dcdf9b6a03a40dad179b579428d patch-3.16-rc5-git2.xz From f225c08d6d0e44da1d43b686ee5d36304e0dbbb5 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 21 Jul 2014 13:41:52 +0100 Subject: [PATCH 12/45] Minor ARMv7 config update --- config-armv7 | 6 +++--- kernel.spec | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/config-armv7 b/config-armv7 index 5b4b2ab42..6dd7ced4e 100644 --- a/config-armv7 +++ b/config-armv7 @@ -316,7 +316,7 @@ CONFIG_OMAP_REMOTEPROC=m # CONFIG_OMAP_MUX_DEBUG is not set # CONFIG_VIDEO_OMAP3_DEBUG is not set -# AM33xx +# AM33xx/43xx CONFIG_SOC_AM33XX=y CONFIG_SOC_AM43XX=y CONFIG_AM335X_CONTROL_USB=m @@ -348,8 +348,8 @@ CONFIG_REGULATOR_TI_ABB=m CONFIG_TI_ADC081C=m CONFIG_TI_AM335X_ADC=m CONFIG_PWM_TIPWMSS=y -# CONFIG_GPIO_DAVINCI is not set -# CONFIG_DAVINCI_WATCHDOG is not set +CONFIG_MFD_TPS65218=m +CONFIG_REGULATOR_TPS65218=m # QCom CONFIG_ARCH_MSM8X60=y diff --git a/kernel.spec b/kernel.spec index 02244c5a1..f770df39c 100644 --- a/kernel.spec +++ b/kernel.spec @@ -2246,6 +2246,9 @@ fi # ||----w | # || || %changelog +* Mon Jul 21 2014 Peter Robinson +- Minor ARMv7 config update + * Thu Jul 17 2014 Josh Boyer - 3.16.0-0.rc5.git2.1 - Linux v3.16-rc5-143-gb6603fe574af From 8984fe834593bde814851156961826a4345f129d Mon Sep 17 00:00:00 2001 From: "Justin M. Forbes" Date: Mon, 21 Jul 2014 12:53:39 -0500 Subject: [PATCH 13/45] Linux v3.16-rc6 --- ...reverse-dp-link-param-selection-pref.patch | 43 ------- config-generic | 6 +- config-nodebug | 118 +++++++++--------- config-x86-generic | 2 +- kernel.spec | 18 ++- sources | 3 +- 6 files changed, 72 insertions(+), 118 deletions(-) delete mode 100644 Revert-drm-i915-reverse-dp-link-param-selection-pref.patch diff --git a/Revert-drm-i915-reverse-dp-link-param-selection-pref.patch b/Revert-drm-i915-reverse-dp-link-param-selection-pref.patch deleted file mode 100644 index 25aff2f13..000000000 --- a/Revert-drm-i915-reverse-dp-link-param-selection-pref.patch +++ /dev/null @@ -1,43 +0,0 @@ -Bugzilla: 1117008 -Upstream-status: Sent to intel-gfx - -From b22370f0cf68e49ddcb3dd7033aba5ff6454dfcc Mon Sep 17 00:00:00 2001 -From: Dave Airlie -Date: Mon, 14 Jul 2014 10:54:20 +1000 -Subject: [PATCH] Revert "drm/i915: reverse dp link param selection, prefer - fast over wide again" - -This reverts commit 38aecea0ccbb909d635619cba22f1891e589b434. - -This breaks Haswell Thinkpad + Lenovo dock in SST mode with a HDMI monitor attached. - -Before this we can 1920x1200 mode, after this we only ever get 1024x768, and -a lot of deferring. - -This didn't revert clean, but this should be fine. - -bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1117008 -Cc: stable@vger.kernel.org # v3.15 -Signed-off-by: Dave Airlie ---- - drivers/gpu/drm/i915/intel_dp.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c -index 2a00cb8..61963d3 100644 ---- a/drivers/gpu/drm/i915/intel_dp.c -+++ b/drivers/gpu/drm/i915/intel_dp.c -@@ -833,8 +833,8 @@ intel_dp_compute_config(struct intel_encoder *encoder, - mode_rate = intel_dp_link_required(adjusted_mode->crtc_clock, - bpp); - -- for (lane_count = min_lane_count; lane_count <= max_lane_count; lane_count <<= 1) { -- for (clock = min_clock; clock <= max_clock; clock++) { -+ for (clock = min_clock; clock <= max_clock; clock++) { -+ for (lane_count = min_lane_count; lane_count <= max_lane_count; lane_count <<= 1) { - link_clock = drm_dp_bw_code_to_link_rate(bws[clock]); - link_avail = intel_dp_max_data_rate(link_clock, - lane_count); --- -1.9.3 - diff --git a/config-generic b/config-generic index cb3787b1b..d83167ed4 100644 --- a/config-generic +++ b/config-generic @@ -1695,13 +1695,13 @@ CONFIG_B43_SDIO=y CONFIG_B43_BCMA=y # CONFIG_B43_BCMA_EXTRA is not set CONFIG_B43_BCMA_PIO=y -CONFIG_B43_DEBUG=y +# CONFIG_B43_DEBUG is not set CONFIG_B43_PHY_LP=y CONFIG_B43_PHY_N=y CONFIG_B43_PHY_HT=y # CONFIG_B43_FORCE_PIO is not set CONFIG_B43LEGACY=m -CONFIG_B43LEGACY_DEBUG=y +# CONFIG_B43LEGACY_DEBUG is not set CONFIG_B43LEGACY_DMA=y CONFIG_B43LEGACY_PIO=y CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y @@ -4641,7 +4641,7 @@ CONFIG_PM_DEBUG=y # CONFIG_DPM_WATCHDOG is not set # revisit this in debug CONFIG_PM_TRACE=y CONFIG_PM_TRACE_RTC=y -CONFIG_PM_TEST_SUSPEND=y +# CONFIG_PM_TEST_SUSPEND is not set CONFIG_PM_RUNTIME=y # CONFIG_PM_OPP is not set # CONFIG_PM_AUTOSLEEP is not set diff --git a/config-nodebug b/config-nodebug index 360f418d4..e16a37b57 100644 --- a/config-nodebug +++ b/config-nodebug @@ -2,101 +2,101 @@ CONFIG_SND_VERBOSE_PRINTK=y CONFIG_SND_DEBUG=y CONFIG_SND_PCM_XRUN_DEBUG=y -CONFIG_DEBUG_ATOMIC_SLEEP=y +# CONFIG_DEBUG_ATOMIC_SLEEP is not set -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y -CONFIG_DEBUG_RT_MUTEXES=y -CONFIG_DEBUG_LOCK_ALLOC=y -CONFIG_LOCK_TORTURE_TEST=m -CONFIG_PROVE_LOCKING=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_PROVE_RCU=y +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_LOCK_TORTURE_TEST is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_PROVE_RCU is not set # CONFIG_PROVE_RCU_REPEATEDLY is not set -CONFIG_DEBUG_PER_CPU_MAPS=y +# CONFIG_DEBUG_PER_CPU_MAPS is not set CONFIG_CPUMASK_OFFSTACK=y -CONFIG_CPU_NOTIFIER_ERROR_INJECT=m +# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set -CONFIG_FAULT_INJECTION=y -CONFIG_FAILSLAB=y -CONFIG_FAIL_PAGE_ALLOC=y -CONFIG_FAIL_MAKE_REQUEST=y -CONFIG_FAULT_INJECTION_DEBUG_FS=y -CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y -CONFIG_FAIL_IO_TIMEOUT=y -CONFIG_FAIL_MMC_REQUEST=y +# CONFIG_FAULT_INJECTION is not set +# CONFIG_FAILSLAB is not set +# CONFIG_FAIL_PAGE_ALLOC is not set +# CONFIG_FAIL_MAKE_REQUEST is not set +# CONFIG_FAULT_INJECTION_DEBUG_FS is not set +# CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set +# CONFIG_FAIL_IO_TIMEOUT is not set +# CONFIG_FAIL_MMC_REQUEST is not set -CONFIG_LOCK_STAT=y +# CONFIG_LOCK_STAT is not set -CONFIG_DEBUG_STACK_USAGE=y +# CONFIG_DEBUG_STACK_USAGE is not set -CONFIG_ACPI_DEBUG=y +# CONFIG_ACPI_DEBUG is not set # CONFIG_ACPI_DEBUG_FUNC_TRACE is not set -CONFIG_DEBUG_SG=y -CONFIG_DEBUG_PI_LIST=y +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_PI_LIST is not set # CONFIG_DEBUG_PAGEALLOC is not set -CONFIG_DEBUG_WRITECOUNT=y -CONFIG_DEBUG_OBJECTS=y +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_OBJECTS is not set # CONFIG_DEBUG_OBJECTS_SELFTEST is not set -CONFIG_DEBUG_OBJECTS_FREE=y -CONFIG_DEBUG_OBJECTS_TIMERS=y -CONFIG_DEBUG_OBJECTS_RCU_HEAD=y +# CONFIG_DEBUG_OBJECTS_FREE is not set +# CONFIG_DEBUG_OBJECTS_TIMERS is not set +# CONFIG_DEBUG_OBJECTS_RCU_HEAD is not set CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1 -CONFIG_X86_PTDUMP=y -CONFIG_EFI_PGT_DUMP=y +# CONFIG_X86_PTDUMP is not set +# CONFIG_EFI_PGT_DUMP is not set -CONFIG_CAN_DEBUG_DEVICES=y +# CONFIG_CAN_DEBUG_DEVICES is not set -CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y +# CONFIG_SYSCTL_SYSCALL_CHECK is not set -CONFIG_DEBUG_NOTIFIERS=y +# CONFIG_DEBUG_NOTIFIERS is not set -CONFIG_DMA_API_DEBUG=y +# CONFIG_DMA_API_DEBUG is not set -CONFIG_MMIOTRACE=y +# CONFIG_MMIOTRACE is not set -CONFIG_DEBUG_CREDENTIALS=y +# CONFIG_DEBUG_CREDENTIALS is not set # off in both production debug and nodebug builds, # on in rawhide nodebug builds -CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -CONFIG_EXT4_DEBUG=y +# CONFIG_EXT4_DEBUG is not set # CONFIG_XFS_WARN is not set -CONFIG_DEBUG_PERF_USE_VMALLOC=y +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_JBD2_DEBUG=y +# CONFIG_JBD2_DEBUG is not set -CONFIG_NFSD_FAULT_INJECTION=y +# CONFIG_NFSD_FAULT_INJECTION is not set -CONFIG_DEBUG_BLK_CGROUP=y +# CONFIG_DEBUG_BLK_CGROUP is not set -CONFIG_DRBD_FAULT_INJECTION=y +# CONFIG_DRBD_FAULT_INJECTION is not set -CONFIG_ATH_DEBUG=y -CONFIG_CARL9170_DEBUGFS=y -CONFIG_IWLWIFI_DEVICE_TRACING=y +# CONFIG_ATH_DEBUG is not set +# CONFIG_CARL9170_DEBUGFS is not set +# CONFIG_IWLWIFI_DEVICE_TRACING is not set # CONFIG_RTLWIFI_DEBUG is not set -CONFIG_DEBUG_OBJECTS_WORK=y +# CONFIG_DEBUG_OBJECTS_WORK is not set -CONFIG_DMADEVICES_DEBUG=y -CONFIG_DMADEVICES_VDEBUG=y +# CONFIG_DMADEVICES_DEBUG is not set +# CONFIG_DMADEVICES_VDEBUG is not set CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_CEPH_LIB_PRETTYDEBUG=y -CONFIG_QUOTA_DEBUG=y +# CONFIG_CEPH_LIB_PRETTYDEBUG is not set +# CONFIG_QUOTA_DEBUG is not set CONFIG_PCI_DEFAULT_USE_CRS=y @@ -104,18 +104,18 @@ CONFIG_KGDB_KDB=y CONFIG_KDB_KEYBOARD=y CONFIG_KDB_CONTINUE_CATASTROPHIC=0 -CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y +# CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER is not set # CONFIG_PERCPU_TEST is not set -CONFIG_TEST_LIST_SORT=y +# CONFIG_TEST_LIST_SORT is not set # CONFIG_TEST_STRING_HELPERS is not set -CONFIG_DETECT_HUNG_TASK=y +# CONFIG_DETECT_HUNG_TASK is not set CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set -CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y +# CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK is not set -CONFIG_DEBUG_KMEMLEAK=y +# CONFIG_DEBUG_KMEMLEAK is not set CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=1024 # CONFIG_DEBUG_KMEMLEAK_TEST is not set CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y @@ -126,7 +126,7 @@ CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y # CONFIG_SPI_DEBUG is not set -CONFIG_X86_DEBUG_STATIC_CPU_HAS=y +# CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set # CONFIG_SCHEDSTATS is not set # CONFIG_LATENCYTOP is not set diff --git a/config-x86-generic b/config-x86-generic index 997bc472a..7968fdaea 100644 --- a/config-x86-generic +++ b/config-x86-generic @@ -334,7 +334,7 @@ CONFIG_SP5100_TCO=m # CONFIG_MEMTEST is not set # CONFIG_DEBUG_TLBFLUSH is not set -CONFIG_MAXSMP=y +# CONFIG_MAXSMP is not set CONFIG_HP_ILO=m diff --git a/kernel.spec b/kernel.spec index f770df39c..d151a1b16 100644 --- a/kernel.spec +++ b/kernel.spec @@ -67,9 +67,9 @@ Summary: The Linux kernel # The next upstream release sublevel (base_sublevel+1) %define upstream_sublevel %(echo $((%{base_sublevel} + 1))) # The rc snapshot level -%define rcrev 5 +%define rcrev 6 # The git snapshot level -%define gitrev 2 +%define gitrev 0 # Set rpm version accordingly %define rpmversion 3.%{upstream_sublevel}.0 %endif @@ -130,7 +130,7 @@ Summary: The Linux kernel # Set debugbuildsenabled to 1 for production (build separate debug kernels) # and 0 for rawhide (all kernels are debug kernels). # See also 'make debug' and 'make release'. -%define debugbuildsenabled 0 +%define debugbuildsenabled 1 # Want to build a vanilla kernel build without any non-upstream patches? %define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0} @@ -403,7 +403,7 @@ Group: System Environment/Kernel License: GPLv2 and Redistributable, no modification permitted URL: http://www.kernel.org/ Version: %{rpmversion} -Release: %{pkg_release} +Release: %{pkg_release}.1 # DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD. # SET %%nobuildarches (ABOVE) INSTEAD ExclusiveArch: %{all_x86} x86_64 ppc ppc64 ppc64p7 s390 s390x %{arm} aarch64 ppc64le @@ -636,9 +636,6 @@ Patch25109: revert-input-wacom-testing-result-shows-get_report-is-unnecessary.pa #rhbz 1021036, submitted upstream Patch25110: 0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch -#rhbz 1117008 -Patch25111: Revert-drm-i915-reverse-dp-link-param-selection-pref.patch - # git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel Patch30000: kernel-arm64.patch @@ -1361,9 +1358,6 @@ ApplyPatch revert-input-wacom-testing-result-shows-get_report-is-unnecessary.pat #rhbz 1021036, submitted upstream ApplyPatch 0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch -#rhbz 1117008 -ApplyPatch Revert-drm-i915-reverse-dp-link-param-selection-pref.patch - %if 0%{?aarch64patches} ApplyPatch kernel-arm64.patch %ifnarch aarch64 # this is stupid, but i want to notice before secondary koji does. @@ -2246,6 +2240,10 @@ fi # ||----w | # || || %changelog +* Mon Jul 21 2014 Justin M. Forbes - 3.16.0-0.rc6.git0.1 +- Linux v3.16-rc6 +- Disable debugging options. + * Mon Jul 21 2014 Peter Robinson - Minor ARMv7 config update diff --git a/sources b/sources index 9468c8d10..09f0450a2 100644 --- a/sources +++ b/sources @@ -1,4 +1,3 @@ 97ca1625bb40368dc41b9a7971549071 linux-3.15.tar.xz ef8f4db937f521a7e323ec589536ba25 perf-man-3.15.tar.gz -8704867c524f3016a33b17a721334126 patch-3.16-rc5.xz -b0127dcdf9b6a03a40dad179b579428d patch-3.16-rc5-git2.xz +93fbbc57b86d1373be5bd94b1ee06ddd patch-3.16-rc6.xz From 0d6873962635e2c53a722754b5d047477f3863a5 Mon Sep 17 00:00:00 2001 From: "Justin M. Forbes" Date: Tue, 22 Jul 2014 08:45:36 -0500 Subject: [PATCH 14/45] Linux v3.16-rc6-75-g15ba223 --- config-generic | 6 +-- config-nodebug | 118 ++++++++++++++++++++++----------------------- config-x86-generic | 2 +- kernel.spec | 10 ++-- sources | 1 + 5 files changed, 71 insertions(+), 66 deletions(-) diff --git a/config-generic b/config-generic index d83167ed4..cb3787b1b 100644 --- a/config-generic +++ b/config-generic @@ -1695,13 +1695,13 @@ CONFIG_B43_SDIO=y CONFIG_B43_BCMA=y # CONFIG_B43_BCMA_EXTRA is not set CONFIG_B43_BCMA_PIO=y -# CONFIG_B43_DEBUG is not set +CONFIG_B43_DEBUG=y CONFIG_B43_PHY_LP=y CONFIG_B43_PHY_N=y CONFIG_B43_PHY_HT=y # CONFIG_B43_FORCE_PIO is not set CONFIG_B43LEGACY=m -# CONFIG_B43LEGACY_DEBUG is not set +CONFIG_B43LEGACY_DEBUG=y CONFIG_B43LEGACY_DMA=y CONFIG_B43LEGACY_PIO=y CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y @@ -4641,7 +4641,7 @@ CONFIG_PM_DEBUG=y # CONFIG_DPM_WATCHDOG is not set # revisit this in debug CONFIG_PM_TRACE=y CONFIG_PM_TRACE_RTC=y -# CONFIG_PM_TEST_SUSPEND is not set +CONFIG_PM_TEST_SUSPEND=y CONFIG_PM_RUNTIME=y # CONFIG_PM_OPP is not set # CONFIG_PM_AUTOSLEEP is not set diff --git a/config-nodebug b/config-nodebug index e16a37b57..360f418d4 100644 --- a/config-nodebug +++ b/config-nodebug @@ -2,101 +2,101 @@ CONFIG_SND_VERBOSE_PRINTK=y CONFIG_SND_DEBUG=y CONFIG_SND_PCM_XRUN_DEBUG=y -# CONFIG_DEBUG_ATOMIC_SLEEP is not set +CONFIG_DEBUG_ATOMIC_SLEEP=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_LOCK_TORTURE_TEST is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_PROVE_RCU is not set +CONFIG_DEBUG_MUTEXES=y +CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y +CONFIG_DEBUG_RT_MUTEXES=y +CONFIG_DEBUG_LOCK_ALLOC=y +CONFIG_LOCK_TORTURE_TEST=m +CONFIG_PROVE_LOCKING=y +CONFIG_DEBUG_SPINLOCK=y +CONFIG_PROVE_RCU=y # CONFIG_PROVE_RCU_REPEATEDLY is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set +CONFIG_DEBUG_PER_CPU_MAPS=y CONFIG_CPUMASK_OFFSTACK=y -# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set +CONFIG_CPU_NOTIFIER_ERROR_INJECT=m -# CONFIG_FAULT_INJECTION is not set -# CONFIG_FAILSLAB is not set -# CONFIG_FAIL_PAGE_ALLOC is not set -# CONFIG_FAIL_MAKE_REQUEST is not set -# CONFIG_FAULT_INJECTION_DEBUG_FS is not set -# CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set -# CONFIG_FAIL_IO_TIMEOUT is not set -# CONFIG_FAIL_MMC_REQUEST is not set +CONFIG_FAULT_INJECTION=y +CONFIG_FAILSLAB=y +CONFIG_FAIL_PAGE_ALLOC=y +CONFIG_FAIL_MAKE_REQUEST=y +CONFIG_FAULT_INJECTION_DEBUG_FS=y +CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y +CONFIG_FAIL_IO_TIMEOUT=y +CONFIG_FAIL_MMC_REQUEST=y -# CONFIG_LOCK_STAT is not set +CONFIG_LOCK_STAT=y -# CONFIG_DEBUG_STACK_USAGE is not set +CONFIG_DEBUG_STACK_USAGE=y -# CONFIG_ACPI_DEBUG is not set +CONFIG_ACPI_DEBUG=y # CONFIG_ACPI_DEBUG_FUNC_TRACE is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_PI_LIST is not set +CONFIG_DEBUG_SG=y +CONFIG_DEBUG_PI_LIST=y # CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_OBJECTS is not set +CONFIG_DEBUG_WRITECOUNT=y +CONFIG_DEBUG_OBJECTS=y # CONFIG_DEBUG_OBJECTS_SELFTEST is not set -# CONFIG_DEBUG_OBJECTS_FREE is not set -# CONFIG_DEBUG_OBJECTS_TIMERS is not set -# CONFIG_DEBUG_OBJECTS_RCU_HEAD is not set +CONFIG_DEBUG_OBJECTS_FREE=y +CONFIG_DEBUG_OBJECTS_TIMERS=y +CONFIG_DEBUG_OBJECTS_RCU_HEAD=y CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1 -# CONFIG_X86_PTDUMP is not set -# CONFIG_EFI_PGT_DUMP is not set +CONFIG_X86_PTDUMP=y +CONFIG_EFI_PGT_DUMP=y -# CONFIG_CAN_DEBUG_DEVICES is not set +CONFIG_CAN_DEBUG_DEVICES=y -# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_SYSCTL_SYSCALL_CHECK is not set +CONFIG_SYSCTL_SYSCALL_CHECK=y -# CONFIG_DEBUG_NOTIFIERS is not set +CONFIG_DEBUG_NOTIFIERS=y -# CONFIG_DMA_API_DEBUG is not set +CONFIG_DMA_API_DEBUG=y -# CONFIG_MMIOTRACE is not set +CONFIG_MMIOTRACE=y -# CONFIG_DEBUG_CREDENTIALS is not set +CONFIG_DEBUG_CREDENTIALS=y # off in both production debug and nodebug builds, # on in rawhide nodebug builds -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y -# CONFIG_EXT4_DEBUG is not set +CONFIG_EXT4_DEBUG=y # CONFIG_XFS_WARN is not set -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set +CONFIG_DEBUG_PERF_USE_VMALLOC=y -# CONFIG_JBD2_DEBUG is not set +CONFIG_JBD2_DEBUG=y -# CONFIG_NFSD_FAULT_INJECTION is not set +CONFIG_NFSD_FAULT_INJECTION=y -# CONFIG_DEBUG_BLK_CGROUP is not set +CONFIG_DEBUG_BLK_CGROUP=y -# CONFIG_DRBD_FAULT_INJECTION is not set +CONFIG_DRBD_FAULT_INJECTION=y -# CONFIG_ATH_DEBUG is not set -# CONFIG_CARL9170_DEBUGFS is not set -# CONFIG_IWLWIFI_DEVICE_TRACING is not set +CONFIG_ATH_DEBUG=y +CONFIG_CARL9170_DEBUGFS=y +CONFIG_IWLWIFI_DEVICE_TRACING=y # CONFIG_RTLWIFI_DEBUG is not set -# CONFIG_DEBUG_OBJECTS_WORK is not set +CONFIG_DEBUG_OBJECTS_WORK=y -# CONFIG_DMADEVICES_DEBUG is not set -# CONFIG_DMADEVICES_VDEBUG is not set +CONFIG_DMADEVICES_DEBUG=y +CONFIG_DMADEVICES_VDEBUG=y CONFIG_PM_ADVANCED_DEBUG=y -# CONFIG_CEPH_LIB_PRETTYDEBUG is not set -# CONFIG_QUOTA_DEBUG is not set +CONFIG_CEPH_LIB_PRETTYDEBUG=y +CONFIG_QUOTA_DEBUG=y CONFIG_PCI_DEFAULT_USE_CRS=y @@ -104,18 +104,18 @@ CONFIG_KGDB_KDB=y CONFIG_KDB_KEYBOARD=y CONFIG_KDB_CONTINUE_CATASTROPHIC=0 -# CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER is not set +CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y # CONFIG_PERCPU_TEST is not set -# CONFIG_TEST_LIST_SORT is not set +CONFIG_TEST_LIST_SORT=y # CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_DETECT_HUNG_TASK is not set +CONFIG_DETECT_HUNG_TASK=y CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set -# CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK is not set +CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y -# CONFIG_DEBUG_KMEMLEAK is not set +CONFIG_DEBUG_KMEMLEAK=y CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=1024 # CONFIG_DEBUG_KMEMLEAK_TEST is not set CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y @@ -126,7 +126,7 @@ CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y # CONFIG_SPI_DEBUG is not set -# CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set +CONFIG_X86_DEBUG_STATIC_CPU_HAS=y # CONFIG_SCHEDSTATS is not set # CONFIG_LATENCYTOP is not set diff --git a/config-x86-generic b/config-x86-generic index 7968fdaea..997bc472a 100644 --- a/config-x86-generic +++ b/config-x86-generic @@ -334,7 +334,7 @@ CONFIG_SP5100_TCO=m # CONFIG_MEMTEST is not set # CONFIG_DEBUG_TLBFLUSH is not set -# CONFIG_MAXSMP is not set +CONFIG_MAXSMP=y CONFIG_HP_ILO=m diff --git a/kernel.spec b/kernel.spec index d151a1b16..d23bf3b28 100644 --- a/kernel.spec +++ b/kernel.spec @@ -69,7 +69,7 @@ Summary: The Linux kernel # The rc snapshot level %define rcrev 6 # The git snapshot level -%define gitrev 0 +%define gitrev 1 # Set rpm version accordingly %define rpmversion 3.%{upstream_sublevel}.0 %endif @@ -130,7 +130,7 @@ Summary: The Linux kernel # Set debugbuildsenabled to 1 for production (build separate debug kernels) # and 0 for rawhide (all kernels are debug kernels). # See also 'make debug' and 'make release'. -%define debugbuildsenabled 1 +%define debugbuildsenabled 0 # Want to build a vanilla kernel build without any non-upstream patches? %define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0} @@ -403,7 +403,7 @@ Group: System Environment/Kernel License: GPLv2 and Redistributable, no modification permitted URL: http://www.kernel.org/ Version: %{rpmversion} -Release: %{pkg_release}.1 +Release: %{pkg_release} # DO NOT CHANGE THE 'ExclusiveArch' LINE TO TEMPORARILY EXCLUDE AN ARCHITECTURE BUILD. # SET %%nobuildarches (ABOVE) INSTEAD ExclusiveArch: %{all_x86} x86_64 ppc ppc64 ppc64p7 s390 s390x %{arm} aarch64 ppc64le @@ -2240,6 +2240,10 @@ fi # ||----w | # || || %changelog +* Tue Jul 22 2014 Justin M. Forbes - 3.16.0-0.rc6.git1.1 +- Linux v3.16-rc6-75-g15ba223 +- Reenable debugging options. + * Mon Jul 21 2014 Justin M. Forbes - 3.16.0-0.rc6.git0.1 - Linux v3.16-rc6 - Disable debugging options. diff --git a/sources b/sources index 09f0450a2..1e25ec607 100644 --- a/sources +++ b/sources @@ -1,3 +1,4 @@ 97ca1625bb40368dc41b9a7971549071 linux-3.15.tar.xz ef8f4db937f521a7e323ec589536ba25 perf-man-3.15.tar.gz 93fbbc57b86d1373be5bd94b1ee06ddd patch-3.16-rc6.xz +e6b91e7f2dadd80e52017d335c0c433b patch-3.16-rc6-git1.xz From eae65066258b22a97edc41ddca5ae627ce1f3fc4 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Thu, 24 Jul 2014 10:41:57 -0400 Subject: [PATCH 15/45] Fix regression in sched_setparam (rhbz 1117942) --- kernel.spec | 9 +++ sched-fix-sched_setparam-policy-1-logic.patch | 68 +++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 sched-fix-sched_setparam-policy-1-logic.patch diff --git a/kernel.spec b/kernel.spec index d23bf3b28..29a8a41fc 100644 --- a/kernel.spec +++ b/kernel.spec @@ -636,6 +636,9 @@ Patch25109: revert-input-wacom-testing-result-shows-get_report-is-unnecessary.pa #rhbz 1021036, submitted upstream Patch25110: 0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch +#rhbz 1117942 +Patch25118: sched-fix-sched_setparam-policy-1-logic.patch + # git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel Patch30000: kernel-arm64.patch @@ -1358,6 +1361,9 @@ ApplyPatch revert-input-wacom-testing-result-shows-get_report-is-unnecessary.pat #rhbz 1021036, submitted upstream ApplyPatch 0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch +#rhbz 1117942 +ApplyPatch sched-fix-sched_setparam-policy-1-logic.patch + %if 0%{?aarch64patches} ApplyPatch kernel-arm64.patch %ifnarch aarch64 # this is stupid, but i want to notice before secondary koji does. @@ -2240,6 +2246,9 @@ fi # ||----w | # || || %changelog +* Thu Jul 24 2014 Josh Boyer +- Fix regression in sched_setparam (rhbz 1117942) + * Tue Jul 22 2014 Justin M. Forbes - 3.16.0-0.rc6.git1.1 - Linux v3.16-rc6-75-g15ba223 - Reenable debugging options. diff --git a/sched-fix-sched_setparam-policy-1-logic.patch b/sched-fix-sched_setparam-policy-1-logic.patch new file mode 100644 index 000000000..060e0dcef --- /dev/null +++ b/sched-fix-sched_setparam-policy-1-logic.patch @@ -0,0 +1,68 @@ +Bugzilla: 1117942 +Upstream-status: Sent for 3.16 and seen by peterz + +The scheduler uses policy=-1 to preserve the current policy state to +implement sched_setparam(). But, as (int) -1 is equals to 0xffffffff, +it's matching the if (policy & SCHED_RESET_ON_FORK) on +_sched_setscheduler(). This match changes the policy value to an +invalid value, breaking the sched_setparam() syscall. + +This patch checks policy=-1 before check the SCHED_RESET_ON_FORK flag. + +The following program shows the bug: + +int main(void) +{ + struct sched_param param = { + .sched_priority = 5, + }; + + sched_setscheduler(0, SCHED_FIFO, ¶m); + param.sched_priority = 1; + sched_setparam(0, ¶m); + param.sched_priority = 0; + sched_getparam(0, ¶m); + if (param.sched_priority != 1) + printf("failed priority setting (found %d instead of 1)\n", + param.sched_priority); + else + printf("priority setting fine\n"); +} + +Cc: Peter Zijlstra +Cc: Ingo Molnar +Cc: Thomas Gleixner +Cc: stable@vger.kernel.org # 3.14+ +Fixes: 7479f3c9cf67 "sched: Move SCHED_RESET_ON_FORK into attr::sched_flags" +Reviewed-by: Steven Rostedt +Signed-off-by: Daniel Bristot de Oliveira + +--- + kernel/sched/core.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index bc1638b..0acf96b 100644 +--- a/kernel/sched/core.c ++++ b/kernel/sched/core.c +@@ -3558,9 +3558,10 @@ static int _sched_setscheduler(struct task_struct *p, int policy, + }; + + /* +- * Fixup the legacy SCHED_RESET_ON_FORK hack ++ * Fixup the legacy SCHED_RESET_ON_FORK hack, except if ++ * the policy=-1 was passed by sched_setparam(). + */ +- if (policy & SCHED_RESET_ON_FORK) { ++ if ((policy != -1) && (policy & SCHED_RESET_ON_FORK)) { + attr.sched_flags |= SCHED_FLAG_RESET_ON_FORK; + policy &= ~SCHED_RESET_ON_FORK; + attr.sched_policy = policy; +-- +1.9.3 + +-- +To unsubscribe from this list: send the line "unsubscribe linux-kernel" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html +Please read the FAQ at http://www.tux.org/lkml/ From b052f24552527d2f73c6911720739001be430c57 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Thu, 24 Jul 2014 12:02:58 -0400 Subject: [PATCH 16/45] CVE-2014-5045 vfs: refcount issues during lazy umount on symlink (rhbz 1122471 1122482) --- fs-umount-on-symlink-leaks-mnt-count.patch | 41 ++++++++++++++++++++++ kernel.spec | 7 ++++ 2 files changed, 48 insertions(+) create mode 100644 fs-umount-on-symlink-leaks-mnt-count.patch diff --git a/fs-umount-on-symlink-leaks-mnt-count.patch b/fs-umount-on-symlink-leaks-mnt-count.patch new file mode 100644 index 000000000..ed0e8a397 --- /dev/null +++ b/fs-umount-on-symlink-leaks-mnt-count.patch @@ -0,0 +1,41 @@ +Bugzilla: 1122482 +Upstream-status: Sent for 3.16 +From: Vasily Averin +Subject: [PATCH v4] fs: umount on symlink leaks mnt count +Currently umount on symlink blocks following umount: + +/vz is separate mount + +# ls /vz/ -al | grep test +drwxr-xr-x. 2 root root 4096 Jul 19 01:14 testdir +lrwxrwxrwx. 1 root root 11 Jul 19 01:16 testlink -> /vz/testdir +# umount -l /vz/testlink +umount: /vz/testlink: not mounted (expected) +# lsof /vz +# umount /vz +umount: /vz: device is busy. (unexpected) + +In this case mountpoint_last() gets an extra refcount on path->mnt + +Signed-off-by: Vasily Averin +--- + fs/namei.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) +diff --git a/fs/namei.c b/fs/namei.c +index 985c6f3..9eb787e 100644 +--- a/fs/namei.c ++++ b/fs/namei.c +@@ -2256,9 +2256,10 @@ done: + goto out; + } + path->dentry = dentry; +- path->mnt = mntget(nd->path.mnt); ++ path->mnt = nd->path.mnt; + if (should_follow_link(dentry, nd->flags & LOOKUP_FOLLOW)) + return 1; ++ mntget(path->mnt); + follow_mount(path); + error = 0; + out: +-- +1.7.5.4 diff --git a/kernel.spec b/kernel.spec index 29a8a41fc..f4fbcd813 100644 --- a/kernel.spec +++ b/kernel.spec @@ -639,6 +639,9 @@ Patch25110: 0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch #rhbz 1117942 Patch25118: sched-fix-sched_setparam-policy-1-logic.patch +#CVE-2014-5045 rhbz 1122472 1122482 +Patch25119: fs-umount-on-symlink-leaks-mnt-count.patch + # git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel Patch30000: kernel-arm64.patch @@ -1364,6 +1367,9 @@ ApplyPatch 0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch #rhbz 1117942 ApplyPatch sched-fix-sched_setparam-policy-1-logic.patch +#CVE-2014-5045 rhbz 1122472 1122482 +ApplyPatch fs-umount-on-symlink-leaks-mnt-count.patch + %if 0%{?aarch64patches} ApplyPatch kernel-arm64.patch %ifnarch aarch64 # this is stupid, but i want to notice before secondary koji does. @@ -2247,6 +2253,7 @@ fi # || || %changelog * Thu Jul 24 2014 Josh Boyer +- CVE-2014-5045 vfs: refcount issues during lazy umount on symlink (rhbz 1122471 1122482) - Fix regression in sched_setparam (rhbz 1117942) * Tue Jul 22 2014 Justin M. Forbes - 3.16.0-0.rc6.git1.1 From 2989acc54f0336c2d78e5ce77a90e08899f69ff5 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Thu, 24 Jul 2014 18:57:04 -0400 Subject: [PATCH 17/45] kernel-arm64.patch: update from git --- kernel-arm64.patch | 3122 +++++++++++++++++++++++++++++--------------- kernel.spec | 3 + 2 files changed, 2078 insertions(+), 1047 deletions(-) diff --git a/kernel-arm64.patch b/kernel-arm64.patch index 1a0154ffd..04f5fab2a 100644 --- a/kernel-arm64.patch +++ b/kernel-arm64.patch @@ -1,701 +1,18 @@ -commit 983932f4feeb38a09ae12e49875479db22cd3312 -Author: Mark Salter -Date: Tue Jun 24 23:16:45 2014 -0400 - - perf: fix arm64 build error - - I'm seeing the following build error on arm64: - - In file included from util/event.c:3:0: - util/event.h:95:17: error: 'PERF_REGS_MAX' undeclared here (not in a function) - u64 cache_regs[PERF_REGS_MAX]; - ^ - - This patch adds a PEFF_REGS_MAX definition for arm64. - - Signed-off-by: Mark Salter - -commit 46c0ee11217eb143c70e947064e5cc9413f8dd79 -Author: Mark Salter -Date: Mon Jun 23 00:34:17 2014 -0400 - - arm64: fix CONFIG_ZONE_DMA on systems with no 32-bit addressable DRAM - - Commit 2d5a5612bc (arm64: Limit the CMA buffer to 32-bit if ZONE_DMA) - forces the CMA buffer to be 32-bit addressable if CONFIG_ZONE_DMA is - defined. This breaks CMA on platforms with no 32-bit addressable DRAM. - This patch checks to make sure there is 32-bit addressable DRAM before - setting the 32-bit limit. If there is none, no limit is placed on the - CMA buffer. This allows a single kernel (with CONFIG_ZONE_DMA defined) - to support platforms requiring the 32-bit limit and platforms with no - 32-bit limit. - - Signed-off-by: Mark Salter - -commit 5500ed01dcd1c606cfcde8183429b81131fe320f -Author: Marc Zyngier -Date: Thu Jun 19 10:19:43 2014 +0100 - - arm64: KVM: vgic: add GICv3 world switch - - Introduce the GICv3 world switch code and helper functions, enabling - GICv2 emulation on GICv3 hardware. - - Acked-by: Catalin Marinas - Reviewed-by: Christoffer Dall - Signed-off-by: Marc Zyngier - -commit e9ad9cfb26b54f286032b0b5b7226b089ba2a1ae -Author: Marc Zyngier -Date: Thu Jun 19 10:19:42 2014 +0100 - - KVM: ARM: vgic: add the GICv3 backend - - Introduce the support code for emulating a GICv2 on top of GICv3 - hardware. - - Acked-by: Catalin Marinas - Signed-off-by: Marc Zyngier - -commit 8eeec56af2a9b33b1d6e9bfbbd2cbfefe3251a95 -Author: Marc Zyngier -Date: Thu Jun 19 10:19:41 2014 +0100 - - arm64: KVM: move HCR_EL2.{IMO, FMO} manipulation into the vgic switch code - - GICv3 requires the IMO and FMO bits to be tightly coupled with some - of the interrupt controller's register switch. - - In order to have similar code paths, move the manipulation of these - bits to the GICv2 switch code. - - Acked-by: Catalin Marinas - Reviewed-by: Christoffer Dall - Signed-off-by: Marc Zyngier - -commit 7454825239cf45a68e3f4762a2e8bc7d48cc9dcf -Author: Marc Zyngier -Date: Thu Jun 19 10:19:40 2014 +0100 - - arm64: KVM: split GICv2 world switch from hyp code - - Move the GICv2 world switch code into its own file, and add the - necessary indirection to the arm64 switch code. - - Also introduce a new type field to the vgic_params structure. - - Acked-by: Catalin Marinas - Reviewed-by: Christoffer Dall - Signed-off-by: Marc Zyngier - -commit 3683c401f6baf5f423d84fb79463a71a9bb83193 -Author: Marc Zyngier -Date: Thu Jun 19 10:19:39 2014 +0100 - - arm64: KVM: remove __kvm_hyp_code_{start, end} from hyp.S - - We already have __hyp_text_{start,end} to express the boundaries - of the HYP text section, and __kvm_hyp_code_{start,end} are getting - in the way of a more modular world switch code. - - Just turn __kvm_hyp_code_{start,end} into #defines mapping the - linker-emited symbols. - - Acked-by: Catalin Marinas - Reviewed-by: Christoffer Dall - Signed-off-by: Marc Zyngier - -commit db14591a1ee58c7b5184e5133b6d3d01bd800f32 -Author: Marc Zyngier -Date: Thu Jun 19 10:19:38 2014 +0100 - - KVM: ARM: vgic: revisit implementation of irqchip_in_kernel - - So far, irqchip_in_kernel() was implemented by testing the value of - vctrl_base, which worked fine with GICv2. - - With GICv3, this field is useless, as we're using system registers - instead of a emmory mapped interface. To solve this, add a boolean - flag indicating if the we're using a vgic or not. - - Reviewed-by: Christoffer Dall - Signed-off-by: Marc Zyngier - -commit a2059979751390473cfdb4e4a8b1215f4329234c -Author: Marc Zyngier -Date: Thu Jun 19 10:19:37 2014 +0100 - - KVM: ARM: vgic: split GICv2 backend from the main vgic code - - Brutally hack the innocent vgic code, and move the GICv2 specific code - to its own file, using vgic_ops and vgic_params as a way to pass - information between the two blocks. - - Acked-by: Catalin Marinas - Reviewed-by: Christoffer Dall - Signed-off-by: Marc Zyngier - -commit 997913f5ee0b3edb9d63015b984876ce88dcacc1 -Author: Marc Zyngier -Date: Thu Jun 19 10:19:36 2014 +0100 - - KVM: ARM: introduce vgic_params structure - - Move all the data specific to a given GIC implementation into its own - little structure. - - Acked-by: Catalin Marinas - Reviewed-by: Christoffer Dall - Signed-off-by: Marc Zyngier - -commit 64aa80c7c6133b18442c0e648c833fdbafc71c13 -Author: Marc Zyngier -Date: Thu Jun 19 10:19:35 2014 +0100 - - KVM: ARM: vgic: introduce vgic_enable - - Move the code dealing with enabling the VGIC on to vgic_ops. - - Acked-by: Catalin Marinas - Reviewed-by: Christoffer Dall - Signed-off-by: Marc Zyngier - -commit a3541bd1a3edeae13f4dc6cb1236d1fa6b1ff999 -Author: Marc Zyngier -Date: Thu Jun 19 10:19:34 2014 +0100 - - KVM: ARM: vgic: abstract VMCR access - - Instead of directly messing with with the GICH_VMCR bits for the CPU - interface save/restore code, add accessors that encode/decode the - entire set of registers exposed by VMCR. - - Not the most efficient thing, but given that this code is only used - by the save/restore code, performance is far from being critical. - - Reviewed-by: Christoffer Dall - Signed-off-by: Marc Zyngier - -commit e4a2b077cd5cfb1898fe1df98daa6f0bfaf574e4 -Author: Marc Zyngier -Date: Thu Jun 19 10:19:33 2014 +0100 - - KVM: ARM: vgic: move underflow handling to vgic_ops - - Move the code dealing with LR underflow handling to its own functions, - and make them accessible through vgic_ops. - - Acked-by: Catalin Marinas - Reviewed-by: Christoffer Dall - Signed-off-by: Marc Zyngier - -commit 2ec7fc615658e4c75437b7e702130733d0e59bbd -Author: Marc Zyngier -Date: Thu Jun 19 10:19:32 2014 +0100 - - KVM: ARM: vgic: abstract MISR decoding - - Instead of directly dealing with the GICH_MISR bits, move the code to - its own function and use a couple of public flags to represent the - actual state. - - Acked-by: Catalin Marinas - Reviewed-by: Christoffer Dall - Signed-off-by: Marc Zyngier - -commit 75fbfe0b0d0645f99612ab4c65ede696291d0fb3 -Author: Marc Zyngier -Date: Thu Jun 19 10:19:31 2014 +0100 - - KVM: ARM: vgic: abstract EISR bitmap access - - Move the GICH_EISR access to its own function. - - Acked-by: Catalin Marinas - Reviewed-by: Christoffer Dall - Signed-off-by: Marc Zyngier - -commit 58922f2fe73a8c27f502289f89f39a60f0be9e63 -Author: Marc Zyngier -Date: Thu Jun 19 10:19:30 2014 +0100 - - KVM: ARM: vgic: abstract access to the ELRSR bitmap - - Move the GICH_ELRSR access to its own functions, and add them to - the vgic_ops structure. - - Acked-by: Catalin Marinas - Reviewed-by: Christoffer Dall - Signed-off-by: Marc Zyngier - -commit 62b5e49b44aa033d4489108a84310d1ac074ec11 -Author: Marc Zyngier -Date: Thu Jun 19 10:19:29 2014 +0100 - - KVM: ARM: vgic: introduce vgic_ops and LR manipulation primitives - - In order to split the various register manipulation from the main vgic - code, introduce a vgic_ops structure, and start by abstracting the - LR manipulation code with a couple of accessors. - - Reviewed-by: Christoffer Dall - Signed-off-by: Marc Zyngier - -commit dad9fe9a8274b6fed74a348b09a131f96560f47a -Author: Marc Zyngier -Date: Thu Jun 19 10:19:28 2014 +0100 - - KVM: arm/arm64: vgic: move GICv2 registers to their own structure - - In order to make way for the GICv3 registers, move the v2-specific - registers to their own structure. - - Acked-by: Catalin Marinas - Reviewed-by: Christoffer Dall - Signed-off-by: Marc Zyngier - -commit 97e409937d206ca0c97a8e143f3cb9736d6e8ac7 -Author: Marc Zyngier -Date: Thu Jun 19 10:19:27 2014 +0100 - - arm64: boot protocol documentation update for GICv3 - - Linux has some requirements that must be satisfied in order to boot - on a system built with a GICv3. - - Acked-by: Christoffer Dall - Signed-off-by: Marc Zyngier - -commit fdd6a7889226f60469933ae5bf50c168ba2ceb27 -Author: Marc Zyngier -Date: Thu Jun 19 10:19:26 2014 +0100 - - arm64: GICv3 device tree binding documentation - - Add the necessary documentation to support GICv3. - - Cc: Thomas Gleixner - Cc: Mark Rutland - Cc: Jason Cooper - Acked-by: Catalin Marinas - Acked-by: Rob Herring - Acked-by: Christoffer Dall - Signed-off-by: Marc Zyngier - -commit 4ab4528bd42f832c10a9a07f77c8d96749fca0db -Author: Marc Zyngier -Date: Thu Jun 19 10:19:25 2014 +0100 - - arm64: initial support for GICv3 - - The Generic Interrupt Controller (version 3) offers services that are - similar to GICv2, with a number of additional features: - - Affinity routing based on the CPU MPIDR (ARE) - - System register for the CPU interfaces (SRE) - - Support for more that 8 CPUs - - Locality-specific Peripheral Interrupts (LPIs) - - Interrupt Translation Services (ITS) - - This patch adds preliminary support for GICv3 with ARE and SRE, - non-secure mode only. It relies on higher exception levels to grant ARE - and SRE access. - - Support for LPI and ITS will be added at a later time. - - Cc: Thomas Gleixner - Cc: Jason Cooper - Reviewed-by: Zi Shen Lim - Reviewed-by: Christoffer Dall - Reviewed-by: Tirumalesh Chalamarla - Reviewed-by: Yun Wu - Reviewed-by: Zhen Lei - Tested-by: Tirumalesh Chalamarla - Tested-by: Radha Mohan Chintakuntla - Acked-by: Radha Mohan Chintakuntla - Acked-by: Catalin Marinas - Signed-off-by: Marc Zyngier - -commit 76a9db9c074d536b3a310246aaca6c949c6e1b43 -Author: Marc Zyngier -Date: Thu Jun 19 10:19:24 2014 +0100 - - ARM: GIC: move some bits of GICv2 to a library-type file - - A few GICv2 low-level function are actually very useful to GICv3, - and it makes some sense to share them across the two drivers. - They end-up in their own file, with an additional parameter used - to ensure an optional synchronization (unused on GICv2). - - Cc: Thomas Gleixner - Cc: Jason Cooper - Acked-by: Christoffer Dall - Signed-off-by: Marc Zyngier - -commit 24ee5c9fa14106f699027a80ef5bece8a02d3640 -Author: Mark Salter -Date: Thu Jun 12 15:10:22 2014 -0400 - - rtc: ia64: allow other architectures to use EFI RTC - - Currently, the rtc-efi driver is restricted to ia64 only. - Newer architectures with EFI support may want to also use - that driver. This patch moves the platform device setup - from ia64 into drivers/rtc and allow any architecture with - CONFIG_EFI=y to use the rtc-efi driver. - - Signed-off-by: Mark Salter - -commit f0cb397f038b00d6a3d3aafaa56815e8615b7152 -Author: Don Dutile -Date: Tue Mar 25 20:22:26 2014 -0400 - - pmu: Adding support for Xgene PMUs - - Message-id: <1395778948-47814-2-git-send-email-ddutile@redhat.com> - Patchwork-id: 78602 - O-Subject: [PATCH 1/3] pmu: Adding support for Xgene PMUs - Bugzilla: 1079110 - - Backport of these two posted (but not upstream) patches. - Combined into single patch due to gic-patch dependency. - - Signed-off-by: Donald Dutile - -commit 7fabb73d32c81cedc5c7ad11a3f3e6c96cd79f50 -Author: Mark Salter -Date: Sun Jun 15 09:06:55 2014 -0400 - - arm64: fix up APM Mustang devicetree - - These are changes needed when loading device tree blob built with - kernel. i.e. with grub. These are not needed when using devicetree - from Tianocore which will be fixed up at tianocore runtime. - - Signed-off-by: Mark Salter - -commit a3d5ec7e0cad00c3b89abae91813910470d209b1 -Author: Kyle McMartin -Date: Tue May 13 22:25:26 2014 -0400 - - arm64: don't set READ_IMPLIES_EXEC for EM_AARCH64 ELF objects - - Message-id: <20140513222526.GC26038@redacted.bos.redhat.com> - Patchwork-id: 79789 - O-Subject: [ACADIA PATCH] arm64: don't set READ_IMPLIES_EXEC for EM_AARCH64 ELF objects - Bugzilla: 1085528 - - BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1085528 - Upstream: submitted soon - - [Sadly this isn't (yet) sufficient... but it fixes at least one issue - here... cat /proc/$$/personality shows READ_IMPLIES_EXEC before. I'll - try to figure the rest out tomorrow.] - - Currently, we're accidentally ending up with executable stacks on - AArch64 when the ABI says we shouldn't be, and relying on glibc to fix - things up for us when we're loaded. However, SELinux will deny us - mucking with the stack, and hit us with execmem AVCs. - - The reason this is happening is somewhat complex: - - fs/binfmt_elf.c:load_elf_binary() - - initializes executable_stack = EXSTACK_DEFAULT implying the - architecture should make up its mind. - - does a pile of loading goo - - runs through the program headers, looking for PT_GNU_STACK - and setting (or unsetting) executable_stack if it finds it. - - This is our first problem, we won't generate these unless an - executable stack is explicitly requested. - - - more ELF loading goo - - sets whether we're a compat task or not (TIF_32BIT) based on compat.h - - for compat reasons (pre-GNU_STACK) checks if the READ_IMPLIES_EXEC - flag should be set for ancient toolchains - - Here's our second problem, we test if read_implies_exec based on - stk != EXSTACK_DISABLE_X, which is true since stk == EXSTACK_DEFAULT. - - So we set current->personality |= READ_IMPLIES_EXEC like a broken - legacy toolchain would want. - - - Now we call setup_arg_pages to set up the stack... - - fs/exec.c:setup_arg_pages() - - lots of magic happens here - - vm_flags gets initialized to VM_STACK_FLAGS - - Here's our third problem, VM_STACK_FLAGS on arm64 is - VM_DEFAULT_DATA_FLAG which tests READ_IMPLIES_EXEC and sets VM_EXEC - if it's true. So we end up with an executable stack mapping, since we - don't have executable_stack set (it's still EXSTACK_DEFAULT at this - point) to unset it anywhere. - - Bang. execstack AVC when the program starts running. - - The easiest way I can see to fix this is to test if we're a legacy task - and fix it up there. But that's not as simple as it sounds, because - the 32-bit ABI depends on what revision of the CPU we've enabled (not - that it matters since we're ARMv8...) Regardless, in the compat case, - set READ_IMPLIES_EXEC if we've found a GNU_STACK header which explicitly - requested it as in arch/arm/kernel/elf.c:arm_elf_read_implies_exec(). - - Signed-off-by: Kyle McMartin - Signed-off-by: Donald Dutile - -commit 83c13f2718624a69568121628bd7b51c67a14dea -Author: Mark Salter -Date: Fri Jun 13 00:37:11 2014 -0400 - - arm64: fix soft lockup due to large tlb flush range - - Under certain loads, this soft lockup has been observed: - - BUG: soft lockup - CPU#2 stuck for 22s! [ip6tables:1016] - Modules linked in: ip6t_rpfilter ip6t_REJECT cfg80211 rfkill xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw vfat fat efivarfs xfs libcrc32c - - CPU: 2 PID: 1016 Comm: ip6tables Not tainted 3.13.0-0.rc7.30.sa2.aarch64 #1 - task: fffffe03e81d1400 ti: fffffe03f01f8000 task.ti: fffffe03f01f8000 - PC is at __cpu_flush_kern_tlb_range+0xc/0x40 - LR is at __purge_vmap_area_lazy+0x28c/0x3ac - pc : [] lr : [] pstate: 80000145 - sp : fffffe03f01fbb70 - x29: fffffe03f01fbb70 x28: fffffe03f01f8000 - x27: fffffe0000b19000 x26: 00000000000000d0 - x25: 000000000000001c x24: fffffe03f01fbc50 - x23: fffffe03f01fbc58 x22: fffffe03f01fbc10 - x21: fffffe0000b2a3f8 x20: 0000000000000802 - x19: fffffe0000b2a3c8 x18: 000003fffdf52710 - x17: 000003ff9d8bb910 x16: fffffe000050fbfc - x15: 0000000000005735 x14: 000003ff9d7e1a5c - x13: 0000000000000000 x12: 000003ff9d7e1a5c - x11: 0000000000000007 x10: fffffe0000c09af0 - x9 : fffffe0000ad1000 x8 : 000000000000005c - x7 : fffffe03e8624000 x6 : 0000000000000000 - x5 : 0000000000000000 x4 : 0000000000000000 - x3 : fffffe0000c09cc8 x2 : 0000000000000000 - x1 : 000fffffdfffca80 x0 : 000fffffcd742150 - - The __cpu_flush_kern_tlb_range() function looks like: - - ENTRY(__cpu_flush_kern_tlb_range) - dsb sy - lsr x0, x0, #12 - lsr x1, x1, #12 - 1: tlbi vaae1is, x0 - add x0, x0, #1 - cmp x0, x1 - b.lo 1b - dsb sy - isb - ret - ENDPROC(__cpu_flush_kern_tlb_range) - - The above soft lockup shows the PC at tlbi insn with: - - x0 = 0x000fffffcd742150 - x1 = 0x000fffffdfffca80 - - So __cpu_flush_kern_tlb_range has 0x128ba930 tlbi flushes left - after it has already been looping for 23 seconds!. - - Looking up one frame at __purge_vmap_area_lazy(), there is: - - ... - list_for_each_entry_rcu(va, &vmap_area_list, list) { - if (va->flags & VM_LAZY_FREE) { - if (va->va_start < *start) - *start = va->va_start; - if (va->va_end > *end) - *end = va->va_end; - nr += (va->va_end - va->va_start) >> PAGE_SHIFT; - list_add_tail(&va->purge_list, &valist); - va->flags |= VM_LAZY_FREEING; - va->flags &= ~VM_LAZY_FREE; - } - } - ... - if (nr || force_flush) - flush_tlb_kernel_range(*start, *end); - - So if two areas are being freed, the range passed to - flush_tlb_kernel_range() may be as large as the vmalloc - space. For arm64, this is ~240GB for 4k pagesize and ~2TB - for 64kpage size. - - This patch works around this problem by adding a loop limit. - If the range is larger than the limit, use flush_tlb_all() - rather than flushing based on individual pages. The limit - chosen is arbitrary and would be better if based on the - actual size of the tlb. I looked through the ARM ARM but - didn't see any easy way to get the actual tlb size, so for - now the arbitrary limit is better than the soft lockup. - - Signed-off-by: Mark Salter - -commit 88ccd0e487a20575b4c9610c4df095af47f15d32 -Author: Mark Salter -Date: Tue Jun 24 09:50:28 2014 -0400 - - arm64: use EFI as last resort for reboot and poweroff - - Wire in support for EFI reboot and poweroff functions. We use these - only if no other mechanism has been registered with arm_pm_reboot - and/or pm_power_off respectively. - - Signed-off-by: Mark Salter - -commit b99cd7b41a68bdf74034044e53992cb6d60cd5c5 -Author: Matt Fleming -Date: Fri Jun 13 12:39:55 2014 +0100 - - x86/reboot: Add EFI reboot quirk for ACPI Hardware Reduced flag - - It appears that the BayTrail-T class of hardware requires EFI in order - to powerdown and reboot and no other reliable method exists. - - This quirk is generally applicable to all hardware that has the ACPI - Hardware Reduced bit set, since usually ACPI would be the preferred - method. - - Cc: Len Brown - Cc: Mark Salter - Cc: "Rafael J. Wysocki" - Signed-off-by: Matt Fleming - -commit b0a9441c25fc622d21ea838670292886db5e4774 -Author: Matt Fleming -Date: Fri Jun 13 12:35:21 2014 +0100 - - efi/reboot: Allow powering off machines using EFI - - Not only can EfiResetSystem() be used to reboot, it can also be used to - power down machines. - - By and large, this functionality doesn't work very well across the range - of EFI machines in the wild, so it should definitely only be used as a - last resort. In an ideal world, this wouldn't be needed at all. - - Unfortunately, we're starting to see machines where EFI is the *only* - reliable way to power down, and nothing else, not PCI, not ACPI, works. - - efi_poweroff_required() should be implemented on a per-architecture - basis, since exactly when we should be using EFI runtime services is a - platform-specific decision. There's no analogue for reboot because each - architecture handles reboot very differently - the x86 code in - particular is pretty complex. - - Patches to enable this for specific classes of hardware will be - submitted separately. - - Cc: Mark Salter - Signed-off-by: Matt Fleming - -commit 178be6962ce99a8f97c857acb72382568fad5a09 -Author: Matt Fleming -Date: Fri Jun 13 12:22:22 2014 +0100 - - efi/reboot: Add generic wrapper around EfiResetSystem() - - Implement efi_reboot(), which is really just a wrapper around the - EfiResetSystem() EFI runtime service, but it does at least allow us to - funnel all callers through a single location. - - It also simplifies the callsites since users no longer need to check to - see whether EFI_RUNTIME_SERVICES are enabled. - - Cc: Tony Luck - Cc: Mark Salter - Signed-off-by: Matt Fleming - -commit 741309a7ffef94dbd1c4c92f2d29efefb2f7d3ea -Author: Saurabh Tangri -Date: Mon Jun 2 05:18:35 2014 -0700 - - x86/efi: Move all workarounds to a separate file quirks.c - - Currently, it's difficult to find all the workarounds that are - applied when running on EFI, because they're littered throughout - various code paths. This change moves all of them into a separate - file with the hope that it will be come the single location for all - our well documented quirks. - - Signed-off-by: Saurabh Tangri - Signed-off-by: Matt Fleming - -commit 7750926fa769afc57a2d9ea4491e83b3d3e1e562 -Author: Suman Tripathi -Date: Thu Jun 19 06:50:08 2014 -0400 - - libahci: Implement the function ahci_restart_engine to restart the port dma engine. - - This patch adds an function to restart the port dma engine. - - Signed-off-by: Loc Ho - Signed-off-by: Suman Tripathi - -commit 1952edc2d9e0236efaf573e11ed194052b893fd6 -Author: Iyappan Subramanian -Date: Fri Jun 20 16:18:16 2014 -0700 - - drivers: net: Add APM X-Gene SoC ethernet driver support. - - This patch adds network driver for APM X-Gene SoC ethernet. - - Signed-off-by: Iyappan Subramanian - Signed-off-by: Ravi Patel - Signed-off-by: Keyur Chudgar - -commit c5f8a2ce5b5ae15e8c68147463a19859a70c7a5b -Author: Iyappan Subramanian -Date: Fri Jun 20 16:18:15 2014 -0700 - - dts: Add bindings for APM X-Gene SoC ethernet driver - - This patch adds bindings for APM X-Gene SoC ethernet driver. - - Signed-off-by: Iyappan Subramanian - Signed-off-by: Ravi Patel - Signed-off-by: Keyur Chudgar - -commit ea7b7777362958223ca018cea22dba4074df102c -Author: Iyappan Subramanian -Date: Fri Jun 20 16:18:14 2014 -0700 - - Documentation: dts: Add bindings for APM X-Gene SoC ethernet driver - - This patch adds documentation for APM X-Gene SoC ethernet DTS binding. - - Signed-off-by: Iyappan Subramanian - Signed-off-by: Ravi Patel - Signed-off-by: Keyur Chudgar - -commit f2d2384a3d914cdd6cae7afdf3d6394c157d22b2 -Author: Iyappan Subramanian -Date: Fri Jun 20 16:18:13 2014 -0700 - - MAINTAINERS: Add entry for APM X-Gene SoC ethernet driver - - This patch adds a MAINTAINERS entry for APM X-Gene SoC - ethernet driver. - - Signed-off-by: Iyappan Subramanian - Signed-off-by: Ravi Patel - Signed-off-by: Keyur Chudgar - diff --git a/Documentation/arm64/booting.txt b/Documentation/arm64/booting.txt -index 37fc4f6..e28ccec 100644 +index 37fc4f6..da1d4bf 100644 --- a/Documentation/arm64/booting.txt +++ b/Documentation/arm64/booting.txt -@@ -141,6 +141,12 @@ Before jumping into the kernel, the following conditions must be met: +@@ -141,6 +141,14 @@ Before jumping into the kernel, the following conditions must be met: the kernel image will be entered must be initialised by software at a higher exception level to prevent execution in an UNKNOWN state. -+ For systems with a GICv3 interrupt controller, it is expected that: -+ - If EL3 is present, it must program ICC_SRE_EL3.Enable (bit 3) to -+ 0b1 and ICC_SRE_EL3.SRE (bit 0) to 0b1. -+ - If the kernel is entered at EL1, EL2 must set ICC_SRE_EL2.Enable -+ (bit 3) to 0b1 and ICC_SRE_EL2.SRE (bit 0) to 0b1. ++ For systems with a GICv3 interrupt controller: ++ - If EL3 is present: ++ ICC_SRE_EL3.Enable (bit 3) must be initialiased to 0b1. ++ ICC_SRE_EL3.SRE (bit 0) must be initialised to 0b1. ++ - If the kernel is entered at EL1: ++ ICC.SRE_EL2.Enable (bit 3) must be initialised to 0b1 ++ ICC_SRE_EL2.SRE (bit 0) must be initialised to 0b1. + The requirements described above for CPU mode, caches, MMUs, architected timers, coherency and system registers apply to all CPUs. All CPUs must @@ -863,11 +180,69 @@ index 0000000..3e2a295 +&menet { + status = "ok"; +}; +diff --git a/Documentation/devicetree/bindings/pci/xgene-pci.txt b/Documentation/devicetree/bindings/pci/xgene-pci.txt +new file mode 100644 +index 0000000..e19fdb8 +--- /dev/null ++++ b/Documentation/devicetree/bindings/pci/xgene-pci.txt +@@ -0,0 +1,52 @@ ++* AppliedMicro X-Gene PCIe interface ++ ++Required properties: ++- device_type: set to "pci" ++- compatible: should contain "apm,xgene-pcie" to identify the core. ++- reg: A list of physical base address and length for each set of controller ++ registers. Must contain an entry for each entry in the reg-names ++ property. ++- reg-names: Must include the following entries: ++ "csr": controller configuration registers. ++ "cfg": pcie configuration space registers. ++- #address-cells: set to <3> ++- #size-cells: set to <2> ++- ranges: ranges for the outbound memory, I/O regions. ++- dma-ranges: ranges for the inbound memory regions. ++- #interrupt-cells: set to <1> ++- interrupt-map-mask and interrupt-map: standard PCI properties ++ to define the mapping of the PCIe interface to interrupt ++ numbers. ++- clocks: from common clock binding: handle to pci clock. ++ ++Optional properties: ++- status: Either "ok" or "disabled". ++ ++Example: ++ ++SoC specific DT Entry: ++ pcie0: pcie@1f2b0000 { ++ status = "disabled"; ++ device_type = "pci"; ++ compatible = "apm,xgene-storm-pcie", "apm,xgene-pcie"; ++ #interrupt-cells = <1>; ++ #size-cells = <2>; ++ #address-cells = <3>; ++ reg = < 0x00 0x1f2b0000 0x0 0x00010000 /* Controller registers */ ++ 0xe0 0xd0000000 0x0 0x00200000>; /* PCI config space */ ++ reg-names = "csr", "cfg"; ++ ranges = <0x01000000 0x00 0x00000000 0xe0 0x00000000 0x00 0x00010000 /* io */ ++ 0x02000000 0x00 0x10000000 0xe0 0x10000000 0x00 0x80000000>; /* mem */ ++ dma-ranges = <0x42000000 0x40 0x00000000 0x40 0x00000000 0x40 0x00000000>; ++ interrupt-map-mask = <0x0 0x0 0x0 0x7>; ++ interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0xc2 0x1 ++ 0x0 0x0 0x0 0x2 &gic 0x0 0xc3 0x1 ++ 0x0 0x0 0x0 0x3 &gic 0x0 0xc4 0x1 ++ 0x0 0x0 0x0 0x4 &gic 0x0 0xc5 0x1>; ++ clocks = <&pcie0clk 0>; ++ }; ++ ++Board specific DT Entry: ++ &pcie0 { ++ status = "ok"; ++ }; diff --git a/MAINTAINERS b/MAINTAINERS -index 702ca10..5ce8e87 100644 +index 61a8f48..78946ce 100644 --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -700,6 +700,14 @@ S: Maintained +@@ -699,6 +699,14 @@ S: Maintained F: drivers/net/appletalk/ F: net/appletalk/ @@ -882,6 +257,20 @@ index 702ca10..5ce8e87 100644 APTINA CAMERA SENSOR PLL M: Laurent Pinchart L: linux-media@vger.kernel.org +@@ -6851,6 +6859,13 @@ S: Maintained + F: Documentation/devicetree/bindings/pci/host-generic-pci.txt + F: drivers/pci/host/pci-host-generic.c + ++PCI DRIVER FOR APPLIEDMICRO XGENE ++M: Tanmay Inamdar ++L: linux-pci@vger.kernel.org ++L: linux-arm-kernel@lists.infradead.org ++S: Maintained ++F: drivers/pci/host/pci-xgene.c ++ + PCMCIA SUBSYSTEM + P: Linux PCMCIA Team + L: linux-pcmcia@lists.infradead.org diff --git a/arch/arm/include/asm/kvm_host.h b/arch/arm/include/asm/kvm_host.h index 193ceaf..d6d5227 100644 --- a/arch/arm/include/asm/kvm_host.h @@ -992,10 +381,10 @@ index 76af9302..e4eaf30 100644 1: ldr r6, [r3], #4 str r6, [r2], #4 diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig -index a474de34..7fc6e2e 100644 +index 839f48c..23871dd 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig -@@ -10,6 +10,7 @@ config ARM64 +@@ -11,6 +11,7 @@ config ARM64 select ARM_AMBA select ARM_ARCH_TIMER select ARM_GIC @@ -1003,11 +392,44 @@ index a474de34..7fc6e2e 100644 select BUILDTIME_EXTABLE_SORT select CLONE_BACKWARDS select COMMON_CLK +@@ -76,7 +77,7 @@ config MMU + def_bool y + + config NO_IOPORT_MAP +- def_bool y ++ def_bool y if !PCI + + config STACKTRACE_SUPPORT + def_bool y +@@ -151,6 +152,23 @@ menu "Bus support" + config ARM_AMBA + bool + ++config PCI ++ bool "PCI support" ++ help ++ This feature enables support for PCIe bus system. If you say Y ++ here, the kernel will include drivers and infrastructure code ++ to support PCIe bus devices. ++ ++config PCI_DOMAINS ++ def_bool PCI ++ ++config PCI_SYSCALL ++ def_bool PCI ++ ++source "drivers/pci/Kconfig" ++source "drivers/pci/pcie/Kconfig" ++source "drivers/pci/hotplug/Kconfig" ++ + endmenu + + menu "Kernel Features" diff --git a/arch/arm64/boot/dts/apm-mustang.dts b/arch/arm64/boot/dts/apm-mustang.dts -index 6541962..b2f5622 100644 +index 6541962..0cb67fc 100644 --- a/arch/arm64/boot/dts/apm-mustang.dts +++ b/arch/arm64/boot/dts/apm-mustang.dts -@@ -28,3 +28,7 @@ +@@ -28,3 +28,15 @@ &serial0 { status = "ok"; }; @@ -1015,8 +437,16 @@ index 6541962..b2f5622 100644 +&menet { + status = "ok"; +}; ++ ++&pcie0clk { ++ status = "ok"; ++}; ++ ++&pcie0 { ++ status = "ok"; ++}; diff --git a/arch/arm64/boot/dts/apm-storm.dtsi b/arch/arm64/boot/dts/apm-storm.dtsi -index 40aa96c..846ee3a 100644 +index 40aa96c..fb2ee54 100644 --- a/arch/arm64/boot/dts/apm-storm.dtsi +++ b/arch/arm64/boot/dts/apm-storm.dtsi @@ -24,56 +24,56 @@ @@ -1113,7 +543,169 @@ index 40aa96c..846ee3a 100644 }; sataphy1clk: sataphy1clk@1f21c000 { -@@ -278,7 +282,7 @@ +@@ -270,6 +274,161 @@ + enable-mask = <0x2>; + clock-output-names = "rtcclk"; + }; ++ ++ pcie0clk: pcie0clk@1f2bc000 { ++ status = "disabled"; ++ compatible = "apm,xgene-device-clock"; ++ #clock-cells = <1>; ++ clocks = <&socplldiv2 0>; ++ reg = <0x0 0x1f2bc000 0x0 0x1000>; ++ reg-names = "csr-reg"; ++ clock-output-names = "pcie0clk"; ++ }; ++ ++ pcie1clk: pcie1clk@1f2cc000 { ++ status = "disabled"; ++ compatible = "apm,xgene-device-clock"; ++ #clock-cells = <1>; ++ clocks = <&socplldiv2 0>; ++ reg = <0x0 0x1f2cc000 0x0 0x1000>; ++ reg-names = "csr-reg"; ++ clock-output-names = "pcie1clk"; ++ }; ++ ++ pcie2clk: pcie2clk@1f2dc000 { ++ status = "disabled"; ++ compatible = "apm,xgene-device-clock"; ++ #clock-cells = <1>; ++ clocks = <&socplldiv2 0>; ++ reg = <0x0 0x1f2dc000 0x0 0x1000>; ++ reg-names = "csr-reg"; ++ clock-output-names = "pcie2clk"; ++ }; ++ ++ pcie3clk: pcie3clk@1f50c000 { ++ status = "disabled"; ++ compatible = "apm,xgene-device-clock"; ++ #clock-cells = <1>; ++ clocks = <&socplldiv2 0>; ++ reg = <0x0 0x1f50c000 0x0 0x1000>; ++ reg-names = "csr-reg"; ++ clock-output-names = "pcie3clk"; ++ }; ++ ++ pcie4clk: pcie4clk@1f51c000 { ++ status = "disabled"; ++ compatible = "apm,xgene-device-clock"; ++ #clock-cells = <1>; ++ clocks = <&socplldiv2 0>; ++ reg = <0x0 0x1f51c000 0x0 0x1000>; ++ reg-names = "csr-reg"; ++ clock-output-names = "pcie4clk"; ++ }; ++ }; ++ ++ pcie0: pcie@1f2b0000 { ++ status = "disabled"; ++ device_type = "pci"; ++ compatible = "apm,xgene-storm-pcie", "apm,xgene-pcie"; ++ #interrupt-cells = <1>; ++ #size-cells = <2>; ++ #address-cells = <3>; ++ reg = < 0x00 0x1f2b0000 0x0 0x00010000 /* Controller registers */ ++ 0xe0 0xd0000000 0x0 0x00200000>; /* PCI config space */ ++ reg-names = "csr", "cfg"; ++ ranges = <0x01000000 0x00 0x00000000 0xe0 0x00000000 0x00 0x00010000 /* io */ ++ 0x02000000 0x00 0x10000000 0xe0 0x10000000 0x00 0x80000000>; /* mem */ ++ dma-ranges = <0x42000000 0x40 0x00000000 0x40 0x00000000 0x40 0x00000000>; ++ interrupt-map-mask = <0x0 0x0 0x0 0x7>; ++ interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0xc2 0x1 ++ 0x0 0x0 0x0 0x2 &gic 0x0 0xc3 0x1 ++ 0x0 0x0 0x0 0x3 &gic 0x0 0xc4 0x1 ++ 0x0 0x0 0x0 0x4 &gic 0x0 0xc5 0x1>; ++ clocks = <&pcie0clk 0>; ++ }; ++ ++ pcie1: pcie@1f2c0000 { ++ status = "disabled"; ++ device_type = "pci"; ++ compatible = "apm,xgene-storm-pcie", "apm,xgene-pcie"; ++ #interrupt-cells = <1>; ++ #size-cells = <2>; ++ #address-cells = <3>; ++ reg = < 0x00 0x1f2c0000 0x0 0x00010000 /* Controller registers */ ++ 0xd0 0xd0000000 0x0 0x00200000>; /* PCI config space */ ++ reg-names = "csr", "cfg"; ++ ranges = <0x01000000 0x0 0x00000000 0xd0 0x00000000 0x00 0x00010000 /* io */ ++ 0x02000000 0x0 0x10000000 0xd0 0x10000000 0x00 0x80000000>; /* mem */ ++ dma-ranges = <0x42000000 0x40 0x00000000 0x40 0x00000000 0x40 0x00000000>; ++ interrupt-map-mask = <0x0 0x0 0x0 0x7>; ++ interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0xc8 0x1 ++ 0x0 0x0 0x0 0x2 &gic 0x0 0xc9 0x1 ++ 0x0 0x0 0x0 0x3 &gic 0x0 0xca 0x1 ++ 0x0 0x0 0x0 0x4 &gic 0x0 0xcb 0x1>; ++ clocks = <&pcie1clk 0>; ++ }; ++ ++ pcie2: pcie@1f2d0000 { ++ status = "disabled"; ++ device_type = "pci"; ++ compatible = "apm,xgene-storm-pcie", "apm,xgene-pcie"; ++ #interrupt-cells = <1>; ++ #size-cells = <2>; ++ #address-cells = <3>; ++ reg = < 0x00 0x1f2d0000 0x0 0x00010000 /* Controller registers */ ++ 0x90 0xd0000000 0x0 0x00200000>; /* PCI config space */ ++ reg-names = "csr", "cfg"; ++ ranges = <0x01000000 0x0 0x00000000 0x90 0x00000000 0x0 0x00010000 /* io */ ++ 0x02000000 0x0 0x10000000 0x90 0x10000000 0x0 0x80000000>; /* mem */ ++ dma-ranges = <0x42000000 0x40 0x00000000 0x40 0x00000000 0x40 0x00000000>; ++ interrupt-map-mask = <0x0 0x0 0x0 0x7>; ++ interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0xce 0x1 ++ 0x0 0x0 0x0 0x2 &gic 0x0 0xcf 0x1 ++ 0x0 0x0 0x0 0x3 &gic 0x0 0xd0 0x1 ++ 0x0 0x0 0x0 0x4 &gic 0x0 0xd1 0x1>; ++ clocks = <&pcie2clk 0>; ++ }; ++ ++ pcie3: pcie@1f500000 { ++ status = "disabled"; ++ device_type = "pci"; ++ compatible = "apm,xgene-storm-pcie", "apm,xgene-pcie"; ++ #interrupt-cells = <1>; ++ #size-cells = <2>; ++ #address-cells = <3>; ++ reg = < 0x00 0x1f500000 0x0 0x00010000 /* Controller registers */ ++ 0xa0 0xd0000000 0x0 0x00200000>; /* PCI config space */ ++ reg-names = "csr", "cfg"; ++ ranges = <0x01000000 0x0 0x00000000 0xa0 0x00000000 0x0 0x00010000 /* io */ ++ 0x02000000 0x0 0x10000000 0xa0 0x10000000 0x0 0x80000000>; /* mem */ ++ dma-ranges = <0x42000000 0x40 0x00000000 0x40 0x00000000 0x40 0x00000000>; ++ interrupt-map-mask = <0x0 0x0 0x0 0x7>; ++ interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0xd4 0x1 ++ 0x0 0x0 0x0 0x2 &gic 0x0 0xd5 0x1 ++ 0x0 0x0 0x0 0x3 &gic 0x0 0xd6 0x1 ++ 0x0 0x0 0x0 0x4 &gic 0x0 0xd7 0x1>; ++ clocks = <&pcie3clk 0>; ++ }; ++ ++ pcie4: pcie@1f510000 { ++ status = "disabled"; ++ device_type = "pci"; ++ compatible = "apm,xgene-storm-pcie", "apm,xgene-pcie"; ++ #interrupt-cells = <1>; ++ #size-cells = <2>; ++ #address-cells = <3>; ++ reg = < 0x00 0x1f510000 0x0 0x00010000 /* Controller registers */ ++ 0xc0 0xd0000000 0x0 0x00200000>; /* PCI config space */ ++ reg-names = "csr", "cfg"; ++ ranges = <0x01000000 0x0 0x00000000 0xc0 0x00000000 0x0 0x00010000 /* io */ ++ 0x02000000 0x0 0x10000000 0xc0 0x10000000 0x0 0x80000000>; /* mem */ ++ dma-ranges = <0x42000000 0x40 0x00000000 0x40 0x00000000 0x40 0x00000000>; ++ interrupt-map-mask = <0x0 0x0 0x0 0x7>; ++ interrupt-map = <0x0 0x0 0x0 0x1 &gic 0x0 0xda 0x1 ++ 0x0 0x0 0x0 0x2 &gic 0x0 0xdb 0x1 ++ 0x0 0x0 0x0 0x3 &gic 0x0 0xdc 0x1 ++ 0x0 0x0 0x0 0x4 &gic 0x0 0xdd 0x1>; ++ clocks = <&pcie4clk 0>; + }; + + serial0: serial@1c020000 { +@@ -278,7 +437,7 @@ compatible = "ns16550a"; reg = <0 0x1c020000 0x0 0x1000>; reg-shift = <2>; @@ -1122,7 +714,7 @@ index 40aa96c..846ee3a 100644 interrupt-parent = <&gic>; interrupts = <0x0 0x4c 0x4>; }; -@@ -397,5 +401,30 @@ +@@ -397,5 +556,30 @@ #clock-cells = <1>; clocks = <&rtcclk 0>; }; @@ -1153,6 +745,18 @@ index 40aa96c..846ee3a 100644 + }; }; }; +diff --git a/arch/arm64/include/asm/Kbuild b/arch/arm64/include/asm/Kbuild +index 0b3fcf8..07cb417 100644 +--- a/arch/arm64/include/asm/Kbuild ++++ b/arch/arm64/include/asm/Kbuild +@@ -29,6 +29,7 @@ generic-y += mman.h + generic-y += msgbuf.h + generic-y += mutex.h + generic-y += pci.h ++generic-y += pci-bridge.h + generic-y += poll.h + generic-y += preempt.h + generic-y += resource.h diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h index 01d3aab..8186df6 100644 --- a/arch/arm64/include/asm/elf.h @@ -1167,6 +771,20 @@ index 01d3aab..8186df6 100644 #define CORE_DUMP_USE_REGSET #define ELF_EXEC_PAGESIZE PAGE_SIZE +diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h +index e0ecdcf..dc34039 100644 +--- a/arch/arm64/include/asm/io.h ++++ b/arch/arm64/include/asm/io.h +@@ -121,7 +121,8 @@ static inline u64 __raw_readq(const volatile void __iomem *addr) + /* + * I/O port access primitives. + */ +-#define IO_SPACE_LIMIT 0xffff ++#define arch_has_dev_port() (1) ++#define IO_SPACE_LIMIT 0x1ffffff + #define PCI_IOBASE ((void __iomem *)(MODULES_VADDR - SZ_32M)) + + static inline u8 inb(unsigned long addr) diff --git a/arch/arm64/include/asm/kvm_arm.h b/arch/arm64/include/asm/kvm_arm.h index 3d69030..cc83520 100644 --- a/arch/arm64/include/asm/kvm_arm.h @@ -1258,6 +876,61 @@ index 92242ce..4ae9213 100644 +} + #endif /* __ARM64_KVM_HOST_H__ */ +diff --git a/arch/arm64/include/asm/pci.h b/arch/arm64/include/asm/pci.h +new file mode 100644 +index 0000000..3f7856e +--- /dev/null ++++ b/arch/arm64/include/asm/pci.h +@@ -0,0 +1,49 @@ ++#ifndef __ASM_PCI_H ++#define __ASM_PCI_H ++#ifdef __KERNEL__ ++ ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#define PCIBIOS_MIN_IO 0x1000 ++#define PCIBIOS_MIN_MEM 0 ++ ++struct pci_host_bridge *find_pci_host_bridge(struct pci_bus *bus); ++ ++/* ++ * Set to 1 if the kernel should re-assign all PCI bus numbers ++ */ ++#define pcibios_assign_all_busses() \ ++ (pci_has_flag(PCI_REASSIGN_ALL_BUS)) ++ ++/* ++ * PCI address space differs from physical memory address space ++ */ ++#define PCI_DMA_BUS_IS_PHYS (0) ++ ++extern int isa_dma_bridge_buggy; ++ ++#ifdef CONFIG_PCI ++static inline int pci_domain_nr(struct pci_bus *bus) ++{ ++ struct pci_host_bridge *bridge = find_pci_host_bridge(bus); ++ ++ if (bridge) ++ return bridge->domain_nr; ++ ++ return 0; ++} ++ ++static inline int pci_proc_domain(struct pci_bus *bus) ++{ ++ return 1; ++} ++#endif /* CONFIG_PCI */ ++ ++#endif /* __KERNEL__ */ ++#endif /* __ASM_PCI_H */ diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h index b9349c4..e0f37ef 100644 --- a/arch/arm64/include/asm/tlbflush.h @@ -1323,6 +996,18 @@ index 215ad46..7a5df52 100644 #endif /* __ASSEMBLY__ */ #endif /* ! __ASM__VIRT_H */ +diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile +index cdaedad..36b117a 100644 +--- a/arch/arm64/kernel/Makefile ++++ b/arch/arm64/kernel/Makefile +@@ -29,6 +29,7 @@ arm64-obj-$(CONFIG_ARM64_CPU_SUSPEND) += sleep.o suspend.o + arm64-obj-$(CONFIG_JUMP_LABEL) += jump_label.o + arm64-obj-$(CONFIG_KGDB) += kgdb.o + arm64-obj-$(CONFIG_EFI) += efi.o efi-stub.o efi-entry.o ++arm64-obj-$(CONFIG_PCI) += pci.o + + obj-y += $(arm64-obj-y) vdso/ + obj-m += $(arm64-obj-m) diff --git a/arch/arm64/kernel/asm-offsets.c b/arch/arm64/kernel/asm-offsets.c index 646f888..e74654c 100644 --- a/arch/arm64/kernel/asm-offsets.c @@ -1379,7 +1064,7 @@ index 14db1f6..453b7f8 100644 + return pm_power_off == NULL; +} diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S -index a96d3a6..871b4ee 100644 +index a2c1195..d1f7b96 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -22,6 +22,7 @@ @@ -1390,7 +1075,7 @@ index a96d3a6..871b4ee 100644 #include #include -@@ -296,6 +297,23 @@ CPU_LE( bic x0, x0, #(3 << 24) ) // Clear the EE and E0E bits for EL1 +@@ -295,6 +296,23 @@ CPU_LE( bic x0, x0, #(3 << 24) ) // Clear the EE and E0E bits for EL1 msr cnthctl_el2, x0 msr cntvoff_el2, xzr // Clear virtual offset @@ -1402,10 +1087,10 @@ index a96d3a6..871b4ee 100644 + b.ne 3f + + mrs x0, ICC_SRE_EL2 -+ orr x0, x0, #1 // Set ICC_SRE_EL2.SRE==1 -+ orr x0, x0, #(1 << 3) // Set ICC_SRE_EL2.Enable==1 ++ orr x0, x0, #ICC_SRE_EL2_SRE // Set ICC_SRE_EL2.SRE==1 ++ orr x0, x0, #ICC_SRE_EL2_ENABLE // Set ICC_SRE_EL2.Enable==1 + msr ICC_SRE_EL2, x0 -+ isb // Make sure SRE is now 1 ++ isb // Make sure SRE is now set + msr ICH_HCR_EL2, xzr // Reset ICC_HCR_EL2 to defaults + +3: @@ -1426,6 +1111,50 @@ index 0959611..a272f33 100644 #include #include +diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c +new file mode 100644 +index 0000000..955d6d1 +--- /dev/null ++++ b/arch/arm64/kernel/pci.c +@@ -0,0 +1,38 @@ ++/* ++ * Code borrowed from powerpc/kernel/pci-common.c ++ * ++ * Copyright (C) 2003 Anton Blanchard , IBM ++ * Copyright (C) 2014 ARM Ltd. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * version 2 as published by the Free Software Foundation. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++/* ++ * Called after each bus is probed, but before its children are examined ++ */ ++void pcibios_fixup_bus(struct pci_bus *bus) ++{ ++ /* nothing to do, expected to be removed in the future */ ++} ++ ++/* ++ * We don't have to worry about legacy ISA devices, so nothing to do here ++ */ ++resource_size_t pcibios_align_resource(void *data, const struct resource *res, ++ resource_size_t size, resource_size_t align) ++{ ++ return res->start; ++} diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 43b7c34..ec5cbbe 100644 --- a/arch/arm64/kernel/process.c @@ -1782,10 +1511,10 @@ index 0000000..ae21177 + .popsection diff --git a/arch/arm64/kvm/vgic-v3-switch.S b/arch/arm64/kvm/vgic-v3-switch.S new file mode 100644 -index 0000000..4ede9d8 +index 0000000..21e68f6 --- /dev/null +++ b/arch/arm64/kvm/vgic-v3-switch.S -@@ -0,0 +1,266 @@ +@@ -0,0 +1,267 @@ +/* + * Copyright (C) 2012,2013 - ARM Ltd + * Author: Marc Zyngier @@ -2025,8 +1754,9 @@ index 0000000..4ede9d8 + msr ICH_LR1_EL2, x6 + msr ICH_LR0_EL2, x5 + -+ // Ensure that the above will be visible via the memory-mapped -+ // view of the CPU interface (GICV). ++ // Ensure that the above will have reached the ++ // (re)distributors. This ensure the guest will read ++ // the correct values from the memory-mapped interface. + isb + dsb sy + @@ -2053,25 +1783,44 @@ index 0000000..4ede9d8 + + .popsection diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c -index f43db8a..05d6079 100644 +index f43db8a..e90c542 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c -@@ -145,8 +145,17 @@ void __init arm64_memblock_init(void) - early_init_fdt_scan_reserved_mem(); +@@ -60,6 +60,17 @@ static int __init early_initrd(char *p) + early_param("initrd", early_initrd); + #endif + ++/* ++ * Return the maximum physical address for ZONE_DMA (DMA_BIT_MASK(32)). It ++ * currently assumes that for memory starting above 4G, 32-bit devices will ++ * use a DMA offset. ++ */ ++static phys_addr_t max_zone_dma_phys(void) ++{ ++ phys_addr_t offset = memblock_start_of_DRAM() & GENMASK_ULL(63, 32); ++ return min(offset + (1ULL << 32), memblock_end_of_DRAM()); ++} ++ + static void __init zone_sizes_init(unsigned long min, unsigned long max) + { + struct memblock_region *reg; +@@ -70,9 +81,7 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max) /* 4GB maximum for 32-bit only capable devices */ -- if (IS_ENABLED(CONFIG_ZONE_DMA)) -+ if (IS_ENABLED(CONFIG_ZONE_DMA)) { - dma_phys_limit = dma_to_phys(NULL, DMA_BIT_MASK(32)) + 1; -+ /* -+ * If platform doesn't have DRAM within the dma_phys_limit, -+ * remove the limit altogether. This allows one kernel (with -+ * CONFIG_ZONE_DMA defined) to support platforms with 32-bit -+ * only devices and platforms with no 32-bit DRAM. -+ */ -+ if (dma_phys_limit <= memblock_start_of_DRAM()) -+ dma_phys_limit = 0; -+ } + if (IS_ENABLED(CONFIG_ZONE_DMA)) { +- unsigned long max_dma_phys = +- (unsigned long)(dma_to_phys(NULL, DMA_BIT_MASK(32)) + 1); +- max_dma = max(min, min(max, max_dma_phys >> PAGE_SHIFT)); ++ max_dma = PFN_DOWN(max_zone_dma_phys()); + zone_size[ZONE_DMA] = max_dma - min; + } + zone_size[ZONE_NORMAL] = max - max_dma; +@@ -146,7 +155,7 @@ void __init arm64_memblock_init(void) + + /* 4GB maximum for 32-bit only capable devices */ + if (IS_ENABLED(CONFIG_ZONE_DMA)) +- dma_phys_limit = dma_to_phys(NULL, DMA_BIT_MASK(32)) + 1; ++ dma_phys_limit = max_zone_dma_phys(); dma_contiguous_reserve(dma_phys_limit); memblock_allow_resize(); @@ -2807,59 +2556,20 @@ index 0000000..1b9c4c3 +{ + return !!acpi_gbl_reduced_hardware; +} -diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h -index 5513296e5e2e..89b8646b912b 100644 ---- a/drivers/ata/ahci.h -+++ b/drivers/ata/ahci.h -@@ -375,6 +375,8 @@ unsigned int ahci_qc_issue(struct ata_queued_cmd *qc); - int ahci_stop_engine(struct ata_port *ap); - void ahci_start_fis_rx(struct ata_port *ap); - void ahci_start_engine(struct ata_port *ap); -+int ahci_restart_engine(struct ata_port *ap); -+void ahci_sw_activity(struct ata_link *link); - int ahci_check_ready(struct ata_link *link); - int ahci_kick_engine(struct ata_port *ap); - int ahci_port_resume(struct ata_port *ap); -diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c -index 40ea583..3ec5dc7 100644 ---- a/drivers/ata/libahci.c -+++ b/drivers/ata/libahci.c -@@ -747,6 +747,18 @@ static int ahci_set_lpm(struct ata_link *link, enum ata_lpm_policy policy, - return 0; - } +diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c +index ee3a365..f9431b4 100644 +--- a/drivers/ata/ahci_xgene.c ++++ b/drivers/ata/ahci_xgene.c +@@ -131,7 +131,8 @@ static unsigned int xgene_ahci_qc_issue(struct ata_queued_cmd *qc) + struct xgene_ahci_context *ctx = hpriv->plat_data; + int rc = 0; -+int ahci_restart_engine(struct ata_port *ap) -+{ -+ struct ahci_host_priv *hpriv = ap->host->private_data; -+ -+ ahci_stop_engine(ap); -+ ahci_start_fis_rx(ap); -+ hpriv->start_engine(ap); -+ -+ return 0; -+} -+EXPORT_SYMBOL_GPL(ahci_restart_engine); -+ - #ifdef CONFIG_PM - static void ahci_power_down(struct ata_port *ap) - { -@@ -886,7 +898,7 @@ int ahci_reset_controller(struct ata_host *host) - } - EXPORT_SYMBOL_GPL(ahci_reset_controller); +- if (unlikely(ctx->last_cmd[ap->port_no] == ATA_CMD_ID_ATA)) ++ if (unlikely(ctx->last_cmd[ap->port_no] == ATA_CMD_ID_ATA || ++ ctx->last_cmd[ap->port_no] == ATA_CMD_SMART)) + xgene_ahci_restart_engine(ap); --static void ahci_sw_activity(struct ata_link *link) -+void ahci_sw_activity(struct ata_link *link) - { - struct ata_port *ap = link->ap; - struct ahci_port_priv *pp = ap->private_data; -@@ -899,6 +911,7 @@ static void ahci_sw_activity(struct ata_link *link) - if (!timer_pending(&emp->timer)) - mod_timer(&emp->timer, jiffies + msecs_to_jiffies(10)); - } -+EXPORT_SYMBOL_GPL(ahci_sw_activity); - - static void ahci_sw_activity_blink(unsigned long arg) - { + rc = ahci_qc_issue(qc); diff --git a/drivers/firmware/efi/Makefile b/drivers/firmware/efi/Makefile index 9553496..c135154 100644 --- a/drivers/firmware/efi/Makefile @@ -3122,10 +2832,10 @@ index 0000000..b41f024 +#endif /* _IRQ_GIC_COMMON_H */ diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c new file mode 100644 -index 0000000..c3dd8ad +index 0000000..81519ba --- /dev/null +++ b/drivers/irqchip/irq-gic-v3.c -@@ -0,0 +1,690 @@ +@@ -0,0 +1,692 @@ +/* + * Copyright (C) 2013, 2014 ARM Limited, All Rights Reserved. + * Author: Marc Zyngier @@ -3177,6 +2887,7 @@ index 0000000..c3dd8ad +#define gic_data_rdist_rd_base() (*gic_data_rdist()) +#define gic_data_rdist_sgi_base() (gic_data_rdist_rd_base() + SZ_64K) + ++/* Our default, arbitrary priority value. Linux only uses one anyway. */ +#define DEFAULT_PMR_VALUE 0xf0 + +static inline unsigned int gic_irq(struct irq_data *d) @@ -3307,7 +3018,7 @@ index 0000000..c3dd8ad +} + +/* -+ * Routines to acknowledge, disable and enable interrupts ++ * Routines to disable, enable, EOI and route interrupts + */ +static void gic_poke_irq(struct irq_data *d, u32 offset) +{ @@ -3388,7 +3099,7 @@ index 0000000..c3dd8ad + aff = (MPIDR_AFFINITY_LEVEL(mpidr, 3) << 32 | + MPIDR_AFFINITY_LEVEL(mpidr, 2) << 16 | + MPIDR_AFFINITY_LEVEL(mpidr, 1) << 8 | -+ MPIDR_AFFINITY_LEVEL(mpidr, 0)) & ~GICD_IROUTER_SPI_MODE_ANY; ++ MPIDR_AFFINITY_LEVEL(mpidr, 0)); + + return aff; +} @@ -3419,7 +3130,7 @@ index 0000000..c3dd8ad +#endif + continue; + } -+ } while (irqnr != 0x3ff); ++ } while (irqnr != ICC_IAR1_EL1_SPURIOUS); +} + +static void __init gic_dist_init(void) @@ -3468,7 +3179,8 @@ index 0000000..c3dd8ad + u32 reg; + + reg = readl_relaxed(ptr + GICR_PIDR2) & GIC_PIDR2_ARCH_MASK; -+ if (reg != 0x30 && reg != 0x40) { /* We're in trouble... */ ++ if (reg != GIC_PIDR2_ARCH_GICv3 && ++ reg != GIC_PIDR2_ARCH_GICv4) { /* We're in trouble... */ + pr_warn("No redistributor present @%p\n", ptr); + break; + } @@ -3740,7 +3452,7 @@ index 0000000..c3dd8ad + } + + reg = readl_relaxed(dist_base + GICD_PIDR2) & GIC_PIDR2_ARCH_MASK; -+ if (reg != 0x30 && reg != 0x40) { ++ if (reg != GIC_PIDR2_ARCH_GICv3 && reg != GIC_PIDR2_ARCH_GICv4) { + pr_err("%s: no distributor detected, giving up\n", + node->full_name); + err = -ENODEV; @@ -3817,10 +3529,10 @@ index 0000000..c3dd8ad + +IRQCHIP_DECLARE(gic_v3, "arm,gic-v3", gic_of_init); diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c -index 7e11c9d..5a75b97 100644 +index 7c131cf..1ddfdde 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c -@@ -46,6 +46,7 @@ +@@ -47,6 +47,7 @@ #include #include @@ -3828,7 +3540,7 @@ index 7e11c9d..5a75b97 100644 #include "irqchip.h" union gic_base { -@@ -188,12 +189,6 @@ static int gic_set_type(struct irq_data *d, unsigned int type) +@@ -189,12 +190,6 @@ static int gic_set_type(struct irq_data *d, unsigned int type) { void __iomem *base = gic_dist_base(d); unsigned int gicirq = gic_irq(d); @@ -3841,7 +3553,7 @@ index 7e11c9d..5a75b97 100644 /* Interrupt configuration for SGIs can't be changed */ if (gicirq < 16) -@@ -207,25 +202,7 @@ static int gic_set_type(struct irq_data *d, unsigned int type) +@@ -208,25 +203,7 @@ static int gic_set_type(struct irq_data *d, unsigned int type) if (gic_arch_extn.irq_set_type) gic_arch_extn.irq_set_type(d, type); @@ -3868,7 +3580,7 @@ index 7e11c9d..5a75b97 100644 raw_spin_unlock(&irq_controller_lock); -@@ -387,12 +364,6 @@ static void __init gic_dist_init(struct gic_chip_data *gic) +@@ -388,12 +365,6 @@ static void __init gic_dist_init(struct gic_chip_data *gic) writel_relaxed(0, base + GIC_DIST_CTRL); /* @@ -3881,7 +3593,7 @@ index 7e11c9d..5a75b97 100644 * Set all global interrupts to this CPU only. */ cpumask = gic_get_cpumask(gic); -@@ -401,18 +372,7 @@ static void __init gic_dist_init(struct gic_chip_data *gic) +@@ -402,18 +373,7 @@ static void __init gic_dist_init(struct gic_chip_data *gic) for (i = 32; i < gic_irqs; i += 4) writel_relaxed(cpumask, base + GIC_DIST_TARGET + i * 4 / 4); @@ -3901,7 +3613,7 @@ index 7e11c9d..5a75b97 100644 writel_relaxed(1, base + GIC_DIST_CTRL); } -@@ -422,6 +382,7 @@ static void gic_cpu_init(struct gic_chip_data *gic) +@@ -423,6 +383,7 @@ static void gic_cpu_init(struct gic_chip_data *gic) void __iomem *dist_base = gic_data_dist_base(gic); void __iomem *base = gic_data_cpu_base(gic); unsigned int cpu_mask, cpu = smp_processor_id(); @@ -3909,7 +3621,7 @@ index 7e11c9d..5a75b97 100644 int i; /* -@@ -439,27 +400,32 @@ static void gic_cpu_init(struct gic_chip_data *gic) +@@ -440,27 +401,32 @@ static void gic_cpu_init(struct gic_chip_data *gic) if (i != cpu) gic_cpu_map[i] &= ~cpu_mask; @@ -3956,7 +3668,7 @@ index 7e11c9d..5a75b97 100644 } #ifdef CONFIG_CPU_PM -@@ -570,6 +536,7 @@ static void gic_cpu_restore(unsigned int gic_nr) +@@ -571,6 +537,7 @@ static void gic_cpu_restore(unsigned int gic_nr) { int i; u32 *ptr; @@ -3964,7 +3676,7 @@ index 7e11c9d..5a75b97 100644 void __iomem *dist_base; void __iomem *cpu_base; -@@ -594,7 +561,15 @@ static void gic_cpu_restore(unsigned int gic_nr) +@@ -595,7 +562,15 @@ static void gic_cpu_restore(unsigned int gic_nr) writel_relaxed(0xa0a0a0a0, dist_base + GIC_DIST_PRI + i * 4); writel_relaxed(0xf0, cpu_base + GIC_CPU_PRIMASK); @@ -4183,10 +3895,10 @@ index 0000000..63f2aa5 +} diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c new file mode 100644 -index 0000000..6c4a484 +index 0000000..e52af60 --- /dev/null +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c -@@ -0,0 +1,848 @@ +@@ -0,0 +1,747 @@ +/* Applied Micro X-Gene SoC Ethernet Driver + * + * Copyright (c) 2014, Applied Micro Circuits Corporation @@ -4211,76 +3923,6 @@ index 0000000..6c4a484 +#include "xgene_enet_main.h" +#include "xgene_enet_hw.h" + -+u64 xgene_prepare_eth_work_msg(u8 l4hlen, u8 l3hlen, u8 ethhdr, -+ u8 csum_enable, u8 proto) -+{ -+ u64 hopinfo; -+ -+ hopinfo = (l4hlen & TCPHDR_MASK) | -+ ((l3hlen << IPHDR_POS) & IPHDR_MASK) | -+ (ethhdr << ETHHDR_POS) | -+ ((csum_enable << EC_POS) & EC_MASK) | -+ ((proto << IS_POS) & IS_MASK) | -+ INSERT_CRC | -+ TYPE_ETH_WORK_MESSAGE; -+ -+ return hopinfo; -+} -+ -+/* Tx descriptor raw write */ -+void xgene_set_tx_desc(struct xgene_enet_desc_ring *ring, -+ struct xgene_enet_raw_desc *raw_desc) -+{ -+ raw_desc->m0 = ring->desc.userinfo; -+ raw_desc->m1 = (ring->desc.dataaddr & DATAADDR_MASK) | -+ (((u64)ring->desc.bufdatalen << BUFDATALEN_POS) & -+ BUFDATALEN_MASK) | COHERENT_MASK; -+ raw_desc->m3 = (((u64)ring->desc.henqnum << HENQNUM_POS) & -+ HENQNUM_MASK) | -+ ring->desc.hopinfo_lsb; -+} -+ -+/* descriptor raw read */ -+void xgene_get_desc(struct xgene_enet_desc_ring *ring, -+ struct xgene_enet_raw_desc *raw_desc) -+{ -+ struct xgene_enet_desc *desc = &ring->desc; -+ -+ desc->dataaddr = raw_desc->m1 & DATAADDR_MASK; -+ desc->bufdatalen = (raw_desc->m1 & BUFDATALEN_MASK) >> BUFDATALEN_POS; -+ desc->userinfo = raw_desc->m0 & USERINFO_MASK; -+ desc->fpqnum = (raw_desc->m0 & FPQNUM_MASK) >> FPQNUM_POS; -+ desc->status = (raw_desc->m0 & LERR_MASK) >> LERR_POS; -+} -+ -+/* Bufpool descriptor raw write common fields */ -+void xgene_set_init_bufpool_desc(struct xgene_enet_desc_ring *ring, -+ struct xgene_enet_raw_desc16 *raw_desc) -+{ -+ raw_desc->m0 = (ring->desc.userinfo) | -+ (((u64)ring->desc.fpqnum << FPQNUM_POS) & FPQNUM_MASK) | -+ STASHING_MASK; -+} -+ -+/* Bufpool descriptor raw write */ -+void xgene_set_refill_bufpool_desc(struct xgene_enet_desc_ring *ring, -+ struct xgene_enet_raw_desc16 *raw_desc) -+{ -+ raw_desc->m1 = (ring->desc.dataaddr & DATAADDR_MASK) | -+ (((u64)ring->desc.bufdatalen << BUFDATALEN_POS) & -+ BUFDATALEN_MASK) | -+ COHERENT_MASK; -+} -+ -+/* Bufpool descriptor raw read */ -+void xgene_get_bufpool_desc(struct xgene_enet_desc_ring *ring, -+ struct xgene_enet_raw_desc16 *raw_desc) -+{ -+ struct xgene_enet_desc *desc = &ring->desc; -+ -+ desc->userinfo = raw_desc->m0 & USERINFO_MASK; -+} -+ +static void xgene_enet_ring_init(struct xgene_enet_desc_ring *ring) +{ + u32 *ring_cfg = ring->state; @@ -4482,7 +4124,7 @@ index 0000000..6c4a484 +static void xgene_enet_wr_csr(struct xgene_enet_pdata *pdata, + u32 offset, u32 val) +{ -+ void *addr = pdata->eth_csr_addr + offset; ++ void __iomem *addr = pdata->eth_csr_addr + offset; + + iowrite32(val, addr); +} @@ -4490,7 +4132,7 @@ index 0000000..6c4a484 +static void xgene_enet_wr_ring_if(struct xgene_enet_pdata *pdata, + u32 offset, u32 val) +{ -+ void *addr = pdata->eth_ring_if_addr + offset; ++ void __iomem *addr = pdata->eth_ring_if_addr + offset; + + iowrite32(val, addr); +} @@ -4498,7 +4140,7 @@ index 0000000..6c4a484 +static void xgene_enet_wr_diag_csr(struct xgene_enet_pdata *pdata, + u32 offset, u32 val) +{ -+ void *addr = pdata->eth_diag_csr_addr + offset; ++ void __iomem *addr = pdata->eth_diag_csr_addr + offset; + + iowrite32(val, addr); +} @@ -4506,13 +4148,14 @@ index 0000000..6c4a484 +static void xgene_enet_wr_mcx_csr(struct xgene_enet_pdata *pdata, + u32 offset, u32 val) +{ -+ void *addr = pdata->mcx_mac_csr_addr + offset; ++ void __iomem *addr = pdata->mcx_mac_csr_addr + offset; + + iowrite32(val, addr); +} + -+static bool xgene_enet_wr_indirect(void *addr, void *wr, void *cmd, -+ void *cmd_done, u32 wr_addr, u32 wr_data) ++static bool xgene_enet_wr_indirect(void __iomem *addr, void __iomem *wr, ++ void __iomem *cmd, void __iomem *cmd_done, ++ u32 wr_addr, u32 wr_data) +{ + u32 done; + u8 wait = 10; @@ -4536,7 +4179,7 @@ index 0000000..6c4a484 +static void xgene_enet_wr_mcx_mac(struct xgene_enet_pdata *pdata, + u32 wr_addr, u32 wr_data) +{ -+ void *addr, *wr, *cmd, *cmd_done; ++ void __iomem *addr, *wr, *cmd, *cmd_done; + bool ret; + + addr = pdata->mcx_mac_addr + MAC_ADDR_REG_OFFSET; @@ -4553,7 +4196,7 @@ index 0000000..6c4a484 +static void xgene_enet_rd_csr(struct xgene_enet_pdata *pdata, + u32 offset, u32 *val) +{ -+ void *addr = pdata->eth_csr_addr + offset; ++ void __iomem *addr = pdata->eth_csr_addr + offset; + + *val = ioread32(addr); +} @@ -4561,7 +4204,7 @@ index 0000000..6c4a484 +static void xgene_enet_rd_diag_csr(struct xgene_enet_pdata *pdata, + u32 offset, u32 *val) +{ -+ void *addr = pdata->eth_diag_csr_addr + offset; ++ void __iomem *addr = pdata->eth_diag_csr_addr + offset; + + *val = ioread32(addr); +} @@ -4569,13 +4212,14 @@ index 0000000..6c4a484 +static void xgene_enet_rd_mcx_csr(struct xgene_enet_pdata *pdata, + u32 offset, u32 *val) +{ -+ void *addr = pdata->mcx_mac_csr_addr + offset; ++ void __iomem *addr = pdata->mcx_mac_csr_addr + offset; + + *val = ioread32(addr); +} + -+static bool xgene_enet_rd_indirect(void *addr, void *rd, void *cmd, -+ void *cmd_done, u32 rd_addr, u32 *rd_data) ++static bool xgene_enet_rd_indirect(void __iomem *addr, void __iomem *rd, ++ void __iomem *cmd, void __iomem *cmd_done, ++ u32 rd_addr, u32 *rd_data) +{ + u32 done; + u8 wait = 10; @@ -4599,7 +4243,7 @@ index 0000000..6c4a484 +static void xgene_enet_rd_mcx_mac(struct xgene_enet_pdata *pdata, + u32 rd_addr, u32 *rd_data) +{ -+ void *addr, *rd, *cmd, *cmd_done; ++ void __iomem *addr, *rd, *cmd, *cmd_done; + bool ret; + + addr = pdata->mcx_mac_addr + MAC_ADDR_REG_OFFSET; @@ -4700,21 +4344,6 @@ index 0000000..6c4a484 + return 0; +} + -+static void xgene_gmac_phy_enable_scan_cycle(struct xgene_enet_pdata *pdata) -+{ -+ u32 val; -+ -+ xgene_enet_rd_mcx_mac(pdata, MII_MGMT_COMMAND_ADDR, &val); -+ SCAN_CYCLE_MASK_SET(&val, 1); -+ xgene_enet_wr_mcx_mac(pdata, MII_MGMT_COMMAND_ADDR, val); -+ -+ /* Program phy address start scan from 0 and register at address 0x1 */ -+ xgene_enet_rd_mcx_mac(pdata, MII_MGMT_ADDRESS_ADDR, &val); -+ PHY_ADDR_SET(&val, pdata->phy_dev->addr); -+ REG_ADDR_SET(&val, MII_BMSR); -+ xgene_enet_wr_mcx_mac(pdata, MII_MGMT_ADDRESS_ADDR, val); -+} -+ +void xgene_gmac_reset(struct xgene_enet_pdata *pdata) +{ + xgene_enet_wr_mcx_mac(pdata, MAC_CONFIG_1_ADDR, SOFT_RESET1); @@ -4906,32 +4535,21 @@ index 0000000..6c4a484 +{ + struct xgene_enet_pdata *pdata = netdev_priv(ndev); + struct phy_device *phydev = pdata->phy_dev; -+ bool status_change = false; -+ -+ if (phydev->link && pdata->phy_speed != phydev->speed) { -+ xgene_gmac_init(pdata, phydev->speed); -+ pdata->phy_speed = phydev->speed; -+ status_change = true; -+ } -+ -+ if (pdata->phy_link != phydev->link) { -+ if (!phydev->link) -+ pdata->phy_speed = 0; -+ pdata->phy_link = phydev->link; -+ status_change = true; -+ } -+ -+ if (!status_change) -+ return; + + if (phydev->link) { -+ xgene_gmac_rx_enable(pdata); -+ xgene_gmac_tx_enable(pdata); ++ if (pdata->phy_speed != phydev->speed) { ++ xgene_gmac_init(pdata, phydev->speed); ++ xgene_gmac_rx_enable(pdata); ++ xgene_gmac_tx_enable(pdata); ++ pdata->phy_speed = phydev->speed; ++ phy_print_status(phydev); ++ } + } else { + xgene_gmac_rx_disable(pdata); + xgene_gmac_tx_disable(pdata); ++ pdata->phy_speed = SPEED_UNKNOWN; ++ phy_print_status(phydev); + } -+ phy_print_status(phydev); +} + +static int xgene_enet_phy_connect(struct net_device *ndev) @@ -4954,8 +4572,11 @@ index 0000000..6c4a484 + return -ENODEV; + } + -+ pdata->phy_link = 0; -+ pdata->phy_speed = 0; ++ pdata->phy_speed = SPEED_UNKNOWN; ++ phy_dev->supported &= ~SUPPORTED_10baseT_Half & ++ ~SUPPORTED_100baseT_Half & ++ ~SUPPORTED_1000baseT_Half; ++ phy_dev->advertising = phy_dev->supported; + pdata->phy_dev = phy_dev; + + return 0; @@ -4992,13 +4613,6 @@ index 0000000..6c4a484 + snprintf(mdio_bus->id, MII_BUS_ID_SIZE, "%s-%s", "xgene-mii", + ndev->name); + -+ mdio_bus->irq = devm_kcalloc(dev, PHY_MAX_ADDR, sizeof(int), -+ GFP_KERNEL); -+ if (!mdio_bus->irq) { -+ ret = -ENOMEM; -+ goto err; -+ } -+ + mdio_bus->priv = pdata; + mdio_bus->parent = &ndev->dev; + @@ -5012,13 +4626,10 @@ index 0000000..6c4a484 + ret = xgene_enet_phy_connect(ndev); + if (ret) + goto err; -+ xgene_gmac_phy_enable_scan_cycle(pdata); + + return ret; + +err: -+ if (mdio_bus->irq) -+ devm_kfree(dev, mdio_bus->irq); + mdiobus_free(mdio_bus); + + return ret; @@ -5037,10 +4648,10 @@ index 0000000..6c4a484 +} diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h new file mode 100644 -index 0000000..934baca +index 0000000..2041313 --- /dev/null +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h -@@ -0,0 +1,394 @@ +@@ -0,0 +1,375 @@ +/* Applied Micro X-Gene SoC Ethernet Driver + * + * Copyright (c) 2014, Applied Micro Circuits Corporation @@ -5208,7 +4819,6 @@ index 0000000..934baca +#define INTERFACE_CONTROL_ADDR 0x38 +#define STATION_ADDR0_ADDR 0x40 +#define STATION_ADDR1_ADDR 0x44 -+#define SCAN_CYCLE_MASK_SET(dst, src) xgene_set_bits(dst, val, 0, 1) +#define PHY_ADDR_SET(dst, val) xgene_set_bits(dst, val, 8, 5) +#define REG_ADDR_SET(dst, val) xgene_set_bits(dst, val, 0, 5) +#define ENET_INTERFACE_MODE2_SET(dst, val) xgene_set_bits(dst, val, 8, 2) @@ -5227,7 +4837,6 @@ index 0000000..934baca +#define TUND_ADDR 0x4a + +#define TSO_IPPROTO_TCP 1 -+#define TSO_IPPROTO_UDP 0 +#define FULL_DUPLEX 2 + +#define USERINFO_POS 0 @@ -5271,17 +4880,6 @@ index 0000000..934baca +#define INSERT_CRC BIT_ULL(IC_POS) +#define TYPE_ETH_WORK_MESSAGE BIT_ULL(44) + -+struct xgene_enet_desc { -+ dma_addr_t dataaddr; -+ u16 bufdatalen; -+ u32 userinfo; -+ u64 hopinfo_lsb; -+ u16 henqnum; -+ u16 fpqnum; -+ u8 stash; -+ u8 status; -+}; -+ +struct xgene_enet_raw_desc { + u64 m0; + u64 m1; @@ -5406,14 +5004,8 @@ index 0000000..934baca + struct xgene_enet_raw_desc *raw_desc); +void xgene_get_desc(struct xgene_enet_desc_ring *ring, + struct xgene_enet_raw_desc *raw_desc); -+void xgene_set_init_bufpool_desc(struct xgene_enet_desc_ring *ring, -+ struct xgene_enet_raw_desc16 *raw_desc); -+void xgene_set_refill_bufpool_desc(struct xgene_enet_desc_ring *ring, -+ struct xgene_enet_raw_desc16 *raw_desc); +void xgene_get_bufpool_desc(struct xgene_enet_desc_ring *ring, + struct xgene_enet_raw_desc16 *raw_desc); -+u64 xgene_prepare_eth_work_msg(u8 l4hlen, u8 l3hlen, u8 ethhdr, -+ u8 csum_enable, u8 proto); +void xgene_enet_parse_error(struct xgene_enet_desc_ring *ring, + struct xgene_enet_pdata *pdata, + enum xgene_enet_err_code status); @@ -5437,10 +5029,10 @@ index 0000000..934baca +#endif /* __XGENE_ENET_HW_H__ */ diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c new file mode 100644 -index 0000000..09881a0 +index 0000000..756523a --- /dev/null +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c -@@ -0,0 +1,939 @@ +@@ -0,0 +1,962 @@ +/* Applied Micro X-Gene SoC Ethernet Driver + * + * Copyright (c) 2014, Applied Micro Circuits Corporation @@ -5473,22 +5065,16 @@ index 0000000..09881a0 + for (i = 0; i < buf_pool->slots; i++) { + raw_desc = &buf_pool->raw_desc16[i]; + -+ buf_pool->desc.userinfo = i; -+ buf_pool->desc.fpqnum = buf_pool->dst_ring_num; -+ buf_pool->desc.stash = 1; -+ -+ xgene_set_init_bufpool_desc(buf_pool, raw_desc); -+ + /* Hardware expects descriptor in little endian format */ -+ xgene_enet_cpu_to_le64(raw_desc, 4); ++ raw_desc->m0 = cpu_to_le64(i | ++ (((u64)buf_pool->dst_ring_num << FPQNUM_POS) & ++ FPQNUM_MASK) | STASHING_MASK); + } +} + +static struct device *ndev_to_dev(struct net_device *ndev) +{ -+ struct xgene_enet_pdata *pdata = netdev_priv(ndev); -+ -+ return &pdata->pdev->dev; ++ return ndev->dev.parent; +} + +static int xgene_enet_refill_bufpool(struct xgene_enet_desc_ring *buf_pool, @@ -5524,12 +5110,9 @@ index 0000000..09881a0 + return -EINVAL; + } + -+ buf_pool->desc.dataaddr = dma_addr; -+ buf_pool->desc.bufdatalen = bufdatalen; -+ -+ xgene_set_refill_bufpool_desc(buf_pool, raw_desc); -+ -+ xgene_enet_desc16_to_le64(raw_desc); ++ raw_desc->m1 = cpu_to_le64((dma_addr & DATAADDR_MASK) | ++ (((u64)bufdatalen << BUFDATALEN_POS) & ++ BUFDATALEN_MASK) | COHERENT_MASK); + tail = (tail + 1) & slots; + } + @@ -5578,10 +5161,7 @@ index 0000000..09881a0 + raw_desc = &buf_pool->raw_desc16[tail]; + + /* Hardware stores descriptor in little endian format */ -+ xgene_enet_le64_to_desc16(raw_desc); -+ -+ xgene_get_bufpool_desc(buf_pool, raw_desc); -+ userinfo = buf_pool->desc.userinfo; ++ userinfo = le64_to_cpu(raw_desc->m0) & USERINFO_MASK; + dev_kfree_skb_any(buf_pool->rx_skb[userinfo]); + } + @@ -5589,7 +5169,7 @@ index 0000000..09881a0 + buf_pool->tail = tail; +} + -+irqreturn_t xgene_enet_rx_irq(const int irq, void *data) ++static irqreturn_t xgene_enet_rx_irq(const int irq, void *data) +{ + struct xgene_enet_desc_ring *rx_ring = data; + @@ -5601,25 +5181,28 @@ index 0000000..09881a0 + return IRQ_HANDLED; +} + -+static int xgene_enet_tx_completion(struct xgene_enet_desc_ring *cp_ring) ++static int xgene_enet_tx_completion(struct xgene_enet_desc_ring *cp_ring, ++ struct xgene_enet_raw_desc *raw_desc) +{ -+ struct xgene_enet_desc *desc; + struct sk_buff *skb; + struct device *dev; + u16 skb_index; ++ u8 status; + int ret = 0; + -+ desc = &cp_ring->desc; -+ skb_index = desc->userinfo; ++ skb_index = raw_desc->m0 & USERINFO_MASK; + skb = cp_ring->cp_skb[skb_index]; + + dev = ndev_to_dev(cp_ring->ndev); -+ dma_unmap_single(dev, desc->dataaddr, desc->bufdatalen, DMA_TO_DEVICE); ++ dma_unmap_single(dev, raw_desc->m1 & DATAADDR_MASK, ++ (raw_desc->m1 & BUFDATALEN_MASK) >> BUFDATALEN_POS, ++ DMA_TO_DEVICE); + + /* Checking for error */ -+ if (unlikely(desc->status > 2)) { ++ status = (raw_desc->m0 & LERR_MASK) >> LERR_POS; ++ if (unlikely(status > 2)) { + xgene_enet_parse_error(cp_ring, netdev_priv(cp_ring->ndev), -+ desc->status); ++ status); + ret = -1; + } + @@ -5650,23 +5233,27 @@ index 0000000..09881a0 + goto out; + + iph = ip_hdr(skb); -+ if (unlikely(iph->frag_off & htons(IP_MF | IP_OFFSET))) ++ if (unlikely(ip_is_fragment(iph))) + goto out; + + if (likely(iph->protocol == IPPROTO_TCP)) { -+ l4hlen = tcp_hdrlen(skb) / 4; ++ l4hlen = tcp_hdrlen(skb) >> 2; + csum_enable = 1; + proto = TSO_IPPROTO_TCP; + } else if (iph->protocol == IPPROTO_UDP) { + l4hlen = UDP_HDR_SIZE; + csum_enable = 1; -+ proto = TSO_IPPROTO_UDP; + } +out: + l3hlen = ip_hdrlen(skb) >> 2; + ethhdr = xgene_enet_hdr_len(skb->data); -+ hopinfo = xgene_prepare_eth_work_msg(l4hlen, l3hlen, ethhdr, -+ csum_enable, proto); ++ hopinfo = (l4hlen & TCPHDR_MASK) | ++ ((l3hlen << IPHDR_POS) & IPHDR_MASK) | ++ (ethhdr << ETHHDR_POS) | ++ (csum_enable << EC_POS) | ++ (proto << IS_POS) | ++ INSERT_CRC | ++ TYPE_ETH_WORK_MESSAGE; + + return hopinfo; +} @@ -5689,18 +5276,15 @@ index 0000000..09881a0 + return -EINVAL; + } + -+ tx_ring->desc.dataaddr = dma_addr; -+ tx_ring->desc.bufdatalen = skb->len; -+ tx_ring->desc.henqnum = tx_ring->dst_ring_num; -+ tx_ring->desc.userinfo = tail; -+ -+ hopinfo = xgene_enet_work_msg(skb); -+ tx_ring->desc.hopinfo_lsb = hopinfo; -+ -+ xgene_set_tx_desc(tx_ring, raw_desc); -+ + /* Hardware expects descriptor in little endian format */ -+ xgene_enet_cpu_to_le64(raw_desc, 4); ++ raw_desc->m0 = cpu_to_le64(tail); ++ raw_desc->m1 = cpu_to_le64((dma_addr & DATAADDR_MASK) | ++ (((u64)skb->len << BUFDATALEN_POS) & BUFDATALEN_MASK) | ++ COHERENT_MASK); ++ hopinfo = xgene_enet_work_msg(skb); ++ raw_desc->m3 = cpu_to_le64( ++ (((u64)tx_ring->dst_ring_num << HENQNUM_POS) & ++ HENQNUM_MASK) | hopinfo); + tx_ring->cp_ring->cp_skb[tail] = skb; + + return 0; @@ -5737,17 +5321,18 @@ index 0000000..09881a0 + return NETDEV_TX_OK; +} + -+void xgene_enet_skip_csum(struct sk_buff *skb) ++static void xgene_enet_skip_csum(struct sk_buff *skb) +{ + struct iphdr *iph = ip_hdr(skb); + -+ if (!(iph->frag_off & htons(IP_MF | IP_OFFSET)) || ++ if (!ip_is_fragment(iph) || + (iph->protocol != IPPROTO_TCP && iph->protocol != IPPROTO_UDP)) { + skb->ip_summed = CHECKSUM_UNNECESSARY; + } +} + -+static int xgene_enet_rx_frame(struct xgene_enet_desc_ring *rx_ring) ++static int xgene_enet_rx_frame(struct xgene_enet_desc_ring *rx_ring, ++ struct xgene_enet_raw_desc *raw_desc) +{ + struct net_device *ndev; + struct xgene_enet_pdata *pdata; @@ -5755,7 +5340,7 @@ index 0000000..09881a0 + struct xgene_enet_desc_ring *buf_pool; + u32 datalen, skb_index; + struct sk_buff *skb; -+ struct xgene_enet_desc *desc; ++ u8 status; + int ret = 0; + + ndev = rx_ring->ndev; @@ -5763,25 +5348,24 @@ index 0000000..09881a0 + dev = ndev_to_dev(rx_ring->ndev); + buf_pool = rx_ring->buf_pool; + -+ desc = &rx_ring->desc; -+ dma_unmap_single(dev, desc->dataaddr, XGENE_ENET_MAX_MTU, ++ dma_unmap_single(dev, raw_desc->m1 & DATAADDR_MASK, XGENE_ENET_MAX_MTU, + DMA_FROM_DEVICE); -+ -+ skb_index = desc->userinfo; ++ skb_index = raw_desc->m0 & USERINFO_MASK; + skb = buf_pool->rx_skb[skb_index]; + + /* checking for error */ -+ if (unlikely(desc->status > 2)) { ++ status = (raw_desc->m0 & LERR_MASK) >> LERR_POS; ++ if (unlikely(status > 2)) { + dev_kfree_skb_any(skb); + xgene_enet_parse_error(rx_ring, netdev_priv(rx_ring->ndev), -+ desc->status); ++ status); + pdata->stats.rx_dropped++; + ret = -1; + goto out; + } + + /* strip off CRC as HW isn't doing this */ -+ datalen = desc->bufdatalen; ++ datalen = (raw_desc->m1 & BUFDATALEN_MASK) >> BUFDATALEN_POS; + datalen -= 4; + prefetch(skb->data - NET_IP_ALIGN); + skb_put(skb, datalen); @@ -5805,6 +5389,14 @@ index 0000000..09881a0 + return ret; +} + ++static bool is_rx_desc(struct xgene_enet_raw_desc *raw_desc) ++{ ++ /* Hardware stores descriptor in little endian format */ ++ raw_desc->m0 = le64_to_cpu(raw_desc->m0); ++ raw_desc->m1 = le64_to_cpu(raw_desc->m1); ++ return ((raw_desc->m0 & FPQNUM_MASK) >> FPQNUM_POS) ? true : false; ++} ++ +static int xgene_enet_process_ring(struct xgene_enet_desc_ring *ring, + int budget) +{ @@ -5819,13 +5411,10 @@ index 0000000..09881a0 + if (unlikely(((u64 *)raw_desc)[EMPTY_SLOT_INDEX] == EMPTY_SLOT)) + break; + -+ /* Hardware stores descriptor in little endian format */ -+ xgene_enet_le64_to_cpu(raw_desc, 4); -+ xgene_get_desc(ring, raw_desc); -+ if (ring->desc.fpqnum) -+ ret = xgene_enet_rx_frame(ring); ++ if (is_rx_desc(raw_desc)) ++ ret = xgene_enet_rx_frame(ring, raw_desc); + else -+ ret = xgene_enet_tx_completion(ring); ++ ret = xgene_enet_tx_completion(ring, raw_desc); + ((u64 *)raw_desc)[EMPTY_SLOT_INDEX] = EMPTY_SLOT; + + head = (head + 1) & slots; @@ -5874,7 +5463,7 @@ index 0000000..09881a0 +static int xgene_enet_register_irq(struct net_device *ndev) +{ + struct xgene_enet_pdata *pdata = netdev_priv(ndev); -+ struct device *dev = &pdata->pdev->dev; ++ struct device *dev = ndev_to_dev(ndev); + int ret; + + ret = devm_request_irq(dev, pdata->rx_ring->irq, xgene_enet_rx_irq, @@ -5893,7 +5482,7 @@ index 0000000..09881a0 + struct device *dev; + + pdata = netdev_priv(ndev); -+ dev = &pdata->pdev->dev; ++ dev = ndev_to_dev(ndev); + devm_free_irq(dev, pdata->rx_ring->irq, pdata->rx_ring); +} + @@ -5943,16 +5532,14 @@ index 0000000..09881a0 + struct device *dev; + + pdata = netdev_priv(ring->ndev); -+ dev = &pdata->pdev->dev; ++ dev = ndev_to_dev(ring->ndev); + + xgene_enet_clear_ring(ring); + dma_free_coherent(dev, ring->size, ring->desc_addr, ring->dma); -+ devm_kfree(dev, ring); +} + +static void xgene_enet_delete_desc_rings(struct xgene_enet_pdata *pdata) +{ -+ struct device *dev = &pdata->pdev->dev; + struct xgene_enet_desc_ring *buf_pool; + + if (pdata->tx_ring) { @@ -5964,8 +5551,6 @@ index 0000000..09881a0 + buf_pool = pdata->rx_ring->buf_pool; + xgene_enet_delete_bufpool(buf_pool); + xgene_enet_delete_ring(buf_pool); -+ devm_kfree(dev, buf_pool->rx_skb); -+ + xgene_enet_delete_ring(pdata->rx_ring); + pdata->rx_ring = NULL; + } @@ -6000,13 +5585,46 @@ index 0000000..09881a0 + return size; +} + ++static void xgene_enet_free_desc_ring(struct xgene_enet_desc_ring *ring) ++{ ++ struct device *dev; ++ ++ if (!ring) ++ return; ++ ++ dev = ndev_to_dev(ring->ndev); ++ ++ if (ring->desc_addr) { ++ xgene_enet_clear_ring(ring); ++ dma_free_coherent(dev, ring->size, ring->desc_addr, ring->dma); ++ } ++ devm_kfree(dev, ring); ++} ++ ++static void xgene_enet_free_desc_rings(struct xgene_enet_pdata *pdata) ++{ ++ struct device *dev = &pdata->pdev->dev; ++ struct xgene_enet_desc_ring *ring; ++ ++ ring = pdata->tx_ring; ++ if (ring && ring->cp_ring && ring->cp_ring->cp_skb) ++ devm_kfree(dev, ring->cp_ring->cp_skb); ++ xgene_enet_free_desc_ring(ring); ++ ++ ring = pdata->rx_ring; ++ if (ring && ring->buf_pool && ring->buf_pool->rx_skb) ++ devm_kfree(dev, ring->buf_pool->rx_skb); ++ xgene_enet_free_desc_ring(ring->buf_pool); ++ xgene_enet_free_desc_ring(ring); ++} ++ +static struct xgene_enet_desc_ring *xgene_enet_create_desc_ring( + struct net_device *ndev, u32 ring_num, + enum xgene_enet_ring_cfgsize cfgsize, u32 ring_id) +{ + struct xgene_enet_desc_ring *ring; + struct xgene_enet_pdata *pdata = netdev_priv(ndev); -+ struct device *dev = &pdata->pdev->dev; ++ struct device *dev = ndev_to_dev(ndev); + u32 size; + + ring = devm_kzalloc(dev, sizeof(struct xgene_enet_desc_ring), @@ -6022,8 +5640,10 @@ index 0000000..09881a0 + size = xgene_enet_get_ring_size(dev, cfgsize); + ring->desc_addr = dma_zalloc_coherent(dev, size, &ring->dma, + GFP_KERNEL); -+ if (!ring->desc_addr) -+ goto err; ++ if (!ring->desc_addr) { ++ devm_kfree(dev, ring); ++ return NULL; ++ } + ring->size = size; + + ring->cmd_base = pdata->ring_cmd_addr + (ring->num << 6); @@ -6034,11 +5654,6 @@ index 0000000..09881a0 + ring->num, ring->size, ring->id, ring->slots); + + return ring; -+err: -+ dma_free_coherent(dev, size, ring->desc_addr, ring->dma); -+ devm_kfree(dev, ring); -+ -+ return NULL; +} + +static u16 xgene_enet_get_ring_id(enum xgene_ring_owner owner, u8 bufnum) @@ -6049,7 +5664,7 @@ index 0000000..09881a0 +static int xgene_enet_create_desc_rings(struct net_device *ndev) +{ + struct xgene_enet_pdata *pdata = netdev_priv(ndev); -+ struct device *dev = &pdata->pdev->dev; ++ struct device *dev = ndev_to_dev(ndev); + struct xgene_enet_desc_ring *rx_ring, *tx_ring, *cp_ring; + struct xgene_enet_desc_ring *buf_pool = NULL; + u8 cpu_bufnum = 0, eth_bufnum = 0; @@ -6061,8 +5676,8 @@ index 0000000..09881a0 + ring_id = xgene_enet_get_ring_id(RING_OWNER_CPU, cpu_bufnum++); + rx_ring = xgene_enet_create_desc_ring(ndev, ring_num++, + RING_CFGSIZE_16KB, ring_id); -+ if (IS_ERR_OR_NULL(rx_ring)) { -+ ret = PTR_ERR(rx_ring); ++ if (!rx_ring) { ++ ret = -ENOMEM; + goto err; + } + @@ -6070,8 +5685,8 @@ index 0000000..09881a0 + ring_id = xgene_enet_get_ring_id(RING_OWNER_ETH0, bp_bufnum++); + buf_pool = xgene_enet_create_desc_ring(ndev, ring_num++, + RING_CFGSIZE_2KB, ring_id); -+ if (IS_ERR_OR_NULL(buf_pool)) { -+ ret = PTR_ERR(buf_pool); ++ if (!buf_pool) { ++ ret = -ENOMEM; + goto err; + } + @@ -6093,8 +5708,8 @@ index 0000000..09881a0 + ring_id = xgene_enet_get_ring_id(RING_OWNER_ETH0, eth_bufnum++); + tx_ring = xgene_enet_create_desc_ring(ndev, ring_num++, + RING_CFGSIZE_16KB, ring_id); -+ if (IS_ERR_OR_NULL(tx_ring)) { -+ ret = PTR_ERR(tx_ring); ++ if (!tx_ring) { ++ ret = -ENOMEM; + goto err; + } + pdata->tx_ring = tx_ring; @@ -6116,7 +5731,7 @@ index 0000000..09881a0 + return 0; + +err: -+ xgene_enet_delete_desc_rings(pdata); ++ xgene_enet_free_desc_rings(pdata); + return ret; +} + @@ -6382,10 +5997,10 @@ index 0000000..09881a0 +MODULE_LICENSE("GPL"); diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.h b/drivers/net/ethernet/apm/xgene/xgene_enet_main.h new file mode 100644 -index 0000000..2d1bd85 +index 0000000..f4f7e4a --- /dev/null +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.h -@@ -0,0 +1,109 @@ +@@ -0,0 +1,107 @@ +/* Applied Micro X-Gene SoC Ethernet Driver + * + * Copyright (c) 2014, Applied Micro Circuits Corporation @@ -6449,7 +6064,6 @@ index 0000000..2d1bd85 + struct xgene_enet_desc_ring *cp_ring; + struct xgene_enet_desc_ring *buf_pool; + struct napi_struct napi; -+ struct xgene_enet_desc desc; + union { + void *desc_addr; + struct xgene_enet_raw_desc *raw_desc; @@ -6462,7 +6076,6 @@ index 0000000..2d1bd85 + struct net_device *ndev; + struct mii_bus *mdio_bus; + struct phy_device *phy_dev; -+ int phy_link; + int phy_speed; + struct clk *clk; + struct platform_device *pdev; @@ -6495,6 +6108,1287 @@ index 0000000..2d1bd85 +void xgene_enet_set_ethtool_ops(struct net_device *netdev); + +#endif /* __XGENE_ENET_MAIN_H__ */ +diff --git a/drivers/of/address.c b/drivers/of/address.c +index 5edfcb0..cbbaed2 100644 +--- a/drivers/of/address.c ++++ b/drivers/of/address.c +@@ -5,6 +5,7 @@ + #include + #include + #include ++#include + #include + + /* Max address size we deal with */ +@@ -601,12 +602,72 @@ const __be32 *of_get_address(struct device_node *dev, int index, u64 *size, + } + EXPORT_SYMBOL(of_get_address); + ++struct io_range { ++ struct list_head list; ++ phys_addr_t start; ++ resource_size_t size; ++}; ++ ++static LIST_HEAD(io_range_list); ++ ++/* ++ * Record the PCI IO range (expressed as CPU physical address + size). ++ * Return a negative value if an error has occured, zero otherwise ++ */ ++int __weak pci_register_io_range(phys_addr_t addr, resource_size_t size) ++{ ++#ifdef PCI_IOBASE ++ struct io_range *res; ++ resource_size_t allocated_size = 0; ++ ++ /* check if the range hasn't been previously recorded */ ++ list_for_each_entry(res, &io_range_list, list) { ++ if (addr >= res->start && addr + size <= res->start + size) ++ return 0; ++ allocated_size += res->size; ++ } ++ ++ /* range not registed yet, check for available space */ ++ if (allocated_size + size - 1 > IO_SPACE_LIMIT) ++ return -E2BIG; ++ ++ /* add the range to the list */ ++ res = kzalloc(sizeof(*res), GFP_KERNEL); ++ if (!res) ++ return -ENOMEM; ++ ++ res->start = addr; ++ res->size = size; ++ ++ list_add_tail(&res->list, &io_range_list); ++ ++ return 0; ++#else ++ return -EINVAL; ++#endif ++} ++ + unsigned long __weak pci_address_to_pio(phys_addr_t address) + { ++#ifdef PCI_IOBASE ++ struct io_range *res; ++ resource_size_t offset = 0; ++ ++ list_for_each_entry(res, &io_range_list, list) { ++ if (address >= res->start && ++ address < res->start + res->size) { ++ return res->start - address + offset; ++ } ++ offset += res->size; ++ } ++ ++ return (unsigned long)-1; ++#else + if (address > IO_SPACE_LIMIT) + return (unsigned long)-1; + + return (unsigned long) address; ++#endif + } + + static int __of_address_to_resource(struct device_node *dev, +@@ -811,3 +872,50 @@ bool of_dma_is_coherent(struct device_node *np) + return false; + } + EXPORT_SYMBOL_GPL(of_dma_is_coherent); ++ ++/* ++ * of_pci_range_to_resource - Create a resource from an of_pci_range ++ * @range: the PCI range that describes the resource ++ * @np: device node where the range belongs to ++ * @res: pointer to a valid resource that will be updated to ++ * reflect the values contained in the range. ++ * ++ * Returns EINVAL if the range cannot be converted to resource. ++ * ++ * Note that if the range is an IO range, the resource will be converted ++ * using pci_address_to_pio() which can fail if it is called too early or ++ * if the range cannot be matched to any host bridge IO space (our case here). ++ * To guard against that we try to register the IO range first. ++ * If that fails we know that pci_address_to_pio() will do too. ++ */ ++int of_pci_range_to_resource(struct of_pci_range *range, ++ struct device_node *np, struct resource *res) ++{ ++ int err; ++ res->flags = range->flags; ++ res->parent = res->child = res->sibling = NULL; ++ res->name = np->full_name; ++ ++ if (res->flags & IORESOURCE_IO) { ++ unsigned long port = -1; ++ err = pci_register_io_range(range->cpu_addr, range->size); ++ if (err) ++ goto invalid_range; ++ port = pci_address_to_pio(range->cpu_addr); ++ if (port == (unsigned long)-1) { ++ err = -EINVAL; ++ goto invalid_range; ++ } ++ res->start = port; ++ } else { ++ res->start = range->cpu_addr; ++ } ++ res->end = res->start + range->size - 1; ++ return 0; ++ ++invalid_range: ++ res->start = (resource_size_t)OF_BAD_ADDR; ++ res->end = (resource_size_t)OF_BAD_ADDR; ++ return err; ++} ++ +diff --git a/drivers/of/of_pci.c b/drivers/of/of_pci.c +index 8481996..e81402a 100644 +--- a/drivers/of/of_pci.c ++++ b/drivers/of/of_pci.c +@@ -1,6 +1,7 @@ + #include + #include + #include ++#include + #include + + static inline int __of_pci_pci_compare(struct device_node *node, +@@ -89,6 +90,141 @@ int of_pci_parse_bus_range(struct device_node *node, struct resource *res) + } + EXPORT_SYMBOL_GPL(of_pci_parse_bus_range); + ++/** ++ * pci_host_bridge_of_get_ranges - Parse PCI host bridge resources from DT ++ * @dev: device node of the host bridge having the range property ++ * @resources: list where the range of resources will be added after DT parsing ++ * @io_base: pointer to a variable that will contain the physical address for ++ * the start of the I/O range. ++ * ++ * It is the callers job to free the @resources list if an error is returned. ++ * ++ * This function will parse the "ranges" property of a PCI host bridge device ++ * node and setup the resource mapping based on its content. It is expected ++ * that the property conforms with the Power ePAPR document. ++ * ++ * Each architecture is then offered the chance of applying their own ++ * filtering of pci_host_bridge_windows based on their own restrictions by ++ * calling pcibios_fixup_bridge_ranges(). The filtered list of windows ++ * can then be used when creating a pci_host_bridge structure. ++ */ ++static int pci_host_bridge_of_get_ranges(struct device_node *dev, ++ struct list_head *resources, resource_size_t *io_base) ++{ ++ struct resource *res; ++ struct of_pci_range range; ++ struct of_pci_range_parser parser; ++ int err; ++ ++ pr_info("PCI host bridge %s ranges:\n", dev->full_name); ++ ++ /* Check for ranges property */ ++ err = of_pci_range_parser_init(&parser, dev); ++ if (err) ++ return err; ++ ++ pr_debug("Parsing ranges property...\n"); ++ for_each_of_pci_range(&parser, &range) { ++ /* Read next ranges element */ ++ pr_debug("pci_space: 0x%08x pci_addr:0x%016llx cpu_addr:0x%016llx size:0x%016llx\n", ++ range.pci_space, range.pci_addr, range.cpu_addr, range.size); ++ ++ /* ++ * If we failed translation or got a zero-sized region ++ * then skip this range ++ */ ++ if (range.cpu_addr == OF_BAD_ADDR || range.size == 0) ++ continue; ++ ++ res = kzalloc(sizeof(struct resource), GFP_KERNEL); ++ if (!res) ++ return -ENOMEM; ++ ++ err = of_pci_range_to_resource(&range, dev, res); ++ if (err) ++ return err; ++ ++ if (resource_type(res) == IORESOURCE_IO) ++ *io_base = range.cpu_addr; ++ ++ pci_add_resource_offset(resources, res, ++ res->start - range.pci_addr); ++ } ++ ++ /* Apply architecture specific fixups for the ranges */ ++ return pcibios_fixup_bridge_ranges(resources); ++} ++ ++static atomic_t domain_nr = ATOMIC_INIT(-1); ++ ++/** ++ * of_create_pci_host_bridge - Create a PCI host bridge structure using ++ * information passed in the DT. ++ * @parent: device owning this host bridge ++ * @ops: pci_ops associated with the host controller ++ * @host_data: opaque data structure used by the host controller. ++ * ++ * returns a pointer to the newly created pci_host_bridge structure, or ++ * NULL if the call failed. ++ * ++ * This function will try to obtain the host bridge domain number by ++ * using of_alias_get_id() call with "pci-domain" as a stem. If that ++ * fails, a local allocator will be used that will put each host bridge ++ * in a new domain. ++ */ ++struct pci_host_bridge * ++of_create_pci_host_bridge(struct device *parent, struct pci_ops *ops, void *host_data) ++{ ++ int err, domain, busno; ++ struct resource *bus_range; ++ struct pci_bus *root_bus; ++ struct pci_host_bridge *bridge; ++ resource_size_t io_base = 0; ++ LIST_HEAD(res); ++ ++ bus_range = kzalloc(sizeof(*bus_range), GFP_KERNEL); ++ if (!bus_range) ++ return ERR_PTR(-ENOMEM); ++ ++ domain = of_alias_get_id(parent->of_node, "pci-domain"); ++ if (domain == -ENODEV) ++ domain = atomic_inc_return(&domain_nr); ++ ++ err = of_pci_parse_bus_range(parent->of_node, bus_range); ++ if (err) { ++ dev_info(parent, "No bus range for %s, using default [0-255]\n", ++ parent->of_node->full_name); ++ bus_range->start = 0; ++ bus_range->end = 255; ++ bus_range->flags = IORESOURCE_BUS; ++ } ++ busno = bus_range->start; ++ pci_add_resource(&res, bus_range); ++ ++ /* now parse the rest of host bridge bus ranges */ ++ err = pci_host_bridge_of_get_ranges(parent->of_node, &res, &io_base); ++ if (err) ++ goto err_create; ++ ++ /* then create the root bus */ ++ root_bus = pci_create_root_bus_in_domain(parent, domain, busno, ++ ops, host_data, &res); ++ if (IS_ERR(root_bus)) { ++ err = PTR_ERR(root_bus); ++ goto err_create; ++ } ++ ++ bridge = to_pci_host_bridge(root_bus->bridge); ++ bridge->io_base = io_base; ++ ++ return bridge; ++ ++err_create: ++ pci_free_resource_list(&res); ++ return ERR_PTR(err); ++} ++EXPORT_SYMBOL_GPL(of_create_pci_host_bridge); ++ + #ifdef CONFIG_PCI_MSI + + static LIST_HEAD(of_pci_msi_chip_list); +diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c +index 0e5f3c9..54ceafd 100644 +--- a/drivers/pci/host-bridge.c ++++ b/drivers/pci/host-bridge.c +@@ -16,12 +16,13 @@ static struct pci_bus *find_pci_root_bus(struct pci_bus *bus) + return bus; + } + +-static struct pci_host_bridge *find_pci_host_bridge(struct pci_bus *bus) ++struct pci_host_bridge *find_pci_host_bridge(struct pci_bus *bus) + { + struct pci_bus *root_bus = find_pci_root_bus(bus); + + return to_pci_host_bridge(root_bus->bridge); + } ++EXPORT_SYMBOL_GPL(find_pci_host_bridge); + + void pci_set_host_bridge_release(struct pci_host_bridge *bridge, + void (*release_fn)(struct pci_host_bridge *), +@@ -82,3 +83,18 @@ void pcibios_bus_to_resource(struct pci_bus *bus, struct resource *res, + res->end = region->end + offset; + } + EXPORT_SYMBOL(pcibios_bus_to_resource); ++ ++/** ++ * Simple version of the platform specific code for filtering the list ++ * of resources obtained from the ranges declaration in DT. ++ * ++ * Platforms can override this function in order to impose stronger ++ * constraints onto the list of resources that a host bridge can use. ++ * The filtered list will then be used to create a root bus and associate ++ * it with the host bridge. ++ * ++ */ ++int __weak pcibios_fixup_bridge_ranges(struct list_head *resources) ++{ ++ return 0; ++} +diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig +index 21df477..3b988a2 100644 +--- a/drivers/pci/host/Kconfig ++++ b/drivers/pci/host/Kconfig +@@ -46,4 +46,14 @@ config PCI_HOST_GENERIC + Say Y here if you want to support a simple generic PCI host + controller, such as the one emulated by kvmtool. + ++config PCI_XGENE ++ bool "X-Gene PCIe controller" ++ depends on ARCH_XGENE ++ depends on OF ++ select PCIEPORTBUS ++ help ++ Say Y here if you want internal PCI support on APM X-Gene SoC. ++ There are 5 internal PCIe ports available. Each port is GEN3 capable ++ and have varied lanes from x1 to x8. ++ + endmenu +diff --git a/drivers/pci/host/Makefile b/drivers/pci/host/Makefile +index 611ba4b..0801606 100644 +--- a/drivers/pci/host/Makefile ++++ b/drivers/pci/host/Makefile +@@ -6,3 +6,4 @@ obj-$(CONFIG_PCI_TEGRA) += pci-tegra.o + obj-$(CONFIG_PCI_RCAR_GEN2) += pci-rcar-gen2.o + obj-$(CONFIG_PCI_RCAR_GEN2_PCIE) += pcie-rcar.o + obj-$(CONFIG_PCI_HOST_GENERIC) += pci-host-generic.o ++obj-$(CONFIG_PCI_XGENE) += pci-xgene.o +diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c +new file mode 100644 +index 0000000..7bf4ac7 +--- /dev/null ++++ b/drivers/pci/host/pci-xgene.c +@@ -0,0 +1,725 @@ ++/** ++ * APM X-Gene PCIe Driver ++ * ++ * Copyright (c) 2013 Applied Micro Circuits Corporation. ++ * ++ * Author: Tanmay Inamdar . ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define PCIECORE_LTSSM 0x4c ++#define PCIECORE_CTLANDSTATUS 0x50 ++#define INTXSTATUSMASK 0x6c ++#define PIM1_1L 0x80 ++#define IBAR2 0x98 ++#define IR2MSK 0x9c ++#define PIM2_1L 0xa0 ++#define IBAR3L 0xb4 ++#define IR3MSKL 0xbc ++#define PIM3_1L 0xc4 ++#define OMR1BARL 0x100 ++#define OMR2BARL 0x118 ++#define OMR3BARL 0x130 ++#define CFGBARL 0x154 ++#define CFGBARH 0x158 ++#define CFGCTL 0x15c ++#define RTDID 0x160 ++#define BRIDGE_CFG_0 0x2000 ++#define BRIDGE_CFG_1 0x2004 ++#define BRIDGE_CFG_4 0x2010 ++#define BRIDGE_CFG_32 0x2030 ++#define BRIDGE_CFG_14 0x2038 ++#define BRIDGE_CTRL_1 0x2204 ++#define BRIDGE_CTRL_2 0x2208 ++#define BRIDGE_CTRL_5 0x2214 ++#define BRIDGE_STATUS_0 0x2600 ++#define MEM_RAM_SHUTDOWN 0xd070 ++#define BLOCK_MEM_RDY 0xd074 ++ ++#define DEVICE_PORT_TYPE_MASK 0x03c00000 ++#define PM_FORCE_RP_MODE_MASK 0x00000400 ++#define SWITCH_PORT_MODE_MASK 0x00000800 ++#define CLASS_CODE_MASK 0xffffff00 ++#define LINK_UP_MASK 0x00000100 ++#define AER_OPTIONAL_ERROR_EN 0xffc00000 ++#define XGENE_PCIE_DEV_CTRL 0x2f0f ++#define AXI_EP_CFG_ACCESS 0x10000 ++#define ENABLE_ASPM 0x08000000 ++#define XGENE_PORT_TYPE_RC 0x05000000 ++#define BLOCK_MEM_RDY_VAL 0xFFFFFFFF ++#define EN_COHERENCY 0xF0000000 ++#define EN_REG 0x00000001 ++#define OB_LO_IO 0x00000002 ++#define XGENE_PCIE_VENDORID 0xE008 ++#define XGENE_PCIE_DEVICEID 0xE004 ++#define XGENE_PCIE_ECC_TIMEOUT 10 /* ms */ ++#define XGENE_LTSSM_DETECT_WAIT 20 /* ms */ ++#define XGENE_LTSSM_L0_WAIT 4 /* ms */ ++#define SZ_1T (SZ_1G*1024ULL) ++#define PIPE_PHY_RATE_RD(src) ((0xc000 & (u32)(src)) >> 0xe) ++ ++struct xgene_pcie_port { ++ struct device_node *node; ++ struct device *dev; ++ struct clk *clk; ++ void __iomem *csr_base; ++ void __iomem *cfg_base; ++ u8 link_up; ++}; ++ ++static inline u32 pcie_bar_low_val(u32 addr, u32 flags) ++{ ++ return (addr & PCI_BASE_ADDRESS_MEM_MASK) | flags; ++} ++ ++/* PCIE Configuration Out/In */ ++static inline void xgene_pcie_cfg_out32(void __iomem *addr, int offset, u32 val) ++{ ++ writel(val, addr + offset); ++} ++ ++static inline void xgene_pcie_cfg_out16(void __iomem *addr, int offset, u16 val) ++{ ++ u32 val32 = readl(addr + (offset & ~0x3)); ++ ++ switch (offset & 0x3) { ++ case 2: ++ val32 &= ~0xFFFF0000; ++ val32 |= (u32)val << 16; ++ break; ++ case 0: ++ default: ++ val32 &= ~0xFFFF; ++ val32 |= val; ++ break; ++ } ++ writel(val32, addr + (offset & ~0x3)); ++} ++ ++static inline void xgene_pcie_cfg_out8(void __iomem *addr, int offset, u8 val) ++{ ++ u32 val32 = readl(addr + (offset & ~0x3)); ++ ++ switch (offset & 0x3) { ++ case 0: ++ val32 &= ~0xFF; ++ val32 |= val; ++ break; ++ case 1: ++ val32 &= ~0xFF00; ++ val32 |= (u32)val << 8; ++ break; ++ case 2: ++ val32 &= ~0xFF0000; ++ val32 |= (u32)val << 16; ++ break; ++ case 3: ++ default: ++ val32 &= ~0xFF000000; ++ val32 |= (u32)val << 24; ++ break; ++ } ++ writel(val32, addr + (offset & ~0x3)); ++} ++ ++static inline void xgene_pcie_cfg_in32(void __iomem *addr, int offset, u32 *val) ++{ ++ *val = readl(addr + offset); ++} ++ ++static inline void ++xgene_pcie_cfg_in16(void __iomem *addr, int offset, u32 *val) ++{ ++ *val = readl(addr + (offset & ~0x3)); ++ ++ switch (offset & 0x3) { ++ case 2: ++ *val >>= 16; ++ break; ++ } ++ ++ *val &= 0xFFFF; ++} ++ ++static inline void ++xgene_pcie_cfg_in8(void __iomem *addr, int offset, u32 *val) ++{ ++ *val = readl(addr + (offset & ~0x3)); ++ ++ switch (offset & 0x3) { ++ case 3: ++ *val = *val >> 24; ++ break; ++ case 2: ++ *val = *val >> 16; ++ break; ++ case 1: ++ *val = *val >> 8; ++ break; ++ } ++ *val &= 0xFF; ++} ++ ++/* When the address bit [17:16] is 2'b01, the Configuration access will be ++ * treated as Type 1 and it will be forwarded to external PCIe device. ++ */ ++static void __iomem *xgene_pcie_get_cfg_base(struct pci_bus *bus) ++{ ++ struct xgene_pcie_port *port = bus->sysdata; ++ ++ if (bus->number >= (bus->primary + 1)) ++ return port->cfg_base + AXI_EP_CFG_ACCESS; ++ ++ return port->cfg_base; ++} ++ ++/* For Configuration request, RTDID register is used as Bus Number, ++ * Device Number and Function number of the header fields. ++ */ ++static void xgene_pcie_set_rtdid_reg(struct pci_bus *bus, uint devfn) ++{ ++ struct xgene_pcie_port *port = bus->sysdata; ++ unsigned int b, d, f; ++ u32 rtdid_val = 0; ++ ++ b = bus->number; ++ d = PCI_SLOT(devfn); ++ f = PCI_FUNC(devfn); ++ ++ if (!pci_is_root_bus(bus)) ++ rtdid_val = (b << 8) | (d << 3) | f; ++ ++ writel(rtdid_val, port->csr_base + RTDID); ++ /* read the register back to ensure flush */ ++ readl(port->csr_base + RTDID); ++} ++ ++static int xgene_pcie_read_config(struct pci_bus *bus, unsigned int devfn, ++ int offset, int len, u32 *val) ++{ ++ struct xgene_pcie_port *port = bus->sysdata; ++ void __iomem *addr; ++ ++ if ((pci_is_root_bus(bus) && devfn != 0) || !port->link_up) ++ return PCIBIOS_DEVICE_NOT_FOUND; ++ ++ xgene_pcie_set_rtdid_reg(bus, devfn); ++ addr = xgene_pcie_get_cfg_base(bus); ++ switch (len) { ++ case 1: ++ xgene_pcie_cfg_in8(addr, offset, val); ++ break; ++ case 2: ++ xgene_pcie_cfg_in16(addr, offset, val); ++ break; ++ default: ++ xgene_pcie_cfg_in32(addr, offset, val); ++ break; ++ } ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++static int xgene_pcie_write_config(struct pci_bus *bus, unsigned int devfn, ++ int offset, int len, u32 val) ++{ ++ struct xgene_pcie_port *port = bus->sysdata; ++ void __iomem *addr; ++ ++ if ((pci_is_root_bus(bus) && devfn != 0) || !port->link_up) ++ return PCIBIOS_DEVICE_NOT_FOUND; ++ ++ xgene_pcie_set_rtdid_reg(bus, devfn); ++ addr = xgene_pcie_get_cfg_base(bus); ++ switch (len) { ++ case 1: ++ xgene_pcie_cfg_out8(addr, offset, (u8)val); ++ break; ++ case 2: ++ xgene_pcie_cfg_out16(addr, offset, (u16)val); ++ break; ++ default: ++ xgene_pcie_cfg_out32(addr, offset, val); ++ break; ++ } ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++static struct pci_ops xgene_pcie_ops = { ++ .read = xgene_pcie_read_config, ++ .write = xgene_pcie_write_config ++}; ++ ++static void xgene_pcie_program_core(void __iomem *csr_base) ++{ ++ u32 val; ++ ++ val = readl(csr_base + BRIDGE_CFG_0); ++ val |= AER_OPTIONAL_ERROR_EN; ++ writel(val, csr_base + BRIDGE_CFG_0); ++ writel(0x0, csr_base + INTXSTATUSMASK); ++ val = readl(csr_base + BRIDGE_CTRL_1); ++ val = (val & ~0xffff) | XGENE_PCIE_DEV_CTRL; ++ writel(val, csr_base + BRIDGE_CTRL_1); ++} ++ ++static u64 xgene_pcie_set_ib_mask(void __iomem *csr_base, u32 addr, ++ u32 flags, u64 size) ++{ ++ u64 mask = (~(size - 1) & PCI_BASE_ADDRESS_MEM_MASK) | flags; ++ u32 val32 = 0; ++ u32 val; ++ ++ val32 = readl(csr_base + addr); ++ val = (val32 & 0x0000ffff) | (lower_32_bits(mask) << 16); ++ writel(val, csr_base + addr); ++ ++ val32 = readl(csr_base + addr + 0x04); ++ val = (val32 & 0xffff0000) | (lower_32_bits(mask) >> 16); ++ writel(val, csr_base + addr + 0x04); ++ ++ val32 = readl(csr_base + addr + 0x04); ++ val = (val32 & 0x0000ffff) | (upper_32_bits(mask) << 16); ++ writel(val, csr_base + addr + 0x04); ++ ++ val32 = readl(csr_base + addr + 0x08); ++ val = (val32 & 0xffff0000) | (upper_32_bits(mask) >> 16); ++ writel(val, csr_base + addr + 0x08); ++ ++ return mask; ++} ++ ++static void xgene_pcie_poll_linkup(struct xgene_pcie_port *port, ++ u32 *lanes, u32 *speed) ++{ ++ void __iomem *csr_base = port->csr_base; ++ ulong timeout; ++ u32 val32; ++ ++ /* ++ * A component enters the LTSSM Detect state within ++ * 20ms of the end of fundamental core reset. ++ */ ++ msleep(XGENE_LTSSM_DETECT_WAIT); ++ port->link_up = 0; ++ timeout = jiffies + msecs_to_jiffies(XGENE_LTSSM_L0_WAIT); ++ while (time_before(jiffies, timeout)) { ++ val32 = readl(csr_base + PCIECORE_CTLANDSTATUS); ++ if (val32 & LINK_UP_MASK) { ++ port->link_up = 1; ++ *speed = PIPE_PHY_RATE_RD(val32); ++ val32 = readl(csr_base + BRIDGE_STATUS_0); ++ *lanes = val32 >> 26; ++ break; ++ } ++ msleep(1); ++ } ++} ++ ++static void xgene_pcie_setup_root_complex(struct xgene_pcie_port *port) ++{ ++ void __iomem *csr_base = port->csr_base; ++ u32 val; ++ ++ val = (XGENE_PCIE_DEVICEID << 16) | XGENE_PCIE_VENDORID; ++ writel(val, csr_base + BRIDGE_CFG_0); ++ ++ val = readl(csr_base + BRIDGE_CFG_1); ++ val &= ~CLASS_CODE_MASK; ++ val |= PCI_CLASS_BRIDGE_PCI << 16; ++ writel(val, csr_base + BRIDGE_CFG_1); ++ ++ val = readl(csr_base + BRIDGE_CFG_14); ++ val |= SWITCH_PORT_MODE_MASK; ++ val &= ~PM_FORCE_RP_MODE_MASK; ++ writel(val, csr_base + BRIDGE_CFG_14); ++ ++ val = readl(csr_base + BRIDGE_CTRL_5); ++ val &= ~DEVICE_PORT_TYPE_MASK; ++ val |= XGENE_PORT_TYPE_RC; ++ writel(val, csr_base + BRIDGE_CTRL_5); ++ ++ val = readl(csr_base + BRIDGE_CTRL_2); ++ val |= ENABLE_ASPM; ++ writel(val, csr_base + BRIDGE_CTRL_2); ++ ++ val = readl(csr_base + BRIDGE_CFG_32); ++ writel(val | (1 << 19), csr_base + BRIDGE_CFG_32); ++} ++ ++/* Return 0 on success */ ++static int xgene_pcie_init_ecc(struct xgene_pcie_port *port) ++{ ++ void __iomem *csr_base = port->csr_base; ++ ulong timeout; ++ u32 val; ++ ++ val = readl(csr_base + MEM_RAM_SHUTDOWN); ++ if (!val) ++ return 0; ++ writel(0x0, csr_base + MEM_RAM_SHUTDOWN); ++ timeout = jiffies + msecs_to_jiffies(XGENE_PCIE_ECC_TIMEOUT); ++ while (time_before(jiffies, timeout)) { ++ val = readl(csr_base + BLOCK_MEM_RDY); ++ if (val == BLOCK_MEM_RDY_VAL) ++ return 0; ++ msleep(1); ++ } ++ ++ return 1; ++} ++ ++static int xgene_pcie_init_port(struct xgene_pcie_port *port) ++{ ++ int rc; ++ ++ port->clk = clk_get(port->dev, NULL); ++ if (IS_ERR(port->clk)) { ++ dev_err(port->dev, "clock not available\n"); ++ return -ENODEV; ++ } ++ ++ rc = clk_prepare_enable(port->clk); ++ if (rc) { ++ dev_err(port->dev, "clock enable failed\n"); ++ return rc; ++ } ++ ++ rc = xgene_pcie_init_ecc(port); ++ if (rc) { ++ dev_err(port->dev, "memory init failed\n"); ++ return rc; ++ } ++ ++ return 0; ++} ++ ++static void xgene_pcie_fixup_bridge(struct pci_dev *dev) ++{ ++ int i; ++ ++ /* Hide the PCI host BARs from the kernel as their content doesn't ++ * fit well in the resource management ++ */ ++ for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { ++ dev->resource[i].start = dev->resource[i].end = 0; ++ dev->resource[i].flags = 0; ++ } ++ dev_info(&dev->dev, "Hiding X-Gene pci host bridge resources %s\n", ++ pci_name(dev)); ++} ++DECLARE_PCI_FIXUP_HEADER(XGENE_PCIE_VENDORID, XGENE_PCIE_DEVICEID, ++ xgene_pcie_fixup_bridge); ++ ++static int xgene_pcie_map_reg(struct xgene_pcie_port *port, ++ struct platform_device *pdev, u64 *cfg_addr) ++{ ++ struct resource *res; ++ ++ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "csr"); ++ port->csr_base = devm_ioremap_resource(port->dev, res); ++ if (IS_ERR(port->csr_base)) ++ return PTR_ERR(port->csr_base); ++ ++ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cfg"); ++ port->cfg_base = devm_ioremap_resource(port->dev, res); ++ if (IS_ERR(port->cfg_base)) ++ return PTR_ERR(port->cfg_base); ++ *cfg_addr = res->start; ++ ++ return 0; ++} ++ ++static void xgene_pcie_setup_ob_reg(struct xgene_pcie_port *port, ++ struct resource *res, u32 offset, u64 addr) ++{ ++ void __iomem *base = port->csr_base + offset; ++ resource_size_t size = resource_size(res); ++ u64 restype = resource_type(res); ++ u64 cpu_addr, pci_addr; ++ u64 mask = 0; ++ u32 min_size; ++ u32 flag = EN_REG; ++ ++ if (restype == IORESOURCE_MEM) { ++ cpu_addr = res->start; ++ pci_addr = addr; ++ min_size = SZ_128M; ++ } else { ++ cpu_addr = addr; ++ pci_addr = res->start; ++ min_size = 128; ++ flag |= OB_LO_IO; ++ } ++ if (size >= min_size) ++ mask = ~(size - 1) | flag; ++ else ++ dev_warn(port->dev, "res size 0x%llx less than minimum 0x%x\n", ++ (u64)size, min_size); ++ writel(lower_32_bits(cpu_addr), base); ++ writel(upper_32_bits(cpu_addr), base + 0x04); ++ writel(lower_32_bits(mask), base + 0x08); ++ writel(upper_32_bits(mask), base + 0x0c); ++ writel(lower_32_bits(pci_addr), base + 0x10); ++ writel(upper_32_bits(pci_addr), base + 0x14); ++} ++ ++static void xgene_pcie_setup_cfg_reg(void __iomem *csr_base, u64 addr) ++{ ++ writel(lower_32_bits(addr), csr_base + CFGBARL); ++ writel(upper_32_bits(addr), csr_base + CFGBARH); ++ writel(EN_REG, csr_base + CFGCTL); ++} ++ ++static int xgene_pcie_map_ranges(struct xgene_pcie_port *port, ++ struct pci_host_bridge *bridge, ++ u64 cfg_addr) ++{ ++ struct device *dev = port->dev; ++ struct pci_host_bridge_window *window; ++ int ret; ++ ++ list_for_each_entry(window, &bridge->windows, list) { ++ struct resource *res = window->res; ++ u64 restype = resource_type(res); ++ dev_dbg(port->dev, "0x%08lx 0x%016llx...0x%016llx\n", ++ res->flags, res->start, res->end); ++ ++ switch (restype) { ++ case IORESOURCE_IO: ++ xgene_pcie_setup_ob_reg(port, res, OMR2BARL, ++ bridge->io_base); ++ ret = pci_remap_iospace(res, bridge->io_base); ++ if (ret < 0) ++ return ret; ++ break; ++ case IORESOURCE_MEM: ++ xgene_pcie_setup_ob_reg(port, res, OMR3BARL, ++ res->start - window->offset); ++ break; ++ case IORESOURCE_BUS: ++ break; ++ default: ++ dev_err(dev, "invalid io resource!"); ++ return -EINVAL; ++ } ++ } ++ xgene_pcie_setup_cfg_reg(port->csr_base, cfg_addr); ++ return 0; ++} ++ ++static void xgene_pcie_setup_pims(void *addr, u64 pim, u64 size) ++{ ++ writel(lower_32_bits(pim), addr); ++ writel(upper_32_bits(pim) | EN_COHERENCY, addr + 0x04); ++ writel(lower_32_bits(size), addr + 0x10); ++ writel(upper_32_bits(size), addr + 0x14); ++} ++ ++/* ++ * X-Gene PCIe support maximum 3 inbound memory regions ++ * This function helps to select a region based on size of region ++ */ ++static int xgene_pcie_select_ib_reg(u8 *ib_reg_mask, u64 size) ++{ ++ if ((size > 4) && (size < SZ_16M) && !(*ib_reg_mask & (1 << 1))) { ++ *ib_reg_mask |= (1 << 1); ++ return 1; ++ } ++ ++ if ((size > SZ_1K) && (size < SZ_1T) && !(*ib_reg_mask & (1 << 0))) { ++ *ib_reg_mask |= (1 << 0); ++ return 0; ++ } ++ ++ if ((size > SZ_1M) && (size < SZ_1T) && !(*ib_reg_mask & (1 << 2))) { ++ *ib_reg_mask |= (1 << 2); ++ return 2; ++ } ++ return -EINVAL; ++} ++ ++static void xgene_pcie_setup_ib_reg(struct xgene_pcie_port *port, ++ struct of_pci_range *range, u8 *ib_reg_mask) ++{ ++ void __iomem *csr_base = port->csr_base; ++ void __iomem *cfg_base = port->cfg_base; ++ void *bar_addr; ++ void *pim_addr; ++ u64 restype = range->flags & IORESOURCE_TYPE_BITS; ++ u64 cpu_addr = range->cpu_addr; ++ u64 pci_addr = range->pci_addr; ++ u64 size = range->size; ++ u64 mask = ~(size - 1) | EN_REG; ++ u32 flags = PCI_BASE_ADDRESS_MEM_TYPE_64; ++ u32 bar_low; ++ int region; ++ ++ region = xgene_pcie_select_ib_reg(ib_reg_mask, range->size); ++ if (region < 0) { ++ dev_warn(port->dev, "invalid pcie dma-range config\n"); ++ return; ++ } ++ ++ if (restype == PCI_BASE_ADDRESS_MEM_PREFETCH) ++ flags |= PCI_BASE_ADDRESS_MEM_PREFETCH; ++ ++ bar_low = pcie_bar_low_val((u32)cpu_addr, flags); ++ switch (region) { ++ case 0: ++ xgene_pcie_set_ib_mask(csr_base, BRIDGE_CFG_4, flags, size); ++ bar_addr = cfg_base + PCI_BASE_ADDRESS_0; ++ writel(bar_low, bar_addr); ++ writel(upper_32_bits(cpu_addr), bar_addr + 0x4); ++ pim_addr = csr_base + PIM1_1L; ++ break; ++ case 1: ++ bar_addr = csr_base + IBAR2; ++ writel(bar_low, bar_addr); ++ writel(lower_32_bits(mask), csr_base + IR2MSK); ++ pim_addr = csr_base + PIM2_1L; ++ break; ++ case 2: ++ bar_addr = csr_base + IBAR3L; ++ writel(bar_low, bar_addr); ++ writel(upper_32_bits(cpu_addr), bar_addr + 0x4); ++ writel(lower_32_bits(mask), csr_base + IR3MSKL); ++ writel(upper_32_bits(mask), csr_base + IR3MSKL + 0x4); ++ pim_addr = csr_base + PIM3_1L; ++ break; ++ } ++ ++ xgene_pcie_setup_pims(pim_addr, pci_addr, size); ++} ++ ++static int pci_dma_range_parser_init(struct of_pci_range_parser *parser, ++ struct device_node *node) ++{ ++ const int na = 3, ns = 2; ++ int rlen; ++ ++ parser->node = node; ++ parser->pna = of_n_addr_cells(node); ++ parser->np = parser->pna + na + ns; ++ ++ parser->range = of_get_property(node, "dma-ranges", &rlen); ++ if (!parser->range) ++ return -ENOENT; ++ ++ parser->end = parser->range + rlen / sizeof(__be32); ++ return 0; ++} ++ ++static int xgene_pcie_parse_map_dma_ranges(struct xgene_pcie_port *port) ++{ ++ struct device_node *np = port->node; ++ struct of_pci_range range; ++ struct of_pci_range_parser parser; ++ struct device *dev = port->dev; ++ u8 ib_reg_mask = 0; ++ ++ if (pci_dma_range_parser_init(&parser, np)) { ++ dev_err(dev, "missing dma-ranges property\n"); ++ return -EINVAL; ++ } ++ ++ /* Get the dma-ranges from DT */ ++ for_each_of_pci_range(&parser, &range) { ++ u64 end = range.cpu_addr + range.size - 1; ++ dev_dbg(port->dev, "0x%08x 0x%016llx..0x%016llx -> 0x%016llx\n", ++ range.flags, range.cpu_addr, end, range.pci_addr); ++ xgene_pcie_setup_ib_reg(port, &range, &ib_reg_mask); ++ } ++ return 0; ++} ++ ++static int xgene_pcie_probe_bridge(struct platform_device *pdev) ++{ ++ struct device_node *np = of_node_get(pdev->dev.of_node); ++ struct xgene_pcie_port *port; ++ struct pci_host_bridge *bridge; ++ resource_size_t lastbus; ++ u32 lanes = 0, speed = 0; ++ u64 cfg_addr = 0; ++ int ret; ++ ++ port = devm_kzalloc(&pdev->dev, sizeof(*port), GFP_KERNEL); ++ if (!port) ++ return -ENOMEM; ++ port->node = np; ++ port->dev = &pdev->dev; ++ ++ ret = xgene_pcie_map_reg(port, pdev, &cfg_addr); ++ if (ret) ++ return ret; ++ ++ ret = xgene_pcie_init_port(port); ++ if (ret) ++ return ret; ++ xgene_pcie_program_core(port->csr_base); ++ xgene_pcie_setup_root_complex(port); ++ ++ bridge = of_create_pci_host_bridge(&pdev->dev, &xgene_pcie_ops, port); ++ if (IS_ERR_OR_NULL(bridge)) ++ return PTR_ERR(bridge); ++ ++ ret = xgene_pcie_map_ranges(port, bridge, cfg_addr); ++ if (ret) ++ return ret; ++ ++ ret = xgene_pcie_parse_map_dma_ranges(port); ++ if (ret) ++ return ret; ++ ++ xgene_pcie_poll_linkup(port, &lanes, &speed); ++ if (!port->link_up) ++ dev_info(port->dev, "(rc) link down\n"); ++ else ++ dev_info(port->dev, "(rc) x%d gen-%d link up\n", ++ lanes, speed + 1); ++ platform_set_drvdata(pdev, port); ++ lastbus = pci_rescan_bus(bridge->bus); ++ pci_bus_update_busn_res_end(bridge->bus, lastbus); ++ return 0; ++} ++ ++static const struct of_device_id xgene_pcie_match_table[] = { ++ {.compatible = "apm,xgene-pcie",}, ++ {}, ++}; ++ ++static struct platform_driver xgene_pcie_driver = { ++ .driver = { ++ .name = "xgene-pcie", ++ .owner = THIS_MODULE, ++ .of_match_table = of_match_ptr(xgene_pcie_match_table), ++ }, ++ .probe = xgene_pcie_probe_bridge, ++}; ++module_platform_driver(xgene_pcie_driver); ++ ++MODULE_AUTHOR("Tanmay Inamdar "); ++MODULE_DESCRIPTION("APM X-Gene PCIe driver"); ++MODULE_LICENSE("GPL v2"); +diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c +index 1c8592b..b81dc68 100644 +--- a/drivers/pci/pci.c ++++ b/drivers/pci/pci.c +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -1453,6 +1454,9 @@ EXPORT_SYMBOL(pcim_pin_device); + */ + int __weak pcibios_add_device(struct pci_dev *dev) + { ++#ifdef CONFIG_OF ++ dev->irq = of_irq_parse_and_map_pci(dev, 0, 0); ++#endif + return 0; + } + +@@ -2704,6 +2708,39 @@ int pci_request_regions_exclusive(struct pci_dev *pdev, const char *res_name) + } + EXPORT_SYMBOL(pci_request_regions_exclusive); + ++/** ++ * pci_remap_iospace - Remap the memory mapped I/O space ++ * @res: Resource describing the I/O space ++ * @phys_addr: physical address where the range will be mapped. ++ * ++ * Remap the memory mapped I/O space described by the @res ++ * into the CPU physical address space. Only architectures ++ * that have memory mapped IO defined (and hence PCI_IOBASE) ++ * should call this function. ++ */ ++int __weak pci_remap_iospace(const struct resource *res, phys_addr_t phys_addr) ++{ ++ int err = -ENODEV; ++ ++#ifdef PCI_IOBASE ++ if (!(res->flags & IORESOURCE_IO)) ++ return -EINVAL; ++ ++ if (res->end > IO_SPACE_LIMIT) ++ return -EINVAL; ++ ++ err = ioremap_page_range(res->start + (unsigned long)PCI_IOBASE, ++ res->end + 1 + (unsigned long)PCI_IOBASE, ++ phys_addr, __pgprot(PROT_DEVICE_nGnRE)); ++#else ++ /* this architecture does not have memory mapped I/O space, ++ so this function should never be called */ ++ WARN_ON(1); ++#endif ++ ++ return err; ++} ++ + static void __pci_set_master(struct pci_dev *dev, bool enable) + { + u16 old_cmd, cmd; +diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c +index e3cf8a2..abf5e82 100644 +--- a/drivers/pci/probe.c ++++ b/drivers/pci/probe.c +@@ -515,7 +515,7 @@ static void pci_release_host_bridge_dev(struct device *dev) + kfree(bridge); + } + +-static struct pci_host_bridge *pci_alloc_host_bridge(struct pci_bus *b) ++static struct pci_host_bridge *pci_alloc_host_bridge(void) + { + struct pci_host_bridge *bridge; + +@@ -524,7 +524,6 @@ static struct pci_host_bridge *pci_alloc_host_bridge(struct pci_bus *b) + return NULL; + + INIT_LIST_HEAD(&bridge->windows); +- bridge->bus = b; + return bridge; + } + +@@ -1749,8 +1748,9 @@ void __weak pcibios_remove_bus(struct pci_bus *bus) + { + } + +-struct pci_bus *pci_create_root_bus(struct device *parent, int bus, +- struct pci_ops *ops, void *sysdata, struct list_head *resources) ++struct pci_bus *pci_create_root_bus_in_domain(struct device *parent, ++ int domain, int bus, struct pci_ops *ops, void *sysdata, ++ struct list_head *resources) + { + int error; + struct pci_host_bridge *bridge; +@@ -1761,37 +1761,41 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus, + char bus_addr[64]; + char *fmt; + ++ bridge = pci_alloc_host_bridge(); ++ if (!bridge) ++ return ERR_PTR(-ENOMEM); ++ ++ bridge->dev.parent = parent; ++ bridge->dev.release = pci_release_host_bridge_dev; ++ bridge->domain_nr = domain; ++ + b = pci_alloc_bus(); +- if (!b) +- return NULL; ++ if (!b) { ++ error = -ENOMEM; ++ goto err_out; ++ } + + b->sysdata = sysdata; + b->ops = ops; + b->number = b->busn_res.start = bus; +- b2 = pci_find_bus(pci_domain_nr(b), bus); ++ b2 = pci_find_bus(bridge->domain_nr, bus); + if (b2) { + /* If we already got to this bus through a different bridge, ignore it */ + dev_dbg(&b2->dev, "bus already known\n"); +- goto err_out; ++ error = -EEXIST; ++ goto err_bus_out; + } + +- bridge = pci_alloc_host_bridge(b); +- if (!bridge) +- goto err_out; +- +- bridge->dev.parent = parent; +- bridge->dev.release = pci_release_host_bridge_dev; +- dev_set_name(&bridge->dev, "pci%04x:%02x", pci_domain_nr(b), bus); ++ bridge->bus = b; ++ dev_set_name(&bridge->dev, "pci%04x:%02x", bridge->domain_nr, bus); + error = pcibios_root_bridge_prepare(bridge); +- if (error) { +- kfree(bridge); ++ if (error) + goto err_out; +- } + + error = device_register(&bridge->dev); + if (error) { + put_device(&bridge->dev); +- goto err_out; ++ goto err_bus_out; + } + b->bridge = get_device(&bridge->dev); + device_enable_async_suspend(b->bridge); +@@ -1802,7 +1806,7 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus, + + b->dev.class = &pcibus_class; + b->dev.parent = b->bridge; +- dev_set_name(&b->dev, "%04x:%02x", pci_domain_nr(b), bus); ++ dev_set_name(&b->dev, "%04x:%02x", bridge->domain_nr, bus); + error = device_register(&b->dev); + if (error) + goto class_dev_reg_err; +@@ -1848,9 +1852,31 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus, + class_dev_reg_err: + put_device(&bridge->dev); + device_unregister(&bridge->dev); ++err_bus_out: ++ kfree(b); + err_out: ++ kfree(bridge); ++ return ERR_PTR(error); ++} ++ ++struct pci_bus *pci_create_root_bus(struct device *parent, int bus, ++ struct pci_ops *ops, void *sysdata, struct list_head *resources) ++{ ++ int domain_nr; ++ struct pci_bus *b = pci_alloc_bus(); ++ if (!b) ++ return NULL; ++ ++ b->sysdata = sysdata; ++ domain_nr = pci_domain_nr(b); + kfree(b); +- return NULL; ++ ++ b = pci_create_root_bus_in_domain(parent, domain_nr, bus, ++ ops, sysdata, resources); ++ if (IS_ERR(b)) ++ return NULL; ++ ++ return b; + } + + int pci_bus_insert_busn_res(struct pci_bus *b, int bus, int bus_max) diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 0754f5c..4478a59 100644 --- a/drivers/rtc/Kconfig @@ -6559,6 +7453,19 @@ index 0000000..1a7f890 + return 0; +} +module_init(rtc_init); +diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h +index 975e1cc..2e2161b 100644 +--- a/include/asm-generic/io.h ++++ b/include/asm-generic/io.h +@@ -331,7 +331,7 @@ static inline void iounmap(void __iomem *addr) + #ifndef CONFIG_GENERIC_IOMAP + static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) + { +- return (void __iomem *) port; ++ return (void __iomem *)(PCI_IOBASE + (port & IO_SPACE_LIMIT)); + } + + static inline void ioport_unmap(void __iomem *p) diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h index f27000f..35b0c12 100644 --- a/include/kvm/arm_vgic.h @@ -6774,10 +7681,10 @@ index 41bbf8b..b3fac7c 100644 /* diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h new file mode 100644 -index 0000000..9eac712 +index 0000000..30cb755 --- /dev/null +++ b/include/linux/irqchip/arm-gic-v3.h -@@ -0,0 +1,193 @@ +@@ -0,0 +1,198 @@ +/* + * Copyright (C) 2013, 2014 ARM Limited, All Rights Reserved. + * Author: Marc Zyngier @@ -6831,6 +7738,8 @@ index 0000000..9eac712 +#define GICD_IROUTER_SPI_MODE_ANY (1U << 31) + +#define GIC_PIDR2_ARCH_MASK 0xf0 ++#define GIC_PIDR2_ARCH_GICv3 0x30 ++#define GIC_PIDR2_ARCH_GICv4 0x40 + +/* + * Re-Distributor registers, offsets from RD_base @@ -6911,8 +7820,11 @@ index 0000000..9eac712 +#define ICC_SRE_EL1 S3_0_C12_C12_5 +#define ICC_GRPEN1_EL1 S3_0_C12_C12_7 + ++#define ICC_IAR1_EL1_SPURIOUS 0x3ff ++ +#define ICC_SRE_EL2 S3_4_C12_C9_5 + ++#define ICC_SRE_EL2_SRE (1 << 0) +#define ICC_SRE_EL2_ENABLE (1 << 3) + +/* @@ -6971,6 +7883,115 @@ index 0000000..9eac712 +#endif + +#endif +diff --git a/include/linux/of_address.h b/include/linux/of_address.h +index c13b878..33c0420 100644 +--- a/include/linux/of_address.h ++++ b/include/linux/of_address.h +@@ -23,17 +23,8 @@ struct of_pci_range { + #define for_each_of_pci_range(parser, range) \ + for (; of_pci_range_parser_one(parser, range);) + +-static inline void of_pci_range_to_resource(struct of_pci_range *range, +- struct device_node *np, +- struct resource *res) +-{ +- res->flags = range->flags; +- res->start = range->cpu_addr; +- res->end = range->cpu_addr + range->size - 1; +- res->parent = res->child = res->sibling = NULL; +- res->name = np->full_name; +-} +- ++extern int of_pci_range_to_resource(struct of_pci_range *range, ++ struct device_node *np, struct resource *res); + /* Translate a DMA address from device space to CPU space */ + extern u64 of_translate_dma_address(struct device_node *dev, + const __be32 *in_addr); +@@ -55,6 +46,7 @@ extern void __iomem *of_iomap(struct device_node *device, int index); + extern const __be32 *of_get_address(struct device_node *dev, int index, + u64 *size, unsigned int *flags); + ++extern int pci_register_io_range(phys_addr_t addr, resource_size_t size); + extern unsigned long pci_address_to_pio(phys_addr_t addr); + + extern int of_pci_range_parser_init(struct of_pci_range_parser *parser, +diff --git a/include/linux/of_pci.h b/include/linux/of_pci.h +index dde3a4a..71e36d0 100644 +--- a/include/linux/of_pci.h ++++ b/include/linux/of_pci.h +@@ -15,6 +15,9 @@ struct device_node *of_pci_find_child_device(struct device_node *parent, + int of_pci_get_devfn(struct device_node *np); + int of_irq_parse_and_map_pci(const struct pci_dev *dev, u8 slot, u8 pin); + int of_pci_parse_bus_range(struct device_node *node, struct resource *res); ++struct pci_host_bridge *of_create_pci_host_bridge(struct device *parent, ++ struct pci_ops *ops, void *host_data); ++ + #else + static inline int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq) + { +@@ -43,6 +46,13 @@ of_pci_parse_bus_range(struct device_node *node, struct resource *res) + { + return -EINVAL; + } ++ ++static inline struct pci_host_bridge * ++of_create_pci_host_bridge(struct device *parent, struct pci_ops *ops, ++ void *host_data) ++{ ++ return NULL; ++} + #endif + + #if defined(CONFIG_OF) && defined(CONFIG_PCI_MSI) +diff --git a/include/linux/pci.h b/include/linux/pci.h +index 466bcd1..65fb1fc 100644 +--- a/include/linux/pci.h ++++ b/include/linux/pci.h +@@ -401,6 +401,8 @@ struct pci_host_bridge_window { + struct pci_host_bridge { + struct device dev; + struct pci_bus *bus; /* root bus */ ++ int domain_nr; ++ resource_size_t io_base; /* physical address for the start of I/O area */ + struct list_head windows; /* pci_host_bridge_windows */ + void (*release_fn)(struct pci_host_bridge *); + void *release_data; +@@ -769,6 +771,9 @@ struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, void *sysdata); + struct pci_bus *pci_create_root_bus(struct device *parent, int bus, + struct pci_ops *ops, void *sysdata, + struct list_head *resources); ++struct pci_bus *pci_create_root_bus_in_domain(struct device *parent, ++ int domain, int bus, struct pci_ops *ops, ++ void *sysdata, struct list_head *resources); + int pci_bus_insert_busn_res(struct pci_bus *b, int bus, int busmax); + int pci_bus_update_busn_res_end(struct pci_bus *b, int busmax); + void pci_bus_release_busn_res(struct pci_bus *b); +@@ -1095,6 +1100,9 @@ int __must_check pci_bus_alloc_resource(struct pci_bus *bus, + resource_size_t), + void *alignf_data); + ++ ++int pci_remap_iospace(const struct resource *res, phys_addr_t phys_addr); ++ + static inline dma_addr_t pci_bus_address(struct pci_dev *pdev, int bar) + { + struct pci_bus_region region; +@@ -1805,8 +1813,15 @@ static inline void pci_set_of_node(struct pci_dev *dev) { } + static inline void pci_release_of_node(struct pci_dev *dev) { } + static inline void pci_set_bus_of_node(struct pci_bus *bus) { } + static inline void pci_release_bus_of_node(struct pci_bus *bus) { } ++ + #endif /* CONFIG_OF */ + ++/* Used by architecture code to apply any quirks to the list of ++ * pci_host_bridge resource ranges before they are being used ++ * by of_create_pci_host_bridge() ++ */ ++extern int pcibios_fixup_bridge_ranges(struct list_head *resources); ++ + #ifdef CONFIG_EEH + static inline struct eeh_dev *pci_dev_to_eeh_dev(struct pci_dev *pdev) + { diff --git a/tools/perf/arch/arm64/include/perf_regs.h b/tools/perf/arch/arm64/include/perf_regs.h index e9441b9..1d3f39c 100644 --- a/tools/perf/arch/arm64/include/perf_regs.h @@ -6986,10 +8007,10 @@ index e9441b9..1d3f39c 100644 diff --git a/virt/kvm/arm/vgic-v2.c b/virt/kvm/arm/vgic-v2.c new file mode 100644 -index 0000000..a55a9a4 +index 0000000..5fd2b75 --- /dev/null +++ b/virt/kvm/arm/vgic-v2.c -@@ -0,0 +1,236 @@ +@@ -0,0 +1,243 @@ +/* + * Copyright (C) 2012,2013 ARM Limited, All Rights Reserved. + * Author: Marc Zyngier @@ -7044,9 +8065,6 @@ index 0000000..a55a9a4 + return lr_desc; +} + -+/* -+ * This also does some maintenance of ELRSR. -+ */ +static void vgic_v2_set_lr(struct kvm_vcpu *vcpu, int lr, + struct vgic_lr lr_desc) +{ @@ -7071,14 +8089,24 @@ index 0000000..a55a9a4 + +static u64 vgic_v2_get_elrsr(const struct kvm_vcpu *vcpu) +{ -+ const u32 *elrsr = vcpu->arch.vgic_cpu.vgic_v2.vgic_elrsr; -+ return *(u64 *)elrsr; ++ u64 val; ++ ++ val = vcpu->arch.vgic_cpu.vgic_v2.vgic_elrsr[1]; ++ val <<= 32; ++ val |= vcpu->arch.vgic_cpu.vgic_v2.vgic_elrsr[0]; ++ ++ return val; +} + +static u64 vgic_v2_get_eisr(const struct kvm_vcpu *vcpu) +{ -+ const u32 *eisr = vcpu->arch.vgic_cpu.vgic_v2.vgic_eisr; -+ return *(u64 *)eisr; ++ u64 val; ++ ++ val = vcpu->arch.vgic_cpu.vgic_v2.vgic_eisr[1]; ++ val <<= 32; ++ val |= vcpu->arch.vgic_cpu.vgic_v2.vgic_eisr[0]; ++ ++ return val; +} + +static u32 vgic_v2_get_interrupt_status(const struct kvm_vcpu *vcpu) diff --git a/kernel.spec b/kernel.spec index f4fbcd813..76be12261 100644 --- a/kernel.spec +++ b/kernel.spec @@ -2252,6 +2252,9 @@ fi # ||----w | # || || %changelog +* Thu Jul 24 2014 Kyle McMartin +- kernel-arm64.patch: update from upstream git. + * Thu Jul 24 2014 Josh Boyer - CVE-2014-5045 vfs: refcount issues during lazy umount on symlink (rhbz 1122471 1122482) - Fix regression in sched_setparam (rhbz 1117942) From 36ebbb459e7334cecfa1758523f3e5957394ff39 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Thu, 24 Jul 2014 19:20:52 -0400 Subject: [PATCH 18/45] arm64: update config-arm64 to include PCI support. --- config-arm64 | 5 +++++ kernel.spec | 1 + 2 files changed, 6 insertions(+) diff --git a/config-arm64 b/config-arm64 index be0c3cb5c..082ceda8d 100644 --- a/config-arm64 +++ b/config-arm64 @@ -106,3 +106,8 @@ CONFIG_RTC_DRV_EFI=y # dma issues in headers # CONFIG_PARPORT_PC is not set # CONFIG_VGA_CONSOLE is not set + +CONFIG_PCI_XGENE=y +CONFIG_HOTPLUG_PCI=y +# CONFIG_HOTPLUG_PCI_CPCI is not set +# CONFIG_HOTPLUG_PCI_SHPC is not set diff --git a/kernel.spec b/kernel.spec index 76be12261..ce514e750 100644 --- a/kernel.spec +++ b/kernel.spec @@ -2254,6 +2254,7 @@ fi %changelog * Thu Jul 24 2014 Kyle McMartin - kernel-arm64.patch: update from upstream git. +- arm64: update config-arm64 to include PCI support. * Thu Jul 24 2014 Josh Boyer - CVE-2014-5045 vfs: refcount issues during lazy umount on symlink (rhbz 1122471 1122482) From 7d60e1ecb928c55bcebc348508606699815e00f9 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Fri, 25 Jul 2014 08:18:02 -0400 Subject: [PATCH 19/45] Fix selinux sock_graft hook for AF_ALG address family (rhbz 1115120) --- kernel.spec | 9 +++ ...daf4d3df5a977e4623963f141a627fd2efce.patch | 75 +++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch diff --git a/kernel.spec b/kernel.spec index ce514e750..8840dc8e9 100644 --- a/kernel.spec +++ b/kernel.spec @@ -642,6 +642,9 @@ Patch25118: sched-fix-sched_setparam-policy-1-logic.patch #CVE-2014-5045 rhbz 1122472 1122482 Patch25119: fs-umount-on-symlink-leaks-mnt-count.patch +#rhbz 1115120 +Patch25120: selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch + # git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel Patch30000: kernel-arm64.patch @@ -1370,6 +1373,9 @@ ApplyPatch sched-fix-sched_setparam-policy-1-logic.patch #CVE-2014-5045 rhbz 1122472 1122482 ApplyPatch fs-umount-on-symlink-leaks-mnt-count.patch +#rhbz 1115120 +ApplyPatch selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch + %if 0%{?aarch64patches} ApplyPatch kernel-arm64.patch %ifnarch aarch64 # this is stupid, but i want to notice before secondary koji does. @@ -2252,6 +2258,9 @@ fi # ||----w | # || || %changelog +* Fri Jul 25 2014 Josh Boyer +- Fix selinux sock_graft hook for AF_ALG address family (rhbz 1115120) + * Thu Jul 24 2014 Kyle McMartin - kernel-arm64.patch: update from upstream git. - arm64: update config-arm64 to include PCI support. diff --git a/selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch b/selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch new file mode 100644 index 000000000..bf8d534fc --- /dev/null +++ b/selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch @@ -0,0 +1,75 @@ +Bugzilla: 1115120 +Upstream-status: sent for 3.16 + +From 4da6daf4d3df5a977e4623963f141a627fd2efce Mon Sep 17 00:00:00 2001 +From: Paul Moore +Date: Thu, 10 Jul 2014 10:17:48 -0400 +Subject: [PATCH] selinux: fix the default socket labeling in sock_graft() + +The sock_graft() hook has special handling for AF_INET, AF_INET, and +AF_UNIX sockets as those address families have special hooks which +label the sock before it is attached its associated socket. +Unfortunately, the sock_graft() hook was missing a default approach +to labeling sockets which meant that any other address family which +made use of connections or the accept() syscall would find the +returned socket to be in an "unlabeled" state. This was recently +demonstrated by the kcrypto/AF_ALG subsystem and the newly released +cryptsetup package (cryptsetup v1.6.5 and later). + +This patch preserves the special handling in selinux_sock_graft(), +but adds a default behavior - setting the sock's label equal to the +associated socket - which resolves the problem with AF_ALG and +presumably any other address family which makes use of accept(). + +Cc: stable@vger.kernel.org +Signed-off-by: Paul Moore +Tested-by: Milan Broz +--- + include/linux/security.h | 5 ++++- + security/selinux/hooks.c | 13 +++++++++++-- + 2 files changed, 15 insertions(+), 3 deletions(-) + +diff --git a/include/linux/security.h b/include/linux/security.h +index 6478ce3..794be73 100644 +--- a/include/linux/security.h ++++ b/include/linux/security.h +@@ -987,7 +987,10 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) + * Retrieve the LSM-specific secid for the sock to enable caching of network + * authorizations. + * @sock_graft: +- * Sets the socket's isec sid to the sock's sid. ++ * This hook is called in response to a newly created sock struct being ++ * grafted onto an existing socket and allows the security module to ++ * perform whatever security attribute management is necessary for both ++ * the sock and socket. + * @inet_conn_request: + * Sets the openreq's sid to socket's sid with MLS portion taken from peer sid. + * @inet_csk_clone: +diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c +index 336f0a0..b3a6754 100644 +--- a/security/selinux/hooks.c ++++ b/security/selinux/hooks.c +@@ -4499,9 +4499,18 @@ static void selinux_sock_graft(struct sock *sk, struct socket *parent) + struct inode_security_struct *isec = SOCK_INODE(parent)->i_security; + struct sk_security_struct *sksec = sk->sk_security; + +- if (sk->sk_family == PF_INET || sk->sk_family == PF_INET6 || +- sk->sk_family == PF_UNIX) ++ switch (sk->sk_family) { ++ case PF_INET: ++ case PF_INET6: ++ case PF_UNIX: + isec->sid = sksec->sid; ++ break; ++ default: ++ /* by default there is no special labeling mechanism for the ++ * sksec label so inherit the label from the parent socket */ ++ BUG_ON(sksec->sid != SECINITSID_UNLABELED); ++ sksec->sid = isec->sid; ++ } + sksec->sclass = isec->sclass; + } + +-- +1.9.3 + From bb2e8de70e9a405add7363819c85ceb4233245d0 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Fri, 25 Jul 2014 10:03:52 -0400 Subject: [PATCH 20/45] Linux v3.16-rc6-118-g82e13c71bc65 --- kernel-arm64.patch | 42 ------------------------------------------ kernel.spec | 5 +++-- sources | 2 +- 3 files changed, 4 insertions(+), 45 deletions(-) diff --git a/kernel-arm64.patch b/kernel-arm64.patch index 04f5fab2a..42959490a 100644 --- a/kernel-arm64.patch +++ b/kernel-arm64.patch @@ -1782,48 +1782,6 @@ index 0000000..21e68f6 +ENDPROC(__vgic_v3_get_ich_vtr_el2) + + .popsection -diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c -index f43db8a..e90c542 100644 ---- a/arch/arm64/mm/init.c -+++ b/arch/arm64/mm/init.c -@@ -60,6 +60,17 @@ static int __init early_initrd(char *p) - early_param("initrd", early_initrd); - #endif - -+/* -+ * Return the maximum physical address for ZONE_DMA (DMA_BIT_MASK(32)). It -+ * currently assumes that for memory starting above 4G, 32-bit devices will -+ * use a DMA offset. -+ */ -+static phys_addr_t max_zone_dma_phys(void) -+{ -+ phys_addr_t offset = memblock_start_of_DRAM() & GENMASK_ULL(63, 32); -+ return min(offset + (1ULL << 32), memblock_end_of_DRAM()); -+} -+ - static void __init zone_sizes_init(unsigned long min, unsigned long max) - { - struct memblock_region *reg; -@@ -70,9 +81,7 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max) - - /* 4GB maximum for 32-bit only capable devices */ - if (IS_ENABLED(CONFIG_ZONE_DMA)) { -- unsigned long max_dma_phys = -- (unsigned long)(dma_to_phys(NULL, DMA_BIT_MASK(32)) + 1); -- max_dma = max(min, min(max, max_dma_phys >> PAGE_SHIFT)); -+ max_dma = PFN_DOWN(max_zone_dma_phys()); - zone_size[ZONE_DMA] = max_dma - min; - } - zone_size[ZONE_NORMAL] = max - max_dma; -@@ -146,7 +155,7 @@ void __init arm64_memblock_init(void) - - /* 4GB maximum for 32-bit only capable devices */ - if (IS_ENABLED(CONFIG_ZONE_DMA)) -- dma_phys_limit = dma_to_phys(NULL, DMA_BIT_MASK(32)) + 1; -+ dma_phys_limit = max_zone_dma_phys(); - dma_contiguous_reserve(dma_phys_limit); - - memblock_allow_resize(); diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c index 55d4ba4..deed6fa 100644 --- a/arch/ia64/kernel/process.c diff --git a/kernel.spec b/kernel.spec index 8840dc8e9..2287a156f 100644 --- a/kernel.spec +++ b/kernel.spec @@ -69,7 +69,7 @@ Summary: The Linux kernel # The rc snapshot level %define rcrev 6 # The git snapshot level -%define gitrev 1 +%define gitrev 2 # Set rpm version accordingly %define rpmversion 3.%{upstream_sublevel}.0 %endif @@ -2258,7 +2258,8 @@ fi # ||----w | # || || %changelog -* Fri Jul 25 2014 Josh Boyer +* Fri Jul 25 2014 Josh Boyer - 3.16.0-0.rc6.git2.1 +- Linux v3.16-rc6-118-g82e13c71bc65 - Fix selinux sock_graft hook for AF_ALG address family (rhbz 1115120) * Thu Jul 24 2014 Kyle McMartin diff --git a/sources b/sources index 1e25ec607..5074e14fd 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ 97ca1625bb40368dc41b9a7971549071 linux-3.15.tar.xz ef8f4db937f521a7e323ec589536ba25 perf-man-3.15.tar.gz 93fbbc57b86d1373be5bd94b1ee06ddd patch-3.16-rc6.xz -e6b91e7f2dadd80e52017d335c0c433b patch-3.16-rc6-git1.xz +cfbb28625de3f01fcd2c633c6f2a8730 patch-3.16-rc6-git2.xz From 5832c90689ebba193ecd2f4269a99ecbb5dd2d1a Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Sat, 26 Jul 2014 09:44:41 -0400 Subject: [PATCH 21/45] Linux v3.16-rc6-139-g9c5502189fa0 --- kernel.spec | 5 ++++- sources | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel.spec b/kernel.spec index 2287a156f..d09ed3d01 100644 --- a/kernel.spec +++ b/kernel.spec @@ -69,7 +69,7 @@ Summary: The Linux kernel # The rc snapshot level %define rcrev 6 # The git snapshot level -%define gitrev 2 +%define gitrev 3 # Set rpm version accordingly %define rpmversion 3.%{upstream_sublevel}.0 %endif @@ -2258,6 +2258,9 @@ fi # ||----w | # || || %changelog +* Sat Jul 26 2014 Josh Boyer - 3.16.0-0.rc6.git3.1 +- Linux v3.16-rc6-139-g9c5502189fa0 + * Fri Jul 25 2014 Josh Boyer - 3.16.0-0.rc6.git2.1 - Linux v3.16-rc6-118-g82e13c71bc65 - Fix selinux sock_graft hook for AF_ALG address family (rhbz 1115120) diff --git a/sources b/sources index 5074e14fd..f4a883c94 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ 97ca1625bb40368dc41b9a7971549071 linux-3.15.tar.xz ef8f4db937f521a7e323ec589536ba25 perf-man-3.15.tar.gz 93fbbc57b86d1373be5bd94b1ee06ddd patch-3.16-rc6.xz -cfbb28625de3f01fcd2c633c6f2a8730 patch-3.16-rc6-git2.xz +c801419646d9d68d95754c0e532ed030 patch-3.16-rc6-git3.xz From 4ff978841c2add7ebb691e7cb9cb01dd7cccafe9 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 28 Jul 2014 10:13:52 +0100 Subject: [PATCH 22/45] Add patch to fix loading of tegra drm using device tree --- arm-tegra-drmdetection.patch | 111 +++++++++++++++++++++++++++++++++++ kernel.spec | 6 ++ 2 files changed, 117 insertions(+) create mode 100644 arm-tegra-drmdetection.patch diff --git a/arm-tegra-drmdetection.patch b/arm-tegra-drmdetection.patch new file mode 100644 index 000000000..d84040513 --- /dev/null +++ b/arm-tegra-drmdetection.patch @@ -0,0 +1,111 @@ +From: Stephen Warren + +When tegra-drm.ko is built as a module, these MODULE_DEVICE_TABLEs allow +the module to be auto-loaded since the module will match the devices +instantiated from device tree. + +(Notes for stable: in 3.14+, just git rm any conflicting file, since they +are added in later kernels. For 3.13 and below, manual merging will be +needed) + +Cc: +Signed-off-by: Stephen Warren +--- +v2: Remove change to drm.c, since the match table there isn't used for +probing. +--- + drivers/gpu/drm/tegra/dc.c | 1 + + drivers/gpu/drm/tegra/dpaux.c | 1 + + drivers/gpu/drm/tegra/dsi.c | 1 + + drivers/gpu/drm/tegra/gr2d.c | 1 + + drivers/gpu/drm/tegra/gr3d.c | 1 + + drivers/gpu/drm/tegra/hdmi.c | 1 + + drivers/gpu/drm/tegra/sor.c | 1 + + 7 files changed, 7 insertions(+) + +diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c +index ef40381f3909..48c3bc460eef 100644 +--- a/drivers/gpu/drm/tegra/dc.c ++++ b/drivers/gpu/drm/tegra/dc.c +@@ -1303,6 +1303,7 @@ static const struct of_device_id tegra_dc_of_match[] = { + /* sentinel */ + } + }; ++MODULE_DEVICE_TABLE(of, tegra_dc_of_match); + + static int tegra_dc_parse_dt(struct tegra_dc *dc) + { +diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c +index 3f132e356e9c..708f783ead47 100644 +--- a/drivers/gpu/drm/tegra/dpaux.c ++++ b/drivers/gpu/drm/tegra/dpaux.c +@@ -382,6 +382,7 @@ static const struct of_device_id tegra_dpaux_of_match[] = { + { .compatible = "nvidia,tegra124-dpaux", }, + { }, + }; ++MODULE_DEVICE_TABLE(of, tegra_dpaux_of_match); + + struct platform_driver tegra_dpaux_driver = { + .driver = { +diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c +index bd56f2affa78..97c409f10456 100644 +--- a/drivers/gpu/drm/tegra/dsi.c ++++ b/drivers/gpu/drm/tegra/dsi.c +@@ -982,6 +982,7 @@ static const struct of_device_id tegra_dsi_of_match[] = { + { .compatible = "nvidia,tegra114-dsi", }, + { }, + }; ++MODULE_DEVICE_TABLE(of, tegra_dsi_of_match); + + struct platform_driver tegra_dsi_driver = { + .driver = { +diff --git a/drivers/gpu/drm/tegra/gr2d.c b/drivers/gpu/drm/tegra/gr2d.c +index 7c53941f2a9e..02cd3e37a6ec 100644 +--- a/drivers/gpu/drm/tegra/gr2d.c ++++ b/drivers/gpu/drm/tegra/gr2d.c +@@ -121,6 +121,7 @@ static const struct of_device_id gr2d_match[] = { + { .compatible = "nvidia,tegra20-gr2d" }, + { }, + }; ++MODULE_DEVICE_TABLE(of, gr2d_match); + + static const u32 gr2d_addr_regs[] = { + GR2D_UA_BASE_ADDR, +diff --git a/drivers/gpu/drm/tegra/gr3d.c b/drivers/gpu/drm/tegra/gr3d.c +index 30f5ba9bd6d0..2bea2b2d204e 100644 +--- a/drivers/gpu/drm/tegra/gr3d.c ++++ b/drivers/gpu/drm/tegra/gr3d.c +@@ -130,6 +130,7 @@ static const struct of_device_id tegra_gr3d_match[] = { + { .compatible = "nvidia,tegra20-gr3d" }, + { } + }; ++MODULE_DEVICE_TABLE(of, tegra_gr3d_match); + + static const u32 gr3d_addr_regs[] = { + GR3D_IDX_ATTRIBUTE( 0), +diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c +index a0b8d8539d07..84ea0c8b47f7 100644 +--- a/drivers/gpu/drm/tegra/hdmi.c ++++ b/drivers/gpu/drm/tegra/hdmi.c +@@ -1370,6 +1370,7 @@ static const struct of_device_id tegra_hdmi_of_match[] = { + { .compatible = "nvidia,tegra20-hdmi", .data = &tegra20_hdmi_config }, + { }, + }; ++MODULE_DEVICE_TABLE(of, tegra_hdmi_of_match); + + static int tegra_hdmi_probe(struct platform_device *pdev) + { +diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c +index 27c979b50111..061a5c501124 100644 +--- a/drivers/gpu/drm/tegra/sor.c ++++ b/drivers/gpu/drm/tegra/sor.c +@@ -1455,6 +1455,7 @@ static const struct of_device_id tegra_sor_of_match[] = { + { .compatible = "nvidia,tegra124-sor", }, + { }, + }; ++MODULE_DEVICE_TABLE(of, tegra_sor_of_match); + + struct platform_driver tegra_sor_driver = { + .driver = { +-- +1.8.1.5 diff --git a/kernel.spec b/kernel.spec index d09ed3d01..573c0ca13 100644 --- a/kernel.spec +++ b/kernel.spec @@ -602,6 +602,8 @@ Patch15000: nowatchdog-on-virt.patch Patch21020: arm-tegra-usb-no-reset-linux33.patch Patch21021: arm-beagle.patch Patch21022: arm-imx6-utilite.patch +# http://www.spinics.net/lists/linux-tegra/msg17948.html +Patch21023: arm-tegra-drmdetection.patch #rhbz 754518 Patch21235: scsi-sd_revalidate_disk-prevent-NULL-ptr-deref.patch @@ -1243,6 +1245,7 @@ ApplyPatch 0001-lib-cpumask-Make-CPUMASK_OFFSTACK-usable-without-deb.patch ApplyPatch arm-tegra-usb-no-reset-linux33.patch ApplyPatch arm-beagle.patch ApplyPatch arm-imx6-utilite.patch +ApplyPatch arm-tegra-drmdetection.patch # # bugfixes to drivers and filesystems @@ -2258,6 +2261,9 @@ fi # ||----w | # || || %changelog +* Mon Jul 28 2014 Peter Robinson +- Add patch to fix loading of tegra drm using device tree + * Sat Jul 26 2014 Josh Boyer - 3.16.0-0.rc6.git3.1 - Linux v3.16-rc6-139-g9c5502189fa0 From f65a465ccd6943b6cbb20b8eb2e22d12aa083c3b Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Mon, 28 Jul 2014 08:01:16 -0400 Subject: [PATCH 23/45] Linux v3.16-rc7 - Disable debugging options. --- config-generic | 6 +- config-nodebug | 118 ++++++++++----------- config-x86-generic | 2 +- fs-umount-on-symlink-leaks-mnt-count.patch | 41 ------- kernel.spec | 16 ++- sources | 3 +- 6 files changed, 71 insertions(+), 115 deletions(-) delete mode 100644 fs-umount-on-symlink-leaks-mnt-count.patch diff --git a/config-generic b/config-generic index cb3787b1b..d83167ed4 100644 --- a/config-generic +++ b/config-generic @@ -1695,13 +1695,13 @@ CONFIG_B43_SDIO=y CONFIG_B43_BCMA=y # CONFIG_B43_BCMA_EXTRA is not set CONFIG_B43_BCMA_PIO=y -CONFIG_B43_DEBUG=y +# CONFIG_B43_DEBUG is not set CONFIG_B43_PHY_LP=y CONFIG_B43_PHY_N=y CONFIG_B43_PHY_HT=y # CONFIG_B43_FORCE_PIO is not set CONFIG_B43LEGACY=m -CONFIG_B43LEGACY_DEBUG=y +# CONFIG_B43LEGACY_DEBUG is not set CONFIG_B43LEGACY_DMA=y CONFIG_B43LEGACY_PIO=y CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y @@ -4641,7 +4641,7 @@ CONFIG_PM_DEBUG=y # CONFIG_DPM_WATCHDOG is not set # revisit this in debug CONFIG_PM_TRACE=y CONFIG_PM_TRACE_RTC=y -CONFIG_PM_TEST_SUSPEND=y +# CONFIG_PM_TEST_SUSPEND is not set CONFIG_PM_RUNTIME=y # CONFIG_PM_OPP is not set # CONFIG_PM_AUTOSLEEP is not set diff --git a/config-nodebug b/config-nodebug index 360f418d4..e16a37b57 100644 --- a/config-nodebug +++ b/config-nodebug @@ -2,101 +2,101 @@ CONFIG_SND_VERBOSE_PRINTK=y CONFIG_SND_DEBUG=y CONFIG_SND_PCM_XRUN_DEBUG=y -CONFIG_DEBUG_ATOMIC_SLEEP=y +# CONFIG_DEBUG_ATOMIC_SLEEP is not set -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y -CONFIG_DEBUG_RT_MUTEXES=y -CONFIG_DEBUG_LOCK_ALLOC=y -CONFIG_LOCK_TORTURE_TEST=m -CONFIG_PROVE_LOCKING=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_PROVE_RCU=y +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_LOCK_TORTURE_TEST is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_PROVE_RCU is not set # CONFIG_PROVE_RCU_REPEATEDLY is not set -CONFIG_DEBUG_PER_CPU_MAPS=y +# CONFIG_DEBUG_PER_CPU_MAPS is not set CONFIG_CPUMASK_OFFSTACK=y -CONFIG_CPU_NOTIFIER_ERROR_INJECT=m +# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set -CONFIG_FAULT_INJECTION=y -CONFIG_FAILSLAB=y -CONFIG_FAIL_PAGE_ALLOC=y -CONFIG_FAIL_MAKE_REQUEST=y -CONFIG_FAULT_INJECTION_DEBUG_FS=y -CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y -CONFIG_FAIL_IO_TIMEOUT=y -CONFIG_FAIL_MMC_REQUEST=y +# CONFIG_FAULT_INJECTION is not set +# CONFIG_FAILSLAB is not set +# CONFIG_FAIL_PAGE_ALLOC is not set +# CONFIG_FAIL_MAKE_REQUEST is not set +# CONFIG_FAULT_INJECTION_DEBUG_FS is not set +# CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set +# CONFIG_FAIL_IO_TIMEOUT is not set +# CONFIG_FAIL_MMC_REQUEST is not set -CONFIG_LOCK_STAT=y +# CONFIG_LOCK_STAT is not set -CONFIG_DEBUG_STACK_USAGE=y +# CONFIG_DEBUG_STACK_USAGE is not set -CONFIG_ACPI_DEBUG=y +# CONFIG_ACPI_DEBUG is not set # CONFIG_ACPI_DEBUG_FUNC_TRACE is not set -CONFIG_DEBUG_SG=y -CONFIG_DEBUG_PI_LIST=y +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_PI_LIST is not set # CONFIG_DEBUG_PAGEALLOC is not set -CONFIG_DEBUG_WRITECOUNT=y -CONFIG_DEBUG_OBJECTS=y +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_OBJECTS is not set # CONFIG_DEBUG_OBJECTS_SELFTEST is not set -CONFIG_DEBUG_OBJECTS_FREE=y -CONFIG_DEBUG_OBJECTS_TIMERS=y -CONFIG_DEBUG_OBJECTS_RCU_HEAD=y +# CONFIG_DEBUG_OBJECTS_FREE is not set +# CONFIG_DEBUG_OBJECTS_TIMERS is not set +# CONFIG_DEBUG_OBJECTS_RCU_HEAD is not set CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1 -CONFIG_X86_PTDUMP=y -CONFIG_EFI_PGT_DUMP=y +# CONFIG_X86_PTDUMP is not set +# CONFIG_EFI_PGT_DUMP is not set -CONFIG_CAN_DEBUG_DEVICES=y +# CONFIG_CAN_DEBUG_DEVICES is not set -CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y +# CONFIG_SYSCTL_SYSCALL_CHECK is not set -CONFIG_DEBUG_NOTIFIERS=y +# CONFIG_DEBUG_NOTIFIERS is not set -CONFIG_DMA_API_DEBUG=y +# CONFIG_DMA_API_DEBUG is not set -CONFIG_MMIOTRACE=y +# CONFIG_MMIOTRACE is not set -CONFIG_DEBUG_CREDENTIALS=y +# CONFIG_DEBUG_CREDENTIALS is not set # off in both production debug and nodebug builds, # on in rawhide nodebug builds -CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -CONFIG_EXT4_DEBUG=y +# CONFIG_EXT4_DEBUG is not set # CONFIG_XFS_WARN is not set -CONFIG_DEBUG_PERF_USE_VMALLOC=y +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_JBD2_DEBUG=y +# CONFIG_JBD2_DEBUG is not set -CONFIG_NFSD_FAULT_INJECTION=y +# CONFIG_NFSD_FAULT_INJECTION is not set -CONFIG_DEBUG_BLK_CGROUP=y +# CONFIG_DEBUG_BLK_CGROUP is not set -CONFIG_DRBD_FAULT_INJECTION=y +# CONFIG_DRBD_FAULT_INJECTION is not set -CONFIG_ATH_DEBUG=y -CONFIG_CARL9170_DEBUGFS=y -CONFIG_IWLWIFI_DEVICE_TRACING=y +# CONFIG_ATH_DEBUG is not set +# CONFIG_CARL9170_DEBUGFS is not set +# CONFIG_IWLWIFI_DEVICE_TRACING is not set # CONFIG_RTLWIFI_DEBUG is not set -CONFIG_DEBUG_OBJECTS_WORK=y +# CONFIG_DEBUG_OBJECTS_WORK is not set -CONFIG_DMADEVICES_DEBUG=y -CONFIG_DMADEVICES_VDEBUG=y +# CONFIG_DMADEVICES_DEBUG is not set +# CONFIG_DMADEVICES_VDEBUG is not set CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_CEPH_LIB_PRETTYDEBUG=y -CONFIG_QUOTA_DEBUG=y +# CONFIG_CEPH_LIB_PRETTYDEBUG is not set +# CONFIG_QUOTA_DEBUG is not set CONFIG_PCI_DEFAULT_USE_CRS=y @@ -104,18 +104,18 @@ CONFIG_KGDB_KDB=y CONFIG_KDB_KEYBOARD=y CONFIG_KDB_CONTINUE_CATASTROPHIC=0 -CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y +# CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER is not set # CONFIG_PERCPU_TEST is not set -CONFIG_TEST_LIST_SORT=y +# CONFIG_TEST_LIST_SORT is not set # CONFIG_TEST_STRING_HELPERS is not set -CONFIG_DETECT_HUNG_TASK=y +# CONFIG_DETECT_HUNG_TASK is not set CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set -CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y +# CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK is not set -CONFIG_DEBUG_KMEMLEAK=y +# CONFIG_DEBUG_KMEMLEAK is not set CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=1024 # CONFIG_DEBUG_KMEMLEAK_TEST is not set CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y @@ -126,7 +126,7 @@ CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y # CONFIG_SPI_DEBUG is not set -CONFIG_X86_DEBUG_STATIC_CPU_HAS=y +# CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set # CONFIG_SCHEDSTATS is not set # CONFIG_LATENCYTOP is not set diff --git a/config-x86-generic b/config-x86-generic index 997bc472a..7968fdaea 100644 --- a/config-x86-generic +++ b/config-x86-generic @@ -334,7 +334,7 @@ CONFIG_SP5100_TCO=m # CONFIG_MEMTEST is not set # CONFIG_DEBUG_TLBFLUSH is not set -CONFIG_MAXSMP=y +# CONFIG_MAXSMP is not set CONFIG_HP_ILO=m diff --git a/fs-umount-on-symlink-leaks-mnt-count.patch b/fs-umount-on-symlink-leaks-mnt-count.patch deleted file mode 100644 index ed0e8a397..000000000 --- a/fs-umount-on-symlink-leaks-mnt-count.patch +++ /dev/null @@ -1,41 +0,0 @@ -Bugzilla: 1122482 -Upstream-status: Sent for 3.16 -From: Vasily Averin -Subject: [PATCH v4] fs: umount on symlink leaks mnt count -Currently umount on symlink blocks following umount: - -/vz is separate mount - -# ls /vz/ -al | grep test -drwxr-xr-x. 2 root root 4096 Jul 19 01:14 testdir -lrwxrwxrwx. 1 root root 11 Jul 19 01:16 testlink -> /vz/testdir -# umount -l /vz/testlink -umount: /vz/testlink: not mounted (expected) -# lsof /vz -# umount /vz -umount: /vz: device is busy. (unexpected) - -In this case mountpoint_last() gets an extra refcount on path->mnt - -Signed-off-by: Vasily Averin ---- - fs/namei.c | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) -diff --git a/fs/namei.c b/fs/namei.c -index 985c6f3..9eb787e 100644 ---- a/fs/namei.c -+++ b/fs/namei.c -@@ -2256,9 +2256,10 @@ done: - goto out; - } - path->dentry = dentry; -- path->mnt = mntget(nd->path.mnt); -+ path->mnt = nd->path.mnt; - if (should_follow_link(dentry, nd->flags & LOOKUP_FOLLOW)) - return 1; -+ mntget(path->mnt); - follow_mount(path); - error = 0; - out: --- -1.7.5.4 diff --git a/kernel.spec b/kernel.spec index 573c0ca13..3a3883e8c 100644 --- a/kernel.spec +++ b/kernel.spec @@ -67,9 +67,9 @@ Summary: The Linux kernel # The next upstream release sublevel (base_sublevel+1) %define upstream_sublevel %(echo $((%{base_sublevel} + 1))) # The rc snapshot level -%define rcrev 6 +%define rcrev 7 # The git snapshot level -%define gitrev 3 +%define gitrev 0 # Set rpm version accordingly %define rpmversion 3.%{upstream_sublevel}.0 %endif @@ -130,7 +130,7 @@ Summary: The Linux kernel # Set debugbuildsenabled to 1 for production (build separate debug kernels) # and 0 for rawhide (all kernels are debug kernels). # See also 'make debug' and 'make release'. -%define debugbuildsenabled 0 +%define debugbuildsenabled 1 # Want to build a vanilla kernel build without any non-upstream patches? %define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0} @@ -641,9 +641,6 @@ Patch25110: 0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch #rhbz 1117942 Patch25118: sched-fix-sched_setparam-policy-1-logic.patch -#CVE-2014-5045 rhbz 1122472 1122482 -Patch25119: fs-umount-on-symlink-leaks-mnt-count.patch - #rhbz 1115120 Patch25120: selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch @@ -1373,9 +1370,6 @@ ApplyPatch 0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch #rhbz 1117942 ApplyPatch sched-fix-sched_setparam-policy-1-logic.patch -#CVE-2014-5045 rhbz 1122472 1122482 -ApplyPatch fs-umount-on-symlink-leaks-mnt-count.patch - #rhbz 1115120 ApplyPatch selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch @@ -2261,6 +2255,10 @@ fi # ||----w | # || || %changelog +* Mon Jul 28 2014 Josh Boyer - 3.16.0-0.rc7.git0.1 +- Linux v3.16-rc7 +- Disable debugging options. + * Mon Jul 28 2014 Peter Robinson - Add patch to fix loading of tegra drm using device tree diff --git a/sources b/sources index f4a883c94..acbaaa8ce 100644 --- a/sources +++ b/sources @@ -1,4 +1,3 @@ 97ca1625bb40368dc41b9a7971549071 linux-3.15.tar.xz ef8f4db937f521a7e323ec589536ba25 perf-man-3.15.tar.gz -93fbbc57b86d1373be5bd94b1ee06ddd patch-3.16-rc6.xz -c801419646d9d68d95754c0e532ed030 patch-3.16-rc6-git3.xz +cf68262d938c6ec27bc96896beb8549f patch-3.16-rc7.xz From 1416cd4c0bb366c2fdf5ae5b027e2be973d7f5df Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Mon, 28 Jul 2014 09:46:02 -0400 Subject: [PATCH 24/45] CVE-2014-5077 sctp: fix NULL ptr dereference (rhbz 1122982 1123696) --- kernel.spec | 9 + ...erit-auth_capable-on-INIT-collisions.patch | 212 ++++++++++++++++++ 2 files changed, 221 insertions(+) create mode 100644 net-v2-net-sctp-inherit-auth_capable-on-INIT-collisions.patch diff --git a/kernel.spec b/kernel.spec index 3a3883e8c..86b1bd0b1 100644 --- a/kernel.spec +++ b/kernel.spec @@ -647,6 +647,9 @@ Patch25120: selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch # git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel Patch30000: kernel-arm64.patch +#CVE-2014-5077 rhbz 1122982 1123696 +Patch25124: net-v2-net-sctp-inherit-auth_capable-on-INIT-collisions.patch + # END OF PATCH DEFINITIONS %endif @@ -1380,6 +1383,9 @@ ApplyPatch kernel-arm64.patch -R %endif %endif +#CVE-2014-5077 rhbz 1122982 1123696 +ApplyPatch net-v2-net-sctp-inherit-auth_capable-on-INIT-collisions.patch + # END OF PATCH APPLICATIONS %endif @@ -2255,6 +2261,9 @@ fi # ||----w | # || || %changelog +* Mon Jul 28 2014 Josh Boyer +- CVE-2014-5077 sctp: fix NULL ptr dereference (rhbz 1122982 1123696) + * Mon Jul 28 2014 Josh Boyer - 3.16.0-0.rc7.git0.1 - Linux v3.16-rc7 - Disable debugging options. diff --git a/net-v2-net-sctp-inherit-auth_capable-on-INIT-collisions.patch b/net-v2-net-sctp-inherit-auth_capable-on-INIT-collisions.patch new file mode 100644 index 000000000..73bad5276 --- /dev/null +++ b/net-v2-net-sctp-inherit-auth_capable-on-INIT-collisions.patch @@ -0,0 +1,212 @@ +Bugzilla: 1123696 +Upstream-status: Queued for 3.16 + +From patchwork Tue Jul 22 13:22:45 2014 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [net,v2] net: sctp: inherit auth_capable on INIT collisions +From: Daniel Borkmann +X-Patchwork-Id: 372475 +Message-Id: <1406035365-1154-1-git-send-email-dborkman@redhat.com> +To: davem@davemloft.net +Cc: jgunthorpe@obsidianresearch.com, netdev@vger.kernel.org, + linux-sctp@vger.kernel.org, Vlad Yasevich +Date: Tue, 22 Jul 2014 15:22:45 +0200 + +Jason reported an oops caused by SCTP on his ARM machine with +SCTP authentication enabled: + +Internal error: Oops: 17 [#1] ARM +CPU: 0 PID: 104 Comm: sctp-test Not tainted 3.13.0-68744-g3632f30c9b20-dirty #1 +task: c6eefa40 ti: c6f52000 task.ti: c6f52000 +PC is at sctp_auth_calculate_hmac+0xc4/0x10c +LR is at sg_init_table+0x20/0x38 +pc : [] lr : [] psr: 40000013 +sp : c6f538e8 ip : 00000000 fp : c6f53924 +r10: c6f50d80 r9 : 00000000 r8 : 00010000 +r7 : 00000000 r6 : c7be4000 r5 : 00000000 r4 : c6f56254 +r3 : c00c8170 r2 : 00000001 r1 : 00000008 r0 : c6f1e660 +Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user +Control: 0005397f Table: 06f28000 DAC: 00000015 +Process sctp-test (pid: 104, stack limit = 0xc6f521c0) +Stack: (0xc6f538e8 to 0xc6f54000) +[...] +Backtrace: +[] (sctp_auth_calculate_hmac+0x0/0x10c) from [] (sctp_packet_transmit+0x33c/0x5c8) +[] (sctp_packet_transmit+0x0/0x5c8) from [] (sctp_outq_flush+0x7fc/0x844) +[] (sctp_outq_flush+0x0/0x844) from [] (sctp_outq_uncork+0x24/0x28) +[] (sctp_outq_uncork+0x0/0x28) from [] (sctp_side_effects+0x1134/0x1220) +[] (sctp_side_effects+0x0/0x1220) from [] (sctp_do_sm+0xac/0xd4) +[] (sctp_do_sm+0x0/0xd4) from [] (sctp_assoc_bh_rcv+0x118/0x160) +[] (sctp_assoc_bh_rcv+0x0/0x160) from [] (sctp_inq_push+0x6c/0x74) +[] (sctp_inq_push+0x0/0x74) from [] (sctp_rcv+0x7d8/0x888) + +While we already had various kind of bugs in that area +ec0223ec48a9 ("net: sctp: fix sctp_sf_do_5_1D_ce to verify if +we/peer is AUTH capable") and b14878ccb7fa ("net: sctp: cache +auth_enable per endpoint"), this one is a bit of a different +kind. + +Giving a bit more background on why SCTP authentication is +needed can be found in RFC4895: + + SCTP uses 32-bit verification tags to protect itself against + blind attackers. These values are not changed during the + lifetime of an SCTP association. + + Looking at new SCTP extensions, there is the need to have a + method of proving that an SCTP chunk(s) was really sent by + the original peer that started the association and not by a + malicious attacker. + +To cause this bug, we're triggering an INIT collision between +peers; normal SCTP handshake where both sides intent to +authenticate packets contains RANDOM; CHUNKS; HMAC-ALGO +parameters that are being negotiated among peers: + + ---------- INIT[RANDOM; CHUNKS; HMAC-ALGO] ----------> + <------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] --------- + -------------------- COOKIE-ECHO --------------------> + <-------------------- COOKIE-ACK --------------------- + +RFC4895 says that each endpoint therefore knows its own random +number and the peer's random number *after* the association +has been established. The local and peer's random number along +with the shared key are then part of the secret used for +calculating the HMAC in the AUTH chunk. + +Now, in our scenario, we have 2 threads with 1 non-blocking +SEQ_PACKET socket each, setting up common shared SCTP_AUTH_KEY +and SCTP_AUTH_ACTIVE_KEY properly, and each of them calling +sctp_bindx(3), listen(2) and connect(2) against each other, +thus the handshake looks similar to this, e.g.: + + ---------- INIT[RANDOM; CHUNKS; HMAC-ALGO] ----------> + <------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] --------- + <--------- INIT[RANDOM; CHUNKS; HMAC-ALGO] ----------- + -------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] --------> + ... + +Since such collisions can also happen with verification tags, +the RFC4895 for AUTH rather vaguely says under section 6.1: + + In case of INIT collision, the rules governing the handling + of this Random Number follow the same pattern as those for + the Verification Tag, as explained in Section 5.2.4 of + RFC 2960 [5]. Therefore, each endpoint knows its own Random + Number and the peer's Random Number after the association + has been established. + +In RFC2960, section 5.2.4, we're eventually hitting Action B: + + B) In this case, both sides may be attempting to start an + association at about the same time but the peer endpoint + started its INIT after responding to the local endpoint's + INIT. Thus it may have picked a new Verification Tag not + being aware of the previous Tag it had sent this endpoint. + The endpoint should stay in or enter the ESTABLISHED + state but it MUST update its peer's Verification Tag from + the State Cookie, stop any init or cookie timers that may + running and send a COOKIE ACK. + +In other words, the handling of the Random parameter is the +same as behavior for the Verification Tag as described in +Action B of section 5.2.4. + +Looking at the code, we exactly hit the sctp_sf_do_dupcook_b() +case which triggers an SCTP_CMD_UPDATE_ASSOC command to the +side effect interpreter, and in fact it properly copies over +peer_{random, hmacs, chunks} parameters from the newly created +association to update the existing one. + +Also, the old asoc_shared_key is being released and based on +the new params, sctp_auth_asoc_init_active_key() updated. +However, the issue observed in this case is that the previous +asoc->peer.auth_capable was 0, and has *not* been updated, so +that instead of creating a new secret, we're doing an early +return from the function sctp_auth_asoc_init_active_key() +leaving asoc->asoc_shared_key as NULL. However, we now have to +authenticate chunks from the updated chunk list (e.g. COOKIE-ACK). + +That in fact causes the server side when responding with ... + + <------------------ AUTH; COOKIE-ACK ----------------- + +... to trigger a NULL pointer dereference, since in +sctp_packet_transmit(), it discovers that an AUTH chunk is +being queued for xmit, and thus it calls sctp_auth_calculate_hmac(). + +Since the asoc->active_key_id is still inherited from the +endpoint, and the same as encoded into the chunk, it uses +asoc->asoc_shared_key, which is still NULL, as an asoc_key +and dereferences it in ... + + crypto_hash_setkey(desc.tfm, &asoc_key->data[0], asoc_key->len) + +... causing an oops. All this happens because sctp_make_cookie_ack() +called with the *new* association has the peer.auth_capable=1 +and therefore marks the chunk with auth=1 after checking +sctp_auth_send_cid(), but it is *actually* sent later on over +the then *updated* association's transport that didn't initialize +its shared key due to peer.auth_capable=0. Since control chunks +in that case are not sent by the temporary association which +are scheduled for deletion, they are issued for xmit via +SCTP_CMD_REPLY in the interpreter with the context of the +*updated* association. peer.auth_capable was 0 in the updated +association (which went from COOKIE_WAIT into ESTABLISHED state), +since all previous processing that performed sctp_process_init() +was being done on temporary associations, that we eventually +throw away each time. + +The correct fix is to update to the new peer.auth_capable +value as well in the collision case via sctp_assoc_update(), +so that in case the collision migrated from 0 -> 1, +sctp_auth_asoc_init_active_key() can properly recalculate +the secret. This therefore fixes the observed server panic. + +Fixes: 730fc3d05cd4 ("[SCTP]: Implete SCTP-AUTH parameter processing") +Reported-by: Jason Gunthorpe +Signed-off-by: Daniel Borkmann +Tested-by: Jason Gunthorpe +Cc: Vlad Yasevich +Acked-by: Vlad Yasevich +--- + v1 -> v2, more notes: + + I've only updated the commit description for now, this bug seems + clear to me that we would need to fix it; since RFC4895 mentions + it explicitly that on collisions, we need to *update* these params + accordingly as we would do so in RFC2960. So in other words, this + can be explained by having an *inconsistency* when doing the update + as auth_capable is *tightly coupled* with peer_random, peer_chunks, + peer_hmacs and eventually the asoc_shared_key creation. + + For the rest, I went through the code and currently could not + find where we could oops if we don't have the others for now. It + needs more time and testing however. It's also not too clear from + RFC2960/RFC4960 what needs to be carried over in addition: so we + know "The endpoint should stay in or enter the ESTABLISHED state + but it MUST update its peer's Verification Tag from the State + Cookie, stop any init or cookie timers that may running and send + a COOKIE ACK." and we know that we need to update all AUTH related + members, which we do *now*. + + In addition, we also need to fix AUTH + COOKIE_ECHO collisions, + as they currently cannot be resolved properly into a handshake. + + net/sctp/associola.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/net/sctp/associola.c b/net/sctp/associola.c +index 9de23a2..06a9ee6 100644 +--- a/net/sctp/associola.c ++++ b/net/sctp/associola.c +@@ -1097,6 +1097,7 @@ void sctp_assoc_update(struct sctp_association *asoc, + asoc->c = new->c; + asoc->peer.rwnd = new->peer.rwnd; + asoc->peer.sack_needed = new->peer.sack_needed; ++ asoc->peer.auth_capable = new->peer.auth_capable; + asoc->peer.i = new->peer.i; + sctp_tsnmap_init(&asoc->peer.tsn_map, SCTP_TSN_MAP_INITIAL, + asoc->peer.i.initial_tsn, GFP_ATOMIC); From e6fe382d1d53d4cdf9b544729dc823d4eab0217c Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Mon, 28 Jul 2014 13:03:01 -0400 Subject: [PATCH 25/45] Make sure acpi brightness_switch is disabled (like forever in Fedora) Upstream reverted the change to turn the ACPI brightness_switch_enabled parameter off by default. Revert the revert so we go back to the state Fedora has traditionally been in. --- kernel.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel.spec b/kernel.spec index 86b1bd0b1..422190a49 100644 --- a/kernel.spec +++ b/kernel.spec @@ -555,6 +555,8 @@ Patch460: serial-460800.patch Patch470: die-floppy-die.patch +Patch500: Revert-Revert-ACPI-video-change-acpi-video-brightnes.patch + Patch510: silence-noise.patch Patch530: silence-fbcon-logo.patch @@ -1277,6 +1279,8 @@ ApplyPatch arm-tegra-drmdetection.patch # ACPI +ApplyPatch Revert-Revert-ACPI-video-change-acpi-video-brightnes.patch + # ALSA # Networking @@ -2262,6 +2266,7 @@ fi # || || %changelog * Mon Jul 28 2014 Josh Boyer +- Make sure acpi brightness_switch is disabled (like forever in Fedora) - CVE-2014-5077 sctp: fix NULL ptr dereference (rhbz 1122982 1123696) * Mon Jul 28 2014 Josh Boyer - 3.16.0-0.rc7.git0.1 From 634ea44e1c265c3e29b31458dbda58693f496dbc Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Mon, 28 Jul 2014 13:04:55 -0400 Subject: [PATCH 26/45] Actually add patch. Sigh. --- ...PI-video-change-acpi-video-brightnes.patch | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Revert-Revert-ACPI-video-change-acpi-video-brightnes.patch diff --git a/Revert-Revert-ACPI-video-change-acpi-video-brightnes.patch b/Revert-Revert-ACPI-video-change-acpi-video-brightnes.patch new file mode 100644 index 000000000..2f44032c8 --- /dev/null +++ b/Revert-Revert-ACPI-video-change-acpi-video-brightnes.patch @@ -0,0 +1,44 @@ +Bugzilla: N/A +Upstream-status: Sigh. We almost got to drop this. + +From 20e3f1e1b9341d233a11734c07c076caac9936ef Mon Sep 17 00:00:00 2001 +From: Josh Boyer +Date: Mon, 28 Jul 2014 12:59:48 -0400 +Subject: [PATCH] Revert "Revert "ACPI / video: change acpi-video + brightness_switch_enabled default to 0"" + +This reverts commit 2843768b701971ab10e62c77d5c75ad7c306f1bd. +--- + Documentation/kernel-parameters.txt | 2 +- + drivers/acpi/video.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt +index b7fa2f599459..e8db409a7e3a 100644 +--- a/Documentation/kernel-parameters.txt ++++ b/Documentation/kernel-parameters.txt +@@ -3532,7 +3532,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. + the allocated input device; If set to 0, video driver + will only send out the event without touching backlight + brightness level. +- default: 1 ++ default: 0 + + virtio_mmio.device= + [VMMIO] Memory mapped virtio (platform) device. +diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c +index 350d52a8f781..44c89f705018 100644 +--- a/drivers/acpi/video.c ++++ b/drivers/acpi/video.c +@@ -68,7 +68,7 @@ MODULE_AUTHOR("Bruno Ducrot"); + MODULE_DESCRIPTION("ACPI Video Driver"); + MODULE_LICENSE("GPL"); + +-static bool brightness_switch_enabled = 1; ++static bool brightness_switch_enabled; + module_param(brightness_switch_enabled, bool, 0644); + + /* +-- +1.9.3 + From b83add205aab1bc5d0968d0db740f0c5c14e71b2 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Tue, 29 Jul 2014 09:40:47 -0400 Subject: [PATCH 27/45] Linux v3.16-rc7-7-g31dab719fa50 - Reenable debugging options. --- config-generic | 6 +-- config-nodebug | 118 ++++++++++++++++++++++----------------------- config-x86-generic | 2 +- kernel.spec | 8 ++- sources | 1 + 5 files changed, 70 insertions(+), 65 deletions(-) diff --git a/config-generic b/config-generic index d83167ed4..cb3787b1b 100644 --- a/config-generic +++ b/config-generic @@ -1695,13 +1695,13 @@ CONFIG_B43_SDIO=y CONFIG_B43_BCMA=y # CONFIG_B43_BCMA_EXTRA is not set CONFIG_B43_BCMA_PIO=y -# CONFIG_B43_DEBUG is not set +CONFIG_B43_DEBUG=y CONFIG_B43_PHY_LP=y CONFIG_B43_PHY_N=y CONFIG_B43_PHY_HT=y # CONFIG_B43_FORCE_PIO is not set CONFIG_B43LEGACY=m -# CONFIG_B43LEGACY_DEBUG is not set +CONFIG_B43LEGACY_DEBUG=y CONFIG_B43LEGACY_DMA=y CONFIG_B43LEGACY_PIO=y CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y @@ -4641,7 +4641,7 @@ CONFIG_PM_DEBUG=y # CONFIG_DPM_WATCHDOG is not set # revisit this in debug CONFIG_PM_TRACE=y CONFIG_PM_TRACE_RTC=y -# CONFIG_PM_TEST_SUSPEND is not set +CONFIG_PM_TEST_SUSPEND=y CONFIG_PM_RUNTIME=y # CONFIG_PM_OPP is not set # CONFIG_PM_AUTOSLEEP is not set diff --git a/config-nodebug b/config-nodebug index e16a37b57..360f418d4 100644 --- a/config-nodebug +++ b/config-nodebug @@ -2,101 +2,101 @@ CONFIG_SND_VERBOSE_PRINTK=y CONFIG_SND_DEBUG=y CONFIG_SND_PCM_XRUN_DEBUG=y -# CONFIG_DEBUG_ATOMIC_SLEEP is not set +CONFIG_DEBUG_ATOMIC_SLEEP=y -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_LOCK_TORTURE_TEST is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_PROVE_RCU is not set +CONFIG_DEBUG_MUTEXES=y +CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y +CONFIG_DEBUG_RT_MUTEXES=y +CONFIG_DEBUG_LOCK_ALLOC=y +CONFIG_LOCK_TORTURE_TEST=m +CONFIG_PROVE_LOCKING=y +CONFIG_DEBUG_SPINLOCK=y +CONFIG_PROVE_RCU=y # CONFIG_PROVE_RCU_REPEATEDLY is not set -# CONFIG_DEBUG_PER_CPU_MAPS is not set +CONFIG_DEBUG_PER_CPU_MAPS=y CONFIG_CPUMASK_OFFSTACK=y -# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set +CONFIG_CPU_NOTIFIER_ERROR_INJECT=m -# CONFIG_FAULT_INJECTION is not set -# CONFIG_FAILSLAB is not set -# CONFIG_FAIL_PAGE_ALLOC is not set -# CONFIG_FAIL_MAKE_REQUEST is not set -# CONFIG_FAULT_INJECTION_DEBUG_FS is not set -# CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set -# CONFIG_FAIL_IO_TIMEOUT is not set -# CONFIG_FAIL_MMC_REQUEST is not set +CONFIG_FAULT_INJECTION=y +CONFIG_FAILSLAB=y +CONFIG_FAIL_PAGE_ALLOC=y +CONFIG_FAIL_MAKE_REQUEST=y +CONFIG_FAULT_INJECTION_DEBUG_FS=y +CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y +CONFIG_FAIL_IO_TIMEOUT=y +CONFIG_FAIL_MMC_REQUEST=y -# CONFIG_LOCK_STAT is not set +CONFIG_LOCK_STAT=y -# CONFIG_DEBUG_STACK_USAGE is not set +CONFIG_DEBUG_STACK_USAGE=y -# CONFIG_ACPI_DEBUG is not set +CONFIG_ACPI_DEBUG=y # CONFIG_ACPI_DEBUG_FUNC_TRACE is not set -# CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_PI_LIST is not set +CONFIG_DEBUG_SG=y +CONFIG_DEBUG_PI_LIST=y # CONFIG_DEBUG_PAGEALLOC is not set -# CONFIG_DEBUG_WRITECOUNT is not set -# CONFIG_DEBUG_OBJECTS is not set +CONFIG_DEBUG_WRITECOUNT=y +CONFIG_DEBUG_OBJECTS=y # CONFIG_DEBUG_OBJECTS_SELFTEST is not set -# CONFIG_DEBUG_OBJECTS_FREE is not set -# CONFIG_DEBUG_OBJECTS_TIMERS is not set -# CONFIG_DEBUG_OBJECTS_RCU_HEAD is not set +CONFIG_DEBUG_OBJECTS_FREE=y +CONFIG_DEBUG_OBJECTS_TIMERS=y +CONFIG_DEBUG_OBJECTS_RCU_HEAD=y CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1 -# CONFIG_X86_PTDUMP is not set -# CONFIG_EFI_PGT_DUMP is not set +CONFIG_X86_PTDUMP=y +CONFIG_EFI_PGT_DUMP=y -# CONFIG_CAN_DEBUG_DEVICES is not set +CONFIG_CAN_DEBUG_DEVICES=y -# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_SYSCTL_SYSCALL_CHECK is not set +CONFIG_SYSCTL_SYSCALL_CHECK=y -# CONFIG_DEBUG_NOTIFIERS is not set +CONFIG_DEBUG_NOTIFIERS=y -# CONFIG_DMA_API_DEBUG is not set +CONFIG_DMA_API_DEBUG=y -# CONFIG_MMIOTRACE is not set +CONFIG_MMIOTRACE=y -# CONFIG_DEBUG_CREDENTIALS is not set +CONFIG_DEBUG_CREDENTIALS=y # off in both production debug and nodebug builds, # on in rawhide nodebug builds -# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y -# CONFIG_EXT4_DEBUG is not set +CONFIG_EXT4_DEBUG=y # CONFIG_XFS_WARN is not set -# CONFIG_DEBUG_PERF_USE_VMALLOC is not set +CONFIG_DEBUG_PERF_USE_VMALLOC=y -# CONFIG_JBD2_DEBUG is not set +CONFIG_JBD2_DEBUG=y -# CONFIG_NFSD_FAULT_INJECTION is not set +CONFIG_NFSD_FAULT_INJECTION=y -# CONFIG_DEBUG_BLK_CGROUP is not set +CONFIG_DEBUG_BLK_CGROUP=y -# CONFIG_DRBD_FAULT_INJECTION is not set +CONFIG_DRBD_FAULT_INJECTION=y -# CONFIG_ATH_DEBUG is not set -# CONFIG_CARL9170_DEBUGFS is not set -# CONFIG_IWLWIFI_DEVICE_TRACING is not set +CONFIG_ATH_DEBUG=y +CONFIG_CARL9170_DEBUGFS=y +CONFIG_IWLWIFI_DEVICE_TRACING=y # CONFIG_RTLWIFI_DEBUG is not set -# CONFIG_DEBUG_OBJECTS_WORK is not set +CONFIG_DEBUG_OBJECTS_WORK=y -# CONFIG_DMADEVICES_DEBUG is not set -# CONFIG_DMADEVICES_VDEBUG is not set +CONFIG_DMADEVICES_DEBUG=y +CONFIG_DMADEVICES_VDEBUG=y CONFIG_PM_ADVANCED_DEBUG=y -# CONFIG_CEPH_LIB_PRETTYDEBUG is not set -# CONFIG_QUOTA_DEBUG is not set +CONFIG_CEPH_LIB_PRETTYDEBUG=y +CONFIG_QUOTA_DEBUG=y CONFIG_PCI_DEFAULT_USE_CRS=y @@ -104,18 +104,18 @@ CONFIG_KGDB_KDB=y CONFIG_KDB_KEYBOARD=y CONFIG_KDB_CONTINUE_CATASTROPHIC=0 -# CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER is not set +CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y # CONFIG_PERCPU_TEST is not set -# CONFIG_TEST_LIST_SORT is not set +CONFIG_TEST_LIST_SORT=y # CONFIG_TEST_STRING_HELPERS is not set -# CONFIG_DETECT_HUNG_TASK is not set +CONFIG_DETECT_HUNG_TASK=y CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set -# CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK is not set +CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y -# CONFIG_DEBUG_KMEMLEAK is not set +CONFIG_DEBUG_KMEMLEAK=y CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=1024 # CONFIG_DEBUG_KMEMLEAK_TEST is not set CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y @@ -126,7 +126,7 @@ CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y # CONFIG_SPI_DEBUG is not set -# CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set +CONFIG_X86_DEBUG_STATIC_CPU_HAS=y # CONFIG_SCHEDSTATS is not set # CONFIG_LATENCYTOP is not set diff --git a/config-x86-generic b/config-x86-generic index 7968fdaea..997bc472a 100644 --- a/config-x86-generic +++ b/config-x86-generic @@ -334,7 +334,7 @@ CONFIG_SP5100_TCO=m # CONFIG_MEMTEST is not set # CONFIG_DEBUG_TLBFLUSH is not set -# CONFIG_MAXSMP is not set +CONFIG_MAXSMP=y CONFIG_HP_ILO=m diff --git a/kernel.spec b/kernel.spec index 422190a49..619dc0615 100644 --- a/kernel.spec +++ b/kernel.spec @@ -69,7 +69,7 @@ Summary: The Linux kernel # The rc snapshot level %define rcrev 7 # The git snapshot level -%define gitrev 0 +%define gitrev 1 # Set rpm version accordingly %define rpmversion 3.%{upstream_sublevel}.0 %endif @@ -130,7 +130,7 @@ Summary: The Linux kernel # Set debugbuildsenabled to 1 for production (build separate debug kernels) # and 0 for rawhide (all kernels are debug kernels). # See also 'make debug' and 'make release'. -%define debugbuildsenabled 1 +%define debugbuildsenabled 0 # Want to build a vanilla kernel build without any non-upstream patches? %define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0} @@ -2265,6 +2265,10 @@ fi # ||----w | # || || %changelog +* Tue Jul 29 2014 Josh Boyer - 3.16.0-0.rc7.git1.1 +- Linux v3.16-rc7-7-g31dab719fa50 +- Reenable debugging options. + * Mon Jul 28 2014 Josh Boyer - Make sure acpi brightness_switch is disabled (like forever in Fedora) - CVE-2014-5077 sctp: fix NULL ptr dereference (rhbz 1122982 1123696) diff --git a/sources b/sources index acbaaa8ce..d36e382b3 100644 --- a/sources +++ b/sources @@ -1,3 +1,4 @@ 97ca1625bb40368dc41b9a7971549071 linux-3.15.tar.xz ef8f4db937f521a7e323ec589536ba25 perf-man-3.15.tar.gz cf68262d938c6ec27bc96896beb8549f patch-3.16-rc7.xz +d15747e3ab3760b07aaae1077ddeceed patch-3.16-rc7-git1.xz From d0ba439bf235c9df1143ef0b61f1958800dc2dd6 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Tue, 29 Jul 2014 13:38:31 -0400 Subject: [PATCH 28/45] kernel-arm64.patch: update from git --- kernel-arm64.patch | 1123 +++++++++++++++++++++++++++++++++++++++++++- kernel.spec | 3 + 2 files changed, 1111 insertions(+), 15 deletions(-) diff --git a/kernel-arm64.patch b/kernel-arm64.patch index 42959490a..9fcf9af77 100644 --- a/kernel-arm64.patch +++ b/kernel-arm64.patch @@ -1,3 +1,954 @@ +commit 649c9e3a45e81852daf80c126a332297b75cb109 +Author: Ard Biesheuvel +Date: Tue Jul 29 12:49:10 2014 +0200 + + arm64/efi: efistub: don't abort if base of DRAM is occupied + + If we cannot relocate the kernel Image to its preferred offset of base of DRAM + plus TEXT_OFFSET, instead relocate it to the lowest available 2 MB boundary plus + TEXT_OFFSET. We may lose a bit of memory at the low end, but we can still + proceed normally otherwise. + + Signed-off-by: Ard Biesheuvel + +commit 5102fd06b12467a0518537061805483a759bc856 +Author: Ard Biesheuvel +Date: Tue Jul 29 12:49:09 2014 +0200 + + arm64/efi: efistub: cover entire static mem footprint in PE/COFF .text + + The static memory footprint of a kernel Image at boot is larger than the + Image file itself. Things like .bss data and initial page tables are allocated + statically but populated dynamically so their content is not contained in the + Image file. + + However, if EFI (or GRUB) has loaded the Image at precisely the desired offset + of base of DRAM + TEXT_OFFSET, the Image will be booted in place, and we have + to make sure that the allocation done by the PE/COFF loader is large enough. + + Fix this by growing the PE/COFF .text section to cover the entire static + memory footprint. The part of the section that is not covered by the payload + will be zero initialised by the PE/COFF loader. + + Signed-off-by: Ard Biesheuvel + +commit 3b4dfb00a401b7fecf01d3c89b154907167dff52 +Author: Mark Rutland +Date: Tue Jul 29 12:49:08 2014 +0200 + + arm64: spin-table: handle unmapped cpu-release-addrs + + In certain cases the cpu-release-addr of a CPU may not fall in the + linear mapping (e.g. when the kernel is loaded above this address due to + the presence of other images in memory). This is problematic for the + spin-table code as it assumes that it can trivially convert a + cpu-release-addr to a valid VA in the linear map. + + This patch modifies the spin-table code to use a temporary cached + mapping to write to a given cpu-release-addr, enabling us to support + addresses regardless of whether they are covered by the linear mapping. + + Signed-off-by: Mark Rutland + +commit a49ad891b2e91338587dc5576c9da73b249a9d13 +Author: Mark Salter +Date: Mon Jul 14 15:52:06 2014 -0400 + + pci/xgene: use pci_remap_iospace() instead of pci_ioremap_io() + + Signed-off-by: Mark Salter + +commit 1a958ec71db226d35ed51756b7164142bb0a60a3 +Author: Tanmay Inamdar +Date: Wed Mar 19 16:12:42 2014 -0700 + + MAINTAINERS: entry for APM X-Gene PCIe host driver + + Add entry for AppliedMicro X-Gene PCIe host driver. + + Signed-off-by: Tanmay Inamdar + +commit 03dc92f35b8f8be898ca12e3dc7c15961f414907 +Author: Tanmay Inamdar +Date: Wed Mar 19 16:12:41 2014 -0700 + + dt-bindings: pci: xgene pcie device tree bindings + + This patch adds the bindings for X-Gene PCIe driver. The driver resides + under 'drivers/pci/host/pci-xgene.c' file. + + Signed-off-by: Tanmay Inamdar + +commit 1f8d894f2066d9db2b251d512f6f6f772ae7147f +Author: Tanmay Inamdar +Date: Wed Mar 19 16:12:40 2014 -0700 + + arm64: dts: APM X-Gene PCIe device tree nodes + + This patch adds the device tree nodes for APM X-Gene PCIe controller and + PCIe clock interface. Since X-Gene SOC supports maximum 5 ports, 5 dts + nodes are added. + + Signed-off-by: Tanmay Inamdar + +commit c0855fcf0cc9adcb1ba5e6b1318536c56244796d +Author: Tanmay Inamdar +Date: Wed Mar 19 16:12:39 2014 -0700 + + pci: APM X-Gene PCIe controller driver + + This patch adds the AppliedMicro X-Gene SOC PCIe controller driver. + X-Gene PCIe controller supports maximum up to 8 lanes and GEN3 speed. + X-Gene SOC supports maximum 5 PCIe ports. + + Signed-off-by: Tanmay Inamdar + +commit 1cc0c322237d3b58b08fe39e79e6c2e2f90a8c98 +Author: Liviu Dudau +Date: Tue Jul 1 19:44:00 2014 +0100 + + arm64: Add architectural support for PCI + + Use the generic host bridge functions to provide support for + PCI Express on arm64. + + Signed-off-by: Liviu Dudau + +commit aba1eca911a87959eb4be515110f7a6b8692e9a4 +Author: Liviu Dudau +Date: Tue Jul 1 19:43:34 2014 +0100 + + pci: Remap I/O bus resources into CPU space with pci_remap_iospace() + + Introduce a default implementation for remapping PCI bus I/O resources + onto the CPU address space. Architectures with special needs may + provide their own version, but most should be able to use this one. + + Signed-off-by: Liviu Dudau + +commit e1eacc3da10ca19eff1f88fb342a13586092b613 +Author: Liviu Dudau +Date: Tue Jul 1 21:50:50 2014 +0100 + + pci: Add support for creating a generic host_bridge from device tree + + Several platforms use a rather generic version of parsing + the device tree to find the host bridge ranges. Move the common code + into the generic PCI code and use it to create a pci_host_bridge + structure that can be used by arch code. + + Based on early attempts by Andrew Murray to unify the code. + Used powerpc and microblaze PCI code as starting point. + + Signed-off-by: Liviu Dudau + Tested-by: Tanmay Inamdar + +commit aee55d507eb451223b51b52e6617b06b8e518ea6 +Author: Liviu Dudau +Date: Tue Jul 1 19:43:32 2014 +0100 + + pci: of: Parse and map the IRQ when adding the PCI device. + + Enhance the default implementation of pcibios_add_device() to + parse and map the IRQ of the device if a DT binding is available. + + Signed-off-by: Liviu Dudau + +commit 0cf0470962f0498b598ff44e0c671407df54b22e +Author: Liviu Dudau +Date: Tue Jul 1 19:43:31 2014 +0100 + + pci: Introduce a domain number for pci_host_bridge. + + Make it easier to discover the domain number of a bus by storing + the number in pci_host_bridge for the root bus. Several architectures + have their own way of storing this information, so it makes sense + to try to unify the code. While at this, add a new function that + creates a root bus in a given domain and make pci_create_root_bus() + a wrapper around this function. + + Signed-off-by: Liviu Dudau + Tested-by: Tanmay Inamdar + +commit 1bc8fcf01469c202b4aea5f1d0a3a75c9302f3e2 +Author: Liviu Dudau +Date: Tue Jul 1 19:43:30 2014 +0100 + + pci: Create pci_host_bridge before its associated bus in pci_create_root_bus. + + Before commit 7b5436635800 the pci_host_bridge was created before the root bus. + As that commit has added a needless dependency on the bus for pci_alloc_host_bridge() + the creation order has been changed for no good reason. Revert the order of + creation as we are going to depend on the pci_host_bridge structure to retrieve the + domain number of the root bus. + + Signed-off-by: Liviu Dudau + Acked-by: Grant Likely + Tested-by: Tanmay Inamdar + +commit 55353327169dc08c1047d994e00b8a38630f5a8d +Author: Liviu Dudau +Date: Tue Jul 1 19:43:29 2014 +0100 + + pci: OF: Fix the conversion of IO ranges into IO resources. + + The ranges property for a host bridge controller in DT describes + the mapping between the PCI bus address and the CPU physical address. + The resources framework however expects that the IO resources start + at a pseudo "port" address 0 (zero) and have a maximum size of IO_SPACE_LIMIT. + The conversion from pci ranges to resources failed to take that into account. + + In the process move the function into drivers/of/address.c as it now + depends on pci_address_to_pio() code and make it return an error message. + + Signed-off-by: Liviu Dudau + Tested-by: Tanmay Inamdar + +commit 34079a20796d5c74e2984c37a99baef4871709a6 +Author: Liviu Dudau +Date: Tue Jul 1 19:43:28 2014 +0100 + + pci: Introduce pci_register_io_range() helper function. + + Some architectures do not have a simple view of the PCI I/O space + and instead use a range of CPU addresses that map to bus addresses. For + some architectures these ranges will be expressed by OF bindings + in a device tree file. + + Introduce a pci_register_io_range() helper function with a generic + implementation that can be used by such architectures to keep track + of the I/O ranges described by the PCI bindings. If the PCI_IOBASE + macro is not defined that signals lack of support for PCI and we + return an error. + + Signed-off-by: Liviu Dudau + +commit a81abc095ab4b9b90e446ddbd59247e23df9d4ad +Author: Liviu Dudau +Date: Tue Jul 1 19:43:27 2014 +0100 + + pci: Export find_pci_host_bridge() function. + + This is a useful function and we should make it visible outside the + generic PCI code. Export it as a GPL symbol. + + Signed-off-by: Liviu Dudau + Tested-by: Tanmay Inamdar + +commit 78361698444e81bedbf30ec2b7aae1afd110d11f +Author: Liviu Dudau +Date: Tue Jul 1 19:43:26 2014 +0100 + + Fix ioport_map() for !CONFIG_GENERIC_IOMAP cases. + + The inline version of ioport_map() that gets used when !CONFIG_GENERIC_IOMAP + is wrong. It returns a mapped (i.e. virtual) address that can start from + zero and completely ignores the PCI_IOBASE and IO_SPACE_LIMIT that most + architectures that use !CONFIG_GENERIC_MAP define. + + Signed-off-by: Liviu Dudau + Acked-by: Arnd Bergmann + Tested-by: Tanmay Inamdar + +commit 5540bbe2eca72e37be2e6a1c18e2fc7e73f0eab6 +Author: Marc Zyngier +Date: Mon Jun 30 16:01:50 2014 +0100 + + arm64: KVM: vgic: enable GICv2 emulation on top on GICv3 hardware + + Add the last missing bits that enable GICv2 emulation on top of + GICv3 hardware. + + Signed-off-by: Marc Zyngier + +commit f057aaf81a7df641bcaa992965a257e3260ad36e +Author: Marc Zyngier +Date: Mon Jun 30 16:01:49 2014 +0100 + + arm64: KVM: vgic: add GICv3 world switch + + Introduce the GICv3 world switch code used to save/restore the + GICv3 context. + + Acked-by: Catalin Marinas + Reviewed-by: Christoffer Dall + Signed-off-by: Marc Zyngier + +commit 7f1b8a791bb375933fdc8420cd08f127d07dd259 +Author: Marc Zyngier +Date: Mon Jun 30 16:01:48 2014 +0100 + + KVM: ARM: vgic: add the GICv3 backend + + Introduce the support code for emulating a GICv2 on top of GICv3 + hardware. + + Acked-by: Catalin Marinas + Signed-off-by: Marc Zyngier + +commit 74428905c3b450eab53a21bee74236501629a443 +Author: Marc Zyngier +Date: Mon Jun 30 16:01:47 2014 +0100 + + arm64: KVM: move HCR_EL2.{IMO, FMO} manipulation into the vgic switch code + + GICv3 requires the IMO and FMO bits to be tightly coupled with some + of the interrupt controller's register switch. + + In order to have similar code paths, move the manipulation of these + bits to the GICv2 switch code. + + Acked-by: Catalin Marinas + Reviewed-by: Christoffer Dall + Signed-off-by: Marc Zyngier + +commit b691c1f97f1fb5b29c3ae4cc836fdbefe61a11ff +Author: Marc Zyngier +Date: Mon Jun 30 16:01:46 2014 +0100 + + arm64: KVM: split GICv2 world switch from hyp code + + Move the GICv2 world switch code into its own file, and add the + necessary indirection to the arm64 switch code. + + Also introduce a new type field to the vgic_params structure. + + Acked-by: Catalin Marinas + Reviewed-by: Christoffer Dall + Signed-off-by: Marc Zyngier + +commit d3f4563f1bebed7f60f714bdab640e477a081c4b +Author: Marc Zyngier +Date: Mon Jun 30 16:01:45 2014 +0100 + + arm64: KVM: remove __kvm_hyp_code_{start, end} from hyp.S + + We already have __hyp_text_{start,end} to express the boundaries + of the HYP text section, and __kvm_hyp_code_{start,end} are getting + in the way of a more modular world switch code. + + Just turn __kvm_hyp_code_{start,end} into #defines mapping the + linker-emited symbols. + + Acked-by: Catalin Marinas + Reviewed-by: Christoffer Dall + Signed-off-by: Marc Zyngier + +commit 8ede261e09ad25ab8229d5efb476d5b4f6dc6434 +Author: Marc Zyngier +Date: Mon Jun 30 16:01:44 2014 +0100 + + KVM: ARM: vgic: revisit implementation of irqchip_in_kernel + + So far, irqchip_in_kernel() was implemented by testing the value of + vctrl_base, which worked fine with GICv2. + + With GICv3, this field is useless, as we're using system registers + instead of a emmory mapped interface. To solve this, add a boolean + flag indicating if the we're using a vgic or not. + + Reviewed-by: Christoffer Dall + Signed-off-by: Marc Zyngier + +commit ff7faf70feb47e5f1cf1e0f0d02e0f2807da11f5 +Author: Marc Zyngier +Date: Mon Jun 30 16:01:43 2014 +0100 + + KVM: ARM: vgic: split GICv2 backend from the main vgic code + + Brutally hack the innocent vgic code, and move the GICv2 specific code + to its own file, using vgic_ops and vgic_params as a way to pass + information between the two blocks. + + Acked-by: Catalin Marinas + Reviewed-by: Christoffer Dall + Signed-off-by: Marc Zyngier + +commit 63480283c0e1dc92f506e5e5306be0ac9b239499 +Author: Marc Zyngier +Date: Mon Jun 30 16:01:42 2014 +0100 + + KVM: ARM: introduce vgic_params structure + + Move all the data specific to a given GIC implementation into its own + little structure. + + Acked-by: Catalin Marinas + Reviewed-by: Christoffer Dall + Signed-off-by: Marc Zyngier + +commit dcb20f9b66d5615a3e7e492424fa7953c1fe9f01 +Author: Marc Zyngier +Date: Mon Jun 30 16:01:41 2014 +0100 + + KVM: ARM: vgic: introduce vgic_enable + + Move the code dealing with enabling the VGIC on to vgic_ops. + + Acked-by: Catalin Marinas + Reviewed-by: Christoffer Dall + Signed-off-by: Marc Zyngier + +commit 67e3bcf8dd823eec79c74bc993fa62fb08b1acea +Author: Marc Zyngier +Date: Mon Jun 30 16:01:40 2014 +0100 + + KVM: ARM: vgic: abstract VMCR access + + Instead of directly messing with with the GICH_VMCR bits for the CPU + interface save/restore code, add accessors that encode/decode the + entire set of registers exposed by VMCR. + + Not the most efficient thing, but given that this code is only used + by the save/restore code, performance is far from being critical. + + Reviewed-by: Christoffer Dall + Signed-off-by: Marc Zyngier + +commit 67caf34f138a4f2516a2afcd5657add2eaaf0ab4 +Author: Marc Zyngier +Date: Mon Jun 30 16:01:39 2014 +0100 + + KVM: ARM: vgic: move underflow handling to vgic_ops + + Move the code dealing with LR underflow handling to its own functions, + and make them accessible through vgic_ops. + + Acked-by: Catalin Marinas + Reviewed-by: Christoffer Dall + Signed-off-by: Marc Zyngier + +commit 30acb0a340d388135ae89bed7e248bad203ec876 +Author: Marc Zyngier +Date: Mon Jun 30 16:01:38 2014 +0100 + + KVM: ARM: vgic: abstract MISR decoding + + Instead of directly dealing with the GICH_MISR bits, move the code to + its own function and use a couple of public flags to represent the + actual state. + + Acked-by: Catalin Marinas + Reviewed-by: Christoffer Dall + Signed-off-by: Marc Zyngier + +commit 464cbe47011e07b654d161ab4d4bdd05b4d025b3 +Author: Marc Zyngier +Date: Mon Jun 30 16:01:37 2014 +0100 + + KVM: ARM: vgic: abstract EISR bitmap access + + Move the GICH_EISR access to its own function. + + Acked-by: Catalin Marinas + Reviewed-by: Christoffer Dall + Signed-off-by: Marc Zyngier + +commit 33930dc5f401e9fc2268c2f128853eb5275e7ab1 +Author: Marc Zyngier +Date: Mon Jun 30 16:01:36 2014 +0100 + + KVM: ARM: vgic: abstract access to the ELRSR bitmap + + Move the GICH_ELRSR access to its own functions, and add them to + the vgic_ops structure. + + Acked-by: Catalin Marinas + Reviewed-by: Christoffer Dall + Signed-off-by: Marc Zyngier + +commit 0dca962ccd5b96fb7174880c1bc25085dcc09927 +Author: Marc Zyngier +Date: Mon Jun 30 16:01:35 2014 +0100 + + KVM: ARM: vgic: introduce vgic_ops and LR manipulation primitives + + In order to split the various register manipulation from the main vgic + code, introduce a vgic_ops structure, and start by abstracting the + LR manipulation code with a couple of accessors. + + Reviewed-by: Christoffer Dall + Signed-off-by: Marc Zyngier + +commit e66aa6cbdaa25764c58ba8d21da8d1b7d75e7570 +Author: Marc Zyngier +Date: Mon Jun 30 16:01:34 2014 +0100 + + KVM: arm/arm64: vgic: move GICv2 registers to their own structure + + In order to make way for the GICv3 registers, move the v2-specific + registers to their own structure. + + Acked-by: Catalin Marinas + Reviewed-by: Christoffer Dall + Signed-off-by: Marc Zyngier + +commit b04259737c6bb38592c02c93e939fd53909dad04 +Author: Marc Zyngier +Date: Mon Jun 30 16:01:33 2014 +0100 + + arm64: boot protocol documentation update for GICv3 + + Linux has some requirements that must be satisfied in order to boot + on a system built with a GICv3. + + Acked-by: Christoffer Dall + Signed-off-by: Marc Zyngier + +commit a864693311bd4305214d966b7ca0e0015216c2c4 +Author: Marc Zyngier +Date: Mon Jun 30 16:01:32 2014 +0100 + + arm64: GICv3 device tree binding documentation + + Add the necessary documentation to support GICv3. + + Cc: Thomas Gleixner + Cc: Mark Rutland + Acked-by: Catalin Marinas + Acked-by: Rob Herring + Acked-by: Christoffer Dall + Signed-off-by: Marc Zyngier + +commit af3035d3ddddb6e19bac9295f0c785bb2c8e718c +Author: Marc Zyngier +Date: Mon Jun 30 16:01:31 2014 +0100 + + irqchip: arm64: Initial support for GICv3 + + The Generic Interrupt Controller (version 3) offers services that are + similar to GICv2, with a number of additional features: + - Affinity routing based on the CPU MPIDR (ARE) + - System register for the CPU interfaces (SRE) + - Support for more that 8 CPUs + - Locality-specific Peripheral Interrupts (LPIs) + - Interrupt Translation Services (ITS) + + This patch adds preliminary support for GICv3 with ARE and SRE, + non-secure mode only. It relies on higher exception levels to grant ARE + and SRE access. + + Support for LPI and ITS will be added at a later time. + + Cc: Thomas Gleixner + Cc: Jason Cooper + Reviewed-by: Zi Shen Lim + Reviewed-by: Christoffer Dall + Reviewed-by: Tirumalesh Chalamarla + Reviewed-by: Yun Wu + Reviewed-by: Zhen Lei + Tested-by: Tirumalesh Chalamarla + Tested-by: Radha Mohan Chintakuntla + Acked-by: Radha Mohan Chintakuntla + Acked-by: Catalin Marinas + Signed-off-by: Marc Zyngier + +commit c50b02761c3ad5d37ce8fffe7c0bf6b46d23109e +Author: Marc Zyngier +Date: Mon Jun 30 16:01:30 2014 +0100 + + irqchip: ARM: GIC: Move some bits of GICv2 to a library-type file + + A few GICv2 low-level function are actually very useful to GICv3, + and it makes some sense to share them across the two drivers. + They end-up in their own file, with an additional parameter used + to ensure an optional synchronization (unused on GICv2). + + Cc: Thomas Gleixner + Cc: Jason Cooper + Acked-by: Christoffer Dall + Signed-off-by: Marc Zyngier + +commit 6a6033cdcbf6022c2848e2181ed6d8b7545af02e +Author: Mark Salter +Date: Tue Jun 24 23:16:45 2014 -0400 + + perf: fix arm64 build error + + I'm seeing the following build error on arm64: + + In file included from util/event.c:3:0: + util/event.h:95:17: error: 'PERF_REGS_MAX' undeclared here (not in a function) + u64 cache_regs[PERF_REGS_MAX]; + ^ + + This patch adds a PEFF_REGS_MAX definition for arm64. + + Signed-off-by: Mark Salter + +commit 1de8987fa549d421576c1b61282c4041c8c78a5f +Author: Mark Salter +Date: Tue Jun 24 09:50:28 2014 -0400 + + arm64: use EFI as last resort for reboot and poweroff + + Wire in support for EFI reboot and poweroff functions. We use these + only if no other mechanism has been registered with arm_pm_reboot + and/or pm_power_off respectively. + + Signed-off-by: Mark Salter + +commit 1c973051e86625be7ffb3db90d4a70b9ca4199c6 +Author: Matt Fleming +Date: Fri Jun 13 12:39:55 2014 +0100 + + x86/reboot: Add EFI reboot quirk for ACPI Hardware Reduced flag + + It appears that the BayTrail-T class of hardware requires EFI in order + to powerdown and reboot and no other reliable method exists. + + This quirk is generally applicable to all hardware that has the ACPI + Hardware Reduced bit set, since usually ACPI would be the preferred + method. + + Cc: Len Brown + Cc: Mark Salter + Cc: "Rafael J. Wysocki" + Signed-off-by: Matt Fleming + +commit 621b2a0f1df86bd2f147799303b94575f3acee95 +Author: Matt Fleming +Date: Fri Jun 13 12:35:21 2014 +0100 + + efi/reboot: Allow powering off machines using EFI + + Not only can EfiResetSystem() be used to reboot, it can also be used to + power down machines. + + By and large, this functionality doesn't work very well across the range + of EFI machines in the wild, so it should definitely only be used as a + last resort. In an ideal world, this wouldn't be needed at all. + + Unfortunately, we're starting to see machines where EFI is the *only* + reliable way to power down, and nothing else, not PCI, not ACPI, works. + + efi_poweroff_required() should be implemented on a per-architecture + basis, since exactly when we should be using EFI runtime services is a + platform-specific decision. There's no analogue for reboot because each + architecture handles reboot very differently - the x86 code in + particular is pretty complex. + + Patches to enable this for specific classes of hardware will be + submitted separately. + + Cc: Mark Salter + Signed-off-by: Matt Fleming + +commit 6b2e219b20933cad5d5ba34f7af4efc5317c0fb9 +Author: Matt Fleming +Date: Fri Jun 13 12:22:22 2014 +0100 + + efi/reboot: Add generic wrapper around EfiResetSystem() + + Implement efi_reboot(), which is really just a wrapper around the + EfiResetSystem() EFI runtime service, but it does at least allow us to + funnel all callers through a single location. + + It also simplifies the callsites since users no longer need to check to + see whether EFI_RUNTIME_SERVICES are enabled. + + Cc: Tony Luck + Cc: Mark Salter + Signed-off-by: Matt Fleming + +commit d0d41b99122d97f81ad05868dff38ccf0a3ffd33 +Author: Saurabh Tangri +Date: Mon Jun 2 05:18:35 2014 -0700 + + x86/efi: Move all workarounds to a separate file quirks.c + + Currently, it's difficult to find all the workarounds that are + applied when running on EFI, because they're littered throughout + various code paths. This change moves all of them into a separate + file with the hope that it will be come the single location for all + our well documented quirks. + + Signed-off-by: Saurabh Tangri + Signed-off-by: Matt Fleming + +commit b5e3a1e8825abb0406ead0e85436df4df20ddcdb +Author: Don Dutile +Date: Tue Mar 25 20:22:26 2014 -0400 + + pmu: Adding support for Xgene PMUs + + Message-id: <1395778948-47814-2-git-send-email-ddutile@redhat.com> + Patchwork-id: 78602 + O-Subject: [PATCH 1/3] pmu: Adding support for Xgene PMUs + Bugzilla: 1079110 + + Backport of these two posted (but not upstream) patches. + Combined into single patch due to gic-patch dependency. + + Signed-off-by: Donald Dutile + +commit 9f4c27693bb120a3134e3e7e8d452fb02d023e2b +Author: Mark Salter +Date: Sun Jun 15 09:06:55 2014 -0400 + + arm64: fix up APM Mustang devicetree + + These are changes needed when loading device tree blob built with + kernel. i.e. with grub. These are not needed when using devicetree + from Tianocore which will be fixed up at tianocore runtime. + + Signed-off-by: Mark Salter + +commit 1f3a5b228be88be3f734d7a43db3b3f81e160443 +Author: Iyappan Subramanian +Date: Mon Jul 14 15:18:05 2014 -0700 + + drivers: net: Add APM X-Gene SoC ethernet driver support. + + This patch adds network driver for APM X-Gene SoC ethernet. + + Signed-off-by: Iyappan Subramanian + Signed-off-by: Ravi Patel + Signed-off-by: Keyur Chudgar + +commit 54b3fe04c4a953eeb6907ffe9f57aae282f59457 +Author: Iyappan Subramanian +Date: Mon Jul 14 15:18:04 2014 -0700 + + dts: Add bindings for APM X-Gene SoC ethernet driver + + This patch adds bindings for APM X-Gene SoC ethernet driver. + + Signed-off-by: Iyappan Subramanian + Signed-off-by: Ravi Patel + Signed-off-by: Keyur Chudgar + +commit 85125c4e1c1b1ef53d6cb77966efa89062540f43 +Author: Iyappan Subramanian +Date: Mon Jul 14 15:18:03 2014 -0700 + + Documentation: dts: Add bindings for APM X-Gene SoC ethernet driver + + This patch adds documentation for APM X-Gene SoC ethernet DTS binding. + + Signed-off-by: Iyappan Subramanian + Signed-off-by: Ravi Patel + Signed-off-by: Keyur Chudgar + +commit fe8ec437eedc45384c23e1e12a09baa82d24fa16 +Author: Iyappan Subramanian +Date: Mon Jul 14 15:18:02 2014 -0700 + + MAINTAINERS: Add entry for APM X-Gene SoC ethernet driver + + This patch adds a MAINTAINERS entry for APM X-Gene SoC + ethernet driver. + + Signed-off-by: Iyappan Subramanian + Signed-off-by: Ravi Patel + Signed-off-by: Keyur Chudgar + +commit 237639e43c3d6587985a736f33264e129123d7a5 +Author: Mark Salter +Date: Fri Jul 25 15:14:32 2014 -0400 + + arm/kvm: WIP fix for stage2 pgd memory leak + + Signed-off-by: Mark Salter + +commit 0794e2900e5e4be4b7aa0b389e6b0bf8b55c5cd7 +Author: Mark Salter +Date: Thu Jul 17 13:34:50 2014 -0400 + + ahci_xgene: add errata workaround for ATA_CMD_SMART + + commit 2a0bdff6b958d1b2: + + ahci_xgene: fix the dma state machine lockup for the IDENTIFY DEVICE PIO mode command. + + added a workaround for X-Gene AHCI controller errata. This was done + for all ATA_CMD_ID_ATA commands. The errata also appears to affect + ATA_CMD_SMART commands as well. This was discovered when running + smartd or just smartctl -x. This patch adds a dma engine restart for + ATA_CMD_SMART commands which clears up the issues seen with smartd. + + Signed-off-by: Mark Salter + +commit 7adf85b63608b8bea1148f2faa84f475252a9e43 +Author: Mark Salter +Date: Fri Jul 25 15:32:05 2014 -0400 + + rtc: ia64: allow other architectures to use EFI RTC + + Currently, the rtc-efi driver is restricted to ia64 only. Newer + architectures with EFI support may want to also use that driver. This + patch moves the platform device setup from ia64 into drivers/rtc and allow + any architecture with CONFIG_EFI=y to use the rtc-efi driver. + + Signed-off-by: Mark Salter + Cc: Alessandro Zummo + Cc: Tony Luck + Cc: Fenghua Yu + Cc: Andrew Morton + +commit 3b2f96c7a6bfbd46e7dee1d7000081422a7983ce +Author: Kyle McMartin +Date: Tue May 13 22:25:26 2014 -0400 + + arm64: don't set READ_IMPLIES_EXEC for EM_AARCH64 ELF objects + + Message-id: <20140513222526.GC26038@redacted.bos.redhat.com> + Patchwork-id: 79789 + O-Subject: [ACADIA PATCH] arm64: don't set READ_IMPLIES_EXEC for EM_AARCH64 ELF objects + Bugzilla: 1085528 + + BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1085528 + Upstream: submitted soon + + [Sadly this isn't (yet) sufficient... but it fixes at least one issue + here... cat /proc/$$/personality shows READ_IMPLIES_EXEC before. I'll + try to figure the rest out tomorrow.] + + Currently, we're accidentally ending up with executable stacks on + AArch64 when the ABI says we shouldn't be, and relying on glibc to fix + things up for us when we're loaded. However, SELinux will deny us + mucking with the stack, and hit us with execmem AVCs. + + The reason this is happening is somewhat complex: + + fs/binfmt_elf.c:load_elf_binary() + - initializes executable_stack = EXSTACK_DEFAULT implying the + architecture should make up its mind. + - does a pile of loading goo + - runs through the program headers, looking for PT_GNU_STACK + and setting (or unsetting) executable_stack if it finds it. + + This is our first problem, we won't generate these unless an + executable stack is explicitly requested. + + - more ELF loading goo + - sets whether we're a compat task or not (TIF_32BIT) based on compat.h + - for compat reasons (pre-GNU_STACK) checks if the READ_IMPLIES_EXEC + flag should be set for ancient toolchains + + Here's our second problem, we test if read_implies_exec based on + stk != EXSTACK_DISABLE_X, which is true since stk == EXSTACK_DEFAULT. + + So we set current->personality |= READ_IMPLIES_EXEC like a broken + legacy toolchain would want. + + - Now we call setup_arg_pages to set up the stack... + + fs/exec.c:setup_arg_pages() + - lots of magic happens here + - vm_flags gets initialized to VM_STACK_FLAGS + + Here's our third problem, VM_STACK_FLAGS on arm64 is + VM_DEFAULT_DATA_FLAG which tests READ_IMPLIES_EXEC and sets VM_EXEC + if it's true. So we end up with an executable stack mapping, since we + don't have executable_stack set (it's still EXSTACK_DEFAULT at this + point) to unset it anywhere. + + Bang. execstack AVC when the program starts running. + + The easiest way I can see to fix this is to test if we're a legacy task + and fix it up there. But that's not as simple as it sounds, because + the 32-bit ABI depends on what revision of the CPU we've enabled (not + that it matters since we're ARMv8...) Regardless, in the compat case, + set READ_IMPLIES_EXEC if we've found a GNU_STACK header which explicitly + requested it as in arch/arm/kernel/elf.c:arm_elf_read_implies_exec(). + + Signed-off-by: Kyle McMartin + Signed-off-by: Donald Dutile + +commit 4b866971e92b925a44da8d876cb57864942a90b8 +Author: Mark Salter +Date: Thu Jul 24 15:56:15 2014 +0100 + + arm64: fix soft lockup due to large tlb flush range + + Under certain loads, this soft lockup has been observed: + + BUG: soft lockup - CPU#2 stuck for 22s! [ip6tables:1016] + Modules linked in: ip6t_rpfilter ip6t_REJECT cfg80211 rfkill xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw vfat fat efivarfs xfs libcrc32c + + CPU: 2 PID: 1016 Comm: ip6tables Not tainted 3.13.0-0.rc7.30.sa2.aarch64 #1 + task: fffffe03e81d1400 ti: fffffe03f01f8000 task.ti: fffffe03f01f8000 + PC is at __cpu_flush_kern_tlb_range+0xc/0x40 + LR is at __purge_vmap_area_lazy+0x28c/0x3ac + pc : [] lr : [] pstate: 80000145 + sp : fffffe03f01fbb70 + x29: fffffe03f01fbb70 x28: fffffe03f01f8000 + x27: fffffe0000b19000 x26: 00000000000000d0 + x25: 000000000000001c x24: fffffe03f01fbc50 + x23: fffffe03f01fbc58 x22: fffffe03f01fbc10 + x21: fffffe0000b2a3f8 x20: 0000000000000802 + x19: fffffe0000b2a3c8 x18: 000003fffdf52710 + x17: 000003ff9d8bb910 x16: fffffe000050fbfc + x15: 0000000000005735 x14: 000003ff9d7e1a5c + x13: 0000000000000000 x12: 000003ff9d7e1a5c + x11: 0000000000000007 x10: fffffe0000c09af0 + x9 : fffffe0000ad1000 x8 : 000000000000005c + x7 : fffffe03e8624000 x6 : 0000000000000000 + x5 : 0000000000000000 x4 : 0000000000000000 + x3 : fffffe0000c09cc8 x2 : 0000000000000000 + x1 : 000fffffdfffca80 x0 : 000fffffcd742150 + + The __cpu_flush_kern_tlb_range() function looks like: + + ENTRY(__cpu_flush_kern_tlb_range) + dsb sy + lsr x0, x0, #12 + lsr x1, x1, #12 + 1: tlbi vaae1is, x0 + add x0, x0, #1 + cmp x0, x1 + b.lo 1b + dsb sy + isb + ret + ENDPROC(__cpu_flush_kern_tlb_range) + + The above soft lockup shows the PC at tlbi insn with: + + x0 = 0x000fffffcd742150 + x1 = 0x000fffffdfffca80 + + So __cpu_flush_kern_tlb_range has 0x128ba930 tlbi flushes left + after it has already been looping for 23 seconds!. + + Looking up one frame at __purge_vmap_area_lazy(), there is: + + ... + list_for_each_entry_rcu(va, &vmap_area_list, list) { + if (va->flags & VM_LAZY_FREE) { + if (va->va_start < *start) + *start = va->va_start; + if (va->va_end > *end) + *end = va->va_end; + nr += (va->va_end - va->va_start) >> PAGE_SHIFT; + list_add_tail(&va->purge_list, &valist); + va->flags |= VM_LAZY_FREEING; + va->flags &= ~VM_LAZY_FREE; + } + } + ... + if (nr || force_flush) + flush_tlb_kernel_range(*start, *end); + + So if two areas are being freed, the range passed to + flush_tlb_kernel_range() may be as large as the vmalloc + space. For arm64, this is ~240GB for 4k pagesize and ~2TB + for 64kpage size. + + This patch works around this problem by adding a loop limit. + If the range is larger than the limit, use flush_tlb_all() + rather than flushing based on individual pages. The limit + chosen is arbitrary as the TLB size is implementation + specific and not accessible in an architected way. The aim + of the arbitrary limit is to avoid soft lockup. + + Signed-off-by: Mark Salter + [catalin.marinas@arm.com: commit log update] + [catalin.marinas@arm.com: marginal optimisation] + [catalin.marinas@arm.com: changed to MAX_TLB_RANGE and added comment] + Signed-off-by: Catalin Marinas + diff --git a/Documentation/arm64/booting.txt b/Documentation/arm64/booting.txt index 37fc4f6..da1d4bf 100644 --- a/Documentation/arm64/booting.txt @@ -239,7 +1190,7 @@ index 0000000..e19fdb8 + status = "ok"; + }; diff --git a/MAINTAINERS b/MAINTAINERS -index 61a8f48..78946ce 100644 +index 86efa7e..14a3ef1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -699,6 +699,14 @@ S: Maintained @@ -876,6 +1827,29 @@ index 92242ce..4ae9213 100644 +} + #endif /* __ARM64_KVM_HOST_H__ */ +diff --git a/arch/arm64/include/asm/kvm_mmu.h b/arch/arm64/include/asm/kvm_mmu.h +index 7d29847..d7f77ff 100644 +--- a/arch/arm64/include/asm/kvm_mmu.h ++++ b/arch/arm64/include/asm/kvm_mmu.h +@@ -122,8 +122,16 @@ static inline void kvm_set_s2pmd_writable(pmd_t *pmd) + } + + #define kvm_pgd_addr_end(addr, end) pgd_addr_end(addr, end) +-#define kvm_pud_addr_end(addr, end) pud_addr_end(addr, end) +-#define kvm_pmd_addr_end(addr, end) pmd_addr_end(addr, end) ++ ++#define kvm_pud_addr_end(addr, end) \ ++({ unsigned long __boundary = ((addr) + PUD_SIZE) & PUD_MASK; \ ++ (__boundary - 1 < (end) - 1)? __boundary: (end); \ ++}) ++ ++#define kvm_pmd_addr_end(addr, end) \ ++({ unsigned long __boundary = ((addr) + PMD_SIZE) & PMD_MASK; \ ++ (__boundary - 1 < (end) - 1)? __boundary: (end); \ ++}) + + struct kvm; + diff --git a/arch/arm64/include/asm/pci.h b/arch/arm64/include/asm/pci.h new file mode 100644 index 0000000..3f7856e @@ -932,7 +1906,7 @@ index 0000000..3f7856e +#endif /* __KERNEL__ */ +#endif /* __ASM_PCI_H */ diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h -index b9349c4..e0f37ef 100644 +index b9349c4..ecbd081 100644 --- a/arch/arm64/include/asm/tlbflush.h +++ b/arch/arm64/include/asm/tlbflush.h @@ -98,8 +98,8 @@ static inline void flush_tlb_page(struct vm_area_struct *vma, @@ -946,25 +1920,28 @@ index b9349c4..e0f37ef 100644 { unsigned long asid = (unsigned long)ASID(vma->vm_mm) << 48; unsigned long addr; -@@ -112,7 +112,9 @@ static inline void flush_tlb_range(struct vm_area_struct *vma, +@@ -112,7 +112,7 @@ static inline void flush_tlb_range(struct vm_area_struct *vma, dsb(ish); } -static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end) -+#define MAX_TLB_LOOP 128 -+ +static inline void __flush_tlb_kernel_range(unsigned long start, unsigned long end) { unsigned long addr; start >>= 12; -@@ -124,6 +126,23 @@ static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end - dsb(ish); +@@ -125,6 +125,29 @@ static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end } + /* ++ * This is meant to avoid soft lock-ups on large TLB flushing ranges and not ++ * necessarily a performance improvement. ++ */ ++#define MAX_TLB_RANGE (1024UL << PAGE_SHIFT) ++ +static inline void flush_tlb_range(struct vm_area_struct *vma, + unsigned long start, unsigned long end) +{ -+ if (((end - start) >> PAGE_SHIFT) < MAX_TLB_LOOP) ++ if ((end - start) <= MAX_TLB_RANGE) + __flush_tlb_range(vma, start, end); + else + flush_tlb_mm(vma->vm_mm); @@ -972,15 +1949,16 @@ index b9349c4..e0f37ef 100644 + +static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end) +{ -+ if (((end - start) >> PAGE_SHIFT) < MAX_TLB_LOOP) ++ if ((end - start) <= MAX_TLB_RANGE) + __flush_tlb_kernel_range(start, end); + else + flush_tlb_all(); +} + - /* ++/* * On AArch64, the cache coherency is handled via the set_pte_at() function. */ + static inline void update_mmu_cache(struct vm_area_struct *vma, diff --git a/arch/arm64/include/asm/virt.h b/arch/arm64/include/asm/virt.h index 215ad46..7a5df52 100644 --- a/arch/arm64/include/asm/virt.h @@ -1044,6 +2022,37 @@ index 646f888..e74654c 100644 DEFINE(VGIC_CPU_NR_LR, offsetof(struct vgic_cpu, nr_lr)); DEFINE(KVM_VTTBR, offsetof(struct kvm, arch.vttbr)); DEFINE(KVM_VGIC_VCTRL, offsetof(struct kvm, arch.vgic.vctrl_base)); +diff --git a/arch/arm64/kernel/efi-stub.c b/arch/arm64/kernel/efi-stub.c +index e786e6c..320ef48 100644 +--- a/arch/arm64/kernel/efi-stub.c ++++ b/arch/arm64/kernel/efi-stub.c +@@ -58,20 +58,16 @@ static efi_status_t handle_kernel_image(efi_system_table_t *sys_table, + kernel_size = _edata - _text; + if (*image_addr != (dram_base + TEXT_OFFSET)) { + kernel_memsize = kernel_size + (_end - _edata); +- status = efi_relocate_kernel(sys_table, image_addr, +- kernel_size, kernel_memsize, +- dram_base + TEXT_OFFSET, +- PAGE_SIZE); ++ status = efi_low_alloc(sys_table, kernel_memsize + TEXT_OFFSET, ++ SZ_2M, reserve_addr); + if (status != EFI_SUCCESS) { + pr_efi_err(sys_table, "Failed to relocate kernel\n"); + return status; + } +- if (*image_addr != (dram_base + TEXT_OFFSET)) { +- pr_efi_err(sys_table, "Failed to alloc kernel memory\n"); +- efi_free(sys_table, kernel_memsize, *image_addr); +- return EFI_ERROR; +- } +- *image_size = kernel_memsize; ++ memcpy((void *)*reserve_addr + TEXT_OFFSET, (void *)*image_addr, ++ kernel_size); ++ *image_addr = *reserve_addr + TEXT_OFFSET; ++ *reserve_size = kernel_memsize + TEXT_OFFSET; + } + + diff --git a/arch/arm64/kernel/efi.c b/arch/arm64/kernel/efi.c index 14db1f6..453b7f8 100644 --- a/arch/arm64/kernel/efi.c @@ -1064,7 +2073,7 @@ index 14db1f6..453b7f8 100644 + return pm_power_off == NULL; +} diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S -index a2c1195..d1f7b96 100644 +index a2c1195..8df59be 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -22,6 +22,7 @@ @@ -1075,6 +2084,33 @@ index a2c1195..d1f7b96 100644 #include #include +@@ -156,7 +157,7 @@ optional_header: + .short 0x20b // PE32+ format + .byte 0x02 // MajorLinkerVersion + .byte 0x14 // MinorLinkerVersion +- .long _edata - stext // SizeOfCode ++ .long _end - stext // SizeOfCode + .long 0 // SizeOfInitializedData + .long 0 // SizeOfUninitializedData + .long efi_stub_entry - efi_head // AddressOfEntryPoint +@@ -174,7 +175,7 @@ extra_header_fields: + .short 0 // MinorSubsystemVersion + .long 0 // Win32VersionValue + +- .long _edata - efi_head // SizeOfImage ++ .long _end - efi_head // SizeOfImage + + // Everything before the kernel image is considered part of the header + .long stext - efi_head // SizeOfHeaders +@@ -221,7 +222,7 @@ section_table: + .byte 0 + .byte 0 + .byte 0 // end of 0 padding of section name +- .long _edata - stext // VirtualSize ++ .long _end - stext // VirtualSize + .long stext - efi_head // VirtualAddress + .long _edata - stext // SizeOfRawData + .long stext - efi_head // PointerToRawData @@ -295,6 +296,23 @@ CPU_LE( bic x0, x0, #(3 << 24) ) // Clear the EE and E0E bits for EL1 msr cnthctl_el2, x0 msr cntvoff_el2, xzr // Clear virtual offset @@ -1179,6 +2215,62 @@ index 43b7c34..ec5cbbe 100644 * Whoops - the architecture was unable to reboot. */ printk("Reboot failed -- System halted\n"); +diff --git a/arch/arm64/kernel/smp_spin_table.c b/arch/arm64/kernel/smp_spin_table.c +index 0347d38..70181c1 100644 +--- a/arch/arm64/kernel/smp_spin_table.c ++++ b/arch/arm64/kernel/smp_spin_table.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -65,12 +66,21 @@ static int smp_spin_table_cpu_init(struct device_node *dn, unsigned int cpu) + + static int smp_spin_table_cpu_prepare(unsigned int cpu) + { +- void **release_addr; ++ __le64 __iomem *release_addr; + + if (!cpu_release_addr[cpu]) + return -ENODEV; + +- release_addr = __va(cpu_release_addr[cpu]); ++ /* ++ * The cpu-release-addr may or may not be inside the linear mapping. ++ * As ioremap_cache will either give us a new mapping or reuse the ++ * existing linear mapping, we can use it to cover both cases. In ++ * either case the memory will be MT_NORMAL. ++ */ ++ release_addr = ioremap_cache(cpu_release_addr[cpu], ++ sizeof(*release_addr)); ++ if (!release_addr) ++ return -ENOMEM; + + /* + * We write the release address as LE regardless of the native +@@ -79,15 +89,16 @@ static int smp_spin_table_cpu_prepare(unsigned int cpu) + * boot-loader's endianess before jumping. This is mandated by + * the boot protocol. + */ +- release_addr[0] = (void *) cpu_to_le64(__pa(secondary_holding_pen)); +- +- __flush_dcache_area(release_addr, sizeof(release_addr[0])); ++ writeq_relaxed(__pa(secondary_holding_pen), release_addr); ++ __flush_dcache_area(release_addr, sizeof(*release_addr)); + + /* + * Send an event to wake up the secondary CPU. + */ + sev(); + ++ iounmap(release_addr); ++ + return 0; + } + diff --git a/arch/arm64/kvm/Makefile b/arch/arm64/kvm/Makefile index 72a9fd5..32a0961 100644 --- a/arch/arm64/kvm/Makefile @@ -7377,10 +8469,10 @@ index 70347d0..f1dfc36 100644 rtc-core-$(CONFIG_RTC_INTF_SYSFS) += rtc-sysfs.o diff --git a/drivers/rtc/rtc-efi-platform.c b/drivers/rtc/rtc-efi-platform.c new file mode 100644 -index 0000000..1a7f890 +index 0000000..b40fbe3 --- /dev/null +++ b/drivers/rtc/rtc-efi-platform.c -@@ -0,0 +1,30 @@ +@@ -0,0 +1,31 @@ +/* + * Moved from arch/ia64/kernel/time.c + * @@ -7404,8 +8496,9 @@ index 0000000..1a7f890 + +static int __init rtc_init(void) +{ -+ if (platform_device_register(&rtc_efi_dev) < 0) -+ pr_err("unable to register rtc device...\n"); ++ if (efi_enabled(EFI_RUNTIME_SERVICES)) ++ if (platform_device_register(&rtc_efi_dev) < 0) ++ pr_err("unable to register rtc device...\n"); + + /* not necessarily an error */ + return 0; diff --git a/kernel.spec b/kernel.spec index 619dc0615..e19691e00 100644 --- a/kernel.spec +++ b/kernel.spec @@ -2265,6 +2265,9 @@ fi # ||----w | # || || %changelog +* Tue Jul 29 2014 Kyle McMartin +- kernel-arm64.patch: update from upstream git. + * Tue Jul 29 2014 Josh Boyer - 3.16.0-0.rc7.git1.1 - Linux v3.16-rc7-7-g31dab719fa50 - Reenable debugging options. From 082b8c8ad3224c14eaca17a99bb4f8baa391d999 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Wed, 30 Jul 2014 11:21:58 -0400 Subject: [PATCH 29/45] Apply different patch from Milan Broz to fix LUKS partitions (rhbz 1115120) --- crypto-properly-label-AF_ALG-socket.patch | 44 +++++++++++ kernel.spec | 7 +- ...daf4d3df5a977e4623963f141a627fd2efce.patch | 75 ------------------- 3 files changed, 49 insertions(+), 77 deletions(-) create mode 100644 crypto-properly-label-AF_ALG-socket.patch delete mode 100644 selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch diff --git a/crypto-properly-label-AF_ALG-socket.patch b/crypto-properly-label-AF_ALG-socket.patch new file mode 100644 index 000000000..b42186bde --- /dev/null +++ b/crypto-properly-label-AF_ALG-socket.patch @@ -0,0 +1,44 @@ +Th AF_ALG socket was missing a security label (e.g. SELinux) +which means that socket was in "unlabeled" state. + +This was recently demonstrated in the cryptsetup package +(cryptsetup v1.6.5 and later.) +See https://bugzilla.redhat.com/show_bug.cgi?id=1115120 + +This patch clones the sock's label from the parent sock +and resolves the issue (similar to AF_BLUETOOTH protocol family). + +Cc: stable@vger.kernel.org +Signed-off-by: Milan Broz +--- + crypto/af_alg.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/crypto/af_alg.c b/crypto/af_alg.c +index 966f893..6a3ad80 100644 +--- a/crypto/af_alg.c ++++ b/crypto/af_alg.c +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + + struct alg_type_list { + const struct af_alg_type *type; +@@ -243,6 +244,7 @@ int af_alg_accept(struct sock *sk, struct socket *newsock) + + sock_init_data(newsock, sk2); + sock_graft(sk2, newsock); ++ security_sk_clone(sk, sk2); + + err = type->accept(ask->private, sk2); + if (err) { +-- +2.0.1 + +_______________________________________________ +Selinux mailing list +Selinux@tycho.nsa.gov +To unsubscribe, send email to Selinux-leave@tycho.nsa.gov. +To get help, send an email containing "help" to Selinux-request@tycho.nsa.gov. \ No newline at end of file diff --git a/kernel.spec b/kernel.spec index e19691e00..2ea35b0a1 100644 --- a/kernel.spec +++ b/kernel.spec @@ -644,7 +644,7 @@ Patch25110: 0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch Patch25118: sched-fix-sched_setparam-policy-1-logic.patch #rhbz 1115120 -Patch25120: selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch +Patch25120: crypto-properly-label-AF_ALG-socket.patch # git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel Patch30000: kernel-arm64.patch @@ -1378,7 +1378,7 @@ ApplyPatch 0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch ApplyPatch sched-fix-sched_setparam-policy-1-logic.patch #rhbz 1115120 -ApplyPatch selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch +ApplyPatch crypto-properly-label-AF_ALG-socket.patch %if 0%{?aarch64patches} ApplyPatch kernel-arm64.patch @@ -2265,6 +2265,9 @@ fi # ||----w | # || || %changelog +* Wed Jul 30 2014 Josh Boyer +- Apply different patch from Milan Broz to fix LUKS partitions (rhbz 1115120) + * Tue Jul 29 2014 Kyle McMartin - kernel-arm64.patch: update from upstream git. diff --git a/selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch b/selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch deleted file mode 100644 index bf8d534fc..000000000 --- a/selinux-4da6daf4d3df5a977e4623963f141a627fd2efce.patch +++ /dev/null @@ -1,75 +0,0 @@ -Bugzilla: 1115120 -Upstream-status: sent for 3.16 - -From 4da6daf4d3df5a977e4623963f141a627fd2efce Mon Sep 17 00:00:00 2001 -From: Paul Moore -Date: Thu, 10 Jul 2014 10:17:48 -0400 -Subject: [PATCH] selinux: fix the default socket labeling in sock_graft() - -The sock_graft() hook has special handling for AF_INET, AF_INET, and -AF_UNIX sockets as those address families have special hooks which -label the sock before it is attached its associated socket. -Unfortunately, the sock_graft() hook was missing a default approach -to labeling sockets which meant that any other address family which -made use of connections or the accept() syscall would find the -returned socket to be in an "unlabeled" state. This was recently -demonstrated by the kcrypto/AF_ALG subsystem and the newly released -cryptsetup package (cryptsetup v1.6.5 and later). - -This patch preserves the special handling in selinux_sock_graft(), -but adds a default behavior - setting the sock's label equal to the -associated socket - which resolves the problem with AF_ALG and -presumably any other address family which makes use of accept(). - -Cc: stable@vger.kernel.org -Signed-off-by: Paul Moore -Tested-by: Milan Broz ---- - include/linux/security.h | 5 ++++- - security/selinux/hooks.c | 13 +++++++++++-- - 2 files changed, 15 insertions(+), 3 deletions(-) - -diff --git a/include/linux/security.h b/include/linux/security.h -index 6478ce3..794be73 100644 ---- a/include/linux/security.h -+++ b/include/linux/security.h -@@ -987,7 +987,10 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) - * Retrieve the LSM-specific secid for the sock to enable caching of network - * authorizations. - * @sock_graft: -- * Sets the socket's isec sid to the sock's sid. -+ * This hook is called in response to a newly created sock struct being -+ * grafted onto an existing socket and allows the security module to -+ * perform whatever security attribute management is necessary for both -+ * the sock and socket. - * @inet_conn_request: - * Sets the openreq's sid to socket's sid with MLS portion taken from peer sid. - * @inet_csk_clone: -diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c -index 336f0a0..b3a6754 100644 ---- a/security/selinux/hooks.c -+++ b/security/selinux/hooks.c -@@ -4499,9 +4499,18 @@ static void selinux_sock_graft(struct sock *sk, struct socket *parent) - struct inode_security_struct *isec = SOCK_INODE(parent)->i_security; - struct sk_security_struct *sksec = sk->sk_security; - -- if (sk->sk_family == PF_INET || sk->sk_family == PF_INET6 || -- sk->sk_family == PF_UNIX) -+ switch (sk->sk_family) { -+ case PF_INET: -+ case PF_INET6: -+ case PF_UNIX: - isec->sid = sksec->sid; -+ break; -+ default: -+ /* by default there is no special labeling mechanism for the -+ * sksec label so inherit the label from the parent socket */ -+ BUG_ON(sksec->sid != SECINITSID_UNLABELED); -+ sksec->sid = isec->sid; -+ } - sksec->sclass = isec->sclass; - } - --- -1.9.3 - From ecaa91af8b55b5f9dfde8b20dcb0d5217fab1413 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Wed, 30 Jul 2014 13:49:14 -0400 Subject: [PATCH 30/45] Linux v3.16-rc7-64-g26bcd8b72563 - Temporarily disable aarch64patches --- kernel.spec | 14 +- ...erit-auth_capable-on-INIT-collisions.patch | 212 ------------------ sources | 2 +- 3 files changed, 7 insertions(+), 221 deletions(-) delete mode 100644 net-v2-net-sctp-inherit-auth_capable-on-INIT-collisions.patch diff --git a/kernel.spec b/kernel.spec index 2ea35b0a1..19fe0144d 100644 --- a/kernel.spec +++ b/kernel.spec @@ -8,7 +8,7 @@ Summary: The Linux kernel # be 0. %global released_kernel 0 -%global aarch64patches 1 +%global aarch64patches 0 # Sign modules on x86. Make sure the config files match this setting if more # architectures are added. @@ -69,7 +69,7 @@ Summary: The Linux kernel # The rc snapshot level %define rcrev 7 # The git snapshot level -%define gitrev 1 +%define gitrev 2 # Set rpm version accordingly %define rpmversion 3.%{upstream_sublevel}.0 %endif @@ -649,9 +649,6 @@ Patch25120: crypto-properly-label-AF_ALG-socket.patch # git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel Patch30000: kernel-arm64.patch -#CVE-2014-5077 rhbz 1122982 1123696 -Patch25124: net-v2-net-sctp-inherit-auth_capable-on-INIT-collisions.patch - # END OF PATCH DEFINITIONS %endif @@ -1387,9 +1384,6 @@ ApplyPatch kernel-arm64.patch -R %endif %endif -#CVE-2014-5077 rhbz 1122982 1123696 -ApplyPatch net-v2-net-sctp-inherit-auth_capable-on-INIT-collisions.patch - # END OF PATCH APPLICATIONS %endif @@ -2265,6 +2259,10 @@ fi # ||----w | # || || %changelog +* Wed Jul 30 2014 Josh Boyer - 3.16.0-0.rc7.git2.1 +- Linux v3.16-rc7-64-g26bcd8b72563 +- Temporarily disable aarch64patches + * Wed Jul 30 2014 Josh Boyer - Apply different patch from Milan Broz to fix LUKS partitions (rhbz 1115120) diff --git a/net-v2-net-sctp-inherit-auth_capable-on-INIT-collisions.patch b/net-v2-net-sctp-inherit-auth_capable-on-INIT-collisions.patch deleted file mode 100644 index 73bad5276..000000000 --- a/net-v2-net-sctp-inherit-auth_capable-on-INIT-collisions.patch +++ /dev/null @@ -1,212 +0,0 @@ -Bugzilla: 1123696 -Upstream-status: Queued for 3.16 - -From patchwork Tue Jul 22 13:22:45 2014 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: [net,v2] net: sctp: inherit auth_capable on INIT collisions -From: Daniel Borkmann -X-Patchwork-Id: 372475 -Message-Id: <1406035365-1154-1-git-send-email-dborkman@redhat.com> -To: davem@davemloft.net -Cc: jgunthorpe@obsidianresearch.com, netdev@vger.kernel.org, - linux-sctp@vger.kernel.org, Vlad Yasevich -Date: Tue, 22 Jul 2014 15:22:45 +0200 - -Jason reported an oops caused by SCTP on his ARM machine with -SCTP authentication enabled: - -Internal error: Oops: 17 [#1] ARM -CPU: 0 PID: 104 Comm: sctp-test Not tainted 3.13.0-68744-g3632f30c9b20-dirty #1 -task: c6eefa40 ti: c6f52000 task.ti: c6f52000 -PC is at sctp_auth_calculate_hmac+0xc4/0x10c -LR is at sg_init_table+0x20/0x38 -pc : [] lr : [] psr: 40000013 -sp : c6f538e8 ip : 00000000 fp : c6f53924 -r10: c6f50d80 r9 : 00000000 r8 : 00010000 -r7 : 00000000 r6 : c7be4000 r5 : 00000000 r4 : c6f56254 -r3 : c00c8170 r2 : 00000001 r1 : 00000008 r0 : c6f1e660 -Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user -Control: 0005397f Table: 06f28000 DAC: 00000015 -Process sctp-test (pid: 104, stack limit = 0xc6f521c0) -Stack: (0xc6f538e8 to 0xc6f54000) -[...] -Backtrace: -[] (sctp_auth_calculate_hmac+0x0/0x10c) from [] (sctp_packet_transmit+0x33c/0x5c8) -[] (sctp_packet_transmit+0x0/0x5c8) from [] (sctp_outq_flush+0x7fc/0x844) -[] (sctp_outq_flush+0x0/0x844) from [] (sctp_outq_uncork+0x24/0x28) -[] (sctp_outq_uncork+0x0/0x28) from [] (sctp_side_effects+0x1134/0x1220) -[] (sctp_side_effects+0x0/0x1220) from [] (sctp_do_sm+0xac/0xd4) -[] (sctp_do_sm+0x0/0xd4) from [] (sctp_assoc_bh_rcv+0x118/0x160) -[] (sctp_assoc_bh_rcv+0x0/0x160) from [] (sctp_inq_push+0x6c/0x74) -[] (sctp_inq_push+0x0/0x74) from [] (sctp_rcv+0x7d8/0x888) - -While we already had various kind of bugs in that area -ec0223ec48a9 ("net: sctp: fix sctp_sf_do_5_1D_ce to verify if -we/peer is AUTH capable") and b14878ccb7fa ("net: sctp: cache -auth_enable per endpoint"), this one is a bit of a different -kind. - -Giving a bit more background on why SCTP authentication is -needed can be found in RFC4895: - - SCTP uses 32-bit verification tags to protect itself against - blind attackers. These values are not changed during the - lifetime of an SCTP association. - - Looking at new SCTP extensions, there is the need to have a - method of proving that an SCTP chunk(s) was really sent by - the original peer that started the association and not by a - malicious attacker. - -To cause this bug, we're triggering an INIT collision between -peers; normal SCTP handshake where both sides intent to -authenticate packets contains RANDOM; CHUNKS; HMAC-ALGO -parameters that are being negotiated among peers: - - ---------- INIT[RANDOM; CHUNKS; HMAC-ALGO] ----------> - <------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] --------- - -------------------- COOKIE-ECHO --------------------> - <-------------------- COOKIE-ACK --------------------- - -RFC4895 says that each endpoint therefore knows its own random -number and the peer's random number *after* the association -has been established. The local and peer's random number along -with the shared key are then part of the secret used for -calculating the HMAC in the AUTH chunk. - -Now, in our scenario, we have 2 threads with 1 non-blocking -SEQ_PACKET socket each, setting up common shared SCTP_AUTH_KEY -and SCTP_AUTH_ACTIVE_KEY properly, and each of them calling -sctp_bindx(3), listen(2) and connect(2) against each other, -thus the handshake looks similar to this, e.g.: - - ---------- INIT[RANDOM; CHUNKS; HMAC-ALGO] ----------> - <------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] --------- - <--------- INIT[RANDOM; CHUNKS; HMAC-ALGO] ----------- - -------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] --------> - ... - -Since such collisions can also happen with verification tags, -the RFC4895 for AUTH rather vaguely says under section 6.1: - - In case of INIT collision, the rules governing the handling - of this Random Number follow the same pattern as those for - the Verification Tag, as explained in Section 5.2.4 of - RFC 2960 [5]. Therefore, each endpoint knows its own Random - Number and the peer's Random Number after the association - has been established. - -In RFC2960, section 5.2.4, we're eventually hitting Action B: - - B) In this case, both sides may be attempting to start an - association at about the same time but the peer endpoint - started its INIT after responding to the local endpoint's - INIT. Thus it may have picked a new Verification Tag not - being aware of the previous Tag it had sent this endpoint. - The endpoint should stay in or enter the ESTABLISHED - state but it MUST update its peer's Verification Tag from - the State Cookie, stop any init or cookie timers that may - running and send a COOKIE ACK. - -In other words, the handling of the Random parameter is the -same as behavior for the Verification Tag as described in -Action B of section 5.2.4. - -Looking at the code, we exactly hit the sctp_sf_do_dupcook_b() -case which triggers an SCTP_CMD_UPDATE_ASSOC command to the -side effect interpreter, and in fact it properly copies over -peer_{random, hmacs, chunks} parameters from the newly created -association to update the existing one. - -Also, the old asoc_shared_key is being released and based on -the new params, sctp_auth_asoc_init_active_key() updated. -However, the issue observed in this case is that the previous -asoc->peer.auth_capable was 0, and has *not* been updated, so -that instead of creating a new secret, we're doing an early -return from the function sctp_auth_asoc_init_active_key() -leaving asoc->asoc_shared_key as NULL. However, we now have to -authenticate chunks from the updated chunk list (e.g. COOKIE-ACK). - -That in fact causes the server side when responding with ... - - <------------------ AUTH; COOKIE-ACK ----------------- - -... to trigger a NULL pointer dereference, since in -sctp_packet_transmit(), it discovers that an AUTH chunk is -being queued for xmit, and thus it calls sctp_auth_calculate_hmac(). - -Since the asoc->active_key_id is still inherited from the -endpoint, and the same as encoded into the chunk, it uses -asoc->asoc_shared_key, which is still NULL, as an asoc_key -and dereferences it in ... - - crypto_hash_setkey(desc.tfm, &asoc_key->data[0], asoc_key->len) - -... causing an oops. All this happens because sctp_make_cookie_ack() -called with the *new* association has the peer.auth_capable=1 -and therefore marks the chunk with auth=1 after checking -sctp_auth_send_cid(), but it is *actually* sent later on over -the then *updated* association's transport that didn't initialize -its shared key due to peer.auth_capable=0. Since control chunks -in that case are not sent by the temporary association which -are scheduled for deletion, they are issued for xmit via -SCTP_CMD_REPLY in the interpreter with the context of the -*updated* association. peer.auth_capable was 0 in the updated -association (which went from COOKIE_WAIT into ESTABLISHED state), -since all previous processing that performed sctp_process_init() -was being done on temporary associations, that we eventually -throw away each time. - -The correct fix is to update to the new peer.auth_capable -value as well in the collision case via sctp_assoc_update(), -so that in case the collision migrated from 0 -> 1, -sctp_auth_asoc_init_active_key() can properly recalculate -the secret. This therefore fixes the observed server panic. - -Fixes: 730fc3d05cd4 ("[SCTP]: Implete SCTP-AUTH parameter processing") -Reported-by: Jason Gunthorpe -Signed-off-by: Daniel Borkmann -Tested-by: Jason Gunthorpe -Cc: Vlad Yasevich -Acked-by: Vlad Yasevich ---- - v1 -> v2, more notes: - - I've only updated the commit description for now, this bug seems - clear to me that we would need to fix it; since RFC4895 mentions - it explicitly that on collisions, we need to *update* these params - accordingly as we would do so in RFC2960. So in other words, this - can be explained by having an *inconsistency* when doing the update - as auth_capable is *tightly coupled* with peer_random, peer_chunks, - peer_hmacs and eventually the asoc_shared_key creation. - - For the rest, I went through the code and currently could not - find where we could oops if we don't have the others for now. It - needs more time and testing however. It's also not too clear from - RFC2960/RFC4960 what needs to be carried over in addition: so we - know "The endpoint should stay in or enter the ESTABLISHED state - but it MUST update its peer's Verification Tag from the State - Cookie, stop any init or cookie timers that may running and send - a COOKIE ACK." and we know that we need to update all AUTH related - members, which we do *now*. - - In addition, we also need to fix AUTH + COOKIE_ECHO collisions, - as they currently cannot be resolved properly into a handshake. - - net/sctp/associola.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/net/sctp/associola.c b/net/sctp/associola.c -index 9de23a2..06a9ee6 100644 ---- a/net/sctp/associola.c -+++ b/net/sctp/associola.c -@@ -1097,6 +1097,7 @@ void sctp_assoc_update(struct sctp_association *asoc, - asoc->c = new->c; - asoc->peer.rwnd = new->peer.rwnd; - asoc->peer.sack_needed = new->peer.sack_needed; -+ asoc->peer.auth_capable = new->peer.auth_capable; - asoc->peer.i = new->peer.i; - sctp_tsnmap_init(&asoc->peer.tsn_map, SCTP_TSN_MAP_INITIAL, - asoc->peer.i.initial_tsn, GFP_ATOMIC); diff --git a/sources b/sources index d36e382b3..055658ed2 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ 97ca1625bb40368dc41b9a7971549071 linux-3.15.tar.xz ef8f4db937f521a7e323ec589536ba25 perf-man-3.15.tar.gz cf68262d938c6ec27bc96896beb8549f patch-3.16-rc7.xz -d15747e3ab3760b07aaae1077ddeceed patch-3.16-rc7-git1.xz +3627dd3a3efad454c49e422f16dc3d44 patch-3.16-rc7-git2.xz From 3a3d323ba8a7b812f8b0e7475a8c86811ea992b8 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Wed, 30 Jul 2014 17:20:17 -0400 Subject: [PATCH 31/45] kernel-arm64.patch: fix up merge conflict and re-enable --- kernel-arm64.patch | 71 +++++++++++++++++++++++++++++++++++++--------- kernel.spec | 5 +++- 2 files changed, 61 insertions(+), 15 deletions(-) diff --git a/kernel-arm64.patch b/kernel-arm64.patch index 9fcf9af77..25f0479c8 100644 --- a/kernel-arm64.patch +++ b/kernel-arm64.patch @@ -1,3 +1,13 @@ +commit db044807ca763c21bae298388239be6177c6ccec +Merge: 649c9e3 26bcd8b +Author: Kyle McMartin +Date: Wed Jul 30 14:31:24 2014 -0400 + + Merge branch 'master' into devel + + Conflicts: + virt/kvm/arm/vgic.c + commit 649c9e3a45e81852daf80c126a332297b75cb109 Author: Ard Biesheuvel Date: Tue Jul 29 12:49:10 2014 +0200 @@ -9058,10 +9068,10 @@ index e9441b9..1d3f39c 100644 diff --git a/virt/kvm/arm/vgic-v2.c b/virt/kvm/arm/vgic-v2.c new file mode 100644 -index 0000000..5fd2b75 +index 0000000..ff597d8 --- /dev/null +++ b/virt/kvm/arm/vgic-v2.c -@@ -0,0 +1,243 @@ +@@ -0,0 +1,259 @@ +/* + * Copyright (C) 2012,2013 ARM Limited, All Rights Reserved. + * Author: Marc Zyngier @@ -9289,10 +9299,26 @@ index 0000000..5fd2b75 + ret = -ENXIO; + goto out_unmap; + } ++ ++ if (!PAGE_ALIGNED(vcpu_res.start)) { ++ kvm_err("GICV physical address 0x%llx not page aligned\n", ++ (unsigned long long)vcpu_res.start); ++ ret = -ENXIO; ++ goto out_unmap; ++ } ++ ++ if (!PAGE_ALIGNED(resource_size(&vcpu_res))) { ++ kvm_err("GICV size 0x%llx not a multiple of page size 0x%lx\n", ++ (unsigned long long)resource_size(&vcpu_res), ++ PAGE_SIZE); ++ ret = -ENXIO; ++ goto out_unmap; ++ } ++ + vgic->vcpu_base = vcpu_res.start; + + kvm_info("%s@%llx IRQ%d\n", vgic_node->name, -+ vctrl_res.start, vgic->maint_irq); ++ vgic->vctrl_base, vgic->maint_irq); + + vgic->type = VGIC_V2; + *ops = &vgic_v2_ops; @@ -9543,7 +9569,7 @@ index 0000000..f01d446 + return ret; +} diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c -index 56ff9be..795ab48 100644 +index 476d3bf..795ab48 100644 --- a/virt/kvm/arm/vgic.c +++ b/virt/kvm/arm/vgic.c @@ -76,14 +76,6 @@ @@ -10005,7 +10031,7 @@ index 56ff9be..795ab48 100644 } ret = __register_cpu_notifier(&vgic_cpu_nb); -@@ -1502,49 +1567,15 @@ int kvm_vgic_hyp_init(void) +@@ -1502,65 +1567,15 @@ int kvm_vgic_hyp_init(void) goto out_free_irq; } @@ -10033,20 +10059,37 @@ index 56ff9be..795ab48 100644 - goto out_unmap; - } - -- kvm_info("%s@%llx IRQ%d\n", vgic_node->name, -- vctrl_res.start, vgic_maint_irq); - on_each_cpu(vgic_init_maintenance_interrupt, NULL, 1); - - if (of_address_to_resource(vgic_node, 3, &vcpu_res)) { - kvm_err("Cannot obtain VCPU resource\n"); - ret = -ENXIO; - goto out_unmap; - } +- +- if (!PAGE_ALIGNED(vcpu_res.start)) { +- kvm_err("GICV physical address 0x%llx not page aligned\n", +- (unsigned long long)vcpu_res.start); +- ret = -ENXIO; +- goto out_unmap; +- } +- +- if (!PAGE_ALIGNED(resource_size(&vcpu_res))) { +- kvm_err("GICV size 0x%llx not a multiple of page size 0x%lx\n", +- (unsigned long long)resource_size(&vcpu_res), +- PAGE_SIZE); +- ret = -ENXIO; +- goto out_unmap; +- } +- - vgic_vcpu_base = vcpu_res.start; -+ /* Callback into for arch code for setup */ -+ vgic_arch_setup(vgic); +- +- kvm_info("%s@%llx IRQ%d\n", vgic_node->name, +- vctrl_res.start, vgic_maint_irq); + on_each_cpu(vgic_init_maintenance_interrupt, NULL, 1); - goto out; ++ /* Callback into for arch code for setup */ ++ vgic_arch_setup(vgic); ++ + return 0; -out_unmap: @@ -10059,7 +10102,7 @@ index 56ff9be..795ab48 100644 return ret; } -@@ -1577,7 +1608,7 @@ int kvm_vgic_init(struct kvm *kvm) +@@ -1593,7 +1608,7 @@ int kvm_vgic_init(struct kvm *kvm) } ret = kvm_phys_addr_ioremap(kvm, kvm->arch.vgic.vgic_cpu_base, @@ -10068,7 +10111,7 @@ index 56ff9be..795ab48 100644 if (ret) { kvm_err("Unable to remap VGIC CPU to VCPU\n"); goto out; -@@ -1623,7 +1654,8 @@ int kvm_vgic_create(struct kvm *kvm) +@@ -1639,7 +1654,8 @@ int kvm_vgic_create(struct kvm *kvm) } spin_lock_init(&kvm->arch.vgic.lock); @@ -10078,7 +10121,7 @@ index 56ff9be..795ab48 100644 kvm->arch.vgic.vgic_dist_base = VGIC_ADDR_UNDEF; kvm->arch.vgic.vgic_cpu_base = VGIC_ADDR_UNDEF; -@@ -1722,39 +1754,40 @@ int kvm_vgic_addr(struct kvm *kvm, unsigned long type, u64 *addr, bool write) +@@ -1738,39 +1754,40 @@ int kvm_vgic_addr(struct kvm *kvm, unsigned long type, u64 *addr, bool write) static bool handle_cpu_mmio_misc(struct kvm_vcpu *vcpu, struct kvm_exit_mmio *mmio, phys_addr_t offset) { diff --git a/kernel.spec b/kernel.spec index 19fe0144d..0037b1988 100644 --- a/kernel.spec +++ b/kernel.spec @@ -8,7 +8,7 @@ Summary: The Linux kernel # be 0. %global released_kernel 0 -%global aarch64patches 0 +%global aarch64patches 1 # Sign modules on x86. Make sure the config files match this setting if more # architectures are added. @@ -2259,6 +2259,9 @@ fi # ||----w | # || || %changelog +* Wed Jul 30 2014 Kyle McMartin +- kernel-arm64.patch: fix up merge conflict and re-enable + * Wed Jul 30 2014 Josh Boyer - 3.16.0-0.rc7.git2.1 - Linux v3.16-rc7-64-g26bcd8b72563 - Temporarily disable aarch64patches From 73f882b7bfcde77a1ae751ea194cd8ae2ed9dd62 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Thu, 31 Jul 2014 10:53:23 -0400 Subject: [PATCH 32/45] Linux v3.16-rc7-76-g3a1122d26c62 --- kernel.spec | 5 ++++- secure-modules.patch | 45 ++++++++++++++++++++++---------------------- sources | 2 +- 3 files changed, 27 insertions(+), 25 deletions(-) diff --git a/kernel.spec b/kernel.spec index 0037b1988..322d2f6fa 100644 --- a/kernel.spec +++ b/kernel.spec @@ -69,7 +69,7 @@ Summary: The Linux kernel # The rc snapshot level %define rcrev 7 # The git snapshot level -%define gitrev 2 +%define gitrev 3 # Set rpm version accordingly %define rpmversion 3.%{upstream_sublevel}.0 %endif @@ -2259,6 +2259,9 @@ fi # ||----w | # || || %changelog +* Thu Jul 31 2014 Josh Boyer - 3.16.0-0.rc7.git3.1 +- Linux v3.16-rc7-76-g3a1122d26c62 + * Wed Jul 30 2014 Kyle McMartin - kernel-arm64.patch: fix up merge conflict and re-enable diff --git a/secure-modules.patch b/secure-modules.patch index b51a22cdb..2d3174c22 100644 --- a/secure-modules.patch +++ b/secure-modules.patch @@ -1,8 +1,7 @@ Bugzilla: N/A Upstream-status: Fedora mustard. Replaced by securelevels, but that was nak'd - -From 3b083aa4b42c6f2e814742b24e1948aced3a5e3f Mon Sep 17 00:00:00 2001 +From 952dbcbea4cffb1a05773af3b5f41e8ed477c5fe Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Fri, 9 Aug 2013 17:58:15 -0400 Subject: [PATCH 01/14] Add secure_modules() call @@ -64,7 +63,7 @@ index 81e727cf6df9..fc14f48915dd 100644 1.9.3 -From 5c9708ebd7a52bf432745dc9b739c54666f2789d Mon Sep 17 00:00:00 2001 +From 3b451a12e60a47d152ecce1c02634c4d7320b024 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Thu, 8 Mar 2012 10:10:38 -0500 Subject: [PATCH 02/14] PCI: Lock down BAR access when module security is @@ -183,7 +182,7 @@ index b91c4da68365..98f5637304d1 100644 1.9.3 -From c5f35519151d28b1a3c3dee5cb67fd67befa7fb6 Mon Sep 17 00:00:00 2001 +From 42a620055ac873fb378ec69731c7a2200f6779cc Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Thu, 8 Mar 2012 10:35:59 -0500 Subject: [PATCH 03/14] x86: Lock down IO port access when module security is @@ -256,7 +255,7 @@ index 917403fe10da..cdf839f9defe 100644 1.9.3 -From 24b607adc80fdebbc3497efc4b997a62edc06280 Mon Sep 17 00:00:00 2001 +From 8019fb7c7b5f18b19f7c980987953680ee218c9f Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Fri, 9 Mar 2012 08:39:37 -0500 Subject: [PATCH 04/14] ACPI: Limit access to custom_method @@ -288,7 +287,7 @@ index c68e72414a67..4277938af700 100644 1.9.3 -From 215559c7708671e85ceb42f6e25445b9b27f6c38 Mon Sep 17 00:00:00 2001 +From bf84e9e1022b2d3d0c97ae48fb8b61e5336c50f8 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Fri, 9 Mar 2012 08:46:50 -0500 Subject: [PATCH 05/14] asus-wmi: Restrict debugfs interface when module @@ -343,7 +342,7 @@ index 3c6ccedc82b6..960c46536c65 100644 1.9.3 -From b709a5110b728b526063c6814413a8c0f0d01203 Mon Sep 17 00:00:00 2001 +From 9a56e8715d3b6dc84989997f34b6b5d407cabad2 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Fri, 9 Mar 2012 09:28:15 -0500 Subject: [PATCH 06/14] Restrict /dev/mem and /dev/kmem when module loading is @@ -386,7 +385,7 @@ index cdf839f9defe..c63cf93b00eb 100644 1.9.3 -From 2896018a1c991e19691ab203a9e9010e898587e7 Mon Sep 17 00:00:00 2001 +From 8d6faa19bbbaa4df411becda7e40c4ea0684c134 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Mon, 25 Jun 2012 19:57:30 -0400 Subject: [PATCH 07/14] acpi: Ignore acpi_rsdp kernel parameter when module @@ -426,7 +425,7 @@ index bad25b070fe0..0606585e8b93 100644 1.9.3 -From a9c7c2c5e39d3e687b3e90845a753673144a754b Mon Sep 17 00:00:00 2001 +From 1ff86ddea019f543f6668b56889f86811028f303 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Fri, 9 Aug 2013 03:33:56 -0400 Subject: [PATCH 08/14] kexec: Disable at runtime if the kernel enforces module @@ -442,18 +441,18 @@ Signed-off-by: Matthew Garrett 1 file changed, 8 insertions(+) diff --git a/kernel/kexec.c b/kernel/kexec.c -index 6748688813d0..d4d88984bf45 100644 +index 4b8f0c925884..df14daa323a9 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c -@@ -33,6 +33,7 @@ - #include +@@ -34,6 +34,7 @@ #include #include + #include +#include #include #include -@@ -946,6 +947,13 @@ SYSCALL_DEFINE4(kexec_load, unsigned long, entry, unsigned long, nr_segments, +@@ -947,6 +948,13 @@ SYSCALL_DEFINE4(kexec_load, unsigned long, entry, unsigned long, nr_segments, return -EPERM; /* @@ -471,7 +470,7 @@ index 6748688813d0..d4d88984bf45 100644 1.9.3 -From 4ce6023b9f02d5397156976568b3aad88b2f5b95 Mon Sep 17 00:00:00 2001 +From 4d56368f1364b45c18067bab1d6abc5ce0f67183 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Fri, 8 Feb 2013 11:12:13 -0800 Subject: [PATCH 09/14] x86: Restrict MSR access when module loading is @@ -516,7 +515,7 @@ index c9603ac80de5..8bef43fc3f40 100644 1.9.3 -From c95290110f65724e58b7506281759c0bac59b9f5 Mon Sep 17 00:00:00 2001 +From aab8ba85241a85a0b2ed622edd7874c74cafa496 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Fri, 9 Aug 2013 18:36:30 -0400 Subject: [PATCH 10/14] Add option to automatically enforce module signatures @@ -552,10 +551,10 @@ index 199f453cb4de..ec38acf00b40 100644 290/040 ALL edd_mbr_sig_buffer EDD MBR signatures 2D0/A00 ALL e820_map E820 memory map table diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index a8f749ef0fdc..35bfd8259993 100644 +index d24887b645dc..870aac9520b3 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig -@@ -1556,6 +1556,16 @@ config EFI_MIXED +@@ -1557,6 +1557,16 @@ config EFI_MIXED If unsure, say N. @@ -703,7 +702,7 @@ index fc14f48915dd..2d68d276f3b6 100644 1.9.3 -From f0baa6f34da3f151c059ca3043945837db0ca8d1 Mon Sep 17 00:00:00 2001 +From eae8a80ddc185b3f233e2620dbfc6454b6f0c3a6 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Tue, 5 Feb 2013 19:25:05 -0500 Subject: [PATCH 11/14] efi: Disable secure boot if shim is in insecure mode @@ -762,7 +761,7 @@ index 85defaf5a27c..b4013a4ba005 100644 1.9.3 -From 6bc90bfd4c13fd6cc4a536630807406c16395bf5 Mon Sep 17 00:00:00 2001 +From 9728a4f49b284b7354876e1d77174d5838306e21 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Tue, 27 Aug 2013 13:28:43 -0400 Subject: [PATCH 12/14] efi: Make EFI_SECURE_BOOT_SIG_ENFORCE depend on EFI @@ -776,10 +775,10 @@ Signed-off-by: Josh Boyer 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig -index 35bfd8259993..746b1b63da8c 100644 +index 870aac9520b3..7aecd3f9f8ee 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig -@@ -1557,7 +1557,8 @@ config EFI_MIXED +@@ -1558,7 +1558,8 @@ config EFI_MIXED If unsure, say N. config EFI_SECURE_BOOT_SIG_ENFORCE @@ -793,7 +792,7 @@ index 35bfd8259993..746b1b63da8c 100644 1.9.3 -From 292f6faa86f44fe261c8da58cc2c7f65aa0acad6 Mon Sep 17 00:00:00 2001 +From 4211b4919b8ccecc4f4cdc0a46ead7294478b687 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Tue, 27 Aug 2013 13:33:03 -0400 Subject: [PATCH 13/14] efi: Add EFI_SECURE_BOOT bit @@ -837,7 +836,7 @@ index 41bbf8ba4ba8..e73f391fd3c8 100644 1.9.3 -From 594e605ee9589150919aa113e3e01163168ad041 Mon Sep 17 00:00:00 2001 +From 18b50c6f0597b606cb03cbd8a9fdef7478cb2b21 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Fri, 20 Jun 2014 08:53:24 -0400 Subject: [PATCH 14/14] hibernate: Disable in a signed modules environment diff --git a/sources b/sources index 055658ed2..3e5ad8c5e 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ 97ca1625bb40368dc41b9a7971549071 linux-3.15.tar.xz ef8f4db937f521a7e323ec589536ba25 perf-man-3.15.tar.gz cf68262d938c6ec27bc96896beb8549f patch-3.16-rc7.xz -3627dd3a3efad454c49e422f16dc3d44 patch-3.16-rc7-git2.xz +1c67029928355381d4d884f17627c800 patch-3.16-rc7-git3.xz From 3b18c1496e8937334d0bd7af8e512cebd581459a Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Fri, 1 Aug 2014 08:40:17 -0400 Subject: [PATCH 33/45] Linux v3.16-rc7-84-g6f0928036bcb --- crypto-properly-label-AF_ALG-socket.patch | 44 ----------------------- kernel.spec | 11 +++--- sources | 2 +- 3 files changed, 5 insertions(+), 52 deletions(-) delete mode 100644 crypto-properly-label-AF_ALG-socket.patch diff --git a/crypto-properly-label-AF_ALG-socket.patch b/crypto-properly-label-AF_ALG-socket.patch deleted file mode 100644 index b42186bde..000000000 --- a/crypto-properly-label-AF_ALG-socket.patch +++ /dev/null @@ -1,44 +0,0 @@ -Th AF_ALG socket was missing a security label (e.g. SELinux) -which means that socket was in "unlabeled" state. - -This was recently demonstrated in the cryptsetup package -(cryptsetup v1.6.5 and later.) -See https://bugzilla.redhat.com/show_bug.cgi?id=1115120 - -This patch clones the sock's label from the parent sock -and resolves the issue (similar to AF_BLUETOOTH protocol family). - -Cc: stable@vger.kernel.org -Signed-off-by: Milan Broz ---- - crypto/af_alg.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/crypto/af_alg.c b/crypto/af_alg.c -index 966f893..6a3ad80 100644 ---- a/crypto/af_alg.c -+++ b/crypto/af_alg.c -@@ -21,6 +21,7 @@ - #include - #include - #include -+#include - - struct alg_type_list { - const struct af_alg_type *type; -@@ -243,6 +244,7 @@ int af_alg_accept(struct sock *sk, struct socket *newsock) - - sock_init_data(newsock, sk2); - sock_graft(sk2, newsock); -+ security_sk_clone(sk, sk2); - - err = type->accept(ask->private, sk2); - if (err) { --- -2.0.1 - -_______________________________________________ -Selinux mailing list -Selinux@tycho.nsa.gov -To unsubscribe, send email to Selinux-leave@tycho.nsa.gov. -To get help, send an email containing "help" to Selinux-request@tycho.nsa.gov. \ No newline at end of file diff --git a/kernel.spec b/kernel.spec index 322d2f6fa..2ef2cb893 100644 --- a/kernel.spec +++ b/kernel.spec @@ -69,7 +69,7 @@ Summary: The Linux kernel # The rc snapshot level %define rcrev 7 # The git snapshot level -%define gitrev 3 +%define gitrev 4 # Set rpm version accordingly %define rpmversion 3.%{upstream_sublevel}.0 %endif @@ -643,9 +643,6 @@ Patch25110: 0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch #rhbz 1117942 Patch25118: sched-fix-sched_setparam-policy-1-logic.patch -#rhbz 1115120 -Patch25120: crypto-properly-label-AF_ALG-socket.patch - # git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel Patch30000: kernel-arm64.patch @@ -1374,9 +1371,6 @@ ApplyPatch 0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch #rhbz 1117942 ApplyPatch sched-fix-sched_setparam-policy-1-logic.patch -#rhbz 1115120 -ApplyPatch crypto-properly-label-AF_ALG-socket.patch - %if 0%{?aarch64patches} ApplyPatch kernel-arm64.patch %ifnarch aarch64 # this is stupid, but i want to notice before secondary koji does. @@ -2259,6 +2253,9 @@ fi # ||----w | # || || %changelog +* Fri Aug 01 2014 Josh Boyer - 3.16.0-0.rc7.git4.1 +- Linux v3.16-rc7-84-g6f0928036bcb + * Thu Jul 31 2014 Josh Boyer - 3.16.0-0.rc7.git3.1 - Linux v3.16-rc7-76-g3a1122d26c62 diff --git a/sources b/sources index 3e5ad8c5e..51128e99e 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ 97ca1625bb40368dc41b9a7971549071 linux-3.15.tar.xz ef8f4db937f521a7e323ec589536ba25 perf-man-3.15.tar.gz cf68262d938c6ec27bc96896beb8549f patch-3.16-rc7.xz -1c67029928355381d4d884f17627c800 patch-3.16-rc7-git3.xz +e0a01b33426ee65469142433358003ce patch-3.16-rc7-git4.xz From 82ae65d1d861dafc58ff65968c46ea1abf403d1d Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 3 Aug 2014 21:11:26 +0100 Subject: [PATCH 34/45] Minor config updates for Armada and Sunxi ARM devices --- config-armv7 | 6 +++--- config-armv7-generic | 2 ++ kernel.spec | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/config-armv7 b/config-armv7 index 6dd7ced4e..03f43354f 100644 --- a/config-armv7 +++ b/config-armv7 @@ -25,9 +25,9 @@ CONFIG_ARCH_ZYNQ=y # mvebu CONFIG_MACH_ARMADA_370_XP=y CONFIG_MACH_ARMADA_370=y +CONFIG_MACH_ARMADA_375=y +CONFIG_MACH_ARMADA_38X=y CONFIG_MACH_ARMADA_XP=y -# CONFIG_MACH_ARMADA_375 is not set -# CONFIG_MACH_ARMADA_38X is not set CONFIG_MACH_DOVE=y CONFIG_MVEBU_DEVBUS=y @@ -508,7 +508,7 @@ CONFIG_MACH_HREFV60=y CONFIG_MACH_SNOWBALL=y CONFIG_ABX500_CORE=y -CONFIG_ARM_U8500_CPUIDLE=y +# CONFIG_ARM_U8500_CPUIDLE is not set CONFIG_UX500_DEBUG_UART=2 CONFIG_AB8500_CORE=y CONFIG_STE_DMA40=y diff --git a/config-armv7-generic b/config-armv7-generic index be7822bd3..058b9514b 100644 --- a/config-armv7-generic +++ b/config-armv7-generic @@ -181,6 +181,8 @@ CONFIG_I2C_SUN6I_P2WI=m CONFIG_GPIO_PCA953X=m CONFIG_POWER_RESET_SUN6I=y CONFIG_TOUCHSCREEN_SUN4I=m +CONFIG_MFD_AXP20X=y +CONFIG_REGULATOR_AXP20X=m # Exynos CONFIG_ARCH_EXYNOS3=y diff --git a/kernel.spec b/kernel.spec index 2ef2cb893..7f0b125a7 100644 --- a/kernel.spec +++ b/kernel.spec @@ -2253,6 +2253,9 @@ fi # ||----w | # || || %changelog +* Sun Aug 3 2014 Peter Robinson +- Minor config updates for Armada and Sunxi ARM devices + * Fri Aug 01 2014 Josh Boyer - 3.16.0-0.rc7.git4.1 - Linux v3.16-rc7-84-g6f0928036bcb From 146b953539e431ab9d40ec675922a5432d16ae4b Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Mon, 4 Aug 2014 05:32:12 -0400 Subject: [PATCH 35/45] Linux v3.16 - Disable debugging options. --- config-generic | 6 +-- config-nodebug | 118 ++++++++++++++++++++++----------------------- config-x86-generic | 2 +- kernel.spec | 14 ++++-- sources | 6 +-- 5 files changed, 74 insertions(+), 72 deletions(-) diff --git a/config-generic b/config-generic index cb3787b1b..d83167ed4 100644 --- a/config-generic +++ b/config-generic @@ -1695,13 +1695,13 @@ CONFIG_B43_SDIO=y CONFIG_B43_BCMA=y # CONFIG_B43_BCMA_EXTRA is not set CONFIG_B43_BCMA_PIO=y -CONFIG_B43_DEBUG=y +# CONFIG_B43_DEBUG is not set CONFIG_B43_PHY_LP=y CONFIG_B43_PHY_N=y CONFIG_B43_PHY_HT=y # CONFIG_B43_FORCE_PIO is not set CONFIG_B43LEGACY=m -CONFIG_B43LEGACY_DEBUG=y +# CONFIG_B43LEGACY_DEBUG is not set CONFIG_B43LEGACY_DMA=y CONFIG_B43LEGACY_PIO=y CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y @@ -4641,7 +4641,7 @@ CONFIG_PM_DEBUG=y # CONFIG_DPM_WATCHDOG is not set # revisit this in debug CONFIG_PM_TRACE=y CONFIG_PM_TRACE_RTC=y -CONFIG_PM_TEST_SUSPEND=y +# CONFIG_PM_TEST_SUSPEND is not set CONFIG_PM_RUNTIME=y # CONFIG_PM_OPP is not set # CONFIG_PM_AUTOSLEEP is not set diff --git a/config-nodebug b/config-nodebug index 360f418d4..e16a37b57 100644 --- a/config-nodebug +++ b/config-nodebug @@ -2,101 +2,101 @@ CONFIG_SND_VERBOSE_PRINTK=y CONFIG_SND_DEBUG=y CONFIG_SND_PCM_XRUN_DEBUG=y -CONFIG_DEBUG_ATOMIC_SLEEP=y +# CONFIG_DEBUG_ATOMIC_SLEEP is not set -CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y -CONFIG_DEBUG_RT_MUTEXES=y -CONFIG_DEBUG_LOCK_ALLOC=y -CONFIG_LOCK_TORTURE_TEST=m -CONFIG_PROVE_LOCKING=y -CONFIG_DEBUG_SPINLOCK=y -CONFIG_PROVE_RCU=y +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_LOCK_TORTURE_TEST is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_PROVE_RCU is not set # CONFIG_PROVE_RCU_REPEATEDLY is not set -CONFIG_DEBUG_PER_CPU_MAPS=y +# CONFIG_DEBUG_PER_CPU_MAPS is not set CONFIG_CPUMASK_OFFSTACK=y -CONFIG_CPU_NOTIFIER_ERROR_INJECT=m +# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set -CONFIG_FAULT_INJECTION=y -CONFIG_FAILSLAB=y -CONFIG_FAIL_PAGE_ALLOC=y -CONFIG_FAIL_MAKE_REQUEST=y -CONFIG_FAULT_INJECTION_DEBUG_FS=y -CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y -CONFIG_FAIL_IO_TIMEOUT=y -CONFIG_FAIL_MMC_REQUEST=y +# CONFIG_FAULT_INJECTION is not set +# CONFIG_FAILSLAB is not set +# CONFIG_FAIL_PAGE_ALLOC is not set +# CONFIG_FAIL_MAKE_REQUEST is not set +# CONFIG_FAULT_INJECTION_DEBUG_FS is not set +# CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set +# CONFIG_FAIL_IO_TIMEOUT is not set +# CONFIG_FAIL_MMC_REQUEST is not set -CONFIG_LOCK_STAT=y +# CONFIG_LOCK_STAT is not set -CONFIG_DEBUG_STACK_USAGE=y +# CONFIG_DEBUG_STACK_USAGE is not set -CONFIG_ACPI_DEBUG=y +# CONFIG_ACPI_DEBUG is not set # CONFIG_ACPI_DEBUG_FUNC_TRACE is not set -CONFIG_DEBUG_SG=y -CONFIG_DEBUG_PI_LIST=y +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_PI_LIST is not set # CONFIG_DEBUG_PAGEALLOC is not set -CONFIG_DEBUG_WRITECOUNT=y -CONFIG_DEBUG_OBJECTS=y +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_OBJECTS is not set # CONFIG_DEBUG_OBJECTS_SELFTEST is not set -CONFIG_DEBUG_OBJECTS_FREE=y -CONFIG_DEBUG_OBJECTS_TIMERS=y -CONFIG_DEBUG_OBJECTS_RCU_HEAD=y +# CONFIG_DEBUG_OBJECTS_FREE is not set +# CONFIG_DEBUG_OBJECTS_TIMERS is not set +# CONFIG_DEBUG_OBJECTS_RCU_HEAD is not set CONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1 -CONFIG_X86_PTDUMP=y -CONFIG_EFI_PGT_DUMP=y +# CONFIG_X86_PTDUMP is not set +# CONFIG_EFI_PGT_DUMP is not set -CONFIG_CAN_DEBUG_DEVICES=y +# CONFIG_CAN_DEBUG_DEVICES is not set -CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set -CONFIG_SYSCTL_SYSCALL_CHECK=y +# CONFIG_SYSCTL_SYSCALL_CHECK is not set -CONFIG_DEBUG_NOTIFIERS=y +# CONFIG_DEBUG_NOTIFIERS is not set -CONFIG_DMA_API_DEBUG=y +# CONFIG_DMA_API_DEBUG is not set -CONFIG_MMIOTRACE=y +# CONFIG_MMIOTRACE is not set -CONFIG_DEBUG_CREDENTIALS=y +# CONFIG_DEBUG_CREDENTIALS is not set # off in both production debug and nodebug builds, # on in rawhide nodebug builds -CONFIG_DEBUG_FORCE_WEAK_PER_CPU=y +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set -CONFIG_EXT4_DEBUG=y +# CONFIG_EXT4_DEBUG is not set # CONFIG_XFS_WARN is not set -CONFIG_DEBUG_PERF_USE_VMALLOC=y +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set -CONFIG_JBD2_DEBUG=y +# CONFIG_JBD2_DEBUG is not set -CONFIG_NFSD_FAULT_INJECTION=y +# CONFIG_NFSD_FAULT_INJECTION is not set -CONFIG_DEBUG_BLK_CGROUP=y +# CONFIG_DEBUG_BLK_CGROUP is not set -CONFIG_DRBD_FAULT_INJECTION=y +# CONFIG_DRBD_FAULT_INJECTION is not set -CONFIG_ATH_DEBUG=y -CONFIG_CARL9170_DEBUGFS=y -CONFIG_IWLWIFI_DEVICE_TRACING=y +# CONFIG_ATH_DEBUG is not set +# CONFIG_CARL9170_DEBUGFS is not set +# CONFIG_IWLWIFI_DEVICE_TRACING is not set # CONFIG_RTLWIFI_DEBUG is not set -CONFIG_DEBUG_OBJECTS_WORK=y +# CONFIG_DEBUG_OBJECTS_WORK is not set -CONFIG_DMADEVICES_DEBUG=y -CONFIG_DMADEVICES_VDEBUG=y +# CONFIG_DMADEVICES_DEBUG is not set +# CONFIG_DMADEVICES_VDEBUG is not set CONFIG_PM_ADVANCED_DEBUG=y -CONFIG_CEPH_LIB_PRETTYDEBUG=y -CONFIG_QUOTA_DEBUG=y +# CONFIG_CEPH_LIB_PRETTYDEBUG is not set +# CONFIG_QUOTA_DEBUG is not set CONFIG_PCI_DEFAULT_USE_CRS=y @@ -104,18 +104,18 @@ CONFIG_KGDB_KDB=y CONFIG_KDB_KEYBOARD=y CONFIG_KDB_CONTINUE_CATASTROPHIC=0 -CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER=y +# CONFIG_DEBUG_OBJECTS_PERCPU_COUNTER is not set # CONFIG_PERCPU_TEST is not set -CONFIG_TEST_LIST_SORT=y +# CONFIG_TEST_LIST_SORT is not set # CONFIG_TEST_STRING_HELPERS is not set -CONFIG_DETECT_HUNG_TASK=y +# CONFIG_DETECT_HUNG_TASK is not set CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 # CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set -CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y +# CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK is not set -CONFIG_DEBUG_KMEMLEAK=y +# CONFIG_DEBUG_KMEMLEAK is not set CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=1024 # CONFIG_DEBUG_KMEMLEAK_TEST is not set CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y @@ -126,7 +126,7 @@ CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y # CONFIG_SPI_DEBUG is not set -CONFIG_X86_DEBUG_STATIC_CPU_HAS=y +# CONFIG_X86_DEBUG_STATIC_CPU_HAS is not set # CONFIG_SCHEDSTATS is not set # CONFIG_LATENCYTOP is not set diff --git a/config-x86-generic b/config-x86-generic index 997bc472a..7968fdaea 100644 --- a/config-x86-generic +++ b/config-x86-generic @@ -334,7 +334,7 @@ CONFIG_SP5100_TCO=m # CONFIG_MEMTEST is not set # CONFIG_DEBUG_TLBFLUSH is not set -CONFIG_MAXSMP=y +# CONFIG_MAXSMP is not set CONFIG_HP_ILO=m diff --git a/kernel.spec b/kernel.spec index 7f0b125a7..5e610d1ef 100644 --- a/kernel.spec +++ b/kernel.spec @@ -6,7 +6,7 @@ Summary: The Linux kernel # For a stable, released kernel, released_kernel should be 1. For rawhide # and/or a kernel built from an rc or git snapshot, released_kernel should # be 0. -%global released_kernel 0 +%global released_kernel 1 %global aarch64patches 1 @@ -48,7 +48,7 @@ Summary: The Linux kernel # base_sublevel is the kernel version we're starting with and patching # on top of -- for example, 3.1-rc7-git1 starts with a 3.0 base, # which yields a base_sublevel of 0. -%define base_sublevel 15 +%define base_sublevel 16 ## If this is a released kernel ## %if 0%{?released_kernel} @@ -67,9 +67,9 @@ Summary: The Linux kernel # The next upstream release sublevel (base_sublevel+1) %define upstream_sublevel %(echo $((%{base_sublevel} + 1))) # The rc snapshot level -%define rcrev 7 +%define rcrev 0 # The git snapshot level -%define gitrev 4 +%define gitrev 0 # Set rpm version accordingly %define rpmversion 3.%{upstream_sublevel}.0 %endif @@ -130,7 +130,7 @@ Summary: The Linux kernel # Set debugbuildsenabled to 1 for production (build separate debug kernels) # and 0 for rawhide (all kernels are debug kernels). # See also 'make debug' and 'make release'. -%define debugbuildsenabled 0 +%define debugbuildsenabled 1 # Want to build a vanilla kernel build without any non-upstream patches? %define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0} @@ -2253,6 +2253,10 @@ fi # ||----w | # || || %changelog +* Mon Aug 04 2014 Josh Boyer - 3.16.0-1 +- Linux v3.16 +- Disable debugging options. + * Sun Aug 3 2014 Peter Robinson - Minor config updates for Armada and Sunxi ARM devices diff --git a/sources b/sources index 51128e99e..8606810b0 100644 --- a/sources +++ b/sources @@ -1,4 +1,2 @@ -97ca1625bb40368dc41b9a7971549071 linux-3.15.tar.xz -ef8f4db937f521a7e323ec589536ba25 perf-man-3.15.tar.gz -cf68262d938c6ec27bc96896beb8549f patch-3.16-rc7.xz -e0a01b33426ee65469142433358003ce patch-3.16-rc7-git4.xz +5c569ed649a0c9711879f333e90c5386 linux-3.16.tar.xz +49868ce6467b35cd9ffea1120d129462 perf-man-3.16.tar.gz From 11270026d6b8be63df4932a10d79d7f02b5e7f5b Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Mon, 11 Aug 2014 11:56:18 -0400 Subject: [PATCH 36/45] Bump baserelease to 300 Do this now before I forget next time. --- kernel.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel.spec b/kernel.spec index 5e610d1ef..543ec8bf5 100644 --- a/kernel.spec +++ b/kernel.spec @@ -42,7 +42,7 @@ Summary: The Linux kernel # For non-released -rc kernels, this will be appended after the rcX and # gitX tags, so a 3 here would become part of release "0.rcX.gitX.3" # -%global baserelease 1 +%global baserelease 300 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching From 14c8baad8db643bf3b19999e0a041aec4ad978fe Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Wed, 13 Aug 2014 09:11:01 -0400 Subject: [PATCH 37/45] CVE-2014-{5206,5207} ro bind mount bypass with namespaces (rhbz 1129662 1129669) --- kernel.spec | 11 +- namespaces-remount-fixes.patch | 625 +++++++++++++++++++++++++++++++++ 2 files changed, 635 insertions(+), 1 deletion(-) create mode 100644 namespaces-remount-fixes.patch diff --git a/kernel.spec b/kernel.spec index 543ec8bf5..a24fe3abd 100644 --- a/kernel.spec +++ b/kernel.spec @@ -643,6 +643,9 @@ Patch25110: 0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch #rhbz 1117942 Patch25118: sched-fix-sched_setparam-policy-1-logic.patch +#CVE-2014-{5206,5207} rhbz 1129662 1129669 +Patch25119: namespaces-remount-fixes.patch + # git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel Patch30000: kernel-arm64.patch @@ -1371,6 +1374,9 @@ ApplyPatch 0001-ideapad-laptop-Change-Lenovo-Yoga-2-series-rfkill-ha.patch #rhbz 1117942 ApplyPatch sched-fix-sched_setparam-policy-1-logic.patch +#CVE-2014-{5206,5207} rhbz 1129662 1129669 +ApplyPatch namespaces-remount-fixes.patch + %if 0%{?aarch64patches} ApplyPatch kernel-arm64.patch %ifnarch aarch64 # this is stupid, but i want to notice before secondary koji does. @@ -2253,7 +2259,10 @@ fi # ||----w | # || || %changelog -* Mon Aug 04 2014 Josh Boyer - 3.16.0-1 +* Wed Aug 13 2014 Josh Boyer +- CVE-2014-{5206,5207} ro bind mount bypass with namespaces (rhbz 1129662 1129669) + +* Mon Aug 04 2014 Josh Boyer - 3.16.0-1 - Linux v3.16 - Disable debugging options. diff --git a/namespaces-remount-fixes.patch b/namespaces-remount-fixes.patch new file mode 100644 index 000000000..2e2800cb8 --- /dev/null +++ b/namespaces-remount-fixes.patch @@ -0,0 +1,625 @@ +Bugzilla: 1129669 +Upstream-status: 3.17 and CC'd to stable + +From a6138db815df5ee542d848318e5dae681590fccd Mon Sep 17 00:00:00 2001 +From: "Eric W. Biederman" +Date: Mon, 28 Jul 2014 16:26:53 -0700 +Subject: [PATCH 1/5] mnt: Only change user settable mount flags in remount + +Kenton Varda discovered that by remounting a +read-only bind mount read-only in a user namespace the +MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user +to the remount a read-only mount read-write. + +Correct this by replacing the mask of mount flags to preserve +with a mask of mount flags that may be changed, and preserve +all others. This ensures that any future bugs with this mask and +remount will fail in an easy to detect way where new mount flags +simply won't change. + +Cc: stable@vger.kernel.org +Acked-by: Serge E. Hallyn +Signed-off-by: "Eric W. Biederman" +--- + fs/namespace.c | 2 +- + include/linux/mount.h | 4 +++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/fs/namespace.c b/fs/namespace.c +index 7187d01329c3..cb40449ea0df 100644 +--- a/fs/namespace.c ++++ b/fs/namespace.c +@@ -1937,7 +1937,7 @@ static int do_remount(struct path *path, int flags, int mnt_flags, + err = do_remount_sb(sb, flags, data, 0); + if (!err) { + lock_mount_hash(); +- mnt_flags |= mnt->mnt.mnt_flags & MNT_PROPAGATION_MASK; ++ mnt_flags |= mnt->mnt.mnt_flags & ~MNT_USER_SETTABLE_MASK; + mnt->mnt.mnt_flags = mnt_flags; + touch_mnt_namespace(mnt->mnt_ns); + unlock_mount_hash(); +diff --git a/include/linux/mount.h b/include/linux/mount.h +index 839bac270904..b637a89e1fae 100644 +--- a/include/linux/mount.h ++++ b/include/linux/mount.h +@@ -42,7 +42,9 @@ struct mnt_namespace; + * flag, consider how it interacts with shared mounts. + */ + #define MNT_SHARED_MASK (MNT_UNBINDABLE) +-#define MNT_PROPAGATION_MASK (MNT_SHARED | MNT_UNBINDABLE) ++#define MNT_USER_SETTABLE_MASK (MNT_NOSUID | MNT_NODEV | MNT_NOEXEC \ ++ | MNT_NOATIME | MNT_NODIRATIME | MNT_RELATIME \ ++ | MNT_READONLY) + + #define MNT_INTERNAL_FLAGS (MNT_SHARED | MNT_WRITE_HOLD | MNT_INTERNAL | \ + MNT_DOOMED | MNT_SYNC_UMOUNT | MNT_MARKED) +-- +2.0.4 + + +From 07b645589dcda8b7a5249e096fece2a67556f0f4 Mon Sep 17 00:00:00 2001 +From: "Eric W. Biederman" +Date: Mon, 28 Jul 2014 17:10:56 -0700 +Subject: [PATCH 2/5] mnt: Move the test for MNT_LOCK_READONLY from + change_mount_flags into do_remount + +There are no races as locked mount flags are guaranteed to never change. + +Moving the test into do_remount makes it more visible, and ensures all +filesystem remounts pass the MNT_LOCK_READONLY permission check. This +second case is not an issue today as filesystem remounts are guarded +by capable(CAP_DAC_ADMIN) and thus will always fail in less privileged +mount namespaces, but it could become an issue in the future. + +Cc: stable@vger.kernel.org +Acked-by: Serge E. Hallyn +Signed-off-by: "Eric W. Biederman" +--- + fs/namespace.c | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +diff --git a/fs/namespace.c b/fs/namespace.c +index cb40449ea0df..1105a577a14f 100644 +--- a/fs/namespace.c ++++ b/fs/namespace.c +@@ -1896,9 +1896,6 @@ static int change_mount_flags(struct vfsmount *mnt, int ms_flags) + if (readonly_request == __mnt_is_readonly(mnt)) + return 0; + +- if (mnt->mnt_flags & MNT_LOCK_READONLY) +- return -EPERM; +- + if (readonly_request) + error = mnt_make_readonly(real_mount(mnt)); + else +@@ -1924,6 +1921,16 @@ static int do_remount(struct path *path, int flags, int mnt_flags, + if (path->dentry != path->mnt->mnt_root) + return -EINVAL; + ++ /* Don't allow changing of locked mnt flags. ++ * ++ * No locks need to be held here while testing the various ++ * MNT_LOCK flags because those flags can never be cleared ++ * once they are set. ++ */ ++ if ((mnt->mnt.mnt_flags & MNT_LOCK_READONLY) && ++ !(mnt_flags & MNT_READONLY)) { ++ return -EPERM; ++ } + err = security_sb_remount(sb, data); + if (err) + return err; +-- +2.0.4 + + +From 9566d6742852c527bf5af38af5cbb878dad75705 Mon Sep 17 00:00:00 2001 +From: "Eric W. Biederman" +Date: Mon, 28 Jul 2014 17:26:07 -0700 +Subject: [PATCH 3/5] mnt: Correct permission checks in do_remount + +While invesgiating the issue where in "mount --bind -oremount,ro ..." +would result in later "mount --bind -oremount,rw" succeeding even if +the mount started off locked I realized that there are several +additional mount flags that should be locked and are not. + +In particular MNT_NOSUID, MNT_NODEV, MNT_NOEXEC, and the atime +flags in addition to MNT_READONLY should all be locked. These +flags are all per superblock, can all be changed with MS_BIND, +and should not be changable if set by a more privileged user. + +The following additions to the current logic are added in this patch. +- nosuid may not be clearable by a less privileged user. +- nodev may not be clearable by a less privielged user. +- noexec may not be clearable by a less privileged user. +- atime flags may not be changeable by a less privileged user. + +The logic with atime is that always setting atime on access is a +global policy and backup software and auditing software could break if +atime bits are not updated (when they are configured to be updated), +and serious performance degradation could result (DOS attack) if atime +updates happen when they have been explicitly disabled. Therefore an +unprivileged user should not be able to mess with the atime bits set +by a more privileged user. + +The additional restrictions are implemented with the addition of +MNT_LOCK_NOSUID, MNT_LOCK_NODEV, MNT_LOCK_NOEXEC, and MNT_LOCK_ATIME +mnt flags. + +Taken together these changes and the fixes for MNT_LOCK_READONLY +should make it safe for an unprivileged user to create a user +namespace and to call "mount --bind -o remount,... ..." without +the danger of mount flags being changed maliciously. + +Cc: stable@vger.kernel.org +Acked-by: Serge E. Hallyn +Signed-off-by: "Eric W. Biederman" +--- + fs/namespace.c | 36 +++++++++++++++++++++++++++++++++--- + include/linux/mount.h | 5 +++++ + 2 files changed, 38 insertions(+), 3 deletions(-) + +diff --git a/fs/namespace.c b/fs/namespace.c +index 1105a577a14f..dd9c93b5a9d5 100644 +--- a/fs/namespace.c ++++ b/fs/namespace.c +@@ -890,8 +890,21 @@ static struct mount *clone_mnt(struct mount *old, struct dentry *root, + + mnt->mnt.mnt_flags = old->mnt.mnt_flags & ~(MNT_WRITE_HOLD|MNT_MARKED); + /* Don't allow unprivileged users to change mount flags */ +- if ((flag & CL_UNPRIVILEGED) && (mnt->mnt.mnt_flags & MNT_READONLY)) +- mnt->mnt.mnt_flags |= MNT_LOCK_READONLY; ++ if (flag & CL_UNPRIVILEGED) { ++ mnt->mnt.mnt_flags |= MNT_LOCK_ATIME; ++ ++ if (mnt->mnt.mnt_flags & MNT_READONLY) ++ mnt->mnt.mnt_flags |= MNT_LOCK_READONLY; ++ ++ if (mnt->mnt.mnt_flags & MNT_NODEV) ++ mnt->mnt.mnt_flags |= MNT_LOCK_NODEV; ++ ++ if (mnt->mnt.mnt_flags & MNT_NOSUID) ++ mnt->mnt.mnt_flags |= MNT_LOCK_NOSUID; ++ ++ if (mnt->mnt.mnt_flags & MNT_NOEXEC) ++ mnt->mnt.mnt_flags |= MNT_LOCK_NOEXEC; ++ } + + /* Don't allow unprivileged users to reveal what is under a mount */ + if ((flag & CL_UNPRIVILEGED) && list_empty(&old->mnt_expire)) +@@ -1931,6 +1944,23 @@ static int do_remount(struct path *path, int flags, int mnt_flags, + !(mnt_flags & MNT_READONLY)) { + return -EPERM; + } ++ if ((mnt->mnt.mnt_flags & MNT_LOCK_NODEV) && ++ !(mnt_flags & MNT_NODEV)) { ++ return -EPERM; ++ } ++ if ((mnt->mnt.mnt_flags & MNT_LOCK_NOSUID) && ++ !(mnt_flags & MNT_NOSUID)) { ++ return -EPERM; ++ } ++ if ((mnt->mnt.mnt_flags & MNT_LOCK_NOEXEC) && ++ !(mnt_flags & MNT_NOEXEC)) { ++ return -EPERM; ++ } ++ if ((mnt->mnt.mnt_flags & MNT_LOCK_ATIME) && ++ ((mnt->mnt.mnt_flags & MNT_ATIME_MASK) != (mnt_flags & MNT_ATIME_MASK))) { ++ return -EPERM; ++ } ++ + err = security_sb_remount(sb, data); + if (err) + return err; +@@ -2129,7 +2159,7 @@ static int do_new_mount(struct path *path, const char *fstype, int flags, + */ + if (!(type->fs_flags & FS_USERNS_DEV_MOUNT)) { + flags |= MS_NODEV; +- mnt_flags |= MNT_NODEV; ++ mnt_flags |= MNT_NODEV | MNT_LOCK_NODEV; + } + } + +diff --git a/include/linux/mount.h b/include/linux/mount.h +index b637a89e1fae..b0c1e6574e7f 100644 +--- a/include/linux/mount.h ++++ b/include/linux/mount.h +@@ -45,12 +45,17 @@ struct mnt_namespace; + #define MNT_USER_SETTABLE_MASK (MNT_NOSUID | MNT_NODEV | MNT_NOEXEC \ + | MNT_NOATIME | MNT_NODIRATIME | MNT_RELATIME \ + | MNT_READONLY) ++#define MNT_ATIME_MASK (MNT_NOATIME | MNT_NODIRATIME | MNT_RELATIME ) + + #define MNT_INTERNAL_FLAGS (MNT_SHARED | MNT_WRITE_HOLD | MNT_INTERNAL | \ + MNT_DOOMED | MNT_SYNC_UMOUNT | MNT_MARKED) + + #define MNT_INTERNAL 0x4000 + ++#define MNT_LOCK_ATIME 0x040000 ++#define MNT_LOCK_NOEXEC 0x080000 ++#define MNT_LOCK_NOSUID 0x100000 ++#define MNT_LOCK_NODEV 0x200000 + #define MNT_LOCK_READONLY 0x400000 + #define MNT_LOCKED 0x800000 + #define MNT_DOOMED 0x1000000 +-- +2.0.4 + + +From ffbc6f0ead47fa5a1dc9642b0331cb75c20a640e Mon Sep 17 00:00:00 2001 +From: "Eric W. Biederman" +Date: Mon, 28 Jul 2014 17:36:04 -0700 +Subject: [PATCH 4/5] mnt: Change the default remount atime from relatime to + the existing value + +Since March 2009 the kernel has treated the state that if no +MS_..ATIME flags are passed then the kernel defaults to relatime. + +Defaulting to relatime instead of the existing atime state during a +remount is silly, and causes problems in practice for people who don't +specify any MS_...ATIME flags and to get the default filesystem atime +setting. Those users may encounter a permission error because the +default atime setting does not work. + +A default that does not work and causes permission problems is +ridiculous, so preserve the existing value to have a default +atime setting that is always guaranteed to work. + +Using the default atime setting in this way is particularly +interesting for applications built to run in restricted userspace +environments without /proc mounted, as the existing atime mount +options of a filesystem can not be read from /proc/mounts. + +In practice this fixes user space that uses the default atime +setting on remount that are broken by the permission checks +keeping less privileged users from changing more privileged users +atime settings. + +Cc: stable@vger.kernel.org +Acked-by: Serge E. Hallyn +Signed-off-by: "Eric W. Biederman" +--- + fs/namespace.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/fs/namespace.c b/fs/namespace.c +index dd9c93b5a9d5..7886176232c1 100644 +--- a/fs/namespace.c ++++ b/fs/namespace.c +@@ -2473,6 +2473,14 @@ long do_mount(const char *dev_name, const char *dir_name, + if (flags & MS_RDONLY) + mnt_flags |= MNT_READONLY; + ++ /* The default atime for remount is preservation */ ++ if ((flags & MS_REMOUNT) && ++ ((flags & (MS_NOATIME | MS_NODIRATIME | MS_RELATIME | ++ MS_STRICTATIME)) == 0)) { ++ mnt_flags &= ~MNT_ATIME_MASK; ++ mnt_flags |= path.mnt->mnt_flags & MNT_ATIME_MASK; ++ } ++ + flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE | MS_BORN | + MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT | + MS_STRICTATIME); +-- +2.0.4 + + +From db181ce011e3c033328608299cd6fac06ea50130 Mon Sep 17 00:00:00 2001 +From: "Eric W. Biederman" +Date: Tue, 29 Jul 2014 15:50:44 -0700 +Subject: [PATCH 5/5] mnt: Add tests for unprivileged remount cases that have + found to be faulty + +Kenton Varda discovered that by remounting a +read-only bind mount read-only in a user namespace the +MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user +to the remount a read-only mount read-write. + +Upon review of the code in remount it was discovered that the code allowed +nosuid, noexec, and nodev to be cleared. It was also discovered that +the code was allowing the per mount atime flags to be changed. + +The first naive patch to fix these issues contained the flaw that using +default atime settings when remounting a filesystem could be disallowed. + +To avoid this problems in the future add tests to ensure unprivileged +remounts are succeeding and failing at the appropriate times. + +Cc: stable@vger.kernel.org +Acked-by: Serge E. Hallyn +Signed-off-by: "Eric W. Biederman" +--- + tools/testing/selftests/Makefile | 1 + + tools/testing/selftests/mount/Makefile | 17 ++ + .../selftests/mount/unprivileged-remount-test.c | 242 +++++++++++++++++++++ + 3 files changed, 260 insertions(+) + create mode 100644 tools/testing/selftests/mount/Makefile + create mode 100644 tools/testing/selftests/mount/unprivileged-remount-test.c + +diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile +index e66e710cc595..0a8a9db43d34 100644 +--- a/tools/testing/selftests/Makefile ++++ b/tools/testing/selftests/Makefile +@@ -4,6 +4,7 @@ TARGETS += efivarfs + TARGETS += kcmp + TARGETS += memory-hotplug + TARGETS += mqueue ++TARGETS += mount + TARGETS += net + TARGETS += ptrace + TARGETS += timers +diff --git a/tools/testing/selftests/mount/Makefile b/tools/testing/selftests/mount/Makefile +new file mode 100644 +index 000000000000..337d853c2b72 +--- /dev/null ++++ b/tools/testing/selftests/mount/Makefile +@@ -0,0 +1,17 @@ ++# Makefile for mount selftests. ++ ++all: unprivileged-remount-test ++ ++unprivileged-remount-test: unprivileged-remount-test.c ++ gcc -Wall -O2 unprivileged-remount-test.c -o unprivileged-remount-test ++ ++# Allow specific tests to be selected. ++test_unprivileged_remount: unprivileged-remount-test ++ @if [ -f /proc/self/uid_map ] ; then ./unprivileged-remount-test ; fi ++ ++run_tests: all test_unprivileged_remount ++ ++clean: ++ rm -f unprivileged-remount-test ++ ++.PHONY: all test_unprivileged_remount +diff --git a/tools/testing/selftests/mount/unprivileged-remount-test.c b/tools/testing/selftests/mount/unprivileged-remount-test.c +new file mode 100644 +index 000000000000..1b3ff2fda4d0 +--- /dev/null ++++ b/tools/testing/selftests/mount/unprivileged-remount-test.c +@@ -0,0 +1,242 @@ ++#define _GNU_SOURCE ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#ifndef CLONE_NEWNS ++# define CLONE_NEWNS 0x00020000 ++#endif ++#ifndef CLONE_NEWUTS ++# define CLONE_NEWUTS 0x04000000 ++#endif ++#ifndef CLONE_NEWIPC ++# define CLONE_NEWIPC 0x08000000 ++#endif ++#ifndef CLONE_NEWNET ++# define CLONE_NEWNET 0x40000000 ++#endif ++#ifndef CLONE_NEWUSER ++# define CLONE_NEWUSER 0x10000000 ++#endif ++#ifndef CLONE_NEWPID ++# define CLONE_NEWPID 0x20000000 ++#endif ++ ++#ifndef MS_RELATIME ++#define MS_RELATIME (1 << 21) ++#endif ++#ifndef MS_STRICTATIME ++#define MS_STRICTATIME (1 << 24) ++#endif ++ ++static void die(char *fmt, ...) ++{ ++ va_list ap; ++ va_start(ap, fmt); ++ vfprintf(stderr, fmt, ap); ++ va_end(ap); ++ exit(EXIT_FAILURE); ++} ++ ++static void write_file(char *filename, char *fmt, ...) ++{ ++ char buf[4096]; ++ int fd; ++ ssize_t written; ++ int buf_len; ++ va_list ap; ++ ++ va_start(ap, fmt); ++ buf_len = vsnprintf(buf, sizeof(buf), fmt, ap); ++ va_end(ap); ++ if (buf_len < 0) { ++ die("vsnprintf failed: %s\n", ++ strerror(errno)); ++ } ++ if (buf_len >= sizeof(buf)) { ++ die("vsnprintf output truncated\n"); ++ } ++ ++ fd = open(filename, O_WRONLY); ++ if (fd < 0) { ++ die("open of %s failed: %s\n", ++ filename, strerror(errno)); ++ } ++ written = write(fd, buf, buf_len); ++ if (written != buf_len) { ++ if (written >= 0) { ++ die("short write to %s\n", filename); ++ } else { ++ die("write to %s failed: %s\n", ++ filename, strerror(errno)); ++ } ++ } ++ if (close(fd) != 0) { ++ die("close of %s failed: %s\n", ++ filename, strerror(errno)); ++ } ++} ++ ++static void create_and_enter_userns(void) ++{ ++ uid_t uid; ++ gid_t gid; ++ ++ uid = getuid(); ++ gid = getgid(); ++ ++ if (unshare(CLONE_NEWUSER) !=0) { ++ die("unshare(CLONE_NEWUSER) failed: %s\n", ++ strerror(errno)); ++ } ++ ++ write_file("/proc/self/uid_map", "0 %d 1", uid); ++ write_file("/proc/self/gid_map", "0 %d 1", gid); ++ ++ if (setgroups(0, NULL) != 0) { ++ die("setgroups failed: %s\n", ++ strerror(errno)); ++ } ++ if (setgid(0) != 0) { ++ die ("setgid(0) failed %s\n", ++ strerror(errno)); ++ } ++ if (setuid(0) != 0) { ++ die("setuid(0) failed %s\n", ++ strerror(errno)); ++ } ++} ++ ++static ++bool test_unpriv_remount(int mount_flags, int remount_flags, int invalid_flags) ++{ ++ pid_t child; ++ ++ child = fork(); ++ if (child == -1) { ++ die("fork failed: %s\n", ++ strerror(errno)); ++ } ++ if (child != 0) { /* parent */ ++ pid_t pid; ++ int status; ++ pid = waitpid(child, &status, 0); ++ if (pid == -1) { ++ die("waitpid failed: %s\n", ++ strerror(errno)); ++ } ++ if (pid != child) { ++ die("waited for %d got %d\n", ++ child, pid); ++ } ++ if (!WIFEXITED(status)) { ++ die("child did not terminate cleanly\n"); ++ } ++ return WEXITSTATUS(status) == EXIT_SUCCESS ? true : false; ++ } ++ ++ create_and_enter_userns(); ++ if (unshare(CLONE_NEWNS) != 0) { ++ die("unshare(CLONE_NEWNS) failed: %s\n", ++ strerror(errno)); ++ } ++ ++ if (mount("testing", "/tmp", "ramfs", mount_flags, NULL) != 0) { ++ die("mount of /tmp failed: %s\n", ++ strerror(errno)); ++ } ++ ++ create_and_enter_userns(); ++ ++ if (unshare(CLONE_NEWNS) != 0) { ++ die("unshare(CLONE_NEWNS) failed: %s\n", ++ strerror(errno)); ++ } ++ ++ if (mount("/tmp", "/tmp", "none", ++ MS_REMOUNT | MS_BIND | remount_flags, NULL) != 0) { ++ /* system("cat /proc/self/mounts"); */ ++ die("remount of /tmp failed: %s\n", ++ strerror(errno)); ++ } ++ ++ if (mount("/tmp", "/tmp", "none", ++ MS_REMOUNT | MS_BIND | invalid_flags, NULL) == 0) { ++ /* system("cat /proc/self/mounts"); */ ++ die("remount of /tmp with invalid flags " ++ "succeeded unexpectedly\n"); ++ } ++ exit(EXIT_SUCCESS); ++} ++ ++static bool test_unpriv_remount_simple(int mount_flags) ++{ ++ return test_unpriv_remount(mount_flags, mount_flags, 0); ++} ++ ++static bool test_unpriv_remount_atime(int mount_flags, int invalid_flags) ++{ ++ return test_unpriv_remount(mount_flags, mount_flags, invalid_flags); ++} ++ ++int main(int argc, char **argv) ++{ ++ if (!test_unpriv_remount_simple(MS_RDONLY|MS_NODEV)) { ++ die("MS_RDONLY malfunctions\n"); ++ } ++ if (!test_unpriv_remount_simple(MS_NODEV)) { ++ die("MS_NODEV malfunctions\n"); ++ } ++ if (!test_unpriv_remount_simple(MS_NOSUID|MS_NODEV)) { ++ die("MS_NOSUID malfunctions\n"); ++ } ++ if (!test_unpriv_remount_simple(MS_NOEXEC|MS_NODEV)) { ++ die("MS_NOEXEC malfunctions\n"); ++ } ++ if (!test_unpriv_remount_atime(MS_RELATIME|MS_NODEV, ++ MS_NOATIME|MS_NODEV)) ++ { ++ die("MS_RELATIME malfunctions\n"); ++ } ++ if (!test_unpriv_remount_atime(MS_STRICTATIME|MS_NODEV, ++ MS_NOATIME|MS_NODEV)) ++ { ++ die("MS_STRICTATIME malfunctions\n"); ++ } ++ if (!test_unpriv_remount_atime(MS_NOATIME|MS_NODEV, ++ MS_STRICTATIME|MS_NODEV)) ++ { ++ die("MS_RELATIME malfunctions\n"); ++ } ++ if (!test_unpriv_remount_atime(MS_RELATIME|MS_NODIRATIME|MS_NODEV, ++ MS_NOATIME|MS_NODEV)) ++ { ++ die("MS_RELATIME malfunctions\n"); ++ } ++ if (!test_unpriv_remount_atime(MS_STRICTATIME|MS_NODIRATIME|MS_NODEV, ++ MS_NOATIME|MS_NODEV)) ++ { ++ die("MS_RELATIME malfunctions\n"); ++ } ++ if (!test_unpriv_remount_atime(MS_NOATIME|MS_NODIRATIME|MS_NODEV, ++ MS_STRICTATIME|MS_NODEV)) ++ { ++ die("MS_RELATIME malfunctions\n"); ++ } ++ if (!test_unpriv_remount(MS_STRICTATIME|MS_NODEV, MS_NODEV, ++ MS_NOATIME|MS_NODEV)) ++ { ++ die("Default atime malfunctions\n"); ++ } ++ return EXIT_SUCCESS; ++} +-- +2.0.4 + From c6806e8bc5897bc284a6a4a66a0397131cb5b17d Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 14 Aug 2014 15:20:12 +0200 Subject: [PATCH 38/45] Blacklist usb bulk streams on Etron EJ168 xhci controllers (rhbz#1121288) - UAS: Limit max number of requests over USB-2 to 32 (rhbz#1128472) --- ...epth-to-32-when-connected-over-usb-2.patch | 36 +++++++ ...sing-streams-on-the-Etron-EJ168-cont.patch | 100 ++++++++++++++++++ kernel.spec | 16 +++ 3 files changed, 152 insertions(+) create mode 100644 0001-uas-Limit-qdepth-to-32-when-connected-over-usb-2.patch create mode 100644 0001-xhci-Blacklist-using-streams-on-the-Etron-EJ168-cont.patch diff --git a/0001-uas-Limit-qdepth-to-32-when-connected-over-usb-2.patch b/0001-uas-Limit-qdepth-to-32-when-connected-over-usb-2.patch new file mode 100644 index 000000000..ec2af2ab2 --- /dev/null +++ b/0001-uas-Limit-qdepth-to-32-when-connected-over-usb-2.patch @@ -0,0 +1,36 @@ +From 86da2d12cf6f76b1fa487f7acf3995f058a2e516 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Fri, 1 Aug 2014 17:27:49 +0200 +Subject: [PATCH v2 1/2] uas: Limit qdepth to 32 when connected over usb-2 + +Some jmicron uas chipsets act up (they disconnect from the bus) when sending +more then 32 commands to them at once. + +Rather then building an ever growing list with usb-id based quirks for +devices using this chipset, simply reduce the qdepth to 32 when connected +over usb-2. 32 should be plenty to keep things close to maximum +possible throughput on usb-2. + +Cc: stable@vger.kernel.org +Tested-and-reported-by: Laszlo T. +Signed-off-by: Hans de Goede +--- + drivers/usb/storage/uas.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c +index 511b229..3f42785 100644 +--- a/drivers/usb/storage/uas.c ++++ b/drivers/usb/storage/uas.c +@@ -1026,7 +1026,7 @@ static int uas_configure_endpoints(struct uas_dev_info *devinfo) + usb_endpoint_num(&eps[3]->desc)); + + if (udev->speed != USB_SPEED_SUPER) { +- devinfo->qdepth = 256; ++ devinfo->qdepth = 32; + devinfo->use_streams = 0; + } else { + devinfo->qdepth = usb_alloc_streams(devinfo->intf, eps + 1, +-- +2.0.4 + diff --git a/0001-xhci-Blacklist-using-streams-on-the-Etron-EJ168-cont.patch b/0001-xhci-Blacklist-using-streams-on-the-Etron-EJ168-cont.patch new file mode 100644 index 000000000..1b6c45be0 --- /dev/null +++ b/0001-xhci-Blacklist-using-streams-on-the-Etron-EJ168-cont.patch @@ -0,0 +1,100 @@ +Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1121288 +Upstream-status: Send upstream for 3.16/3.17 with Cc: stable + +From 508b353921aa266c48f70e1cd9332d3e2ef67171 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Fri, 25 Jul 2014 12:28:02 +0200 +Subject: [PATCH v2] xhci: Blacklist using streams on the Etron EJ168 + controller + +Streams on the EJ168 do not work as they should. I've spend 2 days trying +to get them to work, but without success. + +The first problem is that when ever you ring the stream-ring doorbell, the +controller starts executing trbs at the beginning of the first ring segment, +event if it ended somewhere else previously. This can be worked around by +allowing enqueing only one td (not a problem with how streams are typically +used) and then resetting our copies of the enqueueing en dequeueing pointers +on a td completion to match what the controller seems to be doing. + +This way things seem to start working with uas and instead of being able +to complete only the very first scsi command, the scsi core can probe the disk. + +But then things break later on when td-s get enqueued with more then one +trb. The controller does seem to increase its dequeue pointer while executing +a stream-ring (data transfer events I inserted for debugging do trigger). +However execution seems to stop at the final normal trb of a multi trb td, +even if there is a data transfer event inserted after the final trb. + +The first problem alone is a serious deviation from the spec, and esp. +dealing with cancellation would have been very tricky if not outright +impossible, but the second problem simply is a deal breaker altogether, +so this patch simply disables streams. + +Note this will cause the usb-storage + uas driver pair to automatically switch +to using usb-storage instead of uas on these devices, essentially reverting +to the 3.14 and earlier behavior when uas was marked CONFIG_BROKEN. + +https://bugzilla.redhat.com/show_bug.cgi?id=1121288 +https://bugzilla.kernel.org/show_bug.cgi?id=80101 + +Cc: stable@vger.kernel.org # 3.15 +Signed-off-by: Hans de Goede +--- + drivers/usb/host/xhci-pci.c | 4 +++- + drivers/usb/host/xhci.c | 3 ++- + drivers/usb/host/xhci.h | 2 ++ + 3 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c +index e20520f..464049f 100644 +--- a/drivers/usb/host/xhci-pci.c ++++ b/drivers/usb/host/xhci-pci.c +@@ -143,6 +143,7 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) + pdev->device == PCI_DEVICE_ID_ASROCK_P67) { + xhci->quirks |= XHCI_RESET_ON_RESUME; + xhci->quirks |= XHCI_TRUST_TX_LENGTH; ++ xhci->quirks |= XHCI_BROKEN_STREAMS; + } + if (pdev->vendor == PCI_VENDOR_ID_RENESAS && + pdev->device == 0x0015) +@@ -230,7 +231,8 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) + goto put_usb3_hcd; + /* Roothub already marked as USB 3.0 speed */ + +- if (HCC_MAX_PSA(xhci->hcc_params) >= 4) ++ if (!(xhci->quirks & XHCI_BROKEN_STREAMS) && ++ HCC_MAX_PSA(xhci->hcc_params) >= 4) + xhci->shared_hcd->can_do_streams = 1; + + /* USB-2 and USB-3 roothubs initialized, allow runtime pm suspend */ +diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c +index 7d02e1b..758bc31 100644 +--- a/drivers/usb/host/xhci.c ++++ b/drivers/usb/host/xhci.c +@@ -3163,7 +3163,8 @@ int xhci_alloc_streams(struct usb_hcd *hcd, struct usb_device *udev, + num_streams); + + /* MaxPSASize value 0 (2 streams) means streams are not supported */ +- if (HCC_MAX_PSA(xhci->hcc_params) < 4) { ++ if ((xhci->quirks & XHCI_BROKEN_STREAMS) || ++ HCC_MAX_PSA(xhci->hcc_params) < 4) { + xhci_dbg(xhci, "xHCI controller does not support streams.\n"); + return -ENOSYS; + } +diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h +index 1411069..88b2958 100644 +--- a/drivers/usb/host/xhci.h ++++ b/drivers/usb/host/xhci.h +@@ -1558,6 +1558,8 @@ struct xhci_hcd { + #define XHCI_PLAT (1 << 16) + #define XHCI_SLOW_SUSPEND (1 << 17) + #define XHCI_SPURIOUS_WAKEUP (1 << 18) ++/* For controllers with a broken beyond repair streams implementation */ ++#define XHCI_BROKEN_STREAMS (1 << 19) + unsigned int num_active_eps; + unsigned int limit_active_eps; + /* There are two roothubs to keep track of bus suspend info for */ +-- +2.0.4 + diff --git a/kernel.spec b/kernel.spec index a24fe3abd..b3752ae43 100644 --- a/kernel.spec +++ b/kernel.spec @@ -646,6 +646,12 @@ Patch25118: sched-fix-sched_setparam-policy-1-logic.patch #CVE-2014-{5206,5207} rhbz 1129662 1129669 Patch25119: namespaces-remount-fixes.patch +#rhbz 1121288 +Patch25120: 0001-xhci-Blacklist-using-streams-on-the-Etron-EJ168-cont.patch + +#rhbz 1128472 +Patch25121: 0001-uas-Limit-qdepth-to-32-when-connected-over-usb-2.patch + # git clone ssh://git.fedorahosted.org/git/kernel-arm64.git, git diff master...devel Patch30000: kernel-arm64.patch @@ -1377,6 +1383,12 @@ ApplyPatch sched-fix-sched_setparam-policy-1-logic.patch #CVE-2014-{5206,5207} rhbz 1129662 1129669 ApplyPatch namespaces-remount-fixes.patch +#rhbz 1121288 +ApplyPatch 0001-xhci-Blacklist-using-streams-on-the-Etron-EJ168-cont.patch + +#rhbz 1128472 +ApplyPatch 0001-uas-Limit-qdepth-to-32-when-connected-over-usb-2.patch + %if 0%{?aarch64patches} ApplyPatch kernel-arm64.patch %ifnarch aarch64 # this is stupid, but i want to notice before secondary koji does. @@ -2259,6 +2271,10 @@ fi # ||----w | # || || %changelog +* Thu Aug 14 2014 Hans de Goede +- Blacklist usb bulk streams on Etron EJ168 xhci controllers (rhbz#1121288) +- UAS: Limit max number of requests over USB-2 to 32 (rhbz#1128472) + * Wed Aug 13 2014 Josh Boyer - CVE-2014-{5206,5207} ro bind mount bypass with namespaces (rhbz 1129662 1129669) From 1c39e37061f04669a015414f247658ef94ea3294 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Thu, 14 Aug 2014 10:45:17 -0400 Subject: [PATCH 39/45] Linux v3.16.1 --- kernel.spec | 5 ++++- sources | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel.spec b/kernel.spec index b3752ae43..55b89ae9c 100644 --- a/kernel.spec +++ b/kernel.spec @@ -54,7 +54,7 @@ Summary: The Linux kernel %if 0%{?released_kernel} # Do we have a -stable update to apply? -%define stable_update 0 +%define stable_update 1 # Set rpm version accordingly %if 0%{?stable_update} %define stablerev %{stable_update} @@ -2271,6 +2271,9 @@ fi # ||----w | # || || %changelog +* Thu Aug 14 2014 Josh Boyer - 3.16.1-300 +- Linux v3.16.1 + * Thu Aug 14 2014 Hans de Goede - Blacklist usb bulk streams on Etron EJ168 xhci controllers (rhbz#1121288) - UAS: Limit max number of requests over USB-2 to 32 (rhbz#1128472) diff --git a/sources b/sources index 8606810b0..0dc4b028c 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ 5c569ed649a0c9711879f333e90c5386 linux-3.16.tar.xz 49868ce6467b35cd9ffea1120d129462 perf-man-3.16.tar.gz +9da4b0f5e343455b8141bcfa47e88cf5 patch-3.16.1.xz From d7bf642034feea8c0ffd39f550b479b5a99140cb Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Fri, 15 Aug 2014 13:26:22 +0100 Subject: [PATCH 40/45] - ARM updates for 3.16 - Cleanup some old removed options - Disable legacy USB OTG (using new configfs equivilents) - Upstream patch to fix display on qemu (VExpress A9) --- arm-qemu-fixdisplay.patch | 472 ++++++++++++++++++++++++++++++++++++++ config-arm-generic | 22 +- config-armv7 | 40 ++-- config-armv7-generic | 22 +- config-generic | 2 - kernel.spec | 8 + 6 files changed, 516 insertions(+), 50 deletions(-) create mode 100644 arm-qemu-fixdisplay.patch diff --git a/arm-qemu-fixdisplay.patch b/arm-qemu-fixdisplay.patch new file mode 100644 index 000000000..090193c2d --- /dev/null +++ b/arm-qemu-fixdisplay.patch @@ -0,0 +1,472 @@ +commit d10715be03bd8bad59ddc50236cb140c3bd73c7b +Author: Pawel Moll +Date: Tue Jun 24 12:55:11 2014 +0100 + + video: ARM CLCD: Add DT support + + This patch adds basic DT bindings for the PL11x CLCD cells + and make their fbdev driver use them. + + Signed-off-by: Pawel Moll + Signed-off-by: Tomi Valkeinen + +diff --git a/Documentation/devicetree/bindings/video/arm,pl11x.txt b/Documentation/devicetree/bindings/video/arm,pl11x.txt +new file mode 100644 +index 0000000..3e3039a +--- /dev/null ++++ b/Documentation/devicetree/bindings/video/arm,pl11x.txt +@@ -0,0 +1,109 @@ ++* ARM PrimeCell Color LCD Controller PL110/PL111 ++ ++See also Documentation/devicetree/bindings/arm/primecell.txt ++ ++Required properties: ++ ++- compatible: must be one of: ++ "arm,pl110", "arm,primecell" ++ "arm,pl111", "arm,primecell" ++ ++- reg: base address and size of the control registers block ++ ++- interrupt-names: either the single entry "combined" representing a ++ combined interrupt output (CLCDINTR), or the four entries ++ "mbe", "vcomp", "lnbu", "fuf" representing the individual ++ CLCDMBEINTR, CLCDVCOMPINTR, CLCDLNBUINTR, CLCDFUFINTR interrupts ++ ++- interrupts: contains an interrupt specifier for each entry in ++ interrupt-names ++ ++- clock-names: should contain "clcdclk" and "apb_pclk" ++ ++- clocks: contains phandle and clock specifier pairs for the entries ++ in the clock-names property. See ++ Documentation/devicetree/binding/clock/clock-bindings.txt ++ ++Optional properties: ++ ++- memory-region: phandle to a node describing memory (see ++ Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt) ++ to be used for the framebuffer; if not present, the framebuffer ++ may be located anywhere in the memory ++ ++- max-memory-bandwidth: maximum bandwidth in bytes per second that the ++ cell's memory interface can handle; if not present, the memory ++ interface is fast enough to handle all possible video modes ++ ++Required sub-nodes: ++ ++- port: describes LCD panel signals, following the common binding ++ for video transmitter interfaces; see ++ Documentation/devicetree/bindings/media/video-interfaces.txt; ++ when it is a TFT panel, the port's endpoint must define the ++ following property: ++ ++ - arm,pl11x,tft-r0g0b0-pads: an array of three 32-bit values, ++ defining the way CLD pads are wired up; first value ++ contains index of the "CLD" external pin (pad) used ++ as R0 (first bit of the red component), second value ++ index of the pad used as G0, third value index of the ++ pad used as B0, see also "LCD panel signal multiplexing ++ details" paragraphs in the PL110/PL111 Technical ++ Reference Manuals; this implicitly defines available ++ color modes, for example: ++ - PL111 TFT 4:4:4 panel: ++ arm,pl11x,tft-r0g0b0-pads = <4 15 20>; ++ - PL110 TFT (1:)5:5:5 panel: ++ arm,pl11x,tft-r0g0b0-pads = <1 7 13>; ++ - PL111 TFT (1:)5:5:5 panel: ++ arm,pl11x,tft-r0g0b0-pads = <3 11 19>; ++ - PL111 TFT 5:6:5 panel: ++ arm,pl11x,tft-r0g0b0-pads = <3 10 19>; ++ - PL110 and PL111 TFT 8:8:8 panel: ++ arm,pl11x,tft-r0g0b0-pads = <0 8 16>; ++ - PL110 and PL111 TFT 8:8:8 panel, R & B components swapped: ++ arm,pl11x,tft-r0g0b0-pads = <16 8 0>; ++ ++ ++Example: ++ ++ clcd@10020000 { ++ compatible = "arm,pl111", "arm,primecell"; ++ reg = <0x10020000 0x1000>; ++ interrupt-names = "combined"; ++ interrupts = <0 44 4>; ++ clocks = <&oscclk1>, <&oscclk2>; ++ clock-names = "clcdclk", "apb_pclk"; ++ max-memory-bandwidth = <94371840>; /* Bps, 1024x768@60 16bpp */ ++ ++ port { ++ clcd_pads: endpoint { ++ remote-endpoint = <&clcd_panel>; ++ arm,pl11x,tft-r0g0b0-pads = <0 8 16>; ++ }; ++ }; ++ ++ }; ++ ++ panel { ++ compatible = "panel-dpi"; ++ ++ port { ++ clcd_panel: endpoint { ++ remote-endpoint = <&clcd_pads>; ++ }; ++ }; ++ ++ panel-timing { ++ clock-frequency = <25175000>; ++ hactive = <640>; ++ hback-porch = <40>; ++ hfront-porch = <24>; ++ hsync-len = <96>; ++ vactive = <480>; ++ vback-porch = <32>; ++ vfront-porch = <11>; ++ vsync-len = <2>; ++ }; ++ }; +diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig +index 4a7098f..6f451ad 100644 +--- a/drivers/video/fbdev/Kconfig ++++ b/drivers/video/fbdev/Kconfig +@@ -280,6 +280,7 @@ config FB_ARMCLCD + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT ++ select VIDEOMODE_HELPERS if OF + help + This framebuffer device driver is for the ARM PrimeCell PL110 + Colour LCD controller. ARM PrimeCells provide the building +diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c +index 14d6b37..23b3519 100644 +--- a/drivers/video/fbdev/amba-clcd.c ++++ b/drivers/video/fbdev/amba-clcd.c +@@ -26,6 +26,13 @@ + #include + #include + #include ++#include ++#include ++#include ++#include ++#include