* FAILED: patch "[PATCH] clk: qcom: clk-rpmh: Fix overflow in BCM vote" failed to apply to 5.4-stable tree
@ 2024-10-07 16:51 gregkh
2024-10-08 18:50 ` [PATCH 5.4.y] clk: qcom: clk-rpmh: Fix overflow in BCM vote Mike Tipton
0 siblings, 1 reply; 2+ messages in thread
From: gregkh @ 2024-10-07 16:51 UTC (permalink / raw)
To: quic_mdtipton, andersson, quic_imrashai, quic_tdas; +Cc: stable
The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.4.y
git checkout FETCH_HEAD
git cherry-pick -x a4e5af27e6f6a8b0d14bc0d7eb04f4a6c7291586
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2024100719-exploring-umbrella-b6ca@gregkh' --subject-prefix 'PATCH 5.4.y' HEAD^..
Possible dependencies:
a4e5af27e6f6 ("clk: qcom: clk-rpmh: Fix overflow in BCM vote")
2cf7a4cbcb4e ("clk: qcom: rpmh: Simplify clk_rpmh_bcm_send_cmd()")
dad4e7fda4bd ("clk: qcom: clk-rpmh: Wait for completion when enabling clocks")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From a4e5af27e6f6a8b0d14bc0d7eb04f4a6c7291586 Mon Sep 17 00:00:00 2001
From: Mike Tipton <quic_mdtipton@quicinc.com>
Date: Fri, 9 Aug 2024 10:51:29 +0530
Subject: [PATCH] clk: qcom: clk-rpmh: Fix overflow in BCM vote
Valid frequencies may result in BCM votes that exceed the max HW value.
Set vote ceiling to BCM_TCS_CMD_VOTE_MASK to ensure the votes aren't
truncated, which can result in lower frequencies than desired.
Fixes: 04053f4d23a4 ("clk: qcom: clk-rpmh: Add IPA clock support")
Cc: stable@vger.kernel.org
Signed-off-by: Mike Tipton <quic_mdtipton@quicinc.com>
Reviewed-by: Taniya Das <quic_tdas@quicinc.com>
Signed-off-by: Imran Shaik <quic_imrashai@quicinc.com>
Link: https://lore.kernel.org/r/20240809-clk-rpmh-bcm-vote-fix-v2-1-240c584b7ef9@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
index bb82abeed88f..4acde937114a 100644
--- a/drivers/clk/qcom/clk-rpmh.c
+++ b/drivers/clk/qcom/clk-rpmh.c
@@ -263,6 +263,8 @@ static int clk_rpmh_bcm_send_cmd(struct clk_rpmh *c, bool enable)
cmd_state = 0;
}
+ cmd_state = min(cmd_state, BCM_TCS_CMD_VOTE_MASK);
+
if (c->last_sent_aggr_state != cmd_state) {
cmd.addr = c->res_addr;
cmd.data = BCM_TCS_CMD(1, enable, 0, cmd_state);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 5.4.y] clk: qcom: clk-rpmh: Fix overflow in BCM vote
2024-10-07 16:51 FAILED: patch "[PATCH] clk: qcom: clk-rpmh: Fix overflow in BCM vote" failed to apply to 5.4-stable tree gregkh
@ 2024-10-08 18:50 ` Mike Tipton
0 siblings, 0 replies; 2+ messages in thread
From: Mike Tipton @ 2024-10-08 18:50 UTC (permalink / raw)
To: stable; +Cc: quic_tdas, Mike Tipton, Imran Shaik, Bjorn Andersson
Valid frequencies may result in BCM votes that exceed the max HW value.
Set vote ceiling to BCM_TCS_CMD_VOTE_MASK to ensure the votes aren't
truncated, which can result in lower frequencies than desired.
Fixes: 04053f4d23a4 ("clk: qcom: clk-rpmh: Add IPA clock support")
Cc: stable@vger.kernel.org
Signed-off-by: Mike Tipton <quic_mdtipton@quicinc.com>
Reviewed-by: Taniya Das <quic_tdas@quicinc.com>
Signed-off-by: Imran Shaik <quic_imrashai@quicinc.com>
Link: https://lore.kernel.org/r/20240809-clk-rpmh-bcm-vote-fix-v2-1-240c584b7ef9@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
(cherry picked from commit a4e5af27e6f6a8b0d14bc0d7eb04f4a6c7291586)
Signed-off-by: Mike Tipton <quic_mdtipton@quicinc.com>
---
drivers/clk/qcom/clk-rpmh.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
index d7586e26acd8..f83ac6e8d660 100644
--- a/drivers/clk/qcom/clk-rpmh.c
+++ b/drivers/clk/qcom/clk-rpmh.c
@@ -270,6 +270,8 @@ static int clk_rpmh_bcm_send_cmd(struct clk_rpmh *c, bool enable)
cmd_state = c->aggr_state;
}
+ cmd_state = min(cmd_state, BCM_TCS_CMD_VOTE_MASK);
+
if (c->last_sent_aggr_state == cmd_state) {
mutex_unlock(&rpmh_clk_lock);
return 0;
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-08 18:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-07 16:51 FAILED: patch "[PATCH] clk: qcom: clk-rpmh: Fix overflow in BCM vote" failed to apply to 5.4-stable tree gregkh
2024-10-08 18:50 ` [PATCH 5.4.y] clk: qcom: clk-rpmh: Fix overflow in BCM vote Mike Tipton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.