Skip to contentSkip to conversation

FAILED: patch "[PATCH] clk: qcom: clk-rpmh: Fix overflow in BCM vote" failed to apply to 5.4-stable tree

PATCH New [email protected] 2 participants 2 messages Oct 7, 2024 – Oct 8, 2024

Subsystems (4)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

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 <[email protected]>.

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 '<[email protected]>' --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 <[email protected]>
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.

drivers/clk/qcom/clk-rpmh.c +2 -0
index bb82abeed88f..4acde937114a 100644
@@ -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);
#1 lore raw

PATCH 1/1 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")
(cherry picked from commit a4e5af27e6f6a8b0d14bc0d7eb04f4a6c7291586)
---
 drivers/clk/qcom/clk-rpmh.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/clk/qcom/clk-rpmh.c +2 -0
index d7586e26acd8..f83ac6e8d660 100644
@@ -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;
Signature · 1 line
2.17.1