From: Sasha Levin Date: Sun, 15 May 2022 21:12:48 +0000 (-0400) Subject: Fixes for 5.15 X-Git-Tag: v4.9.315~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4faaf1c974c8ca6caead29565a6364251348bc3c;p=thirdparty%2Fkernel%2Fstable-queue.git Fixes for 5.15 Signed-off-by: Sasha Levin --- diff --git a/queue-5.15/interconnect-restore-sync-state-by-ignoring-ipa-virt.patch b/queue-5.15/interconnect-restore-sync-state-by-ignoring-ipa-virt.patch new file mode 100644 index 00000000000..f693939b57c --- /dev/null +++ b/queue-5.15/interconnect-restore-sync-state-by-ignoring-ipa-virt.patch @@ -0,0 +1,61 @@ +From f1290a16d77860e957f63278ceb9cdfbab5842be 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.15/series b/queue-5.15/series index cc262e87c9e..b2d9c7a661e 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -59,3 +59,4 @@ tcp-add-small-random-increments-to-the-source-port.patch 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 +interconnect-restore-sync-state-by-ignoring-ipa-virt.patch