public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@arm.com>
To: Jie Gan <jie.gan@oss.qualcomm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>,
	Mike Leach <mike.leach@arm.com>,
	James Clark <james.clark@linaro.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Tingwei Zhang <tingwei.zhang@oss.qualcomm.com>,
	coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] coresight: platform: check the availability of the endpoint before parse
Date: Fri, 20 Mar 2026 08:25:49 +0000	[thread overview]
Message-ID: <20260320082549.GO8048@e132581.arm.com> (raw)
In-Reply-To: <20260320-add-availability-check-v1-1-b2e39cdeb6e0@oss.qualcomm.com>

On Fri, Mar 20, 2026 at 03:31:12PM +0800, Jie Gan wrote:
> Check endpoint availability before parsing it. If parsing a connected
> endpoint fails, the probe is deferred until the endpoint becomes
> available, or eventually fails.

I want to clarify a bit the failure flow.

Does this mean coresight_find_device_by_fwnode() returns NULL when the
remote device is not found, resulting in -EPROBE_DEFER, but the probe
never waits for the remote device to become available?

> In some legacy cases, a replicator
> has two output ports where one is disabled and the other is available.
> The replicator probe always fails because the disabled endpoint never
> becomes available for parsing. In addition, there is no need to defer
> probing a device that is connected to a disabled device, which improves
> probe performance.
> 
> Signed-off-by: Jie Gan <jie.gan@oss.qualcomm.com>
> ---
>  drivers/hwtracing/coresight/coresight-platform.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-platform.c b/drivers/hwtracing/coresight/coresight-platform.c
> index 0ca3bd762454..e337b6e2bf32 100644
> --- a/drivers/hwtracing/coresight/coresight-platform.c
> +++ b/drivers/hwtracing/coresight/coresight-platform.c
> @@ -220,6 +220,8 @@ static int of_coresight_parse_endpoint(struct device *dev,
>  		rparent = of_coresight_get_port_parent(rep);
>  		if (!rparent)
>  			break;
> +		if (!of_device_is_available(rparent))
> +			break;
>  		if (of_graph_parse_endpoint(rep, &rendpoint))
>  			break;
>  
> 
> ---
> base-commit: b5d083a3ed1e2798396d5e491432e887da8d4a06
> change-id: 20260320-add-availability-check-4cb2ee6e520b
> 
> Best regards,
> -- 
> Jie Gan <jie.gan@oss.qualcomm.com>
> 


  reply	other threads:[~2026-03-20  8:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-20  7:31 [PATCH] coresight: platform: check the availability of the endpoint before parse Jie Gan
2026-03-20  8:25 ` Leo Yan [this message]
2026-03-20  8:44   ` Jie Gan
2026-03-20  9:23     ` Leo Yan

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=20260320082549.GO8048@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=jie.gan@oss.qualcomm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.leach@arm.com \
    --cc=suzuki.poulose@arm.com \
    --cc=tingwei.zhang@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