Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7549137rwl; Tue, 10 Jan 2023 02:12:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXt9rX9nmU0g3xdQPSyYYlyXPYex0Psv2YKmTT7IJsizQ38GKVtwfC4rswO9q9zh3C+MurW+ X-Received: by 2002:a17:902:b713:b0:190:c550:d295 with SMTP id d19-20020a170902b71300b00190c550d295mr66365977pls.9.1673345556522; Tue, 10 Jan 2023 02:12:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673345556; cv=none; d=google.com; s=arc-20160816; b=oVtLo+D5nzqUms+OpGmAS2a8NdkB2YA+VxCRR1yL1RG1168x3hNELvBGmkbd5QPJ7r +maz0Q/V2su0A+Y7HNhhklzs6ED7cEznz85pVYzqF2hQLlEd6erQAD6bzTWjjrYqtVRf pQ7sGvEgnCd6fQSUKFl5L3heK97p+fSOAt0yOeF8PQ6rx5mfxY2iMK/fkW++2Q8DSooT oY4TYSgmbK1cjRPEgjI0j4w1Je97aL1SYtjLhK/8B4KF+vktw/0GrlRpw2v6OKPSK/79 5aHSONbWOHoy+pHA9mLq6zKS5RjvvScxM2PeLYa7/kyq8cQhHy2x5bCMma9d28zfPnjD rwJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=NJrNuJsXc8RroLIdiC5i2Bs8g/u/JaUbWjLWRSP9SQQ=; b=CtgEALMegm+HRVqY5/zMjwmIN3QcTYefxIJOAdlcZF5B/Et8JvThwJ9m2Oexf94d35 dT0dUBrSz/62jBvRNrI+wclxPi0alLe6pfRIuKigpUyw/AopdBNN4blUWb+5GajsC4Me Ll3kiYKjZuB77FSM4XgmS6+hx5hsklzPS1fY1HEICwDCEgPhayVfh05nO3WhA6tJtU0+ j2JqAhceMpswotZs1Fy3wRip9pmFnmtDw0NCpgLGYQXhTSiTmJfVxrNdL2pZixPBL3Gx xkGFr3McMcRdrRI8m1QzjYAt4lvzUz+G0nTvWt9saeY6SjJHg/DwbUIdA6+IzReG8pLa 0cyw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d6-20020a170902cec600b00192c4055e78si2149971plg.544.2023.01.10.02.12.29; Tue, 10 Jan 2023 02:12:36 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237998AbjAJJ5X (ORCPT + 53 others); Tue, 10 Jan 2023 04:57:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231207AbjAJJ5V (ORCPT ); Tue, 10 Jan 2023 04:57:21 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3336C3D1D4; Tue, 10 Jan 2023 01:57:20 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E795E4B3; Tue, 10 Jan 2023 01:58:01 -0800 (PST) Received: from [10.57.89.71] (unknown [10.57.89.71]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EAC893F587; Tue, 10 Jan 2023 01:57:16 -0800 (PST) Message-ID: <6ead4016-a8a2-4572-8f75-682726d04479@arm.com> Date: Tue, 10 Jan 2023 09:57:13 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v16 0/8] Coresight: Add support for TPDM and TPDA To: Mao Jinlong , Mathieu Poirier , Alexander Shishkin , Konrad Dybcio , Mike Leach , Rob Herring , Krzysztof Kozlowski Cc: Leo Yan , Greg Kroah-Hartman , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Tingwei Zhang , Yuanfang Zhang , Tao Zhang , Trilok Soni , Hao Zhang , linux-arm-msm@vger.kernel.org, Bjorn Andersson References: <20230106092119.20449-1-quic_jinlmao@quicinc.com> From: Suzuki K Poulose In-Reply-To: <20230106092119.20449-1-quic_jinlmao@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham 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 On 06/01/2023 09:21, Mao Jinlong wrote: > This series adds support for the trace performance monitoring and > diagnostics hardware (TPDM and TPDA). It is composed of two major > elements. > a) Changes for original coresight framework to support for TPDM and TPDA. > b) Add driver code for TPDM and TPDA. > > Introduction of changes for original coresight framework > Support TPDM as new coresight source. > Since only STM and ETM are supported as coresight source originally. > TPDM is a newly added coresight source. We need to change > the original way of saving coresight path to support more types source > for coresight driver. > The following patch is to add support more coresight sources. > coresight: core: Use IDR for non-cpu bound sources' paths. > > Introduction of TPDM and TPDA > TPDM - The trace performance monitoring and diagnostics monitor or TPDM in > short serves as data collection component for various dataset types > specified in the QPMDA(Qualcomm performance monitoring and diagnostics > architecture) spec. 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. > Coresight: Add coresight TPDM source driver > dt-bindings: arm: Adds CoreSight TPDM hardware definitions > coresight-tpdm: Add DSB dataset support > coresight-tpdm: Add integration test support > > 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 as specified in the QPMDA > (Qualcomm performance monitoring and diagnostics architecture) > specification. The primary use case of the TPDA is to provide > packetization, funneling and timestamping of Monitor data as specified > in the QPMDA specification. > The following patch is to add driver for TPDA. > Coresight: Add TPDA link driver > dt-bindings: arm: Adds CoreSight TPDA hardware definitions > > The last patch of this series is a device tree modification, which add > the TPDM and TPDA configuration to device tree for validating. > ARM: dts: msm: Add tpdm mm/prng for sm8250 > > Once this series patches are applied properly, 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. > > 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. > > +---------------+ +-------------+ > | tpdm@6c08000 | |tpdm@684C000 | > +-------|-------+ +------|------+ > | | > +-------|-------+ | > | funnel@6c0b000| | > +-------|-------+ | > | | > +-------|-------+ | > |funnel@6c2d000 | | > +-------|-------+ | > | | > | +---------------+ | > +----- tpda@6004000 -----------+ > +-------|-------+ > | > +-------|-------+ > |funnel@6005000 | > +---------------+ > > This patch series depends on patch series: > "[v6,00/14] coresight: Add new API to allocate trace source ID values" > https://patchwork.kernel.org/project/linux-arm-kernel/cover/20221123195010.6859-1-mike.leach@linaro.org/ > > TPDM_TPDA commit tree: > https://git.codelinaro.org/clo/linux-kernel/coresight/-/commits/tpdm-tpda-v16 > Please could you add a documentation for TPDA and TPDM under Documentation/tracing/coresight/ ? It need not be part of this series if you don't have to resend it. Kind regards Suzuki