Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1447004rdd; Wed, 10 Jan 2024 22:08:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IG8GzSb1Bn2+RnfpxEP1IMnC0YOaf9wuS8vv87CwujC9q77lEmhQHNv4QV/DNKaioi+D4QS X-Received: by 2002:a05:622a:253:b0:429:aec7:fe45 with SMTP id c19-20020a05622a025300b00429aec7fe45mr175611qtx.137.1704953332123; Wed, 10 Jan 2024 22:08:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704953332; cv=none; d=google.com; s=arc-20160816; b=XwsV71BNApm6cRLQRF3xjQHiRjA/P22jM8ahaC2ZlnyaZ7+oLNo+Q2XDUGo1/T2G4d +XqgrwINoen+A/eO9ZCVctnEjjCmJxWcVnzgkb702SzqvMS5evAf1tvjvSISbbl++smV ghJyS6xKNXDljjjl/hCW+jrCsKAmyM6uAbK7B5KHT8fMJXASmBcLKfAGusNbikh6D1iX Xu5IGpacQFRAAeAEgkUfPzwyfD9W1/d3Zn5S5tM76P28fotLXOx9Td2L1LKL+JPVt5dN xRMyofmbr0TokmpmhtPvR5Ygzj0TOKernmkwsjb/WFRzMB4jXKgUwahHkhLeNAjmI4dS 47Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=Lxof9/OUIaA3NTRX65kfIORp/Lw/nj1NK8HzfYpL9Ck=; fh=R6vZdasEzicj+uKgTYu5jxGuA9Hu905UjnUXiJb7QH4=; b=DCxWvyScfLab6ydHBjvd2ZTo1hP3UxQC/PUOxSqD/mHkprkyn8MQPQc7ABc362Nz+g zcxzGIAxvyVt0GZ5/UCtKbzyuHpLDrFd7f81x77FBkbOfDQ62BBauMvuxhrltV146L9Y 8Ndz8w5o2kkLDTCK9Jv98ytR8DRA1ZRzIlV2EjPoDd8MLDnid7cWCq5mysMmz7HxB8qE u0wa4tRRxOvLk9omsOdNzT4ObSFHLBLIFDzb0UTShiMvl6rFJBTt6lXHukt/aDVhCRi1 No3Ev/f958Sk3R7LR0kWlxnvvchiEstQU9db4/yuRii67F90m4lEXxZBYigQj5dDdvXt 5IGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@quicinc.com header.s=qcppdkim1 header.b=LVobSU4f; spf=pass (google.com: domain of linux-kernel+bounces-23080-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23080-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u42-20020a05622a19aa00b00429997b2c63si379686qtc.110.2024.01.10.22.08.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 22:08:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23080-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@quicinc.com header.s=qcppdkim1 header.b=LVobSU4f; spf=pass (google.com: domain of linux-kernel+bounces-23080-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23080-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id CFE351C20EDC for ; Thu, 11 Jan 2024 06:08:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 40E7523D1; Thu, 11 Jan 2024 06:08:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="LVobSU4f" 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 EE54E2105; Thu, 11 Jan 2024 06:08:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40B5e1kf022118; Thu, 11 Jan 2024 06:08:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=/6QUE+JTKVJzsM5DjhsgngB9QhhyX2fGpNdXNdgcBSc=; b=LV obSU4fQxCfixukwig4w/EowuyZfFWyhvGAbfNEOEY0mfcbu2+7Xesp98l4fdCWaq Mcj3HDPadDMISsFnlEZZvd4d5tRsfdA5ciZfwpfa+DtKcDBUYMBWxHHuN5u5M95m zdnpCNV5GvKPDJATdBtyzIBG1MLrKP4IJ7SoCLsO6gU995zpnpm/uJilWdxOzKXa PhfUyMUtFrupTeBZ5WPQx0Zcip51hN3OdBrw6Nd55QDP5VrRZzpQGoUxmY/TUDyZ Zr8C6rV48lF/y5KSO41QVPtVGqEo51hIqEPp/s9camoOlqpqJU9dg39DNI4jCt/l /D6WeLqNmpcSGhizyRsA== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vhuak23g8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Jan 2024 06:08:26 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40B68PaD016302 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Jan 2024 06:08:25 GMT Received: from [10.239.133.49] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 10 Jan 2024 22:08:22 -0800 Message-ID: <1ae3c5a4-97d9-415e-8dd5-520e00c5e94f@quicinc.com> Date: Thu, 11 Jan 2024 14:08:19 +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: Add coresight name support Content-Language: en-US To: Rob Herring , Mike Leach CC: James Clark , Suzuki K Poulose , , , , , Tingwei Zhang , Yuanfang Zhang , Tao Zhang , Leo Yan , Alexander Shishkin References: <20231228093321.5522-1-quic_jinlmao@quicinc.com> <12ce6e5d-6e4d-fb99-eb82-dece97423bfb@arm.com> From: Jinlong Mao In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: aDXdIDVa0rJXl0VcJ7YVHUHWWCD7Xl8w X-Proofpoint-ORIG-GUID: aDXdIDVa0rJXl0VcJ7YVHUHWWCD7Xl8w X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_01,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=676 impostorscore=0 malwarescore=0 bulkscore=0 phishscore=0 suspectscore=0 adultscore=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 spamscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401110047 On 1/3/2024 11:32 PM, Rob Herring wrote: > On Tue, Jan 2, 2024 at 5:05 AM Mike Leach wrote: >> >> As James mentions this is clearly a V2 of a previous patch - please >> mark as such in future. >> >> Adding to what James has already said:- >> >> 1) Mapping between the canonical names used in the drivers and the >> information as to the precise device is as easy as running 'ls' on >> /sys/bus/coresight/devices:- >> >> root@linaro-developer:/home/linaro/cs-mods# ls -al /sys/bus/coresight/devices/ >> total 0 >> drwxr-xr-x 2 root root 0 Jan 2 11:27 . >> drwxr-xr-x 4 root root 0 Jan 2 11:27 .. >> lrwxrwxrwx 1 root root 0 Jan 2 11:27 cti_cpu0 -> >> ../../../devices/platform/soc@0/858000.cti/cti_cpu0 >> lrwxrwxrwx 1 root root 0 Jan 2 11:27 cti_cpu1 -> >> ../../../devices/platform/soc@0/859000.cti/cti_cpu1 >> lrwxrwxrwx 1 root root 0 Jan 2 11:27 cti_cpu2 -> >> ../../../devices/platform/soc@0/85a000.cti/cti_cpu2 >> lrwxrwxrwx 1 root root 0 Jan 2 11:27 cti_cpu3 -> >> ../../../devices/platform/soc@0/85b000.cti/cti_cpu3 >> lrwxrwxrwx 1 root root 0 Jan 2 11:27 cti_sys0 -> >> ../../../devices/platform/soc@0/810000.cti/cti_sys0 >> lrwxrwxrwx 1 root root 0 Jan 2 11:27 cti_sys1 -> >> ../../../devices/platform/soc@0/811000.cti/cti_sys1 >> lrwxrwxrwx 1 root root 0 Jan 2 11:27 etm0 -> >> ../../../devices/platform/soc@0/85c000.etm/etm0 >> lrwxrwxrwx 1 root root 0 Jan 2 11:27 etm1 -> >> ../../../devices/platform/soc@0/85d000.etm/etm1 >> lrwxrwxrwx 1 root root 0 Jan 2 11:27 etm2 -> >> ../../../devices/platform/soc@0/85e000.etm/etm2 >> lrwxrwxrwx 1 root root 0 Jan 2 11:27 etm3 -> >> ../../../devices/platform/soc@0/85f000.etm/etm3 >> lrwxrwxrwx 1 root root 0 Jan 2 11:42 funnel0 -> >> ../../../devices/platform/soc@0/821000.funnel/funnel0 >> lrwxrwxrwx 1 root root 0 Jan 2 11:42 funnel1 -> >> ../../../devices/platform/soc@0/841000.funnel/funnel1 >> lrwxrwxrwx 1 root root 0 Jan 2 11:42 replicator0 -> >> ../../../devices/platform/soc@0/824000.replicator/replicator0 >> lrwxrwxrwx 1 root root 0 Jan 2 11:42 tmc_etf0 -> >> ../../../devices/platform/soc@0/825000.etf/tmc_etf0 >> lrwxrwxrwx 1 root root 0 Jan 2 11:42 tmc_etr0 -> >> ../../../devices/platform/soc@0/826000.etr/tmc_etr0 >> >> >> 2) The patch set must contain the usage and specification in the .yaml >> file(s) of the property used. > > For the record, I don't like "coresight-name". I don't have another > suggestion because "easy" is not sufficient reasoning for why this is > needed. For example, if we want to configure the trigger and HW events for modem, we can't know which cti or TPDM is for modem from current names. lrwxrwxrwx 1 root 0 0 Jan 1 00:01 cti_sys0 -> ./../../devices/platform/soc@0/138f0000.cti/cti_sys0 lrwxrwxrwx 1 root 0 0 Jan 1 00:01 cti_sys1 -> ./../../devices/platform/soc@0/13900000.cti/cti_sys1 lrwxrwxrwx 1 root 0 0 Jan 1 00:01 tpdm0 -> ./../../devices/platform/soc@0/10b0d000.tpdm/tpdm0 lrwxrwxrwx 1 root 0 0 Jan 1 00:01 tpdm1 -> ./../../devices/platform/soc@0/10c28000.tpdm/tpdm1 lrwxrwxrwx 1 root 0 0 Jan 1 00:01 tpdm2 -> ./../../devices/platform/soc@0/10c29000.tpdm/tpdm2 Thanks Jinlong Mao > >> However, there was a standard property called 'name' which is >> deprecated - see >> https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html >> section 2.3.11. I do not believe that adding another 'name' property >> would be accepted by the DT maintainers. > > "name" is just the node name for anything in the last 15 years. They > used to be separate, but would still mostly be the same. The only case > I found with them different was old PowerPC Macs. > >> 3) the 'device_node' structure has a 'name' field that contains the >> node name in the DT approved "node-name@unit-address" format. > > Actually, it is without the unit-address. full_name is with the unit-address. > >> This >> contains whatever node names you used in the dt. Why not use this if >> a change has to be made and find some conditional to activate it. > > Don't go accessing "name" or "full_name" directly. I intend to get rid > of "name" and generate it from full_name. So use the accessors and > printk specifiers if you need node names. > > Rob