devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 3/4] soc: qcom: stats: support SM8150 platform
Date: Mon, 11 Dec 2023 11:46:37 +0100	[thread overview]
Message-ID: <730b81ae-1fc5-4d23-9a18-04d41e40a579@linaro.org> (raw)
In-Reply-To: <CAA8EJpqw+hC05QP1mWkA-SsKEehjp7ipb_HzUW2nyWjqZ8WkXQ@mail.gmail.com>

On 11.12.2023 10:43, Dmitry Baryshkov wrote:
> On Mon, 11 Dec 2023 at 11:11, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>>
>> On 9.12.2023 22:56, Dmitry Baryshkov wrote:
>>> On SM8150 the RPMh stats have 3 data records, but no DDR sleep stats,
>>> which demands platform-specific compatible and data.
>>>
>>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>>> ---
>> I don't think it makes sense considering the driver could detect the
>> presence (or possibility of presence) of DDR stats at runtime.
> 
> No, it can not really. We have safety nets for checking the offset
> value and then checking the magic number. But I'd prefer to be
> explicit here. It's not that the 'invalid' data at this offset is 0 or
> ~0.
> So, I'd prefer to be explicit here.
I'd say we're quite covered:

if (ddr_stats_offset)
	if (offset is within the range) // your latest patchset
		if (ddr_stats_magic)
			if (entries)
				"show stats"
			else
				"show nothing"
		else
			"no ddr stats"
	else
		"no ddr stats"
else
	"no ddr stats"

Konrad



  reply	other threads:[~2023-12-11 10:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-09 21:55 [PATCH 1/4] dt-bindings: soc: qcom: stats: add compatible for SM8150 platform Dmitry Baryshkov
2023-12-09 21:55 ` [PATCH 2/4] soc: qcom: stats: don't crash if DDR offset contains invalid data Dmitry Baryshkov
2023-12-11  9:10   ` Konrad Dybcio
2023-12-14  0:59     ` Doug Anderson
2023-12-14 11:59       ` Konrad Dybcio
2023-12-09 21:56 ` [PATCH 3/4] soc: qcom: stats: support SM8150 platform Dmitry Baryshkov
2023-12-11  9:11   ` Konrad Dybcio
2023-12-11  9:43     ` Dmitry Baryshkov
2023-12-11 10:46       ` Konrad Dybcio [this message]
2023-12-11 11:09         ` Dmitry Baryshkov
2023-12-09 21:56 ` [PATCH 4/4] arm64: dts: qcom: sm8150: use SoC-specific compat for RPMh stats Dmitry Baryshkov
2023-12-11 10:50 ` [PATCH 1/4] dt-bindings: soc: qcom: stats: add compatible for SM8150 platform Krzysztof Kozlowski

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=730b81ae-1fc5-4d23-9a18-04d41e40a579@linaro.org \
    --to=konrad.dybcio@linaro.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).