5.13.4-rc1 review
Subsystems (4)
Greg Kroah-Hartman
maintainerPATCH 309/351 reset: bail if try_module_get() fails
In reply to Greg Kroah-HartmanFrom: Philipp Zabel <[email protected]>
[ Upstream commit 4fb26fb83f0def3d39c14e268bcd4003aae8fade ]
Abort instead of returning a new reset control for a reset controller device that is going to have its module unloaded.
--- drivers/reset/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/reset/core.c +4 -1
@@ -774,7 +774,10 @@ static struct reset_control *__reset_control_get_internal(if (!rstc)return ERR_PTR (-ENOMEM ); -try_module_get (rcdev->owner); +if (!try_module_get (rcdev->owner)) { +kfree (rstc); +return ERR_PTR (-ENODEV ); + } rstc->rcdev = rcdev;list_add (&rstc->list, &rcdev->reset_control_head);
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 310/351 arm64: dts: renesas: r8a779a0: Drop power-domains property from GIC node
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 1771a33b34421050c7b830f0a8af703178ba9d36 ]
"make dtbs_check":
arm64/boot/dts/renesas/r8a779a0-falcon.dt.yaml: interrupt-controller@f1000000: 'power-domains' does not match any of the regexes: '^(msi-controller|gic-its|interrupt-controller)@[0-9a-f]+$', '^gic-its@', '^interrupt-controller@[0-9a-f]+$', 'pinctrl-[0-9]+'
From schema: Documentation/devicetree/bindings/interrupt-controller/arm,gic-v3.yaml
Remove the "power-domains" property, as the GIC on R-Car V3U is always-on, and not part of a clock domain.
--- arch/arm64/boot/dts/renesas/r8a779a0.dtsi | 1 - 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/renesas/r8a779a0.dtsi +0 -1
@@ -1096,7 +1096,6 @@ <0x0 0xf1060000 0 0x110000>; interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_HIGH)>; - power-domains = <&sysc R8A779A0_PD_ALWAYS_ON>; }; fcpvd0: fcp@fea10000 {
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 311/351 Revert "ARM: dts: bcm283x: increase dwc2s RX FIFO size"
In reply to Greg Kroah-HartmanFrom: Stefan Wahren <[email protected]>
[ Upstream commit 77daceabedb42482bb6200fa26047c5591716e45 ]
This reverts commit 278407a53c3b33fb820332c4d39eb39316c3879a.
The original change breaks USB config on Raspberry Pi Zero and Pi 4 B, because it exceeds the total fifo size of 4080. A naive attempt to reduce g-tx-fifo-size doesn't help on Raspberry Pi Zero. So better go back.
--- arch/arm/boot/dts/bcm283x-rpi-usb-otg.dtsi | 2 +- arch/arm/boot/dts/bcm283x-rpi-usb-peripheral.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/bcm283x-rpi-usb-otg.dtsi +1 -1
@@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 &usb { dr_mode = "otg"; - g-rx-fifo-size = <558>; + g-rx-fifo-size = <256>; g-np-tx-fifo-size = <32>; /* * According to dwc2 the sum of all device EP
arch/arm/boot/dts/bcm283x-rpi-usb-peripheral.dtsi +1 -1
@@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 &usb { dr_mode = "peripheral"; - g-rx-fifo-size = <558>; + g-rx-fifo-size = <256>; g-np-tx-fifo-size = <32>; g-tx-fifo-size = <256 256 512 512 512 768 768>; };
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 312/351 firmware: arm_scmi: Add delayed response status check
In reply to Greg Kroah-HartmanFrom: Cristian Marussi <[email protected]>
[ Upstream commit f1748b1ee1fa0fd1a074504045b530b62f949188 ]
A successfully received delayed response could anyway report a failure at the protocol layer in the message status field.
Add a check also for this error condition.
--- drivers/firmware/arm_scmi/driver.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/firmware/arm_scmi/driver.c +6 -2
@@ -517,8 +517,12 @@ static int do_xfer_with_response(const struct scmi_protocol_handle *ph, xfer->async_done = &async_response; ret =do_xfer (ph, xfer); -if (!ret && !wait_for_completion_timeout (xfer->async_done, timeout)) - ret = -ETIMEDOUT ; +if (!ret) { +if (!wait_for_completion_timeout (xfer->async_done, timeout)) + ret = -ETIMEDOUT ; +else if (xfer->hdr.status) + ret =scmi_to_linux_errno (xfer->hdr.status); + } xfer->async_done =NULL ;return ret;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 313/351 arm64: dts: ti: k3-j721e-main: Fix external refclk input to SERDES
In reply to Greg Kroah-HartmanFrom: Kishon Vijay Abraham I <[email protected]>
[ Upstream commit 5c6d0b55b46aeb91355e6a9616decf50a3778c91 ]
Rename the external refclk inputs to the SERDES from dummy_cmn_refclk/dummy_cmn_refclk1 to cmn_refclk/cmn_refclk1 respectively. Also move the external refclk DT nodes outside the cbass_main DT node. Since in j721e common processor board, only the cmn_refclk1 is connected to 100MHz clock, fix the clock frequency.
--- .../dts/ti/k3-j721e-common-proc-board.dts | 4 ++ arch/arm64/boot/dts/ti/k3-j721e-main.dtsi | 58 ++++++++++--------- 2 files changed, 34 insertions(+), 28 deletions(-)
arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts +4 -0
@@ -635,6 +635,10 @@ status = "disabled"; }; +&cmn_refclk1 { + clock-frequency = <100000000>; +}; + &serdes0 { serdes0_pcie_link: link@0 { reg = <0>;
arch/arm64/boot/dts/ti/k3-j721e-main.dtsi +30 -28
165 lines not on this page · raw message
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 314/351 arm64: dts: ti: k3-j721e-common-proc-board: Use external clock for SERDES
In reply to Greg Kroah-HartmanFrom: Kishon Vijay Abraham I <[email protected]>
[ Upstream commit f2a7657ad7a821de9cc77d071a5587b243144cd5 ]
Use external clock for all the SERDES used by PCIe controller. This will make the same clock used by the local SERDES as well as the clock provided to the PCIe connector.
--- .../dts/ti/k3-j721e-common-proc-board.dts | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+)
arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts +40 -0
@@ -9,6 +9,7 @@ #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/input/input.h> #include <dt-bindings/net/ti-dp83867.h> +#include <dt-bindings/phy/phy-cadence.h> / { chosen {
@@ -639,7 +640,40 @@ clock-frequency = <100000000>; }; +&wiz0_pll1_refclk { + assigned-clocks = <&wiz0_pll1_refclk>; + assigned-clock-parents = <&cmn_refclk1>; +}; + +&wiz0_refclk_dig { + assigned-clocks = <&wiz0_refclk_dig>; + assigned-clock-parents = <&cmn_refclk1>; +}; + +&wiz1_pll1_refclk { + assigned-clocks = <&wiz1_pll1_refclk>; + assigned-clock-parents = <&cmn_refclk1>; +}; + +&wiz1_refclk_dig { + assigned-clocks = <&wiz1_refclk_dig>; + assigned-clock-parents = <&cmn_refclk1>; +}; + +&wiz2_pll1_refclk { + assigned-clocks = <&wiz2_pll1_refclk>; + assigned-clock-parents = <&cmn_refclk1>; +}; + +&wiz2_refclk_dig { + assigned-clocks = <&wiz2_refclk_dig>; + assigned-clock-parents = <&cmn_refclk1>; +}; + &serdes0 { + assigned-clocks = <&serdes0 CDNS_SIERRA_PLL_CMNLC>; + assigned-clock-parents = <&wiz0_pll1_refclk>; + serdes0_pcie_link: link@0 { reg = <0>; cdns,num-lanes = <1>;
@@ -650,6 +684,9 @@ }; &serdes1 { + assigned-clocks = <&serdes1 CDNS_SIERRA_PLL_CMNLC>; + assigned-clock-parents = <&wiz1_pll1_refclk>; + serdes1_pcie_link: link@0 { reg = <0>; cdns,num-lanes = <2>;
@@ -660,6 +697,9 @@ }; &serdes2 { + assigned-clocks = <&serdes2 CDNS_SIERRA_PLL_CMNLC>; + assigned-clock-parents = <&wiz2_pll1_refclk>; + serdes2_pcie_link: link@0 { reg = <0>; cdns,num-lanes = <2>;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 315/351 arm64: dts: ti: k3-j721e-common-proc-board: Re-name "link" name as "phy"
In reply to Greg Kroah-HartmanFrom: Kishon Vijay Abraham I <[email protected]>
[ Upstream commit 02b4d9186121d842a53e347f53a86ec7f2c6b0c7 ]
Commit 66db854b1f62d ("arm64: dts: ti: k3-j721e-common-proc-board:
Configure the PCIe instances") and
commit 02c35dca2b488 ("arm64: dts: ti: k3-j721e: Enable Super-Speed support for USB0") added PHY DT nodes with node name as "link" However nodes with #phy-cells should be named 'phy' as discussed in [1]. Re-name subnodes of serdes in J721E to 'phy'.
[1] -> http://lore.kernel.org/r/20200909203631.GA3026331@bogus
--- arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts +4 -4
@@ -359,7 +359,7 @@ }; &serdes3 { - serdes3_usb_link: link@0 { + serdes3_usb_link: phy@0 { reg = <0>; cdns,num-lanes = <2>; #phy-cells = <0>;
@@ -674,7 +674,7 @@ assigned-clocks = <&serdes0 CDNS_SIERRA_PLL_CMNLC>; assigned-clock-parents = <&wiz0_pll1_refclk>; - serdes0_pcie_link: link@0 { + serdes0_pcie_link: phy@0 { reg = <0>; cdns,num-lanes = <1>; #phy-cells = <0>;
@@ -687,7 +687,7 @@ assigned-clocks = <&serdes1 CDNS_SIERRA_PLL_CMNLC>; assigned-clock-parents = <&wiz1_pll1_refclk>; - serdes1_pcie_link: link@0 { + serdes1_pcie_link: phy@0 { reg = <0>; cdns,num-lanes = <2>; #phy-cells = <0>;
@@ -700,7 +700,7 @@ assigned-clocks = <&serdes2 CDNS_SIERRA_PLL_CMNLC>; assigned-clock-parents = <&wiz2_pll1_refclk>; - serdes2_pcie_link: link@0 { + serdes2_pcie_link: phy@0 { reg = <0>; cdns,num-lanes = <2>; #phy-cells = <0>;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 316/351 memory: fsl_ifc: fix leak of IO mapping on probe failure
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 3b132ab67fc7a358fff35e808fa65d4bea452521 ]
On probe error the driver should unmap the IO memory. Smatch reports:
drivers/memory/fsl_ifc.c:298 fsl_ifc_ctrl_probe() warn: 'fsl_ifc_ctrl_dev->gregs' not released on lines: 298.
--- drivers/memory/fsl_ifc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/memory/fsl_ifc.c +2 -2
@@ -219,8 +219,7 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev) fsl_ifc_ctrl_dev->gregs =of_iomap (dev->dev.of_node,0 );if (!fsl_ifc_ctrl_dev->gregs) {dev_err (&dev->dev,"failed to get memory region\n" ); - ret = -ENODEV ; - goto err; +return -ENODEV ; }if (of_property_read_bool (dev->dev.of_node,"little-endian" )) {
@@ -295,6 +294,7 @@ err_irq:free_irq (fsl_ifc_ctrl_dev->irq, fsl_ifc_ctrl_dev);irq_dispose_mapping (fsl_ifc_ctrl_dev->irq); err: +iounmap (fsl_ifc_ctrl_dev->gregs);return ret; }
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 317/351 memory: fsl_ifc: fix leak of private memory on probe failure
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 8e0d09b1232d0538066c40ed4c13086faccbdff6 ]
On probe error the driver should free the memory allocated for private structure. Fix this by using resource-managed allocation.
--- drivers/memory/fsl_ifc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/memory/fsl_ifc.c +2 -2
@@ -97,7 +97,6 @@ static int fsl_ifc_ctrl_remove(struct platform_device *dev)iounmap (ctrl->gregs);dev_set_drvdata (&dev->dev,NULL ); -kfree (ctrl);return 0 ; }
@@ -209,7 +208,8 @@ static int fsl_ifc_ctrl_probe(struct platform_device *dev)dev_info (&dev->dev,"Freescale Integrated Flash Controller\n" ); - fsl_ifc_ctrl_dev =kzalloc (sizeof (*fsl_ifc_ctrl_dev),GFP_KERNEL ); + fsl_ifc_ctrl_dev =devm_kzalloc (&dev->dev,sizeof (*fsl_ifc_ctrl_dev), +GFP_KERNEL );if (!fsl_ifc_ctrl_dev)return -ENOMEM ;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 318/351 arm64: dts: allwinner: a64-sopine-baseboard: change RGMII mode to TXID
In reply to Greg Kroah-HartmanFrom: Icenowy Zheng <[email protected]>
[ Upstream commit bd5431b2f9b30a70f6ed964dd5ee9a6d1c397c06 ]
Although the schematics of Pine A64-LTS and SoPine Baseboard shows both the RX and TX internal delay are enabled, they're using the same broken RTL8211E chip batch with Pine A64+, so they should use TXID instead, not ID.
In addition, by checking the real components soldered on both a SoPine Baseboard and a Pine A64-LTS, RX delay is not enabled (GR69 soldered and GR70 NC) despite the schematics says it's enabled. It's a common situation for Pine64 boards that the NC information on schematics is not the same with the board.
So the RGMII delay mode should be TXID on these boards.
--- arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts +1 -1
@@ -79,7 +79,7 @@ &emac { pinctrl-names = "default"; pinctrl-0 = <&rgmii_pins>; - phy-mode = "rgmii-id"; + phy-mode = "rgmii-txid"; phy-handle = <&ext_rgmii_phy>; phy-supply = <®_dc1sw>; status = "okay";
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 319/351 ARM: dts: dra7: Fix duplicate USB4 target module node
In reply to Greg Kroah-HartmanFrom: Gowtham Tammana <[email protected]>
[ Upstream commit 78b4b165280d3d70e7a217599f0c06a4c0bb11f9 ]
With [1] USB4 target-module node got defined in dra74x.dtsi file. However, the earlier definition in [2] was not removed, and this duplication of the target module is causing boot failure on dra74 variant boards - dra7-evm, dra76-evm.
USB4 is only present in DRA74x variants, so keeping the entry in dra74x.dtsi and removing it from the top level interconnect hierarchy dra7-l4.dtsi file. This change makes the USB4 target module no longer visible to AM5718, DRA71x and DRA72x so removing references to it in their respective dts files.
[1]: commit c7b72abca61ec ("ARM: OMAP2+: Drop legacy platform data for dra7 dwc3")
[2]: commit 549fce068a311 ("ARM: dts: dra7: Add l4 interconnect hierarchy and ti-sysc data")
--- arch/arm/boot/dts/am5718.dtsi | 6 +-- arch/arm/boot/dts/dra7-l4.dtsi | 22 -------- arch/arm/boot/dts/dra71x.dtsi | 4 -- arch/arm/boot/dts/dra72x.dtsi | 4 -- arch/arm/boot/dts/dra74x.dtsi | 92 ++++++++++++++++++---------------- 5 files changed, 50 insertions(+), 78 deletions(-)
arch/arm/boot/dts/am5718.dtsi +1 -5
@@ -17,17 +17,13 @@ * VCP1, VCP2 * MLB * ISS - * USB3, USB4 + * USB3 */ &usb3_tm { status = "disabled"; }; -&usb4_tm { - status = "disabled"; -}; - &atl_tm { status = "disabled"; };
arch/arm/boot/dts/dra7-l4.dtsi +0 -22
@@ -4129,28 +4129,6 @@ }; }; - usb4_tm: target-module@140000 { /* 0x48940000, ap 75 3c.0 */ - compatible = "ti,sysc-omap4", "ti,sysc"; - reg = <0x140000 0x4>, - <0x140010 0x4>; - reg-names = "rev", "sysc"; - ti,sysc-mask = <SYSC_OMAP4_DMADISABLE>; - ti,sysc-midle = <SYSC_IDLE_FORCE>, - <SYSC_IDLE_NO>, - <SYSC_IDLE_SMART>, - <SYSC_IDLE_SMART_WKUP>; - ti,sysc-sidle = <SYSC_IDLE_FORCE>, - <SYSC_IDLE_NO>, - <SYSC_IDLE_SMART>, - <SYSC_IDLE_SMART_WKUP>; - /* Domains (P, C): l3init_pwrdm, l3init_clkdm */ - clocks = <&l3init_clkctrl DRA7_L3INIT_USB_OTG_SS4_CLKCTRL 0>; - clock-names = "fck"; - #address-cells = <1>; - #size-cells = <1>; - ranges = <0x0 0x140000 0x20000>; - }; - target-module@170000 { /* 0x48970000, ap 21 0a.0 */ compatible = "ti,sysc-omap4", "ti,sysc"; reg = <0x170010 0x4>;
arch/arm/boot/dts/dra71x.dtsi +0 -4
@@ -11,7 +11,3 @@ &rtctarget { status = "disabled"; }; - -&usb4_tm { - status = "disabled"; -};
arch/arm/boot/dts/dra72x.dtsi +0 -4
@@ -108,7 +108,3 @@ &pcie2_rc { compatible = "ti,dra726-pcie-rc", "ti,dra7-pcie"; }; - -&usb4_tm { - status = "disabled"; -};
arch/arm/boot/dts/dra74x.dtsi +49 -43
101 lines not on this page · raw message
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 320/351 ARM: dts: am335x: align ti,pindir-d0-out-d1-in property with dt-shema
In reply to Greg Kroah-HartmanFrom: Aswath Govindraju <[email protected]>
[ Upstream commit 414bfe1d26b60ef20b58e36efd5363188a694bab ]
ti,pindir-d0-out-d1-in property is expected to be of type boolean. Therefore, fix the property accordingly.
--- arch/arm/boot/dts/am335x-cm-t335.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/am335x-cm-t335.dts +1 -1
@@ -496,7 +496,7 @@ status = "okay"; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&spi0_pins>; - ti,pindir-d0-out-d1-in = <1>; + ti,pindir-d0-out-d1-in; /* WLS1271 WiFi */ wlcore: wlcore@1 { compatible = "ti,wl1271";
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 321/351 ARM: dts: am437x: align ti,pindir-d0-out-d1-in property with dt-shema
In reply to Greg Kroah-HartmanFrom: Aswath Govindraju <[email protected]>
[ Upstream commit 9b11fec7345f21995f4ea4bafb0e108b9a620238 ]
ti,pindir-d0-out-d1-in property is expected to be of type boolean. Therefore, fix the property accordingly.
--- arch/arm/boot/dts/am43x-epos-evm.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am43x-epos-evm.dts +2 -2
@@ -860,7 +860,7 @@ pinctrl-names = "default", "sleep"; pinctrl-0 = <&spi0_pins_default>; pinctrl-1 = <&spi0_pins_sleep>; - ti,pindir-d0-out-d1-in = <1>; + ti,pindir-d0-out-d1-in; }; &spi1 {
@@ -868,7 +868,7 @@ pinctrl-names = "default", "sleep"; pinctrl-0 = <&spi1_pins_default>; pinctrl-1 = <&spi1_pins_sleep>; - ti,pindir-d0-out-d1-in = <1>; + ti,pindir-d0-out-d1-in; }; &usb2_phy1 {
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 322/351 thermal/drivers/sprd: Add missing MODULE_DEVICE_TABLE
In reply to Greg Kroah-HartmanFrom: Chunyan Zhang <[email protected]>
[ Upstream commit 4d57fd9aeaa013a245bf1fade81e2c30a5efd491 ]
MODULE_DEVICE_TABLE is used to extract the device information out of the driver and builds a table when being compiled. If using this macro, kernel can find the driver if available when the device is plugged in, and then loads that driver and initializes the device.
--- drivers/thermal/sprd_thermal.c | 1 + 1 file changed, 1 insertion(+)
drivers/thermal/sprd_thermal.c +1 -0
@@ -532,6 +532,7 @@ static const struct of_device_id sprd_thermal_of_match[] = { { .compatible = "sprd,ums512-thermal", .data = &ums512_data }, { }, }; +MODULE_DEVICE_TABLE (of, sprd_thermal_of_match);static const struct dev_pm_ops sprd_thermal_pm_ops = {SET_SYSTEM_SLEEP_PM_OPS (sprd_thm_suspend, sprd_thm_resume)
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 323/351 ARM: dts: imx6q-dhcom: Fix ethernet reset time properties
In reply to Greg Kroah-HartmanFrom: Christoph Niedermaier <[email protected]>
[ Upstream commit c016c26c1631f539c652b5d82242a3ca402545c1 ]
Fix ethernet reset time properties as described in Documentation/devicetree/bindings/net/ethernet-phy.yaml
--- arch/arm/boot/dts/imx6q-dhcom-som.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/imx6q-dhcom-som.dtsi +2 -2
@@ -96,8 +96,8 @@ reg = <0>; max-speed = <100>; reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; - reset-delay-us = <1000>; - reset-post-delay-us = <1000>; + reset-assert-us = <1000>; + reset-deassert-us = <1000>; }; }; };
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 324/351 ARM: dts: imx6q-dhcom: Fix ethernet plugin detection problems
In reply to Greg Kroah-HartmanFrom: Christoph Niedermaier <[email protected]>
[ Upstream commit e2bdd3484890441b9cc2560413a86e8f2aa04157 ]
To make the ethernet cable plugin detection reliable the power detection of the smsc phy has been disabled.
--- arch/arm/boot/dts/imx6q-dhcom-som.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/imx6q-dhcom-som.dtsi +1 -0
@@ -98,6 +98,7 @@ reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; reset-assert-us = <1000>; reset-deassert-us = <1000>; + smsc,disable-energy-detect; /* Make plugin detection reliable */ }; }; };
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 325/351 ARM: dts: imx6q-dhcom: Add gpios pinctrl for i2c bus recovery
In reply to Greg Kroah-HartmanFrom: Christoph Niedermaier <[email protected]>
[ Upstream commit ddc873cd3c0af4faad6a00bffda21c3f775126dd ]
The i2c bus can freeze at the end of transaction so the bus can no longer work. This scenario is improved by adding scl/sda gpios definitions to implement the i2c bus recovery mechanism.
--- arch/arm/boot/dts/imx6q-dhcom-som.dtsi | 36 +++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-)
arch/arm/boot/dts/imx6q-dhcom-som.dtsi +33 -3
@@ -105,22 +105,31 @@ &i2c1 { clock-frequency = <100000>; - pinctrl-names = "default"; + pinctrl-names = "default", "gpio"; pinctrl-0 = <&pinctrl_i2c1>; + pinctrl-1 = <&pinctrl_i2c1_gpio>; + scl-gpios = <&gpio3 21 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + sda-gpios = <&gpio3 28 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; status = "okay"; }; &i2c2 { clock-frequency = <100000>; - pinctrl-names = "default"; + pinctrl-names = "default", "gpio"; pinctrl-0 = <&pinctrl_i2c2>; + pinctrl-1 = <&pinctrl_i2c2_gpio>; + scl-gpios = <&gpio4 12 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + sda-gpios = <&gpio4 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; status = "okay"; }; &i2c3 { clock-frequency = <100000>; - pinctrl-names = "default"; + pinctrl-names = "default", "gpio"; pinctrl-0 = <&pinctrl_i2c3>; + pinctrl-1 = <&pinctrl_i2c3_gpio>; + scl-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + sda-gpios = <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; status = "okay"; ltc3676: pmic@3c {
@@ -286,6 +295,13 @@ >; }; + pinctrl_i2c1_gpio: i2c1-gpio-grp { + fsl,pins = < + MX6QDL_PAD_EIM_D21__GPIO3_IO21 0x4001b8b1 + MX6QDL_PAD_EIM_D28__GPIO3_IO28 0x4001b8b1 + >; + }; + pinctrl_i2c2: i2c2-grp { fsl,pins = < MX6QDL_PAD_KEY_COL3__I2C2_SCL 0x4001b8b1
@@ -293,6 +309,13 @@ >; }; + pinctrl_i2c2_gpio: i2c2-gpio-grp { + fsl,pins = < + MX6QDL_PAD_KEY_COL3__GPIO4_IO12 0x4001b8b1 + MX6QDL_PAD_KEY_ROW3__GPIO4_IO13 0x4001b8b1 + >; + }; + pinctrl_i2c3: i2c3-grp { fsl,pins = < MX6QDL_PAD_GPIO_3__I2C3_SCL 0x4001b8b1
@@ -300,6 +323,13 @@ >; }; + pinctrl_i2c3_gpio: i2c3-gpio-grp { + fsl,pins = < + MX6QDL_PAD_GPIO_3__GPIO1_IO03 0x4001b8b1 + MX6QDL_PAD_GPIO_6__GPIO1_IO06 0x4001b8b1 + >; + }; + pinctrl_pmic_hw300: pmic-hw300-grp { fsl,pins = < MX6QDL_PAD_EIM_A25__GPIO5_IO02 0x1B0B0
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 326/351 arm64: dts: ti: k3-am642-main: fix ports mac properties
In reply to Greg Kroah-HartmanFrom: Grygorii Strashko <[email protected]>
[ Upstream commit 50c9bfca1bfe9ffd56d8c5deecf9204d14e20bfd ]
The current device tree CPSW3g node adds non-zero "mac-address" property to the ports, which prevents random MAC address assignment to network devices if bootloader failed to update DT. This may cause more then one host to have the same MAC in the network.
mac-address = [00 00 de ad be ef];
mac-address = [00 01 de ad be ef];
In addition, there is one MAC address available in eFuse registers which can be used for default port 1.
Hence, fix ports MAC properties by:
- resetting "mac-address" property to 0
- adding ti,syscon-efuse = <&main_conf 0x200> to Port 1
--- arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/ti/k3-am64-main.dtsi +3 -2
@@ -489,7 +489,8 @@ ti,mac-only; label = "port1"; phys = <&phy_gmii_sel 1>; - mac-address = [00 00 de ad be ef]; + mac-address = [00 00 00 00 00 00]; + ti,syscon-efuse = <&main_conf 0x200>; }; cpsw_port2: port@2 {
@@ -497,7 +498,7 @@ ti,mac-only; label = "port2"; phys = <&phy_gmii_sel 2>; - mac-address = [00 01 de ad be ef]; + mac-address = [00 00 00 00 00 00]; }; };
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 327/351 arm64: dts: ti: am65: align ti,pindir-d0-out-d1-in property with dt-shema
In reply to Greg Kroah-HartmanFrom: Aswath Govindraju <[email protected]>
[ Upstream commit 4f76ea7b4da1cce9a9bda1fa678ef8036584c66b ]
ti,pindir-d0-out-d1-in property is expected to be of type boolean. Therefore, fix the property accordingly.
--- arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi | 2 +- arch/arm64/boot/dts/ti/k3-am654-base-board.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/ti/k3-am65-iot2050-common.dtsi +1 -1
@@ -575,7 +575,7 @@ #address-cells = <1>; #size-cells= <0>; - ti,pindir-d0-out-d1-in = <1>; + ti,pindir-d0-out-d1-in; }; &tscadc0 {
arch/arm64/boot/dts/ti/k3-am654-base-board.dts +1 -1
@@ -299,7 +299,7 @@ pinctrl-0 = <&main_spi0_pins_default>; #address-cells = <1>; #size-cells= <0>; - ti,pindir-d0-out-d1-in = <1>; + ti,pindir-d0-out-d1-in; flash@0{ compatible = "jedec,spi-nor";
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 328/351 arm64: dts: ti: k3-am642-evm: align ti,pindir-d0-out-d1-in property with dt-shema
In reply to Greg Kroah-HartmanFrom: Aswath Govindraju <[email protected]>
[ Upstream commit d3f1b155c04d949c843e6028034766aba1e0f8bf ]
ti,pindir-d0-out-d1-in property is expected to be of type boolean. Therefore, fix the property accordingly.
--- arch/arm64/boot/dts/ti/k3-am642-evm.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am642-evm.dts +1 -1
@@ -334,7 +334,7 @@ &main_spi0 { pinctrl-names = "default"; pinctrl-0 = <&main_spi0_pins_default>; - ti,pindir-d0-out-d1-in = <1>; + ti,pindir-d0-out-d1-in; eeprom@0 { compatible = "microchip,93lc46b"; reg = <0>;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 329/351 thermal/drivers/rcar_gen3_thermal: Fix coefficient calculations
In reply to Greg Kroah-HartmanFrom: Niklas Söderlund <[email protected]>
[ Upstream commit 8946187ab57ffd02088e50256c73dd31f49db06d ]
The fixed value of 157 used in the calculations are only correct for M3-W, on other Gen3 SoC it should be 167. The constant can be derived correctly from the static TJ_3 constant and the SoC specific TJ_1 value. Update the calculation be correct on all Gen3 SoCs.
--- drivers/thermal/rcar_gen3_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/rcar_gen3_thermal.c +1 -1
@@ -143,7 +143,7 @@ static void rcar_gen3_thermal_calc_coefs(struct rcar_gen3_thermal_tsc *tsc,* Division is not scaled in BSP and if scaled it might overflow * the dividend (4095 * 4095 << 14 > INT_MAX) so keep it unscaled */ - tsc->tj_t = (FIXPT_INT ((ptat[1 ] - ptat[2 ]) *157 ) + tsc->tj_t = (FIXPT_INT ((ptat[1 ] - ptat[2 ]) * (ths_tj_1 -TJ_3 )) / (ptat[0 ] - ptat[2 ])) +FIXPT_INT (TJ_3 ); tsc->coef.a1 = FIXPT_DIV(FIXPT_INT(thcode[1] - thcode[2]),
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 330/351 kbuild: remove trailing slashes from $(KBUILD_EXTMOD)
In reply to Greg Kroah-HartmanFrom: Masahiro Yamada <[email protected]>
[ Upstream commit 74ee585b7eecd98be3650e677625a0ee588d08e0 ]
M= (or KBUILD_EXTMOD) generally expects a directory path without any trailing slashes, like M=a/b/c.
If you add a trailing slash, like M=a/b/c/, you will get ugly build logs (two slashes in a series), but it still works fine as long as it is consistent between 'make modules' and 'make modules_install'.
The following commands correctly build and install the modules.
$ make M=a/b/c/ modules $ sudo make M=a/b/c/ modules_install
Since commit ccae4cfa7bfb ("kbuild: refactor scripts/Makefile.modinst"), a problem happens if you add a trailing slash only for modules_install.
$ make M=a/b/c modules $ sudo make M=a/b/c/ modules_install
No module is installed in this case, Johannes Berg reported. [1]
Trim any trailing slashes from $(KBUILD_EXTMOD).
I used the 'dirname' command to remove all the trailing slashes in case someone adds more slashes like M=a/b/c/////. The Make's built-in function, $(dir ...) cannot take care of such a case.
[1]: https://lore.kernel.org/lkml/[email protected]/
--- Makefile | 5 +++++ 1 file changed, 5 insertions(+)
Makefile +5 -0
@@ -129,6 +129,11 @@ endif $(if $(word 2, $(KBUILD_EXTMOD)), \ $(error building multiple external modules is not supported)) +# Remove trailing slashes +ifneq ($(filter %/, $(KBUILD_EXTMOD)),) +KBUILD_EXTMOD := $(shell dirname $(KBUILD_EXTMOD).) +endif + export KBUILD_EXTMOD # Kbuild will save output files in the current working directory.
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 331/351 firmware: turris-mox-rwtm: fix reply status decoding function
In reply to Greg Kroah-HartmanFrom: Marek Behún <[email protected]>
[ Upstream commit e34e60253d9272311831daed8a2d967cf80ca3dc ]
The status decoding function mox_get_status() currently contains an incorrect check: if the error status is not MBOX_STS_SUCCESS, it always returns -EIO, so the comparison to MBOX_STS_FAIL is never executed and we don't get the actual error code sent by the firmware.
Fix this.
--- drivers/firmware/turris-mox-rwtm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/firmware/turris-mox-rwtm.c +5 -2
@@ -147,11 +147,14 @@ MOX_ATTR_RO(pubkey, "%s\n", pubkey);static int mox_get_status (enum mbox_cmd cmd,u32 retval) { -if (MBOX_STS_CMD (retval) != cmd || -MBOX_STS_ERROR (retval) !=MBOX_STS_SUCCESS ) +if (MBOX_STS_CMD (retval) != cmd)return -EIO ;else if (MBOX_STS_ERROR (retval) ==MBOX_STS_FAIL )return -(int )MBOX_STS_VALUE (retval); +else if (MBOX_STS_ERROR (retval) ==MBOX_STS_BADCMD ) +return -ENOSYS ; +else if (MBOX_STS_ERROR (retval) !=MBOX_STS_SUCCESS ) +return -EIO ;else return MBOX_STS_VALUE (retval); }
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 332/351 firmware: turris-mox-rwtm: report failures better
In reply to Greg Kroah-HartmanFrom: Marek Behún <[email protected]>
[ Upstream commit 72f99888944c44de1c899bbe44db1e53bdc9d994 ]
Report a notice level message if a command is not supported by the rWTM firmware.
This should not be an error, merely a notice, because the firmware can be used on boards that do not have manufacturing information burned.
--- drivers/firmware/turris-mox-rwtm.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
drivers/firmware/turris-mox-rwtm.c +12 -6
@@ -204,11 +204,14 @@ static int mox_get_board_info(struct mox_rwtm *rwtm)return ret; ret =mox_get_status (MBOX_CMD_BOARD_INFO , reply->retval); -if (ret <0 && ret != -ENODATA ) { -return ret; - }else if (ret == -ENODATA ) { +if (ret == -ENODATA ) {dev_warn (rwtm->dev,"Board does not have manufacturing information burned!\n" ); + }else if (ret == -ENOSYS ) { +dev_notice (rwtm->dev, +"Firmware does not support the BOARD_INFO command\n" ); + }else if (ret <0 ) { +return ret; }else { rwtm->serial_number = reply->status[1 ]; rwtm->serial_number <<=32 ;
@@ -237,10 +240,13 @@ static int mox_get_board_info(struct mox_rwtm *rwtm)return ret; ret =mox_get_status (MBOX_CMD_ECDSA_PUB_KEY , reply->retval); -if (ret <0 && ret != -ENODATA ) { -return ret; - }else if (ret == -ENODATA ) { +if (ret == -ENODATA ) {dev_warn (rwtm->dev,"Board has no public key burned!\n" ); + }else if (ret == -ENOSYS ) { +dev_notice (rwtm->dev, +"Firmware does not support the ECDSA_PUB_KEY command\n" ); + }else if (ret <0 ) { +return ret; }else {u32 *s = reply->status;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 333/351 firmware: turris-mox-rwtm: fail probing when firmware does not support hwrng
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit 2eab59cf0d2036a5a9e264f719b71c21ccf679c2 ]
When Marvell's rWTM firmware, which does not support the GET_RANDOM command, is used, kernel prints an error message
hwrng: no data available
every 10 seconds.
Fail probing of this driver if the rWTM firmware does not support the GET_RANDOM command.
--- drivers/firmware/turris-mox-rwtm.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
drivers/firmware/turris-mox-rwtm.c +28 -0
@@ -260,6 +260,27 @@ static int mox_get_board_info(struct mox_rwtm *rwtm)return 0 ; } +static int check_get_random_support (struct mox_rwtm *rwtm) +{ +struct armada_37xx_rwtm_tx_msg msg; +int ret; + + msg.command =MBOX_CMD_GET_RANDOM ; + msg.args[0 ] =1 ; + msg.args[1 ] = rwtm->buf_phys; + msg.args[2 ] =4 ; + + ret =mbox_send_message (rwtm->mbox, &msg); +if (ret <0 ) +return ret; + + ret =wait_for_completion_timeout (&rwtm->cmd_done,HZ /2 ); +if (ret <0 ) +return ret; + +return mox_get_status (MBOX_CMD_GET_RANDOM , rwtm->reply.retval); +} +static int mox_hwrng_read (struct hwrng *rng,void *data,size_t max,bool wait) {struct mox_rwtm *rwtm = (struct mox_rwtm *) rng->priv;
@@ -497,6 +518,13 @@ static int turris_mox_rwtm_probe(struct platform_device *pdev)if (ret <0 )dev_warn (dev,"Cannot read board information: %i\n" , ret); + ret =check_get_random_support (rwtm); +if (ret <0 ) { +dev_notice (dev, +"Firmware does not support the GET_RANDOM command\n" ); + goto free_channel; + } + rwtm->hwrng.name =DRIVER_NAME "_hwrng" ; rwtm->hwrng.read = mox_hwrng_read; rwtm->hwrng.priv = (unsigned long ) rwtm;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 334/351 firmware: turris-mox-rwtm: show message about HWRNG registration
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
[ Upstream commit fae20160992269431507708fb74c1fd9f3c309c1 ]
Currently it is hard to determinate if on Armada 3720 device is HWRNG by running kernel accessible or not. So print information message into dmesg when HWRNG is available and registration was successful.
--- drivers/firmware/turris-mox-rwtm.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/firmware/turris-mox-rwtm.c +2 -0
@@ -542,6 +542,8 @@ static int turris_mox_rwtm_probe(struct platform_device *pdev) goto free_channel; } +dev_info (dev,"HWRNG successfully registered\n" ); +return 0 ; free_channel:
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 335/351 arm64: dts: rockchip: Re-add regulator-boot-on, regulator-always-on for vdd_gpu on rk3399-roc-pc
In reply to Greg Kroah-HartmanFrom: Alex Bee <[email protected]>
[ Upstream commit 06b2818678d9b35102c9816ffaf6893caf306ed0 ]
This might be a limitation of either the current panfrost driver devfreq implementation or how the gpu is implemented in RK3399 SoC. The gpu regulator must never get disabled or the registers get (randomly?) inaccessable by the driver. (see all other RK3399 boards)
--- arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +2 -0
@@ -493,6 +493,8 @@ regulator-min-microvolt = <712500>; regulator-max-microvolt = <1500000>; regulator-ramp-delay = <1000>; + regulator-always-on; + regulator-boot-on; vin-supply = <&vcc3v3_sys>; regulator-state-mem {
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 336/351 arm64: dts: rockchip: Re-add regulator-always-on for vcc_sdio for rk3399-roc-pc
In reply to Greg Kroah-HartmanFrom: Alex Bee <[email protected]>
[ Upstream commit eb607cd4957fb0ef97beb2a8293478be6a54240a ]
Re-add the regulator-always-on property for vcc_sdio which supplies sdmmc, since it gets disabled during reboot now and the bootrom expects it to be enabled when booting from SD card. This makes rebooting impossible in that case and requires a hard reset to boot again.
--- arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +1 -0
@@ -389,6 +389,7 @@ vcc_sdio: LDO_REG4 { regulator-name = "vcc_sdio"; + regulator-always-on; regulator-boot-on; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3000000>;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 337/351 scsi: be2iscsi: Fix an error handling path in beiscsi_dev_probe()
In reply to Greg Kroah-HartmanFrom: Christophe JAILLET <[email protected]>
[ Upstream commit 030e4138d11fced3b831c2761e4cecf347bae99c ]
If an error occurs after a pci_enable_pcie_error_reporting() call, it must be undone by a corresponding pci_disable_pcie_error_reporting() call, as already done in the remove function.
--- drivers/scsi/be2iscsi/be_main.c | 1 + 1 file changed, 1 insertion(+)
drivers/scsi/be2iscsi/be_main.c +1 -0
@@ -5745,6 +5745,7 @@ free_hba:pci_disable_msix (phba->pcidev);pci_dev_put (phba->pcidev);iscsi_host_free (phba->shost); +pci_disable_pcie_error_reporting (pcidev);pci_set_drvdata (pcidev,NULL ); disable_pci:pci_release_regions (pcidev);
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 338/351 sched/uclamp: Ignore max aggregation if rq is idle
In reply to Greg Kroah-HartmanFrom: Xuewen Yan <[email protected]>
[ Upstream commit 3e1493f46390618ea78607cb30c58fc19e2a5035 ]
When a task wakes up on an idle rq, uclamp_rq_util_with() would max aggregate with rq value. But since there is no task enqueued yet, the values are stale based on the last task that was running. When the new task actually wakes up and enqueued, then the rq uclamp values should reflect that of the newly woken up task effective uclamp values.
This is a problem particularly for uclamp_max because it default to 1024. If a task p with uclamp_max = 512 wakes up, then max aggregation would ignore the capping that should apply when this task is enqueued, which is wrong.
Fix that by ignoring max aggregation if the rq is idle since in that case the effective uclamp value of the rq will be the ones of the task that will wake up.
--- kernel/sched/sched.h | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
kernel/sched/sched.h +14 -7
@@ -2539,20 +2539,27 @@ static __always_inlineunsigned long uclamp_rq_util_with (struct rq *rq,unsigned long util,struct task_struct *p) { -unsigned long min_util; -unsigned long max_util; +unsigned long min_util =0 ; +unsigned long max_util =0 ;if (!static_branch_likely (&sched_uclamp_used))return util; - min_util =READ_ONCE (rq->uclamp[UCLAMP_MIN ].value); - max_util =READ_ONCE (rq->uclamp[UCLAMP_MAX ].value); -if (p) { - min_util =max (min_util,uclamp_eff_value (p,UCLAMP_MIN )); - max_util =max (max_util,uclamp_eff_value (p,UCLAMP_MAX )); + min_util =uclamp_eff_value (p,UCLAMP_MIN ); + max_util =uclamp_eff_value (p,UCLAMP_MAX ); + +/* +* Ignore last runnable task's max clamp, as this task will +* reset it. Similarly, no need to read the rq's min clamp. +*/ +if (rq->uclamp_flags &UCLAMP_FLAG_IDLE ) + goto out; } + min_util = max_t(unsigned long, min_util, READ_ONCE(rq->uclamp[UCLAMP_MIN].value)); + max_util = max_t(unsigned long, max_util, READ_ONCE(rq->uclamp[UCLAMP_MAX].value)); +out:/* * Since CPU's {min,max}_util clamps are MAX aggregated considering * RUNNABLE tasks with _different_ clamps, we can end up with an
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 339/351 jump_label: Fix jump_label_text_reserved() vs __init
In reply to Greg Kroah-HartmanFrom: Peter Zijlstra <[email protected]>
[ Upstream commit 9e667624c291753b8a5128f620f493d0b5226063 ]
It turns out that jump_label_text_reserved() was reporting __init text as being reserved past the time when the __init text was freed and re-used.
For a long time, this resulted in, at worst, not being able to kprobe text that happened to land at the re-used address. However a recent commit e7bf1ba97afd ("jump_label, x86: Emit short JMP") made it a fatal mistake because it now needs to read the instruction in order to determine the conflict -- an instruction that's no longer there.
--- kernel/jump_label.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
kernel/jump_label.c +8 -5
@@ -316,14 +316,16 @@ static int addr_conflict(struct jump_entry *entry, void *start, void *end) }static int __jump_label_text_reserved (struct jump_entry *iter_start, -struct jump_entry *iter_stop,void *start,void *end) +struct jump_entry *iter_stop,void *start,void *end,bool init) {struct jump_entry *iter; iter = iter_start;while (iter < iter_stop) { -if (addr_conflict (iter, start, end)) -return 1 ; +if (init || !jump_entry_is_init (iter)) { +if (addr_conflict (iter, start, end)) +return 1 ; + } iter++; }
@@ -561,7 +563,7 @@ static int __jump_label_mod_text_reserved(void *start, void *end) ret =__jump_label_text_reserved (mod->jump_entries, mod->jump_entries + mod->num_jump_entries, - start, end); + start, end, mod->state ==MODULE_STATE_COMING );module_put (mod);
@@ -786,8 +788,9 @@ early_initcall(jump_label_init_module);*/ int jump_label_text_reserved (void *start,void *end) { +bool init = system_state <SYSTEM_RUNNING ;int ret =__jump_label_text_reserved (__start___jump_table, - __stop___jump_table, start, end); + __stop___jump_table, start, end, init);if (ret)return ret;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 340/351 static_call: Fix static_call_text_reserved() vs __init
In reply to Greg Kroah-HartmanFrom: Peter Zijlstra <[email protected]>
[ Upstream commit 2bee6d16e4379326b1eea454e68c98b17456769e ]
It turns out that static_call_text_reserved() was reporting __init text as being reserved past the time when the __init text was freed and re-used.
This is mostly harmless and will at worst result in refusing a kprobe.
--- kernel/static_call.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
kernel/static_call.c +8 -5
@@ -292,13 +292,15 @@ static int addr_conflict(struct static_call_site *site, void *start, void *end)static int __static_call_text_reserved (struct static_call_site *iter_start,struct static_call_site *iter_stop, -void *start,void *end) +void *start,void *end,bool init) {struct static_call_site *iter = iter_start;while (iter < iter_stop) { -if (addr_conflict (iter, start, end)) -return 1 ; +if (init || !static_call_is_init (iter)) { +if (addr_conflict (iter, start, end)) +return 1 ; + } iter++; }
@@ -324,7 +326,7 @@ static int __static_call_mod_text_reserved(void *start, void *end) ret =__static_call_text_reserved (mod->static_call_sites, mod->static_call_sites + mod->num_static_call_sites, - start, end); + start, end, mod->state ==MODULE_STATE_COMING );module_put (mod);
@@ -459,8 +461,9 @@ static inline int __static_call_mod_text_reserved(void *start, void *end)int static_call_text_reserved (void *start,void *end) { +bool init = system_state <SYSTEM_RUNNING ;int ret =__static_call_text_reserved (__start_static_call_sites, - __stop_static_call_sites, start, end); + __stop_static_call_sites, start, end, init);if (ret)return ret;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 341/351 kprobe/static_call: Restore missing static_call_text_reserved()
In reply to Greg Kroah-HartmanFrom: Peter Zijlstra <[email protected]>
[ Upstream commit fa68bd09fc62240a383c0c601d3349c47db10c34 ]
Restore two hunks from commit:
6333e8f73b83 ("static_call: Avoid kprobes on inline static_call()s")
that went walkabout in a Git merge commit.
--- kernel/kprobes.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/kprobes.c +2 -0
@@ -35,6 +35,7 @@#include <linux/ftrace.h> #include <linux/cpu.h> #include <linux/jump_label.h> +#include <linux/static_call.h> #include <linux/perf_event.h> #include <asm/sections.h>
@@ -1569,6 +1570,7 @@ static int check_kprobe_address_safe(struct kprobe *p,if (!kernel_text_address ((unsigned long ) p->addr) ||within_kprobe_blacklist ((unsigned long ) p->addr) ||jump_label_text_reserved (p->addr, p->addr) || +static_call_text_reserved (p->addr, p->addr) ||find_bug ((unsigned long )p->addr)) { ret = -EINVAL ; goto out;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 342/351 mips: always link byteswap helpers into decompressor
In reply to Greg Kroah-HartmanFrom: Arnd Bergmann <[email protected]>
[ Upstream commit cddc40f5617e53f97ef019d5b29c1bd6cbb031ec ]
My series to clean up the unaligned access implementation across architectures caused some mips randconfig builds to fail with:
mips64-linux-ld: arch/mips/boot/compressed/decompress.o: in function `decompress_kernel':
decompress.c:(.text.decompress_kernel+0x54): undefined reference to `__bswapsi2'
It turns out that this problem has already been fixed for the XZ decompressor but now it also shows up in (at least) LZO and LZ4. From my analysis I concluded that the compiler could always have emitted those calls, but the different implementation allowed it to make otherwise better decisions about not inlining the byteswap, which results in the link error when the out-of-line code is missing.
While it could be addressed by adding it to the two decompressor implementations that are known to be affected, but as this only adds 112 bytes to the kernel, the safer choice is to always add them.
--- arch/mips/boot/compressed/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/boot/compressed/Makefile +2 -2
@@ -40,7 +40,7 @@ GCOV_PROFILE := n UBSAN_SANITIZE := n # decompressor objects (linked with vmlinuz) -vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o +vmlinuzobjs-y := $(obj)/head.o $(obj)/decompress.o $(obj)/string.o $(obj)/bswapsi.o ifdef CONFIG_DEBUG_ZBOOT vmlinuzobjs-$(CONFIG_DEBUG_ZBOOT) += $(obj)/dbg.o
@@ -54,7 +54,7 @@ extra-y += uart-ath79.c $(obj)/uart-ath79.c: $(srctree)/arch/mips/ath79/early_printk.c $(call cmd,shipped) -vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o $(obj)/bswapsi.o +vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o extra-y += ashldi3.c $(obj)/ashldi3.c: $(obj)/%.c: $(srctree)/lib/%.c FORCE
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 343/351 mips: disable branch profiling in boot/decompress.o
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
[ Upstream commit 97e488073cfca0eea84450169ca4cbfcc64e33e3 ]
Use DISABLE_BRANCH_PROFILING for arch/mips/boot/compressed/decompress.o to prevent linkage errors.
mips64-linux-ld: arch/mips/boot/compressed/decompress.o: in function `LZ4_decompress_fast_extDict':
decompress.c:(.text+0x8c): undefined reference to `ftrace_likely_update'
mips64-linux-ld: decompress.c:(.text+0xf4): undefined reference to `ftrace_likely_update'
mips64-linux-ld: decompress.c:(.text+0x200): undefined reference to `ftrace_likely_update'
mips64-linux-ld: decompress.c:(.text+0x230): undefined reference to `ftrace_likely_update'
mips64-linux-ld: decompress.c:(.text+0x320): undefined reference to `ftrace_likely_update'
mips64-linux-ld: arch/mips/boot/compressed/decompress.o:decompress.c:(.text+0x3f4): more undefined references to `ftrace_likely_update' follow
--- arch/mips/boot/compressed/decompress.c | 2 ++ 1 file changed, 2 insertions(+)
arch/mips/boot/compressed/decompress.c +2 -0
@@ -7,6 +7,8 @@* Author: Wu Zhangjin <[email protected]> */ +#define DISABLE_BRANCH_PROFILING +#include <linux/types.h> #include <linux/kernel.h> #include <linux/string.h>
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 344/351 perf report: Fix --task and --stat with pipe input
In reply to Greg Kroah-HartmanFrom: Namhyung Kim <[email protected]>
[ Upstream commit 892ba7f18621a02af4428c58d97451f64685dba4 ]
Current 'perf report' fails to process a pipe input when --task or --stat options are used. This is because they reset all the tool callbacks and fails to find a matching event for a sample.
When pipe input is used, the event info is passed via ATTR records so it needs to handle that operation. Otherwise the following error occurs. Note, -14 (= -EFAULT) comes from evlist__parse_sample():
# perf record -a -o- sleep 1 | perf report -i- --stat Can't parse sample, err = -14 0x271044 [0x38]: failed to process type: 9 Error: failed to process sample #
Committer testing:
Before:
$ perf record -o- sleep 1 | perf report -i- --stat Can't parse sample, err = -14 [ perf record: Woken up 1 times to write data ] 0x1350 [0x30]: failed to process type: 9 Error: failed to process sample [ perf record: Captured and wrote 0.000 MB - ] $
After:
$ perf record -o- sleep 1 | perf report -i- --stat [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.000 MB - ]
Aggregated stats:
TOTAL events: 41
COMM events: 2 ( 4.9%)
EXIT events: 1 ( 2.4%)
SAMPLE events: 9 (22.0%)
MMAP2 events: 4 ( 9.8%)
ATTR events: 1 ( 2.4%)
FINISHED_ROUND events: 1 ( 2.4%)
THREAD_MAP events: 1 ( 2.4%)
CPU_MAP events: 1 ( 2.4%)
EVENT_UPDATE events: 1 ( 2.4%)
TIME_CONV events: 1 ( 2.4%)
FEATURE events: 19 (46.3%)
cycles:uhH stats:
SAMPLE events: 9
$
--- tools/perf/builtin-report.c | 6 ++++++ 1 file changed, 6 insertions(+)
tools/perf/builtin-report.c +6 -0
@@ -729,9 +729,14 @@ static int count_sample_event(struct perf_tool *tool __maybe_unused,return 0 ; } +static int process_attr (struct perf_tool *tool__maybe_unused , +union perf_event *event, +struct evlist **pevlist); +static void stats_setup (struct report *rep) {memset (&rep->tool,0 ,sizeof (rep->tool)); + rep->tool.attr = process_attr; rep->tool.sample = count_sample_event; rep->tool.no_warn = true; }
@@ -753,6 +758,7 @@ static void tasks_setup(struct report *rep) rep->tool.mmap = perf_event__process_mmap; rep->tool.mmap2 = perf_event__process_mmap2; } + rep->tool.attr = process_attr; rep->tool.comm = perf_event__process_comm; rep->tool.exit = perf_event__process_exit; rep->tool.fork = perf_event__process_fork;
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 345/351 perf script python: Fix buffer size to report iregs in perf script
In reply to Greg Kroah-HartmanFrom: Kajol Jain <[email protected]>
[ Upstream commit dea8cfcc33695f70f56023b416cf88ae44c8a45a ]
Commit 48a1f565261d2ab1 ("perf script python: Add more PMU fields to event handler dict") added functionality to report fields like weight, iregs, uregs etc via perf report. That commit predefined buffer size to 512 bytes to print those fields.
But in PowerPC, since we added extended regs support in:
068aeea3773a6f4c ("perf powerpc: Support exposing Performance Monitor Counter SPRs as part of extended regs") d735599a069f6936 ("powerpc/perf: Add extended regs support for power10 platform")
Now iregs can carry more bytes of data and this predefined buffer size can result to data loss in perf script output.
This patch resolves this issue by making the buffer size dynamic, based on the number of registers needed to print. It also changes the regs_map() return type from int to void, as it is not being used by the set_regs_in_dict(), its only caller.
--- .../util/scripting-engines/trace-event-python.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
tools/perf/util/scripting-engines/trace-event-python.c +12 -5
@@ -687,7 +687,7 @@ static void set_sample_datasrc_in_dict(PyObject *dict, _PyUnicode_FromString(decode)); } -static int regs_map (struct regs_dump *regs,uint64_t mask,char *bf,int size) +static void regs_map (struct regs_dump *regs,uint64_t mask,char *bf,int size) {unsigned int i =0 , r;int printed =0 ;
@@ -695,7 +695,7 @@ static int regs_map(struct regs_dump *regs, uint64_t mask, char *bf, int size) bf[0 ] =0 ;if (!regs || !regs->regs) -return 0 ; +return ;for_each_set_bit (r, (unsigned long *) &mask,sizeof (mask) *8 ) {u64 val = regs->regs[i++];
@@ -704,8 +704,6 @@ static int regs_map(struct regs_dump *regs, uint64_t mask, char *bf, int size)"%5s:0x%" PRIx64" " , perf_reg_name(r), val); } - -return printed; } static void set_regs_in_dict(PyObject *dict,
@@ -713,7 +711,16 @@ static void set_regs_in_dict(PyObject *dict, struct evsel *evsel) {struct perf_event_attr *attr = &evsel->core.attr; -char bf[512 ]; + +/* +* Here value 28 is a constant size which can be used to print +* one register value and its corresponds to: +* 16 chars is to specify 64 bit register in hexadecimal. +* 2 chars is for appending "0x" to the hexadecimal value and +* 10 chars is for register name. +*/ +int size =__sw_hweight64 (attr->sample_regs_intr) *28 ; +char bf[size];regs_map (&sample->intr_regs, attr->sample_regs_intr, bf,sizeof (bf));
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 346/351 s390/irq: remove HAVE_IRQ_EXIT_ON_IRQ_STACK
In reply to Greg Kroah-HartmanFrom: Sven Schnelle <[email protected]>
[ Upstream commit 0aa4ff7688632a86bdb133fa106f2ccd514b91a7 ]
This is no longer true since we switched to generic entry. The code switches to the IRQ stack before calling do_IRQ, but switches back to the kernel stack before calling irq_exit().
--- arch/s390/Kconfig | 1 - 1 file changed, 1 deletion(-)
arch/s390/Kconfig +0 -1
@@ -165,7 +165,6 @@ config S390 select HAVE_GCC_PLUGINS select HAVE_GENERIC_VDSO select HAVE_IOREMAP_PROT if PCI - select HAVE_IRQ_EXIT_ON_IRQ_STACK select HAVE_KERNEL_BZIP2 select HAVE_KERNEL_GZIP select HAVE_KERNEL_LZ4
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 347/351 MIPS: vdso: Invalid GIC access through VDSO
In reply to Greg Kroah-HartmanFrom: Martin Fäcknitz <[email protected]>
[ Upstream commit 47ce8527fbba145a7723685bc9a27d9855e06491 ]
Accessing raw timers (currently only CLOCK_MONOTONIC_RAW) through VDSO doesn't return the correct time when using the GIC as clock source. The address of the GIC mapped page is in this case not calculated correctly. The GIC mapped page is calculated from the VDSO data by subtracting PAGE_SIZE:
void *get_gic(const struct vdso_data *data) {
return (void __iomem *)data - PAGE_SIZE;
}However, the data pointer is not page aligned for raw clock sources. This is because the VDSO data for raw clock sources (CS_RAW = 1) is stored after the VDSO data for coarse clock sources (CS_HRES_COARSE = 0). Therefore, only the VDSO data for CS_HRES_COARSE is page aligned:
+--------------------+ | | | vd[CS_RAW] | ---+ | vd[CS_HRES_COARSE] | | +--------------------+ | -PAGE_SIZE | | | | GIC mapped page | <--+ | | +--------------------+
When __arch_get_hw_counter() is called with &vd[CS_RAW], get_gic returns the wrong address (somewhere inside the GIC mapped page). The GIC counter values are not returned which results in an invalid time.
--- arch/mips/include/asm/vdso/vdso.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/include/asm/vdso/vdso.h +1 -1
@@ -67,7 +67,7 @@ static inline const struct vdso_data *get_vdso_data(void)static inline void __iomem *get_gic (const struct vdso_data *data) { -return (void __iomem *)data -PAGE_SIZE ; +return (void __iomem *)((unsigned long )data &PAGE_MASK ) -PAGE_SIZE ; }#endif /* CONFIG_CLKSRC_MIPS_GIC */
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 348/351 perf tools: Fix pattern matching for same substring in different PMU type
In reply to Greg Kroah-HartmanFrom: Jin Yao <[email protected]>
[ Upstream commit c47a5599eda324bacdacd125227a0925d6c50fbe ]
Some different PMU types may have the same substring. For example, on Icelake server we have PMU types "uncore_imc" and "uncore_imc_free_running". Both PMU types have the substring "uncore_imc". But the parser wrongly thinks they are the same PMU type.
We enable an imc event,
perf stat -e uncore_imc/event=0xe3/ -a -- sleep 1
Perf actually expands the event to:
uncore_imc_0/event=0xe3/
uncore_imc_1/event=0xe3/
uncore_imc_2/event=0xe3/
uncore_imc_3/event=0xe3/
uncore_imc_4/event=0xe3/
uncore_imc_5/event=0xe3/
uncore_imc_6/event=0xe3/
uncore_imc_7/event=0xe3/
uncore_imc_free_running_0/event=0xe3/
uncore_imc_free_running_1/event=0xe3/
uncore_imc_free_running_3/event=0xe3/
uncore_imc_free_running_4/event=0xe3/
That's because the "uncore_imc_free_running" matches the pattern "uncore_imc*".
Now we check that the last characters of PMU name is '_<digit>'.
For example, for pattern "uncore_imc*", "uncore_imc_0" is parsed ok, but "uncore_imc_free_running_0" fails.
--- tools/perf/util/parse-events.y | 2 +- tools/perf/util/pmu.c | 36 +++++++++++++++++++++++++++++++++- tools/perf/util/pmu.h | 1 + 3 files changed, 37 insertions(+), 2 deletions(-)
tools/perf/util/parse-events.y +1 -1
@@ -316,7 +316,7 @@ event_pmu_name opt_pmu_config if (!strncmp(name, "uncore_", 7) && strncmp($1, "uncore_", 7)) name += 7; - if (!fnmatch(pattern, name, 0)) { + if (!perf_pmu__match(pattern, name, $1)) { if (parse_events_copy_term_list(orig_terms, &terms)) CLEANUP_YYABORT; if (!parse_events_add_pmu(_parse_state, list, pmu->name, terms, true, false))
tools/perf/util/pmu.c +35 -1
@@ -3,6 +3,7 @@#include <linux/compiler.h> #include <linux/string.h> #include <linux/zalloc.h> +#include <linux/ctype.h> #include <subcmd/pager.h> #include <sys/types.h> #include <errno.h>
@@ -17,6 +18,7 @@#include <locale.h> #include <regex.h> #include <perf/cpumap.h> +#include <fnmatch.h> #include "debug.h" #include "evsel.h" #include "pmu.h"
@@ -740,6 +742,27 @@ struct pmu_events_map *__weak pmu_events_map__find(void)return perf_pmu__find_map (NULL ); } +static bool perf_pmu__valid_suffix (char *pmu_name,char *tok) +{ +char *p; + +if (strncmp (pmu_name, tok,strlen (tok))) +return false; + + p = pmu_name +strlen (tok); +if (*p ==0 ) +return true; + +if (*p !='_' ) +return false; + + ++p; +if (*p ==0 || !isdigit (*p)) +return false; + +return true; +} +bool pmu_uncore_alias_match (const char *pmu_name,const char *name) {char *tmp =NULL , *tok, *str;
@@ -768,7 +791,7 @@ bool pmu_uncore_alias_match(const char *pmu_name, const char *name)*/ for (; tok; name +=strlen (tok), tok =strtok_r (NULL ,"," , &tmp)) { name =strstr (name, tok); -if (!name) { +if (!name || !perf_pmu__valid_suffix ((char *)name, tok)) { res = false; goto out; }
@@ -1872,3 +1895,14 @@ bool perf_pmu__has_hybrid(void)return !list_empty (&perf_pmu__hybrid_pmus); } + +int perf_pmu__match (char *pattern,char *name,char *tok) +{ +if (fnmatch (pattern, name,0 )) +return -1 ; + +if (tok && !perf_pmu__valid_suffix (name, tok)) +return -1 ; + +return 0 ; +}
tools/perf/util/pmu.h +1 -0
@@ -133,5 +133,6 @@ void perf_pmu__warn_invalid_config(struct perf_pmu *pmu, __u64 config, char *name);bool perf_pmu__has_hybrid (void ); +int perf_pmu__match (char *pattern,char *name,char *tok);#endif /* __PMU_H */
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 349/351 cpufreq: CPPC: Fix potential memleak in cppc_cpufreq_cpu_init
In reply to Greg Kroah-HartmanFrom: Viresh Kumar <[email protected]>
[ Upstream commit fe2535a44904a77615a3af8e8fd7dafb98fb0e1b ]
It's a classic example of memleak, we allocate something, we fail and never free the resources.
Make sure we free all resources on policy ->init() failures.
--- drivers/cpufreq/cppc_cpufreq.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-)
drivers/cpufreq/cppc_cpufreq.c +20 -7
@@ -182,6 +182,16 @@ static int cppc_verify_policy(struct cpufreq_policy_data *policy)return 0 ; } +static void cppc_cpufreq_put_cpu_data (struct cpufreq_policy *policy) +{ +struct cppc_cpudata *cpu_data = policy->driver_data; + +list_del (&cpu_data->node); +free_cpumask_var (cpu_data->shared_cpu_map); +kfree (cpu_data); + policy->driver_data =NULL ; +} +static void cppc_cpufreq_stop_cpu (struct cpufreq_policy *policy) {struct cppc_cpudata *cpu_data = policy->driver_data;
@@ -196,11 +206,7 @@ static void cppc_cpufreq_stop_cpu(struct cpufreq_policy *policy)pr_debug ("Err setting perf value:%d on CPU:%d. ret:%d\n" , caps->lowest_perf, cpu, ret); -/* Remove CPU node from list and free driver data for policy */ -free_cpumask_var (cpu_data->shared_cpu_map); -list_del (&cpu_data->node); -kfree (policy->driver_data); - policy->driver_data =NULL ; +cppc_cpufreq_put_cpu_data (policy); }/*
@@ -330,7 +336,8 @@ static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy)default :pr_debug ("Unsupported CPU co-ord type: %d\n" , policy->shared_type); -return -EFAULT ; + ret = -EFAULT ; + goto out; }/*
@@ -345,10 +352,16 @@ static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy) cpu_data->perf_ctrls.desired_perf = caps->highest_perf; ret =cppc_set_perf (cpu, &cpu_data->perf_ctrls); -if (ret) +if (ret) {pr_debug ("Err setting perf value:%d on CPU:%d. ret:%d\n" , caps->highest_perf, cpu, ret); + goto out; + } +return 0 ; + +out: +cppc_cpufreq_put_cpu_data (policy);return ret; }
Signature · 1 line
2.30.2
Greg Kroah-Hartman
maintainerPATCH 350/351 scsi: scsi_dh_alua: Fix signedness bug in alua_rtpg()
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
commit 80927822e8b6be46f488524cd7d5fe683de97fc4 upstream.
The "retval" variable needs to be signed for the error handling to work.
--- drivers/scsi/device_handler/scsi_dh_alua.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/device_handler/scsi_dh_alua.c +2 -1
@@ -517,7 +517,8 @@ static int alua_rtpg(struct scsi_deviceint len, k, off, bufflen =ALUA_RTPG_SIZE ;int group_id_old, state_old, pref_old, valid_states_old;unsigned char *desc, *buff; -unsigned err, retval; +unsigned err; +int retval;unsigned int tpg_desc_tbl_off;unsigned char orig_transition_tmo;unsigned long flags;
Greg Kroah-Hartman
maintainerPATCH 351/351 misc: alcor_pci: fix inverted branch condition
In reply to Greg Kroah-HartmanFrom: Tong Zhang <[email protected]>
commit 281e468446994a7672733af2bf941f4110d4a895 upstream.
This patch fixes a trivial mistake that I made in the previous attempt in fixing the null bridge issue. The branch condition is inverted and we should call alcor_pci_find_cap_offset() only if bridge is not null.
--- drivers/misc/cardreader/alcor_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/cardreader/alcor_pci.c +1 -1
@@ -144,7 +144,7 @@ static void alcor_pci_init_check_aspm(st* priv->parent_pdev will be NULL. In this case we don't check its * capability and disable ASPM completely. */ -if (!priv->parent_pdev) +if (priv->parent_pdev) priv->parent_cap_off =alcor_pci_find_cap_offset (priv, priv->parent_pdev);
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.13.4 release. There are 351 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 21 Jul 2021 14:47:42 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.13.4-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.13.y
and the diffstat can be found below.thanks,
greg k-h
5.13.4-rc1 Successfully Compiled and booted on my Raspberry PI 4b (8g) (bcm2711)