From: Alex Elder <elder@linaro.org>
To: stable@vger.kernel.org
Cc: Stephen Boyd <swboyd@chromium.org>,
elder@linaro.org, dianders@chromium.org,
bjorn.andersson@linaro.org, djakov@kernel.org,
quic_mdtipton@quicinc.com, quic_tdas@quicinc.com
Subject: [PATCH v5.10.x 2/2] interconnect: Restore sync state by ignoring ipa-virt in provider count
Date: Wed, 8 Jun 2022 15:54:15 -0500 [thread overview]
Message-ID: <20220608205415.185248-3-elder@linaro.org> (raw)
In-Reply-To: <20220608205415.185248-1-elder@linaro.org>
From: Stephen Boyd <swboyd@chromium.org>
commit 20ce30fb4750f2ffc130cdcb26232b1dd87cd0a5 upstream.
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 <bjorn.andersson@linaro.org>
Cc: Doug Anderson <dianders@chromium.org>
Cc: Alex Elder <elder@linaro.org>
Cc: Taniya Das <quic_tdas@quicinc.com>
Cc: Mike Tipton <quic_mdtipton@quicinc.com>
Cc: <stable@vger.kernel.org> # 5.10.x
Fixes: 2fb251c26560 ("interconnect: qcom: sdx55: Drop IP0 interconnects")
Fixes: 2f3724930eb4 ("interconnect: qcom: sc7180: Drop IP0 interconnects")
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20220427013226.341209-1-swboyd@chromium.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
Signed-off-by: Alex Elder <elder@linaro.org>
---
drivers/interconnect/core.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
index 7887941730dbb..ceb6cdc20484e 100644
--- a/drivers/interconnect/core.c
+++ b/drivers/interconnect/core.c
@@ -1084,9 +1084,14 @@ 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" },
+ {}
+ };
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.34.1
next prev parent reply other threads:[~2022-06-08 20:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-08 20:54 [PATCH v5.10.x 0/2] Fix SC7180 suspend for v5.10.x Alex Elder
2022-06-08 20:54 ` [PATCH v5.10.x 1/2] interconnect: qcom: sc7180: Drop IP0 interconnects Alex Elder
2022-06-08 20:54 ` Alex Elder [this message]
2022-06-13 8:04 ` [PATCH v5.10.x 0/2] Fix SC7180 suspend for v5.10.x Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220608205415.185248-3-elder@linaro.org \
--to=elder@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=dianders@chromium.org \
--cc=djakov@kernel.org \
--cc=quic_mdtipton@quicinc.com \
--cc=quic_tdas@quicinc.com \
--cc=stable@vger.kernel.org \
--cc=swboyd@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox