linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@arm.com>
To: Mike Leach <mike.leach@linaro.org>
Cc: Yingchao Deng <yingchao.deng@oss.qualcomm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	James Clark <james.clark@linaro.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Tingwei Zhang <tingwei.zhang@oss.qualcomm.com>,
	quic_yingdeng@quicinc.com, coresight@lists.linaro.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	Jinlong Mao <jinlong.mao@oss.qualcomm.com>,
	Mao Jinlong <quic_jinlmao@quicinc.com>
Subject: Re: [PATCH v6 2/2] coresight: cti: Add Qualcomm extended CTI support
Date: Fri, 5 Dec 2025 10:27:20 +0000	[thread overview]
Message-ID: <20251205102720.GP724103@e132581.arm.com> (raw)
In-Reply-To: <CAJ9a7VgV6chvWmeG2xta11YqyNpdRZqx4=EF7vC7k=J2utpRYQ@mail.gmail.com>

On Thu, Dec 04, 2025 at 03:07:10PM +0000, Mike Leach wrote:

[...]

> > > > > +             /*
> > > > > +              * QCOM CTI does not implement Claimtag functionality as
> > > > > +              * per CoreSight specification, but its CLAIMSET register
> > > > > +              * is incorrectly initialized to 0xF. This can mislead
> > > > > +              * tools or drivers into thinking the component is claimed.
> > > > > +              *
> > > > > +              * Reset CLAIMSET to 0 to reflect that no claims are active.
> > > > > +              */
> > > > > +             writel_relaxed(0, drvdata->base + CORESIGHT_CLAIMSET);
> > > >
> > > > I am confused for this.  If QCOM CTI does not implement claim tag,
> > > > then what is the designed register at the offset CORESIGHT_CLAIMSET?
> > > >
> > > > Should you bypass all claim tag related operations for QCOM CTI case?
> > > > (I don't see you touch anything for claim and declaim tags).
> > > >
> > >
> > > The patch I have created to handle systems without correct claim tag
> > > operation is a dependency for this patch set. Thus no need for
> > > override here as the core code will handle this correctly.
> > >
> > > The only issue is ensuring the non-CTI spec implementation will result
> > > in the correct detection of no claim tags present.
> >
> > Your patch works only when a module has implemented claim registers.
> >
> 
> Per the Coresight spec - unimplemented registers must be RAZ/WI- so
> this still works for non implemented claim registers.

QCOM CTI does not follow the spec in two aspects:

- Given the patch's comment: "QCOM CTI does not implement Claim tag
  functionality as per CoreSight specification", I am suspect the CLAIM
  registers are not implemented at all in QCOM CTI.

- It neither follows up the "unimplemented registers must be RAZ/WI" -
  the patch says its reset value is 0xF and then even can write 0 to it.

> > This leads to two issues: we end up clearing an unknown register in the
> > CTI driver, and then the coresight core layer assumes it is reading a
> > claim register even though it is not.
> 
> Again RAZ will simply read 0x0 - which is an indication that there are
> no claim bits implemented.
> 
> >
> > For QCOM CTI, combined with your patch, I would suggest directly
> > setting csdev->access.claim_tag_impl to false (perhaps using a helper).
> 
> That would be a better solution, though as Qcom appear to have
> implemented a pair of standard RW registers rather than the claim tag
> functionality, the write solution works for this particular
> implementation.

If an IP violates both the rules for implemented claim registers and
the rules for non-implemented claim registers, how can we rely on
these registers to detect the claim feature?

My feeling is we are building a house on sand - these registers are not
used for claim tags purpose at all.

Thanks,
Leo

  reply	other threads:[~2025-12-05 10:27 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-02  6:42 [PATCH v6 0/2] Add Qualcomm extended CTI support Yingchao Deng
2025-12-02  6:42 ` [PATCH v6 1/2] coresight: cti: Convert trigger usage fields to dynamic bitmaps and arrays Yingchao Deng
2025-12-04  9:54   ` Mike Leach
2025-12-02  6:42 ` [PATCH v6 2/2] coresight: cti: Add Qualcomm extended CTI support Yingchao Deng
2025-12-03 18:29   ` Leo Yan
2025-12-04  8:38     ` Leo Yan
2025-12-04  9:04       ` Mike Leach
2025-12-04 10:02         ` Leo Yan
2025-12-04  9:07     ` Mike Leach
2025-12-04 10:31       ` Leo Yan
2025-12-04 16:17         ` Mike Leach
2025-12-05 10:04           ` Leo Yan
2025-12-08 14:47             ` Mike Leach
2025-12-09  8:16               ` Yingchao Deng
2025-12-09  9:40                 ` Jie Gan
2025-12-09 11:03                 ` Jie Gan
2025-12-09 12:42                   ` Yingchao Deng (Consultant)
2025-12-09 12:19                 ` Leo Yan
2025-12-09 12:51                   ` Yingchao Deng (Consultant)
2025-12-09 14:24                     ` Leo Yan
2025-12-09 13:59               ` Leo Yan
2025-12-04  9:15     ` Mike Leach
2025-12-04 10:47       ` Leo Yan
2025-12-04 15:07         ` Mike Leach
2025-12-05 10:27           ` Leo Yan [this message]
2025-12-08 14:25             ` Mike Leach

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=20251205102720.GP724103@e132581.arm.com \
    --to=leo.yan@arm.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=coresight@lists.linaro.org \
    --cc=james.clark@linaro.org \
    --cc=jinlong.mao@oss.qualcomm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.leach@linaro.org \
    --cc=quic_jinlmao@quicinc.com \
    --cc=quic_yingdeng@quicinc.com \
    --cc=suzuki.poulose@arm.com \
    --cc=tingwei.zhang@oss.qualcomm.com \
    --cc=yingchao.deng@oss.qualcomm.com \
    /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).