From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0488431691C for ; Fri, 20 Mar 2026 08:25:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773995155; cv=none; b=Nk4y8os7h9fzLWtICARKSYM3fQePNBKWFTdOYNmkYa524oFQCJsHZcbwqQS/0eKn874ubwNA5I01cXOuTnvfwZJaJU+PpGTLrw9YIhrGmRkFOTXAcKPS/EtF0oWSfOLxMqL3Q5f4KbmIvW8N8kG8wXAjOkM5gTpFzJeyl7GgSKg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773995155; c=relaxed/simple; bh=NC4xeZztU9755dL1VNg5n4Dldl2dAal/iAynXlRTFJ4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iMUrRAm2+1K8zDgVYXuVNTeTpDFkJrehnt1GiasC2hkkTT/u4+Bjbrq2TlSMqShDVtc78cqq/OdjTEI8FrSkYJycyrbXaMAccCS7ShC95ouz07OuuocXHjlHPPEWfRrs8fVnhVfumR1mjgsCO3E5XDKyVP/yu2uzVNpLS6JK1rU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EAD3A1570; Fri, 20 Mar 2026 01:25:45 -0700 (PDT) Received: from localhost (e132581.arm.com [10.1.196.87]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A2F383F73B; Fri, 20 Mar 2026 01:25:51 -0700 (PDT) Date: Fri, 20 Mar 2026 08:25:49 +0000 From: Leo Yan To: Jie Gan Cc: Suzuki K Poulose , Mike Leach , James Clark , Alexander Shishkin , Tingwei Zhang , 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 Message-ID: <20260320082549.GO8048@e132581.arm.com> References: <20260320-add-availability-check-v1-1-b2e39cdeb6e0@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > --- > 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 >