Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4910133rwb; Tue, 17 Jan 2023 07:02:57 -0800 (PST) X-Google-Smtp-Source: AMrXdXu9eLjiXtG5BoIbSq4OsAz92Nu3/GV84/7UDXx5L1nZudcodnnQYt2un8ZJyJnAD5aOYJJh X-Received: by 2002:a05:6402:5305:b0:499:8849:5fb6 with SMTP id eo5-20020a056402530500b0049988495fb6mr3494627edb.30.1673967776980; Tue, 17 Jan 2023 07:02:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673967776; cv=none; d=google.com; s=arc-20160816; b=Sm5WLOKLACbkqa/n/kpi3SqYvttywA+HpRXrfOeRqN94eUQEEEd3ioDfze4KTbLDe5 qBzTX7bAzwVfsQDCOQkiW1UWEoa9VWaDqv/Fp13ck2OteTXcbYSKxX0K/z3+usgdIrCR wdk8GRA9EoLoXkfKxj7pp8o6liPu3sMwr9IFdxKTXSQ/RAnEjFeLnvgg/PUWAtLtefHz tOChx1Ihaig6kmoUWyKLJzzDxR6AkHmtwGaJO4TKAx/gFCxYPI0Wiyo7ZVJb0exo7QwK gnDDmkT1qAw7FZpLrcs5I3xa7TGtnOHq+RmoXFZ0/cxbz3CbYvug5HjGt4uhXZSpC4Pa 1ozQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5PcV4EjbwVxQbQROKWG6VF4HrVUTgnVHm7HS2j2rdJc=; b=vwqgzqCSSGk2CYRUmEheWcDP8awLDle5bgO8KxzDEIFZ81A0EhQma8GTKKI14oOqS/ hLFTx4XePTgC+NMVDNfeuUBSFFMUcVSQNX8km2zSFD9WJFIjBm8cgMXrHNa3gPFj4uDp oRc2A0nm9g9cHWPgR2ODsatoB6W9Z0dL1v4VK2yc4pLn8I9fLtw16c8htYE3gWuFjA11 LNL/ay382uz7rcePLKhLQEGYI1CrMRUB4hVEwK29g+id4y2PVHeJfjHV8FY3hOEg6xwN FLae4QMr0TLTjWTxqg9Q+jr5WkVUQFiOD99yHCYQK3mf+F3C0U6lFRtXDVIB78lod6w8 05jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Ld758OE+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sg34-20020a170907a42200b007acc6769292si35170510ejc.365.2023.01.17.07.02.43; Tue, 17 Jan 2023 07:02:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Ld758OE+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232931AbjAQO6Q (ORCPT + 48 others); Tue, 17 Jan 2023 09:58:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230026AbjAQO5k (ORCPT ); Tue, 17 Jan 2023 09:57:40 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7E6E359D; Tue, 17 Jan 2023 06:57:39 -0800 (PST) Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30HEbTEp005229; Tue, 17 Jan 2023 14:57:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=5PcV4EjbwVxQbQROKWG6VF4HrVUTgnVHm7HS2j2rdJc=; b=Ld758OE+szB/gTZZagBXGHJ3IMPep1m3yS9mi8A+iC18lq26dceFL4asrupskag0NPgT yBYdM3jWMVTibmlCeRjMFMEq5ilAjgFpPfNbl++5dFfkmMmoRR2G6rdYKL9qoWju/BVQ tvBAGnj28Fc+6+Y/M7Ttfn8R2C0NjzFXcG+0RYGwevv3I8vwob3gp+jiJtMauAuBxnmF 695s/yWwip09VCPzxhX3/eyfbGwhYR3Ftd8ojKwFgSw2v+aFEZ7sz2oO2Q8aIuC0hvk+ +VdUXMhepXqCyFmcIDnHAz3loW9TpFcDGMGSuBCs3K3UvC42v/Xe0qCUd6vS1yuxkfnN Gg== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3n3npgdf93-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Jan 2023 14:57:23 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 30HEvMLf018744 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Jan 2023 14:57:22 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.986.36; Tue, 17 Jan 2023 06:57:22 -0800 From: Mao Jinlong To: Mathieu Poirier , Suzuki K Poulose , Alexander Shishkin , Konrad Dybcio , Mike Leach , Rob Herring , Krzysztof Kozlowski CC: Mao Jinlong , Leo Yan , "Greg Kroah-Hartman" , , , , , Tingwei Zhang , Yuanfang Zhang , Tao Zhang , Trilok Soni , Hao Zhang , , Bjorn Andersson Subject: [PATCH v17 8/9] Documentation: trace: Add documentation for TPDM and TPDA Date: Tue, 17 Jan 2023 06:57:07 -0800 Message-ID: <20230117145708.16739-9-quic_jinlmao@quicinc.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230117145708.16739-1-quic_jinlmao@quicinc.com> References: <20230117145708.16739-1-quic_jinlmao@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) 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: Ljxv1xhztqbXpqPxLywcJ5VjNJoVZbXM X-Proofpoint-ORIG-GUID: Ljxv1xhztqbXpqPxLywcJ5VjNJoVZbXM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.923,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-17_06,2023-01-17_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 mlxscore=0 malwarescore=0 adultscore=0 priorityscore=1501 mlxlogscore=999 spamscore=0 impostorscore=0 phishscore=0 suspectscore=0 bulkscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301170121 X-Spam-Status: No, score=0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add documentation for the TPDM and TPDA under trace/coresight. Signed-off-by: Mao Jinlong --- .../trace/coresight/coresight-tpda.rst | 52 +++++++++++++++++++ .../trace/coresight/coresight-tpdm.rst | 43 +++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 Documentation/trace/coresight/coresight-tpda.rst create mode 100644 Documentation/trace/coresight/coresight-tpdm.rst diff --git a/Documentation/trace/coresight/coresight-tpda.rst b/Documentation/trace/coresight/coresight-tpda.rst new file mode 100644 index 000000000000..350dad4eda47 --- /dev/null +++ b/Documentation/trace/coresight/coresight-tpda.rst @@ -0,0 +1,52 @@ +.. SPDX-License-Identifier: GPL-2.0 + +============================== +The trace performance monitoring and diagnostics aggregator(TPDA). +============================== + + :Author: Jinlong Mao + :Date: January 2023 + +Hardware Description +-------------------- + +TPDA - The trace performance monitoring and diagnostics aggregator or +TPDA in short serves as an arbitration and packetization engine for the +performance monitoring and diagnostics network specification. +The primary use case of the TPDA is to provide packetization, funneling +and timestamping of Monitor data. + + +Sysfs files and directories +--------------------------- +Root: ``/sys/bus/coresight/devices/tpda`` + +Config details +--------------------------- + +The tpdm and tpda nodes should be observed at the coresight path +"/sys/bus/coresight/devices". +e.g. +/sys/bus/coresight/devices # ls -l | grep tpd +tpda0 -> ../../../devices/platform/soc@0/6004000.tpda/tpda0 +tpdm0 -> ../../../devices/platform/soc@0/6c08000.mm.tpdm/tpdm0 + +We can use the commands are similar to the below to validate TPDMs. +Enable coresight sink first. The port of tpda which is connected to +the tpdm will be enabled after commands below. + +echo 1 > /sys/bus/coresight/devices/tmc_etf0/enable_sink +echo 1 > /sys/bus/coresight/devices/tpdm0/enable_source +echo 1 > /sys/bus/coresight/devices/tpdm0/integration_test +echo 2 > /sys/bus/coresight/devices/tpdm0/integration_test + +The test data will be collected in the coresight sink which is enabled. +If rwp register of the sink is keeping updating when do +integration_test (by cat tmc_etf0/mgmt/rwp), it means there is data +generated from TPDM to sink. + +There must be a tpda between tpdm and the sink. When there are some +other trace event hw components in the same HW block with tpdm, tpdm +and these hw components will connect to the coresight funnel. When +there is only tpdm trace hw in the HW block, tpdm will connect to +tpda directly. diff --git a/Documentation/trace/coresight/coresight-tpdm.rst b/Documentation/trace/coresight/coresight-tpdm.rst new file mode 100644 index 000000000000..4ba40b0db550 --- /dev/null +++ b/Documentation/trace/coresight/coresight-tpdm.rst @@ -0,0 +1,43 @@ +.. SPDX-License-Identifier: GPL-2.0 + +============================== +Trace performance monitoring and diagnostics monitor(TPDM). +============================== + + :Author: Jinlong Mao + :Date: January 2023 + +Hardware Description +-------------------- +TPDM - The trace performance monitoring and diagnostics monitor or TPDM in +short serves as data collection component for various dataset types. +The primary use case of the TPDM is to collect data from different data +sources and send it to a TPDA for packetization, timestamping and funneling. + +Sysfs files and directories +--------------------------- +Root: ``/sys/bus/coresight/devices/tpdm`` + +---- + +:File: ``enable_source`` (RW) +:Notes: + - > 0 : enable the datasets of TPDM. + + - = 0 : disable the datasets of TPDM. + +:Syntax: + ``echo 1 > enable_source`` + +---- + +:File: ``integration_test`` (wo) +:Notes: + Integration test will generate test data for tpdm. + +:Syntax: + ``echo value > integration_test`` + + value - 1 or 2. + +---- -- 2.39.0