From: Greg Kroah-Hartman Date: Mon, 10 Feb 2025 15:30:08 +0000 (+0100) Subject: 6.6-stable patches X-Git-Tag: v6.6.77~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=96f8333f28b26a1e6b9d34c92c382c449bacaf4d;p=thirdparty%2Fkernel%2Fstable-queue.git 6.6-stable patches added patches: acpi-prm-remove-unnecessary-strict-handler-address-checks.patch arm-dts-dra7-add-bus_dma_limit-for-l4-cfg-bus.patch arm-dts-ti-omap-gta04-fix-pm-issues-caused-by-spi-module.patch arm64-dts-qcom-sm6115-fix-adsp-memory-base-and-length.patch arm64-dts-qcom-sm6115-fix-cdsp-memory-length.patch arm64-dts-qcom-sm6115-fix-mpss-memory-length.patch arm64-dts-qcom-sm6350-fix-adsp-memory-length.patch arm64-dts-qcom-sm6350-fix-mpss-memory-length.patch arm64-dts-qcom-sm6350-fix-uart1-interconnect-path.patch arm64-dts-qcom-sm6375-fix-adsp-memory-length.patch arm64-dts-qcom-sm6375-fix-cdsp-memory-base-and-length.patch arm64-dts-qcom-sm6375-fix-mpss-memory-base-and-length.patch arm64-dts-qcom-sm8350-fix-adsp-memory-base-and-length.patch arm64-dts-qcom-sm8350-fix-cdsp-memory-base-and-length.patch arm64-dts-qcom-sm8350-fix-mpss-memory-length.patch arm64-dts-qcom-sm8450-fix-cdsp-memory-length.patch arm64-dts-qcom-sm8450-fix-mpss-memory-length.patch arm64-dts-qcom-sm8550-correct-mdss-interconnects.patch arm64-dts-qcom-sm8550-fix-cdsp-memory-length.patch arm64-dts-qcom-sm8550-fix-mpss-memory-length.patch arm64-tegra-disable-tegra234-sce-fabric-node.patch arm64-tegra-fix-typo-in-tegra234-dce-fabric-compatible.patch crypto-qce-fix-priority-to-be-less-than-armv8-ce.patch iio-light-as73211-fix-channel-handling-in-only-color-triggered-buffer.patch kfence-skip-__gfp_thisnode-allocations-on-numa-systems.patch media-ccs-clean-up-parsed-ccs-static-data-on-parse-failure.patch media-ccs-fix-ccs-static-data-parsing-for-large-block-sizes.patch media-ccs-fix-cleanup-order-in-ccs_probe.patch media-i2c-ds90ub960-fix-logging-sp-eq-status-only-for-ub9702.patch media-i2c-ds90ub960-fix-ub9702-vc-map.patch media-i2c-ds90ub960-fix-use-of-non-existing-registers-on-ub9702.patch media-i2c-ds90ub9x3-fix-extra-fwnode_handle_put.patch media-imx296-add-standby-delay-during-probe.patch media-mc-fix-endpoint-iteration.patch media-mmp-bring-back-registration-of-the-device.patch media-ov5640-fix-get_light_freq-on-auto.patch media-uvcvideo-fix-crash-during-unbind-if-gpio-unit-is-in-use.patch media-uvcvideo-fix-event-flags-in-uvc_ctrl_send_events.patch media-uvcvideo-remove-redundant-null-assignment.patch media-uvcvideo-support-partial-control-reads.patch mm-kmemleak-fix-upper-boundary-check-for-physical-address-objects.patch pwm-microchip-core-fix-incorrect-comparison-with-max-period.patch rust-init-use-explicit-abi-to-clean-warning-in-future-compilers.patch rv-reset-per-task-monitors-also-for-idle-tasks.patch soc-mediatek-mtk-devapc-fix-leaking-io-map-on-error-paths.patch soc-qcom-smem_state-fix-missing-of_node_put-in-error-path.patch tpm-change-to-kvalloc-in-eventlog-acpi.c.patch ubi-add-a-check-for-ubi_num.patch x86-boot-use-std-gnu11-to-fix-build-with-gcc-15.patch xfs-add-error-handling-for-xfs_reflink_cancel_cow_range.patch xfs-propagate-errors-from-xfs_reflink_cancel_cow_range-in-xfs_dax_write_iomap_end.patch --- diff --git a/queue-6.6/acpi-prm-remove-unnecessary-strict-handler-address-checks.patch b/queue-6.6/acpi-prm-remove-unnecessary-strict-handler-address-checks.patch new file mode 100644 index 0000000000..2aeeff0317 --- /dev/null +++ b/queue-6.6/acpi-prm-remove-unnecessary-strict-handler-address-checks.patch @@ -0,0 +1,65 @@ +From 7f5704b6a143b8eca640cba820968e798d065e91 Mon Sep 17 00:00:00 2001 +From: Aubrey Li +Date: Sun, 26 Jan 2025 10:22:50 +0800 +Subject: ACPI: PRM: Remove unnecessary strict handler address checks + +From: Aubrey Li + +commit 7f5704b6a143b8eca640cba820968e798d065e91 upstream. + +Commit 088984c8d54c ("ACPI: PRM: Find EFI_MEMORY_RUNTIME block for PRM +handler and context") added unnecessary strict handler address checks, +causing the PRM module to fail in translating memory error addresses. + +Both static data buffer address and ACPI parameter buffer address may +be NULL if they are not needed, as described in section 4.1.2 PRM Handler +Information Structure of Platform Runtime Mechanism specification [1]. + +Here are two examples from real hardware: + +----PRMT.dsl---- + +- staic data address is not used +[10Ch 0268 2] Revision : 0000 +[10Eh 0270 2] Length : 002C +[110h 0272 16] Handler GUID : F6A58D47-E04F-4F5A-86B8-2A50D4AA109B +[120h 0288 8] Handler address : 0000000065CE51F4 +[128h 0296 8] Satic Data Address : 0000000000000000 +[130h 0304 8] ACPI Parameter Address : 000000006522A718 + +- ACPI parameter address is not used +[1B0h 0432 2] Revision : 0000 +[1B2h 0434 2] Length : 002C +[1B4h 0436 16] Handler GUID : 657E8AE6-A8FC-4877-BB28-42E7DE1899A5 +[1C4h 0452 8] Handler address : 0000000065C567C8 +[1CCh 0460 8] Satic Data Address : 000000006113FB98 +[1D4h 0468 8] ACPI Parameter Address : 0000000000000000 + +Fixes: 088984c8d54c ("ACPI: PRM: Find EFI_MEMORY_RUNTIME block for PRM handler and context") +Reported-and-tested-by: Shi Liu +Cc: All applicable +Signed-off-by: Aubrey Li +Link: https://uefi.org/sites/default/files/resources/Platform%20Runtime%20Mechanism%20-%20with%20legal%20notice.pdf # [1] +Reviewed-by: Koba Ko +Acked-by: Ard Biesheuvel +Link: https://patch.msgid.link/20250126022250.3014210-1-aubrey.li@linux.intel.com +[ rjw: Minor changelog edits ] +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman +--- + drivers/acpi/prmt.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +--- a/drivers/acpi/prmt.c ++++ b/drivers/acpi/prmt.c +@@ -263,9 +263,7 @@ static acpi_status acpi_platformrt_space + if (!handler || !module) + goto invalid_guid; + +- if (!handler->handler_addr || +- !handler->static_data_buffer_addr || +- !handler->acpi_param_buffer_addr) { ++ if (!handler->handler_addr) { + buffer->prm_status = PRM_HANDLER_ERROR; + return AE_OK; + } diff --git a/queue-6.6/arm-dts-dra7-add-bus_dma_limit-for-l4-cfg-bus.patch b/queue-6.6/arm-dts-dra7-add-bus_dma_limit-for-l4-cfg-bus.patch new file mode 100644 index 0000000000..e7bf0051df --- /dev/null +++ b/queue-6.6/arm-dts-dra7-add-bus_dma_limit-for-l4-cfg-bus.patch @@ -0,0 +1,54 @@ +From c1472ec1dc4419d0bae663c1a1e6cb98dc7881ad Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 15 Nov 2024 11:25:37 +0100 +Subject: ARM: dts: dra7: Add bus_dma_limit for l4 cfg bus + +From: Romain Naour + +commit c1472ec1dc4419d0bae663c1a1e6cb98dc7881ad upstream. + +A bus_dma_limit was added for l3 bus by commit cfb5d65f2595 +("ARM: dts: dra7: Add bus_dma_limit for L3 bus") to fix an issue +observed only with SATA on DRA7-EVM with 4GB RAM and CONFIG_ARM_LPAE +enabled. + +Since kernel 5.13, the SATA issue can be reproduced again following +the SATA node move from L3 bus to L4_cfg in commit 8af15365a368 +("ARM: dts: Configure interconnect target module for dra7 sata"). + +Fix it by adding an empty dma-ranges property to l4_cfg and +segment@100000 nodes (parent device tree node of SATA controller) to +inherit the 2GB dma ranges limit from l3 bus node. + +Note: A similar fix was applied for PCIe controller by commit +90d4d3f4ea45 ("ARM: dts: dra7: Fix bus_dma_limit for PCIe"). + +Fixes: 8af15365a368 ("ARM: dts: Configure interconnect target module for dra7 sata"). +Link: https://lore.kernel.org/linux-omap/c583e1bb-f56b-4489-8012-ce742e85f233@smile.fr/ +Cc: stable@vger.kernel.org # 5.13 +Signed-off-by: Romain Naour +Link: https://lore.kernel.org/r/20241115102537.1330300-1-romain.naour@smile.fr +Signed-off-by: Kevin Hilman +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm/boot/dts/ti/omap/dra7-l4.dtsi | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/arch/arm/boot/dts/ti/omap/dra7-l4.dtsi ++++ b/arch/arm/boot/dts/ti/omap/dra7-l4.dtsi +@@ -12,6 +12,7 @@ + ranges = <0x00000000 0x4a000000 0x100000>, /* segment 0 */ + <0x00100000 0x4a100000 0x100000>, /* segment 1 */ + <0x00200000 0x4a200000 0x100000>; /* segment 2 */ ++ dma-ranges; + + segment@0 { /* 0x4a000000 */ + compatible = "simple-pm-bus"; +@@ -557,6 +558,7 @@ + <0x0007e000 0x0017e000 0x001000>, /* ap 124 */ + <0x00059000 0x00159000 0x001000>, /* ap 125 */ + <0x0005a000 0x0015a000 0x001000>; /* ap 126 */ ++ dma-ranges; + + target-module@2000 { /* 0x4a102000, ap 27 3c.0 */ + compatible = "ti,sysc"; diff --git a/queue-6.6/arm-dts-ti-omap-gta04-fix-pm-issues-caused-by-spi-module.patch b/queue-6.6/arm-dts-ti-omap-gta04-fix-pm-issues-caused-by-spi-module.patch new file mode 100644 index 0000000000..27e571adaf --- /dev/null +++ b/queue-6.6/arm-dts-ti-omap-gta04-fix-pm-issues-caused-by-spi-module.patch @@ -0,0 +1,62 @@ +From 0cfbd7805fe13406500e6a6f2aa08f198d5db4bd Mon Sep 17 00:00:00 2001 +From: Andreas Kemnade +Date: Wed, 4 Dec 2024 18:41:52 +0100 +Subject: ARM: dts: ti/omap: gta04: fix pm issues caused by spi module + +From: Andreas Kemnade + +commit 0cfbd7805fe13406500e6a6f2aa08f198d5db4bd upstream. + +Despite CM_IDLEST1_CORE and CM_FCLKEN1_CORE behaving normal, +disabling SPI leads to messages like when suspending: +Powerdomain (core_pwrdm) didn't enter target state 0 +and according to /sys/kernel/debug/pm_debug/count off state is not +entered. That was not connected to SPI during the discussion +of disabling SPI. See: +https://lore.kernel.org/linux-omap/20230122100852.32ae082c@aktux/ + +The reason is that SPI is per default in slave mode. Linux driver +will turn it to master per default. It slave mode, the powerdomain seems to +be kept active if active chip select input is sensed. + +Fix that by explicitly disabling the SPI3 pins which used to be muxed by +the bootloader since they are available on an optionally fitted header +which would require dtb overlays anyways. + +Fixes: a622310f7f01 ("ARM: dts: gta04: fix excess dma channel usage") +CC: stable@vger.kernel.org +Signed-off-by: Andreas Kemnade +Reviewed-by: Roger Quadros +Link: https://lore.kernel.org/r/20241204174152.2360431-1-andreas@kemnade.info +Signed-off-by: Kevin Hilman +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm/boot/dts/ti/omap/omap3-gta04.dtsi | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/arch/arm/boot/dts/ti/omap/omap3-gta04.dtsi ++++ b/arch/arm/boot/dts/ti/omap/omap3-gta04.dtsi +@@ -446,6 +446,7 @@ + pinctrl-names = "default"; + pinctrl-0 = < + &hsusb2_2_pins ++ &mcspi3hog_pins + >; + + hsusb2_2_pins: hsusb2-2-pins { +@@ -459,6 +460,15 @@ + >; + }; + ++ mcspi3hog_pins: mcspi3hog-pins { ++ pinctrl-single,pins = < ++ OMAP3630_CORE2_IOPAD(0x25dc, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* etk_d0 */ ++ OMAP3630_CORE2_IOPAD(0x25de, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* etk_d1 */ ++ OMAP3630_CORE2_IOPAD(0x25e0, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* etk_d2 */ ++ OMAP3630_CORE2_IOPAD(0x25e2, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* etk_d3 */ ++ >; ++ }; ++ + spi_gpio_pins: spi-gpio-pinmux-pins { + pinctrl-single,pins = < + OMAP3630_CORE2_IOPAD(0x25d8, PIN_OUTPUT | MUX_MODE4) /* clk */ diff --git a/queue-6.6/arm64-dts-qcom-sm6115-fix-adsp-memory-base-and-length.patch b/queue-6.6/arm64-dts-qcom-sm6115-fix-adsp-memory-base-and-length.patch new file mode 100644 index 0000000000..c3adc0dc91 --- /dev/null +++ b/queue-6.6/arm64-dts-qcom-sm6115-fix-adsp-memory-base-and-length.patch @@ -0,0 +1,45 @@ +From 47d178caac3ec13f5f472afda25fcfdfaa00d0da Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Fri, 13 Dec 2024 15:54:12 +0100 +Subject: arm64: dts: qcom: sm6115: Fix ADSP memory base and length + +From: Krzysztof Kozlowski + +commit 47d178caac3ec13f5f472afda25fcfdfaa00d0da upstream. + +The address space in ADSP PAS (Peripheral Authentication Service) +remoteproc node should point to the QDSP PUB address space +(QDSP6...SS_PUB): 0x0a40_0000 with length of 0x4040. + +0x0ab0_0000, value used so far, is the SSC_QUPV3 block, so entierly +unrelated. + +Correct the base address and length, which should have no functional +impact on Linux users, because PAS loader does not use this address +space at all. + +Cc: stable@vger.kernel.org +Fixes: 96ce9227fdbc ("arm64: dts: qcom: sm6115: Add remoteproc nodes") +Signed-off-by: Krzysztof Kozlowski +Reviewed-by: Konrad Dybcio +Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-23-2e0036fccd8d@linaro.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/qcom/sm6115.dtsi | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/arm64/boot/dts/qcom/sm6115.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi +@@ -2310,9 +2310,9 @@ + }; + }; + +- remoteproc_adsp: remoteproc@ab00000 { ++ remoteproc_adsp: remoteproc@a400000 { + compatible = "qcom,sm6115-adsp-pas"; +- reg = <0x0 0x0ab00000 0x0 0x100>; ++ reg = <0x0 0x0a400000 0x0 0x4040>; + + interrupts-extended = <&intc GIC_SPI 282 IRQ_TYPE_EDGE_RISING>, + <&adsp_smp2p_in 0 IRQ_TYPE_EDGE_RISING>, diff --git a/queue-6.6/arm64-dts-qcom-sm6115-fix-cdsp-memory-length.patch b/queue-6.6/arm64-dts-qcom-sm6115-fix-cdsp-memory-length.patch new file mode 100644 index 0000000000..d004c243d6 --- /dev/null +++ b/queue-6.6/arm64-dts-qcom-sm6115-fix-cdsp-memory-length.patch @@ -0,0 +1,39 @@ +From 846f49c3f01680f4af3043bf5b7abc9cf71bb42d Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Fri, 13 Dec 2024 15:54:11 +0100 +Subject: arm64: dts: qcom: sm6115: Fix CDSP memory length + +From: Krzysztof Kozlowski + +commit 846f49c3f01680f4af3043bf5b7abc9cf71bb42d upstream. + +The address space in MPSS/Modem PAS (Peripheral Authentication Service) +remoteproc node should point to the QDSP PUB address space +(QDSP6...SS_PUB) which has a length of 0x4040. Value of 0x100000 covers +entire Touring/CDSP memory block seems to big here. + +This should have no functional impact on Linux users, because PAS loader +does not use this address space at all. + +Cc: stable@vger.kernel.org +Fixes: 96ce9227fdbc ("arm64: dts: qcom: sm6115: Add remoteproc nodes") +Signed-off-by: Krzysztof Kozlowski +Reviewed-by: Konrad Dybcio +Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-22-2e0036fccd8d@linaro.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/qcom/sm6115.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/qcom/sm6115.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi +@@ -2384,7 +2384,7 @@ + + remoteproc_cdsp: remoteproc@b300000 { + compatible = "qcom,sm6115-cdsp-pas"; +- reg = <0x0 0x0b300000 0x0 0x100000>; ++ reg = <0x0 0x0b300000 0x0 0x4040>; + + interrupts-extended = <&intc GIC_SPI 265 IRQ_TYPE_EDGE_RISING>, + <&cdsp_smp2p_in 0 IRQ_TYPE_EDGE_RISING>, diff --git a/queue-6.6/arm64-dts-qcom-sm6115-fix-mpss-memory-length.patch b/queue-6.6/arm64-dts-qcom-sm6115-fix-mpss-memory-length.patch new file mode 100644 index 0000000000..28f10c5ec1 --- /dev/null +++ b/queue-6.6/arm64-dts-qcom-sm6115-fix-mpss-memory-length.patch @@ -0,0 +1,39 @@ +From 472d65e7cb591c8379dd6f40561f96be73a46f0f Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Fri, 13 Dec 2024 15:54:10 +0100 +Subject: arm64: dts: qcom: sm6115: Fix MPSS memory length + +From: Krzysztof Kozlowski + +commit 472d65e7cb591c8379dd6f40561f96be73a46f0f upstream. + +The address space in MPSS/Modem PAS (Peripheral Authentication Service) +remoteproc node should point to the QDSP PUB address space +(QDSP6...SS_PUB) which has a length of 0x10000. Value of 0x100 was +copied from older DTS, but it grew since then. + +This should have no functional impact on Linux users, because PAS loader +does not use this address space at all. + +Cc: stable@vger.kernel.org +Fixes: 96ce9227fdbc ("arm64: dts: qcom: sm6115: Add remoteproc nodes") +Signed-off-by: Krzysztof Kozlowski +Reviewed-by: Konrad Dybcio +Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-21-2e0036fccd8d@linaro.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/qcom/sm6115.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/qcom/sm6115.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm6115.dtsi +@@ -1667,7 +1667,7 @@ + + remoteproc_mpss: remoteproc@6080000 { + compatible = "qcom,sm6115-mpss-pas"; +- reg = <0x0 0x06080000 0x0 0x100>; ++ reg = <0x0 0x06080000 0x0 0x10000>; + + interrupts-extended = <&intc GIC_SPI 307 IRQ_TYPE_EDGE_RISING>, + <&modem_smp2p_in 0 IRQ_TYPE_EDGE_RISING>, diff --git a/queue-6.6/arm64-dts-qcom-sm6350-fix-adsp-memory-length.patch b/queue-6.6/arm64-dts-qcom-sm6350-fix-adsp-memory-length.patch new file mode 100644 index 0000000000..0057ed4953 --- /dev/null +++ b/queue-6.6/arm64-dts-qcom-sm6350-fix-adsp-memory-length.patch @@ -0,0 +1,39 @@ +From b0805a864459a29831577d2a47165afebe338faf Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Fri, 13 Dec 2024 15:54:04 +0100 +Subject: arm64: dts: qcom: sm6350: Fix ADSP memory length + +From: Krzysztof Kozlowski + +commit b0805a864459a29831577d2a47165afebe338faf upstream. + +The address space in ADSP (Peripheral Authentication Service) remoteproc +node should point to the QDSP PUB address space (QDSP6...SS_PUB) which +has a length of 0x10000. + +This should have no functional impact on Linux users, because PAS loader +does not use this address space at all. + +Fixes: efc33c969f23 ("arm64: dts: qcom: sm6350: Add ADSP nodes") +Cc: stable@vger.kernel.org +Tested-by: Luca Weiss +Reviewed-by: Konrad Dybcio +Signed-off-by: Krzysztof Kozlowski +Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-15-2e0036fccd8d@linaro.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi +@@ -1259,7 +1259,7 @@ + + adsp: remoteproc@3000000 { + compatible = "qcom,sm6350-adsp-pas"; +- reg = <0 0x03000000 0 0x100>; ++ reg = <0x0 0x03000000 0x0 0x10000>; + + interrupts-extended = <&pdc 6 IRQ_TYPE_LEVEL_HIGH>, + <&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>, diff --git a/queue-6.6/arm64-dts-qcom-sm6350-fix-mpss-memory-length.patch b/queue-6.6/arm64-dts-qcom-sm6350-fix-mpss-memory-length.patch new file mode 100644 index 0000000000..0320164542 --- /dev/null +++ b/queue-6.6/arm64-dts-qcom-sm6350-fix-mpss-memory-length.patch @@ -0,0 +1,40 @@ +From cd8d83de9cc9ecfb1f9a12bc838041c4eb4d10bd Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Fri, 13 Dec 2024 15:54:05 +0100 +Subject: arm64: dts: qcom: sm6350: Fix MPSS memory length + +From: Krzysztof Kozlowski + +commit cd8d83de9cc9ecfb1f9a12bc838041c4eb4d10bd upstream. + +The address space in MPSS/Modem PAS (Peripheral Authentication Service) +remoteproc node should point to the QDSP PUB address space +(QDSP6...SS_PUB) which has a length of 0x10000. Value of 0x4040 was +copied from older DTS, but it grew since then. + +This should have no functional impact on Linux users, because PAS loader +does not use this address space at all. + +Fixes: 489be59b635b ("arm64: dts: qcom: sm6350: Add MPSS nodes") +Cc: stable@vger.kernel.org +Tested-by: Luca Weiss +Reviewed-by: Konrad Dybcio +Signed-off-by: Krzysztof Kozlowski +Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-16-2e0036fccd8d@linaro.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi +@@ -1480,7 +1480,7 @@ + + mpss: remoteproc@4080000 { + compatible = "qcom,sm6350-mpss-pas"; +- reg = <0x0 0x04080000 0x0 0x4040>; ++ reg = <0x0 0x04080000 0x0 0x10000>; + + interrupts-extended = <&intc GIC_SPI 136 IRQ_TYPE_EDGE_RISING>, + <&modem_smp2p_in 0 IRQ_TYPE_EDGE_RISING>, diff --git a/queue-6.6/arm64-dts-qcom-sm6350-fix-uart1-interconnect-path.patch b/queue-6.6/arm64-dts-qcom-sm6350-fix-uart1-interconnect-path.patch new file mode 100644 index 0000000000..32c8afd03c --- /dev/null +++ b/queue-6.6/arm64-dts-qcom-sm6350-fix-uart1-interconnect-path.patch @@ -0,0 +1,35 @@ +From be2f81eaa2c8e81d3de5b73dca5e133f63384cb3 Mon Sep 17 00:00:00 2001 +From: Luca Weiss +Date: Fri, 20 Dec 2024 09:59:50 +0100 +Subject: arm64: dts: qcom: sm6350: Fix uart1 interconnect path + +From: Luca Weiss + +commit be2f81eaa2c8e81d3de5b73dca5e133f63384cb3 upstream. + +The path MASTER_QUP_0 to SLAVE_EBI_CH0 would be qup-memory path and not +qup-config. Since the qup-memory path is not part of the qcom,geni-uart +bindings, just replace that path with the correct path for qup-config. + +Fixes: b179f35b887b ("arm64: dts: qcom: sm6350: add uart1 node") +Cc: stable@vger.kernel.org +Signed-off-by: Luca Weiss +Reviewed-by: Konrad Dybcio +Link: https://lore.kernel.org/r/20241220-sm6350-uart1-icc-v1-1-f4f10fd91adf@fairphone.com +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/qcom/sm6350.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi +@@ -935,7 +935,7 @@ + power-domains = <&rpmhpd SM6350_CX>; + operating-points-v2 = <&qup_opp_table>; + interconnects = <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_CORE_0 0>, +- <&aggre1_noc MASTER_QUP_0 0 &clk_virt SLAVE_EBI_CH0 0>; ++ <&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_0 0>; + interconnect-names = "qup-core", "qup-config"; + status = "disabled"; + }; diff --git a/queue-6.6/arm64-dts-qcom-sm6375-fix-adsp-memory-length.patch b/queue-6.6/arm64-dts-qcom-sm6375-fix-adsp-memory-length.patch new file mode 100644 index 0000000000..35df025db5 --- /dev/null +++ b/queue-6.6/arm64-dts-qcom-sm6375-fix-adsp-memory-length.patch @@ -0,0 +1,38 @@ +From bf4dda83da27b7efc49326ebb82cbd8b3e637c38 Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Fri, 13 Dec 2024 15:54:06 +0100 +Subject: arm64: dts: qcom: sm6375: Fix ADSP memory length + +From: Krzysztof Kozlowski + +commit bf4dda83da27b7efc49326ebb82cbd8b3e637c38 upstream. + +The address space in ADSP (Peripheral Authentication Service) remoteproc +node should point to the QDSP PUB address space (QDSP6...SS_PUB) which +has a length of 0x10000. + +This should have no functional impact on Linux users, because PAS loader +does not use this address space at all. + +Fixes: fe6fd26aeddf ("arm64: dts: qcom: sm6375: Add ADSP&CDSP") +Cc: stable@vger.kernel.org +Signed-off-by: Krzysztof Kozlowski +Reviewed-by: Konrad Dybcio +Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-17-2e0036fccd8d@linaro.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/qcom/sm6375.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/qcom/sm6375.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi +@@ -1514,7 +1514,7 @@ + + remoteproc_adsp: remoteproc@a400000 { + compatible = "qcom,sm6375-adsp-pas"; +- reg = <0 0x0a400000 0 0x100>; ++ reg = <0 0x0a400000 0 0x10000>; + + interrupts-extended = <&intc GIC_SPI 282 IRQ_TYPE_LEVEL_HIGH>, + <&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>, diff --git a/queue-6.6/arm64-dts-qcom-sm6375-fix-cdsp-memory-base-and-length.patch b/queue-6.6/arm64-dts-qcom-sm6375-fix-cdsp-memory-base-and-length.patch new file mode 100644 index 0000000000..9445bce52f --- /dev/null +++ b/queue-6.6/arm64-dts-qcom-sm6375-fix-cdsp-memory-base-and-length.patch @@ -0,0 +1,44 @@ +From c9f7f341e896836c99709421a23bae5f53039aab Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Fri, 13 Dec 2024 15:54:07 +0100 +Subject: arm64: dts: qcom: sm6375: Fix CDSP memory base and length + +From: Krzysztof Kozlowski + +commit c9f7f341e896836c99709421a23bae5f53039aab upstream. + +The address space in CDSP PAS (Peripheral Authentication Service) +remoteproc node should point to the QDSP PUB address space +(QDSP6...SS_PUB): 0x0b30_0000 with length of 0x10000. + +0x0b00_0000, value used so far, is the main region of CDSP. + +Correct the base address and length, which should have no functional +impact on Linux users, because PAS loader does not use this address +space at all. + +Fixes: fe6fd26aeddf ("arm64: dts: qcom: sm6375: Add ADSP&CDSP") +Cc: stable@vger.kernel.org +Signed-off-by: Krzysztof Kozlowski +Reviewed-by: Konrad Dybcio +Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-18-2e0036fccd8d@linaro.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/qcom/sm6375.dtsi | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/arm64/boot/dts/qcom/sm6375.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi +@@ -1550,9 +1550,9 @@ + }; + }; + +- remoteproc_cdsp: remoteproc@b000000 { ++ remoteproc_cdsp: remoteproc@b300000 { + compatible = "qcom,sm6375-cdsp-pas"; +- reg = <0x0 0x0b000000 0x0 0x100000>; ++ reg = <0x0 0x0b300000 0x0 0x10000>; + + interrupts-extended = <&intc GIC_SPI 265 IRQ_TYPE_EDGE_RISING>, + <&smp2p_cdsp_in 0 IRQ_TYPE_EDGE_RISING>, diff --git a/queue-6.6/arm64-dts-qcom-sm6375-fix-mpss-memory-base-and-length.patch b/queue-6.6/arm64-dts-qcom-sm6375-fix-mpss-memory-base-and-length.patch new file mode 100644 index 0000000000..99df4b8ec4 --- /dev/null +++ b/queue-6.6/arm64-dts-qcom-sm6375-fix-mpss-memory-base-and-length.patch @@ -0,0 +1,44 @@ +From 918e71ba0c08c3d609ad69067854b0f675c4a253 Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Fri, 13 Dec 2024 15:54:08 +0100 +Subject: arm64: dts: qcom: sm6375: Fix MPSS memory base and length + +From: Krzysztof Kozlowski + +commit 918e71ba0c08c3d609ad69067854b0f675c4a253 upstream. + +The address space in MPSS/Modem PAS (Peripheral Authentication Service) +remoteproc node should point to the QDSP PUB address space +(QDSP6...SS_PUB): 0x0608_0000 with length of 0x10000. + +0x0600_0000, value used so far, is the main region of Modem. + +Correct the base address and length, which should have no functional +impact on Linux users, because PAS loader does not use this address +space at all. + +Fixes: 31cc61104f68 ("arm64: dts: qcom: sm6375: Add modem nodes") +Cc: stable@vger.kernel.org +Signed-off-by: Krzysztof Kozlowski +Reviewed-by: Konrad Dybcio +Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-19-2e0036fccd8d@linaro.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/qcom/sm6375.dtsi | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/arm64/boot/dts/qcom/sm6375.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm6375.dtsi +@@ -1471,9 +1471,9 @@ + #power-domain-cells = <1>; + }; + +- remoteproc_mss: remoteproc@6000000 { ++ remoteproc_mss: remoteproc@6080000 { + compatible = "qcom,sm6375-mpss-pas"; +- reg = <0 0x06000000 0 0x4040>; ++ reg = <0x0 0x06080000 0x0 0x10000>; + + interrupts-extended = <&intc GIC_SPI 307 IRQ_TYPE_EDGE_RISING>, + <&smp2p_modem_in 0 IRQ_TYPE_EDGE_RISING>, diff --git a/queue-6.6/arm64-dts-qcom-sm8350-fix-adsp-memory-base-and-length.patch b/queue-6.6/arm64-dts-qcom-sm8350-fix-adsp-memory-base-and-length.patch new file mode 100644 index 0000000000..98e4ed7927 --- /dev/null +++ b/queue-6.6/arm64-dts-qcom-sm8350-fix-adsp-memory-base-and-length.patch @@ -0,0 +1,324 @@ +From f9ba85566ddd5a3db8fa291aaecd70c4e55a3732 Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Fri, 13 Dec 2024 15:53:50 +0100 +Subject: arm64: dts: qcom: sm8350: Fix ADSP memory base and length + +From: Krzysztof Kozlowski + +commit f9ba85566ddd5a3db8fa291aaecd70c4e55a3732 upstream. + +The address space in ADSP PAS (Peripheral Authentication Service) +remoteproc node should point to the QDSP PUB address space +(QDSP6...SS_PUB): 0x0300_0000 with length of 0x10000. 0x1730_0000, +value used so far, was copied from downstream DTS, is in the middle of +unused space and downstream DTS describes the PIL loader, which is a bit +different interface. + +Assume existing value (thus downstream DTS) is not really describing the +intended ADSP PAS region. + +Correct the base address and length, which also moves the node to +different place to keep things sorted by unit address. The diff looks +big, but only the unit address and "reg" property were changed. This +should have no functional impact on Linux users, because PAS loader does +not use this address space at all. + +Fixes: 177fcf0aeda2 ("arm64: dts: qcom: sm8350: Add remoteprocs") +Cc: stable@vger.kernel.org +Reviewed-by: Konrad Dybcio +Signed-off-by: Krzysztof Kozlowski +Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-1-2e0036fccd8d@linaro.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/qcom/sm8350.dtsi | 272 +++++++++++++++++------------------ + 1 file changed, 136 insertions(+), 136 deletions(-) + +--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi +@@ -1819,6 +1819,142 @@ + #hwlock-cells = <1>; + }; + ++ adsp: remoteproc@3000000 { ++ compatible = "qcom,sm8350-adsp-pas"; ++ reg = <0x0 0x03000000 0x0 0x10000>; ++ ++ interrupts-extended = <&pdc 6 IRQ_TYPE_EDGE_RISING>, ++ <&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>, ++ <&smp2p_adsp_in 1 IRQ_TYPE_EDGE_RISING>, ++ <&smp2p_adsp_in 2 IRQ_TYPE_EDGE_RISING>, ++ <&smp2p_adsp_in 3 IRQ_TYPE_EDGE_RISING>; ++ interrupt-names = "wdog", "fatal", "ready", ++ "handover", "stop-ack"; ++ ++ clocks = <&rpmhcc RPMH_CXO_CLK>; ++ clock-names = "xo"; ++ ++ power-domains = <&rpmhpd RPMHPD_LCX>, ++ <&rpmhpd RPMHPD_LMX>; ++ power-domain-names = "lcx", "lmx"; ++ ++ memory-region = <&pil_adsp_mem>; ++ ++ qcom,qmp = <&aoss_qmp>; ++ ++ qcom,smem-states = <&smp2p_adsp_out 0>; ++ qcom,smem-state-names = "stop"; ++ ++ status = "disabled"; ++ ++ glink-edge { ++ interrupts-extended = <&ipcc IPCC_CLIENT_LPASS ++ IPCC_MPROC_SIGNAL_GLINK_QMP ++ IRQ_TYPE_EDGE_RISING>; ++ mboxes = <&ipcc IPCC_CLIENT_LPASS ++ IPCC_MPROC_SIGNAL_GLINK_QMP>; ++ ++ label = "lpass"; ++ qcom,remote-pid = <2>; ++ ++ apr { ++ compatible = "qcom,apr-v2"; ++ qcom,glink-channels = "apr_audio_svc"; ++ qcom,domain = ; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ service@3 { ++ reg = ; ++ compatible = "qcom,q6core"; ++ qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; ++ }; ++ ++ q6afe: service@4 { ++ compatible = "qcom,q6afe"; ++ reg = ; ++ qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; ++ ++ q6afedai: dais { ++ compatible = "qcom,q6afe-dais"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ #sound-dai-cells = <1>; ++ }; ++ ++ q6afecc: clock-controller { ++ compatible = "qcom,q6afe-clocks"; ++ #clock-cells = <2>; ++ }; ++ }; ++ ++ q6asm: service@7 { ++ compatible = "qcom,q6asm"; ++ reg = ; ++ qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; ++ ++ q6asmdai: dais { ++ compatible = "qcom,q6asm-dais"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ #sound-dai-cells = <1>; ++ iommus = <&apps_smmu 0x1801 0x0>; ++ ++ dai@0 { ++ reg = <0>; ++ }; ++ ++ dai@1 { ++ reg = <1>; ++ }; ++ ++ dai@2 { ++ reg = <2>; ++ }; ++ }; ++ }; ++ ++ q6adm: service@8 { ++ compatible = "qcom,q6adm"; ++ reg = ; ++ qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; ++ ++ q6routing: routing { ++ compatible = "qcom,q6adm-routing"; ++ #sound-dai-cells = <0>; ++ }; ++ }; ++ }; ++ ++ fastrpc { ++ compatible = "qcom,fastrpc"; ++ qcom,glink-channels = "fastrpcglink-apps-dsp"; ++ label = "adsp"; ++ qcom,non-secure-domain; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ compute-cb@3 { ++ compatible = "qcom,fastrpc-compute-cb"; ++ reg = <3>; ++ iommus = <&apps_smmu 0x1803 0x0>; ++ }; ++ ++ compute-cb@4 { ++ compatible = "qcom,fastrpc-compute-cb"; ++ reg = <4>; ++ iommus = <&apps_smmu 0x1804 0x0>; ++ }; ++ ++ compute-cb@5 { ++ compatible = "qcom,fastrpc-compute-cb"; ++ reg = <5>; ++ iommus = <&apps_smmu 0x1805 0x0>; ++ }; ++ }; ++ }; ++ }; ++ + lpass_tlmm: pinctrl@33c0000 { + compatible = "qcom,sm8350-lpass-lpi-pinctrl"; + reg = <0 0x033c0000 0 0x20000>, +@@ -3204,142 +3340,6 @@ + ; + }; + +- adsp: remoteproc@17300000 { +- compatible = "qcom,sm8350-adsp-pas"; +- reg = <0 0x17300000 0 0x100>; +- +- interrupts-extended = <&pdc 6 IRQ_TYPE_EDGE_RISING>, +- <&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>, +- <&smp2p_adsp_in 1 IRQ_TYPE_EDGE_RISING>, +- <&smp2p_adsp_in 2 IRQ_TYPE_EDGE_RISING>, +- <&smp2p_adsp_in 3 IRQ_TYPE_EDGE_RISING>; +- interrupt-names = "wdog", "fatal", "ready", +- "handover", "stop-ack"; +- +- clocks = <&rpmhcc RPMH_CXO_CLK>; +- clock-names = "xo"; +- +- power-domains = <&rpmhpd RPMHPD_LCX>, +- <&rpmhpd RPMHPD_LMX>; +- power-domain-names = "lcx", "lmx"; +- +- memory-region = <&pil_adsp_mem>; +- +- qcom,qmp = <&aoss_qmp>; +- +- qcom,smem-states = <&smp2p_adsp_out 0>; +- qcom,smem-state-names = "stop"; +- +- status = "disabled"; +- +- glink-edge { +- interrupts-extended = <&ipcc IPCC_CLIENT_LPASS +- IPCC_MPROC_SIGNAL_GLINK_QMP +- IRQ_TYPE_EDGE_RISING>; +- mboxes = <&ipcc IPCC_CLIENT_LPASS +- IPCC_MPROC_SIGNAL_GLINK_QMP>; +- +- label = "lpass"; +- qcom,remote-pid = <2>; +- +- apr { +- compatible = "qcom,apr-v2"; +- qcom,glink-channels = "apr_audio_svc"; +- qcom,domain = ; +- #address-cells = <1>; +- #size-cells = <0>; +- +- service@3 { +- reg = ; +- compatible = "qcom,q6core"; +- qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; +- }; +- +- q6afe: service@4 { +- compatible = "qcom,q6afe"; +- reg = ; +- qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; +- +- q6afedai: dais { +- compatible = "qcom,q6afe-dais"; +- #address-cells = <1>; +- #size-cells = <0>; +- #sound-dai-cells = <1>; +- }; +- +- q6afecc: clock-controller { +- compatible = "qcom,q6afe-clocks"; +- #clock-cells = <2>; +- }; +- }; +- +- q6asm: service@7 { +- compatible = "qcom,q6asm"; +- reg = ; +- qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; +- +- q6asmdai: dais { +- compatible = "qcom,q6asm-dais"; +- #address-cells = <1>; +- #size-cells = <0>; +- #sound-dai-cells = <1>; +- iommus = <&apps_smmu 0x1801 0x0>; +- +- dai@0 { +- reg = <0>; +- }; +- +- dai@1 { +- reg = <1>; +- }; +- +- dai@2 { +- reg = <2>; +- }; +- }; +- }; +- +- q6adm: service@8 { +- compatible = "qcom,q6adm"; +- reg = ; +- qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; +- +- q6routing: routing { +- compatible = "qcom,q6adm-routing"; +- #sound-dai-cells = <0>; +- }; +- }; +- }; +- +- fastrpc { +- compatible = "qcom,fastrpc"; +- qcom,glink-channels = "fastrpcglink-apps-dsp"; +- label = "adsp"; +- qcom,non-secure-domain; +- #address-cells = <1>; +- #size-cells = <0>; +- +- compute-cb@3 { +- compatible = "qcom,fastrpc-compute-cb"; +- reg = <3>; +- iommus = <&apps_smmu 0x1803 0x0>; +- }; +- +- compute-cb@4 { +- compatible = "qcom,fastrpc-compute-cb"; +- reg = <4>; +- iommus = <&apps_smmu 0x1804 0x0>; +- }; +- +- compute-cb@5 { +- compatible = "qcom,fastrpc-compute-cb"; +- reg = <5>; +- iommus = <&apps_smmu 0x1805 0x0>; +- }; +- }; +- }; +- }; +- + intc: interrupt-controller@17a00000 { + compatible = "arm,gic-v3"; + #interrupt-cells = <3>; diff --git a/queue-6.6/arm64-dts-qcom-sm8350-fix-cdsp-memory-base-and-length.patch b/queue-6.6/arm64-dts-qcom-sm8350-fix-cdsp-memory-base-and-length.patch new file mode 100644 index 0000000000..e800fbfa72 --- /dev/null +++ b/queue-6.6/arm64-dts-qcom-sm8350-fix-cdsp-memory-base-and-length.patch @@ -0,0 +1,272 @@ +From f4afd8ba453b6e82245b9068868c72c831aec84e Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Fri, 13 Dec 2024 15:53:51 +0100 +Subject: arm64: dts: qcom: sm8350: Fix CDSP memory base and length + +From: Krzysztof Kozlowski + +commit f4afd8ba453b6e82245b9068868c72c831aec84e upstream. + +The address space in CDSP PAS (Peripheral Authentication Service) +remoteproc node should point to the QDSP PUB address space +(QDSP6...SS_PUB): 0x0a30_0000 with length of 0x10000. 0x9890_0000, +value used so far, was copied from downstream DTS, is in the middle of +RAM/DDR space and downstream DTS describes the PIL loader, which is a +bit different interface. Datasheet says that one of the main CDSP +address spaces is 0x0980_0000, which is oddly similar to 0x9890_0000, +but quite different. + +Assume existing value (thus downstream DTS) is not really describing the +intended CDSP PAS region. + +Correct the base address and length, which also moves the node to +different place to keep things sorted by unit address. The diff looks +big, but only the unit address and "reg" property were changed. This +should have no functional impact on Linux users, because PAS loader does +not use this address space at all. + +Fixes: 177fcf0aeda2 ("arm64: dts: qcom: sm8350: Add remoteprocs") +Cc: stable@vger.kernel.org +Reviewed-by: Konrad Dybcio +Signed-off-by: Krzysztof Kozlowski +Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-2-2e0036fccd8d@linaro.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/qcom/sm8350.dtsi | 218 +++++++++++++++++------------------ + 1 file changed, 109 insertions(+), 109 deletions(-) + +--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi +@@ -2435,6 +2435,115 @@ + qcom,bcm-voters = <&apps_bcm_voter>; + }; + ++ cdsp: remoteproc@a300000 { ++ compatible = "qcom,sm8350-cdsp-pas"; ++ reg = <0x0 0x0a300000 0x0 0x10000>; ++ ++ interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_EDGE_RISING>, ++ <&smp2p_cdsp_in 0 IRQ_TYPE_EDGE_RISING>, ++ <&smp2p_cdsp_in 1 IRQ_TYPE_EDGE_RISING>, ++ <&smp2p_cdsp_in 2 IRQ_TYPE_EDGE_RISING>, ++ <&smp2p_cdsp_in 3 IRQ_TYPE_EDGE_RISING>; ++ interrupt-names = "wdog", "fatal", "ready", ++ "handover", "stop-ack"; ++ ++ clocks = <&rpmhcc RPMH_CXO_CLK>; ++ clock-names = "xo"; ++ ++ power-domains = <&rpmhpd RPMHPD_CX>, ++ <&rpmhpd RPMHPD_MXC>; ++ power-domain-names = "cx", "mxc"; ++ ++ interconnects = <&compute_noc MASTER_CDSP_PROC 0 &mc_virt SLAVE_EBI1 0>; ++ ++ memory-region = <&pil_cdsp_mem>; ++ ++ qcom,qmp = <&aoss_qmp>; ++ ++ qcom,smem-states = <&smp2p_cdsp_out 0>; ++ qcom,smem-state-names = "stop"; ++ ++ status = "disabled"; ++ ++ glink-edge { ++ interrupts-extended = <&ipcc IPCC_CLIENT_CDSP ++ IPCC_MPROC_SIGNAL_GLINK_QMP ++ IRQ_TYPE_EDGE_RISING>; ++ mboxes = <&ipcc IPCC_CLIENT_CDSP ++ IPCC_MPROC_SIGNAL_GLINK_QMP>; ++ ++ label = "cdsp"; ++ qcom,remote-pid = <5>; ++ ++ fastrpc { ++ compatible = "qcom,fastrpc"; ++ qcom,glink-channels = "fastrpcglink-apps-dsp"; ++ label = "cdsp"; ++ qcom,non-secure-domain; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ compute-cb@1 { ++ compatible = "qcom,fastrpc-compute-cb"; ++ reg = <1>; ++ iommus = <&apps_smmu 0x2161 0x0400>, ++ <&apps_smmu 0x1181 0x0420>; ++ }; ++ ++ compute-cb@2 { ++ compatible = "qcom,fastrpc-compute-cb"; ++ reg = <2>; ++ iommus = <&apps_smmu 0x2162 0x0400>, ++ <&apps_smmu 0x1182 0x0420>; ++ }; ++ ++ compute-cb@3 { ++ compatible = "qcom,fastrpc-compute-cb"; ++ reg = <3>; ++ iommus = <&apps_smmu 0x2163 0x0400>, ++ <&apps_smmu 0x1183 0x0420>; ++ }; ++ ++ compute-cb@4 { ++ compatible = "qcom,fastrpc-compute-cb"; ++ reg = <4>; ++ iommus = <&apps_smmu 0x2164 0x0400>, ++ <&apps_smmu 0x1184 0x0420>; ++ }; ++ ++ compute-cb@5 { ++ compatible = "qcom,fastrpc-compute-cb"; ++ reg = <5>; ++ iommus = <&apps_smmu 0x2165 0x0400>, ++ <&apps_smmu 0x1185 0x0420>; ++ }; ++ ++ compute-cb@6 { ++ compatible = "qcom,fastrpc-compute-cb"; ++ reg = <6>; ++ iommus = <&apps_smmu 0x2166 0x0400>, ++ <&apps_smmu 0x1186 0x0420>; ++ }; ++ ++ compute-cb@7 { ++ compatible = "qcom,fastrpc-compute-cb"; ++ reg = <7>; ++ iommus = <&apps_smmu 0x2167 0x0400>, ++ <&apps_smmu 0x1187 0x0420>; ++ }; ++ ++ compute-cb@8 { ++ compatible = "qcom,fastrpc-compute-cb"; ++ reg = <8>; ++ iommus = <&apps_smmu 0x2168 0x0400>, ++ <&apps_smmu 0x1188 0x0420>; ++ }; ++ ++ /* note: secure cb9 in downstream */ ++ }; ++ }; ++ }; ++ + usb_1: usb@a6f8800 { + compatible = "qcom,sm8350-dwc3", "qcom,dwc3"; + reg = <0 0x0a6f8800 0 0x400>; +@@ -3508,115 +3617,6 @@ + #freq-domain-cells = <1>; + #clock-cells = <1>; + }; +- +- cdsp: remoteproc@98900000 { +- compatible = "qcom,sm8350-cdsp-pas"; +- reg = <0 0x98900000 0 0x1400000>; +- +- interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_EDGE_RISING>, +- <&smp2p_cdsp_in 0 IRQ_TYPE_EDGE_RISING>, +- <&smp2p_cdsp_in 1 IRQ_TYPE_EDGE_RISING>, +- <&smp2p_cdsp_in 2 IRQ_TYPE_EDGE_RISING>, +- <&smp2p_cdsp_in 3 IRQ_TYPE_EDGE_RISING>; +- interrupt-names = "wdog", "fatal", "ready", +- "handover", "stop-ack"; +- +- clocks = <&rpmhcc RPMH_CXO_CLK>; +- clock-names = "xo"; +- +- power-domains = <&rpmhpd RPMHPD_CX>, +- <&rpmhpd RPMHPD_MXC>; +- power-domain-names = "cx", "mxc"; +- +- interconnects = <&compute_noc MASTER_CDSP_PROC 0 &mc_virt SLAVE_EBI1 0>; +- +- memory-region = <&pil_cdsp_mem>; +- +- qcom,qmp = <&aoss_qmp>; +- +- qcom,smem-states = <&smp2p_cdsp_out 0>; +- qcom,smem-state-names = "stop"; +- +- status = "disabled"; +- +- glink-edge { +- interrupts-extended = <&ipcc IPCC_CLIENT_CDSP +- IPCC_MPROC_SIGNAL_GLINK_QMP +- IRQ_TYPE_EDGE_RISING>; +- mboxes = <&ipcc IPCC_CLIENT_CDSP +- IPCC_MPROC_SIGNAL_GLINK_QMP>; +- +- label = "cdsp"; +- qcom,remote-pid = <5>; +- +- fastrpc { +- compatible = "qcom,fastrpc"; +- qcom,glink-channels = "fastrpcglink-apps-dsp"; +- label = "cdsp"; +- qcom,non-secure-domain; +- #address-cells = <1>; +- #size-cells = <0>; +- +- compute-cb@1 { +- compatible = "qcom,fastrpc-compute-cb"; +- reg = <1>; +- iommus = <&apps_smmu 0x2161 0x0400>, +- <&apps_smmu 0x1181 0x0420>; +- }; +- +- compute-cb@2 { +- compatible = "qcom,fastrpc-compute-cb"; +- reg = <2>; +- iommus = <&apps_smmu 0x2162 0x0400>, +- <&apps_smmu 0x1182 0x0420>; +- }; +- +- compute-cb@3 { +- compatible = "qcom,fastrpc-compute-cb"; +- reg = <3>; +- iommus = <&apps_smmu 0x2163 0x0400>, +- <&apps_smmu 0x1183 0x0420>; +- }; +- +- compute-cb@4 { +- compatible = "qcom,fastrpc-compute-cb"; +- reg = <4>; +- iommus = <&apps_smmu 0x2164 0x0400>, +- <&apps_smmu 0x1184 0x0420>; +- }; +- +- compute-cb@5 { +- compatible = "qcom,fastrpc-compute-cb"; +- reg = <5>; +- iommus = <&apps_smmu 0x2165 0x0400>, +- <&apps_smmu 0x1185 0x0420>; +- }; +- +- compute-cb@6 { +- compatible = "qcom,fastrpc-compute-cb"; +- reg = <6>; +- iommus = <&apps_smmu 0x2166 0x0400>, +- <&apps_smmu 0x1186 0x0420>; +- }; +- +- compute-cb@7 { +- compatible = "qcom,fastrpc-compute-cb"; +- reg = <7>; +- iommus = <&apps_smmu 0x2167 0x0400>, +- <&apps_smmu 0x1187 0x0420>; +- }; +- +- compute-cb@8 { +- compatible = "qcom,fastrpc-compute-cb"; +- reg = <8>; +- iommus = <&apps_smmu 0x2168 0x0400>, +- <&apps_smmu 0x1188 0x0420>; +- }; +- +- /* note: secure cb9 in downstream */ +- }; +- }; +- }; + }; + + thermal_zones: thermal-zones { diff --git a/queue-6.6/arm64-dts-qcom-sm8350-fix-mpss-memory-length.patch b/queue-6.6/arm64-dts-qcom-sm8350-fix-mpss-memory-length.patch new file mode 100644 index 0000000000..ed9c7c009b --- /dev/null +++ b/queue-6.6/arm64-dts-qcom-sm8350-fix-mpss-memory-length.patch @@ -0,0 +1,39 @@ +From da1937dec9cd986e685b6a429b528a4cbc7b1603 Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Fri, 13 Dec 2024 15:53:52 +0100 +Subject: arm64: dts: qcom: sm8350: Fix MPSS memory length + +From: Krzysztof Kozlowski + +commit da1937dec9cd986e685b6a429b528a4cbc7b1603 upstream. + +The address space in MPSS/Modem PAS (Peripheral Authentication Service) +remoteproc node should point to the QDSP PUB address space +(QDSP6...SS_PUB) which has a length of 0x10000. Value of 0x4040 was +copied from older DTS, but it grew since then. + +This should have no functional impact on Linux users, because PAS loader +does not use this address space at all. + +Fixes: 177fcf0aeda2 ("arm64: dts: qcom: sm8350: Add remoteprocs") +Cc: stable@vger.kernel.org +Reviewed-by: Konrad Dybcio +Signed-off-by: Krzysztof Kozlowski +Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-3-2e0036fccd8d@linaro.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/qcom/sm8350.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi +@@ -2156,7 +2156,7 @@ + + mpss: remoteproc@4080000 { + compatible = "qcom,sm8350-mpss-pas"; +- reg = <0x0 0x04080000 0x0 0x4040>; ++ reg = <0x0 0x04080000 0x0 0x10000>; + + interrupts-extended = <&intc GIC_SPI 264 IRQ_TYPE_EDGE_RISING>, + <&smp2p_modem_in 0 IRQ_TYPE_EDGE_RISING>, diff --git a/queue-6.6/arm64-dts-qcom-sm8450-fix-cdsp-memory-length.patch b/queue-6.6/arm64-dts-qcom-sm8450-fix-cdsp-memory-length.patch new file mode 100644 index 0000000000..46dbe21bac --- /dev/null +++ b/queue-6.6/arm64-dts-qcom-sm8450-fix-cdsp-memory-length.patch @@ -0,0 +1,39 @@ +From 3751fe2cba2a9fba2204ef62102bc4bb027cec7b Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Fri, 13 Dec 2024 15:53:54 +0100 +Subject: arm64: dts: qcom: sm8450: Fix CDSP memory length + +From: Krzysztof Kozlowski + +commit 3751fe2cba2a9fba2204ef62102bc4bb027cec7b upstream. + +The address space in CDSP PAS (Peripheral Authentication Service) +remoteproc node should point to the QDSP PUB address space +(QDSP6...SS_PUB) which has a length of 0x10000. Value of 0x1400000 was +copied from older DTS, but it does not look accurate at all. + +This should have no functional impact on Linux users, because PAS loader +does not use this address space at all. + +Fixes: 1172729576fb ("arm64: dts: qcom: sm8450: Add remoteproc enablers and instances") +Cc: stable@vger.kernel.org +Reviewed-by: Neil Armstrong +Signed-off-by: Krzysztof Kozlowski +Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-5-2e0036fccd8d@linaro.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/qcom/sm8450.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi +@@ -2475,7 +2475,7 @@ + + remoteproc_cdsp: remoteproc@32300000 { + compatible = "qcom,sm8450-cdsp-pas"; +- reg = <0 0x32300000 0 0x1400000>; ++ reg = <0 0x32300000 0 0x10000>; + + interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_EDGE_RISING>, + <&smp2p_cdsp_in 0 IRQ_TYPE_EDGE_RISING>, diff --git a/queue-6.6/arm64-dts-qcom-sm8450-fix-mpss-memory-length.patch b/queue-6.6/arm64-dts-qcom-sm8450-fix-mpss-memory-length.patch new file mode 100644 index 0000000000..28acee8303 --- /dev/null +++ b/queue-6.6/arm64-dts-qcom-sm8450-fix-mpss-memory-length.patch @@ -0,0 +1,39 @@ +From fa6442e87ab7c4a58c0b5fc64aab1aacc8034712 Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Fri, 13 Dec 2024 15:53:55 +0100 +Subject: arm64: dts: qcom: sm8450: Fix MPSS memory length + +From: Krzysztof Kozlowski + +commit fa6442e87ab7c4a58c0b5fc64aab1aacc8034712 upstream. + +The address space in MPSS/Modem PAS (Peripheral Authentication Service) +remoteproc node should point to the QDSP PUB address space +(QDSP6...SS_PUB) which has a length of 0x10000. Value of 0x4040 was +copied from older DTS, but it grew since then. + +This should have no functional impact on Linux users, because PAS loader +does not use this address space at all. + +Fixes: 1172729576fb ("arm64: dts: qcom: sm8450: Add remoteproc enablers and instances") +Cc: stable@vger.kernel.org +Reviewed-by: Neil Armstrong +Signed-off-by: Krzysztof Kozlowski +Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-6-2e0036fccd8d@linaro.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/qcom/sm8450.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi +@@ -2581,7 +2581,7 @@ + + remoteproc_mpss: remoteproc@4080000 { + compatible = "qcom,sm8450-mpss-pas"; +- reg = <0x0 0x04080000 0x0 0x4040>; ++ reg = <0x0 0x04080000 0x0 0x10000>; + + interrupts-extended = <&intc GIC_SPI 264 IRQ_TYPE_EDGE_RISING>, + <&smp2p_modem_in 0 IRQ_TYPE_EDGE_RISING>, diff --git a/queue-6.6/arm64-dts-qcom-sm8550-correct-mdss-interconnects.patch b/queue-6.6/arm64-dts-qcom-sm8550-correct-mdss-interconnects.patch new file mode 100644 index 0000000000..850721185a --- /dev/null +++ b/queue-6.6/arm64-dts-qcom-sm8550-correct-mdss-interconnects.patch @@ -0,0 +1,46 @@ +From b8591df49cde459e3b84cdc0517d7bf92053d244 Mon Sep 17 00:00:00 2001 +From: Dmitry Baryshkov +Date: Sat, 26 Oct 2024 20:59:40 +0300 +Subject: arm64: dts: qcom: sm8550: correct MDSS interconnects + +From: Dmitry Baryshkov + +commit b8591df49cde459e3b84cdc0517d7bf92053d244 upstream. + +SM8550 lists two interconnects for the display subsystem, mdp0-mem +(between MDP and LLCC) and mdp1-mem (between LLCC and EBI, memory). +The second interconnect is a misuse. mdpN-mem paths should be used for +several outboud MDP interconnects rather than the path between LLCC and +memory. This kind of misuse can result in bandwidth underflows, possibly +degrading picture quality as the required memory bandwidth is divided +between all mdpN-mem paths (and LLCC-EBI should not be a part of such +division). + +Drop the second path and use direct MDP-EBI path for mdp0-mem until we +support separate MDP-LLCC and LLCC-EBI paths. + +Fixes: d7da51db5b81 ("arm64: dts: qcom: sm8550: add display hardware devices") +Cc: stable@kernel.org +Signed-off-by: Dmitry Baryshkov +Reviewed-by: Konrad Dybcio +Link: https://lore.kernel.org/r/20241026-fix-sm8x50-mdp-icc-v2-1-fd8ddf755acc@linaro.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/qcom/sm8550.dtsi | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +--- a/arch/arm64/boot/dts/qcom/sm8550.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi +@@ -2448,9 +2448,8 @@ + + power-domains = <&dispcc MDSS_GDSC>; + +- interconnects = <&mmss_noc MASTER_MDP 0 &gem_noc SLAVE_LLCC 0>, +- <&mc_virt MASTER_LLCC 0 &mc_virt SLAVE_EBI1 0>; +- interconnect-names = "mdp0-mem", "mdp1-mem"; ++ interconnects = <&mmss_noc MASTER_MDP 0 &mc_virt SLAVE_EBI1 0>; ++ interconnect-names = "mdp0-mem"; + + iommus = <&apps_smmu 0x1c00 0x2>; + diff --git a/queue-6.6/arm64-dts-qcom-sm8550-fix-cdsp-memory-length.patch b/queue-6.6/arm64-dts-qcom-sm8550-fix-cdsp-memory-length.patch new file mode 100644 index 0000000000..66c2b140d7 --- /dev/null +++ b/queue-6.6/arm64-dts-qcom-sm8550-fix-cdsp-memory-length.patch @@ -0,0 +1,40 @@ +From 6b2570e1e43e4acd0fcb98c6489736fe1c67b222 Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Fri, 13 Dec 2024 15:53:57 +0100 +Subject: arm64: dts: qcom: sm8550: Fix CDSP memory length + +From: Krzysztof Kozlowski + +commit 6b2570e1e43e4acd0fcb98c6489736fe1c67b222 upstream. + +The address space in CDSP PAS (Peripheral Authentication Service) +remoteproc node should point to the QDSP PUB address space +(QDSP6...SS_PUB) which has a length of 0x10000. Value of 0x1400000 was +copied from older DTS, but it does not look accurate at all. + +This should have no functional impact on Linux users, because PAS loader +does not use this address space at all. + +Fixes: d0c061e366ed ("arm64: dts: qcom: sm8550: add adsp, cdsp & mdss nodes") +Cc: stable@vger.kernel.org +Reviewed-by: Neil Armstrong +Reviewed-by: Konrad Dybcio +Signed-off-by: Krzysztof Kozlowski +Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-8-2e0036fccd8d@linaro.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/qcom/sm8550.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/qcom/sm8550.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi +@@ -4089,7 +4089,7 @@ + + remoteproc_cdsp: remoteproc@32300000 { + compatible = "qcom,sm8550-cdsp-pas"; +- reg = <0x0 0x32300000 0x0 0x1400000>; ++ reg = <0x0 0x32300000 0x0 0x10000>; + + interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_EDGE_RISING>, + <&smp2p_cdsp_in 0 IRQ_TYPE_EDGE_RISING>, diff --git a/queue-6.6/arm64-dts-qcom-sm8550-fix-mpss-memory-length.patch b/queue-6.6/arm64-dts-qcom-sm8550-fix-mpss-memory-length.patch new file mode 100644 index 0000000000..e34eb55af9 --- /dev/null +++ b/queue-6.6/arm64-dts-qcom-sm8550-fix-mpss-memory-length.patch @@ -0,0 +1,40 @@ +From 8ef227e93a513d431f9345f23cd4d2d65607b985 Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Fri, 13 Dec 2024 15:53:58 +0100 +Subject: arm64: dts: qcom: sm8550: Fix MPSS memory length + +From: Krzysztof Kozlowski + +commit 8ef227e93a513d431f9345f23cd4d2d65607b985 upstream. + +The address space in MPSS/Modem PAS (Peripheral Authentication Service) +remoteproc node should point to the QDSP PUB address space +(QDSP6...SS_PUB) which has a length of 0x10000. Value of 0x4040 was +copied from older DTS, but it grew since then. + +This should have no functional impact on Linux users, because PAS loader +does not use this address space at all. + +Fixes: d0c061e366ed ("arm64: dts: qcom: sm8550: add adsp, cdsp & mdss nodes") +Cc: stable@vger.kernel.org +Reviewed-by: Neil Armstrong +Reviewed-by: Konrad Dybcio +Signed-off-by: Krzysztof Kozlowski +Link: https://lore.kernel.org/r/20241213-dts-qcom-cdsp-mpss-base-address-v3-9-2e0036fccd8d@linaro.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/qcom/sm8550.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/qcom/sm8550.dtsi ++++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi +@@ -1986,7 +1986,7 @@ + + remoteproc_mpss: remoteproc@4080000 { + compatible = "qcom,sm8550-mpss-pas"; +- reg = <0x0 0x04080000 0x0 0x4040>; ++ reg = <0x0 0x04080000 0x0 0x10000>; + + interrupts-extended = <&intc GIC_SPI 264 IRQ_TYPE_EDGE_RISING>, + <&smp2p_modem_in 0 IRQ_TYPE_EDGE_RISING>, diff --git a/queue-6.6/arm64-tegra-disable-tegra234-sce-fabric-node.patch b/queue-6.6/arm64-tegra-disable-tegra234-sce-fabric-node.patch new file mode 100644 index 0000000000..8ffd670ed5 --- /dev/null +++ b/queue-6.6/arm64-tegra-disable-tegra234-sce-fabric-node.patch @@ -0,0 +1,44 @@ +From a5e6fc0a10fe280989f1367a3b4f8047c7d00ea6 Mon Sep 17 00:00:00 2001 +From: Sumit Gupta +Date: Wed, 18 Dec 2024 00:07:37 +0000 +Subject: arm64: tegra: Disable Tegra234 sce-fabric node + +From: Sumit Gupta + +commit a5e6fc0a10fe280989f1367a3b4f8047c7d00ea6 upstream. + +Access to safety cluster engine (SCE) fabric registers was blocked +by firewall after the introduction of Functional Safety Island in +Tegra234. After that, any access by software to SCE registers is +correctly resulting in the internal bus error. However, when CPUs +try accessing the SCE-fabric registers to print error info, +another firewall error occurs as the fabric registers are also +firewall protected. This results in a second error to be printed. +Disable the SCE fabric node to avoid printing the misleading error. +The first error info will be printed by the interrupt from the +fabric causing the actual access. + +Cc: stable@vger.kernel.org +Fixes: 302e154000ec ("arm64: tegra: Add node for CBB 2.0 on Tegra234") +Signed-off-by: Sumit Gupta +Signed-off-by: Ivy Huang +Reviewed-by: Brad Griffis +Reviewed-by: Jon Hunter +Link: https://lore.kernel.org/r/20241218000737.1789569-3-yijuh@nvidia.com +Signed-off-by: Thierry Reding +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/nvidia/tegra234.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/nvidia/tegra234.dtsi ++++ b/arch/arm64/boot/dts/nvidia/tegra234.dtsi +@@ -1709,7 +1709,7 @@ + compatible = "nvidia,tegra234-sce-fabric"; + reg = <0x0 0xb600000 0x0 0x40000>; + interrupts = ; +- status = "okay"; ++ status = "disabled"; + }; + + rce-fabric@be00000 { diff --git a/queue-6.6/arm64-tegra-fix-typo-in-tegra234-dce-fabric-compatible.patch b/queue-6.6/arm64-tegra-fix-typo-in-tegra234-dce-fabric-compatible.patch new file mode 100644 index 0000000000..fa64f64f6b --- /dev/null +++ b/queue-6.6/arm64-tegra-fix-typo-in-tegra234-dce-fabric-compatible.patch @@ -0,0 +1,41 @@ +From 604120fd9e9df50ee0e803d3c6e77a1f45d2c58e Mon Sep 17 00:00:00 2001 +From: Sumit Gupta +Date: Wed, 18 Dec 2024 00:07:36 +0000 +Subject: arm64: tegra: Fix typo in Tegra234 dce-fabric compatible + +From: Sumit Gupta + +commit 604120fd9e9df50ee0e803d3c6e77a1f45d2c58e upstream. + +The compatible string for the Tegra DCE fabric is currently defined as +'nvidia,tegra234-sce-fabric' but this is incorrect because this is the +compatible string for SCE fabric. Update the compatible for the DCE +fabric to correct the compatible string. + +This compatible needs to be correct in order for the interconnect +to catch things such as improper data accesses. + +Cc: stable@vger.kernel.org +Fixes: 302e154000ec ("arm64: tegra: Add node for CBB 2.0 on Tegra234") +Signed-off-by: Sumit Gupta +Signed-off-by: Ivy Huang +Reviewed-by: Brad Griffis +Reviewed-by: Jon Hunter +Link: https://lore.kernel.org/r/20241218000737.1789569-2-yijuh@nvidia.com +Signed-off-by: Thierry Reding +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/boot/dts/nvidia/tegra234.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/nvidia/tegra234.dtsi ++++ b/arch/arm64/boot/dts/nvidia/tegra234.dtsi +@@ -1889,7 +1889,7 @@ + }; + + dce-fabric@de00000 { +- compatible = "nvidia,tegra234-sce-fabric"; ++ compatible = "nvidia,tegra234-dce-fabric"; + reg = <0x0 0xde00000 0x0 0x40000>; + interrupts = ; + status = "okay"; diff --git a/queue-6.6/crypto-qce-fix-priority-to-be-less-than-armv8-ce.patch b/queue-6.6/crypto-qce-fix-priority-to-be-less-than-armv8-ce.patch new file mode 100644 index 0000000000..7306d4e211 --- /dev/null +++ b/queue-6.6/crypto-qce-fix-priority-to-be-less-than-armv8-ce.patch @@ -0,0 +1,64 @@ +From 49b9258b05b97c6464e1964b6a2fddb3ddb65d17 Mon Sep 17 00:00:00 2001 +From: Eric Biggers +Date: Tue, 3 Dec 2024 10:05:53 -0800 +Subject: crypto: qce - fix priority to be less than ARMv8 CE + +From: Eric Biggers + +commit 49b9258b05b97c6464e1964b6a2fddb3ddb65d17 upstream. + +As QCE is an order of magnitude slower than the ARMv8 Crypto Extensions +on the CPU, and is also less well tested, give it a lower priority. +Previously the QCE SHA algorithms had higher priority than the ARMv8 CE +equivalents, and the ciphers such as AES-XTS had the same priority which +meant the QCE versions were chosen if they happened to be loaded later. + +Fixes: ec8f5d8f6f76 ("crypto: qce - Qualcomm crypto engine driver") +Cc: stable@vger.kernel.org +Cc: Bartosz Golaszewski +Cc: Neil Armstrong +Cc: Thara Gopinath +Signed-off-by: Eric Biggers +Reviewed-by: Bartosz Golaszewski +Reviewed-by: Ard Biesheuvel +Signed-off-by: Herbert Xu +Signed-off-by: Greg Kroah-Hartman +--- + drivers/crypto/qce/aead.c | 2 +- + drivers/crypto/qce/sha.c | 2 +- + drivers/crypto/qce/skcipher.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/crypto/qce/aead.c ++++ b/drivers/crypto/qce/aead.c +@@ -786,7 +786,7 @@ static int qce_aead_register_one(const s + alg->init = qce_aead_init; + alg->exit = qce_aead_exit; + +- alg->base.cra_priority = 300; ++ alg->base.cra_priority = 275; + alg->base.cra_flags = CRYPTO_ALG_ASYNC | + CRYPTO_ALG_ALLOCATES_MEMORY | + CRYPTO_ALG_KERN_DRIVER_ONLY | +--- a/drivers/crypto/qce/sha.c ++++ b/drivers/crypto/qce/sha.c +@@ -482,7 +482,7 @@ static int qce_ahash_register_one(const + + base = &alg->halg.base; + base->cra_blocksize = def->blocksize; +- base->cra_priority = 300; ++ base->cra_priority = 175; + base->cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_KERN_DRIVER_ONLY; + base->cra_ctxsize = sizeof(struct qce_sha_ctx); + base->cra_alignmask = 0; +--- a/drivers/crypto/qce/skcipher.c ++++ b/drivers/crypto/qce/skcipher.c +@@ -461,7 +461,7 @@ static int qce_skcipher_register_one(con + alg->encrypt = qce_skcipher_encrypt; + alg->decrypt = qce_skcipher_decrypt; + +- alg->base.cra_priority = 300; ++ alg->base.cra_priority = 275; + alg->base.cra_flags = CRYPTO_ALG_ASYNC | + CRYPTO_ALG_ALLOCATES_MEMORY | + CRYPTO_ALG_KERN_DRIVER_ONLY; diff --git a/queue-6.6/iio-light-as73211-fix-channel-handling-in-only-color-triggered-buffer.patch b/queue-6.6/iio-light-as73211-fix-channel-handling-in-only-color-triggered-buffer.patch new file mode 100644 index 0000000000..efb1fb6336 --- /dev/null +++ b/queue-6.6/iio-light-as73211-fix-channel-handling-in-only-color-triggered-buffer.patch @@ -0,0 +1,86 @@ +From ab09c6cfe01b317f515bcd944668697241a54b9d Mon Sep 17 00:00:00 2001 +From: Javier Carrasco +Date: Sat, 14 Dec 2024 23:55:50 +0100 +Subject: iio: light: as73211: fix channel handling in only-color triggered buffer + +From: Javier Carrasco + +commit ab09c6cfe01b317f515bcd944668697241a54b9d upstream. + +The channel index is off by one unit if AS73211_SCAN_MASK_ALL is not +set (optimized path for color channel readings), and it must be shifted +instead of leaving an empty channel for the temperature when it is off. + +Once the channel index is fixed, the uninitialized channel must be set +to zero to avoid pushing uninitialized data. + +Add available_scan_masks for all channels and only-color channels to let +the IIO core demux and repack the enabled channels. + +Cc: stable@vger.kernel.org +Fixes: 403e5586b52e ("iio: light: as73211: New driver") +Tested-by: Christian Eggers +Signed-off-by: Javier Carrasco +Link: https://patch.msgid.link/20241214-iio_memset_scan_holes-v4-1-260b395b8ed5@gmail.com +Signed-off-by: Jonathan Cameron +Signed-off-by: Greg Kroah-Hartman +--- + drivers/iio/light/as73211.c | 24 ++++++++++++++++++++---- + 1 file changed, 20 insertions(+), 4 deletions(-) + +--- a/drivers/iio/light/as73211.c ++++ b/drivers/iio/light/as73211.c +@@ -154,6 +154,12 @@ struct as73211_data { + BIT(AS73211_SCAN_INDEX_TEMP) | \ + AS73211_SCAN_MASK_COLOR) + ++static const unsigned long as73211_scan_masks[] = { ++ AS73211_SCAN_MASK_COLOR, ++ AS73211_SCAN_MASK_ALL, ++ 0 ++}; ++ + static const struct iio_chan_spec as73211_channels[] = { + { + .type = IIO_TEMP, +@@ -602,9 +608,12 @@ static irqreturn_t as73211_trigger_handl + + /* AS73211 starts reading at address 2 */ + ret = i2c_master_recv(data->client, +- (char *)&scan.chan[1], 3 * sizeof(scan.chan[1])); ++ (char *)&scan.chan[0], 3 * sizeof(scan.chan[0])); + if (ret < 0) + goto done; ++ ++ /* Avoid pushing uninitialized data */ ++ scan.chan[3] = 0; + } + + if (data_result) { +@@ -612,9 +621,15 @@ static irqreturn_t as73211_trigger_handl + * Saturate all channels (in case of overflows). Temperature channel + * is not affected by overflows. + */ +- scan.chan[1] = cpu_to_le16(U16_MAX); +- scan.chan[2] = cpu_to_le16(U16_MAX); +- scan.chan[3] = cpu_to_le16(U16_MAX); ++ if (*indio_dev->active_scan_mask == AS73211_SCAN_MASK_ALL) { ++ scan.chan[1] = cpu_to_le16(U16_MAX); ++ scan.chan[2] = cpu_to_le16(U16_MAX); ++ scan.chan[3] = cpu_to_le16(U16_MAX); ++ } else { ++ scan.chan[0] = cpu_to_le16(U16_MAX); ++ scan.chan[1] = cpu_to_le16(U16_MAX); ++ scan.chan[2] = cpu_to_le16(U16_MAX); ++ } + } + + iio_push_to_buffers_with_timestamp(indio_dev, &scan, iio_get_time_ns(indio_dev)); +@@ -684,6 +699,7 @@ static int as73211_probe(struct i2c_clie + indio_dev->channels = as73211_channels; + indio_dev->num_channels = ARRAY_SIZE(as73211_channels); + indio_dev->modes = INDIO_DIRECT_MODE; ++ indio_dev->available_scan_masks = as73211_scan_masks; + + ret = i2c_smbus_read_byte_data(data->client, AS73211_REG_OSR); + if (ret < 0) diff --git a/queue-6.6/kfence-skip-__gfp_thisnode-allocations-on-numa-systems.patch b/queue-6.6/kfence-skip-__gfp_thisnode-allocations-on-numa-systems.patch new file mode 100644 index 0000000000..7f545cd521 --- /dev/null +++ b/queue-6.6/kfence-skip-__gfp_thisnode-allocations-on-numa-systems.patch @@ -0,0 +1,50 @@ +From e64f81946adf68cd75e2207dd9a51668348a4af8 Mon Sep 17 00:00:00 2001 +From: Marco Elver +Date: Fri, 24 Jan 2025 13:01:38 +0100 +Subject: kfence: skip __GFP_THISNODE allocations on NUMA systems + +From: Marco Elver + +commit e64f81946adf68cd75e2207dd9a51668348a4af8 upstream. + +On NUMA systems, __GFP_THISNODE indicates that an allocation _must_ be on +a particular node, and failure to allocate on the desired node will result +in a failed allocation. + +Skip __GFP_THISNODE allocations if we are running on a NUMA system, since +KFENCE can't guarantee which node its pool pages are allocated on. + +Link: https://lkml.kernel.org/r/20250124120145.410066-1-elver@google.com +Fixes: 236e9f153852 ("kfence: skip all GFP_ZONEMASK allocations") +Signed-off-by: Marco Elver +Reported-by: Vlastimil Babka +Acked-by: Vlastimil Babka +Cc: Christoph Lameter +Cc: Alexander Potapenko +Cc: Chistoph Lameter +Cc: Dmitriy Vyukov +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman +--- + mm/kfence/core.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/mm/kfence/core.c ++++ b/mm/kfence/core.c +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -1065,6 +1066,7 @@ void *__kfence_alloc(struct kmem_cache * + * properties (e.g. reside in DMAable memory). + */ + if ((flags & GFP_ZONEMASK) || ++ ((flags & __GFP_THISNODE) && num_online_nodes() > 1) || + (s->flags & (SLAB_CACHE_DMA | SLAB_CACHE_DMA32))) { + atomic_long_inc(&counters[KFENCE_COUNTER_SKIP_INCOMPAT]); + return NULL; diff --git a/queue-6.6/media-ccs-clean-up-parsed-ccs-static-data-on-parse-failure.patch b/queue-6.6/media-ccs-clean-up-parsed-ccs-static-data-on-parse-failure.patch new file mode 100644 index 0000000000..c1f6eb7e5d --- /dev/null +++ b/queue-6.6/media-ccs-clean-up-parsed-ccs-static-data-on-parse-failure.patch @@ -0,0 +1,72 @@ +From da73efa8e675a2b58f1c7ae61201acfe57714bf7 Mon Sep 17 00:00:00 2001 +From: Sakari Ailus +Date: Tue, 3 Dec 2024 12:23:01 +0200 +Subject: media: ccs: Clean up parsed CCS static data on parse failure + +From: Sakari Ailus + +commit da73efa8e675a2b58f1c7ae61201acfe57714bf7 upstream. + +ccs_data_parse() releases the allocated in-memory data structure when the +parser fails, but it does not clean up parsed metadata that is there to +help access the actual data. Do that, in order to return the data +structure in a sane state. + +Fixes: a6b396f410b1 ("media: ccs: Add CCS static data parser library") +Cc: stable@vger.kernel.org +Signed-off-by: Sakari Ailus +Reviewed-by: Mehdi Djait +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/i2c/ccs/ccs-data.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +--- a/drivers/media/i2c/ccs/ccs-data.c ++++ b/drivers/media/i2c/ccs/ccs-data.c +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + #include "ccs-data-defs.h" + +@@ -948,15 +949,15 @@ int ccs_data_parse(struct ccs_data_conta + + rval = __ccs_data_parse(&bin, ccsdata, data, len, dev, verbose); + if (rval) +- return rval; ++ goto out_cleanup; + + rval = bin_backing_alloc(&bin); + if (rval) +- return rval; ++ goto out_cleanup; + + rval = __ccs_data_parse(&bin, ccsdata, data, len, dev, false); + if (rval) +- goto out_free; ++ goto out_cleanup; + + if (verbose && ccsdata->version) + print_ccs_data_version(dev, ccsdata->version); +@@ -965,15 +966,16 @@ int ccs_data_parse(struct ccs_data_conta + rval = -EPROTO; + dev_dbg(dev, "parsing mismatch; base %p; now %p; end %p\n", + bin.base, bin.now, bin.end); +- goto out_free; ++ goto out_cleanup; + } + + ccsdata->backing = bin.base; + + return 0; + +-out_free: ++out_cleanup: + kvfree(bin.base); ++ memset(ccsdata, 0, sizeof(*ccsdata)); + + return rval; + } diff --git a/queue-6.6/media-ccs-fix-ccs-static-data-parsing-for-large-block-sizes.patch b/queue-6.6/media-ccs-fix-ccs-static-data-parsing-for-large-block-sizes.patch new file mode 100644 index 0000000000..21c10db3da --- /dev/null +++ b/queue-6.6/media-ccs-fix-ccs-static-data-parsing-for-large-block-sizes.patch @@ -0,0 +1,37 @@ +From 82b696750f0b60e7513082a10ad42786854f59f8 Mon Sep 17 00:00:00 2001 +From: Sakari Ailus +Date: Tue, 3 Dec 2024 10:10:23 +0200 +Subject: media: ccs: Fix CCS static data parsing for large block sizes + +From: Sakari Ailus + +commit 82b696750f0b60e7513082a10ad42786854f59f8 upstream. + +The length field of the CCS static data blocks was mishandled, leading to +wrong interpretation of the length header for blocks that are 16 kiB in +size. Such large blocks are very, very rare and so this wasn't found +earlier. + +As the length is used as part of input validation, the issue has no +security implications. + +Fixes: a6b396f410b1 ("media: ccs: Add CCS static data parser library") +Cc: stable@vger.kernel.org +Signed-off-by: Sakari Ailus +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/i2c/ccs/ccs-data.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/media/i2c/ccs/ccs-data.c ++++ b/drivers/media/i2c/ccs/ccs-data.c +@@ -98,7 +98,7 @@ ccs_data_parse_length_specifier(const st + plen = ((size_t) + (__len3->length[0] & + ((1 << CCS_DATA_LENGTH_SPECIFIER_SIZE_SHIFT) - 1)) +- << 16) + (__len3->length[0] << 8) + __len3->length[1]; ++ << 16) + (__len3->length[1] << 8) + __len3->length[2]; + break; + } + default: diff --git a/queue-6.6/media-ccs-fix-cleanup-order-in-ccs_probe.patch b/queue-6.6/media-ccs-fix-cleanup-order-in-ccs_probe.patch new file mode 100644 index 0000000000..413f5500f7 --- /dev/null +++ b/queue-6.6/media-ccs-fix-cleanup-order-in-ccs_probe.patch @@ -0,0 +1,44 @@ +From 6fdbff0f54786e94f0f630ff200ec1d666b1633e Mon Sep 17 00:00:00 2001 +From: Mehdi Djait +Date: Wed, 11 Dec 2024 14:30:45 +0100 +Subject: media: ccs: Fix cleanup order in ccs_probe() + +From: Mehdi Djait + +commit 6fdbff0f54786e94f0f630ff200ec1d666b1633e upstream. + +ccs_limits is allocated in ccs_read_all_limits() after the allocation of +mdata.backing. Ensure that resources are freed in the reverse order of +their allocation by moving out_free_ccs_limits up. + +Fixes: a11d3d6891f0 ("media: ccs: Read CCS static data from firmware binaries") +Cc: stable@vger.kernel.org +Signed-off-by: Mehdi Djait +Signed-off-by: Sakari Ailus +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/i2c/ccs/ccs-core.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/media/i2c/ccs/ccs-core.c ++++ b/drivers/media/i2c/ccs/ccs-core.c +@@ -3658,15 +3658,15 @@ out_media_entity_cleanup: + out_cleanup: + ccs_cleanup(sensor); + ++out_free_ccs_limits: ++ kfree(sensor->ccs_limits); ++ + out_release_mdata: + kvfree(sensor->mdata.backing); + + out_release_sdata: + kvfree(sensor->sdata.backing); + +-out_free_ccs_limits: +- kfree(sensor->ccs_limits); +- + out_power_off: + ccs_power_off(&client->dev); + mutex_destroy(&sensor->mutex); diff --git a/queue-6.6/media-i2c-ds90ub960-fix-logging-sp-eq-status-only-for-ub9702.patch b/queue-6.6/media-i2c-ds90ub960-fix-logging-sp-eq-status-only-for-ub9702.patch new file mode 100644 index 0000000000..644fb87c23 --- /dev/null +++ b/queue-6.6/media-i2c-ds90ub960-fix-logging-sp-eq-status-only-for-ub9702.patch @@ -0,0 +1,138 @@ +From 42d0ec194aa12e9b97f09a94fe565ba2e5f631a2 Mon Sep 17 00:00:00 2001 +From: Tomi Valkeinen +Date: Fri, 6 Dec 2024 10:26:40 +0200 +Subject: media: i2c: ds90ub960: Fix logging SP & EQ status only for UB9702 + +From: Tomi Valkeinen + +commit 42d0ec194aa12e9b97f09a94fe565ba2e5f631a2 upstream. + +UB9702 does not have SP and EQ registers, but the driver uses them in +log_status(). Fix this by separating the SP and EQ related log_status() +work into a separate function (for clarity) and calling that function +only for UB960. + +Cc: stable@vger.kernel.org +Fixes: afe267f2d368 ("media: i2c: add DS90UB960 driver") +Reviewed-by: Jai Luthra +Signed-off-by: Tomi Valkeinen +Signed-off-by: Sakari Ailus +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/i2c/ds90ub960.c | 90 +++++++++++++++++++++++------------------- + 1 file changed, 50 insertions(+), 40 deletions(-) + +--- a/drivers/media/i2c/ds90ub960.c ++++ b/drivers/media/i2c/ds90ub960.c +@@ -2956,6 +2956,54 @@ static const struct v4l2_subdev_pad_ops + .init_cfg = ub960_init_cfg, + }; + ++static void ub960_log_status_ub960_sp_eq(struct ub960_data *priv, ++ unsigned int nport) ++{ ++ struct device *dev = &priv->client->dev; ++ u8 eq_level; ++ s8 strobe_pos; ++ u8 v = 0; ++ ++ /* Strobe */ ++ ++ ub960_read(priv, UB960_XR_AEQ_CTL1, &v); ++ ++ dev_info(dev, "\t%s strobe\n", ++ (v & UB960_XR_AEQ_CTL1_AEQ_SFILTER_EN) ? "Adaptive" : ++ "Manual"); ++ ++ if (v & UB960_XR_AEQ_CTL1_AEQ_SFILTER_EN) { ++ ub960_read(priv, UB960_XR_SFILTER_CFG, &v); ++ ++ dev_info(dev, "\tStrobe range [%d, %d]\n", ++ ((v >> UB960_XR_SFILTER_CFG_SFILTER_MIN_SHIFT) & 0xf) - 7, ++ ((v >> UB960_XR_SFILTER_CFG_SFILTER_MAX_SHIFT) & 0xf) - 7); ++ } ++ ++ ub960_rxport_get_strobe_pos(priv, nport, &strobe_pos); ++ ++ dev_info(dev, "\tStrobe pos %d\n", strobe_pos); ++ ++ /* EQ */ ++ ++ ub960_rxport_read(priv, nport, UB960_RR_AEQ_BYPASS, &v); ++ ++ dev_info(dev, "\t%s EQ\n", ++ (v & UB960_RR_AEQ_BYPASS_ENABLE) ? "Manual" : ++ "Adaptive"); ++ ++ if (!(v & UB960_RR_AEQ_BYPASS_ENABLE)) { ++ ub960_rxport_read(priv, nport, UB960_RR_AEQ_MIN_MAX, &v); ++ ++ dev_info(dev, "\tEQ range [%u, %u]\n", ++ (v >> UB960_RR_AEQ_MIN_MAX_AEQ_FLOOR_SHIFT) & 0xf, ++ (v >> UB960_RR_AEQ_MIN_MAX_AEQ_MAX_SHIFT) & 0xf); ++ } ++ ++ if (ub960_rxport_get_eq_level(priv, nport, &eq_level) == 0) ++ dev_info(dev, "\tEQ level %u\n", eq_level); ++} ++ + static int ub960_log_status(struct v4l2_subdev *sd) + { + struct ub960_data *priv = sd_to_ub960(sd); +@@ -3003,8 +3051,6 @@ static int ub960_log_status(struct v4l2_ + + for (nport = 0; nport < priv->hw_data->num_rxports; nport++) { + struct ub960_rxport *rxport = priv->rxports[nport]; +- u8 eq_level; +- s8 strobe_pos; + unsigned int i; + + dev_info(dev, "RX %u\n", nport); +@@ -3040,44 +3086,8 @@ static int ub960_log_status(struct v4l2_ + ub960_rxport_read(priv, nport, UB960_RR_CSI_ERR_COUNTER, &v); + dev_info(dev, "\tcsi_err_counter %u\n", v); + +- /* Strobe */ +- +- ub960_read(priv, UB960_XR_AEQ_CTL1, &v); +- +- dev_info(dev, "\t%s strobe\n", +- (v & UB960_XR_AEQ_CTL1_AEQ_SFILTER_EN) ? "Adaptive" : +- "Manual"); +- +- if (v & UB960_XR_AEQ_CTL1_AEQ_SFILTER_EN) { +- ub960_read(priv, UB960_XR_SFILTER_CFG, &v); +- +- dev_info(dev, "\tStrobe range [%d, %d]\n", +- ((v >> UB960_XR_SFILTER_CFG_SFILTER_MIN_SHIFT) & 0xf) - 7, +- ((v >> UB960_XR_SFILTER_CFG_SFILTER_MAX_SHIFT) & 0xf) - 7); +- } +- +- ub960_rxport_get_strobe_pos(priv, nport, &strobe_pos); +- +- dev_info(dev, "\tStrobe pos %d\n", strobe_pos); +- +- /* EQ */ +- +- ub960_rxport_read(priv, nport, UB960_RR_AEQ_BYPASS, &v); +- +- dev_info(dev, "\t%s EQ\n", +- (v & UB960_RR_AEQ_BYPASS_ENABLE) ? "Manual" : +- "Adaptive"); +- +- if (!(v & UB960_RR_AEQ_BYPASS_ENABLE)) { +- ub960_rxport_read(priv, nport, UB960_RR_AEQ_MIN_MAX, &v); +- +- dev_info(dev, "\tEQ range [%u, %u]\n", +- (v >> UB960_RR_AEQ_MIN_MAX_AEQ_FLOOR_SHIFT) & 0xf, +- (v >> UB960_RR_AEQ_MIN_MAX_AEQ_MAX_SHIFT) & 0xf); +- } +- +- if (ub960_rxport_get_eq_level(priv, nport, &eq_level) == 0) +- dev_info(dev, "\tEQ level %u\n", eq_level); ++ if (!priv->hw_data->is_ub9702) ++ ub960_log_status_ub960_sp_eq(priv, nport); + + /* GPIOs */ + for (i = 0; i < UB960_NUM_BC_GPIOS; i++) { diff --git a/queue-6.6/media-i2c-ds90ub960-fix-ub9702-vc-map.patch b/queue-6.6/media-i2c-ds90ub960-fix-ub9702-vc-map.patch new file mode 100644 index 0000000000..1abce0b5b4 --- /dev/null +++ b/queue-6.6/media-i2c-ds90ub960-fix-ub9702-vc-map.patch @@ -0,0 +1,43 @@ +From 5dbbd0609b83f6eb72c005e2e5979d0cd25243c8 Mon Sep 17 00:00:00 2001 +From: Tomi Valkeinen +Date: Fri, 6 Dec 2024 10:26:41 +0200 +Subject: media: i2c: ds90ub960: Fix UB9702 VC map + +From: Tomi Valkeinen + +commit 5dbbd0609b83f6eb72c005e2e5979d0cd25243c8 upstream. + +The driver uses a static CSI-2 virtual channel mapping where all virtual +channels from an RX port are mapped to a virtual channel number matching +the RX port number. + +The UB960 and UB9702 have different registers for the purpose, and the +UB9702 version is not correct. Each of the VC_ID_MAP registers do not +contain a single mapping, as the driver currently thinks, but two. + +This can cause received VCs other than 0 to be mapped in a wrong way. + +Fix this by writing both mappings to each register. + +Cc: stable@vger.kernel.org +Fixes: afe267f2d368 ("media: i2c: add DS90UB960 driver") +Reviewed-by: Jai Luthra +Signed-off-by: Tomi Valkeinen +Signed-off-by: Sakari Ailus +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/i2c/ds90ub960.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/media/i2c/ds90ub960.c ++++ b/drivers/media/i2c/ds90ub960.c +@@ -2534,7 +2534,7 @@ static int ub960_configure_ports_for_str + for (i = 0; i < 8; i++) + ub960_rxport_write(priv, nport, + UB960_RR_VC_ID_MAP(i), +- nport); ++ (nport << 4) | nport); + } + + break; diff --git a/queue-6.6/media-i2c-ds90ub960-fix-use-of-non-existing-registers-on-ub9702.patch b/queue-6.6/media-i2c-ds90ub960-fix-use-of-non-existing-registers-on-ub9702.patch new file mode 100644 index 0000000000..cfe5b0e5f1 --- /dev/null +++ b/queue-6.6/media-i2c-ds90ub960-fix-use-of-non-existing-registers-on-ub9702.patch @@ -0,0 +1,60 @@ +From 698cf6df87ffa83f259703e7443c15a4c5ceae86 Mon Sep 17 00:00:00 2001 +From: Tomi Valkeinen +Date: Fri, 6 Dec 2024 10:26:39 +0200 +Subject: media: i2c: ds90ub960: Fix use of non-existing registers on UB9702 + +From: Tomi Valkeinen + +commit 698cf6df87ffa83f259703e7443c15a4c5ceae86 upstream. + +UB9702 doesn't have the registers for SP and EQ. Adjust the code in +ub960_rxport_wait_locks() to not use those registers for UB9702. As +these values are only used for a debug print here, there's no functional +change. + +Cc: stable@vger.kernel.org +Fixes: afe267f2d368 ("media: i2c: add DS90UB960 driver") +Reviewed-by: Jai Luthra +Signed-off-by: Tomi Valkeinen +Signed-off-by: Sakari Ailus +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/i2c/ds90ub960.c | 24 ++++++++++++++++-------- + 1 file changed, 16 insertions(+), 8 deletions(-) + +--- a/drivers/media/i2c/ds90ub960.c ++++ b/drivers/media/i2c/ds90ub960.c +@@ -1577,16 +1577,24 @@ static int ub960_rxport_wait_locks(struc + + ub960_rxport_read16(priv, nport, UB960_RR_RX_FREQ_HIGH, &v); + +- ret = ub960_rxport_get_strobe_pos(priv, nport, &strobe_pos); +- if (ret) +- return ret; ++ if (priv->hw_data->is_ub9702) { ++ dev_dbg(dev, "\trx%u: locked, freq %llu Hz\n", ++ nport, (v * 1000000ULL) >> 8); ++ } else { ++ ret = ub960_rxport_get_strobe_pos(priv, nport, ++ &strobe_pos); ++ if (ret) ++ return ret; + +- ret = ub960_rxport_get_eq_level(priv, nport, &eq_level); +- if (ret) +- return ret; ++ ret = ub960_rxport_get_eq_level(priv, nport, &eq_level); ++ if (ret) ++ return ret; + +- dev_dbg(dev, "\trx%u: locked, SP: %d, EQ: %u, freq %llu Hz\n", +- nport, strobe_pos, eq_level, (v * 1000000ULL) >> 8); ++ dev_dbg(dev, ++ "\trx%u: locked, SP: %d, EQ: %u, freq %llu Hz\n", ++ nport, strobe_pos, eq_level, ++ (v * 1000000ULL) >> 8); ++ } + } + + return 0; diff --git a/queue-6.6/media-i2c-ds90ub9x3-fix-extra-fwnode_handle_put.patch b/queue-6.6/media-i2c-ds90ub9x3-fix-extra-fwnode_handle_put.patch new file mode 100644 index 0000000000..6b603d42ac --- /dev/null +++ b/queue-6.6/media-i2c-ds90ub9x3-fix-extra-fwnode_handle_put.patch @@ -0,0 +1,51 @@ +From 60b45ece41c5632a3a3274115a401cb244180646 Mon Sep 17 00:00:00 2001 +From: Tomi Valkeinen +Date: Fri, 6 Dec 2024 10:26:37 +0200 +Subject: media: i2c: ds90ub9x3: Fix extra fwnode_handle_put() + +From: Tomi Valkeinen + +commit 60b45ece41c5632a3a3274115a401cb244180646 upstream. + +The ub913 and ub953 drivers call fwnode_handle_put(priv->sd.fwnode) as +part of their remove process, and if the driver is removed multiple +times, eventually leads to put "overflow", possibly causing memory +corruption or crash. + +The fwnode_handle_put() is a leftover from commit 905f88ccebb1 ("media: +i2c: ds90ub9x3: Fix sub-device matching"), which changed the code +related to the sd.fwnode, but missed removing these fwnode_handle_put() +calls. + +Cc: stable@vger.kernel.org +Fixes: 905f88ccebb1 ("media: i2c: ds90ub9x3: Fix sub-device matching") +Reviewed-by: Jai Luthra +Signed-off-by: Tomi Valkeinen +Signed-off-by: Sakari Ailus +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/i2c/ds90ub913.c | 1 - + drivers/media/i2c/ds90ub953.c | 1 - + 2 files changed, 2 deletions(-) + +--- a/drivers/media/i2c/ds90ub913.c ++++ b/drivers/media/i2c/ds90ub913.c +@@ -792,7 +792,6 @@ static void ub913_subdev_uninit(struct u + v4l2_async_unregister_subdev(&priv->sd); + ub913_v4l2_nf_unregister(priv); + v4l2_subdev_cleanup(&priv->sd); +- fwnode_handle_put(priv->sd.fwnode); + media_entity_cleanup(&priv->sd.entity); + } + +--- a/drivers/media/i2c/ds90ub953.c ++++ b/drivers/media/i2c/ds90ub953.c +@@ -1290,7 +1290,6 @@ static void ub953_subdev_uninit(struct u + v4l2_async_unregister_subdev(&priv->sd); + ub953_v4l2_notifier_unregister(priv); + v4l2_subdev_cleanup(&priv->sd); +- fwnode_handle_put(priv->sd.fwnode); + media_entity_cleanup(&priv->sd.entity); + } + diff --git a/queue-6.6/media-imx296-add-standby-delay-during-probe.patch b/queue-6.6/media-imx296-add-standby-delay-during-probe.patch new file mode 100644 index 0000000000..252846e901 --- /dev/null +++ b/queue-6.6/media-imx296-add-standby-delay-during-probe.patch @@ -0,0 +1,40 @@ +From 57d10bcac67707caaa542e09dee86e13ea85defc Mon Sep 17 00:00:00 2001 +From: Naushir Patuck +Date: Fri, 15 Nov 2024 20:07:17 +0200 +Subject: media: imx296: Add standby delay during probe + +From: Naushir Patuck + +commit 57d10bcac67707caaa542e09dee86e13ea85defc upstream. + +Add a 2-5ms delay when coming out of standby and before reading the +sensor info register durning probe, as instructed by the datasheet. This +standby delay is already present when the sensor starts streaming. + +During a cold-boot, reading the IMX296_SENSOR_INFO register would often +return a value of 0x0000, if this delay is not present before. + +Fixes: cb33db2b6ccf ("media: i2c: IMX296 camera sensor driver") +Cc: stable@vger.kernel.org +Tested-by: Alexandru Ardelean +Signed-off-by: Naushir Patuck +Reviewed-by: Kieran Bingham +Reviewed-by: Laurent Pinchart +Signed-off-by: Sakari Ailus +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/i2c/imx296.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/media/i2c/imx296.c ++++ b/drivers/media/i2c/imx296.c +@@ -960,6 +960,8 @@ static int imx296_identify_model(struct + return ret; + } + ++ usleep_range(2000, 5000); ++ + ret = imx296_read(sensor, IMX296_SENSOR_INFO); + if (ret < 0) { + dev_err(sensor->dev, "failed to read sensor information (%d)\n", diff --git a/queue-6.6/media-mc-fix-endpoint-iteration.patch b/queue-6.6/media-mc-fix-endpoint-iteration.patch new file mode 100644 index 0000000000..472179ccb8 --- /dev/null +++ b/queue-6.6/media-mc-fix-endpoint-iteration.patch @@ -0,0 +1,42 @@ +From fb2bd86270cd0ad004f4c614ba4f8c63a5720e25 Mon Sep 17 00:00:00 2001 +From: Cosmin Tanislav +Date: Fri, 22 Nov 2024 16:55:24 +0200 +Subject: media: mc: fix endpoint iteration + +From: Cosmin Tanislav + +commit fb2bd86270cd0ad004f4c614ba4f8c63a5720e25 upstream. + +When creating links from a subdev to a sink, the current logic tries to +iterate over the endpoints of dev's fwnode. + +This might not be correct when the subdev uses a different fwnode +compared to the dev's fwnode. + +If, when registering, the subdev's fwnode is not set, the code inside +v4l2_async_register_subdev will set it to the dev's fwnode. + +To fix this, just use the subdev's fwnode. + +Signed-off-by: Cosmin Tanislav +Fixes: 0d3c81e82da9 ("media: v4l2-mc: add v4l2_create_fwnode_links helpers") +Cc: stable@vger.kernel.org +Reviewed-by: Laurent Pinchart +Signed-off-by: Sakari Ailus +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/v4l2-core/v4l2-mc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/media/v4l2-core/v4l2-mc.c ++++ b/drivers/media/v4l2-core/v4l2-mc.c +@@ -329,7 +329,7 @@ int v4l2_create_fwnode_links_to_pad(stru + if (!(sink->flags & MEDIA_PAD_FL_SINK)) + return -EINVAL; + +- fwnode_graph_for_each_endpoint(dev_fwnode(src_sd->dev), endpoint) { ++ fwnode_graph_for_each_endpoint(src_sd->fwnode, endpoint) { + struct fwnode_handle *remote_ep; + int src_idx, sink_idx, ret; + struct media_pad *src; diff --git a/queue-6.6/media-mmp-bring-back-registration-of-the-device.patch b/queue-6.6/media-mmp-bring-back-registration-of-the-device.patch new file mode 100644 index 0000000000..80dffb8dbc --- /dev/null +++ b/queue-6.6/media-mmp-bring-back-registration-of-the-device.patch @@ -0,0 +1,89 @@ +From fbb5298bf1a7b71723cd2bb193642429ceb0fb84 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Tue, 31 Dec 2024 20:04:34 +0100 +Subject: media: mmp: Bring back registration of the device + +From: Lubomir Rintel + +commit fbb5298bf1a7b71723cd2bb193642429ceb0fb84 upstream. + +In commit 4af65141e38e ("media: marvell: cafe: Register V4L2 device +earlier"), a call to v4l2_device_register() was moved away from +mccic_register() into its caller, marvell/cafe's cafe_pci_probe(). +This is not the only caller though -- there's also marvell/mmp. + +Add v4l2_device_register() into mmpcam_probe() to unbreak the MMP camera +driver, in a fashion analogous to what's been done to the Cafe driver. +Same for the teardown path. + +Fixes: 4af65141e38e ("media: marvell: cafe: Register V4L2 device earlier") +Signed-off-by: Lubomir Rintel +Cc: stable@vger.kernel.org # v6.6+ +Signed-off-by: Hans Verkuil +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/platform/marvell/mmp-driver.c | 21 +++++++++++++++++---- + 1 file changed, 17 insertions(+), 4 deletions(-) + +--- a/drivers/media/platform/marvell/mmp-driver.c ++++ b/drivers/media/platform/marvell/mmp-driver.c +@@ -231,12 +231,22 @@ static int mmpcam_probe(struct platform_ + mcam_init_clk(mcam); + + /* ++ * Register with V4L. ++ */ ++ ++ ret = v4l2_device_register(mcam->dev, &mcam->v4l2_dev); ++ if (ret) ++ return ret; ++ ++ /* + * Create a match of the sensor against its OF node. + */ + ep = fwnode_graph_get_next_endpoint(of_fwnode_handle(pdev->dev.of_node), + NULL); +- if (!ep) +- return -ENODEV; ++ if (!ep) { ++ ret = -ENODEV; ++ goto out_v4l2_device_unregister; ++ } + + v4l2_async_nf_init(&mcam->notifier, &mcam->v4l2_dev); + +@@ -245,7 +255,7 @@ static int mmpcam_probe(struct platform_ + fwnode_handle_put(ep); + if (IS_ERR(asd)) { + ret = PTR_ERR(asd); +- goto out; ++ goto out_v4l2_device_unregister; + } + + /* +@@ -253,7 +263,7 @@ static int mmpcam_probe(struct platform_ + */ + ret = mccic_register(mcam); + if (ret) +- goto out; ++ goto out_v4l2_device_unregister; + + /* + * Add OF clock provider. +@@ -282,6 +292,8 @@ static int mmpcam_probe(struct platform_ + return 0; + out: + mccic_shutdown(mcam); ++out_v4l2_device_unregister: ++ v4l2_device_unregister(&mcam->v4l2_dev); + + return ret; + } +@@ -292,6 +304,7 @@ static void mmpcam_remove(struct platfor + struct mcam_camera *mcam = &cam->mcam; + + mccic_shutdown(mcam); ++ v4l2_device_unregister(&mcam->v4l2_dev); + pm_runtime_force_suspend(mcam->dev); + } + diff --git a/queue-6.6/media-ov5640-fix-get_light_freq-on-auto.patch b/queue-6.6/media-ov5640-fix-get_light_freq-on-auto.patch new file mode 100644 index 0000000000..bc32085b2d --- /dev/null +++ b/queue-6.6/media-ov5640-fix-get_light_freq-on-auto.patch @@ -0,0 +1,33 @@ +From 001d3753538d26ddcbef011f5643cfff58a7f672 Mon Sep 17 00:00:00 2001 +From: Sam Bobrowicz +Date: Fri, 22 Nov 2024 09:28:01 +0100 +Subject: media: ov5640: fix get_light_freq on auto + +From: Sam Bobrowicz + +commit 001d3753538d26ddcbef011f5643cfff58a7f672 upstream. + +Light frequency was not properly returned when in auto +mode and the detected frequency was 60Hz. + +Fixes: 19a81c1426c1 ("[media] add Omnivision OV5640 sensor driver") +Cc: stable@vger.kernel.org +Signed-off-by: Sam Bobrowicz +Signed-off-by: Michal Simek +Signed-off-by: Sakari Ailus +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/i2c/ov5640.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/media/i2c/ov5640.c ++++ b/drivers/media/i2c/ov5640.c +@@ -1982,6 +1982,7 @@ static int ov5640_get_light_freq(struct + light_freq = 50; + } else { + /* 60Hz */ ++ light_freq = 60; + } + } + diff --git a/queue-6.6/media-uvcvideo-fix-crash-during-unbind-if-gpio-unit-is-in-use.patch b/queue-6.6/media-uvcvideo-fix-crash-during-unbind-if-gpio-unit-is-in-use.patch new file mode 100644 index 0000000000..5979f6cbf3 --- /dev/null +++ b/queue-6.6/media-uvcvideo-fix-crash-during-unbind-if-gpio-unit-is-in-use.patch @@ -0,0 +1,111 @@ +From a9ea1a3d88b7947ce8cadb2afceee7a54872bbc5 Mon Sep 17 00:00:00 2001 +From: Ricardo Ribalda +Date: Wed, 6 Nov 2024 20:36:07 +0000 +Subject: media: uvcvideo: Fix crash during unbind if gpio unit is in use + +From: Ricardo Ribalda + +commit a9ea1a3d88b7947ce8cadb2afceee7a54872bbc5 upstream. + +We used the wrong device for the device managed functions. We used the +usb device, when we should be using the interface device. + +If we unbind the driver from the usb interface, the cleanup functions +are never called. In our case, the IRQ is never disabled. + +If an IRQ is triggered, it will try to access memory sections that are +already free, causing an OOPS. + +We cannot use the function devm_request_threaded_irq here. The devm_* +clean functions may be called after the main structure is released by +uvc_delete. + +Luckily this bug has small impact, as it is only affected by devices +with gpio units and the user has to unbind the device, a disconnect will +not trigger this error. + +Cc: stable@vger.kernel.org +Fixes: 2886477ff987 ("media: uvcvideo: Implement UVC_EXT_GPIO_UNIT") +Reviewed-by: Sergey Senozhatsky +Signed-off-by: Ricardo Ribalda +Reviewed-by: Laurent Pinchart +Link: https://lore.kernel.org/r/20241106-uvc-crashrmmod-v6-1-fbf9781c6e83@chromium.org +Signed-off-by: Laurent Pinchart +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/usb/uvc/uvc_driver.c | 28 +++++++++++++++++++++------- + drivers/media/usb/uvc/uvcvideo.h | 1 + + 2 files changed, 22 insertions(+), 7 deletions(-) + +--- a/drivers/media/usb/uvc/uvc_driver.c ++++ b/drivers/media/usb/uvc/uvc_driver.c +@@ -1280,14 +1280,14 @@ static int uvc_gpio_parse(struct uvc_dev + struct gpio_desc *gpio_privacy; + int irq; + +- gpio_privacy = devm_gpiod_get_optional(&dev->udev->dev, "privacy", ++ gpio_privacy = devm_gpiod_get_optional(&dev->intf->dev, "privacy", + GPIOD_IN); + if (IS_ERR_OR_NULL(gpio_privacy)) + return PTR_ERR_OR_ZERO(gpio_privacy); + + irq = gpiod_to_irq(gpio_privacy); + if (irq < 0) +- return dev_err_probe(&dev->udev->dev, irq, ++ return dev_err_probe(&dev->intf->dev, irq, + "No IRQ for privacy GPIO\n"); + + unit = uvc_alloc_entity(UVC_EXT_GPIO_UNIT, UVC_EXT_GPIO_UNIT_ID, 0, 1); +@@ -1313,15 +1313,27 @@ static int uvc_gpio_parse(struct uvc_dev + static int uvc_gpio_init_irq(struct uvc_device *dev) + { + struct uvc_entity *unit = dev->gpio_unit; ++ int ret; + + if (!unit || unit->gpio.irq < 0) + return 0; + +- return devm_request_threaded_irq(&dev->udev->dev, unit->gpio.irq, NULL, +- uvc_gpio_irq, +- IRQF_ONESHOT | IRQF_TRIGGER_FALLING | +- IRQF_TRIGGER_RISING, +- "uvc_privacy_gpio", dev); ++ ret = request_threaded_irq(unit->gpio.irq, NULL, uvc_gpio_irq, ++ IRQF_ONESHOT | IRQF_TRIGGER_FALLING | ++ IRQF_TRIGGER_RISING, ++ "uvc_privacy_gpio", dev); ++ ++ unit->gpio.initialized = !ret; ++ ++ return ret; ++} ++ ++static void uvc_gpio_deinit(struct uvc_device *dev) ++{ ++ if (!dev->gpio_unit || !dev->gpio_unit->gpio.initialized) ++ return; ++ ++ free_irq(dev->gpio_unit->gpio.irq, dev); + } + + /* ------------------------------------------------------------------------ +@@ -1918,6 +1930,8 @@ static void uvc_unregister_video(struct + { + struct uvc_streaming *stream; + ++ uvc_gpio_deinit(dev); ++ + list_for_each_entry(stream, &dev->streams, list) { + /* Nothing to do here, continue. */ + if (!video_is_registered(&stream->vdev)) +--- a/drivers/media/usb/uvc/uvcvideo.h ++++ b/drivers/media/usb/uvc/uvcvideo.h +@@ -229,6 +229,7 @@ struct uvc_entity { + u8 *bmControls; + struct gpio_desc *gpio_privacy; + int irq; ++ bool initialized; + } gpio; + }; + diff --git a/queue-6.6/media-uvcvideo-fix-event-flags-in-uvc_ctrl_send_events.patch b/queue-6.6/media-uvcvideo-fix-event-flags-in-uvc_ctrl_send_events.patch new file mode 100644 index 0000000000..c76571223c --- /dev/null +++ b/queue-6.6/media-uvcvideo-fix-event-flags-in-uvc_ctrl_send_events.patch @@ -0,0 +1,46 @@ +From c31cffd5ae2c3d7ef21d9008977a9d117ce7a64e Mon Sep 17 00:00:00 2001 +From: Ricardo Ribalda +Date: Thu, 14 Nov 2024 19:10:30 +0000 +Subject: media: uvcvideo: Fix event flags in uvc_ctrl_send_events + +From: Ricardo Ribalda + +commit c31cffd5ae2c3d7ef21d9008977a9d117ce7a64e upstream. + +If there is an event that needs the V4L2_EVENT_CTRL_CH_FLAGS flag, all +the following events will have that flag, regardless if they need it or +not. + +This is because we keep using the same variable all the time and we do +not reset its original value. + +Cc: stable@vger.kernel.org +Fixes: 805e9b4a06bf ("[media] uvcvideo: Send control change events for slave ctrls when the master changes") +Signed-off-by: Ricardo Ribalda +Reviewed-by: Laurent Pinchart +Link: https://lore.kernel.org/r/20241114-uvc-roi-v15-1-64cfeb56b6f8@chromium.org +Signed-off-by: Laurent Pinchart +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/usb/uvc/uvc_ctrl.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/media/usb/uvc/uvc_ctrl.c ++++ b/drivers/media/usb/uvc/uvc_ctrl.c +@@ -1626,13 +1626,13 @@ static void uvc_ctrl_send_events(struct + { + struct uvc_control_mapping *mapping; + struct uvc_control *ctrl; +- u32 changes = V4L2_EVENT_CTRL_CH_VALUE; + unsigned int i; + unsigned int j; + + for (i = 0; i < xctrls_count; ++i) { +- ctrl = uvc_find_control(handle->chain, xctrls[i].id, &mapping); ++ u32 changes = V4L2_EVENT_CTRL_CH_VALUE; + ++ ctrl = uvc_find_control(handle->chain, xctrls[i].id, &mapping); + if (ctrl->info.flags & UVC_CTRL_FLAG_ASYNCHRONOUS) + /* Notification will be sent from an Interrupt event. */ + continue; diff --git a/queue-6.6/media-uvcvideo-remove-redundant-null-assignment.patch b/queue-6.6/media-uvcvideo-remove-redundant-null-assignment.patch new file mode 100644 index 0000000000..73f9253a0a --- /dev/null +++ b/queue-6.6/media-uvcvideo-remove-redundant-null-assignment.patch @@ -0,0 +1,40 @@ +From 04d3398f66d2d31c4b8caea88f051a4257b7a161 Mon Sep 17 00:00:00 2001 +From: Ricardo Ribalda +Date: Tue, 3 Dec 2024 21:20:09 +0000 +Subject: media: uvcvideo: Remove redundant NULL assignment + +From: Ricardo Ribalda + +commit 04d3398f66d2d31c4b8caea88f051a4257b7a161 upstream. + +ctrl->handle will only be different than NULL for controls that have +mappings. This is because that assignment is only done inside +uvc_ctrl_set() for mapped controls. + +Cc: stable@vger.kernel.org +Fixes: e5225c820c05 ("media: uvcvideo: Send a control event when a Control Change interrupt arrives") +Reviewed-by: Laurent Pinchart +Reviewed-by: Hans de Goede +Signed-off-by: Ricardo Ribalda +Link: https://lore.kernel.org/r/20241203-uvc-fix-async-v6-2-26c867231118@chromium.org +Signed-off-by: Laurent Pinchart +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/usb/uvc/uvc_ctrl.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +--- a/drivers/media/usb/uvc/uvc_ctrl.c ++++ b/drivers/media/usb/uvc/uvc_ctrl.c +@@ -1593,10 +1593,8 @@ bool uvc_ctrl_status_event_async(struct + struct uvc_device *dev = chain->dev; + struct uvc_ctrl_work *w = &dev->async_ctrl; + +- if (list_empty(&ctrl->info.mappings)) { +- ctrl->handle = NULL; ++ if (list_empty(&ctrl->info.mappings)) + return false; +- } + + w->data = data; + w->urb = urb; diff --git a/queue-6.6/media-uvcvideo-support-partial-control-reads.patch b/queue-6.6/media-uvcvideo-support-partial-control-reads.patch new file mode 100644 index 0000000000..b114e718b0 --- /dev/null +++ b/queue-6.6/media-uvcvideo-support-partial-control-reads.patch @@ -0,0 +1,60 @@ +From f00ee2ca8da25ebccb8e19956d853c9055e2c8d0 Mon Sep 17 00:00:00 2001 +From: Ricardo Ribalda +Date: Thu, 28 Nov 2024 20:53:41 +0000 +Subject: media: uvcvideo: Support partial control reads + +From: Ricardo Ribalda + +commit f00ee2ca8da25ebccb8e19956d853c9055e2c8d0 upstream. + +Some cameras, like the ELMO MX-P3, do not return all the bytes +requested from a control if it can fit in less bytes. +Eg: Returning 0xab instead of 0x00ab. +usb 3-9: Failed to query (GET_DEF) UVC control 3 on unit 2: 1 (exp. 2). + +Extend the returned value from the camera and return it. + +Cc: stable@vger.kernel.org +Fixes: a763b9fb58be ("media: uvcvideo: Do not return positive errors in uvc_query_ctrl()") +Reviewed-by: Hans de Goede +Signed-off-by: Ricardo Ribalda +Link: https://lore.kernel.org/r/20241128-uvc-readless-v5-1-cf16ed282af8@chromium.org +Signed-off-by: Hans de Goede +Reviewed-by: Laurent Pinchart +Signed-off-by: Laurent Pinchart +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman +--- + drivers/media/usb/uvc/uvc_video.c | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +--- a/drivers/media/usb/uvc/uvc_video.c ++++ b/drivers/media/usb/uvc/uvc_video.c +@@ -79,6 +79,27 @@ int uvc_query_ctrl(struct uvc_device *de + if (likely(ret == size)) + return 0; + ++ /* ++ * Some devices return shorter USB control packets than expected if the ++ * returned value can fit in less bytes. Zero all the bytes that the ++ * device has not written. ++ * ++ * This quirk is applied to all controls, regardless of their data type. ++ * Most controls are little-endian integers, in which case the missing ++ * bytes become 0 MSBs. For other data types, a different heuristic ++ * could be implemented if a device is found needing it. ++ * ++ * We exclude UVC_GET_INFO from the quirk. UVC_GET_LEN does not need ++ * to be excluded because its size is always 1. ++ */ ++ if (ret > 0 && query != UVC_GET_INFO) { ++ memset(data + ret, 0, size - ret); ++ dev_warn_once(&dev->udev->dev, ++ "UVC non compliance: %s control %u on unit %u returned %d bytes when we expected %u.\n", ++ uvc_query_name(query), cs, unit, ret, size); ++ return 0; ++ } ++ + if (ret != -EPIPE) { + dev_err(&dev->udev->dev, + "Failed to query (%s) UVC control %u on unit %u: %d (exp. %u).\n", diff --git a/queue-6.6/mm-kmemleak-fix-upper-boundary-check-for-physical-address-objects.patch b/queue-6.6/mm-kmemleak-fix-upper-boundary-check-for-physical-address-objects.patch new file mode 100644 index 0000000000..e796cdf3ca --- /dev/null +++ b/queue-6.6/mm-kmemleak-fix-upper-boundary-check-for-physical-address-objects.patch @@ -0,0 +1,51 @@ +From 488b5b9eca68497b533ced059be5eff19578bbca Mon Sep 17 00:00:00 2001 +From: Catalin Marinas +Date: Mon, 27 Jan 2025 18:42:33 +0000 +Subject: mm: kmemleak: fix upper boundary check for physical address objects + +From: Catalin Marinas + +commit 488b5b9eca68497b533ced059be5eff19578bbca upstream. + +Memblock allocations are registered by kmemleak separately, based on their +physical address. During the scanning stage, it checks whether an object +is within the min_low_pfn and max_low_pfn boundaries and ignores it +otherwise. + +With the recent addition of __percpu pointer leak detection (commit +6c99d4eb7c5e ("kmemleak: enable tracking for percpu pointers")), kmemleak +started reporting leaks in setup_zone_pageset() and +setup_per_cpu_pageset(). These were caused by the node_data[0] object +(initialised in alloc_node_data()) ending on the PFN_PHYS(max_low_pfn) +boundary. The non-strict upper boundary check introduced by commit +84c326299191 ("mm: kmemleak: check physical address when scan") causes the +pg_data_t object to be ignored (not scanned) and the __percpu pointers it +contains to be reported as leaks. + +Make the max_low_pfn upper boundary check strict when deciding whether to +ignore a physical address object and not scan it. + +Link: https://lkml.kernel.org/r/20250127184233.2974311-1-catalin.marinas@arm.com +Fixes: 84c326299191 ("mm: kmemleak: check physical address when scan") +Signed-off-by: Catalin Marinas +Reported-by: Jakub Kicinski +Tested-by: Matthieu Baerts (NGI0) +Cc: Patrick Wang +Cc: [6.0.x] +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman +--- + mm/kmemleak.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/mm/kmemleak.c ++++ b/mm/kmemleak.c +@@ -1549,7 +1549,7 @@ static void kmemleak_scan(void) + unsigned long phys = object->pointer; + + if (PHYS_PFN(phys) < min_low_pfn || +- PHYS_PFN(phys + object->size) >= max_low_pfn) ++ PHYS_PFN(phys + object->size) > max_low_pfn) + __paint_it(object, KMEMLEAK_BLACK); + } + diff --git a/queue-6.6/pwm-microchip-core-fix-incorrect-comparison-with-max-period.patch b/queue-6.6/pwm-microchip-core-fix-incorrect-comparison-with-max-period.patch new file mode 100644 index 0000000000..20351699f3 --- /dev/null +++ b/queue-6.6/pwm-microchip-core-fix-incorrect-comparison-with-max-period.patch @@ -0,0 +1,46 @@ +From 752b6e3af374460a2de18f0c10bfa06bf844dbe8 Mon Sep 17 00:00:00 2001 +From: Conor Dooley +Date: Wed, 22 Jan 2025 14:42:56 +0000 +Subject: pwm: microchip-core: fix incorrect comparison with max period +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Conor Dooley + +commit 752b6e3af374460a2de18f0c10bfa06bf844dbe8 upstream. + +In mchp_core_pwm_apply_locked(), if hw_period_steps is equal to its max, +an error is reported and .apply fails. The max value is actually a +permitted value however, and so this check can fail where multiple +channels are enabled. + +For example, the first channel to be configured requests a period that +sets hw_period_steps to the maximum value, and when a second channel +is enabled the driver reads hw_period_steps back from the hardware and +finds it to be the maximum possible value, triggering the warning on a +permitted value. The value to be avoided is 255 (PERIOD_STEPS_MAX + 1), +as that will produce undesired behaviour, so test for greater than, +rather than equal to. + +Fixes: 2bf7ecf7b4ff ("pwm: add microchip soft ip corePWM driver") +Cc: stable@vger.kernel.org +Signed-off-by: Conor Dooley +Link: https://lore.kernel.org/r/20250122-pastor-fancied-0b993da2d2d2@spud +Signed-off-by: Uwe Kleine-König +Signed-off-by: Greg Kroah-Hartman +--- + drivers/pwm/pwm-microchip-core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/pwm/pwm-microchip-core.c ++++ b/drivers/pwm/pwm-microchip-core.c +@@ -328,7 +328,7 @@ static int mchp_core_pwm_apply_locked(st + * mchp_core_pwm_calc_period(). + * The period is locked and we cannot change this, so we abort. + */ +- if (hw_period_steps == MCHPCOREPWM_PERIOD_STEPS_MAX) ++ if (hw_period_steps > MCHPCOREPWM_PERIOD_STEPS_MAX) + return -EINVAL; + + prescale = hw_prescale; diff --git a/queue-6.6/rust-init-use-explicit-abi-to-clean-warning-in-future-compilers.patch b/queue-6.6/rust-init-use-explicit-abi-to-clean-warning-in-future-compilers.patch new file mode 100644 index 0000000000..efe39a34be --- /dev/null +++ b/queue-6.6/rust-init-use-explicit-abi-to-clean-warning-in-future-compilers.patch @@ -0,0 +1,48 @@ +From c21bdb3d8a850afdfa4afe77eea39ae9533629b0 Mon Sep 17 00:00:00 2001 +From: Miguel Ojeda +Date: Tue, 21 Jan 2025 21:09:34 +0100 +Subject: rust: init: use explicit ABI to clean warning in future compilers + +From: Miguel Ojeda + +commit c21bdb3d8a850afdfa4afe77eea39ae9533629b0 upstream. + +Starting with Rust 1.86.0 (currently in nightly, to be released on +2025-04-03), the `missing_abi` lint is warn-by-default [1]: + + error: extern declarations without an explicit ABI are deprecated + --> rust/doctests_kernel_generated.rs:3158:1 + | + 3158 | extern { + | ^^^^^^ help: explicitly specify the C ABI: `extern "C"` + | + = note: `-D missing-abi` implied by `-D warnings` + = help: to override `-D warnings` add `#[allow(missing_abi)]` + +Thus clean it up. + +Cc: # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). +Fixes: 7f8977a7fe6d ("rust: init: add `{pin_}chain` functions to `{Pin}Init`") +Link: https://github.com/rust-lang/rust/pull/132397 [1] +Reviewed-by: Gary Guo +Reviewed-by: Alice Ryhl +Reviewed-by: Fiona Behrens +Link: https://lore.kernel.org/r/20250121200934.222075-1-ojeda@kernel.org +[ Added 6.13.y to Cc: stable tag. - Miguel ] +Signed-off-by: Miguel Ojeda +Signed-off-by: Greg Kroah-Hartman +--- + rust/kernel/init.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/rust/kernel/init.rs ++++ b/rust/kernel/init.rs +@@ -788,7 +788,7 @@ pub unsafe trait PinInit +Date: Wed, 15 Jan 2025 16:15:48 +0100 +Subject: rv: Reset per-task monitors also for idle tasks + +From: Gabriele Monaco + +commit 8259cb14a70680553d5e82d65d1302fe589e9b39 upstream. + +RV per-task monitors are implemented through a monitor structure +available for each task_struct. This structure is reset every time the +monitor is (re-)started, to avoid inconsistencies if the monitor was +activated previously. +To do so, we reset the monitor on all threads using the macro +for_each_process_thread. However, this macro excludes the idle tasks on +each CPU. Idle tasks could be considered tasks on their own right and it +should be up to the model whether to ignore them or not. + +Reset monitors also on the idle tasks for each present CPU whenever we +reset all per-task monitors. + +Cc: stable@vger.kernel.org +Cc: Juri Lelli +Cc: Thomas Gleixner +Cc: Peter Zijlstra +Cc: John Kacur +Link: https://lore.kernel.org/20250115151547.605750-2-gmonaco@redhat.com +Fixes: 792575348ff7 ("rv/include: Add deterministic automata monitor definition via C macros") +Signed-off-by: Gabriele Monaco +Signed-off-by: Steven Rostedt (Google) +Signed-off-by: Greg Kroah-Hartman +--- + include/rv/da_monitor.h | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/include/rv/da_monitor.h ++++ b/include/rv/da_monitor.h +@@ -14,6 +14,7 @@ + #include + #include + #include ++#include + + #ifdef CONFIG_RV_REACTORS + +@@ -324,10 +325,13 @@ static inline struct da_monitor *da_get_ + static void da_monitor_reset_all_##name(void) \ + { \ + struct task_struct *g, *p; \ ++ int cpu; \ + \ + read_lock(&tasklist_lock); \ + for_each_process_thread(g, p) \ + da_monitor_reset_##name(da_get_monitor_##name(p)); \ ++ for_each_present_cpu(cpu) \ ++ da_monitor_reset_##name(da_get_monitor_##name(idle_task(cpu))); \ + read_unlock(&tasklist_lock); \ + } \ + \ diff --git a/queue-6.6/series b/queue-6.6/series index 76b01a9dc8..9652c07477 100644 --- a/queue-6.6/series +++ b/queue-6.6/series @@ -164,3 +164,54 @@ scsi-qla2xxx-move-fce-trace-buffer-allocation-to-user-control.patch scsi-ufs-qcom-fix-crypto-key-eviction.patch scsi-storvsc-set-correct-data-length-for-sending-scsi-command-without-payload.patch kbuild-move-wenum-enum-conversion-to-w-2.patch +rust-init-use-explicit-abi-to-clean-warning-in-future-compilers.patch +x86-boot-use-std-gnu11-to-fix-build-with-gcc-15.patch +ubi-add-a-check-for-ubi_num.patch +arm-dts-dra7-add-bus_dma_limit-for-l4-cfg-bus.patch +arm-dts-ti-omap-gta04-fix-pm-issues-caused-by-spi-module.patch +arm64-dts-qcom-sm6115-fix-mpss-memory-length.patch +arm64-dts-qcom-sm6115-fix-cdsp-memory-length.patch +arm64-dts-qcom-sm6115-fix-adsp-memory-base-and-length.patch +arm64-dts-qcom-sm6350-fix-adsp-memory-length.patch +arm64-dts-qcom-sm6350-fix-mpss-memory-length.patch +arm64-dts-qcom-sm6350-fix-uart1-interconnect-path.patch +arm64-dts-qcom-sm6375-fix-adsp-memory-length.patch +arm64-dts-qcom-sm6375-fix-cdsp-memory-base-and-length.patch +arm64-dts-qcom-sm6375-fix-mpss-memory-base-and-length.patch +arm64-dts-qcom-sm8350-fix-adsp-memory-base-and-length.patch +arm64-dts-qcom-sm8350-fix-cdsp-memory-base-and-length.patch +arm64-dts-qcom-sm8350-fix-mpss-memory-length.patch +arm64-dts-qcom-sm8450-fix-cdsp-memory-length.patch +arm64-dts-qcom-sm8450-fix-mpss-memory-length.patch +arm64-dts-qcom-sm8550-fix-cdsp-memory-length.patch +arm64-dts-qcom-sm8550-fix-mpss-memory-length.patch +arm64-dts-qcom-sm8550-correct-mdss-interconnects.patch +crypto-qce-fix-priority-to-be-less-than-armv8-ce.patch +arm64-tegra-fix-typo-in-tegra234-dce-fabric-compatible.patch +arm64-tegra-disable-tegra234-sce-fabric-node.patch +pwm-microchip-core-fix-incorrect-comparison-with-max-period.patch +xfs-propagate-errors-from-xfs_reflink_cancel_cow_range-in-xfs_dax_write_iomap_end.patch +xfs-add-error-handling-for-xfs_reflink_cancel_cow_range.patch +acpi-prm-remove-unnecessary-strict-handler-address-checks.patch +tpm-change-to-kvalloc-in-eventlog-acpi.c.patch +rv-reset-per-task-monitors-also-for-idle-tasks.patch +kfence-skip-__gfp_thisnode-allocations-on-numa-systems.patch +media-ccs-clean-up-parsed-ccs-static-data-on-parse-failure.patch +iio-light-as73211-fix-channel-handling-in-only-color-triggered-buffer.patch +soc-mediatek-mtk-devapc-fix-leaking-io-map-on-error-paths.patch +soc-qcom-smem_state-fix-missing-of_node_put-in-error-path.patch +media-mmp-bring-back-registration-of-the-device.patch +media-mc-fix-endpoint-iteration.patch +media-imx296-add-standby-delay-during-probe.patch +media-ov5640-fix-get_light_freq-on-auto.patch +media-ccs-fix-ccs-static-data-parsing-for-large-block-sizes.patch +media-ccs-fix-cleanup-order-in-ccs_probe.patch +media-i2c-ds90ub9x3-fix-extra-fwnode_handle_put.patch +media-i2c-ds90ub960-fix-use-of-non-existing-registers-on-ub9702.patch +media-i2c-ds90ub960-fix-ub9702-vc-map.patch +media-i2c-ds90ub960-fix-logging-sp-eq-status-only-for-ub9702.patch +media-uvcvideo-fix-crash-during-unbind-if-gpio-unit-is-in-use.patch +media-uvcvideo-fix-event-flags-in-uvc_ctrl_send_events.patch +media-uvcvideo-support-partial-control-reads.patch +media-uvcvideo-remove-redundant-null-assignment.patch +mm-kmemleak-fix-upper-boundary-check-for-physical-address-objects.patch diff --git a/queue-6.6/soc-mediatek-mtk-devapc-fix-leaking-io-map-on-error-paths.patch b/queue-6.6/soc-mediatek-mtk-devapc-fix-leaking-io-map-on-error-paths.patch new file mode 100644 index 0000000000..370e471796 --- /dev/null +++ b/queue-6.6/soc-mediatek-mtk-devapc-fix-leaking-io-map-on-error-paths.patch @@ -0,0 +1,63 @@ +From c0eb059a4575ed57f265d9883a5203799c19982c Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Sat, 4 Jan 2025 15:20:11 +0100 +Subject: soc: mediatek: mtk-devapc: Fix leaking IO map on error paths + +From: Krzysztof Kozlowski + +commit c0eb059a4575ed57f265d9883a5203799c19982c upstream. + +Error paths of mtk_devapc_probe() should unmap the memory. Reported by +Smatch: + + drivers/soc/mediatek/mtk-devapc.c:292 mtk_devapc_probe() warn: 'ctx->infra_base' from of_iomap() not released on lines: 277,281,286. + +Fixes: 0890beb22618 ("soc: mediatek: add mt6779 devapc driver") +Cc: stable@vger.kernel.org +Signed-off-by: Krzysztof Kozlowski +Link: https://lore.kernel.org/r/20250104142012.115974-1-krzysztof.kozlowski@linaro.org +Signed-off-by: AngeloGioacchino Del Regno +Signed-off-by: Greg Kroah-Hartman +--- + drivers/soc/mediatek/mtk-devapc.c | 18 +++++++++++++----- + 1 file changed, 13 insertions(+), 5 deletions(-) + +--- a/drivers/soc/mediatek/mtk-devapc.c ++++ b/drivers/soc/mediatek/mtk-devapc.c +@@ -273,23 +273,31 @@ static int mtk_devapc_probe(struct platf + return -EINVAL; + + devapc_irq = irq_of_parse_and_map(node, 0); +- if (!devapc_irq) +- return -EINVAL; ++ if (!devapc_irq) { ++ ret = -EINVAL; ++ goto err; ++ } + + ctx->infra_clk = devm_clk_get_enabled(&pdev->dev, "devapc-infra-clock"); +- if (IS_ERR(ctx->infra_clk)) +- return -EINVAL; ++ if (IS_ERR(ctx->infra_clk)) { ++ ret = -EINVAL; ++ goto err; ++ } + + ret = devm_request_irq(&pdev->dev, devapc_irq, devapc_violation_irq, + IRQF_TRIGGER_NONE, "devapc", ctx); + if (ret) +- return ret; ++ goto err; + + platform_set_drvdata(pdev, ctx); + + start_devapc(ctx); + + return 0; ++ ++err: ++ iounmap(ctx->infra_base); ++ return ret; + } + + static int mtk_devapc_remove(struct platform_device *pdev) diff --git a/queue-6.6/soc-qcom-smem_state-fix-missing-of_node_put-in-error-path.patch b/queue-6.6/soc-qcom-smem_state-fix-missing-of_node_put-in-error-path.patch new file mode 100644 index 0000000000..51767bbe99 --- /dev/null +++ b/queue-6.6/soc-qcom-smem_state-fix-missing-of_node_put-in-error-path.patch @@ -0,0 +1,35 @@ +From 70096b4990848229d0784c5e51dc3c7c072f1111 Mon Sep 17 00:00:00 2001 +From: Krzysztof Kozlowski +Date: Thu, 22 Aug 2024 18:48:51 +0200 +Subject: soc: qcom: smem_state: fix missing of_node_put in error path + +From: Krzysztof Kozlowski + +commit 70096b4990848229d0784c5e51dc3c7c072f1111 upstream. + +If of_parse_phandle_with_args() succeeds, the OF node reference should +be dropped, regardless of number of phandle arguments. + +Cc: stable@vger.kernel.org +Fixes: 9460ae2ff308 ("soc: qcom: Introduce common SMEM state machine code") +Signed-off-by: Krzysztof Kozlowski +Reviewed-by: Dmitry Baryshkov +Link: https://lore.kernel.org/r/20240822164853.231087-2-krzysztof.kozlowski@linaro.org +Signed-off-by: Bjorn Andersson +Signed-off-by: Greg Kroah-Hartman +--- + drivers/soc/qcom/smem_state.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/soc/qcom/smem_state.c ++++ b/drivers/soc/qcom/smem_state.c +@@ -116,7 +116,8 @@ struct qcom_smem_state *qcom_smem_state_ + + if (args.args_count != 1) { + dev_err(dev, "invalid #qcom,smem-state-cells\n"); +- return ERR_PTR(-EINVAL); ++ state = ERR_PTR(-EINVAL); ++ goto put; + } + + state = of_node_to_state(args.np); diff --git a/queue-6.6/tpm-change-to-kvalloc-in-eventlog-acpi.c.patch b/queue-6.6/tpm-change-to-kvalloc-in-eventlog-acpi.c.patch new file mode 100644 index 0000000000..1649597114 --- /dev/null +++ b/queue-6.6/tpm-change-to-kvalloc-in-eventlog-acpi.c.patch @@ -0,0 +1,84 @@ +From a3a860bc0fd6c07332e4911cf9a238d20de90173 Mon Sep 17 00:00:00 2001 +From: Jarkko Sakkinen +Date: Fri, 27 Dec 2024 17:39:09 +0200 +Subject: tpm: Change to kvalloc() in eventlog/acpi.c + +From: Jarkko Sakkinen + +commit a3a860bc0fd6c07332e4911cf9a238d20de90173 upstream. + +The following failure was reported on HPE ProLiant D320: + +[ 10.693310][ T1] tpm_tis STM0925:00: 2.0 TPM (device-id 0x3, rev-id 0) +[ 10.848132][ T1] ------------[ cut here ]------------ +[ 10.853559][ T1] WARNING: CPU: 59 PID: 1 at mm/page_alloc.c:4727 __alloc_pages_noprof+0x2ca/0x330 +[ 10.862827][ T1] Modules linked in: +[ 10.866671][ T1] CPU: 59 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.0-lp155.2.g52785e2-default #1 openSUSE Tumbleweed (unreleased) 588cd98293a7c9eba9013378d807364c088c9375 +[ 10.882741][ T1] Hardware name: HPE ProLiant DL320 Gen12/ProLiant DL320 Gen12, BIOS 1.20 10/28/2024 +[ 10.892170][ T1] RIP: 0010:__alloc_pages_noprof+0x2ca/0x330 +[ 10.898103][ T1] Code: 24 08 e9 4a fe ff ff e8 34 36 fa ff e9 88 fe ff ff 83 fe 0a 0f 86 b3 fd ff ff 80 3d 01 e7 ce 01 00 75 09 c6 05 f8 e6 ce 01 01 <0f> 0b 45 31 ff e9 e5 fe ff ff f7 c2 00 00 08 00 75 42 89 d9 80 e1 +[ 10.917750][ T1] RSP: 0000:ffffb7cf40077980 EFLAGS: 00010246 +[ 10.923777][ T1] RAX: 0000000000000000 RBX: 0000000000040cc0 RCX: 0000000000000000 +[ 10.931727][ T1] RDX: 0000000000000000 RSI: 000000000000000c RDI: 0000000000040cc0 + +The above transcript shows that ACPI pointed a 16 MiB buffer for the log +events because RSI maps to the 'order' parameter of __alloc_pages_noprof(). +Address the bug by moving from devm_kmalloc() to devm_add_action() and +kvmalloc() and devm_add_action(). + +Suggested-by: Ard Biesheuvel +Cc: stable@vger.kernel.org # v2.6.16+ +Fixes: 55a82ab3181b ("[PATCH] tpm: add bios measurement log") +Reported-by: Andy Liang +Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219495 +Reviewed-by: Ard Biesheuvel +Reviewed-by: Stefan Berger +Reviewed-by: Takashi Iwai +Tested-by: Andy Liang +Signed-off-by: Jarkko Sakkinen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/char/tpm/eventlog/acpi.c | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +--- a/drivers/char/tpm/eventlog/acpi.c ++++ b/drivers/char/tpm/eventlog/acpi.c +@@ -63,6 +63,11 @@ static bool tpm_is_tpm2_log(void *bios_e + return n == 0; + } + ++static void tpm_bios_log_free(void *data) ++{ ++ kvfree(data); ++} ++ + /* read binary bios log */ + int tpm_read_log_acpi(struct tpm_chip *chip) + { +@@ -136,7 +141,7 @@ int tpm_read_log_acpi(struct tpm_chip *c + } + + /* malloc EventLog space */ +- log->bios_event_log = devm_kmalloc(&chip->dev, len, GFP_KERNEL); ++ log->bios_event_log = kvmalloc(len, GFP_KERNEL); + if (!log->bios_event_log) + return -ENOMEM; + +@@ -162,10 +167,16 @@ int tpm_read_log_acpi(struct tpm_chip *c + goto err; + } + ++ ret = devm_add_action(&chip->dev, tpm_bios_log_free, log->bios_event_log); ++ if (ret) { ++ log->bios_event_log = NULL; ++ goto err; ++ } ++ + return format; + + err: +- devm_kfree(&chip->dev, log->bios_event_log); ++ tpm_bios_log_free(log->bios_event_log); + log->bios_event_log = NULL; + return ret; + } diff --git a/queue-6.6/ubi-add-a-check-for-ubi_num.patch b/queue-6.6/ubi-add-a-check-for-ubi_num.patch new file mode 100644 index 0000000000..a8a96cb812 --- /dev/null +++ b/queue-6.6/ubi-add-a-check-for-ubi_num.patch @@ -0,0 +1,43 @@ +From 97bbf9e312c3fbaf0baa56120238825d2eb23b8a Mon Sep 17 00:00:00 2001 +From: Denis Arefev +Date: Mon, 2 Dec 2024 12:36:52 +0300 +Subject: ubi: Add a check for ubi_num + +From: Denis Arefev + +commit 97bbf9e312c3fbaf0baa56120238825d2eb23b8a upstream. + +Added a check for ubi_num for negative numbers +If the variable ubi_num takes negative values then we get: + +qemu-system-arm ... -append "ubi.mtd=0,0,0,-22222345" ... +[ 0.745065] ubi_attach_mtd_dev from ubi_init+0x178/0x218 +[ 0.745230] ubi_init from do_one_initcall+0x70/0x1ac +[ 0.745344] do_one_initcall from kernel_init_freeable+0x198/0x224 +[ 0.745474] kernel_init_freeable from kernel_init+0x18/0x134 +[ 0.745600] kernel_init from ret_from_fork+0x14/0x28 +[ 0.745727] Exception stack(0x90015fb0 to 0x90015ff8) + +Found by Linux Verification Center (linuxtesting.org) with SVACE. + +Fixes: 83ff59a06663 ("UBI: support ubi_num on mtd.ubi command line") +Cc: stable@vger.kernel.org +Signed-off-by: Denis Arefev +Reviewed-by: Zhihao Cheng +Signed-off-by: Richard Weinberger +Signed-off-by: Greg Kroah-Hartman +--- + drivers/mtd/ubi/build.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/mtd/ubi/build.c ++++ b/drivers/mtd/ubi/build.c +@@ -1462,7 +1462,7 @@ static int ubi_mtd_param_parse(const cha + if (token) { + int err = kstrtoint(token, 10, &p->ubi_num); + +- if (err) { ++ if (err || p->ubi_num < UBI_DEV_NUM_AUTO) { + pr_err("UBI error: bad value for ubi_num parameter: %s\n", + token); + return -EINVAL; diff --git a/queue-6.6/x86-boot-use-std-gnu11-to-fix-build-with-gcc-15.patch b/queue-6.6/x86-boot-use-std-gnu11-to-fix-build-with-gcc-15.patch new file mode 100644 index 0000000000..4f9263086e --- /dev/null +++ b/queue-6.6/x86-boot-use-std-gnu11-to-fix-build-with-gcc-15.patch @@ -0,0 +1,52 @@ +From ee2ab467bddfb2d7f68d996dbab94d7b88f8eaf7 Mon Sep 17 00:00:00 2001 +From: Nathan Chancellor +Date: Tue, 21 Jan 2025 18:11:33 -0700 +Subject: x86/boot: Use '-std=gnu11' to fix build with GCC 15 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Nathan Chancellor + +commit ee2ab467bddfb2d7f68d996dbab94d7b88f8eaf7 upstream. + +GCC 15 changed the default C standard version to C23, which should not +have impacted the kernel because it requests the gnu11 standard via +'-std=' in the main Makefile. However, the x86 compressed boot Makefile +uses its own set of KBUILD_CFLAGS without a '-std=' value (i.e., using +the default), resulting in errors from the kernel's definitions of bool, +true, and false in stddef.h, which are reserved keywords under C23. + + ./include/linux/stddef.h:11:9: error: expected identifier before ‘false’ + 11 | false = 0, + ./include/linux/types.h:35:33: error: two or more data types in declaration specifiers + 35 | typedef _Bool bool; + +Set '-std=gnu11' in the x86 compressed boot Makefile to resolve the +error and consistently use the same C standard version for the entire +kernel. + +Closes: https://lore.kernel.org/4OAhbllK7x4QJGpZjkYjtBYNLd_2whHx9oFiuZcGwtVR4hIzvduultkgfAIRZI3vQpZylu7Gl929HaYFRGeMEalWCpeMzCIIhLxxRhq4U-Y=@protonmail.com/ +Closes: https://lore.kernel.org/Z4467umXR2PZ0M1H@tucnak/ +Reported-by: Kostadin Shishmanov +Reported-by: Jakub Jelinek +Signed-off-by: Nathan Chancellor +Signed-off-by: Dave Hansen +Reviewed-by: Ard Biesheuvel +Cc:stable@vger.kernel.org +Link: https://lore.kernel.org/all/20250121-x86-use-std-consistently-gcc-15-v1-1-8ab0acf645cb%40kernel.org +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/boot/compressed/Makefile | 1 + + 1 file changed, 1 insertion(+) + +--- a/arch/x86/boot/compressed/Makefile ++++ b/arch/x86/boot/compressed/Makefile +@@ -34,6 +34,7 @@ targets := vmlinux vmlinux.bin vmlinux.b + # avoid errors with '-march=i386', and future flags may depend on the target to + # be valid. + KBUILD_CFLAGS := -m$(BITS) -O2 $(CLANG_FLAGS) ++KBUILD_CFLAGS += -std=gnu11 + KBUILD_CFLAGS += -fno-strict-aliasing -fPIE + KBUILD_CFLAGS += -Wundef + KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING diff --git a/queue-6.6/xfs-add-error-handling-for-xfs_reflink_cancel_cow_range.patch b/queue-6.6/xfs-add-error-handling-for-xfs_reflink_cancel_cow_range.patch new file mode 100644 index 0000000000..522da86733 --- /dev/null +++ b/queue-6.6/xfs-add-error-handling-for-xfs_reflink_cancel_cow_range.patch @@ -0,0 +1,42 @@ +From 26b63bee2f6e711c5a169997fd126fddcfb90848 Mon Sep 17 00:00:00 2001 +From: Wentao Liang +Date: Fri, 24 Jan 2025 11:45:09 +0800 +Subject: xfs: Add error handling for xfs_reflink_cancel_cow_range + +From: Wentao Liang + +commit 26b63bee2f6e711c5a169997fd126fddcfb90848 upstream. + +In xfs_inactive(), xfs_reflink_cancel_cow_range() is called +without error handling, risking unnoticed failures and +inconsistent behavior compared to other parts of the code. + +Fix this issue by adding an error handling for the +xfs_reflink_cancel_cow_range(), improving code robustness. + +Fixes: 6231848c3aa5 ("xfs: check for cow blocks before trying to clear them") +Cc: stable@vger.kernel.org # v4.17 +Reviewed-by: Darrick J. Wong +Signed-off-by: Wentao Liang +Signed-off-by: Carlos Maiolino +Signed-off-by: Greg Kroah-Hartman +--- + fs/xfs/xfs_inode.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/fs/xfs/xfs_inode.c ++++ b/fs/xfs/xfs_inode.c +@@ -1738,8 +1738,11 @@ xfs_inactive( + goto out; + + /* Try to clean out the cow blocks if there are any. */ +- if (xfs_inode_has_cow_data(ip)) +- xfs_reflink_cancel_cow_range(ip, 0, NULLFILEOFF, true); ++ if (xfs_inode_has_cow_data(ip)) { ++ error = xfs_reflink_cancel_cow_range(ip, 0, NULLFILEOFF, true); ++ if (error) ++ goto out; ++ } + + if (VFS_I(ip)->i_nlink != 0) { + /* diff --git a/queue-6.6/xfs-propagate-errors-from-xfs_reflink_cancel_cow_range-in-xfs_dax_write_iomap_end.patch b/queue-6.6/xfs-propagate-errors-from-xfs_reflink_cancel_cow_range-in-xfs_dax_write_iomap_end.patch new file mode 100644 index 0000000000..3bab9f86cf --- /dev/null +++ b/queue-6.6/xfs-propagate-errors-from-xfs_reflink_cancel_cow_range-in-xfs_dax_write_iomap_end.patch @@ -0,0 +1,38 @@ +From fb95897b8c60653805aa09daec575ca30983f768 Mon Sep 17 00:00:00 2001 +From: Wentao Liang +Date: Fri, 24 Jan 2025 11:22:28 +0800 +Subject: xfs: Propagate errors from xfs_reflink_cancel_cow_range in xfs_dax_write_iomap_end + +From: Wentao Liang + +commit fb95897b8c60653805aa09daec575ca30983f768 upstream. + +In xfs_dax_write_iomap_end(), directly return the result of +xfs_reflink_cancel_cow_range() when !written, ensuring proper +error propagation and improving code robustness. + +Fixes: ea6c49b784f0 ("xfs: support CoW in fsdax mode") +Cc: stable@vger.kernel.org # v6.0 +Reviewed-by: Darrick J. Wong +Signed-off-by: Wentao Liang +Signed-off-by: Carlos Maiolino +Signed-off-by: Greg Kroah-Hartman +--- + fs/xfs/xfs_iomap.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +--- a/fs/xfs/xfs_iomap.c ++++ b/fs/xfs/xfs_iomap.c +@@ -923,10 +923,8 @@ xfs_dax_write_iomap_end( + if (!xfs_is_cow_inode(ip)) + return 0; + +- if (!written) { +- xfs_reflink_cancel_cow_range(ip, pos, length, true); +- return 0; +- } ++ if (!written) ++ return xfs_reflink_cancel_cow_range(ip, pos, length, true); + + return xfs_reflink_end_cow(ip, pos, written); + }