From: Stephen Boyd <sboyd@kernel.org>
To: Bjorn Andersson <andersson@kernel.org>,
David Dai <daidavid1@codeaurora.org>,
Imran Shaik <quic_imrashai@quicinc.com>,
Michael Turquette <mturquette@baylibre.com>
Cc: linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org,
Ajit Pandey <quic_ajipan@quicinc.com>,
Imran Shaik <quic_imrashai@quicinc.com>,
Taniya Das <quic_tdas@quicinc.com>,
Jagadeesh Kona <quic_jkona@quicinc.com>,
Satya Priya Kakitapalli <quic_skakitap@quicinc.com>,
Mike Tipton <quic_mdtipton@quicinc.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] clk: qcom: clk-rpmh: Fix overflow in BCM vote
Date: Thu, 08 Aug 2024 12:43:00 -0700 [thread overview]
Message-ID: <a7607f45e26c79f13b846fd0d8284bcf.sboyd@kernel.org> (raw)
In-Reply-To: <20240808-clk-rpmh-bcm-vote-fix-v1-1-109bd1d76189@quicinc.com>
Quoting Imran Shaik (2024-08-08 00:05:02)
> From: Mike Tipton <quic_mdtipton@quicinc.com>
>
> 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>
> Signed-off-by: Imran Shaik <quic_imrashai@quicinc.com>
> ---
> drivers/clk/qcom/clk-rpmh.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/clk/qcom/clk-rpmh.c b/drivers/clk/qcom/clk-rpmh.c
> index bb82abeed88f..233ccd365a37 100644
> --- a/drivers/clk/qcom/clk-rpmh.c
> +++ b/drivers/clk/qcom/clk-rpmh.c
> @@ -263,6 +263,9 @@ static int clk_rpmh_bcm_send_cmd(struct clk_rpmh *c, bool enable)
> cmd_state = 0;
> }
>
> + if (cmd_state > BCM_TCS_CMD_VOTE_MASK)
> + cmd_state = BCM_TCS_CMD_VOTE_MASK;
> +
This is
cmd_state = min(cmd_state, BCM_TCS_CMD_VOTE_MASK);
next prev parent reply other threads:[~2024-08-08 19:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-08 7:05 [PATCH] clk: qcom: clk-rpmh: Fix overflow in BCM vote Imran Shaik
2024-08-08 7:27 ` Taniya Das
2024-08-08 19:43 ` Stephen Boyd [this message]
2024-08-09 5:18 ` Imran Shaik
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=a7607f45e26c79f13b846fd0d8284bcf.sboyd@kernel.org \
--to=sboyd@kernel.org \
--cc=andersson@kernel.org \
--cc=daidavid1@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=quic_ajipan@quicinc.com \
--cc=quic_imrashai@quicinc.com \
--cc=quic_jkona@quicinc.com \
--cc=quic_mdtipton@quicinc.com \
--cc=quic_skakitap@quicinc.com \
--cc=quic_tdas@quicinc.com \
--cc=stable@vger.kernel.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