From patchwork Thu May 16 02:56:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mao Jinlong X-Patchwork-Id: 13665686 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 54E8EC25B77 for ; Thu, 16 May 2024 02:57: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=cuvnRHztgSXCn+YTp0d/JB1BfG2LYCh1smbo/MxXI8U=; b=JizoJP/HbsYvfh a9hNTzH9mcSgQnVZKejzm4yI72vBxTtImvLNga43x52t2UHM7lfFG6rwOzNJmkuYqTKB0mfHmUVPh +vXsE1wCqJ61b6fA7RzzbS66b1RwsMbvst1C5xalZlkCsAv9FMaxOcDPWWfp7ZNqwLInyJvkoOfj3 BchLqstsM6p/nbmsLvo+L5RLVbOoTpIbXC1dWOhEXOknt4ik2ZSNxFqAUJ+fp+MplgJ7Jp2yP6MCP 0vM4pJwtwa4BLhoYaDm1aGVyr8HSbiRoJR709A9vHi2RoYCdIHhQI5S2Tkr5HMI9lFx6epKdyFi7N rZnJVmS1QEpt+hXwFgRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s7RJ5-00000003WCn-3y5k; Thu, 16 May 2024 02:57:23 +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 1s7RIr-00000003W77-2Cp7 for linux-arm-kernel@lists.infradead.org; Thu, 16 May 2024 02:57:11 +0000 Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44FLC8QM024800; Thu, 16 May 2024 02:56:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=qcppdkim1; bh=KPSTHVO hJbfke8X0OKBwneEFhJUY7shxJp8KynfdjUI=; b=ReJ90PEl0k+7Ub4iYp9ADYt HfKGcH6YWIg/trFkrq0dHkoYqDJqOjZ5LwBM/pxg1e8cOEfbCF6lej22M4Y6C1N/ 8+vskoSIo2l2hXn4sykix4KbQXHXXM4NHr1x+ZPvuX7CejgiJ9TEgC5f9SE61gSR chCeRqDrfD7w0OCOfpbD9k4xoHyofHFltDe8xSl4OpuglpgzsPdu9QWXNDrln62M Kco4z1BiAqZA32/1dyEuGSqRdu2buT2vzssFjX+zPH2y3nQmKwYWOpZn9eqQKP7x 8TS1X7S3zIEJyVZyC1lzg3mnDTMFaffX1phuWGLLd7FZiqHYQBMUvVGrpgqmL7A= = Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3y49gdv0vr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 May 2024 02:56:57 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 44G2uuVb001680 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 May 2024 02:56:56 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; Wed, 15 May 2024 19:56:56 -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 v1 0/3] coresight: Add reserve trace id support Date: Wed, 15 May 2024 19:56:39 -0700 Message-ID: <20240516025644.4383-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: nalasex01c.na.qualcomm.com (10.47.97.35) 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: ZR5JZ_7ZG0E4tv2M234P1Vu7hXVMu69p X-Proofpoint-ORIG-GUID: ZR5JZ_7ZG0E4tv2M234P1Vu7hXVMu69p X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-16_01,2024-05-15_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=828 impostorscore=0 clxscore=1011 priorityscore=1501 phishscore=0 spamscore=0 mlxscore=0 lowpriorityscore=0 suspectscore=0 bulkscore=0 adultscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405160019 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240515_195709_600449_566CB5E6 X-CRM114-Status: GOOD ( 12.04 ) 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_reserve_system_id in device probe function. The id will be reserved for the HW all the time if the device is probed. Mao Jinlong (3): dt-bindings: arm: Add trace-id for coresight dummy source coresight: Add reserve trace id support 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 | 56 +++++++++++++++++-- .../hwtracing/coresight/coresight-platform.c | 26 +++++++++ .../hwtracing/coresight/coresight-trace-id.c | 24 ++++++++ .../hwtracing/coresight/coresight-trace-id.h | 11 ++++ include/linux/coresight.h | 1 + 7 files changed, 135 insertions(+), 4 deletions(-) create mode 100644 Documentation/ABI/testing/sysfs-bus-coresight-devices-dummy-source