From: Greg Kroah-Hartman Date: Thu, 13 Feb 2020 04:09:22 +0000 (-0800) Subject: 5.4-stable patches X-Git-Tag: v4.4.214~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=929ab4fa04c7999005749d09d4d476c3450bab12;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: arc-add-missing-multicast-filter-number-to-gmac-node.patch arm-dts-am43xx-add-support-for-clkout1-clock.patch arm-dts-at91-reenable-uart-tx-pull-ups.patch arm-dts-at91-sama5d3-define-clock-rate-range-for-tcb1.patch arm-dts-at91-sama5d3-fix-maximum-peripheral-clock-rates.patch arm-dts-meson8-use-the-actual-frequency-for-the-gpu-s-182.1mhz-opp.patch arm-dts-meson8b-use-the-actual-frequency-for-the-gpu-s-364mhz-opp.patch arm64-dts-marvell-clearfog-gt-8k-fix-switch-cpu-port-node.patch arm64-dts-qcom-msm8998-fix-tcsr-syscon-size.patch arm64-dts-qcom-msm8998-mtp-add-alias-for-blsp1_uart3.patch arm64-dts-renesas-r8a77990-ebisu-remove-clkout-lr-synchronous-from-sound.patch arm64-dts-udpu-fix-broken-ethernet.patch bpf-improve-bucket_log-calculation-logic.patch bpf-sockhash-synchronize_rcu-before-free-ing-map.patch bpf-sockmap-check-update-requirements-after-locking.patch bpf-sockmap-don-t-sleep-while-holding-rcu-lock-on-tear-down.patch bpftool-don-t-crash-on-missing-xlated-program-instructions.patch platform-x86-intel_mid_powerbtn-take-a-copy-of-ddata.patch powerpc-papr_scm-fix-leaking-bus_desc.provider_name-in-some-paths.patch powerpc-pseries-allow-not-having-ibm-hypertas-functions-hcall-multi-tce-for-ddw.patch powerpc-pseries-vio-fix-iommu_table-use-after-free-refcount-warning.patch powerpc-ptdump-fix-w-x-verification-call-in-mark_rodata_ro.patch powerpc-ptdump-only-enable-ppc_check_wx-with-strict_kernel_rwx.patch revert-powerpc-pseries-iommu-don-t-use-dma_iommu_ops-on-secure-guests.patch rtc-cmos-stop-using-shared-irq.patch rtc-hym8563-return-einval-if-the-time-is-known-to-be-invalid.patch rtc-i2c-spi-avoid-inclusion-of-regmap-support-when-not-needed.patch selftests-bpf-test-freeing-sockmap-sockhash-with-a-socket-in-it.patch soc-qcom-rpmhpd-set-active_only-for-active-only-power-domains.patch tools-power-acpi-fix-compilation-error.patch watchdog-qcom-use-platform_get_irq_optional-for-bark-irq.patch --- diff --git a/queue-5.4/arc-add-missing-multicast-filter-number-to-gmac-node.patch b/queue-5.4/arc-add-missing-multicast-filter-number-to-gmac-node.patch new file mode 100644 index 00000000000..13f92d410e8 --- /dev/null +++ b/queue-5.4/arc-add-missing-multicast-filter-number-to-gmac-node.patch @@ -0,0 +1,32 @@ +From 7980dff398f86a618f502378fa27cf7e77449afa Mon Sep 17 00:00:00 2001 +From: Jose Abreu +Date: Tue, 14 Jan 2020 17:09:24 +0100 +Subject: ARC: [plat-axs10x]: Add missing multicast filter number to GMAC node + +From: Jose Abreu + +commit 7980dff398f86a618f502378fa27cf7e77449afa upstream. + +Add a missing property to GMAC node so that multicast filtering works +correctly. + +Fixes: 556cc1c5f528 ("ARC: [axs101] Add support for AXS101 SDP (software development platform)") +Acked-by: Alexey Brodkin +Signed-off-by: Jose Abreu +Signed-off-by: Vineet Gupta +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arc/boot/dts/axs10x_mb.dtsi | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/arc/boot/dts/axs10x_mb.dtsi ++++ b/arch/arc/boot/dts/axs10x_mb.dtsi +@@ -77,6 +77,7 @@ + interrupt-names = "macirq"; + phy-mode = "rgmii"; + snps,pbl = < 32 >; ++ snps,multicast-filter-bins = <256>; + clocks = <&apbclk>; + clock-names = "stmmaceth"; + max-speed = <100>; diff --git a/queue-5.4/arm-dts-am43xx-add-support-for-clkout1-clock.patch b/queue-5.4/arm-dts-am43xx-add-support-for-clkout1-clock.patch new file mode 100644 index 00000000000..a976cda3fd6 --- /dev/null +++ b/queue-5.4/arm-dts-am43xx-add-support-for-clkout1-clock.patch @@ -0,0 +1,97 @@ +From 01053dadb79d63b65f7b353e68b4b6ccf4effedb Mon Sep 17 00:00:00 2001 +From: Tero Kristo +Date: Wed, 11 Dec 2019 08:07:18 -0600 +Subject: ARM: dts: am43xx: add support for clkout1 clock + +From: Tero Kristo + +commit 01053dadb79d63b65f7b353e68b4b6ccf4effedb upstream. + +clkout1 clock node and its generation tree was missing. Add this based +on the data on TRM and PRCM functional spec. + +commit 664ae1ab2536 ("ARM: dts: am43xx: add clkctrl nodes") effectively +reverted this commit 8010f13a40d3 ("ARM: dts: am43xx: add support for +clkout1 clock") which is needed for the ov2659 camera sensor clock +definition hence it is being re-applied here. + +Note that because of the current dts node name dependency for mapping to +clock domain, we must still use "clkout1-*ck" naming instead of generic +"clock@" naming for the node. And because of this, it's probably best to +apply the dts node addition together along with the other clock changes. + +Fixes: 664ae1ab2536 ("ARM: dts: am43xx: add clkctrl nodes") +Signed-off-by: Tero Kristo +Tested-by: Benoit Parrot +Acked-by: Tony Lindgren +Signed-off-by: Benoit Parrot +Signed-off-by: Tony Lindgren +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/am43xx-clocks.dtsi | 54 +++++++++++++++++++++++++++++++++++ + 1 file changed, 54 insertions(+) + +--- a/arch/arm/boot/dts/am43xx-clocks.dtsi ++++ b/arch/arm/boot/dts/am43xx-clocks.dtsi +@@ -704,6 +704,60 @@ + ti,bit-shift = <8>; + reg = <0x2a48>; + }; ++ ++ clkout1_osc_div_ck: clkout1-osc-div-ck { ++ #clock-cells = <0>; ++ compatible = "ti,divider-clock"; ++ clocks = <&sys_clkin_ck>; ++ ti,bit-shift = <20>; ++ ti,max-div = <4>; ++ reg = <0x4100>; ++ }; ++ ++ clkout1_src2_mux_ck: clkout1-src2-mux-ck { ++ #clock-cells = <0>; ++ compatible = "ti,mux-clock"; ++ clocks = <&clk_rc32k_ck>, <&sysclk_div>, <&dpll_ddr_m2_ck>, ++ <&dpll_per_m2_ck>, <&dpll_disp_m2_ck>, ++ <&dpll_mpu_m2_ck>; ++ reg = <0x4100>; ++ }; ++ ++ clkout1_src2_pre_div_ck: clkout1-src2-pre-div-ck { ++ #clock-cells = <0>; ++ compatible = "ti,divider-clock"; ++ clocks = <&clkout1_src2_mux_ck>; ++ ti,bit-shift = <4>; ++ ti,max-div = <8>; ++ reg = <0x4100>; ++ }; ++ ++ clkout1_src2_post_div_ck: clkout1-src2-post-div-ck { ++ #clock-cells = <0>; ++ compatible = "ti,divider-clock"; ++ clocks = <&clkout1_src2_pre_div_ck>; ++ ti,bit-shift = <8>; ++ ti,max-div = <32>; ++ ti,index-power-of-two; ++ reg = <0x4100>; ++ }; ++ ++ clkout1_mux_ck: clkout1-mux-ck { ++ #clock-cells = <0>; ++ compatible = "ti,mux-clock"; ++ clocks = <&clkout1_osc_div_ck>, <&clk_rc32k_ck>, ++ <&clkout1_src2_post_div_ck>, <&dpll_extdev_m2_ck>; ++ ti,bit-shift = <16>; ++ reg = <0x4100>; ++ }; ++ ++ clkout1_ck: clkout1-ck { ++ #clock-cells = <0>; ++ compatible = "ti,gate-clock"; ++ clocks = <&clkout1_mux_ck>; ++ ti,bit-shift = <23>; ++ reg = <0x4100>; ++ }; + }; + + &prcm { diff --git a/queue-5.4/arm-dts-at91-reenable-uart-tx-pull-ups.patch b/queue-5.4/arm-dts-at91-reenable-uart-tx-pull-ups.patch new file mode 100644 index 00000000000..812613d6408 --- /dev/null +++ b/queue-5.4/arm-dts-at91-reenable-uart-tx-pull-ups.patch @@ -0,0 +1,224 @@ +From 9d39d86cd4af2b17b970d63307daad71f563d207 Mon Sep 17 00:00:00 2001 +From: Ingo van Lil +Date: Tue, 3 Dec 2019 15:21:47 +0100 +Subject: ARM: dts: at91: Reenable UART TX pull-ups + +From: Ingo van Lil + +commit 9d39d86cd4af2b17b970d63307daad71f563d207 upstream. + +Pull-ups for SAM9 UART/USART TX lines were disabled in a previous +commit. However, several chips in the SAM9 family require pull-ups to +prevent the TX lines from falling (and causing an endless break +condition) when the transceiver is disabled. + +From the SAM9G20 datasheet, 32.5.1: "To prevent the TXD line from +falling when the USART is disabled, the use of an internal pull up +is mandatory.". This commit reenables the pull-ups for all chips having +that sentence in their datasheets. + +Fixes: 5e04822f7db5 ("ARM: dts: at91: fixes uart pinctrl, set pullup on rx, clear pullup on tx") +Signed-off-by: Ingo van Lil +Cc: Peter Rosin +Link: https://lore.kernel.org/r/20191203142147.875227-1-inguin@gmx.de +Signed-off-by: Alexandre Belloni +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/at91sam9260.dtsi | 12 ++++++------ + arch/arm/boot/dts/at91sam9261.dtsi | 6 +++--- + arch/arm/boot/dts/at91sam9263.dtsi | 6 +++--- + arch/arm/boot/dts/at91sam9g45.dtsi | 8 ++++---- + arch/arm/boot/dts/at91sam9rl.dtsi | 8 ++++---- + 5 files changed, 20 insertions(+), 20 deletions(-) + +--- a/arch/arm/boot/dts/at91sam9260.dtsi ++++ b/arch/arm/boot/dts/at91sam9260.dtsi +@@ -187,7 +187,7 @@ + usart0 { + pinctrl_usart0: usart0-0 { + atmel,pins = +- ; + }; + +@@ -221,7 +221,7 @@ + usart1 { + pinctrl_usart1: usart1-0 { + atmel,pins = +- ; + }; + +@@ -239,7 +239,7 @@ + usart2 { + pinctrl_usart2: usart2-0 { + atmel,pins = +- ; + }; + +@@ -257,7 +257,7 @@ + usart3 { + pinctrl_usart3: usart3-0 { + atmel,pins = +- ; + }; + +@@ -275,7 +275,7 @@ + uart0 { + pinctrl_uart0: uart0-0 { + atmel,pins = +- ; + }; + }; +@@ -283,7 +283,7 @@ + uart1 { + pinctrl_uart1: uart1-0 { + atmel,pins = +- ; + }; + }; +--- a/arch/arm/boot/dts/at91sam9261.dtsi ++++ b/arch/arm/boot/dts/at91sam9261.dtsi +@@ -329,7 +329,7 @@ + usart0 { + pinctrl_usart0: usart0-0 { + atmel,pins = +- , ++ , + ; + }; + +@@ -347,7 +347,7 @@ + usart1 { + pinctrl_usart1: usart1-0 { + atmel,pins = +- , ++ , + ; + }; + +@@ -365,7 +365,7 @@ + usart2 { + pinctrl_usart2: usart2-0 { + atmel,pins = +- , ++ , + ; + }; + +--- a/arch/arm/boot/dts/at91sam9263.dtsi ++++ b/arch/arm/boot/dts/at91sam9263.dtsi +@@ -183,7 +183,7 @@ + usart0 { + pinctrl_usart0: usart0-0 { + atmel,pins = +- ; + }; + +@@ -201,7 +201,7 @@ + usart1 { + pinctrl_usart1: usart1-0 { + atmel,pins = +- ; + }; + +@@ -219,7 +219,7 @@ + usart2 { + pinctrl_usart2: usart2-0 { + atmel,pins = +- ; + }; + +--- a/arch/arm/boot/dts/at91sam9g45.dtsi ++++ b/arch/arm/boot/dts/at91sam9g45.dtsi +@@ -556,7 +556,7 @@ + usart0 { + pinctrl_usart0: usart0-0 { + atmel,pins = +- ; + }; + +@@ -574,7 +574,7 @@ + usart1 { + pinctrl_usart1: usart1-0 { + atmel,pins = +- ; + }; + +@@ -592,7 +592,7 @@ + usart2 { + pinctrl_usart2: usart2-0 { + atmel,pins = +- ; + }; + +@@ -610,7 +610,7 @@ + usart3 { + pinctrl_usart3: usart3-0 { + atmel,pins = +- ; + }; + +--- a/arch/arm/boot/dts/at91sam9rl.dtsi ++++ b/arch/arm/boot/dts/at91sam9rl.dtsi +@@ -682,7 +682,7 @@ + usart0 { + pinctrl_usart0: usart0-0 { + atmel,pins = +- , ++ , + ; + }; + +@@ -721,7 +721,7 @@ + usart1 { + pinctrl_usart1: usart1-0 { + atmel,pins = +- , ++ , + ; + }; + +@@ -744,7 +744,7 @@ + usart2 { + pinctrl_usart2: usart2-0 { + atmel,pins = +- , ++ , + ; + }; + +@@ -767,7 +767,7 @@ + usart3 { + pinctrl_usart3: usart3-0 { + atmel,pins = +- , ++ , + ; + }; + diff --git a/queue-5.4/arm-dts-at91-sama5d3-define-clock-rate-range-for-tcb1.patch b/queue-5.4/arm-dts-at91-sama5d3-define-clock-rate-range-for-tcb1.patch new file mode 100644 index 00000000000..2726a707c1c --- /dev/null +++ b/queue-5.4/arm-dts-at91-sama5d3-define-clock-rate-range-for-tcb1.patch @@ -0,0 +1,35 @@ +From a7e0f3fc01df4b1b7077df777c37feae8c9e8b6d Mon Sep 17 00:00:00 2001 +From: Alexandre Belloni +Date: Fri, 10 Jan 2020 18:20:07 +0100 +Subject: ARM: dts: at91: sama5d3: define clock rate range for tcb1 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Alexandre Belloni + +commit a7e0f3fc01df4b1b7077df777c37feae8c9e8b6d upstream. + +The clock rate range for the TCB1 clock is missing. define it in the device +tree. + +Reported-by: Karl Rudbæk Olsen +Fixes: d2e8190b7916 ("ARM: at91/dt: define sama5d3 clocks") +Link: https://lore.kernel.org/r/20200110172007.1253659-2-alexandre.belloni@bootlin.com +Signed-off-by: Alexandre Belloni +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/sama5d3_tcb1.dtsi | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/arm/boot/dts/sama5d3_tcb1.dtsi ++++ b/arch/arm/boot/dts/sama5d3_tcb1.dtsi +@@ -22,6 +22,7 @@ + tcb1_clk: tcb1_clk { + #clock-cells = <0>; + reg = <27>; ++ atmel,clk-output-range = <0 166000000>; + }; + }; + }; diff --git a/queue-5.4/arm-dts-at91-sama5d3-fix-maximum-peripheral-clock-rates.patch b/queue-5.4/arm-dts-at91-sama5d3-fix-maximum-peripheral-clock-rates.patch new file mode 100644 index 00000000000..b7db0871924 --- /dev/null +++ b/queue-5.4/arm-dts-at91-sama5d3-fix-maximum-peripheral-clock-rates.patch @@ -0,0 +1,173 @@ +From ee0aa926ddb0bd8ba59e33e3803b3b5804e3f5da Mon Sep 17 00:00:00 2001 +From: Alexandre Belloni +Date: Fri, 10 Jan 2020 18:20:06 +0100 +Subject: ARM: dts: at91: sama5d3: fix maximum peripheral clock rates +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Alexandre Belloni + +commit ee0aa926ddb0bd8ba59e33e3803b3b5804e3f5da upstream. + +Currently the maximum rate for peripheral clock is calculated based on a +typical 133MHz MCK. The maximum frequency is defined in the datasheet as a +ratio to MCK. Some sama5d3 platforms are using a 166MHz MCK. Update the +device trees to match the maximum rate based on 166MHz. + +Reported-by: Karl Rudbæk Olsen +Fixes: d2e8190b7916 ("ARM: at91/dt: define sama5d3 clocks") +Link: https://lore.kernel.org/r/20200110172007.1253659-1-alexandre.belloni@bootlin.com +Signed-off-by: Alexandre Belloni +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/sama5d3.dtsi | 28 ++++++++++++++-------------- + arch/arm/boot/dts/sama5d3_can.dtsi | 4 ++-- + arch/arm/boot/dts/sama5d3_uart.dtsi | 4 ++-- + 3 files changed, 18 insertions(+), 18 deletions(-) + +--- a/arch/arm/boot/dts/sama5d3.dtsi ++++ b/arch/arm/boot/dts/sama5d3.dtsi +@@ -1188,49 +1188,49 @@ + usart0_clk: usart0_clk { + #clock-cells = <0>; + reg = <12>; +- atmel,clk-output-range = <0 66000000>; ++ atmel,clk-output-range = <0 83000000>; + }; + + usart1_clk: usart1_clk { + #clock-cells = <0>; + reg = <13>; +- atmel,clk-output-range = <0 66000000>; ++ atmel,clk-output-range = <0 83000000>; + }; + + usart2_clk: usart2_clk { + #clock-cells = <0>; + reg = <14>; +- atmel,clk-output-range = <0 66000000>; ++ atmel,clk-output-range = <0 83000000>; + }; + + usart3_clk: usart3_clk { + #clock-cells = <0>; + reg = <15>; +- atmel,clk-output-range = <0 66000000>; ++ atmel,clk-output-range = <0 83000000>; + }; + + uart0_clk: uart0_clk { + #clock-cells = <0>; + reg = <16>; +- atmel,clk-output-range = <0 66000000>; ++ atmel,clk-output-range = <0 83000000>; + }; + + twi0_clk: twi0_clk { + reg = <18>; + #clock-cells = <0>; +- atmel,clk-output-range = <0 16625000>; ++ atmel,clk-output-range = <0 41500000>; + }; + + twi1_clk: twi1_clk { + #clock-cells = <0>; + reg = <19>; +- atmel,clk-output-range = <0 16625000>; ++ atmel,clk-output-range = <0 41500000>; + }; + + twi2_clk: twi2_clk { + #clock-cells = <0>; + reg = <20>; +- atmel,clk-output-range = <0 16625000>; ++ atmel,clk-output-range = <0 41500000>; + }; + + mci0_clk: mci0_clk { +@@ -1246,19 +1246,19 @@ + spi0_clk: spi0_clk { + #clock-cells = <0>; + reg = <24>; +- atmel,clk-output-range = <0 133000000>; ++ atmel,clk-output-range = <0 166000000>; + }; + + spi1_clk: spi1_clk { + #clock-cells = <0>; + reg = <25>; +- atmel,clk-output-range = <0 133000000>; ++ atmel,clk-output-range = <0 166000000>; + }; + + tcb0_clk: tcb0_clk { + #clock-cells = <0>; + reg = <26>; +- atmel,clk-output-range = <0 133000000>; ++ atmel,clk-output-range = <0 166000000>; + }; + + pwm_clk: pwm_clk { +@@ -1269,7 +1269,7 @@ + adc_clk: adc_clk { + #clock-cells = <0>; + reg = <29>; +- atmel,clk-output-range = <0 66000000>; ++ atmel,clk-output-range = <0 83000000>; + }; + + dma0_clk: dma0_clk { +@@ -1300,13 +1300,13 @@ + ssc0_clk: ssc0_clk { + #clock-cells = <0>; + reg = <38>; +- atmel,clk-output-range = <0 66000000>; ++ atmel,clk-output-range = <0 83000000>; + }; + + ssc1_clk: ssc1_clk { + #clock-cells = <0>; + reg = <39>; +- atmel,clk-output-range = <0 66000000>; ++ atmel,clk-output-range = <0 83000000>; + }; + + sha_clk: sha_clk { +--- a/arch/arm/boot/dts/sama5d3_can.dtsi ++++ b/arch/arm/boot/dts/sama5d3_can.dtsi +@@ -36,13 +36,13 @@ + can0_clk: can0_clk { + #clock-cells = <0>; + reg = <40>; +- atmel,clk-output-range = <0 66000000>; ++ atmel,clk-output-range = <0 83000000>; + }; + + can1_clk: can1_clk { + #clock-cells = <0>; + reg = <41>; +- atmel,clk-output-range = <0 66000000>; ++ atmel,clk-output-range = <0 83000000>; + }; + }; + }; +--- a/arch/arm/boot/dts/sama5d3_uart.dtsi ++++ b/arch/arm/boot/dts/sama5d3_uart.dtsi +@@ -41,13 +41,13 @@ + uart0_clk: uart0_clk { + #clock-cells = <0>; + reg = <16>; +- atmel,clk-output-range = <0 66000000>; ++ atmel,clk-output-range = <0 83000000>; + }; + + uart1_clk: uart1_clk { + #clock-cells = <0>; + reg = <17>; +- atmel,clk-output-range = <0 66000000>; ++ atmel,clk-output-range = <0 83000000>; + }; + }; + }; diff --git a/queue-5.4/arm-dts-meson8-use-the-actual-frequency-for-the-gpu-s-182.1mhz-opp.patch b/queue-5.4/arm-dts-meson8-use-the-actual-frequency-for-the-gpu-s-182.1mhz-opp.patch new file mode 100644 index 00000000000..64bea70b62c --- /dev/null +++ b/queue-5.4/arm-dts-meson8-use-the-actual-frequency-for-the-gpu-s-182.1mhz-opp.patch @@ -0,0 +1,38 @@ +From fe634a7a9a57fb736e39fb71aa9adc6448a90f94 Mon Sep 17 00:00:00 2001 +From: Martin Blumenstingl +Date: Wed, 25 Dec 2019 02:06:06 +0100 +Subject: ARM: dts: meson8: use the actual frequency for the GPU's 182.1MHz OPP + +From: Martin Blumenstingl + +commit fe634a7a9a57fb736e39fb71aa9adc6448a90f94 upstream. + +The clock setup on Meson8 cannot achieve a Mali frequency of exactly +182.15MHz. The vendor driver uses "FCLK_DIV7 / 2" for this frequency, +which translates to 2550MHz / 7 / 2 = 182142857Hz. +Update the GPU operating point to that specific frequency to not confuse +myself when comparing the frequency from the .dts with the actual clock +rate on the system. + +Fixes: 7d3f6b536e72c9 ("ARM: dts: meson8: add the Mali-450 MP6 GPU") +Signed-off-by: Martin Blumenstingl +Signed-off-by: Kevin Hilman +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/meson8.dtsi | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/arm/boot/dts/meson8.dtsi ++++ b/arch/arm/boot/dts/meson8.dtsi +@@ -129,8 +129,8 @@ + gpu_opp_table: gpu-opp-table { + compatible = "operating-points-v2"; + +- opp-182150000 { +- opp-hz = /bits/ 64 <182150000>; ++ opp-182142857 { ++ opp-hz = /bits/ 64 <182142857>; + opp-microvolt = <1150000>; + }; + opp-318750000 { diff --git a/queue-5.4/arm-dts-meson8b-use-the-actual-frequency-for-the-gpu-s-364mhz-opp.patch b/queue-5.4/arm-dts-meson8b-use-the-actual-frequency-for-the-gpu-s-364mhz-opp.patch new file mode 100644 index 00000000000..dc4f743dec1 --- /dev/null +++ b/queue-5.4/arm-dts-meson8b-use-the-actual-frequency-for-the-gpu-s-364mhz-opp.patch @@ -0,0 +1,38 @@ +From c3dd3315ab58b2cfa1916df55b0d0f9fbd94266f Mon Sep 17 00:00:00 2001 +From: Martin Blumenstingl +Date: Wed, 25 Dec 2019 02:06:07 +0100 +Subject: ARM: dts: meson8b: use the actual frequency for the GPU's 364MHz OPP + +From: Martin Blumenstingl + +commit c3dd3315ab58b2cfa1916df55b0d0f9fbd94266f upstream. + +The clock setup on Meson8 cannot achieve a Mali frequency of exactly +182.15MHz. The vendor driver uses "FCLK_DIV7 / 1" for this frequency, +which translates to 2550MHz / 7 / 1 = 364285714Hz. +Update the GPU operating point to that specific frequency to not confuse +myself when comparing the frequency from the .dts with the actual clock +rate on the system. + +Fixes: c3ea80b6138cae ("ARM: dts: meson8b: add the Mali-450 MP2 GPU") +Signed-off-by: Martin Blumenstingl +Signed-off-by: Kevin Hilman +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm/boot/dts/meson8b.dtsi | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/arm/boot/dts/meson8b.dtsi ++++ b/arch/arm/boot/dts/meson8b.dtsi +@@ -125,8 +125,8 @@ + opp-hz = /bits/ 64 <255000000>; + opp-microvolt = <1100000>; + }; +- opp-364300000 { +- opp-hz = /bits/ 64 <364300000>; ++ opp-364285714 { ++ opp-hz = /bits/ 64 <364285714>; + opp-microvolt = <1100000>; + }; + opp-425000000 { diff --git a/queue-5.4/arm64-dts-marvell-clearfog-gt-8k-fix-switch-cpu-port-node.patch b/queue-5.4/arm64-dts-marvell-clearfog-gt-8k-fix-switch-cpu-port-node.patch new file mode 100644 index 00000000000..2163ab944ed --- /dev/null +++ b/queue-5.4/arm64-dts-marvell-clearfog-gt-8k-fix-switch-cpu-port-node.patch @@ -0,0 +1,35 @@ +From 62bba54d99407aedfe9b0a02e72e23c06e2b0116 Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Thu, 19 Dec 2019 12:28:45 +0200 +Subject: arm64: dts: marvell: clearfog-gt-8k: fix switch cpu port node + +From: Baruch Siach + +commit 62bba54d99407aedfe9b0a02e72e23c06e2b0116 upstream. + +Explicitly set the switch cpu (upstream) port phy-mode and managed +properties. This fixes the Marvell 88E6141 switch serdes configuration +with the recently enabled phylink layer. + +Fixes: a6120833272c ("arm64: dts: add support for SolidRun Clearfog GT 8K") +Reported-by: Denis Odintsov +Signed-off-by: Baruch Siach +Reviewed-by: Andrew Lunn +Signed-off-by: Gregory CLEMENT +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/boot/dts/marvell/armada-8040-clearfog-gt-8k.dts | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/arm64/boot/dts/marvell/armada-8040-clearfog-gt-8k.dts ++++ b/arch/arm64/boot/dts/marvell/armada-8040-clearfog-gt-8k.dts +@@ -408,6 +408,8 @@ + reg = <5>; + label = "cpu"; + ethernet = <&cp1_eth2>; ++ phy-mode = "2500base-x"; ++ managed = "in-band-status"; + }; + }; + diff --git a/queue-5.4/arm64-dts-qcom-msm8998-fix-tcsr-syscon-size.patch b/queue-5.4/arm64-dts-qcom-msm8998-fix-tcsr-syscon-size.patch new file mode 100644 index 00000000000..07228cc3845 --- /dev/null +++ b/queue-5.4/arm64-dts-qcom-msm8998-fix-tcsr-syscon-size.patch @@ -0,0 +1,34 @@ +From 05caa5bf9cab9983dd7a50428c46b7e617ba20d6 Mon Sep 17 00:00:00 2001 +From: Jeffrey Hugo +Date: Wed, 6 Nov 2019 20:59:48 -0800 +Subject: arm64: dts: qcom: msm8998: Fix tcsr syscon size + +From: Jeffrey Hugo + +commit 05caa5bf9cab9983dd7a50428c46b7e617ba20d6 upstream. + +The tcsr syscon region is really 0x40000 in size. We need access to the +full region so that we can access the axi resets when managing the +modem subsystem. + +Fixes: c7833949564e ("arm64: dts: qcom: msm8998: Add smem related nodes") +Signed-off-by: Jeffrey Hugo +Link: https://lore.kernel.org/r/20191107045948.4341-1-jeffrey.l.hugo@gmail.com +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/boot/dts/qcom/msm8998.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/qcom/msm8998.dtsi ++++ b/arch/arm64/boot/dts/qcom/msm8998.dtsi +@@ -985,7 +985,7 @@ + + tcsr_mutex_regs: syscon@1f40000 { + compatible = "syscon"; +- reg = <0x01f40000 0x20000>; ++ reg = <0x01f40000 0x40000>; + }; + + tlmm: pinctrl@3400000 { diff --git a/queue-5.4/arm64-dts-qcom-msm8998-mtp-add-alias-for-blsp1_uart3.patch b/queue-5.4/arm64-dts-qcom-msm8998-mtp-add-alias-for-blsp1_uart3.patch new file mode 100644 index 00000000000..4fa3cae3f4c --- /dev/null +++ b/queue-5.4/arm64-dts-qcom-msm8998-mtp-add-alias-for-blsp1_uart3.patch @@ -0,0 +1,38 @@ +From c9ec155b5962233aff3df65210bd6a4788dee21c Mon Sep 17 00:00:00 2001 +From: Bjorn Andersson +Date: Mon, 18 Nov 2019 17:18:23 -0800 +Subject: arm64: dts: qcom: msm8998-mtp: Add alias for blsp1_uart3 + +From: Bjorn Andersson + +commit c9ec155b5962233aff3df65210bd6a4788dee21c upstream. + +The msm_serial driver has a predefined set of uart ports defined, which +is allocated either by reading aliases or if no match is found a simple +counter, starting at index 0. But there's no logic in place to prevent +these two allocation mechanism from colliding. As a result either none +or all of the active msm_serial instances must be listed as aliases. + +Define blsp1_uart3 as "serial1" to mitigate this problem. + +Fixes: 4cffb9f2c700 ("arm64: dts: qcom: msm8998-mtp: Enable bluetooth") +Signed-off-by: Bjorn Andersson +Reviewed-by: Jeffrey Hugo +Link: https://lore.kernel.org/r/20191119011823.379100-1-bjorn.andersson@linaro.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi ++++ b/arch/arm64/boot/dts/qcom/msm8998-mtp.dtsi +@@ -9,6 +9,7 @@ + / { + aliases { + serial0 = &blsp2_uart1; ++ serial1 = &blsp1_uart3; + }; + + chosen { diff --git a/queue-5.4/arm64-dts-renesas-r8a77990-ebisu-remove-clkout-lr-synchronous-from-sound.patch b/queue-5.4/arm64-dts-renesas-r8a77990-ebisu-remove-clkout-lr-synchronous-from-sound.patch new file mode 100644 index 00000000000..573197c5216 --- /dev/null +++ b/queue-5.4/arm64-dts-renesas-r8a77990-ebisu-remove-clkout-lr-synchronous-from-sound.patch @@ -0,0 +1,35 @@ +From bf2b74ce9b33a2edd6ba1930ce60a71830790910 Mon Sep 17 00:00:00 2001 +From: Kuninori Morimoto +Date: Mon, 16 Dec 2019 11:08:22 +0900 +Subject: arm64: dts: renesas: r8a77990: ebisu: Remove clkout-lr-synchronous from sound + +From: Kuninori Morimoto + +commit bf2b74ce9b33a2edd6ba1930ce60a71830790910 upstream. + +rcar_sound doesn't support clkout-lr-synchronous in upstream. +It was supported under out-of-tree rcar_sound. +upstream rcar_sound is supporting + - clkout-lr-synchronous + + clkout-lr-asynchronous + +Signed-off-by: Kuninori Morimoto +Link: https://lore.kernel.org/r/87mubt3tux.wl-kuninori.morimoto.gx@renesas.com +Fixes: 56629fcba94c698d ("arm64: dts: renesas: ebisu: Enable Audio") +Signed-off-by: Geert Uytterhoeven +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts | 1 - + 1 file changed, 1 deletion(-) + +--- a/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts ++++ b/arch/arm64/boot/dts/renesas/r8a77990-ebisu.dts +@@ -636,7 +636,6 @@ + /* audio_clkout0/1/2/3 */ + #clock-cells = <1>; + clock-frequency = <12288000 11289600>; +- clkout-lr-synchronous; + + status = "okay"; + diff --git a/queue-5.4/arm64-dts-udpu-fix-broken-ethernet.patch b/queue-5.4/arm64-dts-udpu-fix-broken-ethernet.patch new file mode 100644 index 00000000000..a4af29bdb9b --- /dev/null +++ b/queue-5.4/arm64-dts-udpu-fix-broken-ethernet.patch @@ -0,0 +1,50 @@ +From 1eebac0240580b531954b02c05068051df41142a Mon Sep 17 00:00:00 2001 +From: Russell King +Date: Sat, 16 Nov 2019 11:06:56 +0000 +Subject: arm64: dts: uDPU: fix broken ethernet + +From: Russell King + +commit 1eebac0240580b531954b02c05068051df41142a upstream. + +The uDPU uses both ethernet controllers, which ties up COMPHY 0 for +eth1 and COMPHY 1 for eth0, with no USB3 comphy. The addition of +COMPHY support made the kernel override the setup by the boot loader +breaking this platform by assuming that COMPHY 0 was always used for +USB3. Delete the USB3 COMPHY definition at platform level, and add +phy specifications for the ethernet channels. + +Fixes: bd3d25b07342 ("arm64: dts: marvell: armada-37xx: link USB hosts with their PHYs") +Signed-off-by: Russell King +Signed-off-by: Gregory CLEMENT +Signed-off-by: Greg Kroah-Hartman + +--- + arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts ++++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts +@@ -143,6 +143,7 @@ + phy-mode = "sgmii"; + status = "okay"; + managed = "in-band-status"; ++ phys = <&comphy1 0>; + sfp = <&sfp_eth0>; + }; + +@@ -150,11 +151,14 @@ + phy-mode = "sgmii"; + status = "okay"; + managed = "in-band-status"; ++ phys = <&comphy0 1>; + sfp = <&sfp_eth1>; + }; + + &usb3 { + status = "okay"; ++ phys = <&usb2_utmi_otg_phy>; ++ phy-names = "usb2-utmi-otg-phy"; + }; + + &uart0 { diff --git a/queue-5.4/bpf-improve-bucket_log-calculation-logic.patch b/queue-5.4/bpf-improve-bucket_log-calculation-logic.patch new file mode 100644 index 00000000000..075f645c109 --- /dev/null +++ b/queue-5.4/bpf-improve-bucket_log-calculation-logic.patch @@ -0,0 +1,65 @@ +From 88d6f130e5632bbf419a2e184ec7adcbe241260b Mon Sep 17 00:00:00 2001 +From: Martin KaFai Lau +Date: Fri, 7 Feb 2020 00:18:10 -0800 +Subject: bpf: Improve bucket_log calculation logic + +From: Martin KaFai Lau + +commit 88d6f130e5632bbf419a2e184ec7adcbe241260b upstream. + +It was reported that the max_t, ilog2, and roundup_pow_of_two macros have +exponential effects on the number of states in the sparse checker. + +This patch breaks them up by calculating the "nbuckets" first so that the +"bucket_log" only needs to take ilog2(). + +In addition, Linus mentioned: + + Patch looks good, but I'd like to point out that it's not just sparse. + + You can see it with a simple + + make net/core/bpf_sk_storage.i + grep 'smap->bucket_log = ' net/core/bpf_sk_storage.i | wc + + and see the end result: + + 1 365071 2686974 + + That's one line (the assignment line) that is 2,686,974 characters in + length. + + Now, sparse does happen to react particularly badly to that (I didn't + look to why, but I suspect it's just that evaluating all the types + that don't actually ever end up getting used ends up being much more + expensive than it should be), but I bet it's not good for gcc either. + +Fixes: 6ac99e8f23d4 ("bpf: Introduce bpf sk local storage") +Reported-by: Randy Dunlap +Reported-by: Luc Van Oostenryck +Suggested-by: Linus Torvalds +Signed-off-by: Martin KaFai Lau +Signed-off-by: Daniel Borkmann +Reviewed-by: Luc Van Oostenryck +Link: https://lore.kernel.org/bpf/20200207081810.3918919-1-kafai@fb.com +Signed-off-by: Greg Kroah-Hartman + +--- + net/core/bpf_sk_storage.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/net/core/bpf_sk_storage.c ++++ b/net/core/bpf_sk_storage.c +@@ -643,9 +643,10 @@ static struct bpf_map *bpf_sk_storage_ma + return ERR_PTR(-ENOMEM); + bpf_map_init_from_attr(&smap->map, attr); + ++ nbuckets = roundup_pow_of_two(num_possible_cpus()); + /* Use at least 2 buckets, select_bucket() is undefined behavior with 1 bucket */ +- smap->bucket_log = max_t(u32, 1, ilog2(roundup_pow_of_two(num_possible_cpus()))); +- nbuckets = 1U << smap->bucket_log; ++ nbuckets = max_t(u32, 2, nbuckets); ++ smap->bucket_log = ilog2(nbuckets); + cost = sizeof(*smap->buckets) * nbuckets + sizeof(*smap); + + ret = bpf_map_charge_init(&smap->map.memory, cost); diff --git a/queue-5.4/bpf-sockhash-synchronize_rcu-before-free-ing-map.patch b/queue-5.4/bpf-sockhash-synchronize_rcu-before-free-ing-map.patch new file mode 100644 index 00000000000..85ab18d7f31 --- /dev/null +++ b/queue-5.4/bpf-sockhash-synchronize_rcu-before-free-ing-map.patch @@ -0,0 +1,48 @@ +From 0b2dc83906cf1e694e48003eae5df8fa63f76fd9 Mon Sep 17 00:00:00 2001 +From: Jakub Sitnicki +Date: Thu, 6 Feb 2020 12:16:51 +0100 +Subject: bpf, sockhash: Synchronize_rcu before free'ing map + +From: Jakub Sitnicki + +commit 0b2dc83906cf1e694e48003eae5df8fa63f76fd9 upstream. + +We need to have a synchronize_rcu before free'ing the sockhash because any +outstanding psock references will have a pointer to the map and when they +use it, this could trigger a use after free. + +This is a sister fix for sockhash, following commit 2bb90e5cc90e ("bpf: +sockmap, synchronize_rcu before free'ing map") which addressed sockmap, +which comes from a manual audit. + +Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface") +Signed-off-by: Jakub Sitnicki +Signed-off-by: Daniel Borkmann +Acked-by: John Fastabend +Link: https://lore.kernel.org/bpf/20200206111652.694507-3-jakub@cloudflare.com +Signed-off-by: Greg Kroah-Hartman + +--- + net/core/sock_map.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/net/core/sock_map.c ++++ b/net/core/sock_map.c +@@ -250,6 +250,7 @@ static void sock_map_free(struct bpf_map + } + raw_spin_unlock_bh(&stab->lock); + ++ /* wait for psock readers accessing its map link */ + synchronize_rcu(); + + bpf_map_area_free(stab->sks); +@@ -873,6 +874,9 @@ static void sock_hash_free(struct bpf_ma + raw_spin_unlock_bh(&bucket->lock); + } + ++ /* wait for psock readers accessing its map link */ ++ synchronize_rcu(); ++ + bpf_map_area_free(htab->buckets); + kfree(htab); + } diff --git a/queue-5.4/bpf-sockmap-check-update-requirements-after-locking.patch b/queue-5.4/bpf-sockmap-check-update-requirements-after-locking.patch new file mode 100644 index 00000000000..c152c7813bc --- /dev/null +++ b/queue-5.4/bpf-sockmap-check-update-requirements-after-locking.patch @@ -0,0 +1,80 @@ +From 85b8ac01a421791d66c3a458a7f83cfd173fe3fa Mon Sep 17 00:00:00 2001 +From: Lorenz Bauer +Date: Fri, 7 Feb 2020 10:37:12 +0000 +Subject: bpf, sockmap: Check update requirements after locking + +From: Lorenz Bauer + +commit 85b8ac01a421791d66c3a458a7f83cfd173fe3fa upstream. + +It's currently possible to insert sockets in unexpected states into +a sockmap, due to a TOCTTOU when updating the map from a syscall. +sock_map_update_elem checks that sk->sk_state == TCP_ESTABLISHED, +locks the socket and then calls sock_map_update_common. At this +point, the socket may have transitioned into another state, and +the earlier assumptions don't hold anymore. Crucially, it's +conceivable (though very unlikely) that a socket has become unhashed. +This breaks the sockmap's assumption that it will get a callback +via sk->sk_prot->unhash. + +Fix this by checking the (fixed) sk_type and sk_protocol without the +lock, followed by a locked check of sk_state. + +Unfortunately it's not possible to push the check down into +sock_(map|hash)_update_common, since BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB +run before the socket has transitioned from TCP_SYN_RECV into +TCP_ESTABLISHED. + +Fixes: 604326b41a6f ("bpf, sockmap: convert to generic sk_msg interface") +Signed-off-by: Lorenz Bauer +Signed-off-by: Daniel Borkmann +Reviewed-by: Jakub Sitnicki +Link: https://lore.kernel.org/bpf/20200207103713.28175-1-lmb@cloudflare.com +Signed-off-by: Greg Kroah-Hartman + +--- + net/core/sock_map.c | 16 ++++++++++------ + 1 file changed, 10 insertions(+), 6 deletions(-) + +--- a/net/core/sock_map.c ++++ b/net/core/sock_map.c +@@ -417,14 +417,16 @@ static int sock_map_update_elem(struct b + ret = -EINVAL; + goto out; + } +- if (!sock_map_sk_is_suitable(sk) || +- sk->sk_state != TCP_ESTABLISHED) { ++ if (!sock_map_sk_is_suitable(sk)) { + ret = -EOPNOTSUPP; + goto out; + } + + sock_map_sk_acquire(sk); +- ret = sock_map_update_common(map, idx, sk, flags); ++ if (sk->sk_state != TCP_ESTABLISHED) ++ ret = -EOPNOTSUPP; ++ else ++ ret = sock_map_update_common(map, idx, sk, flags); + sock_map_sk_release(sk); + out: + fput(sock->file); +@@ -740,14 +742,16 @@ static int sock_hash_update_elem(struct + ret = -EINVAL; + goto out; + } +- if (!sock_map_sk_is_suitable(sk) || +- sk->sk_state != TCP_ESTABLISHED) { ++ if (!sock_map_sk_is_suitable(sk)) { + ret = -EOPNOTSUPP; + goto out; + } + + sock_map_sk_acquire(sk); +- ret = sock_hash_update_common(map, key, sk, flags); ++ if (sk->sk_state != TCP_ESTABLISHED) ++ ret = -EOPNOTSUPP; ++ else ++ ret = sock_hash_update_common(map, key, sk, flags); + sock_map_sk_release(sk); + out: + fput(sock->file); diff --git a/queue-5.4/bpf-sockmap-don-t-sleep-while-holding-rcu-lock-on-tear-down.patch b/queue-5.4/bpf-sockmap-don-t-sleep-while-holding-rcu-lock-on-tear-down.patch new file mode 100644 index 00000000000..dda6fd73463 --- /dev/null +++ b/queue-5.4/bpf-sockmap-don-t-sleep-while-holding-rcu-lock-on-tear-down.patch @@ -0,0 +1,141 @@ +From db6a5018b6e008c1d69c6628cdaa9541b8e70940 Mon Sep 17 00:00:00 2001 +From: Jakub Sitnicki +Date: Thu, 6 Feb 2020 12:16:50 +0100 +Subject: bpf, sockmap: Don't sleep while holding RCU lock on tear-down + +From: Jakub Sitnicki + +commit db6a5018b6e008c1d69c6628cdaa9541b8e70940 upstream. + +rcu_read_lock is needed to protect access to psock inside sock_map_unref +when tearing down the map. However, we can't afford to sleep in lock_sock +while in RCU read-side critical section. Grab the RCU lock only after we +have locked the socket. + +This fixes RCU warnings triggerable on a VM with 1 vCPU when free'ing a +sockmap/sockhash that contains at least one socket: + +| ============================= +| WARNING: suspicious RCU usage +| 5.5.0-04005-g8fc91b972b73 #450 Not tainted +| ----------------------------- +| include/linux/rcupdate.h:272 Illegal context switch in RCU read-side critical section! +| +| other info that might help us debug this: +| +| +| rcu_scheduler_active = 2, debug_locks = 1 +| 4 locks held by kworker/0:1/62: +| #0: ffff88813b019748 ((wq_completion)events){+.+.}, at: process_one_work+0x1d7/0x5e0 +| #1: ffffc900000abe50 ((work_completion)(&map->work)){+.+.}, at: process_one_work+0x1d7/0x5e0 +| #2: ffffffff82065d20 (rcu_read_lock){....}, at: sock_map_free+0x5/0x170 +| #3: ffff8881368c5df8 (&stab->lock){+...}, at: sock_map_free+0x64/0x170 +| +| stack backtrace: +| CPU: 0 PID: 62 Comm: kworker/0:1 Not tainted 5.5.0-04005-g8fc91b972b73 #450 +| Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20190727_073836-buildvm-ppc64le-16.ppc.fedoraproject.org-3.fc31 04/01/2014 +| Workqueue: events bpf_map_free_deferred +| Call Trace: +| dump_stack+0x71/0xa0 +| ___might_sleep+0x105/0x190 +| lock_sock_nested+0x28/0x90 +| sock_map_free+0x95/0x170 +| bpf_map_free_deferred+0x58/0x80 +| process_one_work+0x260/0x5e0 +| worker_thread+0x4d/0x3e0 +| kthread+0x108/0x140 +| ? process_one_work+0x5e0/0x5e0 +| ? kthread_park+0x90/0x90 +| ret_from_fork+0x3a/0x50 + +| ============================= +| WARNING: suspicious RCU usage +| 5.5.0-04005-g8fc91b972b73-dirty #452 Not tainted +| ----------------------------- +| include/linux/rcupdate.h:272 Illegal context switch in RCU read-side critical section! +| +| other info that might help us debug this: +| +| +| rcu_scheduler_active = 2, debug_locks = 1 +| 4 locks held by kworker/0:1/62: +| #0: ffff88813b019748 ((wq_completion)events){+.+.}, at: process_one_work+0x1d7/0x5e0 +| #1: ffffc900000abe50 ((work_completion)(&map->work)){+.+.}, at: process_one_work+0x1d7/0x5e0 +| #2: ffffffff82065d20 (rcu_read_lock){....}, at: sock_hash_free+0x5/0x1d0 +| #3: ffff888139966e00 (&htab->buckets[i].lock){+...}, at: sock_hash_free+0x92/0x1d0 +| +| stack backtrace: +| CPU: 0 PID: 62 Comm: kworker/0:1 Not tainted 5.5.0-04005-g8fc91b972b73-dirty #452 +| Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20190727_073836-buildvm-ppc64le-16.ppc.fedoraproject.org-3.fc31 04/01/2014 +| Workqueue: events bpf_map_free_deferred +| Call Trace: +| dump_stack+0x71/0xa0 +| ___might_sleep+0x105/0x190 +| lock_sock_nested+0x28/0x90 +| sock_hash_free+0xec/0x1d0 +| bpf_map_free_deferred+0x58/0x80 +| process_one_work+0x260/0x5e0 +| worker_thread+0x4d/0x3e0 +| kthread+0x108/0x140 +| ? process_one_work+0x5e0/0x5e0 +| ? kthread_park+0x90/0x90 +| ret_from_fork+0x3a/0x50 + +Fixes: 7e81a3530206 ("bpf: Sockmap, ensure sock lock held during tear down") +Signed-off-by: Jakub Sitnicki +Signed-off-by: Daniel Borkmann +Acked-by: John Fastabend +Link: https://lore.kernel.org/bpf/20200206111652.694507-2-jakub@cloudflare.com +Signed-off-by: Greg Kroah-Hartman + +--- + net/core/sock_map.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/net/core/sock_map.c ++++ b/net/core/sock_map.c +@@ -234,7 +234,6 @@ static void sock_map_free(struct bpf_map + int i; + + synchronize_rcu(); +- rcu_read_lock(); + raw_spin_lock_bh(&stab->lock); + for (i = 0; i < stab->map.max_entries; i++) { + struct sock **psk = &stab->sks[i]; +@@ -243,12 +242,13 @@ static void sock_map_free(struct bpf_map + sk = xchg(psk, NULL); + if (sk) { + lock_sock(sk); ++ rcu_read_lock(); + sock_map_unref(sk, psk); ++ rcu_read_unlock(); + release_sock(sk); + } + } + raw_spin_unlock_bh(&stab->lock); +- rcu_read_unlock(); + + synchronize_rcu(); + +@@ -859,19 +859,19 @@ static void sock_hash_free(struct bpf_ma + int i; + + synchronize_rcu(); +- rcu_read_lock(); + for (i = 0; i < htab->buckets_num; i++) { + bucket = sock_hash_select_bucket(htab, i); + raw_spin_lock_bh(&bucket->lock); + hlist_for_each_entry_safe(elem, node, &bucket->head, node) { + hlist_del_rcu(&elem->node); + lock_sock(elem->sk); ++ rcu_read_lock(); + sock_map_unref(elem->sk, elem); ++ rcu_read_unlock(); + release_sock(elem->sk); + } + raw_spin_unlock_bh(&bucket->lock); + } +- rcu_read_unlock(); + + bpf_map_area_free(htab->buckets); + kfree(htab); diff --git a/queue-5.4/bpftool-don-t-crash-on-missing-xlated-program-instructions.patch b/queue-5.4/bpftool-don-t-crash-on-missing-xlated-program-instructions.patch new file mode 100644 index 00000000000..9a5c4b613cb --- /dev/null +++ b/queue-5.4/bpftool-don-t-crash-on-missing-xlated-program-instructions.patch @@ -0,0 +1,40 @@ +From d95f1e8b462c4372ac409886070bb8719d8a4d3a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= +Date: Thu, 6 Feb 2020 11:29:06 +0100 +Subject: bpftool: Don't crash on missing xlated program instructions +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Toke Høiland-Jørgensen + +commit d95f1e8b462c4372ac409886070bb8719d8a4d3a upstream. + +Turns out the xlated program instructions can also be missing if +kptr_restrict sysctl is set. This means that the previous fix to check the +jited_prog_insns pointer was insufficient; add another check of the +xlated_prog_insns pointer as well. + +Fixes: 5b79bcdf0362 ("bpftool: Don't crash on missing jited insns or ksyms") +Fixes: cae73f233923 ("bpftool: use bpf_program__get_prog_info_linear() in prog.c:do_dump()") +Signed-off-by: Toke Høiland-Jørgensen +Signed-off-by: Daniel Borkmann +Reviewed-by: Quentin Monnet +Link: https://lore.kernel.org/bpf/20200206102906.112551-1-toke@redhat.com +Signed-off-by: Greg Kroah-Hartman + +--- + tools/bpf/bpftool/prog.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/tools/bpf/bpftool/prog.c ++++ b/tools/bpf/bpftool/prog.c +@@ -500,7 +500,7 @@ static int do_dump(int argc, char **argv + buf = (unsigned char *)(info->jited_prog_insns); + member_len = info->jited_prog_len; + } else { /* DUMP_XLATED */ +- if (info->xlated_prog_len == 0) { ++ if (info->xlated_prog_len == 0 || !info->xlated_prog_insns) { + p_err("error retrieving insn dump: kernel.kptr_restrict set?"); + goto err_free; + } diff --git a/queue-5.4/platform-x86-intel_mid_powerbtn-take-a-copy-of-ddata.patch b/queue-5.4/platform-x86-intel_mid_powerbtn-take-a-copy-of-ddata.patch new file mode 100644 index 00000000000..af7fa45c074 --- /dev/null +++ b/queue-5.4/platform-x86-intel_mid_powerbtn-take-a-copy-of-ddata.patch @@ -0,0 +1,40 @@ +From 5e0c94d3aeeecc68c573033f08d9678fecf253bd Mon Sep 17 00:00:00 2001 +From: Mika Westerberg +Date: Wed, 22 Jan 2020 19:05:20 +0300 +Subject: platform/x86: intel_mid_powerbtn: Take a copy of ddata + +From: Mika Westerberg + +commit 5e0c94d3aeeecc68c573033f08d9678fecf253bd upstream. + +The driver gets driver_data from memory that is marked as const (which +is probably put to read-only memory) and it then modifies it. This +likely causes some sort of fault to happen. + +Fix this by taking a copy of the structure. + +Fixes: c94a8ff14de3 ("platform/x86: intel_mid_powerbtn: make mid_pb_ddata const") +Signed-off-by: Mika Westerberg +Reviewed-by: Andy Shevchenko +Signed-off-by: Andy Shevchenko +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/platform/x86/intel_mid_powerbtn.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/platform/x86/intel_mid_powerbtn.c ++++ b/drivers/platform/x86/intel_mid_powerbtn.c +@@ -146,9 +146,10 @@ static int mid_pb_probe(struct platform_ + + input_set_capability(input, EV_KEY, KEY_POWER); + +- ddata = (struct mid_pb_ddata *)id->driver_data; ++ ddata = devm_kmemdup(&pdev->dev, (void *)id->driver_data, ++ sizeof(*ddata), GFP_KERNEL); + if (!ddata) +- return -ENODATA; ++ return -ENOMEM; + + ddata->dev = &pdev->dev; + ddata->irq = irq; diff --git a/queue-5.4/powerpc-papr_scm-fix-leaking-bus_desc.provider_name-in-some-paths.patch b/queue-5.4/powerpc-papr_scm-fix-leaking-bus_desc.provider_name-in-some-paths.patch new file mode 100644 index 00000000000..870789939a6 --- /dev/null +++ b/queue-5.4/powerpc-papr_scm-fix-leaking-bus_desc.provider_name-in-some-paths.patch @@ -0,0 +1,44 @@ +From 5649607a8d0b0e019a4db14aab3de1e16c3a2b4f Mon Sep 17 00:00:00 2001 +From: Vaibhav Jain +Date: Wed, 22 Jan 2020 21:21:40 +0530 +Subject: powerpc/papr_scm: Fix leaking 'bus_desc.provider_name' in some paths + +From: Vaibhav Jain + +commit 5649607a8d0b0e019a4db14aab3de1e16c3a2b4f upstream. + +String 'bus_desc.provider_name' allocated inside +papr_scm_nvdimm_init() will leaks in case call to +nvdimm_bus_register() fails or when papr_scm_remove() is called. + +This minor patch ensures that 'bus_desc.provider_name' is freed in +error path for nvdimm_bus_register() as well as in papr_scm_remove(). + +Fixes: b5beae5e224f ("powerpc/pseries: Add driver for PAPR SCM regions") +Signed-off-by: Vaibhav Jain +Signed-off-by: Michael Ellerman +Link: https://lore.kernel.org/r/20200122155140.120429-1-vaibhav@linux.ibm.com +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/platforms/pseries/papr_scm.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/powerpc/platforms/pseries/papr_scm.c ++++ b/arch/powerpc/platforms/pseries/papr_scm.c +@@ -342,6 +342,7 @@ static int papr_scm_nvdimm_init(struct p + p->bus = nvdimm_bus_register(NULL, &p->bus_desc); + if (!p->bus) { + dev_err(dev, "Error creating nvdimm bus %pOF\n", p->dn); ++ kfree(p->bus_desc.provider_name); + return -ENXIO; + } + +@@ -498,6 +499,7 @@ static int papr_scm_remove(struct platfo + + nvdimm_bus_unregister(p->bus); + drc_pmem_unbind(p); ++ kfree(p->bus_desc.provider_name); + kfree(p); + + return 0; diff --git a/queue-5.4/powerpc-pseries-allow-not-having-ibm-hypertas-functions-hcall-multi-tce-for-ddw.patch b/queue-5.4/powerpc-pseries-allow-not-having-ibm-hypertas-functions-hcall-multi-tce-for-ddw.patch new file mode 100644 index 00000000000..27161862a8c --- /dev/null +++ b/queue-5.4/powerpc-pseries-allow-not-having-ibm-hypertas-functions-hcall-multi-tce-for-ddw.patch @@ -0,0 +1,155 @@ +From 7559d3d295f3365ea7ac0c0274c05e633fe4f594 Mon Sep 17 00:00:00 2001 +From: Alexey Kardashevskiy +Date: Mon, 16 Dec 2019 15:19:22 +1100 +Subject: powerpc/pseries: Allow not having ibm, hypertas-functions::hcall-multi-tce for DDW + +From: Alexey Kardashevskiy + +commit 7559d3d295f3365ea7ac0c0274c05e633fe4f594 upstream. + +By default a pseries guest supports a H_PUT_TCE hypercall which maps +a single IOMMU page in a DMA window. Additionally the hypervisor may +support H_PUT_TCE_INDIRECT/H_STUFF_TCE which update multiple TCEs at once; +this is advertised via the device tree /rtas/ibm,hypertas-functions +property which Linux converts to FW_FEATURE_MULTITCE. + +FW_FEATURE_MULTITCE is checked when dma_iommu_ops is used; however +the code managing the huge DMA window (DDW) ignores it and calls +H_PUT_TCE_INDIRECT even if it is explicitly disabled via +the "multitce=off" kernel command line parameter. + +This adds FW_FEATURE_MULTITCE checking to the DDW code path. + +This changes tce_build_pSeriesLP to take liobn and page size as +the huge window does not have iommu_table descriptor which usually +the place to store these numbers. + +Fixes: 4e8b0cf46b25 ("powerpc/pseries: Add support for dynamic dma windows") +Signed-off-by: Alexey Kardashevskiy +Reviewed-by: Thiago Jung Bauermann +Tested-by: Thiago Jung Bauermann +Signed-off-by: Michael Ellerman +Link: https://lore.kernel.org/r/20191216041924.42318-3-aik@ozlabs.ru +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/platforms/pseries/iommu.c | 43 ++++++++++++++++++++++----------- + 1 file changed, 29 insertions(+), 14 deletions(-) + +--- a/arch/powerpc/platforms/pseries/iommu.c ++++ b/arch/powerpc/platforms/pseries/iommu.c +@@ -132,10 +132,10 @@ static unsigned long tce_get_pseries(str + return be64_to_cpu(*tcep); + } + +-static void tce_free_pSeriesLP(struct iommu_table*, long, long); ++static void tce_free_pSeriesLP(unsigned long liobn, long, long); + static void tce_freemulti_pSeriesLP(struct iommu_table*, long, long); + +-static int tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum, ++static int tce_build_pSeriesLP(unsigned long liobn, long tcenum, long tceshift, + long npages, unsigned long uaddr, + enum dma_data_direction direction, + unsigned long attrs) +@@ -146,25 +146,25 @@ static int tce_build_pSeriesLP(struct io + int ret = 0; + long tcenum_start = tcenum, npages_start = npages; + +- rpn = __pa(uaddr) >> TCE_SHIFT; ++ rpn = __pa(uaddr) >> tceshift; + proto_tce = TCE_PCI_READ; + if (direction != DMA_TO_DEVICE) + proto_tce |= TCE_PCI_WRITE; + + while (npages--) { +- tce = proto_tce | (rpn & TCE_RPN_MASK) << TCE_RPN_SHIFT; +- rc = plpar_tce_put((u64)tbl->it_index, (u64)tcenum << 12, tce); ++ tce = proto_tce | (rpn & TCE_RPN_MASK) << tceshift; ++ rc = plpar_tce_put((u64)liobn, (u64)tcenum << tceshift, tce); + + if (unlikely(rc == H_NOT_ENOUGH_RESOURCES)) { + ret = (int)rc; +- tce_free_pSeriesLP(tbl, tcenum_start, ++ tce_free_pSeriesLP(liobn, tcenum_start, + (npages_start - (npages + 1))); + break; + } + + if (rc && printk_ratelimit()) { + printk("tce_build_pSeriesLP: plpar_tce_put failed. rc=%lld\n", rc); +- printk("\tindex = 0x%llx\n", (u64)tbl->it_index); ++ printk("\tindex = 0x%llx\n", (u64)liobn); + printk("\ttcenum = 0x%llx\n", (u64)tcenum); + printk("\ttce val = 0x%llx\n", tce ); + dump_stack(); +@@ -193,7 +193,8 @@ static int tce_buildmulti_pSeriesLP(stru + unsigned long flags; + + if ((npages == 1) || !firmware_has_feature(FW_FEATURE_MULTITCE)) { +- return tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, ++ return tce_build_pSeriesLP(tbl->it_index, tcenum, ++ tbl->it_page_shift, npages, uaddr, + direction, attrs); + } + +@@ -209,8 +210,9 @@ static int tce_buildmulti_pSeriesLP(stru + /* If allocation fails, fall back to the loop implementation */ + if (!tcep) { + local_irq_restore(flags); +- return tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, +- direction, attrs); ++ return tce_build_pSeriesLP(tbl->it_index, tcenum, ++ tbl->it_page_shift, ++ npages, uaddr, direction, attrs); + } + __this_cpu_write(tce_page, tcep); + } +@@ -261,16 +263,16 @@ static int tce_buildmulti_pSeriesLP(stru + return ret; + } + +-static void tce_free_pSeriesLP(struct iommu_table *tbl, long tcenum, long npages) ++static void tce_free_pSeriesLP(unsigned long liobn, long tcenum, long npages) + { + u64 rc; + + while (npages--) { +- rc = plpar_tce_put((u64)tbl->it_index, (u64)tcenum << 12, 0); ++ rc = plpar_tce_put((u64)liobn, (u64)tcenum << 12, 0); + + if (rc && printk_ratelimit()) { + printk("tce_free_pSeriesLP: plpar_tce_put failed. rc=%lld\n", rc); +- printk("\tindex = 0x%llx\n", (u64)tbl->it_index); ++ printk("\tindex = 0x%llx\n", (u64)liobn); + printk("\ttcenum = 0x%llx\n", (u64)tcenum); + dump_stack(); + } +@@ -285,7 +287,7 @@ static void tce_freemulti_pSeriesLP(stru + u64 rc; + + if (!firmware_has_feature(FW_FEATURE_MULTITCE)) +- return tce_free_pSeriesLP(tbl, tcenum, npages); ++ return tce_free_pSeriesLP(tbl->it_index, tcenum, npages); + + rc = plpar_tce_stuff((u64)tbl->it_index, (u64)tcenum << 12, 0, npages); + +@@ -400,6 +402,19 @@ static int tce_setrange_multi_pSeriesLP( + u64 rc = 0; + long l, limit; + ++ if (!firmware_has_feature(FW_FEATURE_MULTITCE)) { ++ unsigned long tceshift = be32_to_cpu(maprange->tce_shift); ++ unsigned long dmastart = (start_pfn << PAGE_SHIFT) + ++ be64_to_cpu(maprange->dma_base); ++ unsigned long tcenum = dmastart >> tceshift; ++ unsigned long npages = num_pfn << PAGE_SHIFT >> tceshift; ++ void *uaddr = __va(start_pfn << PAGE_SHIFT); ++ ++ return tce_build_pSeriesLP(be32_to_cpu(maprange->liobn), ++ tcenum, tceshift, npages, (unsigned long) uaddr, ++ DMA_BIDIRECTIONAL, 0); ++ } ++ + local_irq_disable(); /* to protect tcep and the page behind it */ + tcep = __this_cpu_read(tce_page); + diff --git a/queue-5.4/powerpc-pseries-vio-fix-iommu_table-use-after-free-refcount-warning.patch b/queue-5.4/powerpc-pseries-vio-fix-iommu_table-use-after-free-refcount-warning.patch new file mode 100644 index 00000000000..1e7552ff38b --- /dev/null +++ b/queue-5.4/powerpc-pseries-vio-fix-iommu_table-use-after-free-refcount-warning.patch @@ -0,0 +1,62 @@ +From aff8c8242bc638ba57247ae1ec5f272ac3ed3b92 Mon Sep 17 00:00:00 2001 +From: Tyrel Datwyler +Date: Mon, 20 Jan 2020 14:10:02 -0800 +Subject: powerpc/pseries/vio: Fix iommu_table use-after-free refcount warning + +From: Tyrel Datwyler + +commit aff8c8242bc638ba57247ae1ec5f272ac3ed3b92 upstream. + +Commit e5afdf9dd515 ("powerpc/vfio_spapr_tce: Add reference counting to +iommu_table") missed an iommu_table allocation in the pseries vio code. +The iommu_table is allocated with kzalloc and as a result the associated +kref gets a value of zero. This has the side effect that during a DLPAR +remove of the associated virtual IOA the iommu_tce_table_put() triggers +a use-after-free underflow warning. + +Call Trace: +[c0000002879e39f0] [c00000000071ecb4] refcount_warn_saturate+0x184/0x190 +(unreliable) +[c0000002879e3a50] [c0000000000500ac] iommu_tce_table_put+0x9c/0xb0 +[c0000002879e3a70] [c0000000000f54e4] vio_dev_release+0x34/0x70 +[c0000002879e3aa0] [c00000000087cfa4] device_release+0x54/0xf0 +[c0000002879e3b10] [c000000000d64c84] kobject_cleanup+0xa4/0x240 +[c0000002879e3b90] [c00000000087d358] put_device+0x28/0x40 +[c0000002879e3bb0] [c0000000007a328c] dlpar_remove_slot+0x15c/0x250 +[c0000002879e3c50] [c0000000007a348c] remove_slot_store+0xac/0xf0 +[c0000002879e3cd0] [c000000000d64220] kobj_attr_store+0x30/0x60 +[c0000002879e3cf0] [c0000000004ff13c] sysfs_kf_write+0x6c/0xa0 +[c0000002879e3d10] [c0000000004fde4c] kernfs_fop_write+0x18c/0x260 +[c0000002879e3d60] [c000000000410f3c] __vfs_write+0x3c/0x70 +[c0000002879e3d80] [c000000000415408] vfs_write+0xc8/0x250 +[c0000002879e3dd0] [c0000000004157dc] ksys_write+0x7c/0x120 +[c0000002879e3e20] [c00000000000b278] system_call+0x5c/0x68 + +Further, since the refcount was always zero the iommu_tce_table_put() +fails to call the iommu_table release function resulting in a leak. + +Fix this issue be initilizing the iommu_table kref immediately after +allocation. + +Fixes: e5afdf9dd515 ("powerpc/vfio_spapr_tce: Add reference counting to iommu_table") +Signed-off-by: Tyrel Datwyler +Reviewed-by: Alexey Kardashevskiy +Signed-off-by: Michael Ellerman +Link: https://lore.kernel.org/r/1579558202-26052-1-git-send-email-tyreld@linux.ibm.com +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/platforms/pseries/vio.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/powerpc/platforms/pseries/vio.c ++++ b/arch/powerpc/platforms/pseries/vio.c +@@ -1176,6 +1176,8 @@ static struct iommu_table *vio_build_iom + if (tbl == NULL) + return NULL; + ++ kref_init(&tbl->it_kref); ++ + of_parse_dma_window(dev->dev.of_node, dma_window, + &tbl->it_index, &offset, &size); + diff --git a/queue-5.4/powerpc-ptdump-fix-w-x-verification-call-in-mark_rodata_ro.patch b/queue-5.4/powerpc-ptdump-fix-w-x-verification-call-in-mark_rodata_ro.patch new file mode 100644 index 00000000000..8e63ba5640b --- /dev/null +++ b/queue-5.4/powerpc-ptdump-fix-w-x-verification-call-in-mark_rodata_ro.patch @@ -0,0 +1,32 @@ +From e26ad936dd89d79f66c2b567f700e0c2a7103070 Mon Sep 17 00:00:00 2001 +From: Christophe Leroy +Date: Tue, 14 Jan 2020 08:13:08 +0000 +Subject: powerpc/ptdump: Fix W+X verification call in mark_rodata_ro() + +From: Christophe Leroy + +commit e26ad936dd89d79f66c2b567f700e0c2a7103070 upstream. + +ptdump_check_wx() also have to be called when pages are mapped +by blocks. + +Fixes: 453d87f6a8ae ("powerpc/mm: Warn if W+X pages found on boot") +Signed-off-by: Christophe Leroy +Signed-off-by: Michael Ellerman +Link: https://lore.kernel.org/r/37517da8310f4457f28921a4edb88fb21d27b62a.1578989531.git.christophe.leroy@c-s.fr +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/mm/pgtable_32.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/powerpc/mm/pgtable_32.c ++++ b/arch/powerpc/mm/pgtable_32.c +@@ -221,6 +221,7 @@ void mark_rodata_ro(void) + + if (v_block_mapped((unsigned long)_sinittext)) { + mmu_mark_rodata_ro(); ++ ptdump_check_wx(); + return; + } + diff --git a/queue-5.4/powerpc-ptdump-only-enable-ppc_check_wx-with-strict_kernel_rwx.patch b/queue-5.4/powerpc-ptdump-only-enable-ppc_check_wx-with-strict_kernel_rwx.patch new file mode 100644 index 00000000000..4a4cb5b615e --- /dev/null +++ b/queue-5.4/powerpc-ptdump-only-enable-ppc_check_wx-with-strict_kernel_rwx.patch @@ -0,0 +1,33 @@ +From f509247b08f2dcf7754d9ed85ad69a7972aa132b Mon Sep 17 00:00:00 2001 +From: Christophe Leroy +Date: Tue, 14 Jan 2020 08:13:10 +0000 +Subject: powerpc/ptdump: Only enable PPC_CHECK_WX with STRICT_KERNEL_RWX + +From: Christophe Leroy + +commit f509247b08f2dcf7754d9ed85ad69a7972aa132b upstream. + +ptdump_check_wx() is called from mark_rodata_ro() which only exists +when CONFIG_STRICT_KERNEL_RWX is selected. + +Fixes: 453d87f6a8ae ("powerpc/mm: Warn if W+X pages found on boot") +Signed-off-by: Christophe Leroy +Signed-off-by: Michael Ellerman +Link: https://lore.kernel.org/r/922d4939c735c6b52b4137838bcc066fffd4fc33.1578989545.git.christophe.leroy@c-s.fr +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/Kconfig.debug | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/powerpc/Kconfig.debug ++++ b/arch/powerpc/Kconfig.debug +@@ -371,7 +371,7 @@ config PPC_PTDUMP + + config PPC_DEBUG_WX + bool "Warn on W+X mappings at boot" +- depends on PPC_PTDUMP ++ depends on PPC_PTDUMP && STRICT_KERNEL_RWX + help + Generate a warning if any W+X mappings are found at boot. + diff --git a/queue-5.4/revert-powerpc-pseries-iommu-don-t-use-dma_iommu_ops-on-secure-guests.patch b/queue-5.4/revert-powerpc-pseries-iommu-don-t-use-dma_iommu_ops-on-secure-guests.patch new file mode 100644 index 00000000000..47b1aab6e28 --- /dev/null +++ b/queue-5.4/revert-powerpc-pseries-iommu-don-t-use-dma_iommu_ops-on-secure-guests.patch @@ -0,0 +1,57 @@ +From d862b44133b7a1d7de25288e09eabf4df415e971 Mon Sep 17 00:00:00 2001 +From: Ram Pai +Date: Mon, 16 Dec 2019 15:19:21 +1100 +Subject: Revert "powerpc/pseries/iommu: Don't use dma_iommu_ops on secure guests" + +From: Ram Pai + +commit d862b44133b7a1d7de25288e09eabf4df415e971 upstream. + +This reverts commit edea902c1c1efb855f77e041f9daf1abe7a9768a. + +At the time the change allowed direct DMA ops for secure VMs; however +since then we switched on using SWIOTLB backed with IOMMU (direct mapping) +and to make this work, we need dma_iommu_ops which handles all cases +including TCE mapping I/O pages in the presence of an IOMMU. + +Fixes: edea902c1c1e ("powerpc/pseries/iommu: Don't use dma_iommu_ops on secure guests") +Signed-off-by: Ram Pai +[aik: added "revert" and "fixes:"] +Signed-off-by: Alexey Kardashevskiy +Reviewed-by: Thiago Jung Bauermann +Tested-by: Thiago Jung Bauermann +Signed-off-by: Michael Ellerman +Link: https://lore.kernel.org/r/20191216041924.42318-2-aik@ozlabs.ru +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/platforms/pseries/iommu.c | 11 +---------- + 1 file changed, 1 insertion(+), 10 deletions(-) + +--- a/arch/powerpc/platforms/pseries/iommu.c ++++ b/arch/powerpc/platforms/pseries/iommu.c +@@ -36,7 +36,6 @@ + #include + #include + #include +-#include + + #include "pseries.h" + +@@ -1320,15 +1319,7 @@ void iommu_init_early_pSeries(void) + of_reconfig_notifier_register(&iommu_reconfig_nb); + register_memory_notifier(&iommu_mem_nb); + +- /* +- * Secure guest memory is inacessible to devices so regular DMA isn't +- * possible. +- * +- * In that case keep devices' dma_map_ops as NULL so that the generic +- * DMA code path will use SWIOTLB to bounce buffers for DMA. +- */ +- if (!is_secure_guest()) +- set_pci_dma_ops(&dma_iommu_ops); ++ set_pci_dma_ops(&dma_iommu_ops); + } + + static int __init disable_multitce(char *str) diff --git a/queue-5.4/rtc-cmos-stop-using-shared-irq.patch b/queue-5.4/rtc-cmos-stop-using-shared-irq.patch new file mode 100644 index 00000000000..68e1cdff7b7 --- /dev/null +++ b/queue-5.4/rtc-cmos-stop-using-shared-irq.patch @@ -0,0 +1,79 @@ +From b6da197a2e9670df6f07e6698629e9ce95ab614e Mon Sep 17 00:00:00 2001 +From: Andy Shevchenko +Date: Thu, 23 Jan 2020 15:14:35 +0200 +Subject: rtc: cmos: Stop using shared IRQ + +From: Andy Shevchenko + +commit b6da197a2e9670df6f07e6698629e9ce95ab614e upstream. + +As reported by Guilherme G. Piccoli: + +---8<---8<---8<--- + +The rtc-cmos interrupt setting was changed in the commit 079062b28fb4 +("rtc: cmos: prevent kernel warning on IRQ flags mismatch") in order +to allow shared interrupts; according to that commit's description, +some machine got kernel warnings due to the interrupt line being shared +between rtc-cmos and other hardware, and rtc-cmos didn't allow IRQ sharing +that time. + +After the aforementioned commit though it was observed a huge increase +in lost HPET interrupts in some systems, observed through the following +kernel message: + +[...] hpet1: lost 35 rtc interrupts + +After investigation, it was narrowed down to the shared interrupts +usage when having the kernel option "irqpoll" enabled. In this case, +all IRQ handlers are called for non-timer interrupts, if such handlers +are setup in shared IRQ lines. The rtc-cmos IRQ handler could be set to +hpet_rtc_interrupt(), which will produce the kernel "lost interrupts" +message after doing work - lots of readl/writel to HPET registers, which +are known to be slow. + +Although "irqpoll" is not a default kernel option, it's used in some contexts, +one being the kdump kernel (which is an already "impaired" kernel usually +running with 1 CPU available), so the performance burden could be considerable. +Also, the same issue would happen (in a shorter extent though) when using +"irqfixup" kernel option. + +In a quick experiment, a virtual machine with uptime of 2 minutes produced +>300 calls to hpet_rtc_interrupt() when "irqpoll" was set, whereas without +sharing interrupts this number reduced to 1 interrupt. Machines with more +hardware than a VM should generate even more unnecessary HPET interrupts +in this scenario. + +---8<---8<---8<--- + +After looking into the rtc-cmos driver history and DSDT table from +the Microsoft Surface 3, we may notice that Hans de Goede submitted +a correct fix (see dependency below). Thus, we simply revert +the culprit commit. + +Fixes: 079062b28fb4 ("rtc: cmos: prevent kernel warning on IRQ flags mismatch") +Depends-on: a1e23a42f1bd ("rtc: cmos: Do not assume irq 8 for rtc when there are no legacy irqs") +Reported-by: Guilherme G. Piccoli +Cc: Hans de Goede +Signed-off-by: Andy Shevchenko +Tested-by: Guilherme G. Piccoli +Reviewed-by: Hans de Goede +Link: https://lore.kernel.org/r/20200123131437.28157-1-andriy.shevchenko@linux.intel.com +Signed-off-by: Alexandre Belloni +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/rtc/rtc-cmos.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/rtc/rtc-cmos.c ++++ b/drivers/rtc/rtc-cmos.c +@@ -850,7 +850,7 @@ cmos_do_probe(struct device *dev, struct + rtc_cmos_int_handler = cmos_interrupt; + + retval = request_irq(rtc_irq, rtc_cmos_int_handler, +- IRQF_SHARED, dev_name(&cmos_rtc.rtc->dev), ++ 0, dev_name(&cmos_rtc.rtc->dev), + cmos_rtc.rtc); + if (retval < 0) { + dev_dbg(dev, "IRQ %d is already in use\n", rtc_irq); diff --git a/queue-5.4/rtc-hym8563-return-einval-if-the-time-is-known-to-be-invalid.patch b/queue-5.4/rtc-hym8563-return-einval-if-the-time-is-known-to-be-invalid.patch new file mode 100644 index 00000000000..75d6be7cc97 --- /dev/null +++ b/queue-5.4/rtc-hym8563-return-einval-if-the-time-is-known-to-be-invalid.patch @@ -0,0 +1,35 @@ +From f236a2a2ebabad0848ad0995af7ad1dc7029e895 Mon Sep 17 00:00:00 2001 +From: Paul Kocialkowski +Date: Thu, 12 Dec 2019 16:31:10 +0100 +Subject: rtc: hym8563: Return -EINVAL if the time is known to be invalid + +From: Paul Kocialkowski + +commit f236a2a2ebabad0848ad0995af7ad1dc7029e895 upstream. + +The current code returns -EPERM when the voltage loss bit is set. +Since the bit indicates that the time value is not valid, return +-EINVAL instead, which is the appropriate error code for this +situation. + +Fixes: dcaf03849352 ("rtc: add hym8563 rtc-driver") +Signed-off-by: Paul Kocialkowski +Link: https://lore.kernel.org/r/20191212153111.966923-1-paul.kocialkowski@bootlin.com +Signed-off-by: Alexandre Belloni +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/rtc/rtc-hym8563.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/rtc/rtc-hym8563.c ++++ b/drivers/rtc/rtc-hym8563.c +@@ -97,7 +97,7 @@ static int hym8563_rtc_read_time(struct + + if (!hym8563->valid) { + dev_warn(&client->dev, "no valid clock/calendar values available\n"); +- return -EPERM; ++ return -EINVAL; + } + + ret = i2c_smbus_read_i2c_block_data(client, HYM8563_SEC, 7, buf); diff --git a/queue-5.4/rtc-i2c-spi-avoid-inclusion-of-regmap-support-when-not-needed.patch b/queue-5.4/rtc-i2c-spi-avoid-inclusion-of-regmap-support-when-not-needed.patch new file mode 100644 index 00000000000..abd044116b6 --- /dev/null +++ b/queue-5.4/rtc-i2c-spi-avoid-inclusion-of-regmap-support-when-not-needed.patch @@ -0,0 +1,70 @@ +From 34719de919af07682861cb0fa2bcf64da33ecf44 Mon Sep 17 00:00:00 2001 +From: Geert Uytterhoeven +Date: Sun, 12 Jan 2020 18:13:49 +0100 +Subject: rtc: i2c/spi: Avoid inclusion of REGMAP support when not needed + +From: Geert Uytterhoeven + +commit 34719de919af07682861cb0fa2bcf64da33ecf44 upstream. + +Merely enabling I2C and RTC selects REGMAP_I2C and REGMAP_SPI, even when +no driver needs it. While the former can be moduler, the latter cannot, +and thus becomes built-in. + +Fix this by moving the select statements for REGMAP_I2C and REGMAP_SPI +from the RTC_I2C_AND_SPI helper to the individual drivers that depend on +it. + +Note that the comment for RTC_I2C_AND_SPI refers to SND_SOC_I2C_AND_SPI +for more information, but the latter does not select REGMAP_{I2C,SPI} +itself, and defers that to the individual drivers, too. + +Fixes: 080481f54ef62121 ("rtc: merge ds3232 and ds3234") +Signed-off-by: Geert Uytterhoeven +Reported-by: kbuild test robot +Reported-by: kbuild test robot +Link: https://lore.kernel.org/r/20200112171349.22268-1-geert@linux-m68k.org +Signed-off-by: Alexandre Belloni +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/rtc/Kconfig | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/drivers/rtc/Kconfig ++++ b/drivers/rtc/Kconfig +@@ -859,14 +859,14 @@ config RTC_I2C_AND_SPI + default m if I2C=m + default y if I2C=y + default y if SPI_MASTER=y +- select REGMAP_I2C if I2C +- select REGMAP_SPI if SPI_MASTER + + comment "SPI and I2C RTC drivers" + + config RTC_DRV_DS3232 + tristate "Dallas/Maxim DS3232/DS3234" + depends on RTC_I2C_AND_SPI ++ select REGMAP_I2C if I2C ++ select REGMAP_SPI if SPI_MASTER + help + If you say yes here you get support for Dallas Semiconductor + DS3232 and DS3234 real-time clock chips. If an interrupt is associated +@@ -886,6 +886,8 @@ config RTC_DRV_DS3232_HWMON + config RTC_DRV_PCF2127 + tristate "NXP PCF2127" + depends on RTC_I2C_AND_SPI ++ select REGMAP_I2C if I2C ++ select REGMAP_SPI if SPI_MASTER + select WATCHDOG_CORE if WATCHDOG + help + If you say yes here you get support for the NXP PCF2127/29 RTC +@@ -902,6 +904,8 @@ config RTC_DRV_PCF2127 + config RTC_DRV_RV3029C2 + tristate "Micro Crystal RV3029/3049" + depends on RTC_I2C_AND_SPI ++ select REGMAP_I2C if I2C ++ select REGMAP_SPI if SPI_MASTER + help + If you say yes here you get support for the Micro Crystal + RV3029 and RV3049 RTC chips. diff --git a/queue-5.4/selftests-bpf-test-freeing-sockmap-sockhash-with-a-socket-in-it.patch b/queue-5.4/selftests-bpf-test-freeing-sockmap-sockhash-with-a-socket-in-it.patch new file mode 100644 index 00000000000..928f5a0387e --- /dev/null +++ b/queue-5.4/selftests-bpf-test-freeing-sockmap-sockhash-with-a-socket-in-it.patch @@ -0,0 +1,106 @@ +From 5d3919a953c3c96c02fc7a337f8376cde43ae31f Mon Sep 17 00:00:00 2001 +From: Jakub Sitnicki +Date: Thu, 6 Feb 2020 12:16:52 +0100 +Subject: selftests/bpf: Test freeing sockmap/sockhash with a socket in it + +From: Jakub Sitnicki + +commit 5d3919a953c3c96c02fc7a337f8376cde43ae31f upstream. + +Commit 7e81a3530206 ("bpf: Sockmap, ensure sock lock held during tear +down") introduced sleeping issues inside RCU critical sections and while +holding a spinlock on sockmap/sockhash tear-down. There has to be at least +one socket in the map for the problem to surface. + +This adds a test that triggers the warnings for broken locking rules. Not a +fix per se, but rather tooling to verify the accompanying fixes. Run on a +VM with 1 vCPU to reproduce the warnings. + +Fixes: 7e81a3530206 ("bpf: Sockmap, ensure sock lock held during tear down") +Signed-off-by: Jakub Sitnicki +Signed-off-by: Daniel Borkmann +Acked-by: John Fastabend +Link: https://lore.kernel.org/bpf/20200206111652.694507-4-jakub@cloudflare.com +Signed-off-by: Greg Kroah-Hartman + +--- + tools/testing/selftests/bpf/prog_tests/sockmap_basic.c | 74 +++++++++++++++++ + 1 file changed, 74 insertions(+) + +--- /dev/null ++++ b/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c +@@ -0,0 +1,74 @@ ++// SPDX-License-Identifier: GPL-2.0 ++// Copyright (c) 2020 Cloudflare ++ ++#include "test_progs.h" ++ ++static int connected_socket_v4(void) ++{ ++ struct sockaddr_in addr = { ++ .sin_family = AF_INET, ++ .sin_port = htons(80), ++ .sin_addr = { inet_addr("127.0.0.1") }, ++ }; ++ socklen_t len = sizeof(addr); ++ int s, repair, err; ++ ++ s = socket(AF_INET, SOCK_STREAM, 0); ++ if (CHECK_FAIL(s == -1)) ++ goto error; ++ ++ repair = TCP_REPAIR_ON; ++ err = setsockopt(s, SOL_TCP, TCP_REPAIR, &repair, sizeof(repair)); ++ if (CHECK_FAIL(err)) ++ goto error; ++ ++ err = connect(s, (struct sockaddr *)&addr, len); ++ if (CHECK_FAIL(err)) ++ goto error; ++ ++ repair = TCP_REPAIR_OFF_NO_WP; ++ err = setsockopt(s, SOL_TCP, TCP_REPAIR, &repair, sizeof(repair)); ++ if (CHECK_FAIL(err)) ++ goto error; ++ ++ return s; ++error: ++ perror(__func__); ++ close(s); ++ return -1; ++} ++ ++/* Create a map, populate it with one socket, and free the map. */ ++static void test_sockmap_create_update_free(enum bpf_map_type map_type) ++{ ++ const int zero = 0; ++ int s, map, err; ++ ++ s = connected_socket_v4(); ++ if (CHECK_FAIL(s == -1)) ++ return; ++ ++ map = bpf_create_map(map_type, sizeof(int), sizeof(int), 1, 0); ++ if (CHECK_FAIL(map == -1)) { ++ perror("bpf_create_map"); ++ goto out; ++ } ++ ++ err = bpf_map_update_elem(map, &zero, &s, BPF_NOEXIST); ++ if (CHECK_FAIL(err)) { ++ perror("bpf_map_update"); ++ goto out; ++ } ++ ++out: ++ close(map); ++ close(s); ++} ++ ++void test_sockmap_basic(void) ++{ ++ if (test__start_subtest("sockmap create_update_free")) ++ test_sockmap_create_update_free(BPF_MAP_TYPE_SOCKMAP); ++ if (test__start_subtest("sockhash create_update_free")) ++ test_sockmap_create_update_free(BPF_MAP_TYPE_SOCKHASH); ++} diff --git a/queue-5.4/series b/queue-5.4/series index 32c12b7a341..51d8f36785d 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -18,6 +18,12 @@ pci-tegra-fix-afi_pex2_ctrl-reg-offset-for-tegra30.patch pci-don-t-disable-bridge-bars-when-assigning-bus-resources.patch pci-aer-initialize-aer_fifo.patch iwlwifi-mvm-avoid-use-after-free-for-pmsr-request.patch +bpftool-don-t-crash-on-missing-xlated-program-instructions.patch +bpf-sockmap-don-t-sleep-while-holding-rcu-lock-on-tear-down.patch +bpf-sockhash-synchronize_rcu-before-free-ing-map.patch +selftests-bpf-test-freeing-sockmap-sockhash-with-a-socket-in-it.patch +bpf-improve-bucket_log-calculation-logic.patch +bpf-sockmap-check-update-requirements-after-locking.patch nfs-nfs_swap-should-depend-on-swap.patch nfs-revalidate-the-file-size-on-a-fatal-write-error.patch nfs-pnfs-fix-pnfs_generic_prepare_to_resend_writes.patch @@ -26,3 +32,28 @@ nfsv4-pnfs_roc-must-use-cred_fscmp-to-compare-creds.patch nfsv4-try-lease-recovery-on-nfs4err_expired.patch nfsv4.0-nfs4_do_fsinfo-should-not-do-implicit-lease-renewals.patch x86-boot-handle-malformed-srat-tables-during-early-a.patch +rtc-hym8563-return-einval-if-the-time-is-known-to-be-invalid.patch +rtc-i2c-spi-avoid-inclusion-of-regmap-support-when-not-needed.patch +rtc-cmos-stop-using-shared-irq.patch +watchdog-qcom-use-platform_get_irq_optional-for-bark-irq.patch +arc-add-missing-multicast-filter-number-to-gmac-node.patch +platform-x86-intel_mid_powerbtn-take-a-copy-of-ddata.patch +arm64-dts-qcom-msm8998-fix-tcsr-syscon-size.patch +arm64-dts-udpu-fix-broken-ethernet.patch +arm64-dts-qcom-msm8998-mtp-add-alias-for-blsp1_uart3.patch +arm-dts-at91-reenable-uart-tx-pull-ups.patch +arm-dts-am43xx-add-support-for-clkout1-clock.patch +arm64-dts-renesas-r8a77990-ebisu-remove-clkout-lr-synchronous-from-sound.patch +arm64-dts-marvell-clearfog-gt-8k-fix-switch-cpu-port-node.patch +arm-dts-meson8-use-the-actual-frequency-for-the-gpu-s-182.1mhz-opp.patch +arm-dts-meson8b-use-the-actual-frequency-for-the-gpu-s-364mhz-opp.patch +arm-dts-at91-sama5d3-fix-maximum-peripheral-clock-rates.patch +arm-dts-at91-sama5d3-define-clock-rate-range-for-tcb1.patch +tools-power-acpi-fix-compilation-error.patch +soc-qcom-rpmhpd-set-active_only-for-active-only-power-domains.patch +revert-powerpc-pseries-iommu-don-t-use-dma_iommu_ops-on-secure-guests.patch +powerpc-ptdump-fix-w-x-verification-call-in-mark_rodata_ro.patch +powerpc-ptdump-only-enable-ppc_check_wx-with-strict_kernel_rwx.patch +powerpc-papr_scm-fix-leaking-bus_desc.provider_name-in-some-paths.patch +powerpc-pseries-vio-fix-iommu_table-use-after-free-refcount-warning.patch +powerpc-pseries-allow-not-having-ibm-hypertas-functions-hcall-multi-tce-for-ddw.patch diff --git a/queue-5.4/soc-qcom-rpmhpd-set-active_only-for-active-only-power-domains.patch b/queue-5.4/soc-qcom-rpmhpd-set-active_only-for-active-only-power-domains.patch new file mode 100644 index 00000000000..f71e850bdf2 --- /dev/null +++ b/queue-5.4/soc-qcom-rpmhpd-set-active_only-for-active-only-power-domains.patch @@ -0,0 +1,46 @@ +From 5d0d4d42bed0090d3139e7c5ca1587d76d48add6 Mon Sep 17 00:00:00 2001 +From: Douglas Anderson +Date: Thu, 14 Feb 2019 09:36:33 -0800 +Subject: soc: qcom: rpmhpd: Set 'active_only' for active only power domains + +From: Douglas Anderson + +commit 5d0d4d42bed0090d3139e7c5ca1587d76d48add6 upstream. + +The 'active_only' attribute was accidentally never set to true for any +power domains meaning that all the code handling this attribute was +dead. + +NOTE that the RPM power domain code (as opposed to the RPMh one) gets +this right. + +Acked-by: Rajendra Nayak +Reviewed-by: Stephen Boyd +Fixes: 279b7e8a62cc ("soc: qcom: rpmhpd: Add RPMh power domain driver") +Signed-off-by: Douglas Anderson +Link: https://lore.kernel.org/r/20190214173633.211000-1-dianders@chromium.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/soc/qcom/rpmhpd.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/soc/qcom/rpmhpd.c ++++ b/drivers/soc/qcom/rpmhpd.c +@@ -93,6 +93,7 @@ static struct rpmhpd sdm845_mx = { + + static struct rpmhpd sdm845_mx_ao = { + .pd = { .name = "mx_ao", }, ++ .active_only = true, + .peer = &sdm845_mx, + .res_name = "mx.lvl", + }; +@@ -107,6 +108,7 @@ static struct rpmhpd sdm845_cx = { + + static struct rpmhpd sdm845_cx_ao = { + .pd = { .name = "cx_ao", }, ++ .active_only = true, + .peer = &sdm845_cx, + .parent = &sdm845_mx_ao.pd, + .res_name = "cx.lvl", diff --git a/queue-5.4/tools-power-acpi-fix-compilation-error.patch b/queue-5.4/tools-power-acpi-fix-compilation-error.patch new file mode 100644 index 00000000000..f608f878bf4 --- /dev/null +++ b/queue-5.4/tools-power-acpi-fix-compilation-error.patch @@ -0,0 +1,50 @@ +From 1985f8c7f9a42a651a9750d6fcadc74336d182df Mon Sep 17 00:00:00 2001 +From: Zhengyuan Liu +Date: Sat, 14 Dec 2019 00:27:12 +0800 +Subject: tools/power/acpi: fix compilation error + +From: Zhengyuan Liu + +commit 1985f8c7f9a42a651a9750d6fcadc74336d182df upstream. + +If we compile tools/acpi target in the top source directory, we'd get a +compilation error showing as bellow: + + # make tools/acpi + DESCEND power/acpi + DESCEND tools/acpidbg + CC tools/acpidbg/acpidbg.o + Assembler messages: + Fatal error: can't create /home/lzy/kernel-upstream/power/acpi/\ + tools/acpidbg/acpidbg.o: No such file or directory + ../../Makefile.rules:26: recipe for target '/home/lzy/kernel-upstream/\ + power/acpi/tools/acpidbg/acpidbg.o' failed + make[3]: *** [/home/lzy/kernel-upstream//power/acpi/tools/acpidbg/\ + acpidbg.o] Error 1 + Makefile:19: recipe for target 'acpidbg' failed + make[2]: *** [acpidbg] Error 2 + Makefile:54: recipe for target 'acpi' failed + make[1]: *** [acpi] Error 2 + Makefile:1607: recipe for target 'tools/acpi' failed + make: *** [tools/acpi] Error 2 + +Fixes: d5a4b1a540b8 ("tools/power/acpi: Remove direct kernel source include reference") +Signed-off-by: Zhengyuan Liu +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + tools/power/acpi/Makefile.config | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/tools/power/acpi/Makefile.config ++++ b/tools/power/acpi/Makefile.config +@@ -15,7 +15,7 @@ include $(srctree)/../../scripts/Makefil + + OUTPUT=$(srctree)/ + ifeq ("$(origin O)", "command line") +- OUTPUT := $(O)/power/acpi/ ++ OUTPUT := $(O)/tools/power/acpi/ + endif + #$(info Determined 'OUTPUT' to be $(OUTPUT)) + diff --git a/queue-5.4/watchdog-qcom-use-platform_get_irq_optional-for-bark-irq.patch b/queue-5.4/watchdog-qcom-use-platform_get_irq_optional-for-bark-irq.patch new file mode 100644 index 00000000000..34985d44ae3 --- /dev/null +++ b/queue-5.4/watchdog-qcom-use-platform_get_irq_optional-for-bark-irq.patch @@ -0,0 +1,43 @@ +From e0b4f4e0cf7fa9d62628d4249c765ec18dffd143 Mon Sep 17 00:00:00 2001 +From: Sai Prakash Ranjan +Date: Fri, 13 Dec 2019 12:19:34 +0530 +Subject: watchdog: qcom: Use platform_get_irq_optional() for bark irq + +From: Sai Prakash Ranjan + +commit e0b4f4e0cf7fa9d62628d4249c765ec18dffd143 upstream. + +platform_get_irq() prints an error message when the interrupt +is not available. So on platforms where bark interrupt is +not specified, following error message is observed on SDM845. + +[ 2.975888] qcom_wdt 17980000.watchdog: IRQ index 0 not found + +This is also seen on SC7180, SM8150 SoCs as well. +Fix this by using platform_get_irq_optional() instead. + +Fixes: 36375491a4395654 ("watchdog: qcom: support pre-timeout when the bark irq is available") +Signed-off-by: Sai Prakash Ranjan +Reviewed-by: Bjorn Andersson +Reviewed-by: Guenter Roeck +Reviewed-by: Stephen Boyd +Link: https://lore.kernel.org/r/20191213064934.4112-1-saiprakash.ranjan@codeaurora.org +Signed-off-by: Guenter Roeck +Signed-off-by: Wim Van Sebroeck +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/watchdog/qcom-wdt.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/watchdog/qcom-wdt.c ++++ b/drivers/watchdog/qcom-wdt.c +@@ -246,7 +246,7 @@ static int qcom_wdt_probe(struct platfor + } + + /* check if there is pretimeout support */ +- irq = platform_get_irq(pdev, 0); ++ irq = platform_get_irq_optional(pdev, 0); + if (irq > 0) { + ret = devm_request_irq(dev, irq, qcom_wdt_isr, + IRQF_TRIGGER_RISING,