mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Konrad Dybcio <konrad.dybcio@linaro.org>,
	linux-arm-msm@vger.kernel.org, andersson@kernel.org,
	agross@kernel.org
Cc: marijn.suijten@somainline.org, Georgi Djakov <djakov@kernel.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 12/12] interconnect: qcom: icc-rpm: Allow negative QoS offset
Date: Wed, 15 Feb 2023 03:16:40 +0200	[thread overview]
Message-ID: <24167f9e-328c-0201-7eea-de201bed4b6a@linaro.org> (raw)
In-Reply-To: <20230214143720.2416762-13-konrad.dybcio@linaro.org>

On 14/02/2023 16:37, Konrad Dybcio wrote:
> In some very very very very unfortunate cases, the correct offset of
> the QoS registers will be.. negative. One such case is MSM8998, where
> The DDR BWMON occupies what-would-be-the-BIMC-base which we usually
> take into account with the register calculation, making the actual
> BIMC node start at what-would-be-the-BIMC-base+0x300.
> 
> In order to keep the calculation code sane, the simplest - however
> ugly it may be - solution is to allow the offset to be negative.

I'm not sure how does this work, as e.g. qcom_icc_set_qnoc_qos() will 
try to access an address before the first register. Most probably this 
patch should go together with the rest of msm8998 patches.

A slightly better solution to making qos_offset negative might be to 
make bwmon a child node of the icc.

> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>   drivers/interconnect/qcom/icc-rpm.h | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qcom/icc-rpm.h
> index 77e263b93c27..5e4215f25c2e 100644
> --- a/drivers/interconnect/qcom/icc-rpm.h
> +++ b/drivers/interconnect/qcom/icc-rpm.h
> @@ -39,7 +39,7 @@ struct qcom_icc_provider {
>   	int num_intf_clks;
>   	enum qcom_icc_type type;
>   	struct regmap *regmap;
> -	unsigned int qos_offset;
> +	int qos_offset;
>   	u64 bus_clk_rate[2];
>   	bool keep_alive;
>   	struct clk_bulk_data bus_clks[2];
> @@ -105,7 +105,7 @@ struct qcom_icc_desc {
>   	bool keep_alive;
>   	enum qcom_icc_type type;
>   	const struct regmap_config *regmap_cfg;
> -	unsigned int qos_offset;
> +	int qos_offset;
>   };
>   
>   /* Valid for all bus types */

-- 
With best wishes
Dmitry


  reply	other threads:[~2023-02-15  1:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230214143720.2416762-1-konrad.dybcio@linaro.org>
2023-02-14 14:37 ` [PATCH v4 01/12] interconnect: qcom: rpm: make QoS INVALID default, separate out driver data Konrad Dybcio
2023-02-14 14:37 ` [PATCH v4 02/12] interconnect: qcom: rpm: Add support for specifying channel num Konrad Dybcio
2023-02-14 14:37 ` [PATCH v4 03/12] interconnect: qcom: Sort kerneldoc entries Konrad Dybcio
2023-02-14 14:37 ` [PATCH v4 04/12] interconnect: qcom: rpm: Rename icc desc clocks to bus_blocks Konrad Dybcio
2023-02-14 14:37 ` [PATCH v4 05/12] interconnect: qcom: rpm: Rename icc provider num_clocks to num_bus_clocks Konrad Dybcio
2023-02-14 14:37 ` [PATCH v4 06/12] interconnect: qcom: rpm: Handle interface clocks Konrad Dybcio
2023-02-14 14:37 ` [PATCH v4 07/12] interconnect: qcom: icc-rpm: Allow negative num_bus_clocks Konrad Dybcio
2023-02-14 14:37 ` [PATCH v4 08/12] interconnect: qcom: msm8996: Specify no bus clock scaling on A0NoC Konrad Dybcio
2023-02-14 14:37 ` [PATCH v4 09/12] interconnect: qcom: rpm: Don't use clk_get_optional for bus clocks anymore Konrad Dybcio
2023-02-14 14:37 ` [PATCH v4 10/12] interconnect: qcom: msm8996: Promote to core_initcall Konrad Dybcio
2023-02-14 14:37 ` [PATCH v4 11/12] interconnect: qcom: icc-rpm: Introduce keep_alive Konrad Dybcio
2023-02-14 14:37 ` [PATCH v4 12/12] interconnect: qcom: icc-rpm: Allow negative QoS offset Konrad Dybcio
2023-02-15  1:16   ` Dmitry Baryshkov [this message]
2023-02-15  1:31     ` Konrad Dybcio
2023-02-14 16:27 ` [PATCH v4 00/12] The great interconnecification fixation Konrad Dybcio
2023-02-14 16:34   ` Neil Armstrong

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=24167f9e-328c-0201-7eea-de201bed4b6a@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=djakov@kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=marijn.suijten@somainline.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

all inboxes | Powered by JetHome®