From nobody Mon Sep 28 21:53:45 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 209E33C584A for ; Mon, 17 Aug 2026 08:50:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786956639; cv=none; b=IDBcARv/brSF5oGygdhCoGj2vqKT2X+iNsG4aJ//Httf+2lfUD1J2Z9LDU7Xg+XXk9n/A4k7bufXT5v8nkTS6+1jqPtz4ly0Ox+vqD7uqxjZqW8QSxb6o9Va+dsPi1jNufjQj9yrY2cdH3ojpuDY64qauMbk861kg/dQ1Qgt4iU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786956639; c=relaxed/simple; bh=KN33qKwL2lI5YfQnPfBNw1wyF5RZjLKT3iCdPNfTMiM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=OkWdKWOAPormSKi22XcvFYR1Tasxjwa4Q+dlC54LcDdvATzB6TX+Z6XUpJE/vj5oNR+EaWnqdgEJcuzPiBEjFdWy9SzQNK6DZNKfLEI37Dwio/su0tQeY1x9wenYMBBMme/FQulgbTWUjsunrizOQQJOoURdRI5N1bVocwkMZpU= 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=GWdTCzgc; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=ECXphLgO; arc=none smtp.client-ip=205.220.180.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="GWdTCzgc"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="ECXphLgO" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67H5oFP71328130 for ; Mon, 17 Aug 2026 08:50:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=ok2pSFo9mjBytCFk9nb5U0 sb/U1t+WEEb+M0pQ2ZHuY=; b=GWdTCzgck7CPq+CsyyDXuPeMjWgX0uy9raHhK4 9plx1SaQLFeAbwJ+sTccEPmn3Q0/1OkdDWenCCLkfhVRSQ1Zox5wPRYhTYX/ZwSL 9NEph7uNbf5FDC1A7yhht7tf7e2e/l/8IRZm6hdiGuJzow0TS5eSuuEG6C3vB6Jc 18WTCG8i0i/sTDlLJfMkkV0mim7vjg3I9v02W2pfYi2IzupGe91hI9+EbU63PCyX 6GSMebHAQBS3xMzlZAUGfk1Bw4RcUkxSuGREpjsfUIdnL6lw4ibDa6Em5OJMZOen EjyI/5KDNOw1zMyBpkhHFcdoLfN0l6g2yWUStKEORXPRAcKg== Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4g3vghrs88-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 17 Aug 2026 08:50:36 +0000 (GMT) Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-ca124bf0189so3230680a12.0 for ; Mon, 17 Aug 2026 01:50:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1786956636; x=1787561436; darn=vger.kernel.org; h=cc:to:message-id:content-transfer-encoding:content-type :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=ok2pSFo9mjBytCFk9nb5U0sb/U1t+WEEb+M0pQ2ZHuY=; b=ECXphLgO0Ei1qgq3jJXWBgJb2i0YdpumGmfBuNEjMq8BoR36qD3mhGVetyd7gv3ZqL 4yYcmoA2OB5Gm/5amXo85aybrqhx5EJ241BdhQkfAfYRKnEfxlNpRsfoe4YnQXTsrcY5 QxyVL4+RWvIMSwCxLxvHD20OuA1nK73fez3mim9rvDrOjkn3EaE8X1YGXHMuuspAnSZV sUQl7du/CsQVxJ0Ug/UN8nEw7Xvt7ikF6D+wasb3AGFM89JpuM9Y2sXAfb05Nf4jEtT4 4x1orD1hewdrFHBID/hj8uQsEMjNFk5weMBKOAEtezvoHV2CCHDqrw5MQBsf2xbAKVKh 1bzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786956636; x=1787561436; h=cc:to:message-id:content-transfer-encoding:content-type :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=ok2pSFo9mjBytCFk9nb5U0sb/U1t+WEEb+M0pQ2ZHuY=; b=qYtKfeMhO9pApOeSyUmAKxp/21/Fzso2Bgez4ZF7jQ0gOxRDIJTT7dG0utRcUvJN8m FwULuQwXOqHBpvVqBbeVoqVSQyL1acajz+fxtvPiXufo8ROScaEbUhlvmQeYdCZFygoe TS08DhZQV8xOS706wKzzC4Xg863oU3PdKNBaRQAA7Vl0nvGTqEIZRDAehJyfChaiR/RC 91zp9z6LV0NP6BKy9nqHuB1CJ6dVyjErZCpv7YW54u9nbzSLDtp59py+JjLzsvR5bMhj nlG9fJjNefTMGEe0a5v/NPm0SZ59zkVvqVu0YZznTHyQTNX10ByCSPkZVYfaX74YYQC1 qABA== X-Forwarded-Encrypted: i=1; AHgh+RqA7fCoSWPVrR7yQOCH3zQA+4rZF/stes2BNJnYkKNIW7cppeZS7vtwd0EG5zi1QGq8qB+8kQ8hU9trEtA=@vger.kernel.org X-Gm-Message-State: AOJu0YxXHLFBzADlRISVGG3UlV785ov8uwXMSeNr5qjIx9N+WTYpSt5K vvDz1LN4g0giM00tSL07WwHxRpwC5lTLLLvo2Vn7aB+cCuhoN1ZpmEMgWT4u4ETvqpTKTwyaNz/ rQ+js1ocoWpz/A7nQofH/znzG+H2sNm0XYo6HvNLN6tIQsFRJAa35ehMJJr8pXuBwK5j7aPzpGx jhiA== X-Gm-Gg: AR+sD13+GRa37Z3uNB5leDkB59I/KzPpKBJQUvGmOhsT9LRmVCuFpUdNYfypREX63FT J5pPvBe6trOoCbtHvd1Zo9DYtO2I9W+ANRPUBoGs3lJBGGu6u0IECmmxc4YVfVSyWcbedeJ0oNB KxA91Rqp4nMdp0ThkMnMtiu2dF9SqoZcrUqGUCMKCbHGYJvfj2bTgEjkc70UaExEaYVAf+kVBzf D+vWl1qsQa7tbl3jl3QoUKAfr9jsJFzwdkFIOFuesacvNI4O9QJgqlvCIZB490j108wJtfwrJb2 0n5NZlc3rJ+02aTOdTdhUbgavpNQzcSCR/qpkLMeDJYyN7PKjmW5P6MZcCXYRlKMW3DG2ABsLZj JiaKtWonUhRtdDTgjczXPwnQxy+HcszopvypwyxOUdNLjCkYF7+PLGClvdzVQUXs= X-Received: by 2002:a17:90b:574d:b0:38e:5828:a446 with SMTP id 98e67ed59e1d1-3933b1091eemr18012071a91.19.1786956635570; Mon, 17 Aug 2026 01:50:35 -0700 (PDT) X-Received: by 2002:a17:90b:574d:b0:38e:5828:a446 with SMTP id 98e67ed59e1d1-3933b1091eemr18012033a91.19.1786956635111; Mon, 17 Aug 2026 01:50:35 -0700 (PDT) Received: from jiegan-gv.ap.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3953202e9ddsm4047281a91.17.2026.08.17.01.50.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2026 01:50:34 -0700 (PDT) From: Jie Gan Date: Mon, 17 Aug 2026 16:50:15 +0800 Subject: [PATCH] coresight: fix trace ID search skipping pass-through NoC devices 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="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260817-fix-trace-id-assign-issue-v1-1-b2164e33f9fa@oss.qualcomm.com> X-B4-Tracking: v=1; b=H4sIAEfLgmoC/x2MQQqAIBBFrxKzbkBdWHaVaCE61WwsnIpAunvW8 vHffwWEMpPA0BTIdLHwlirotoGw+rQQcqwMRhmret3hzDce2YdvQC/CS0IWOQmjsY6cijpYA/W /Z6ry3x6n53kBmKVSI2sAAAA= To: Suzuki K Poulose , Mike Leach , James Clark , Leo Yan , Alexander Shishkin , Richard Cheng Cc: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jie Gan X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1786956630; l=2131; i=jie.gan@oss.qualcomm.com; s=20250909; h=from:subject:message-id; bh=KN33qKwL2lI5YfQnPfBNw1wyF5RZjLKT3iCdPNfTMiM=; b=Yj0vMaNEmHKClns0KiuULI4MPRVf0TD1/RQgrsno7JaEjIpAPMMn3IIZgaPao1vd1wvklo4AI NN06xZ4oArFB07yuLpA9QDJRt46F99Bon9dWGsK5gobplLLp8he312s X-Developer-Key: i=jie.gan@oss.qualcomm.com; a=ed25519; pk=3LxxUZRPCNkvPDlWOvXfJNqNO4SfGdy3eghMb8puHuk= X-Authority-Analysis: v=2.4 cv=P9gKQCAu c=1 sm=1 tr=0 ts=6a82cb5c cx=c_pps a=rz3CxIlbcmazkYymdCej/Q==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=z2a3U2wxpuANWwaHzp8A:9 a=QEXdDO2ut3YA:10 a=bFCP_H2QrGi7Okbo017w:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwODE3MDA2NSBTYWx0ZWRfX4kudqfYcFWjH AGiSV7ftnFbvzukzjar3gcZ/IEeJLRj/i/fFQja+VGBOunmmhr/BgeC1qwJkEf15nWMVXlNlGyt pnt6eH6hayw/LTESQXTge3oIo/dMjhA= X-Proofpoint-ORIG-GUID: Vfcbw2n2X2li9ffJEDEJfcQbes4rD-0o X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODE3MDA2NSBTYWx0ZWRfX0HPg0I1qhVlj gGnmMT3vNhJEiR9tOo7oCvyIswYmp9rjUdESf9zYTlnhGq4agVpgAVDgH/OzK0ldC/E+DEcZnii K18gFc3p+9FME9xzCuHoZQVvvPOhowDckx01lm+95as1IjXNTiEIYu5hFk/RTrrjGBsg0FJ19Pi irKo0IRjUKs9M5QyLwwuDAZH/P0s8sAc832q5HBU6/7JYGqK4lBI6YDnxhICVN7B94TS9u5ypxi mmotwO+si3ap40XPd/B835+qdOJiWvl1YlAYwCuXbJQouoTKQ+9ReSI4dES93hsh0zUKKcR2srI z0VnIjQ2LDQcFEJsgFGr0p5RWZy/oIMF/30ZIC1+yrYNuwXCmhrPCim29TYhpA13AxlaotSRvS7 JJ8W1gmq9Yu/Fj6h7oU/BjwUyI5J3AzEFm3rxQQDq72LSUXyL1IgwrdVtmTwhfmDvwye5oFmZ1t nXsZkMEKMNkwlZit5UA== X-Proofpoint-GUID: Vfcbw2n2X2li9ffJEDEJfcQbes4rD-0o X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-16_06,2026-08-12_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 impostorscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 spamscore=0 phishscore=0 bulkscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608170065 coresight_path_assign_trace_id() only treats a trace_id of 0 as "this device has no ID assignment, keep searching downstream". Pass-through NoC links such as itnoc (qcom,coresight-itnoc) intentionally return -EOPNOTSUPP from their .trace_id callback since they have no ATID register to program, but that negative value falls through to the IS_VALID_CS_TRACE_ID() check and is rejected, aborting the whole path with -EINVAL before the real trace ID owner further downstream is ever reached. This breaks enabling any source whose path traverses an itnoc, e.g. writing 1 to tpdm/enable_source for a TPDM fails with: sh: write error: Invalid argument Skip devices that return -EOPNOTSUPP the same way as devices that return 0, so the search continues to the next device on the path. Fixes: f4526ffee6ff ("coresight: fix missing error code when trace ID is in= valid") Signed-off-by: Jie Gan --- drivers/hwtracing/coresight/coresight-core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtraci= ng/coresight/coresight-core.c index 6d65c43d574f..949ee9f00097 100644 --- a/drivers/hwtracing/coresight/coresight-core.c +++ b/drivers/hwtracing/coresight/coresight-core.c @@ -953,8 +953,12 @@ int coresight_path_assign_trace_id(struct coresight_pa= th *path, /* Assign a trace ID to the path for the first device that wants to do i= t */ trace_id =3D coresight_get_trace_id(nd->csdev, mode, sink); =20 - /* 0 means the device has no ID assignment, so keep searching */ - if (trace_id =3D=3D 0) + /* + * 0 means the device has no ID assignment, and -EOPNOTSUPP + * means the device explicitly declines to assign one (e.g. a + * pass-through NoC) - in both cases keep searching downstream. + */ + if (trace_id =3D=3D 0 || trace_id =3D=3D -EOPNOTSUPP) continue; =20 if (!IS_VALID_CS_TRACE_ID(trace_id)) --- base-commit: 4477a78374a57c3809b172ad30cceabda48c47c6 change-id: 20260817-fix-trace-id-assign-issue-d269e90d1c62 Best regards, --=20 Jie Gan