linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: saiprakash.ranjan@codeaurora.org, robh+dt@kernel.org,
	mathieu.poirier@linaro.org, leo.yan@linaro.org,
	alexander.shishkin@linux.intel.com, andy.gross@linaro.org,
	david.brown@linaro.org, vivek.gautam@codeaurora.org,
	dianders@chromium.org, sboyd@kernel.org,
	bjorn.andersson@linaro.org, devicetree@vger.kernel.org,
	mark.rutland@arm.com
Cc: rnayak@codeaurora.org, sibis@codeaurora.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCHv4 1/4] arm64: dts: qcom: sdm845: Add Coresight support
Date: Tue, 22 Jan 2019 16:08:40 +0000	[thread overview]
Message-ID: <91a90daa-9e14-2d2e-e633-2ddfdc0955bf@arm.com> (raw)
In-Reply-To: <75ed74af-6946-b86d-092e-42dc16e55308@codeaurora.org>

Hi Sai,

On 01/22/2019 03:02 PM, Sai Prakash Ranjan wrote:
> Hi Suzuki,
> 
> Thanks for looking into this. Please find my response inline.
> 
> On 1/22/2019 7:30 PM, Suzuki K Poulose wrote:
>> Hi Sai,
>>
>> On 01/22/2019 01:37 PM, Sai Prakash Ranjan wrote:
>>> Add coresight components found on Qualcomm SDM845 SoC.
>>>
>>> Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
>>>
>>
>> Sorry, but I hadn't noticed the PID override strings below. Please
>> find the question.
>>
> [..]
> 
>>> +        /*
>>> +         * On QCOM SDM845, we bypass the normal AMBA bus discovery
>>> +         * method by forcing the peripheral ID because of the wrong
>>> +         * value read from ETM PID registers.
>>> +         */
>>
>> What is the value read back from the ETM PIDx registers ? Do they
>> provide inconsistent or incompatible value w.r.t the ETM/Coresight
>> architecture ? If it is an unsupported CPU with proper values,
>> you must add them to the table in etm4x driver.
>>
> 
> The values read from ETM PIDx registers are actually inconsistent
> and is different for some ETMs.

By inconsistent, I meant the registers provides values which are not
the same on two different CPUs of the *same type*. And it is expected
that two different CPU/ETM implementations will have different PIDs.

> 
> Below are the PIDs read for SDM845:
> 
> [    5.996448] resname=etm@7040000 pid=001bb803
> [    6.052891] resname=etm@7140000 pid=001bb803
> 
> <snip> .. (Same pid=001bb803 for etm@7240000 to etm@7540000 but differs
> for other 2 cpus as shown below)
> 
> [    6.266687] resname=etm@7640000 pid=001bb802
> [    6.329171] resname=etm@7740000 pid=001bb802
> 
> This is the case for MSM8996 also as shown below where PID
> value is not correct and has to be hardcoded.

They differ because they are two different types of CPU cores (and thus 
different ETM PIDs). What does the Register descriptions say for
the Cores ?

To me it looks like there are two different types of Qualcomm
Cores with their respective ETMs which are missing in the ETM4x
driver and we are trying to "make the ETM" work by faking it as
something else, which is not nice. I would rather prefer
to add the appropriate masks and the expected value for these
two different ETM implementations and be done with it, instead
of faking it in all the DTs where these cores appear.

> 
> For MSM8996:
> 
> resname=etm@3b40000 pid=102f0205

I don't know what CPUs the MSM8996 have. If they don't have A53, you
must add the actual PIDs to the table once and for all.

> 
>>> +        etm@7040000 {
>>> +            compatible = "arm,coresight-etm4x", "arm,primecell";
>>> +            arm,primecell-periphid = <0x000bb95d> > +            reg 
>>> = <0 0x07040000 0 0x1000>;
>>> +
>>> +            cpu = <&CPU0>;
>>> +
>>
>> You seem to be specifying the PID of A53 ETM all over, while at least
>> one of your cores is ETMv4.2 (from the other patch) and A53 is not
>> ETMv4.2. As above, it would be good to add the PID to the table.
>>
> 
> As explained in above comment, PID values read are not correct. Please 
> let me know if I am not clear.

There is no measure for "correctness" here. If the ETM exposes different
PID than what you expect from the TRM, then we could think of overriding
it. Otherwise please add the PIDs to the table.

Cheers
Suzuki

  reply	other threads:[~2019-01-22 16:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-22 13:37 [PATCHv4 0/4] Add coresight support for SDM845 and MSM8996 Sai Prakash Ranjan
2019-01-22 13:37 ` [PATCHv4 1/4] arm64: dts: qcom: sdm845: Add Coresight support Sai Prakash Ranjan
2019-01-22 14:00   ` Suzuki K Poulose
2019-01-22 15:02     ` Sai Prakash Ranjan
2019-01-22 16:08       ` Suzuki K Poulose [this message]
2019-01-22 16:48         ` Sai Prakash Ranjan
2019-01-22 20:12           ` Suzuki K Poulose
2019-01-23 12:11             ` Sai Prakash Ranjan
2019-01-23 19:14               ` Mathieu Poirier
2019-01-23 20:17                 ` Sai Prakash Ranjan
2019-01-24 16:07                   ` Marc Gonzalez
2019-01-24 18:24                     ` Sai Prakash Ranjan
2019-01-24 16:07                   ` Mathieu Poirier
2019-01-24 18:31                     ` Sai Prakash Ranjan
2019-01-24 11:19               ` Suzuki K Poulose
2019-01-24 18:21                 ` Sai Prakash Ranjan
2019-01-28 17:15                   ` Mathieu Poirier
2019-01-28 19:17                     ` Sai Prakash Ranjan
2019-01-22 13:37 ` [PATCHv4 2/4] arm64: dts: qcom: msm8996: " Sai Prakash Ranjan
2019-01-22 13:37 ` [PATCHv4 3/4] coresight: etm4x: Add support to enable ETMv4.2 Sai Prakash Ranjan
2019-01-22 13:37 ` [PATCHv4 4/4] arm64: dts: qcom: sdm845: Remove the duplicate header inclusion Sai Prakash Ranjan

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=91a90daa-9e14-2d2e-e633-2ddfdc0955bf@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andy.gross@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=david.brown@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=leo.yan@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mathieu.poirier@linaro.org \
    --cc=rnayak@codeaurora.org \
    --cc=robh+dt@kernel.org \
    --cc=saiprakash.ranjan@codeaurora.org \
    --cc=sboyd@kernel.org \
    --cc=sibis@codeaurora.org \
    --cc=vivek.gautam@codeaurora.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).