Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jie Gan" <jie.gan@oss.qualcomm.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v5 2/5] coresight: tnoc: Bind Aggregator TNOC on the platform bus
Date: Tue, 07 Jul 2026 09:22:55 +0000	[thread overview]
Message-ID: <20260707092255.A432C1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260707-fix-tracenoc-probe-issue-v5-2-bf733ed9ebd0@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Unconditional trace ID put in AMBA remove path causes WARN splat if an AMBA device has the ITNOC compatible string.
--

--- Patch [2]: [PATCH v5 2/5] coresight: tnoc: Bind Aggregator TNOC on the platform bus ---
commit f735d2886baa617f8b66d797a2762302ad70464e
Author: Jie Gan <jie.gan@oss.qualcomm.com>

coresight: tnoc: Bind Aggregator TNOC on the platform bus

The Aggregator TNOC was originally bound as an AMBA device but lacks the
required CoreSight component ID registers, leading to probe failure. This
commit binds it to the platform bus where it matches by compatible string
instead. It also updates driver names and ID allocations so the ATID
unsupported check uses the qcom,coresight-itnoc compatible instead of the
bus type.

> diff --git a/drivers/hwtracing/coresight/coresight-tnoc.c b/drivers/hwtracing/coresight/coresight-tnoc.c
> index 9e8de4323d285..737cc802aefe6 100644
> --- a/drivers/hwtracing/coresight/coresight-tnoc.c
> +++ b/drivers/hwtracing/coresight/coresight-tnoc.c
> @@ -130,7 +130,7 @@ static int trace_noc_init_default_data(struct trace_noc_drvdata *drvdata)
>  {
>  	int atid;
>  
> -	if (!dev_is_amba(drvdata->dev)) {
> +	if (of_device_is_compatible(drvdata->dev->of_node, "qcom,coresight-itnoc")) {
>  		drvdata->atid = -EOPNOTSUPP;
>  		return 0;
>  	}

[Severity: Medium]
Will this cause a WARN splat in trace_noc_remove() if an AMBA device is
probed with the qcom,coresight-itnoc compatible string?

Previously, AMBA devices were guaranteed to have a positive trace ID because
of the !dev_is_amba() check. With this change, an AMBA device can be assigned
-EOPNOTSUPP.

During driver unbind, trace_noc_remove() unconditionally releases the ID:

drivers/hwtracing/coresight/coresight-tnoc.c:trace_noc_remove() {
	...
	coresight_unregister(drvdata->csdev);
	coresight_trace_id_put_system_id(drvdata->atid);
}

Should trace_noc_remove() include the same atid > 0 check that was
added below to tnoc_platform_remove()?

[ ... ]

> @@ -295,16 +295,18 @@ static int itnoc_probe(struct platform_device *pdev)
>  	return ret;
>  }
>  
> -static void itnoc_remove(struct platform_device *pdev)
> +static void tnoc_platform_remove(struct platform_device *pdev)
>  {
>  	struct trace_noc_drvdata *drvdata = platform_get_drvdata(pdev);
>  
>  	coresight_unregister(drvdata->csdev);
>  	pm_runtime_disable(&pdev->dev);
> +	if (drvdata->atid > 0)
> +		coresight_trace_id_put_system_id(drvdata->atid);
>  }

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260707-fix-tracenoc-probe-issue-v5-0-bf733ed9ebd0@oss.qualcomm.com?part=2

  reply	other threads:[~2026-07-07  9:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-07  9:08 [PATCH v5 0/5] Fix traceNoC probe issue on multiple QCOM platforms Jie Gan
2026-07-07  9:08 ` [PATCH v5 1/5] dt-bindings: arm: coresight-tnoc: Drop arm,primecell to bind on platform bus Jie Gan
2026-07-07  9:22   ` sashiko-bot
2026-07-09  7:59   ` Krzysztof Kozlowski
2026-07-09  8:34     ` Jie Gan
2026-07-09  8:46       ` Krzysztof Kozlowski
2026-07-09  9:02         ` Jie Gan
2026-07-09  9:17           ` Krzysztof Kozlowski
2026-07-07  9:08 ` [PATCH v5 2/5] coresight: tnoc: Bind Aggregator TNOC on the " Jie Gan
2026-07-07  9:22   ` sashiko-bot [this message]
2026-07-07  9:08 ` [PATCH v5 3/5] arm64: dts: qcom: kaanapali: fix traceNoC probe issue Jie Gan
2026-07-07  9:21   ` sashiko-bot
2026-07-07  9:08 ` [PATCH v5 4/5] arm64: dts: qcom: sm8750: " Jie Gan
2026-07-07  9:30   ` sashiko-bot
2026-07-07  9:08 ` [PATCH v5 5/5] arm64: dts: qcom: glymur: use Aggregator TNOC compatible Jie Gan

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=20260707092255.A432C1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jie.gan@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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