Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4726836imm; Mon, 14 May 2018 11:57:05 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq03wMVBqWt/fRTQr3c6N6EQPTQF4BKbNZkkTk7PYVEY0MvUsalPjWyybCHkVBcJz/GAe5p X-Received: by 2002:a17:902:6bca:: with SMTP id m10-v6mr11066482plt.6.1526324225460; Mon, 14 May 2018 11:57:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526324225; cv=none; d=google.com; s=arc-20160816; b=Ir5BBQrCtX903r9BnRmzTR8nudegqdyr4Ylmi65ZH/GeX+1mcAjSL/oCHSW9+8SM3i VSiIqbBgzxcczMyKhy7i3asKJ0kHRQ23WEkjLjp4G+0yEa+v0h5Aa+T4j1bca/GKzePq DM73VRNcQX4n9le0DFNJE9ZYNyLeyI5Xtp/7X8eMMyCy0pE2OBlso7cLp1KRSyVixlL4 +igJTUlIbty2GAJ07qjAK4r47wyJFsLXb062cGaH/B1tY2aY70nmKicoqwgiwHqqsgnh OA0/864AQhoZmh5nd/5gB+0wspp/D3jsLn3xEMV3Bf6x26P6S2C6b+xPgTdAfVZ3Nuoj 4T2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=4YvpYcPWW47gb0beFk1Qt0kDm6usYeCGr+CdGeJMIiI=; b=lcb8X0JOvPbW7UFBtdqfEGhf84dpt7kNqLOD/cp756OT/xY216l0RYnGwxZRKZfJHb lOv/7BhOCQq/MA8ZfXQWHgvb17RWssVqdwoD2PQpAwbGfjfxxppfm9K/SQz0ZFnB3W4a VVcQylXk8fGXIAFY0pbUvI9kCk7ISrjSp/AFdJr1TreNdW2O8SkEzDV+w/WH9dqElbAM 8rYA7HChKI/OPRWP8sfgVtA2DjdTFYmo9CHRy96GKl+z+DMF1BSVyGIFWW3sHUd111J8 BhEc75maHlU4DZesbNI35atW2Q0b0zSaZt1aMXae11fbthtFW9MMoDItp0fsjmR/lFLX dEwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=BkwwUFWV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u19-v6si10280301pfn.241.2018.05.14.11.56.51; Mon, 14 May 2018 11:57:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=BkwwUFWV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752388AbeENSyw (ORCPT + 99 others); Mon, 14 May 2018 14:54:52 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46744 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752250AbeENSyu (ORCPT ); Mon, 14 May 2018 14:54:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4YvpYcPWW47gb0beFk1Qt0kDm6usYeCGr+CdGeJMIiI=; b=BkwwUFWVE4XBlWIjFYQ8lcmj5 gKbHbaLPM7gBqc3j+ehEw4h0T7g0aNl7t7J7Uo5GK4WOaGatkdgmCEEDYtpjOgYVdcbjIU0hRRj4d pWtQSYbJjKtAwsClVFhhgTP5Lb8DdKANuoFO1tgnZr4Mdc2brfz41sMOWAMpw/LtZMS+ij5yscSgV O+sLsU8rJ0lI6smKtlWMfsEZF6iejG9Z1CZqThfecalGwoiKOa6GG02V9ZYEMtrPhdHVrnCE9E1Gq l33C4OijE8xjDkha16egtlhRDVgGJVS9WOJkVSb89CG+enO11vYwZ2LfYfXjbIC8GBfIGaUUH5u9b gc4pYX1NA==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIIcT-00082m-6a; Mon, 14 May 2018 18:54:49 +0000 Subject: Re: [PATCH v2] coresight: documentation: update sysfs section To: Kim Phillips , Mathieu Poirier Cc: Jonathan Corbet , linux-arm-kernel , "open list:DOCUMENTATION" , linux-kernel@vger.kernel.org References: <20180507172915.c032cd71c07b1849bf419a5f@arm.com> <20180514121959.a9a3d2fb3d3d270849ffbc39@arm.com> From: Randy Dunlap Message-ID: Date: Mon, 14 May 2018 11:54:48 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180514121959.a9a3d2fb3d3d270849ffbc39@arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/14/2018 10:19 AM, Kim Phillips wrote: > - Align and show updated ls devices output from the TC2, based on > current driver > > - Provide an example from an ETMv4 based system (Juno) > > - Reflect changes to the way the RAM write pointer is accessed since > it got changed in commit 7d83d17795ef ("coresight: tmc: adding sysFS > management entries"). > > Cc: Mathieu Poirier > Cc: Jonathan Corbet > Signed-off-by: Kim Phillips > --- > v2: address Mathieu's comment about clarifying the sinks on the Juno > vs. TC2 platforms. > > Documentation/trace/coresight.txt | 41 +++++++++++++++++++------------ > 1 file changed, 25 insertions(+), 16 deletions(-) > > diff --git a/Documentation/trace/coresight.txt > b/Documentation/trace/coresight.txt index 6f0120c3a4f1..134994e9fa6d > 100644 > --- a/Documentation/trace/coresight.txt > +++ b/Documentation/trace/coresight.txt > @@ -144,10 +144,22 @@ If everything goes well during the registration > process the new devices will show up under /sys/bus/coresight/devices, > as showns here for a TC2 platform: as shown here > root:~# ls /sys/bus/coresight/devices/ > -replicator 20030000.tpiu 2201c000.ptm 2203c000.etm 2203e000.etm > -20010000.etb 20040000.funnel 2201d000.ptm 2203d000.etm > +20010000.etb 20040000.funnel 2201d000.ptm 2203d000.etm > replicator +20030000.tpiu 2201c000.ptm 2203c000.etm > 2203e000.etm root:~# > > +and here for a Juno platform: > + > +root@juno:~# ls /sys/bus/coresight/devices/ > +20010000.etf 20120000.replicator 22040000.etm > 230c0000.funnel +20030000.tpiu 20130000.funnel > 220c0000.funnel 23140000.etm +20040000.funnel > 20140000.etf 22140000.etm 23240000.etm > +20070000.etr 20150000.funnel 23040000.etm > 23340000.etm +root@juno:~# + > +Note that on Juno users can select the ETF, ETR and TPIU as a sink > target while +on TC2, the ETB and TPIU can be selected. > + > The functions take a "struct coresight_device", which looks like this: > > struct coresight_desc { > @@ -193,16 +205,16 @@ the information carried in "THIS_MODULE". > How to use the tracer modules > ----------------------------- > > -Before trace collection can start, a coresight sink needs to be > identify. +Before trace collection can start, a coresight sink needs to The - and + lines seems to be merged... > be identified. There is no limit on the amount of sinks (nor sources) > that can be enabled at any given moment. As a generic operation, all > device pertaining to the sink class will have an "active" entry in > sysfs: > root:/sys/bus/coresight/devices# ls > -replicator 20030000.tpiu 2201c000.ptm 2203c000.etm 2203e000.etm > -20010000.etb 20040000.funnel 2201d000.ptm 2203d000.etm > +20010000.etb 20040000.funnel 2201d000.ptm 2203d000.etm > replicator +20030000.tpiu 2201c000.ptm 2203c000.etm > 2203e000.etm root:/sys/bus/coresight/devices# ls 20010000.etb > -enable_sink status trigger_cntr > +enable_sink mgmt power subsystem trigger_cntr uevent > root:/sys/bus/coresight/devices# echo 1 > 20010000.etb/enable_sink > root:/sys/bus/coresight/devices# cat 20010000.etb/enable_sink > 1 > @@ -216,16 +228,13 @@ trigger a trace capture: > root:/sys/bus/coresight/devices# echo 1 > 2201c000.ptm/enable_source > root:/sys/bus/coresight/devices# cat 2201c000.ptm/enable_source > 1 > -root:/sys/bus/coresight/devices# cat 20010000.etb/status > -Depth: 0x2000 > -Status: 0x1 > -RAM read ptr: 0x0 > -RAM wrt ptr: 0x19d3 <----- The write pointer is moving > -Trigger cnt: 0x0 > -Control: 0x1 > -Flush status: 0x0 > -Flush ctrl: 0x2001 > -root:/sys/bus/coresight/devices# > + > +Observe the write pointer moving: > + > +root:/sys/bus/coresight/devices# cat 20010000.etb/mgmt/rwp > +0x1a8 > +root:/sys/bus/coresight/devices# cat 20010000.etb/mgmt/rwp > +0x19a6 > > Trace collection is stopped the same way: > > -- ~Randy