From: Sasha Levin Date: Sun, 15 May 2022 21:12:47 +0000 (-0400) Subject: Fixes for 5.17 X-Git-Tag: v4.9.315~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f87ddef204cb4dd221a76250b2402ad19a4d0ed5;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 5.17 Signed-off-by: Sasha Levin --- diff --git a/queue-5.17/interconnect-restore-sync-state-by-ignoring-ipa-virt.patch b/queue-5.17/interconnect-restore-sync-state-by-ignoring-ipa-virt.patch new file mode 100644 index 00000000000..1fc1febb7a1 --- /dev/null +++ b/queue-5.17/interconnect-restore-sync-state-by-ignoring-ipa-virt.patch @@ -0,0 +1,61 @@ +From d2c100a6000e170d1ae53751b471df4fad0e1036 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 26 Apr 2022 18:32:26 -0700 +Subject: interconnect: Restore sync state by ignoring ipa-virt in provider + count + +From: Stephen Boyd + +[ Upstream commit 20ce30fb4750f2ffc130cdcb26232b1dd87cd0a5 ] + +Ignore compatible strings for the IPA virt drivers that were removed in +commits 2fb251c26560 ("interconnect: qcom: sdx55: Drop IP0 +interconnects") and 2f3724930eb4 ("interconnect: qcom: sc7180: Drop IP0 +interconnects") so that the sync state logic can kick in again. +Otherwise all the interconnects in the system will stay pegged at max +speeds because 'providers_count' is always going to be one larger than +the number of drivers that will ever probe on sc7180 or sdx55. This +fixes suspend on sc7180 and sdx55 devices when you don't have a +devicetree patch to remove the ipa-virt compatible node. + +Cc: Bjorn Andersson +Cc: Doug Anderson +Cc: Alex Elder +Cc: Taniya Das +Cc: Mike Tipton +Fixes: 2fb251c26560 ("interconnect: qcom: sdx55: Drop IP0 interconnects") +Fixes: 2f3724930eb4 ("interconnect: qcom: sc7180: Drop IP0 interconnects") +Signed-off-by: Stephen Boyd +Reviewed-by: Alex Elder +Reviewed-by: Douglas Anderson +Link: https://lore.kernel.org/r/20220427013226.341209-1-swboyd@chromium.org +Signed-off-by: Georgi Djakov +Signed-off-by: Sasha Levin +--- + drivers/interconnect/core.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c +index 9050ca1f4285..808f6e7a8048 100644 +--- a/drivers/interconnect/core.c ++++ b/drivers/interconnect/core.c +@@ -1087,9 +1087,15 @@ static int of_count_icc_providers(struct device_node *np) + { + struct device_node *child; + int count = 0; ++ const struct of_device_id __maybe_unused ignore_list[] = { ++ { .compatible = "qcom,sc7180-ipa-virt" }, ++ { .compatible = "qcom,sdx55-ipa-virt" }, ++ {} ++ }; + + for_each_available_child_of_node(np, child) { +- if (of_property_read_bool(child, "#interconnect-cells")) ++ if (of_property_read_bool(child, "#interconnect-cells") && ++ likely(!of_match_node(ignore_list, child))) + count++; + count += of_count_icc_providers(child); + } +-- +2.35.1 + diff --git a/queue-5.17/perf-tests-fix-coresight-perf-test-failure.patch b/queue-5.17/perf-tests-fix-coresight-perf-test-failure.patch new file mode 100644 index 00000000000..8dacd1ebae6 --- /dev/null +++ b/queue-5.17/perf-tests-fix-coresight-perf-test-failure.patch @@ -0,0 +1,60 @@ +From cd53daedc577d2ca07cb6097bd0e7e3987ce35cd Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Thu, 28 Apr 2022 10:19:47 -0500 +Subject: perf tests: Fix coresight `perf test` failure. + +From: Jeremy Linton + +[ Upstream commit 45fa7c38696bae632310c2876ba81fdfa25cc9c2 ] + +Currently the `perf test` always fails the coresight test like: + + 89: Check Arm CoreSight trace data recording and synthesized samples: FAILED! + +That is because the test_arm_coresight.sh is attempting to SIGINT the +parent but is using $$ rather than $PPID and it sigint's itself when +run under the perf test framework. + +Since this is done in a trap clause it ends up returning a non zero +return. + +Since $PPID is a bash ism and not all distros are linking /bin/sh to +bash, the alternative parent pid lookups are uglier than just dropping +the kill, and its not strictly needed, lets pick the simple solution and +drop the sigint. + +Fixes: 133fe2e617e48ca0 ("perf tests: Improve temp file cleanup in test_arm_coresight.sh") +Reviewed-by: James Clark +Signed-off-by: Jeremy Linton +Cc: Alexander Shishkin +Cc: Ian Rogers +Cc: Ingo Molnar +Cc: James Clark +Cc: Jiri Olsa +Cc: Leo Yan +Cc: Mark Rutland +Cc: Namhyung Kim +Cc: Peter Zijlstra +Jeremy Linton +Link: https://lore.kernel.org/r/20220428151947.290146-1-jeremy.linton@arm.com +Signed-off-by: Arnaldo Carvalho de Melo +Signed-off-by: Sasha Levin +--- + tools/perf/tests/shell/test_arm_coresight.sh | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tools/perf/tests/shell/test_arm_coresight.sh b/tools/perf/tests/shell/test_arm_coresight.sh +index 6de53b7ef5ff..e4cb4f1806ff 100755 +--- a/tools/perf/tests/shell/test_arm_coresight.sh ++++ b/tools/perf/tests/shell/test_arm_coresight.sh +@@ -29,7 +29,6 @@ cleanup_files() + rm -f ${file} + rm -f "${perfdata}.old" + trap - exit term int +- kill -2 $$ + exit $glb_err + } + +-- +2.35.1 + diff --git a/queue-5.17/series b/queue-5.17/series index acb4d69d2d0..c1d5535da01 100644 --- a/queue-5.17/series +++ b/queue-5.17/series @@ -66,3 +66,5 @@ tcp-dynamically-allocate-the-perturb-table-used-by-s.patch tcp-increase-source-port-perturb-table-to-2-16.patch tcp-drop-the-hash_32-part-from-the-index-calculation.patch block-do-not-call-folio_next-on-an-unreferenced-foli.patch +interconnect-restore-sync-state-by-ignoring-ipa-virt.patch +perf-tests-fix-coresight-perf-test-failure.patch