From patchwork Mon Jun 3 09:43:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mao Jinlong X-Patchwork-Id: 13683522 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4A0BCC27C44 for ; Mon, 3 Jun 2024 09:44:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=XmydydLzotsReFaZccweeFCTkrK69MuX+OcPNk6CNEI=; b=mISo8nJPDtUq7U Xf7cvTDbgP26QwdMipulqMWisgDEMQEITW6nxpmuh61XGmrky59x1Zf/u/NvTgoNCCK8hhzZmSQqu 3tUPAUpTxJxcUK4nT3uG+FaiUzDrA5fWIKK96EWKM0OuDa/2f1LuZ0NlGrMmLVjUBCIE+6c1MF4Y2 dA3LRzYFhIuukmk9Ghtf8hKdpWZJ2K48ZYW62+4MjXbhaS8w0LmtiSY74+NMpAC3pkaQKFMB9WBHi tkfQmxQpeCz1pfh0e8ZyVRXaahmxU0cFExunQP09tV/JAL2z1T7SaV55wI2V2yTUFZM7TqIB/7fO7 pLilQ7lgVMIwC168tEuA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sE4Em-0000000GIAv-2zni; Mon, 03 Jun 2024 09:44:20 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sE4Ej-0000000GI91-2tFY for linux-arm-kernel@lists.infradead.org; Mon, 03 Jun 2024 09:44:19 +0000 Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 452Lv3Ew001934; Mon, 3 Jun 2024 09:44:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=mxKcaVbif8YR8gm/vyORop ep8/jPftOVtg5F3bZkA08=; b=DCHqvH0enz/FSm3CzaBGWlMaapkF5VllW6e0um bZpp4IvGQ39o5j+eIW4+kEJHVabOCHprpgLbj6+L604pgzmmADOOnwFC1vbg9qVm P50UKbLg8ECkVM63QJ4AzHhYpVENlR6Na1GwdH4p2SJExETD1TCaaTwyE8MnQCFD bGYTmwzSCWc5lPK0v0CyG2PQLs3fea6FB/bF95TfJgoHUHpqnaztmLElOf724fiv /Hr7y3SFRGFlLln8WOO848O4tSojCqmfjXc6AutPJOohaCuLmpIIZroGC5njCsQl hOfAnyER/fxh9XxdCImSl1d10jNcIIBt3FGqR7lRscgZ/w2A== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3yfw5kkrx1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2024 09:44:06 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 4539i6RH026400 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 3 Jun 2024 09:44:06 GMT Received: from hu-jinlmao-lv.qualcomm.com (10.49.16.6) 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.1544.9; Mon, 3 Jun 2024 02:44:05 -0700 From: Mao Jinlong To: Suzuki K Poulose , Mike Leach , James Clark , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Mao Jinlong , "Alexander Shishkin" CC: , , , , , Tingwei Zhang , Yuanfang Zhang , Tao Zhang , songchai Subject: [PATCH v2 0/3] coresight: Add preferred trace id support Date: Mon, 3 Jun 2024 02:43:49 -0700 Message-ID: <20240603094354.2348-1-quic_jinlmao@quicinc.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) 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: Ad7etsyRz8WJfW-JASeixCXOZGty8fn_ X-Proofpoint-ORIG-GUID: Ad7etsyRz8WJfW-JASeixCXOZGty8fn_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-06-03_06,2024-05-30_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 impostorscore=0 suspectscore=0 malwarescore=0 clxscore=1011 phishscore=0 mlxscore=0 priorityscore=1501 adultscore=0 bulkscore=0 spamscore=0 mlxlogscore=840 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406030081 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240603_024417_786372_0BEE919F X-CRM114-Status: GOOD ( 13.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Some HW has static trace id which cannot be changed via software programming. For this case, configure the trace id in device tree with "trace-id = ", and call coresight_trace_id_get_system_id with the trace id value in device probe function. The id will be reserved for the HW all the time if the device is probed. Changes since V1: 1. Add argument to coresight_trace_id_get_system_id for preferred id instead of adding new function coresight_trace_id_reserve_system_id. 2. Add constraint to trace-id in dt-binding file. Mao Jinlong (3): dt-bindings: arm: Add trace-id for coresight dummy source coresight: Add support to get preferred id for system trace sources coresight: dummy: Add reserve atid support for dummy source .../sysfs-bus-coresight-devices-dummy-source | 15 +++++ .../arm/arm,coresight-dummy-source.yaml | 6 ++ drivers/hwtracing/coresight/coresight-dummy.c | 58 +++++++++++++++++-- .../hwtracing/coresight/coresight-platform.c | 26 +++++++++ drivers/hwtracing/coresight/coresight-stm.c | 2 +- .../hwtracing/coresight/coresight-trace-id.c | 32 ++++++---- .../hwtracing/coresight/coresight-trace-id.h | 5 +- include/linux/coresight.h | 1 + 8 files changed, 128 insertions(+), 17 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-bus-coresight-devices-dummy-source