From b6a6f710e1e5ed22cc468e3e81c22ab6aa51e10a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 21 Oct 2022 17:35:27 +0200 Subject: [PATCH] more dropping of 5.19 patches in other queues --- ...-endianness-related-issues-from-spar.patch | 67 --------- queue-4.14/series | 1 - ...errun-in-netlink-attribute-iteration.patch | 38 ----- ...-endianness-related-issues-from-spar.patch | 67 --------- ...u-hotplug-use-return-instead-of-exit.patch | 76 ---------- queue-4.19/series | 3 - ...-endianness-related-issues-from-spar.patch | 67 --------- queue-4.9/series | 1 - ...com-ipq8074-fix-pcie-phy-serdes-size.patch | 47 ------- ...apss-ipq6018-fix-apcs_alias0_clk_src.patch | 73 ---------- ...q6018-mark-apcs_alias0_core_clk-as-c.patch | 9 +- .../clk-qcom-clk-rcg2-add-rcg2-mux-ops.patch | 64 --------- ...warning-in-uclogic_rdesc_template_ap.patch | 44 ------ ...ake-template-placeholder-ids-generic.patch | 132 ------------------ ...errun-in-netlink-attribute-iteration.patch | 38 ----- ...-endianness-related-issues-from-spar.patch | 67 --------- ...u-hotplug-use-return-instead-of-exit.patch | 76 ---------- queue-5.10/series | 8 -- ...qcom-sc7280-cleanup-the-lpasscc-node.patch | 42 ------ ...c7280-idp-correct-adc-channel-node-n.patch | 59 -------- ...apss-ipq6018-fix-apcs_alias0_clk_src.patch | 73 ---------- ...q6018-mark-apcs_alias0_core_clk-as-c.patch | 9 +- .../clk-qcom-clk-rcg2-add-rcg2-mux-ops.patch | 64 --------- ...warning-in-uclogic_rdesc_template_ap.patch | 44 ------ ...ake-template-placeholder-ids-generic.patch | 132 ------------------ .../iio-directly-use-ida_alloc-free.patch | 87 ------------ ...e-per-device-lockdep-class-for-mlock.patch | 111 --------------- ...-if-sec-freplace-programs-don-t-have.patch | 64 --------- ...pointer-exception-in-api-btf_dump__d.patch | 40 ------ ...errun-in-netlink-attribute-iteration.patch | 38 ----- ...-endianness-related-issues-from-spar.patch | 67 --------- ...u-hotplug-use-return-instead-of-exit.patch | 76 ---------- queue-5.15/series | 13 -- ...errun-in-netlink-attribute-iteration.patch | 38 ----- ...-endianness-related-issues-from-spar.patch | 67 --------- ...u-hotplug-use-return-instead-of-exit.patch | 76 ---------- queue-5.4/series | 3 - 37 files changed, 4 insertions(+), 1977 deletions(-) delete mode 100644 queue-4.14/net-ftmac100-fix-endianness-related-issues-from-spar.patch delete mode 100644 queue-4.19/libbpf-fix-overrun-in-netlink-attribute-iteration.patch delete mode 100644 queue-4.19/net-ftmac100-fix-endianness-related-issues-from-spar.patch delete mode 100644 queue-4.19/selftests-cpu-hotplug-use-return-instead-of-exit.patch delete mode 100644 queue-4.9/net-ftmac100-fix-endianness-related-issues-from-spar.patch delete mode 100644 queue-5.10/arm64-dts-qcom-ipq8074-fix-pcie-phy-serdes-size.patch delete mode 100644 queue-5.10/clk-qcom-apss-ipq6018-fix-apcs_alias0_clk_src.patch delete mode 100644 queue-5.10/clk-qcom-clk-rcg2-add-rcg2-mux-ops.patch delete mode 100644 queue-5.10/hid-uclogic-fix-warning-in-uclogic_rdesc_template_ap.patch delete mode 100644 queue-5.10/hid-uclogic-make-template-placeholder-ids-generic.patch delete mode 100644 queue-5.10/libbpf-fix-overrun-in-netlink-attribute-iteration.patch delete mode 100644 queue-5.10/net-ftmac100-fix-endianness-related-issues-from-spar.patch delete mode 100644 queue-5.10/selftests-cpu-hotplug-use-return-instead-of-exit.patch delete mode 100644 queue-5.15/arm64-dts-qcom-sc7280-cleanup-the-lpasscc-node.patch delete mode 100644 queue-5.15/arm64-dts-qcom-sc7280-idp-correct-adc-channel-node-n.patch delete mode 100644 queue-5.15/clk-qcom-apss-ipq6018-fix-apcs_alias0_clk_src.patch delete mode 100644 queue-5.15/clk-qcom-clk-rcg2-add-rcg2-mux-ops.patch delete mode 100644 queue-5.15/hid-uclogic-fix-warning-in-uclogic_rdesc_template_ap.patch delete mode 100644 queue-5.15/hid-uclogic-make-template-placeholder-ids-generic.patch delete mode 100644 queue-5.15/iio-directly-use-ida_alloc-free.patch delete mode 100644 queue-5.15/iio-use-per-device-lockdep-class-for-mlock.patch delete mode 100644 queue-5.15/libbpf-fix-crash-if-sec-freplace-programs-don-t-have.patch delete mode 100644 queue-5.15/libbpf-fix-null-pointer-exception-in-api-btf_dump__d.patch delete mode 100644 queue-5.15/libbpf-fix-overrun-in-netlink-attribute-iteration.patch delete mode 100644 queue-5.15/net-ftmac100-fix-endianness-related-issues-from-spar.patch delete mode 100644 queue-5.15/selftests-cpu-hotplug-use-return-instead-of-exit.patch delete mode 100644 queue-5.4/libbpf-fix-overrun-in-netlink-attribute-iteration.patch delete mode 100644 queue-5.4/net-ftmac100-fix-endianness-related-issues-from-spar.patch delete mode 100644 queue-5.4/selftests-cpu-hotplug-use-return-instead-of-exit.patch diff --git a/queue-4.14/net-ftmac100-fix-endianness-related-issues-from-spar.patch b/queue-4.14/net-ftmac100-fix-endianness-related-issues-from-spar.patch deleted file mode 100644 index 22dfe0df96a..00000000000 --- a/queue-4.14/net-ftmac100-fix-endianness-related-issues-from-spar.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 9fabeb45b96ebc4e31e2c492ed44fba49e0e4761 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 2 Sep 2022 14:37:49 +0300 -Subject: net: ftmac100: fix endianness-related issues from 'sparse' - -From: Sergei Antonov - -[ Upstream commit 9df696b3b3a4c96c3219eb87c7bf03fb50e490b8 ] - -Sparse found a number of endianness-related issues of these kinds: - -.../ftmac100.c:192:32: warning: restricted __le32 degrades to integer - -.../ftmac100.c:208:23: warning: incorrect type in assignment (different base types) -.../ftmac100.c:208:23: expected unsigned int rxdes0 -.../ftmac100.c:208:23: got restricted __le32 [usertype] - -.../ftmac100.c:249:23: warning: invalid assignment: &= -.../ftmac100.c:249:23: left side has type unsigned int -.../ftmac100.c:249:23: right side has type restricted __le32 - -.../ftmac100.c:527:16: warning: cast to restricted __le32 - -Change type of some fields from 'unsigned int' to '__le32' to fix it. - -Signed-off-by: Sergei Antonov -Reviewed-by: Andrew Lunn -Link: https://lore.kernel.org/r/20220902113749.1408562-1-saproj@gmail.com -Signed-off-by: Paolo Abeni -Signed-off-by: Sasha Levin ---- - drivers/net/ethernet/faraday/ftmac100.h | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/drivers/net/ethernet/faraday/ftmac100.h b/drivers/net/ethernet/faraday/ftmac100.h -index 46a0c47b1ee1..0731d65e856c 100644 ---- a/drivers/net/ethernet/faraday/ftmac100.h -+++ b/drivers/net/ethernet/faraday/ftmac100.h -@@ -135,9 +135,9 @@ - * Transmit descriptor, aligned to 16 bytes - */ - struct ftmac100_txdes { -- unsigned int txdes0; -- unsigned int txdes1; -- unsigned int txdes2; /* TXBUF_BADR */ -+ __le32 txdes0; -+ __le32 txdes1; -+ __le32 txdes2; /* TXBUF_BADR */ - unsigned int txdes3; /* not used by HW */ - } __attribute__ ((aligned(16))); - -@@ -156,9 +156,9 @@ struct ftmac100_txdes { - * Receive descriptor, aligned to 16 bytes - */ - struct ftmac100_rxdes { -- unsigned int rxdes0; -- unsigned int rxdes1; -- unsigned int rxdes2; /* RXBUF_BADR */ -+ __le32 rxdes0; -+ __le32 rxdes1; -+ __le32 rxdes2; /* RXBUF_BADR */ - unsigned int rxdes3; /* not used by HW */ - } __attribute__ ((aligned(16))); - --- -2.35.1 - diff --git a/queue-4.14/series b/queue-4.14/series index 9c0a4f4980c..a7dceef12f5 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -170,7 +170,6 @@ openvswitch-fix-overreporting-of-drops-in-dropwatch.patch tcp-annotate-data-race-around-tcp_md5sig_pool_popula.patch wifi-ath9k-avoid-uninit-memory-read-in-ath9k_htc_rx_.patch xfrm-update-ipcomp_scratches-with-null-when-freed.patch -net-ftmac100-fix-endianness-related-issues-from-spar.patch wifi-brcmfmac-fix-use-after-free-bug-in-brcmf_netdev.patch bluetooth-l2cap-initialize-delayed-works-at-l2cap_ch.patch bluetooth-hci_sysfs-fix-attempting-to-call-device_ad.patch diff --git a/queue-4.19/libbpf-fix-overrun-in-netlink-attribute-iteration.patch b/queue-4.19/libbpf-fix-overrun-in-netlink-attribute-iteration.patch deleted file mode 100644 index 4e309f5440d..00000000000 --- a/queue-4.19/libbpf-fix-overrun-in-netlink-attribute-iteration.patch +++ /dev/null @@ -1,38 +0,0 @@ -From ec93fcf1db7a5c7756437e75f6d0e7c34f5b7790 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 30 Sep 2022 17:07:08 +0800 -Subject: libbpf: Fix overrun in netlink attribute iteration - -From: Xin Liu - -[ Upstream commit 51e05a8cf8eb34da7473823b7f236a77adfef0b4 ] - -I accidentally found that a change in commit 1045b03e07d8 ("netlink: fix -overrun in attribute iteration") was not synchronized to the function -`nla_ok` in tools/lib/bpf/nlattr.c, I think it is necessary to modify, -this patch will do it. - -Signed-off-by: Xin Liu -Signed-off-by: Andrii Nakryiko -Link: https://lore.kernel.org/bpf/20220930090708.62394-1-liuxin350@huawei.com -Signed-off-by: Sasha Levin ---- - tools/lib/bpf/nlattr.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/lib/bpf/nlattr.c b/tools/lib/bpf/nlattr.c -index 4719434278b2..869b2fe14726 100644 ---- a/tools/lib/bpf/nlattr.c -+++ b/tools/lib/bpf/nlattr.c -@@ -41,7 +41,7 @@ static struct nlattr *nla_next(const struct nlattr *nla, int *remaining) - - static int nla_ok(const struct nlattr *nla, int remaining) - { -- return remaining >= sizeof(*nla) && -+ return remaining >= (int)sizeof(*nla) && - nla->nla_len >= sizeof(*nla) && - nla->nla_len <= remaining; - } --- -2.35.1 - diff --git a/queue-4.19/net-ftmac100-fix-endianness-related-issues-from-spar.patch b/queue-4.19/net-ftmac100-fix-endianness-related-issues-from-spar.patch deleted file mode 100644 index e5596f40bfa..00000000000 --- a/queue-4.19/net-ftmac100-fix-endianness-related-issues-from-spar.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 6f26d727337ea3bab1f21879a3cd26080f675bb0 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 2 Sep 2022 14:37:49 +0300 -Subject: net: ftmac100: fix endianness-related issues from 'sparse' - -From: Sergei Antonov - -[ Upstream commit 9df696b3b3a4c96c3219eb87c7bf03fb50e490b8 ] - -Sparse found a number of endianness-related issues of these kinds: - -.../ftmac100.c:192:32: warning: restricted __le32 degrades to integer - -.../ftmac100.c:208:23: warning: incorrect type in assignment (different base types) -.../ftmac100.c:208:23: expected unsigned int rxdes0 -.../ftmac100.c:208:23: got restricted __le32 [usertype] - -.../ftmac100.c:249:23: warning: invalid assignment: &= -.../ftmac100.c:249:23: left side has type unsigned int -.../ftmac100.c:249:23: right side has type restricted __le32 - -.../ftmac100.c:527:16: warning: cast to restricted __le32 - -Change type of some fields from 'unsigned int' to '__le32' to fix it. - -Signed-off-by: Sergei Antonov -Reviewed-by: Andrew Lunn -Link: https://lore.kernel.org/r/20220902113749.1408562-1-saproj@gmail.com -Signed-off-by: Paolo Abeni -Signed-off-by: Sasha Levin ---- - drivers/net/ethernet/faraday/ftmac100.h | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/drivers/net/ethernet/faraday/ftmac100.h b/drivers/net/ethernet/faraday/ftmac100.h -index 46a0c47b1ee1..0731d65e856c 100644 ---- a/drivers/net/ethernet/faraday/ftmac100.h -+++ b/drivers/net/ethernet/faraday/ftmac100.h -@@ -135,9 +135,9 @@ - * Transmit descriptor, aligned to 16 bytes - */ - struct ftmac100_txdes { -- unsigned int txdes0; -- unsigned int txdes1; -- unsigned int txdes2; /* TXBUF_BADR */ -+ __le32 txdes0; -+ __le32 txdes1; -+ __le32 txdes2; /* TXBUF_BADR */ - unsigned int txdes3; /* not used by HW */ - } __attribute__ ((aligned(16))); - -@@ -156,9 +156,9 @@ struct ftmac100_txdes { - * Receive descriptor, aligned to 16 bytes - */ - struct ftmac100_rxdes { -- unsigned int rxdes0; -- unsigned int rxdes1; -- unsigned int rxdes2; /* RXBUF_BADR */ -+ __le32 rxdes0; -+ __le32 rxdes1; -+ __le32 rxdes2; /* RXBUF_BADR */ - unsigned int rxdes3; /* not used by HW */ - } __attribute__ ((aligned(16))); - --- -2.35.1 - diff --git a/queue-4.19/selftests-cpu-hotplug-use-return-instead-of-exit.patch b/queue-4.19/selftests-cpu-hotplug-use-return-instead-of-exit.patch deleted file mode 100644 index f675f083868..00000000000 --- a/queue-4.19/selftests-cpu-hotplug-use-return-instead-of-exit.patch +++ /dev/null @@ -1,76 +0,0 @@ -From fa5c835edcd0d92dc0ece047c94030528f830bc5 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 5 Sep 2022 21:36:12 +0800 -Subject: selftests/cpu-hotplug: Use return instead of exit - -From: Zhao Gongyi - -[ Upstream commit 972cf4ce51ef5532d56822af17defb148aac0ccb ] - -Some cpus will be left in offline state when online -function exits in some error conditions. Use return -instead of exit to fix it. - -Signed-off-by: Zhao Gongyi -Signed-off-by: Shuah Khan -Signed-off-by: Sasha Levin ---- - .../selftests/cpu-hotplug/cpu-on-off-test.sh | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -diff --git a/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh b/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh -index 0d26b5e3f966..940b68c940bb 100755 ---- a/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh -+++ b/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh -@@ -4,6 +4,7 @@ - SYSFS= - # Kselftest framework requirement - SKIP code is 4. - ksft_skip=4 -+retval=0 - - prerequisite() - { -@@ -102,10 +103,10 @@ online_cpu_expect_success() - - if ! online_cpu $cpu; then - echo $FUNCNAME $cpu: unexpected fail >&2 -- exit 1 -+ retval=1 - elif ! cpu_is_online $cpu; then - echo $FUNCNAME $cpu: unexpected offline >&2 -- exit 1 -+ retval=1 - fi - } - -@@ -128,10 +129,10 @@ offline_cpu_expect_success() - - if ! offline_cpu $cpu; then - echo $FUNCNAME $cpu: unexpected fail >&2 -- exit 1 -+ retval=1 - elif ! cpu_is_offline $cpu; then - echo $FUNCNAME $cpu: unexpected offline >&2 -- exit 1 -+ retval=1 - fi - } - -@@ -201,7 +202,7 @@ if [ $allcpus -eq 0 ]; then - offline_cpu_expect_success $present_max - online_cpu $present_max - fi -- exit 0 -+ exit $retval - else - echo "Full scope test: all hotplug cpus" - echo -e "\t online all offline cpus" -@@ -291,3 +292,5 @@ done - - echo 0 > $NOTIFIER_ERR_INJECT_DIR/actions/CPU_DOWN_PREPARE/error - /sbin/modprobe -q -r cpu-notifier-error-inject -+ -+exit $retval --- -2.35.1 - diff --git a/queue-4.19/series b/queue-4.19/series index 3444e6cb509..9c8f7a25bb7 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -181,7 +181,6 @@ openvswitch-fix-overreporting-of-drops-in-dropwatch.patch tcp-annotate-data-race-around-tcp_md5sig_pool_popula.patch wifi-ath9k-avoid-uninit-memory-read-in-ath9k_htc_rx_.patch xfrm-update-ipcomp_scratches-with-null-when-freed.patch -net-ftmac100-fix-endianness-related-issues-from-spar.patch wifi-brcmfmac-fix-use-after-free-bug-in-brcmf_netdev.patch bluetooth-l2cap-initialize-delayed-works-at-l2cap_ch.patch bluetooth-hci_sysfs-fix-attempting-to-call-device_ad.patch @@ -192,7 +191,6 @@ wifi-rt2x00-set-soc-wmac-clock-register.patch wifi-rt2x00-correctly-set-bbp-register-86-for-mt7620.patch net-if-sock-is-dead-don-t-access-sock-s-sk_wq-in-sk_.patch bluetooth-l2cap-fix-user-after-free.patch -libbpf-fix-overrun-in-netlink-attribute-iteration.patch r8152-rate-limit-overflow-messages.patch drm-use-size_t-type-for-len-variable-in-drm_copy_fie.patch drm-prevent-drm_copy_field-to-attempt-copying-a-null.patch @@ -208,7 +206,6 @@ arm-dts-imx6qp-add-missing-properties-for-sram.patch arm-dts-imx6sl-add-missing-properties-for-sram.patch arm-dts-imx6sll-add-missing-properties-for-sram.patch arm-dts-imx6sx-add-missing-properties-for-sram.patch -selftests-cpu-hotplug-use-return-instead-of-exit.patch media-cx88-fix-a-null-ptr-deref-bug-in-buffer_prepar.patch scsi-3w-9xxx-avoid-disabling-device-if-failing-to-en.patch nbd-fix-hung-when-signal-interrupts-nbd_start_device.patch diff --git a/queue-4.9/net-ftmac100-fix-endianness-related-issues-from-spar.patch b/queue-4.9/net-ftmac100-fix-endianness-related-issues-from-spar.patch deleted file mode 100644 index a0421b4de7f..00000000000 --- a/queue-4.9/net-ftmac100-fix-endianness-related-issues-from-spar.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 85991c4341a5eaa57bb41683856535fba4db6ccc Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 2 Sep 2022 14:37:49 +0300 -Subject: net: ftmac100: fix endianness-related issues from 'sparse' - -From: Sergei Antonov - -[ Upstream commit 9df696b3b3a4c96c3219eb87c7bf03fb50e490b8 ] - -Sparse found a number of endianness-related issues of these kinds: - -.../ftmac100.c:192:32: warning: restricted __le32 degrades to integer - -.../ftmac100.c:208:23: warning: incorrect type in assignment (different base types) -.../ftmac100.c:208:23: expected unsigned int rxdes0 -.../ftmac100.c:208:23: got restricted __le32 [usertype] - -.../ftmac100.c:249:23: warning: invalid assignment: &= -.../ftmac100.c:249:23: left side has type unsigned int -.../ftmac100.c:249:23: right side has type restricted __le32 - -.../ftmac100.c:527:16: warning: cast to restricted __le32 - -Change type of some fields from 'unsigned int' to '__le32' to fix it. - -Signed-off-by: Sergei Antonov -Reviewed-by: Andrew Lunn -Link: https://lore.kernel.org/r/20220902113749.1408562-1-saproj@gmail.com -Signed-off-by: Paolo Abeni -Signed-off-by: Sasha Levin ---- - drivers/net/ethernet/faraday/ftmac100.h | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/drivers/net/ethernet/faraday/ftmac100.h b/drivers/net/ethernet/faraday/ftmac100.h -index 46a0c47b1ee1..0731d65e856c 100644 ---- a/drivers/net/ethernet/faraday/ftmac100.h -+++ b/drivers/net/ethernet/faraday/ftmac100.h -@@ -135,9 +135,9 @@ - * Transmit descriptor, aligned to 16 bytes - */ - struct ftmac100_txdes { -- unsigned int txdes0; -- unsigned int txdes1; -- unsigned int txdes2; /* TXBUF_BADR */ -+ __le32 txdes0; -+ __le32 txdes1; -+ __le32 txdes2; /* TXBUF_BADR */ - unsigned int txdes3; /* not used by HW */ - } __attribute__ ((aligned(16))); - -@@ -156,9 +156,9 @@ struct ftmac100_txdes { - * Receive descriptor, aligned to 16 bytes - */ - struct ftmac100_rxdes { -- unsigned int rxdes0; -- unsigned int rxdes1; -- unsigned int rxdes2; /* RXBUF_BADR */ -+ __le32 rxdes0; -+ __le32 rxdes1; -+ __le32 rxdes2; /* RXBUF_BADR */ - unsigned int rxdes3; /* not used by HW */ - } __attribute__ ((aligned(16))); - --- -2.35.1 - diff --git a/queue-4.9/series b/queue-4.9/series index db5863bf175..4af3a7a943d 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -128,7 +128,6 @@ openvswitch-fix-double-reporting-of-drops-in-dropwat.patch openvswitch-fix-overreporting-of-drops-in-dropwatch.patch tcp-annotate-data-race-around-tcp_md5sig_pool_popula.patch xfrm-update-ipcomp_scratches-with-null-when-freed.patch -net-ftmac100-fix-endianness-related-issues-from-spar.patch bluetooth-l2cap-initialize-delayed-works-at-l2cap_ch.patch bluetooth-hci_sysfs-fix-attempting-to-call-device_ad.patch can-bcm-check-the-result-of-can_send-in-bcm_can_tx.patch diff --git a/queue-5.10/arm64-dts-qcom-ipq8074-fix-pcie-phy-serdes-size.patch b/queue-5.10/arm64-dts-qcom-ipq8074-fix-pcie-phy-serdes-size.patch deleted file mode 100644 index 81f5a298d0f..00000000000 --- a/queue-5.10/arm64-dts-qcom-ipq8074-fix-pcie-phy-serdes-size.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 33e91a10eb2ab48d69ac64438186f8d86de96d16 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Thu, 15 Sep 2022 16:34:30 +0200 -Subject: arm64: dts: qcom: ipq8074: fix PCIe PHY serdes size - -From: Johan Hovold - -[ Upstream commit ed22cc93abae68f9d3fc4957c20a1d902cf28882 ] - -The size of the PCIe PHY serdes register region is 0x1c4 and the -corresponding 'reg' property should specifically not include the -adjacent regions that are defined in the child node (e.g. tx and rx). - -Fixes: 33057e1672fe ("ARM: dts: ipq8074: Add pcie nodes") -Signed-off-by: Johan Hovold -Signed-off-by: Bjorn Andersson -Link: https://lore.kernel.org/r/20220915143431.19842-1-johan+linaro@kernel.org -Signed-off-by: Sasha Levin ---- - arch/arm64/boot/dts/qcom/ipq8074.dtsi | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/arch/arm64/boot/dts/qcom/ipq8074.dtsi b/arch/arm64/boot/dts/qcom/ipq8074.dtsi -index e8b3ecb591dd..ebf9ad93656d 100644 ---- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi -+++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi -@@ -169,7 +169,7 @@ - - pcie_qmp0: phy@86000 { - compatible = "qcom,ipq8074-qmp-pcie-phy"; -- reg = <0x00086000 0x1000>; -+ reg = <0x00086000 0x1c4>; - #address-cells = <1>; - #size-cells = <1>; - ranges; -@@ -197,7 +197,7 @@ - - pcie_qmp1: phy@8e000 { - compatible = "qcom,ipq8074-qmp-pcie-phy"; -- reg = <0x0008e000 0x1000>; -+ reg = <0x0008e000 0x1c4>; - #address-cells = <1>; - #size-cells = <1>; - ranges; --- -2.35.1 - diff --git a/queue-5.10/clk-qcom-apss-ipq6018-fix-apcs_alias0_clk_src.patch b/queue-5.10/clk-qcom-apss-ipq6018-fix-apcs_alias0_clk_src.patch deleted file mode 100644 index 25cd7d289de..00000000000 --- a/queue-5.10/clk-qcom-apss-ipq6018-fix-apcs_alias0_clk_src.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 4f43a797b5e79816361b2e41b09d3320ce3c4125 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 19 Aug 2022 00:06:21 +0200 -Subject: clk: qcom: apss-ipq6018: fix apcs_alias0_clk_src - -From: Robert Marko - -[ Upstream commit 43a56cbf2a38170b02db29654607575b1b4b5bc0 ] - -While working on IPQ8074 APSS driver it was discovered that IPQ6018 and -IPQ8074 use almost the same PLL and APSS clocks, however APSS driver is -currently broken. - -More precisely apcs_alias0_clk_src is broken, it was added as regmap_mux -clock. -However after debugging why it was always stuck at 800Mhz, it was figured -out that its not regmap_mux compatible at all. -It is a simple mux but it uses RCG2 register layout and control bits, so -utilize the new clk_rcg2_mux_closest_ops to correctly drive it while not -having to provide a dummy frequency table. - -While we are here, use ARRAY_SIZE for number of parents. - -Tested on IPQ6018-CP01-C1 reference board and multiple IPQ8074 boards. - -Fixes: 5e77b4ef1b19 ("clk: qcom: Add ipq6018 apss clock controller") -Signed-off-by: Robert Marko -Reviewed-by: Dmitry Baryshkov -Signed-off-by: Bjorn Andersson -Link: https://lore.kernel.org/r/20220818220628.339366-2-robimarko@gmail.com -Signed-off-by: Sasha Levin ---- - drivers/clk/qcom/apss-ipq6018.c | 13 ++++++------- - 1 file changed, 6 insertions(+), 7 deletions(-) - -diff --git a/drivers/clk/qcom/apss-ipq6018.c b/drivers/clk/qcom/apss-ipq6018.c -index d78ff2f310bf..be952d417ded 100644 ---- a/drivers/clk/qcom/apss-ipq6018.c -+++ b/drivers/clk/qcom/apss-ipq6018.c -@@ -16,7 +16,7 @@ - #include "clk-regmap.h" - #include "clk-branch.h" - #include "clk-alpha-pll.h" --#include "clk-regmap-mux.h" -+#include "clk-rcg.h" - - enum { - P_XO, -@@ -33,16 +33,15 @@ static const struct parent_map parents_apcs_alias0_clk_src_map[] = { - { P_APSS_PLL_EARLY, 5 }, - }; - --static struct clk_regmap_mux apcs_alias0_clk_src = { -- .reg = 0x0050, -- .width = 3, -- .shift = 7, -+static struct clk_rcg2 apcs_alias0_clk_src = { -+ .cmd_rcgr = 0x0050, -+ .hid_width = 5, - .parent_map = parents_apcs_alias0_clk_src_map, - .clkr.hw.init = &(struct clk_init_data){ - .name = "apcs_alias0_clk_src", - .parent_data = parents_apcs_alias0_clk_src, -- .num_parents = 2, -- .ops = &clk_regmap_mux_closest_ops, -+ .num_parents = ARRAY_SIZE(parents_apcs_alias0_clk_src), -+ .ops = &clk_rcg2_mux_closest_ops, - .flags = CLK_SET_RATE_PARENT, - }, - }; --- -2.35.1 - diff --git a/queue-5.10/clk-qcom-apss-ipq6018-mark-apcs_alias0_core_clk-as-c.patch b/queue-5.10/clk-qcom-apss-ipq6018-mark-apcs_alias0_core_clk-as-c.patch index a5c2d1bfcd9..2a124986633 100644 --- a/queue-5.10/clk-qcom-apss-ipq6018-mark-apcs_alias0_core_clk-as-c.patch +++ b/queue-5.10/clk-qcom-apss-ipq6018-mark-apcs_alias0_core_clk-as-c.patch @@ -21,14 +21,12 @@ Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220818220628.339366-3-robimarko@gmail.com Signed-off-by: Sasha Levin --- - drivers/clk/qcom/apss-ipq6018.c | 2 +- + drivers/clk/qcom/apss-ipq6018.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/drivers/clk/qcom/apss-ipq6018.c b/drivers/clk/qcom/apss-ipq6018.c -index be952d417ded..f2f502e2d5a4 100644 --- a/drivers/clk/qcom/apss-ipq6018.c +++ b/drivers/clk/qcom/apss-ipq6018.c -@@ -56,7 +56,7 @@ static struct clk_branch apcs_alias0_core_clk = { +@@ -57,7 +57,7 @@ static struct clk_branch apcs_alias0_cor .parent_hws = (const struct clk_hw *[]){ &apcs_alias0_clk_src.clkr.hw }, .num_parents = 1, @@ -37,6 +35,3 @@ index be952d417ded..f2f502e2d5a4 100644 .ops = &clk_branch2_ops, }, }, --- -2.35.1 - diff --git a/queue-5.10/clk-qcom-clk-rcg2-add-rcg2-mux-ops.patch b/queue-5.10/clk-qcom-clk-rcg2-add-rcg2-mux-ops.patch deleted file mode 100644 index 6aa91d045e6..00000000000 --- a/queue-5.10/clk-qcom-clk-rcg2-add-rcg2-mux-ops.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 16ec9ef8bb1218cdbee8476d90b89fbc0e5646f1 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 19 Aug 2022 00:06:20 +0200 -Subject: clk: qcom: clk-rcg2: add rcg2 mux ops - -From: Christian Marangi - -[ Upstream commit c5d2c96b3a7bd8987fad9957510034130037fccf ] - -An RCG may act as a mux that switch between 2 parents. -This is the case on IPQ6018 and IPQ8074 where the APCS core clk that feeds -the CPU cluster clock just switches between XO and the PLL that feeds it. - -Add the required ops to add support for this special configuration and use -the generic mux function to determine the rate. - -This way we dont have to keep a essentially dummy frequency table to use -RCG2 as a mux. - -Signed-off-by: Christian Marangi -Signed-off-by: Robert Marko -Reviewed-by: Dmitry Baryshkov -Signed-off-by: Bjorn Andersson -Link: https://lore.kernel.org/r/20220818220628.339366-1-robimarko@gmail.com -Stable-dep-of: 43a56cbf2a38 ("clk: qcom: apss-ipq6018: fix apcs_alias0_clk_src") -Signed-off-by: Sasha Levin ---- - drivers/clk/qcom/clk-rcg.h | 1 + - drivers/clk/qcom/clk-rcg2.c | 7 +++++++ - 2 files changed, 8 insertions(+) - -diff --git a/drivers/clk/qcom/clk-rcg.h b/drivers/clk/qcom/clk-rcg.h -index 86d2b8b90173..51d86f7af7e4 100644 ---- a/drivers/clk/qcom/clk-rcg.h -+++ b/drivers/clk/qcom/clk-rcg.h -@@ -155,6 +155,7 @@ struct clk_rcg2 { - - extern const struct clk_ops clk_rcg2_ops; - extern const struct clk_ops clk_rcg2_floor_ops; -+extern const struct clk_ops clk_rcg2_mux_closest_ops; - extern const struct clk_ops clk_edp_pixel_ops; - extern const struct clk_ops clk_byte_ops; - extern const struct clk_ops clk_byte2_ops; -diff --git a/drivers/clk/qcom/clk-rcg2.c b/drivers/clk/qcom/clk-rcg2.c -index 71a0d30cf44d..8d95bd35be56 100644 ---- a/drivers/clk/qcom/clk-rcg2.c -+++ b/drivers/clk/qcom/clk-rcg2.c -@@ -388,6 +388,13 @@ const struct clk_ops clk_rcg2_floor_ops = { - }; - EXPORT_SYMBOL_GPL(clk_rcg2_floor_ops); - -+const struct clk_ops clk_rcg2_mux_closest_ops = { -+ .determine_rate = __clk_mux_determine_rate_closest, -+ .get_parent = clk_rcg2_get_parent, -+ .set_parent = clk_rcg2_set_parent, -+}; -+EXPORT_SYMBOL_GPL(clk_rcg2_mux_closest_ops); -+ - struct frac_entry { - int num; - int den; --- -2.35.1 - diff --git a/queue-5.10/hid-uclogic-fix-warning-in-uclogic_rdesc_template_ap.patch b/queue-5.10/hid-uclogic-fix-warning-in-uclogic_rdesc_template_ap.patch deleted file mode 100644 index e69cc0712c0..00000000000 --- a/queue-5.10/hid-uclogic-fix-warning-in-uclogic_rdesc_template_ap.patch +++ /dev/null @@ -1,44 +0,0 @@ -From a76ad9e149101215d0334de93695474cbbfb1110 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 15 Aug 2022 16:27:06 +0200 -Subject: HID: uclogic: Fix warning in uclogic_rdesc_template_apply -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: José Expósito - -[ Upstream commit 609174edeb758d1e2d713e7ab4e09ea8d45aa4f7 ] - -Building with Sparse enabled prints this warning: - - warning: incorrect type in assignment (different base types) - expected signed int x - got restricted __le32 [usertype] - -Cast the return value of cpu_to_le32() to fix the warning. - -Fixes: 08177f4 ("HID: uclogic: merge hid-huion driver in hid-uclogic") -Signed-off-by: José Expósito -Signed-off-by: Jiri Kosina -Signed-off-by: Sasha Levin ---- - drivers/hid/hid-uclogic-rdesc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/hid/hid-uclogic-rdesc.c b/drivers/hid/hid-uclogic-rdesc.c -index 9d4b8ca77f91..bdf632cc7355 100644 ---- a/drivers/hid/hid-uclogic-rdesc.c -+++ b/drivers/hid/hid-uclogic-rdesc.c -@@ -851,7 +851,7 @@ __u8 *uclogic_rdesc_template_apply(const __u8 *template_ptr, - if (memcmp(p, pen_head, sizeof(pen_head)) == 0 && - p[sizeof(pen_head)] < param_num) { - v = param_list[p[sizeof(pen_head)]]; -- put_unaligned(cpu_to_le32(v), (s32 *)p); -+ put_unaligned((__force u32)cpu_to_le32(v), (s32 *)p); - p += sizeof(pen_head) + 1; - } else { - p++; --- -2.35.1 - diff --git a/queue-5.10/hid-uclogic-make-template-placeholder-ids-generic.patch b/queue-5.10/hid-uclogic-make-template-placeholder-ids-generic.patch deleted file mode 100644 index fdb0dc88393..00000000000 --- a/queue-5.10/hid-uclogic-make-template-placeholder-ids-generic.patch +++ /dev/null @@ -1,132 +0,0 @@ -From 19520242f5e333be327ebc7f1d3281cce61794cc Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Sat, 11 Jun 2022 13:39:11 +0200 -Subject: HID: uclogic: Make template placeholder IDs generic -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: José Expósito - -[ Upstream commit 76e645be7ebecbf39ab2edd949ea7f1757f58900 ] - -Up until now, the report descriptor template parameter IDs were only -used with pen report descriptors and they were named accordingly. - -Rename the enum and the total number of IDs to make them interface -agnostic. - -Refactor, no functional changes. - -Signed-off-by: José Expósito -Signed-off-by: Jiri Kosina -Stable-dep-of: 609174edeb75 ("HID: uclogic: Fix warning in uclogic_rdesc_template_apply") -Signed-off-by: Sasha Levin ---- - drivers/hid/hid-uclogic-params.c | 4 ++-- - drivers/hid/hid-uclogic-rdesc.c | 14 +++++++------- - drivers/hid/hid-uclogic-rdesc.h | 10 +++++----- - 3 files changed, 14 insertions(+), 14 deletions(-) - -diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c -index 38f9bbad81c1..59a01f438e0a 100644 ---- a/drivers/hid/hid-uclogic-params.c -+++ b/drivers/hid/hid-uclogic-params.c -@@ -148,7 +148,7 @@ static int uclogic_params_pen_init_v1(struct uclogic_params_pen *pen, - const int len = 12; - s32 resolution; - /* Pen report descriptor template parameters */ -- s32 desc_params[UCLOGIC_RDESC_PEN_PH_ID_NUM]; -+ s32 desc_params[UCLOGIC_RDESC_PH_ID_NUM]; - __u8 *desc_ptr = NULL; - - /* Check arguments */ -@@ -276,7 +276,7 @@ static int uclogic_params_pen_init_v2(struct uclogic_params_pen *pen, - const int len = 18; - s32 resolution; - /* Pen report descriptor template parameters */ -- s32 desc_params[UCLOGIC_RDESC_PEN_PH_ID_NUM]; -+ s32 desc_params[UCLOGIC_RDESC_PH_ID_NUM]; - __u8 *desc_ptr = NULL; - - /* Check arguments */ -diff --git a/drivers/hid/hid-uclogic-rdesc.c b/drivers/hid/hid-uclogic-rdesc.c -index bf5da6de7bba..9d4b8ca77f91 100644 ---- a/drivers/hid/hid-uclogic-rdesc.c -+++ b/drivers/hid/hid-uclogic-rdesc.c -@@ -821,7 +821,7 @@ const size_t uclogic_rdesc_xppen_deco01_frame_size = - * uclogic_rdesc_template_apply() - apply report descriptor parameters to a - * report descriptor template, creating a report descriptor. Copies the - * template over to the new report descriptor and replaces every occurrence of -- * UCLOGIC_RDESC_PH_HEAD, followed by an index byte, with the value from the -+ * UCLOGIC_RDESC_PEN_PH_HEAD, followed by an index byte, with the value from the - * parameter list at that index. - * - * @template_ptr: Pointer to the template buffer. -@@ -838,7 +838,7 @@ __u8 *uclogic_rdesc_template_apply(const __u8 *template_ptr, - const s32 *param_list, - size_t param_num) - { -- static const __u8 head[] = {UCLOGIC_RDESC_PH_HEAD}; -+ static const __u8 pen_head[] = {UCLOGIC_RDESC_PEN_PH_HEAD}; - __u8 *rdesc_ptr; - __u8 *p; - s32 v; -@@ -847,12 +847,12 @@ __u8 *uclogic_rdesc_template_apply(const __u8 *template_ptr, - if (rdesc_ptr == NULL) - return NULL; - -- for (p = rdesc_ptr; p + sizeof(head) < rdesc_ptr + template_size;) { -- if (memcmp(p, head, sizeof(head)) == 0 && -- p[sizeof(head)] < param_num) { -- v = param_list[p[sizeof(head)]]; -+ for (p = rdesc_ptr; p + sizeof(pen_head) < rdesc_ptr + template_size;) { -+ if (memcmp(p, pen_head, sizeof(pen_head)) == 0 && -+ p[sizeof(pen_head)] < param_num) { -+ v = param_list[p[sizeof(pen_head)]]; - put_unaligned(cpu_to_le32(v), (s32 *)p); -- p += sizeof(head) + 1; -+ p += sizeof(pen_head) + 1; - } else { - p++; - } -diff --git a/drivers/hid/hid-uclogic-rdesc.h b/drivers/hid/hid-uclogic-rdesc.h -index c5da51055af3..1bb9c1220ea7 100644 ---- a/drivers/hid/hid-uclogic-rdesc.h -+++ b/drivers/hid/hid-uclogic-rdesc.h -@@ -81,7 +81,7 @@ extern __u8 uclogic_rdesc_twha60_fixed1_arr[]; - extern const size_t uclogic_rdesc_twha60_fixed1_size; - - /* Report descriptor template placeholder head */ --#define UCLOGIC_RDESC_PH_HEAD 0xFE, 0xED, 0x1D -+#define UCLOGIC_RDESC_PEN_PH_HEAD 0xFE, 0xED, 0x1D - - /* Apply report descriptor parameters to a report descriptor template */ - extern __u8 *uclogic_rdesc_template_apply(const __u8 *template_ptr, -@@ -89,19 +89,19 @@ extern __u8 *uclogic_rdesc_template_apply(const __u8 *template_ptr, - const s32 *param_list, - size_t param_num); - --/* Pen report descriptor template placeholder IDs */ --enum uclogic_rdesc_pen_ph_id { -+/* Report descriptor template placeholder IDs */ -+enum uclogic_rdesc_ph_id { - UCLOGIC_RDESC_PEN_PH_ID_X_LM, - UCLOGIC_RDESC_PEN_PH_ID_X_PM, - UCLOGIC_RDESC_PEN_PH_ID_Y_LM, - UCLOGIC_RDESC_PEN_PH_ID_Y_PM, - UCLOGIC_RDESC_PEN_PH_ID_PRESSURE_LM, -- UCLOGIC_RDESC_PEN_PH_ID_NUM -+ UCLOGIC_RDESC_PH_ID_NUM - }; - - /* Report descriptor pen template placeholder */ - #define UCLOGIC_RDESC_PEN_PH(_ID) \ -- UCLOGIC_RDESC_PH_HEAD, UCLOGIC_RDESC_PEN_PH_ID_##_ID -+ UCLOGIC_RDESC_PEN_PH_HEAD, UCLOGIC_RDESC_PEN_PH_ID_##_ID - - /* Report ID for v1 pen reports */ - #define UCLOGIC_RDESC_PEN_V1_ID 0x07 --- -2.35.1 - diff --git a/queue-5.10/libbpf-fix-overrun-in-netlink-attribute-iteration.patch b/queue-5.10/libbpf-fix-overrun-in-netlink-attribute-iteration.patch deleted file mode 100644 index 9f11dcc5b2e..00000000000 --- a/queue-5.10/libbpf-fix-overrun-in-netlink-attribute-iteration.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 71d964580399a616a710452a3029771756c752e7 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 30 Sep 2022 17:07:08 +0800 -Subject: libbpf: Fix overrun in netlink attribute iteration - -From: Xin Liu - -[ Upstream commit 51e05a8cf8eb34da7473823b7f236a77adfef0b4 ] - -I accidentally found that a change in commit 1045b03e07d8 ("netlink: fix -overrun in attribute iteration") was not synchronized to the function -`nla_ok` in tools/lib/bpf/nlattr.c, I think it is necessary to modify, -this patch will do it. - -Signed-off-by: Xin Liu -Signed-off-by: Andrii Nakryiko -Link: https://lore.kernel.org/bpf/20220930090708.62394-1-liuxin350@huawei.com -Signed-off-by: Sasha Levin ---- - tools/lib/bpf/nlattr.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/lib/bpf/nlattr.c b/tools/lib/bpf/nlattr.c -index b607fa9852b1..8f00a2ee5762 100644 ---- a/tools/lib/bpf/nlattr.c -+++ b/tools/lib/bpf/nlattr.c -@@ -32,7 +32,7 @@ static struct nlattr *nla_next(const struct nlattr *nla, int *remaining) - - static int nla_ok(const struct nlattr *nla, int remaining) - { -- return remaining >= sizeof(*nla) && -+ return remaining >= (int)sizeof(*nla) && - nla->nla_len >= sizeof(*nla) && - nla->nla_len <= remaining; - } --- -2.35.1 - diff --git a/queue-5.10/net-ftmac100-fix-endianness-related-issues-from-spar.patch b/queue-5.10/net-ftmac100-fix-endianness-related-issues-from-spar.patch deleted file mode 100644 index 39fc6d47167..00000000000 --- a/queue-5.10/net-ftmac100-fix-endianness-related-issues-from-spar.patch +++ /dev/null @@ -1,67 +0,0 @@ -From ad00610fb05f28a177eb3eba499ff8602bbef5f5 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 2 Sep 2022 14:37:49 +0300 -Subject: net: ftmac100: fix endianness-related issues from 'sparse' - -From: Sergei Antonov - -[ Upstream commit 9df696b3b3a4c96c3219eb87c7bf03fb50e490b8 ] - -Sparse found a number of endianness-related issues of these kinds: - -.../ftmac100.c:192:32: warning: restricted __le32 degrades to integer - -.../ftmac100.c:208:23: warning: incorrect type in assignment (different base types) -.../ftmac100.c:208:23: expected unsigned int rxdes0 -.../ftmac100.c:208:23: got restricted __le32 [usertype] - -.../ftmac100.c:249:23: warning: invalid assignment: &= -.../ftmac100.c:249:23: left side has type unsigned int -.../ftmac100.c:249:23: right side has type restricted __le32 - -.../ftmac100.c:527:16: warning: cast to restricted __le32 - -Change type of some fields from 'unsigned int' to '__le32' to fix it. - -Signed-off-by: Sergei Antonov -Reviewed-by: Andrew Lunn -Link: https://lore.kernel.org/r/20220902113749.1408562-1-saproj@gmail.com -Signed-off-by: Paolo Abeni -Signed-off-by: Sasha Levin ---- - drivers/net/ethernet/faraday/ftmac100.h | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/drivers/net/ethernet/faraday/ftmac100.h b/drivers/net/ethernet/faraday/ftmac100.h -index fe986f1673fc..8af32f9070f4 100644 ---- a/drivers/net/ethernet/faraday/ftmac100.h -+++ b/drivers/net/ethernet/faraday/ftmac100.h -@@ -122,9 +122,9 @@ - * Transmit descriptor, aligned to 16 bytes - */ - struct ftmac100_txdes { -- unsigned int txdes0; -- unsigned int txdes1; -- unsigned int txdes2; /* TXBUF_BADR */ -+ __le32 txdes0; -+ __le32 txdes1; -+ __le32 txdes2; /* TXBUF_BADR */ - unsigned int txdes3; /* not used by HW */ - } __attribute__ ((aligned(16))); - -@@ -143,9 +143,9 @@ struct ftmac100_txdes { - * Receive descriptor, aligned to 16 bytes - */ - struct ftmac100_rxdes { -- unsigned int rxdes0; -- unsigned int rxdes1; -- unsigned int rxdes2; /* RXBUF_BADR */ -+ __le32 rxdes0; -+ __le32 rxdes1; -+ __le32 rxdes2; /* RXBUF_BADR */ - unsigned int rxdes3; /* not used by HW */ - } __attribute__ ((aligned(16))); - --- -2.35.1 - diff --git a/queue-5.10/selftests-cpu-hotplug-use-return-instead-of-exit.patch b/queue-5.10/selftests-cpu-hotplug-use-return-instead-of-exit.patch deleted file mode 100644 index ae17358f505..00000000000 --- a/queue-5.10/selftests-cpu-hotplug-use-return-instead-of-exit.patch +++ /dev/null @@ -1,76 +0,0 @@ -From f317e539879c89c5e23d871693fd551ebfc1b4ae Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 5 Sep 2022 21:36:12 +0800 -Subject: selftests/cpu-hotplug: Use return instead of exit - -From: Zhao Gongyi - -[ Upstream commit 972cf4ce51ef5532d56822af17defb148aac0ccb ] - -Some cpus will be left in offline state when online -function exits in some error conditions. Use return -instead of exit to fix it. - -Signed-off-by: Zhao Gongyi -Signed-off-by: Shuah Khan -Signed-off-by: Sasha Levin ---- - .../selftests/cpu-hotplug/cpu-on-off-test.sh | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -diff --git a/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh b/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh -index 0d26b5e3f966..940b68c940bb 100755 ---- a/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh -+++ b/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh -@@ -4,6 +4,7 @@ - SYSFS= - # Kselftest framework requirement - SKIP code is 4. - ksft_skip=4 -+retval=0 - - prerequisite() - { -@@ -102,10 +103,10 @@ online_cpu_expect_success() - - if ! online_cpu $cpu; then - echo $FUNCNAME $cpu: unexpected fail >&2 -- exit 1 -+ retval=1 - elif ! cpu_is_online $cpu; then - echo $FUNCNAME $cpu: unexpected offline >&2 -- exit 1 -+ retval=1 - fi - } - -@@ -128,10 +129,10 @@ offline_cpu_expect_success() - - if ! offline_cpu $cpu; then - echo $FUNCNAME $cpu: unexpected fail >&2 -- exit 1 -+ retval=1 - elif ! cpu_is_offline $cpu; then - echo $FUNCNAME $cpu: unexpected offline >&2 -- exit 1 -+ retval=1 - fi - } - -@@ -201,7 +202,7 @@ if [ $allcpus -eq 0 ]; then - offline_cpu_expect_success $present_max - online_cpu $present_max - fi -- exit 0 -+ exit $retval - else - echo "Full scope test: all hotplug cpus" - echo -e "\t online all offline cpus" -@@ -291,3 +292,5 @@ done - - echo 0 > $NOTIFIER_ERR_INJECT_DIR/actions/CPU_DOWN_PREPARE/error - /sbin/modprobe -q -r cpu-notifier-error-inject -+ -+exit $retval --- -2.35.1 - diff --git a/queue-5.10/series b/queue-5.10/series index 661dbd4dcac..836887a4f68 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -181,7 +181,6 @@ arm-dts-kirkwood-lsxl-remove-first-ethernet-port.patch ia64-export-memory_add_physaddr_to_nid-to-fix-cxl-bu.patch soc-tegra-fuse-drop-kconfig-dependency-on-tegra20_ap.patch arm64-dts-qcom-fix-ipq8074-pcie-phy-nodes.patch -arm64-dts-qcom-ipq8074-fix-pcie-phy-serdes-size.patch arm-dts-exynos-correct-s5k6a3-reset-polarity-on-mida.patch arm-drop-cmdline_-dependency-on-atags.patch arm64-ftrace-fix-module-plts-with-mcount.patch @@ -205,8 +204,6 @@ clk-sprd-hold-reference-returned-by-of_get_parent.patch clk-tegra-fix-refcount-leak-in-tegra210_clock_init.patch clk-tegra-fix-refcount-leak-in-tegra114_clock_init.patch clk-tegra20-fix-refcount-leak-in-tegra20_clock_init.patch -hid-uclogic-make-template-placeholder-ids-generic.patch -hid-uclogic-fix-warning-in-uclogic_rdesc_template_ap.patch hsi-omap_ssi-fix-refcount-leak-in-ssi_probe.patch hsi-omap_ssi_port-fix-dma_map_sg-error-check.patch clk-qcom-gcc-sdm660-move-parent-tables-after-plls.patch @@ -253,8 +250,6 @@ firmware-google-test-spinlock-on-panic-path-to-avoid.patch serial-8250-fix-restoring-termios-speed-after-suspen.patch scsi-libsas-fix-use-after-free-bug-in-smp_execute_ta.patch scsi-iscsi-iscsi_tcp-fix-null-ptr-deref-while-callin.patch -clk-qcom-clk-rcg2-add-rcg2-mux-ops.patch -clk-qcom-apss-ipq6018-fix-apcs_alias0_clk_src.patch clk-qcom-apss-ipq6018-mark-apcs_alias0_core_clk-as-c.patch fsi-core-check-error-number-after-calling-ida_simple.patch mfd-intel_soc_pmic-fix-an-error-handling-path-in-int.patch @@ -335,7 +330,6 @@ tcp-annotate-data-race-around-tcp_md5sig_pool_popula.patch micrel-ksz8851-fixes-struct-pointer-issue.patch wifi-ath9k-avoid-uninit-memory-read-in-ath9k_htc_rx_.patch xfrm-update-ipcomp_scratches-with-null-when-freed.patch -net-ftmac100-fix-endianness-related-issues-from-spar.patch wifi-brcmfmac-fix-use-after-free-bug-in-brcmf_netdev.patch regulator-core-prevent-integer-underflow.patch bluetooth-l2cap-initialize-delayed-works-at-l2cap_ch.patch @@ -348,7 +342,6 @@ wifi-rt2x00-set-soc-wmac-clock-register.patch wifi-rt2x00-correctly-set-bbp-register-86-for-mt7620.patch net-if-sock-is-dead-don-t-access-sock-s-sk_wq-in-sk_.patch bluetooth-l2cap-fix-user-after-free.patch -libbpf-fix-overrun-in-netlink-attribute-iteration.patch r8152-rate-limit-overflow-messages.patch drm-nouveau-nouveau_bo-fix-potential-memory-leak-in-.patch drm-use-size_t-type-for-len-variable-in-drm_copy_fie.patch @@ -378,7 +371,6 @@ arm-dts-imx6sx-add-missing-properties-for-sram.patch kselftest-arm64-fix-validatation-termination-record-.patch arm64-dts-imx8mq-librem5-add-bq25895-as-max17055-s-p.patch btrfs-scrub-try-to-fix-super-block-errors.patch -selftests-cpu-hotplug-use-return-instead-of-exit.patch clk-zynqmp-fix-stack-out-of-bounds-in-strncpy.patch media-cx88-fix-a-null-ptr-deref-bug-in-buffer_prepar.patch clk-zynqmp-pll-rectify-rate-rounding-in-zynqmp_pll_r.patch diff --git a/queue-5.15/arm64-dts-qcom-sc7280-cleanup-the-lpasscc-node.patch b/queue-5.15/arm64-dts-qcom-sc7280-cleanup-the-lpasscc-node.patch deleted file mode 100644 index 32f2fc1b0ae..00000000000 --- a/queue-5.15/arm64-dts-qcom-sc7280-cleanup-the-lpasscc-node.patch +++ /dev/null @@ -1,42 +0,0 @@ -From fbd40c1cd9ba16a24ba64085b7d71c81c01ade89 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Wed, 10 Aug 2022 10:35:07 +0530 -Subject: arm64: dts: qcom: sc7280: Cleanup the lpasscc node - -From: Satya Priya - -[ Upstream commit 8c7ebabd2e3f33ef24378d3cac00d3e59886cecb ] - -Remove "cc" regmap from lpasscc node which is overlapping -with the lpass_aon regmap. - -Fixes: 422a295221bb ("arm64: dts: qcom: sc7280: Add clock controller nodes") -Signed-off-by: Satya Priya -Signed-off-by: Taniya Das -Reviewed-by: Stephen Boyd -Signed-off-by: Bjorn Andersson -Link: https://lore.kernel.org/r/1660107909-27947-2-git-send-email-quic_c_skakit@quicinc.com -Signed-off-by: Sasha Levin ---- - arch/arm64/boot/dts/qcom/sc7280.dtsi | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi -index b795a9993cc1..9405b405b3fb 100644 ---- a/arch/arm64/boot/dts/qcom/sc7280.dtsi -+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi -@@ -634,9 +634,8 @@ - lpasscc: lpasscc@3000000 { - compatible = "qcom,sc7280-lpasscc"; - reg = <0 0x03000000 0 0x40>, -- <0 0x03c04000 0 0x4>, -- <0 0x03389000 0 0x24>; -- reg-names = "qdsp6ss", "top_cc", "cc"; -+ <0 0x03c04000 0 0x4>; -+ reg-names = "qdsp6ss", "top_cc"; - clocks = <&gcc GCC_CFG_NOC_LPASS_CLK>; - clock-names = "iface"; - #clock-cells = <1>; --- -2.35.1 - diff --git a/queue-5.15/arm64-dts-qcom-sc7280-idp-correct-adc-channel-node-n.patch b/queue-5.15/arm64-dts-qcom-sc7280-idp-correct-adc-channel-node-n.patch deleted file mode 100644 index 70c461260f0..00000000000 --- a/queue-5.15/arm64-dts-qcom-sc7280-idp-correct-adc-channel-node-n.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 01af1fb68d790b9e272142c8153123340ea68b64 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Sun, 28 Aug 2022 11:43:38 +0300 -Subject: arm64: dts: qcom: sc7280-idp: correct ADC channel node name and unit - address - -From: Krzysztof Kozlowski - -[ Upstream commit 5589ffb2da2a66988ab3a68334dad3e68b42e3a9 ] - -Correct SPMI PMIC VADC channel node name: -1. Use hyphens instead of underscores, -2. Add missing unit address. - -This fixes `make dtbs_check` warnings like: - - qcom/sc7280-idp.dtb: pmic@0: adc@3100: 'pmk8350_die_temp', 'pmr735a_die_temp' do not match any of the regexes: '^.*@[0-9a-f]+$', 'pinctrl-[0-9]+' - -Signed-off-by: Krzysztof Kozlowski -Reviewed-by: Stephen Boyd -Reviewed-by: Vinod Koul -Reviewed-by: David Heidelberg -Signed-off-by: Bjorn Andersson -Link: https://lore.kernel.org/r/20220828084341.112146-12-krzysztof.kozlowski@linaro.org -Signed-off-by: Sasha Levin ---- - arch/arm64/boot/dts/qcom/sc7280-idp.dts | 2 +- - arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dts b/arch/arm64/boot/dts/qcom/sc7280-idp.dts -index 64fc22aff33d..0b4bcc34b794 100644 ---- a/arch/arm64/boot/dts/qcom/sc7280-idp.dts -+++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dts -@@ -62,7 +62,7 @@ - }; - - &pmk8350_vadc { -- pmr735a_die_temp { -+ pmr735a-die-temp@403 { - reg = ; - label = "pmr735a_die_temp"; - qcom,pre-scaling = <1 1>; -diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi -index 371a2a9dcf7a..1948b8011d2b 100644 ---- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi -+++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi -@@ -200,7 +200,7 @@ - }; - - &pmk8350_vadc { -- pmk8350_die_temp { -+ pmk8350-die-temp@3 { - reg = ; - label = "pmk8350_die_temp"; - qcom,pre-scaling = <1 1>; --- -2.35.1 - diff --git a/queue-5.15/clk-qcom-apss-ipq6018-fix-apcs_alias0_clk_src.patch b/queue-5.15/clk-qcom-apss-ipq6018-fix-apcs_alias0_clk_src.patch deleted file mode 100644 index acfe96d10b9..00000000000 --- a/queue-5.15/clk-qcom-apss-ipq6018-fix-apcs_alias0_clk_src.patch +++ /dev/null @@ -1,73 +0,0 @@ -From da12f6c12a5451f31557ef3890da206b345074b7 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 19 Aug 2022 00:06:21 +0200 -Subject: clk: qcom: apss-ipq6018: fix apcs_alias0_clk_src - -From: Robert Marko - -[ Upstream commit 43a56cbf2a38170b02db29654607575b1b4b5bc0 ] - -While working on IPQ8074 APSS driver it was discovered that IPQ6018 and -IPQ8074 use almost the same PLL and APSS clocks, however APSS driver is -currently broken. - -More precisely apcs_alias0_clk_src is broken, it was added as regmap_mux -clock. -However after debugging why it was always stuck at 800Mhz, it was figured -out that its not regmap_mux compatible at all. -It is a simple mux but it uses RCG2 register layout and control bits, so -utilize the new clk_rcg2_mux_closest_ops to correctly drive it while not -having to provide a dummy frequency table. - -While we are here, use ARRAY_SIZE for number of parents. - -Tested on IPQ6018-CP01-C1 reference board and multiple IPQ8074 boards. - -Fixes: 5e77b4ef1b19 ("clk: qcom: Add ipq6018 apss clock controller") -Signed-off-by: Robert Marko -Reviewed-by: Dmitry Baryshkov -Signed-off-by: Bjorn Andersson -Link: https://lore.kernel.org/r/20220818220628.339366-2-robimarko@gmail.com -Signed-off-by: Sasha Levin ---- - drivers/clk/qcom/apss-ipq6018.c | 13 ++++++------- - 1 file changed, 6 insertions(+), 7 deletions(-) - -diff --git a/drivers/clk/qcom/apss-ipq6018.c b/drivers/clk/qcom/apss-ipq6018.c -index d78ff2f310bf..be952d417ded 100644 ---- a/drivers/clk/qcom/apss-ipq6018.c -+++ b/drivers/clk/qcom/apss-ipq6018.c -@@ -16,7 +16,7 @@ - #include "clk-regmap.h" - #include "clk-branch.h" - #include "clk-alpha-pll.h" --#include "clk-regmap-mux.h" -+#include "clk-rcg.h" - - enum { - P_XO, -@@ -33,16 +33,15 @@ static const struct parent_map parents_apcs_alias0_clk_src_map[] = { - { P_APSS_PLL_EARLY, 5 }, - }; - --static struct clk_regmap_mux apcs_alias0_clk_src = { -- .reg = 0x0050, -- .width = 3, -- .shift = 7, -+static struct clk_rcg2 apcs_alias0_clk_src = { -+ .cmd_rcgr = 0x0050, -+ .hid_width = 5, - .parent_map = parents_apcs_alias0_clk_src_map, - .clkr.hw.init = &(struct clk_init_data){ - .name = "apcs_alias0_clk_src", - .parent_data = parents_apcs_alias0_clk_src, -- .num_parents = 2, -- .ops = &clk_regmap_mux_closest_ops, -+ .num_parents = ARRAY_SIZE(parents_apcs_alias0_clk_src), -+ .ops = &clk_rcg2_mux_closest_ops, - .flags = CLK_SET_RATE_PARENT, - }, - }; --- -2.35.1 - diff --git a/queue-5.15/clk-qcom-apss-ipq6018-mark-apcs_alias0_core_clk-as-c.patch b/queue-5.15/clk-qcom-apss-ipq6018-mark-apcs_alias0_core_clk-as-c.patch index de928ff2d3a..bdd8e6359a0 100644 --- a/queue-5.15/clk-qcom-apss-ipq6018-mark-apcs_alias0_core_clk-as-c.patch +++ b/queue-5.15/clk-qcom-apss-ipq6018-mark-apcs_alias0_core_clk-as-c.patch @@ -21,14 +21,12 @@ Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220818220628.339366-3-robimarko@gmail.com Signed-off-by: Sasha Levin --- - drivers/clk/qcom/apss-ipq6018.c | 2 +- + drivers/clk/qcom/apss-ipq6018.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/drivers/clk/qcom/apss-ipq6018.c b/drivers/clk/qcom/apss-ipq6018.c -index be952d417ded..f2f502e2d5a4 100644 --- a/drivers/clk/qcom/apss-ipq6018.c +++ b/drivers/clk/qcom/apss-ipq6018.c -@@ -56,7 +56,7 @@ static struct clk_branch apcs_alias0_core_clk = { +@@ -57,7 +57,7 @@ static struct clk_branch apcs_alias0_cor .parent_hws = (const struct clk_hw *[]){ &apcs_alias0_clk_src.clkr.hw }, .num_parents = 1, @@ -37,6 +35,3 @@ index be952d417ded..f2f502e2d5a4 100644 .ops = &clk_branch2_ops, }, }, --- -2.35.1 - diff --git a/queue-5.15/clk-qcom-clk-rcg2-add-rcg2-mux-ops.patch b/queue-5.15/clk-qcom-clk-rcg2-add-rcg2-mux-ops.patch deleted file mode 100644 index 0a8808a1a20..00000000000 --- a/queue-5.15/clk-qcom-clk-rcg2-add-rcg2-mux-ops.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 17f9bdb3638b4bbdcff8366c2afcfb8a22cb2db4 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 19 Aug 2022 00:06:20 +0200 -Subject: clk: qcom: clk-rcg2: add rcg2 mux ops - -From: Christian Marangi - -[ Upstream commit c5d2c96b3a7bd8987fad9957510034130037fccf ] - -An RCG may act as a mux that switch between 2 parents. -This is the case on IPQ6018 and IPQ8074 where the APCS core clk that feeds -the CPU cluster clock just switches between XO and the PLL that feeds it. - -Add the required ops to add support for this special configuration and use -the generic mux function to determine the rate. - -This way we dont have to keep a essentially dummy frequency table to use -RCG2 as a mux. - -Signed-off-by: Christian Marangi -Signed-off-by: Robert Marko -Reviewed-by: Dmitry Baryshkov -Signed-off-by: Bjorn Andersson -Link: https://lore.kernel.org/r/20220818220628.339366-1-robimarko@gmail.com -Stable-dep-of: 43a56cbf2a38 ("clk: qcom: apss-ipq6018: fix apcs_alias0_clk_src") -Signed-off-by: Sasha Levin ---- - drivers/clk/qcom/clk-rcg.h | 1 + - drivers/clk/qcom/clk-rcg2.c | 7 +++++++ - 2 files changed, 8 insertions(+) - -diff --git a/drivers/clk/qcom/clk-rcg.h b/drivers/clk/qcom/clk-rcg.h -index 99efcc7f8d88..248115a018bc 100644 ---- a/drivers/clk/qcom/clk-rcg.h -+++ b/drivers/clk/qcom/clk-rcg.h -@@ -164,6 +164,7 @@ struct clk_rcg2_gfx3d { - - extern const struct clk_ops clk_rcg2_ops; - extern const struct clk_ops clk_rcg2_floor_ops; -+extern const struct clk_ops clk_rcg2_mux_closest_ops; - extern const struct clk_ops clk_edp_pixel_ops; - extern const struct clk_ops clk_byte_ops; - extern const struct clk_ops clk_byte2_ops; -diff --git a/drivers/clk/qcom/clk-rcg2.c b/drivers/clk/qcom/clk-rcg2.c -index c3823cc32edc..fdbbda1f2ba4 100644 ---- a/drivers/clk/qcom/clk-rcg2.c -+++ b/drivers/clk/qcom/clk-rcg2.c -@@ -477,6 +477,13 @@ const struct clk_ops clk_rcg2_floor_ops = { - }; - EXPORT_SYMBOL_GPL(clk_rcg2_floor_ops); - -+const struct clk_ops clk_rcg2_mux_closest_ops = { -+ .determine_rate = __clk_mux_determine_rate_closest, -+ .get_parent = clk_rcg2_get_parent, -+ .set_parent = clk_rcg2_set_parent, -+}; -+EXPORT_SYMBOL_GPL(clk_rcg2_mux_closest_ops); -+ - struct frac_entry { - int num; - int den; --- -2.35.1 - diff --git a/queue-5.15/hid-uclogic-fix-warning-in-uclogic_rdesc_template_ap.patch b/queue-5.15/hid-uclogic-fix-warning-in-uclogic_rdesc_template_ap.patch deleted file mode 100644 index 8dd3a85f4ad..00000000000 --- a/queue-5.15/hid-uclogic-fix-warning-in-uclogic_rdesc_template_ap.patch +++ /dev/null @@ -1,44 +0,0 @@ -From b624ef90477250b97b157e8b9d77dd94bbdc9406 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 15 Aug 2022 16:27:06 +0200 -Subject: HID: uclogic: Fix warning in uclogic_rdesc_template_apply -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: José Expósito - -[ Upstream commit 609174edeb758d1e2d713e7ab4e09ea8d45aa4f7 ] - -Building with Sparse enabled prints this warning: - - warning: incorrect type in assignment (different base types) - expected signed int x - got restricted __le32 [usertype] - -Cast the return value of cpu_to_le32() to fix the warning. - -Fixes: 08177f4 ("HID: uclogic: merge hid-huion driver in hid-uclogic") -Signed-off-by: José Expósito -Signed-off-by: Jiri Kosina -Signed-off-by: Sasha Levin ---- - drivers/hid/hid-uclogic-rdesc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/hid/hid-uclogic-rdesc.c b/drivers/hid/hid-uclogic-rdesc.c -index eb25e397a822..ef50116a1839 100644 ---- a/drivers/hid/hid-uclogic-rdesc.c -+++ b/drivers/hid/hid-uclogic-rdesc.c -@@ -851,7 +851,7 @@ __u8 *uclogic_rdesc_template_apply(const __u8 *template_ptr, - if (memcmp(p, pen_head, sizeof(pen_head)) == 0 && - p[sizeof(pen_head)] < param_num) { - v = param_list[p[sizeof(pen_head)]]; -- put_unaligned(cpu_to_le32(v), (s32 *)p); -+ put_unaligned((__force u32)cpu_to_le32(v), (s32 *)p); - p += sizeof(pen_head) + 1; - } else { - p++; --- -2.35.1 - diff --git a/queue-5.15/hid-uclogic-make-template-placeholder-ids-generic.patch b/queue-5.15/hid-uclogic-make-template-placeholder-ids-generic.patch deleted file mode 100644 index a3c3abdd06c..00000000000 --- a/queue-5.15/hid-uclogic-make-template-placeholder-ids-generic.patch +++ /dev/null @@ -1,132 +0,0 @@ -From bb797030978882a83483843db2a0bdaa9f688ed4 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Sat, 11 Jun 2022 13:39:11 +0200 -Subject: HID: uclogic: Make template placeholder IDs generic -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: José Expósito - -[ Upstream commit 76e645be7ebecbf39ab2edd949ea7f1757f58900 ] - -Up until now, the report descriptor template parameter IDs were only -used with pen report descriptors and they were named accordingly. - -Rename the enum and the total number of IDs to make them interface -agnostic. - -Refactor, no functional changes. - -Signed-off-by: José Expósito -Signed-off-by: Jiri Kosina -Stable-dep-of: 609174edeb75 ("HID: uclogic: Fix warning in uclogic_rdesc_template_apply") -Signed-off-by: Sasha Levin ---- - drivers/hid/hid-uclogic-params.c | 4 ++-- - drivers/hid/hid-uclogic-rdesc.c | 14 +++++++------- - drivers/hid/hid-uclogic-rdesc.h | 10 +++++----- - 3 files changed, 14 insertions(+), 14 deletions(-) - -diff --git a/drivers/hid/hid-uclogic-params.c b/drivers/hid/hid-uclogic-params.c -index 3e70f969fb84..1b056ca154ac 100644 ---- a/drivers/hid/hid-uclogic-params.c -+++ b/drivers/hid/hid-uclogic-params.c -@@ -149,7 +149,7 @@ static int uclogic_params_pen_init_v1(struct uclogic_params_pen *pen, - const int len = 12; - s32 resolution; - /* Pen report descriptor template parameters */ -- s32 desc_params[UCLOGIC_RDESC_PEN_PH_ID_NUM]; -+ s32 desc_params[UCLOGIC_RDESC_PH_ID_NUM]; - __u8 *desc_ptr = NULL; - - /* Check arguments */ -@@ -277,7 +277,7 @@ static int uclogic_params_pen_init_v2(struct uclogic_params_pen *pen, - const int len = 18; - s32 resolution; - /* Pen report descriptor template parameters */ -- s32 desc_params[UCLOGIC_RDESC_PEN_PH_ID_NUM]; -+ s32 desc_params[UCLOGIC_RDESC_PH_ID_NUM]; - __u8 *desc_ptr = NULL; - - /* Check arguments */ -diff --git a/drivers/hid/hid-uclogic-rdesc.c b/drivers/hid/hid-uclogic-rdesc.c -index 6dd6dcd09c8b..eb25e397a822 100644 ---- a/drivers/hid/hid-uclogic-rdesc.c -+++ b/drivers/hid/hid-uclogic-rdesc.c -@@ -821,7 +821,7 @@ const size_t uclogic_rdesc_xppen_deco01_frame_size = - * uclogic_rdesc_template_apply() - apply report descriptor parameters to a - * report descriptor template, creating a report descriptor. Copies the - * template over to the new report descriptor and replaces every occurrence of -- * UCLOGIC_RDESC_PH_HEAD, followed by an index byte, with the value from the -+ * UCLOGIC_RDESC_PEN_PH_HEAD, followed by an index byte, with the value from the - * parameter list at that index. - * - * @template_ptr: Pointer to the template buffer. -@@ -838,7 +838,7 @@ __u8 *uclogic_rdesc_template_apply(const __u8 *template_ptr, - const s32 *param_list, - size_t param_num) - { -- static const __u8 head[] = {UCLOGIC_RDESC_PH_HEAD}; -+ static const __u8 pen_head[] = {UCLOGIC_RDESC_PEN_PH_HEAD}; - __u8 *rdesc_ptr; - __u8 *p; - s32 v; -@@ -847,12 +847,12 @@ __u8 *uclogic_rdesc_template_apply(const __u8 *template_ptr, - if (rdesc_ptr == NULL) - return NULL; - -- for (p = rdesc_ptr; p + sizeof(head) < rdesc_ptr + template_size;) { -- if (memcmp(p, head, sizeof(head)) == 0 && -- p[sizeof(head)] < param_num) { -- v = param_list[p[sizeof(head)]]; -+ for (p = rdesc_ptr; p + sizeof(pen_head) < rdesc_ptr + template_size;) { -+ if (memcmp(p, pen_head, sizeof(pen_head)) == 0 && -+ p[sizeof(pen_head)] < param_num) { -+ v = param_list[p[sizeof(pen_head)]]; - put_unaligned(cpu_to_le32(v), (s32 *)p); -- p += sizeof(head) + 1; -+ p += sizeof(pen_head) + 1; - } else { - p++; - } -diff --git a/drivers/hid/hid-uclogic-rdesc.h b/drivers/hid/hid-uclogic-rdesc.h -index c5da51055af3..1bb9c1220ea7 100644 ---- a/drivers/hid/hid-uclogic-rdesc.h -+++ b/drivers/hid/hid-uclogic-rdesc.h -@@ -81,7 +81,7 @@ extern __u8 uclogic_rdesc_twha60_fixed1_arr[]; - extern const size_t uclogic_rdesc_twha60_fixed1_size; - - /* Report descriptor template placeholder head */ --#define UCLOGIC_RDESC_PH_HEAD 0xFE, 0xED, 0x1D -+#define UCLOGIC_RDESC_PEN_PH_HEAD 0xFE, 0xED, 0x1D - - /* Apply report descriptor parameters to a report descriptor template */ - extern __u8 *uclogic_rdesc_template_apply(const __u8 *template_ptr, -@@ -89,19 +89,19 @@ extern __u8 *uclogic_rdesc_template_apply(const __u8 *template_ptr, - const s32 *param_list, - size_t param_num); - --/* Pen report descriptor template placeholder IDs */ --enum uclogic_rdesc_pen_ph_id { -+/* Report descriptor template placeholder IDs */ -+enum uclogic_rdesc_ph_id { - UCLOGIC_RDESC_PEN_PH_ID_X_LM, - UCLOGIC_RDESC_PEN_PH_ID_X_PM, - UCLOGIC_RDESC_PEN_PH_ID_Y_LM, - UCLOGIC_RDESC_PEN_PH_ID_Y_PM, - UCLOGIC_RDESC_PEN_PH_ID_PRESSURE_LM, -- UCLOGIC_RDESC_PEN_PH_ID_NUM -+ UCLOGIC_RDESC_PH_ID_NUM - }; - - /* Report descriptor pen template placeholder */ - #define UCLOGIC_RDESC_PEN_PH(_ID) \ -- UCLOGIC_RDESC_PH_HEAD, UCLOGIC_RDESC_PEN_PH_ID_##_ID -+ UCLOGIC_RDESC_PEN_PH_HEAD, UCLOGIC_RDESC_PEN_PH_ID_##_ID - - /* Report ID for v1 pen reports */ - #define UCLOGIC_RDESC_PEN_V1_ID 0x07 --- -2.35.1 - diff --git a/queue-5.15/iio-directly-use-ida_alloc-free.patch b/queue-5.15/iio-directly-use-ida_alloc-free.patch deleted file mode 100644 index 9693b61dfee..00000000000 --- a/queue-5.15/iio-directly-use-ida_alloc-free.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 587aa29f8ec332c76741c41c409ea8c714a99a6c Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 27 May 2022 09:17:39 +0000 -Subject: iio: Directly use ida_alloc()/free() - -From: keliu - -[ Upstream commit 319dbcd84fd2676afb2bcfee575fbc1fce474ec3 ] - -Use ida_alloc()/ida_free() instead of deprecated -ida_simple_get()/ida_simple_remove() . - -Signed-off-by: keliu -Link: https://lore.kernel.org/r/20220527091739.2949426-1-liuke94@huawei.com -Signed-off-by: Jonathan Cameron -Stable-dep-of: 2bc9cd66eb25 ("iio: Use per-device lockdep class for mlock") -Signed-off-by: Sasha Levin ---- - drivers/iio/industrialio-core.c | 6 +++--- - drivers/iio/industrialio-trigger.c | 6 +++--- - 2 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c -index a7f5d432c95d..0c81c7630fb9 100644 ---- a/drivers/iio/industrialio-core.c -+++ b/drivers/iio/industrialio-core.c -@@ -1631,7 +1631,7 @@ static void iio_dev_release(struct device *device) - - iio_device_detach_buffers(indio_dev); - -- ida_simple_remove(&iio_ida, iio_dev_opaque->id); -+ ida_free(&iio_ida, iio_dev_opaque->id); - kfree(iio_dev_opaque); - } - -@@ -1674,7 +1674,7 @@ struct iio_dev *iio_device_alloc(struct device *parent, int sizeof_priv) - mutex_init(&iio_dev_opaque->info_exist_lock); - INIT_LIST_HEAD(&iio_dev_opaque->channel_attr_list); - -- iio_dev_opaque->id = ida_simple_get(&iio_ida, 0, 0, GFP_KERNEL); -+ iio_dev_opaque->id = ida_alloc(&iio_ida, GFP_KERNEL); - if (iio_dev_opaque->id < 0) { - /* cannot use a dev_err as the name isn't available */ - pr_err("failed to get device id\n"); -@@ -1683,7 +1683,7 @@ struct iio_dev *iio_device_alloc(struct device *parent, int sizeof_priv) - } - - if (dev_set_name(&indio_dev->dev, "iio:device%d", iio_dev_opaque->id)) { -- ida_simple_remove(&iio_ida, iio_dev_opaque->id); -+ ida_free(&iio_ida, iio_dev_opaque->id); - kfree(iio_dev_opaque); - return NULL; - } -diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c -index f504ed351b3e..6eb9b721676e 100644 ---- a/drivers/iio/industrialio-trigger.c -+++ b/drivers/iio/industrialio-trigger.c -@@ -71,7 +71,7 @@ int __iio_trigger_register(struct iio_trigger *trig_info, - - trig_info->owner = this_mod; - -- trig_info->id = ida_simple_get(&iio_trigger_ida, 0, 0, GFP_KERNEL); -+ trig_info->id = ida_alloc(&iio_trigger_ida, GFP_KERNEL); - if (trig_info->id < 0) - return trig_info->id; - -@@ -98,7 +98,7 @@ int __iio_trigger_register(struct iio_trigger *trig_info, - mutex_unlock(&iio_trigger_list_lock); - device_del(&trig_info->dev); - error_unregister_id: -- ida_simple_remove(&iio_trigger_ida, trig_info->id); -+ ida_free(&iio_trigger_ida, trig_info->id); - return ret; - } - EXPORT_SYMBOL(__iio_trigger_register); -@@ -109,7 +109,7 @@ void iio_trigger_unregister(struct iio_trigger *trig_info) - list_del(&trig_info->list); - mutex_unlock(&iio_trigger_list_lock); - -- ida_simple_remove(&iio_trigger_ida, trig_info->id); -+ ida_free(&iio_trigger_ida, trig_info->id); - /* Possible issue in here */ - device_del(&trig_info->dev); - } --- -2.35.1 - diff --git a/queue-5.15/iio-use-per-device-lockdep-class-for-mlock.patch b/queue-5.15/iio-use-per-device-lockdep-class-for-mlock.patch deleted file mode 100644 index 9e53e93d64f..00000000000 --- a/queue-5.15/iio-use-per-device-lockdep-class-for-mlock.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 7c5e377abf5291491ee8ee052328bca335c3e12d Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 29 Aug 2022 11:18:40 +0200 -Subject: iio: Use per-device lockdep class for mlock - -From: Vincent Whitchurch - -[ Upstream commit 2bc9cd66eb25d0fefbb081421d6586495e25840e ] - -If an IIO driver uses callbacks from another IIO driver and calls -iio_channel_start_all_cb() from one of its buffer setup ops, then -lockdep complains due to the lock nesting, as in the below example with -lmp91000. - -Since the locks are being taken on different IIO devices, there is no -actual deadlock. Fix the warning by telling lockdep to use a different -class for each iio_device. - - ============================================ - WARNING: possible recursive locking detected - -------------------------------------------- - python3/23 is trying to acquire lock: - (&indio_dev->mlock){+.+.}-{3:3}, at: iio_update_buffers - - but task is already holding lock: - (&indio_dev->mlock){+.+.}-{3:3}, at: enable_store - - other info that might help us debug this: - Possible unsafe locking scenario: - - CPU0 - ---- - lock(&indio_dev->mlock); - lock(&indio_dev->mlock); - - *** DEADLOCK *** - - May be due to missing lock nesting notation - - 5 locks held by python3/23: - #0: (sb_writers#5){.+.+}-{0:0}, at: ksys_write - #1: (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter - #2: (kn->active#14){.+.+}-{0:0}, at: kernfs_fop_write_iter - #3: (&indio_dev->mlock){+.+.}-{3:3}, at: enable_store - #4: (&iio_dev_opaque->info_exist_lock){+.+.}-{3:3}, at: iio_update_buffers - - Call Trace: - __mutex_lock - iio_update_buffers - iio_channel_start_all_cb - lmp91000_buffer_postenable - __iio_update_buffers - enable_store - -Fixes: 67e17300dc1d76 ("iio: potentiostat: add LMP91000 support") -Signed-off-by: Vincent Whitchurch -Reviewed-by: Andy Shevchenko -Link: https://lore.kernel.org/r/20220829091840.2791846-1-vincent.whitchurch@axis.com -Signed-off-by: Jonathan Cameron -Signed-off-by: Sasha Levin ---- - drivers/iio/industrialio-core.c | 5 +++++ - include/linux/iio/iio-opaque.h | 2 ++ - 2 files changed, 7 insertions(+) - -diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c -index 0c81c7630fb9..9aca2612d894 100644 ---- a/drivers/iio/industrialio-core.c -+++ b/drivers/iio/industrialio-core.c -@@ -1631,6 +1631,8 @@ static void iio_dev_release(struct device *device) - - iio_device_detach_buffers(indio_dev); - -+ lockdep_unregister_key(&iio_dev_opaque->mlock_key); -+ - ida_free(&iio_ida, iio_dev_opaque->id); - kfree(iio_dev_opaque); - } -@@ -1691,6 +1693,9 @@ struct iio_dev *iio_device_alloc(struct device *parent, int sizeof_priv) - INIT_LIST_HEAD(&iio_dev_opaque->buffer_list); - INIT_LIST_HEAD(&iio_dev_opaque->ioctl_handlers); - -+ lockdep_register_key(&iio_dev_opaque->mlock_key); -+ lockdep_set_class(&indio_dev->mlock, &iio_dev_opaque->mlock_key); -+ - return indio_dev; - } - EXPORT_SYMBOL(iio_device_alloc); -diff --git a/include/linux/iio/iio-opaque.h b/include/linux/iio/iio-opaque.h -index c9504e9da571..50aad0f58cb4 100644 ---- a/include/linux/iio/iio-opaque.h -+++ b/include/linux/iio/iio-opaque.h -@@ -8,6 +8,7 @@ - * @indio_dev: public industrial I/O device information - * @id: used to identify device internally - * @driver_module: used to make it harder to undercut users -+ * @mlock_key: lockdep class for iio_dev lock - * @info_exist_lock: lock to prevent use during removal - * @trig_readonly: mark the current trigger immutable - * @event_interface: event chrdevs associated with interrupt lines -@@ -36,6 +37,7 @@ struct iio_dev_opaque { - struct iio_dev indio_dev; - int id; - struct module *driver_module; -+ struct lock_class_key mlock_key; - struct mutex info_exist_lock; - bool trig_readonly; - struct iio_event_interface *event_interface; --- -2.35.1 - diff --git a/queue-5.15/libbpf-fix-crash-if-sec-freplace-programs-don-t-have.patch b/queue-5.15/libbpf-fix-crash-if-sec-freplace-programs-don-t-have.patch deleted file mode 100644 index 7862eeebd0f..00000000000 --- a/queue-5.15/libbpf-fix-crash-if-sec-freplace-programs-don-t-have.patch +++ /dev/null @@ -1,64 +0,0 @@ -From d1f2c6898f9c1b741d58bd74bffa5eb2ac75839b Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 9 Sep 2022 12:30:52 -0700 -Subject: libbpf: Fix crash if SEC("freplace") programs don't have - attach_prog_fd set - -From: Andrii Nakryiko - -[ Upstream commit 749c202cb6ea40f4d7ac95c4a1217a7b506f43a8 ] - -Fix SIGSEGV caused by libbpf trying to find attach type in vmlinux BTF -for freplace programs. It's wrong to search in vmlinux BTF and libbpf -doesn't even mark vmlinux BTF as required for freplace programs. So -trying to search anything in obj->vmlinux_btf might cause NULL -dereference if nothing else in BPF object requires vmlinux BTF. - -Instead, error out if freplace (EXT) program doesn't specify -attach_prog_fd during at the load time. - -Fixes: 91abb4a6d79d ("libbpf: Support attachment of BPF tracing programs to kernel modules") -Signed-off-by: Andrii Nakryiko -Signed-off-by: Daniel Borkmann -Link: https://lore.kernel.org/bpf/20220909193053.577111-3-andrii@kernel.org -Signed-off-by: Sasha Levin ---- - tools/lib/bpf/libbpf.c | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - -diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c -index 050622649797..5a853959ff8e 100644 ---- a/tools/lib/bpf/libbpf.c -+++ b/tools/lib/bpf/libbpf.c -@@ -8472,11 +8472,15 @@ static int libbpf_find_attach_btf_id(struct bpf_program *prog, int *btf_obj_fd, - attach_name = name + sec->len; - - /* BPF program's BTF ID */ -- if (attach_prog_fd) { -+ if (prog->type == BPF_PROG_TYPE_EXT || attach_prog_fd) { -+ if (!attach_prog_fd) { -+ pr_warn("prog '%s': attach program FD is not set\n", prog->name); -+ return -EINVAL; -+ } - err = libbpf_find_prog_btf_id(attach_name, attach_prog_fd); - if (err < 0) { -- pr_warn("failed to find BPF program (FD %d) BTF ID for '%s': %d\n", -- attach_prog_fd, attach_name, err); -+ pr_warn("prog '%s': failed to find BPF program (FD %d) BTF ID for '%s': %d\n", -+ prog->name, attach_prog_fd, attach_name, err); - return err; - } - *btf_obj_fd = 0; -@@ -8493,7 +8497,8 @@ static int libbpf_find_attach_btf_id(struct bpf_program *prog, int *btf_obj_fd, - err = find_kernel_btf_id(prog->obj, attach_name, attach_type, btf_obj_fd, btf_type_id); - } - if (err) { -- pr_warn("failed to find kernel BTF type ID of '%s': %d\n", attach_name, err); -+ pr_warn("prog '%s': failed to find kernel BTF type ID of '%s': %d\n", -+ prog->name, attach_name, err); - return err; - } - return 0; --- -2.35.1 - diff --git a/queue-5.15/libbpf-fix-null-pointer-exception-in-api-btf_dump__d.patch b/queue-5.15/libbpf-fix-null-pointer-exception-in-api-btf_dump__d.patch deleted file mode 100644 index 9e32bfb9212..00000000000 --- a/queue-5.15/libbpf-fix-null-pointer-exception-in-api-btf_dump__d.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 286e78954ac96101725e25aa9d3fb8cfbcd15b5e Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Sat, 17 Sep 2022 16:48:09 +0800 -Subject: libbpf: Fix NULL pointer exception in API btf_dump__dump_type_data - -From: Xin Liu - -[ Upstream commit 7620bffbf72cd66a5d18e444a143b5b5989efa87 ] - -We found that function btf_dump__dump_type_data can be called by the -user as an API, but in this function, the `opts` parameter may be used -as a null pointer.This causes `opts->indent_str` to trigger a NULL -pointer exception. - -Fixes: 2ce8450ef5a3 ("libbpf: add bpf_object__open_{file, mem} w/ extensible opts") -Signed-off-by: Xin Liu -Signed-off-by: Weibin Kong -Signed-off-by: Andrii Nakryiko -Link: https://lore.kernel.org/bpf/20220917084809.30770-1-liuxin350@huawei.com -Signed-off-by: Sasha Levin ---- - tools/lib/bpf/btf_dump.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/lib/bpf/btf_dump.c b/tools/lib/bpf/btf_dump.c -index 841cc68e3f42..81bfeedc49ee 100644 ---- a/tools/lib/bpf/btf_dump.c -+++ b/tools/lib/bpf/btf_dump.c -@@ -2294,7 +2294,7 @@ int btf_dump__dump_type_data(struct btf_dump *d, __u32 id, - d->typed_dump->indent_lvl = OPTS_GET(opts, indent_level, 0); - - /* default indent string is a tab */ -- if (!opts->indent_str) -+ if (!OPTS_GET(opts, indent_str, NULL)) - d->typed_dump->indent_str[0] = '\t'; - else - strncat(d->typed_dump->indent_str, opts->indent_str, --- -2.35.1 - diff --git a/queue-5.15/libbpf-fix-overrun-in-netlink-attribute-iteration.patch b/queue-5.15/libbpf-fix-overrun-in-netlink-attribute-iteration.patch deleted file mode 100644 index 9bc339c89d9..00000000000 --- a/queue-5.15/libbpf-fix-overrun-in-netlink-attribute-iteration.patch +++ /dev/null @@ -1,38 +0,0 @@ -From ecf058f65c9f7b16cdbd64fa1b8fae22681f0eac Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 30 Sep 2022 17:07:08 +0800 -Subject: libbpf: Fix overrun in netlink attribute iteration - -From: Xin Liu - -[ Upstream commit 51e05a8cf8eb34da7473823b7f236a77adfef0b4 ] - -I accidentally found that a change in commit 1045b03e07d8 ("netlink: fix -overrun in attribute iteration") was not synchronized to the function -`nla_ok` in tools/lib/bpf/nlattr.c, I think it is necessary to modify, -this patch will do it. - -Signed-off-by: Xin Liu -Signed-off-by: Andrii Nakryiko -Link: https://lore.kernel.org/bpf/20220930090708.62394-1-liuxin350@huawei.com -Signed-off-by: Sasha Levin ---- - tools/lib/bpf/nlattr.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/lib/bpf/nlattr.c b/tools/lib/bpf/nlattr.c -index f57e77a6e40f..3900d052ed19 100644 ---- a/tools/lib/bpf/nlattr.c -+++ b/tools/lib/bpf/nlattr.c -@@ -32,7 +32,7 @@ static struct nlattr *nla_next(const struct nlattr *nla, int *remaining) - - static int nla_ok(const struct nlattr *nla, int remaining) - { -- return remaining >= sizeof(*nla) && -+ return remaining >= (int)sizeof(*nla) && - nla->nla_len >= sizeof(*nla) && - nla->nla_len <= remaining; - } --- -2.35.1 - diff --git a/queue-5.15/net-ftmac100-fix-endianness-related-issues-from-spar.patch b/queue-5.15/net-ftmac100-fix-endianness-related-issues-from-spar.patch deleted file mode 100644 index 6f7e7716d0f..00000000000 --- a/queue-5.15/net-ftmac100-fix-endianness-related-issues-from-spar.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 6689b130d62d73df20a6f833d282d82e1c4b5a78 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 2 Sep 2022 14:37:49 +0300 -Subject: net: ftmac100: fix endianness-related issues from 'sparse' - -From: Sergei Antonov - -[ Upstream commit 9df696b3b3a4c96c3219eb87c7bf03fb50e490b8 ] - -Sparse found a number of endianness-related issues of these kinds: - -.../ftmac100.c:192:32: warning: restricted __le32 degrades to integer - -.../ftmac100.c:208:23: warning: incorrect type in assignment (different base types) -.../ftmac100.c:208:23: expected unsigned int rxdes0 -.../ftmac100.c:208:23: got restricted __le32 [usertype] - -.../ftmac100.c:249:23: warning: invalid assignment: &= -.../ftmac100.c:249:23: left side has type unsigned int -.../ftmac100.c:249:23: right side has type restricted __le32 - -.../ftmac100.c:527:16: warning: cast to restricted __le32 - -Change type of some fields from 'unsigned int' to '__le32' to fix it. - -Signed-off-by: Sergei Antonov -Reviewed-by: Andrew Lunn -Link: https://lore.kernel.org/r/20220902113749.1408562-1-saproj@gmail.com -Signed-off-by: Paolo Abeni -Signed-off-by: Sasha Levin ---- - drivers/net/ethernet/faraday/ftmac100.h | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/drivers/net/ethernet/faraday/ftmac100.h b/drivers/net/ethernet/faraday/ftmac100.h -index fe986f1673fc..8af32f9070f4 100644 ---- a/drivers/net/ethernet/faraday/ftmac100.h -+++ b/drivers/net/ethernet/faraday/ftmac100.h -@@ -122,9 +122,9 @@ - * Transmit descriptor, aligned to 16 bytes - */ - struct ftmac100_txdes { -- unsigned int txdes0; -- unsigned int txdes1; -- unsigned int txdes2; /* TXBUF_BADR */ -+ __le32 txdes0; -+ __le32 txdes1; -+ __le32 txdes2; /* TXBUF_BADR */ - unsigned int txdes3; /* not used by HW */ - } __attribute__ ((aligned(16))); - -@@ -143,9 +143,9 @@ struct ftmac100_txdes { - * Receive descriptor, aligned to 16 bytes - */ - struct ftmac100_rxdes { -- unsigned int rxdes0; -- unsigned int rxdes1; -- unsigned int rxdes2; /* RXBUF_BADR */ -+ __le32 rxdes0; -+ __le32 rxdes1; -+ __le32 rxdes2; /* RXBUF_BADR */ - unsigned int rxdes3; /* not used by HW */ - } __attribute__ ((aligned(16))); - --- -2.35.1 - diff --git a/queue-5.15/selftests-cpu-hotplug-use-return-instead-of-exit.patch b/queue-5.15/selftests-cpu-hotplug-use-return-instead-of-exit.patch deleted file mode 100644 index d775e3a9852..00000000000 --- a/queue-5.15/selftests-cpu-hotplug-use-return-instead-of-exit.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 4d3881eb92faefb485682cc65edb701ab10d456f Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 5 Sep 2022 21:36:12 +0800 -Subject: selftests/cpu-hotplug: Use return instead of exit - -From: Zhao Gongyi - -[ Upstream commit 972cf4ce51ef5532d56822af17defb148aac0ccb ] - -Some cpus will be left in offline state when online -function exits in some error conditions. Use return -instead of exit to fix it. - -Signed-off-by: Zhao Gongyi -Signed-off-by: Shuah Khan -Signed-off-by: Sasha Levin ---- - .../selftests/cpu-hotplug/cpu-on-off-test.sh | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -diff --git a/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh b/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh -index 0d26b5e3f966..940b68c940bb 100755 ---- a/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh -+++ b/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh -@@ -4,6 +4,7 @@ - SYSFS= - # Kselftest framework requirement - SKIP code is 4. - ksft_skip=4 -+retval=0 - - prerequisite() - { -@@ -102,10 +103,10 @@ online_cpu_expect_success() - - if ! online_cpu $cpu; then - echo $FUNCNAME $cpu: unexpected fail >&2 -- exit 1 -+ retval=1 - elif ! cpu_is_online $cpu; then - echo $FUNCNAME $cpu: unexpected offline >&2 -- exit 1 -+ retval=1 - fi - } - -@@ -128,10 +129,10 @@ offline_cpu_expect_success() - - if ! offline_cpu $cpu; then - echo $FUNCNAME $cpu: unexpected fail >&2 -- exit 1 -+ retval=1 - elif ! cpu_is_offline $cpu; then - echo $FUNCNAME $cpu: unexpected offline >&2 -- exit 1 -+ retval=1 - fi - } - -@@ -201,7 +202,7 @@ if [ $allcpus -eq 0 ]; then - offline_cpu_expect_success $present_max - online_cpu $present_max - fi -- exit 0 -+ exit $retval - else - echo "Full scope test: all hotplug cpus" - echo -e "\t online all offline cpus" -@@ -291,3 +292,5 @@ done - - echo 0 > $NOTIFIER_ERR_INJECT_DIR/actions/CPU_DOWN_PREPARE/error - /sbin/modprobe -q -r cpu-notifier-error-inject -+ -+exit $retval --- -2.35.1 - diff --git a/queue-5.15/series b/queue-5.15/series index b461832556b..478672660fb 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -180,9 +180,7 @@ wifi-mt76-mt7915-do-not-check-state-before-configuri.patch bluetooth-rfcomm-fix-possible-deadlock-on-socket-shu.patch net-fs_enet-fix-wrong-check-in-do_pd_setup.patch bpf-ensure-correct-locking-around-vulnerable-functio.patch -libbpf-fix-crash-if-sec-freplace-programs-don-t-have.patch bluetooth-hci_-ldisc-serdev-check-percpu_init_rwsem-.patch -libbpf-fix-null-pointer-exception-in-api-btf_dump__d.patch netfilter-conntrack-fix-the-gc-rescheduling-delay.patch netfilter-conntrack-revisit-the-gc-initial-reschedul.patch wifi-ath11k-fix-number-of-vht-beamformee-spatial-str.patch @@ -257,7 +255,6 @@ locks-fix-toctou-race-when-granting-write-lease.patch soc-qcom-smsm-fix-refcount-leak-bugs-in-qcom_smsm_pr.patch soc-qcom-smem_state-add-refcounting-for-the-state-of.patch arm-dts-imx6qdl-kontron-samx6i-hook-up-ddc-i2c-bus.patch -arm64-dts-qcom-sc7280-cleanup-the-lpasscc-node.patch arm-dts-turris-omnia-fix-mpp26-pin-name-and-comment.patch arm-dts-kirkwood-lsxl-fix-serial-line.patch arm-dts-kirkwood-lsxl-remove-first-ethernet-port.patch @@ -287,8 +284,6 @@ clk-sprd-hold-reference-returned-by-of_get_parent.patch clk-tegra-fix-refcount-leak-in-tegra210_clock_init.patch clk-tegra-fix-refcount-leak-in-tegra114_clock_init.patch clk-tegra20-fix-refcount-leak-in-tegra20_clock_init.patch -hid-uclogic-make-template-placeholder-ids-generic.patch -hid-uclogic-fix-warning-in-uclogic_rdesc_template_ap.patch hsi-omap_ssi-fix-refcount-leak-in-ssi_probe.patch hsi-omap_ssi_port-fix-dma_map_sg-error-check.patch clk-qcom-gcc-sdm660-use-array_size-for-num_parents.patch @@ -306,8 +301,6 @@ fpga-prevent-integer-overflow-in-dfl_feature_ioctl_s.patch dmaengine-hisilicon-disable-channels-when-unregister.patch dmaengine-hisilicon-fix-cq-head-update.patch dmaengine-hisilicon-add-multi-thread-support-for-a-d.patch -iio-directly-use-ida_alloc-free.patch -iio-use-per-device-lockdep-class-for-mlock.patch dyndbg-fix-static_branch-manipulation.patch dyndbg-fix-module.dyndbg-handling.patch dyndbg-let-query-modname-override-actual-module-name.patch @@ -349,8 +342,6 @@ scsi-iscsi-rename-iscsi_conn_queue_work.patch scsi-iscsi-add-recv-workqueue-helpers.patch scsi-iscsi-run-recv-path-from-workqueue.patch scsi-iscsi-iscsi_tcp-fix-null-ptr-deref-while-callin.patch -clk-qcom-clk-rcg2-add-rcg2-mux-ops.patch -clk-qcom-apss-ipq6018-fix-apcs_alias0_clk_src.patch clk-qcom-apss-ipq6018-mark-apcs_alias0_core_clk-as-c.patch clk-qcom-gcc-sm6115-override-default-alpha-pll-regs.patch rdma-rxe-fix-resize_finish-in-rxe_queue.c.patch @@ -454,7 +445,6 @@ x86-mce-retrieve-poison-range-from-hardware.patch wifi-ath9k-avoid-uninit-memory-read-in-ath9k_htc_rx_.patch thunderbolt-add-back-intel-falcon-ridge-end-to-end-f.patch xfrm-update-ipcomp_scratches-with-null-when-freed.patch -net-ftmac100-fix-endianness-related-issues-from-spar.patch iavf-fix-race-between-iavf_close-and-iavf_reset_task.patch wifi-brcmfmac-fix-use-after-free-bug-in-brcmf_netdev.patch bluetooth-btintel-mark-intel-controller-to-support-l.patch @@ -471,7 +461,6 @@ wifi-rt2x00-correctly-set-bbp-register-86-for-mt7620.patch hwmon-sht4x-do-not-overflow-clamping-operation-on-32.patch net-if-sock-is-dead-don-t-access-sock-s-sk_wq-in-sk_.patch bluetooth-l2cap-fix-user-after-free.patch -libbpf-fix-overrun-in-netlink-attribute-iteration.patch r8152-rate-limit-overflow-messages.patch drm-nouveau-nouveau_bo-fix-potential-memory-leak-in-.patch drm-use-size_t-type-for-len-variable-in-drm_copy_fie.patch @@ -495,7 +484,6 @@ mmc-sdhci-msm-add-compatible-string-check-for-sdm670.patch drm-dp-don-t-rewrite-link-config-when-setting-phy-te.patch drm-amd-display-remove-interface-for-periodic-interr.patch arm-dts-imx7d-sdb-config-the-max-pressure-for-tsc204.patch -arm64-dts-qcom-sc7280-idp-correct-adc-channel-node-n.patch arm-dts-imx6q-add-missing-properties-for-sram.patch arm-dts-imx6dl-add-missing-properties-for-sram.patch arm-dts-imx6qp-add-missing-properties-for-sram.patch @@ -508,7 +496,6 @@ btrfs-dump-extra-info-if-one-free-space-cache-has-mo.patch btrfs-scrub-try-to-fix-super-block-errors.patch btrfs-don-t-print-information-about-space-cache-or-t.patch arm-9242-1-kasan-only-map-modules-if-config_kasan_vm.patch -selftests-cpu-hotplug-use-return-instead-of-exit.patch clk-zynqmp-fix-stack-out-of-bounds-in-strncpy.patch media-cx88-fix-a-null-ptr-deref-bug-in-buffer_prepar.patch media-platform-fix-some-double-free-in-meson-ge2d-an.patch diff --git a/queue-5.4/libbpf-fix-overrun-in-netlink-attribute-iteration.patch b/queue-5.4/libbpf-fix-overrun-in-netlink-attribute-iteration.patch deleted file mode 100644 index 1801e676479..00000000000 --- a/queue-5.4/libbpf-fix-overrun-in-netlink-attribute-iteration.patch +++ /dev/null @@ -1,38 +0,0 @@ -From fe15cee82c08ece892fd13db6fb5ed2823ae56d1 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 30 Sep 2022 17:07:08 +0800 -Subject: libbpf: Fix overrun in netlink attribute iteration - -From: Xin Liu - -[ Upstream commit 51e05a8cf8eb34da7473823b7f236a77adfef0b4 ] - -I accidentally found that a change in commit 1045b03e07d8 ("netlink: fix -overrun in attribute iteration") was not synchronized to the function -`nla_ok` in tools/lib/bpf/nlattr.c, I think it is necessary to modify, -this patch will do it. - -Signed-off-by: Xin Liu -Signed-off-by: Andrii Nakryiko -Link: https://lore.kernel.org/bpf/20220930090708.62394-1-liuxin350@huawei.com -Signed-off-by: Sasha Levin ---- - tools/lib/bpf/nlattr.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/lib/bpf/nlattr.c b/tools/lib/bpf/nlattr.c -index 1e69c0c8d413..faa6256d857a 100644 ---- a/tools/lib/bpf/nlattr.c -+++ b/tools/lib/bpf/nlattr.c -@@ -31,7 +31,7 @@ static struct nlattr *nla_next(const struct nlattr *nla, int *remaining) - - static int nla_ok(const struct nlattr *nla, int remaining) - { -- return remaining >= sizeof(*nla) && -+ return remaining >= (int)sizeof(*nla) && - nla->nla_len >= sizeof(*nla) && - nla->nla_len <= remaining; - } --- -2.35.1 - diff --git a/queue-5.4/net-ftmac100-fix-endianness-related-issues-from-spar.patch b/queue-5.4/net-ftmac100-fix-endianness-related-issues-from-spar.patch deleted file mode 100644 index d76013a4f5a..00000000000 --- a/queue-5.4/net-ftmac100-fix-endianness-related-issues-from-spar.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 557abb8d72f5dc6dd475769b190279224dc7f16f Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Fri, 2 Sep 2022 14:37:49 +0300 -Subject: net: ftmac100: fix endianness-related issues from 'sparse' - -From: Sergei Antonov - -[ Upstream commit 9df696b3b3a4c96c3219eb87c7bf03fb50e490b8 ] - -Sparse found a number of endianness-related issues of these kinds: - -.../ftmac100.c:192:32: warning: restricted __le32 degrades to integer - -.../ftmac100.c:208:23: warning: incorrect type in assignment (different base types) -.../ftmac100.c:208:23: expected unsigned int rxdes0 -.../ftmac100.c:208:23: got restricted __le32 [usertype] - -.../ftmac100.c:249:23: warning: invalid assignment: &= -.../ftmac100.c:249:23: left side has type unsigned int -.../ftmac100.c:249:23: right side has type restricted __le32 - -.../ftmac100.c:527:16: warning: cast to restricted __le32 - -Change type of some fields from 'unsigned int' to '__le32' to fix it. - -Signed-off-by: Sergei Antonov -Reviewed-by: Andrew Lunn -Link: https://lore.kernel.org/r/20220902113749.1408562-1-saproj@gmail.com -Signed-off-by: Paolo Abeni -Signed-off-by: Sasha Levin ---- - drivers/net/ethernet/faraday/ftmac100.h | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/drivers/net/ethernet/faraday/ftmac100.h b/drivers/net/ethernet/faraday/ftmac100.h -index fe986f1673fc..8af32f9070f4 100644 ---- a/drivers/net/ethernet/faraday/ftmac100.h -+++ b/drivers/net/ethernet/faraday/ftmac100.h -@@ -122,9 +122,9 @@ - * Transmit descriptor, aligned to 16 bytes - */ - struct ftmac100_txdes { -- unsigned int txdes0; -- unsigned int txdes1; -- unsigned int txdes2; /* TXBUF_BADR */ -+ __le32 txdes0; -+ __le32 txdes1; -+ __le32 txdes2; /* TXBUF_BADR */ - unsigned int txdes3; /* not used by HW */ - } __attribute__ ((aligned(16))); - -@@ -143,9 +143,9 @@ struct ftmac100_txdes { - * Receive descriptor, aligned to 16 bytes - */ - struct ftmac100_rxdes { -- unsigned int rxdes0; -- unsigned int rxdes1; -- unsigned int rxdes2; /* RXBUF_BADR */ -+ __le32 rxdes0; -+ __le32 rxdes1; -+ __le32 rxdes2; /* RXBUF_BADR */ - unsigned int rxdes3; /* not used by HW */ - } __attribute__ ((aligned(16))); - --- -2.35.1 - diff --git a/queue-5.4/selftests-cpu-hotplug-use-return-instead-of-exit.patch b/queue-5.4/selftests-cpu-hotplug-use-return-instead-of-exit.patch deleted file mode 100644 index cad45898a1e..00000000000 --- a/queue-5.4/selftests-cpu-hotplug-use-return-instead-of-exit.patch +++ /dev/null @@ -1,76 +0,0 @@ -From c942b5210160d225adced18de55426587f2f55c0 Mon Sep 17 00:00:00 2001 -From: Sasha Levin -Date: Mon, 5 Sep 2022 21:36:12 +0800 -Subject: selftests/cpu-hotplug: Use return instead of exit - -From: Zhao Gongyi - -[ Upstream commit 972cf4ce51ef5532d56822af17defb148aac0ccb ] - -Some cpus will be left in offline state when online -function exits in some error conditions. Use return -instead of exit to fix it. - -Signed-off-by: Zhao Gongyi -Signed-off-by: Shuah Khan -Signed-off-by: Sasha Levin ---- - .../selftests/cpu-hotplug/cpu-on-off-test.sh | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -diff --git a/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh b/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh -index 0d26b5e3f966..940b68c940bb 100755 ---- a/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh -+++ b/tools/testing/selftests/cpu-hotplug/cpu-on-off-test.sh -@@ -4,6 +4,7 @@ - SYSFS= - # Kselftest framework requirement - SKIP code is 4. - ksft_skip=4 -+retval=0 - - prerequisite() - { -@@ -102,10 +103,10 @@ online_cpu_expect_success() - - if ! online_cpu $cpu; then - echo $FUNCNAME $cpu: unexpected fail >&2 -- exit 1 -+ retval=1 - elif ! cpu_is_online $cpu; then - echo $FUNCNAME $cpu: unexpected offline >&2 -- exit 1 -+ retval=1 - fi - } - -@@ -128,10 +129,10 @@ offline_cpu_expect_success() - - if ! offline_cpu $cpu; then - echo $FUNCNAME $cpu: unexpected fail >&2 -- exit 1 -+ retval=1 - elif ! cpu_is_offline $cpu; then - echo $FUNCNAME $cpu: unexpected offline >&2 -- exit 1 -+ retval=1 - fi - } - -@@ -201,7 +202,7 @@ if [ $allcpus -eq 0 ]; then - offline_cpu_expect_success $present_max - online_cpu $present_max - fi -- exit 0 -+ exit $retval - else - echo "Full scope test: all hotplug cpus" - echo -e "\t online all offline cpus" -@@ -291,3 +292,5 @@ done - - echo 0 > $NOTIFIER_ERR_INJECT_DIR/actions/CPU_DOWN_PREPARE/error - /sbin/modprobe -q -r cpu-notifier-error-inject -+ -+exit $retval --- -2.35.1 - diff --git a/queue-5.4/series b/queue-5.4/series index 61858f39340..b26438d99f0 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -196,7 +196,6 @@ openvswitch-fix-overreporting-of-drops-in-dropwatch.patch tcp-annotate-data-race-around-tcp_md5sig_pool_popula.patch wifi-ath9k-avoid-uninit-memory-read-in-ath9k_htc_rx_.patch xfrm-update-ipcomp_scratches-with-null-when-freed.patch -net-ftmac100-fix-endianness-related-issues-from-spar.patch wifi-brcmfmac-fix-use-after-free-bug-in-brcmf_netdev.patch bluetooth-l2cap-initialize-delayed-works-at-l2cap_ch.patch bluetooth-hci_sysfs-fix-attempting-to-call-device_ad.patch @@ -208,7 +207,6 @@ wifi-rt2x00-set-soc-wmac-clock-register.patch wifi-rt2x00-correctly-set-bbp-register-86-for-mt7620.patch net-if-sock-is-dead-don-t-access-sock-s-sk_wq-in-sk_.patch bluetooth-l2cap-fix-user-after-free.patch -libbpf-fix-overrun-in-netlink-attribute-iteration.patch r8152-rate-limit-overflow-messages.patch drm-nouveau-nouveau_bo-fix-potential-memory-leak-in-.patch drm-use-size_t-type-for-len-variable-in-drm_copy_fie.patch @@ -228,7 +226,6 @@ arm-dts-imx6sl-add-missing-properties-for-sram.patch arm-dts-imx6sll-add-missing-properties-for-sram.patch arm-dts-imx6sx-add-missing-properties-for-sram.patch btrfs-scrub-try-to-fix-super-block-errors.patch -selftests-cpu-hotplug-use-return-instead-of-exit.patch clk-zynqmp-fix-stack-out-of-bounds-in-strncpy.patch media-cx88-fix-a-null-ptr-deref-bug-in-buffer_prepar.patch clk-zynqmp-pll-rectify-rate-rounding-in-zynqmp_pll_r.patch -- 2.47.3