[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZIeGrCj2bk2nVvIc@gerhold.net>
Date: Mon, 12 Jun 2023 22:57:16 +0200
From: Stephan Gerhold <stephan@...hold.net>
To: Konrad Dybcio <konrad.dybcio@...aro.org>
Cc: Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Georgi Djakov <djakov@...nel.org>,
Leo Yan <leo.yan@...aro.org>,
Evan Green <evgreen@...omium.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Marijn Suijten <marijn.suijten@...ainline.org>,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-clk@...r.kernel.org, linux-pm@...r.kernel.org,
devicetree@...r.kernel.org,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Subject: Re: [PATCH v3 20/23] interconnect: qcom: icc-rpm: Fix bucket number
On Mon, Jun 12, 2023 at 08:24:37PM +0200, Konrad Dybcio wrote:
> SMD RPM only provides two buckets, one each for the active-only and
> active-sleep RPM contexts. Use the correct constant to allocate and
> operate on them.
>
> This will make the qcom,icc.h header no longer work with this driver,
> mostly because.. it was never meant to! The commit that introduced
> bucket support to SMD RPM was trying to shove a square into a round
> hole and it did not work out very well. That said, there are no
> active users of SMD RPM ICC + qcom,icc.h, so that doesn't hurt.
>
> Fixes: dcbce7b0a79c ("interconnect: qcom: icc-rpm: Support multiple buckets")
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@...aro.org>
> ---
> drivers/interconnect/qcom/icc-rpm.c | 14 +++++++-------
> drivers/interconnect/qcom/icc-rpm.h | 4 ++--
> 2 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c
> index 5ffcf5ca8914..54a9999fe55d 100644
> --- a/drivers/interconnect/qcom/icc-rpm.c
> +++ b/drivers/interconnect/qcom/icc-rpm.c
> @@ -249,7 +249,7 @@ static void qcom_icc_pre_bw_aggregate(struct icc_node *node)
> size_t i;
>
> qn = node->data;
> - for (i = 0; i < QCOM_ICC_NUM_BUCKETS; i++) {
> + for (i = 0; i < QCOM_SMD_RPM_STATE_NUM; i++) {
> qn->sum_avg[i] = 0;
> qn->max_peak[i] = 0;
> }
> @@ -275,7 +275,7 @@ static int qcom_icc_bw_aggregate(struct icc_node *node, u32 tag, u32 avg_bw,
> if (!tag)
> tag = QCOM_ICC_TAG_ALWAYS;
We should replace this with the RPM variant. Also, can you check which
header/file still includes qcom,icc.h? Don't think we should have it
included at all for RPM so that referencing the wrong things cannot
happen.
Thanks,
Stephan
Powered by blists - more mailing lists