From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B1A3D3750D4 for ; Fri, 20 Mar 2026 08:45:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773996306; cv=none; b=XPCxwk/VVjJ+1fylel5WUgTFJKc8tZku8rTOm/uO71MQzG0LVM7jw+TsBOfj9aNi1aiTOmhiLstBMPddJI7PPvJR9/gnHabUO/wt7ktR+52LU70ySfWwqJsaSF/nZwX9bedEubc9lqRLpGRjjL9ZaV/Bm7V1Vu3a7NFD6/QB/H4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773996306; c=relaxed/simple; bh=pJ5MQ0MCrjEp/bDjci14oaS4w7eqPCAPvCqIKTkMFC4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=seVjZkGCGJ7TmyeMxTt5EKRfQ0/6u2fb8nf5ocuFWwS3F/aYu1oWn992i2TPx+xV6AgmhBR/LgN/GSkHjdDH24fA7U6kycuNgIyU48bbuwzuq6NNcJog9qMVnuw7d3omFz1fTqQ0fqpbClmIlbuCDJ+BpNVVVDFQ601f+9qS0Vg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=IQgFVcx8; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=eu11LMWC; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="IQgFVcx8"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="eu11LMWC" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62K2XgB33614562 for ; Fri, 20 Mar 2026 08:45:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= EWuvruh3A7A1eblubi8SZH4AWXMTECDRo91hQWmxO2s=; b=IQgFVcx8ZND4/xPw VnIicyD5JvnuuFblUThBYDluSO2mHIQOs9GPkTxsxGKvPTqgOkTenhSkCFZrzCre IF+XsyC/P2ai7qrsuiMngFMhnECoEjglsr70hZuuFrr5FuQusTRN+rM3p68nk4Zr mWZMPwrP3pm5dmEB18l+JOFylGJTZG7DtSeMgoPtiyOdOFNP0nVXXpndSFcaGO7U m4EEtnLmIasI0gF3/mjHjiJmCN88pCUc2bEUZo7ogWFgjrdxq07hu/bo610ILYQZ kipDS8DG7+VE3LQ8NI0dPZZRdI4BMNK3X2KV1nKAAnIiQD/hLuCUxBpZBWfQes+M hJ0bug== Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4d0qg79q4k-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 20 Mar 2026 08:45:03 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-2ae3badc00dso25947885ad.3 for ; Fri, 20 Mar 2026 01:45:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1773996303; x=1774601103; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=EWuvruh3A7A1eblubi8SZH4AWXMTECDRo91hQWmxO2s=; b=eu11LMWCjfTzoz3cxDRmg9hIaFWja3hSkOy/1zVAyuc7fqDKBRGQYz5V41jKMjig4m jQFkUQ9RnzOfP1GZkJTmbZOgYSxy52WMGXb3YQaqnp3m4pfrpGXRxDiHPNzGs90q6Eo4 Gu+3eaD1PTSAYSqw0OkE+po0EzwNGvDFZA8cNFe+hDBDQj9KI06jxqfRLZHFgCadS82J TtWh7gTH0hBdJpPxxLw+LUknMbYBzSUFWgH0pZjIqi0tQ7X1Nyp8psrXWMK+sbFlwFM8 lZDOXHDeLDX6HkB67bXz6sJGlFLcIy1tLDEvpNlElc3x/FGjePXMQVKffQRxMYRj04mG 7gQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773996303; x=1774601103; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EWuvruh3A7A1eblubi8SZH4AWXMTECDRo91hQWmxO2s=; b=GmDGeNEROosBq16FOb+yQ3te1VGgNSqFCXDd0lcGTSmENDBZXJ5TQKcEBH9PAJ39Z0 tAqKgz6GUHofm2OBgnio82LcY+OB9mPao1zcrU7vGsK8M8W8vZ6NcWVfs5FIC4Wu0mPU 8Kxg2J802zR6ZLl1hAVKcj/t3x/RjqfM5ywInIrlt63T27XgqtVob51qv+2sn1eFADEO G+9FUxrbhb2Fw3/1A/42ztj3fqGhgwj9E9nGhY0IwJhX/UJNAlbEIRakkXxYmL1jqrnz QcAcaYOeFm6zG32v/W6LU7GwXmOl/haIYVxP3KbSvxSXJmrXHUyYipmq++JTXKAWD3lc 2p9g== X-Forwarded-Encrypted: i=1; AJvYcCVUL6NZW1RlmGudqqEeXE+cChZlqdq/jJ2tFvfGvl4pvH/qjVY305alko/TixV5/+GYSXLnyu2PCsL7wWY=@vger.kernel.org X-Gm-Message-State: AOJu0Yxxr8fLXJ3LD9uxftx6GBi5WYqVYsOb3GBrciq03yZQj/ATmD1/ Z5/i6iQ5S499KYvmg0ceR49pQU52COx2FCBUqKHwVzWkoD1+9EVgkVkzDlf665jM0yz6Pjbr4V/ VQA2vahJjbpcCZzWmDVT34BIwk7eBVS+IlVv0R3KThhrEztQG4rd7oGrJqHYcUlp+13E= X-Gm-Gg: ATEYQzzYM/eo0OwT6gVe557YELgsH1J6t+OId3AeI3YizGekFYheRpYttsB1cqmC5B7 Tzje3WBxDXD8BUgVJPlOCmMMymM6n3BTMa+96zXMiPoVFkzQkrV9HgKIA1RJSdRI/59Q9huLz/k zf/0Jindn1xtXsXoRnp9IawdoQMtFXBA4gyoSVBQG8OCB0wLxmeG2gamu1itddbSSbjC5rvYJKg A1pElGyFlCzwljQU/nmgdVbjhZzoIYBAcaeNIzwjZUtRYY2tpvgNNwFz8rnhZ/QRDd34f/u5I+l JdHRHoma3jCutp4pgb4VTZci7DBsRuFvhj55aLyb+tYAaRtXgO0u8pXIYo3AdsL7wYwPZs84rkz nPBC85gt7aglvkCAMjfBP7WSxoGd3d6ftifXZCU384xrUbmV6v3il/ootU7EPUYGTXTC9Ldn7kf JU94Vg0/1nUzI= X-Received: by 2002:a17:902:ec92:b0:2ae:ac0c:5a2a with SMTP id d9443c01a7336-2b0826c6976mr20275595ad.6.1773996303261; Fri, 20 Mar 2026 01:45:03 -0700 (PDT) X-Received: by 2002:a17:902:ec92:b0:2ae:ac0c:5a2a with SMTP id d9443c01a7336-2b0826c6976mr20275345ad.6.1773996302732; Fri, 20 Mar 2026 01:45:02 -0700 (PDT) Received: from [10.133.33.163] (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b083655b5dsm20723185ad.52.2026.03.20.01.44.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Mar 2026 01:45:01 -0700 (PDT) Message-ID: <519ca61b-049e-4e2f-a9fc-9b4621574470@oss.qualcomm.com> Date: Fri, 20 Mar 2026 16:44:54 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] coresight: platform: check the availability of the endpoint before parse To: Leo Yan 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 References: <20260320-add-availability-check-v1-1-b2e39cdeb6e0@oss.qualcomm.com> <20260320082549.GO8048@e132581.arm.com> Content-Language: en-US From: Jie Gan In-Reply-To: <20260320082549.GO8048@e132581.arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: gBO_fE1PZ9-No7WBC7igu0ImbYOAX3AX X-Proofpoint-GUID: gBO_fE1PZ9-No7WBC7igu0ImbYOAX3AX X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzIwMDA2NSBTYWx0ZWRfX8aznIMJdEPd3 e+/1zU8Z59pfSfPTOizv/imeY93JPFR/NAFGdafKvN4yWkv4lVbM622EY9YgEGMSHEO4W8p5foR zzv92rV89XxrXTSIxeorDzFd5HD81a7hi8prtcbu/M5yyjA/YnVnBmp9jLFmR77V5zvRigGGQDZ FZfEk/7uLsw60PzGxiOGplMg243q63UFNrnwJ2DFdPLRqCXbEMBDDWIapO5dCxzkNvoe9mMiTrU Cti2PjMDs3N1cqy2pTeed9u9xYCs9FU7L4mEPaCtKZlu20xjDFKAurDjPp+AuT+wLFKEmIIBAjk ltTk6kdELIn3Zxt/nLUmwfVePrH2HsffvHNt1AIwgXgY+basxAzPjUlJK3zUNtI947j+RS6+tDR JLYAd+8YI1e1r5cxueNUOwsfCW20WOJFf7RTu2HUyyMy8J3eyAAHrTQN4yDTvdZ6tkmyx0azL0i PTCRrTjGbTgzRmrytTA== X-Authority-Analysis: v=2.4 cv=fdGgCkQF c=1 sm=1 tr=0 ts=69bd090f cx=c_pps a=JL+w9abYAAE89/QcEU+0QA==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=XMd_ep3at93-ufPvPDIA:9 a=QEXdDO2ut3YA:10 a=324X-CrmTo6CU4MGRt3R:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-03-20_01,2026-03-19_05,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 impostorscore=0 lowpriorityscore=0 spamscore=0 adultscore=0 bulkscore=0 priorityscore=1501 malwarescore=0 clxscore=1015 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2603200065 Hi Leo, On 3/20/2026 4:25 PM, Leo Yan wrote: > 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? It's about the coresight_find_device_by_fwnode() returns NULL, resulting in -EPROBE_DEFER. So the probe process will re-start after several seconds, but always failed because we have a "disabled" device node in DT(we can see this device in DT, but it never becomes available). It's ok if the device only has one remote device, but has issue with more than one remote devices. Consider below situation: device0 | | device1 device2(status = "disabled") The probe of device0 succeeds only when device1 and device2 are available at probe time. But I think it's ok to probe the device0 only with device1 available. Thanks, Jie > >> 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 >>