From patchwork Fri Apr 29 12:30:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: German Gomez X-Patchwork-Id: 12831945 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 7B070C433F5 for ; Fri, 29 Apr 2022 12:32:29 +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=V2Qex+UNtCifKjvEcuKyICuh6zbEMXouvaOiQr1ZdY8=; b=EQo1GA9ilNVeTq X8sZK+GJuw1m6iBcVGD1TTanTwZ+c7JhDntuS6qA2F4s7cG7m9qReDMFff0G5xtILDtRTfA+Lk10F EBIUfWJGcAzmdnCmEVEV0bABwBbRGSWBxi5tqXjTYzxqIzGu3GjwAToU3sUUN/Zv5kTHcnd3i51ZX 1aoejNmFtwozdhTFBwWJ1trEK8qzUppmWztZYoISMgtx1KhgOBquXIMIRB0Qzdsu5R5/0HMIZSZC0 OKz4mwDN4PJJMY7bMgzyS7ZgOAXDMhIJzU288/F36W3JaYyizgOlAzhrdSCT1wFLYYKSThMSiHDTF gI5cUz9varSYUZUIdmxw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nkPmS-00B8UW-Sg; Fri, 29 Apr 2022 12:31:28 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nkPmB-00B8Nr-T5 for linux-arm-kernel@lists.infradead.org; Fri, 29 Apr 2022 12:31:13 +0000 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 0E2DD1063; Fri, 29 Apr 2022 05:31:09 -0700 (PDT) Received: from e127744.arm.com (unknown [10.57.46.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A09FE3F73B; Fri, 29 Apr 2022 05:31:06 -0700 (PDT) From: German Gomez To: coresight@lists.linaro.org, mathieu.poirier@linaro.org, suzuki.poulose@arm.com Cc: james.clark@arm.com, leo.yan@linaro.org, mike.leach@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, German Gomez Subject: [PATCH 0/2] coresight: etm4x: Expose default timestamp source in sysfs Date: Fri, 29 Apr 2022 13:30:58 +0100 Message-Id: <20220429123100.268059-1-german.gomez@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220429_053112_059665_842E26BC X-CRM114-Status: UNSURE ( 8.52 ) X-CRM114-Notice: Please train this message. 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 Hi, I'm Sending this sysfs addition to the etm4x driver in order to expose the timestamp source of the trace (given by the TRFCR_ELx.TS register). As mentioned in [1/2], having this information is useful for assigning Kernel times to the perf samples. Thanks, German German Gomez (3): coresight: etm4x: Expose default timestamp source in sysfs coresight: etm4x: docs: Add documentation for 'ts_source' sysfs interface perf cs_etm: Store ts_source in AUXTRACE_INFO fields .../testing/sysfs-bus-coresight-devices-etm4x | 8 +++ .../coresight/coresight-etm4x-reference.rst | 14 ++++ arch/arm64/include/asm/sysreg.h | 1 + .../coresight/coresight-etm4x-sysfs.c | 34 ++++++++++ tools/perf/arch/arm/util/cs-etm.c | 64 +++++++++++++++++-- tools/perf/util/cs-etm.c | 61 +++++++++--------- tools/perf/util/cs-etm.h | 13 +++- 7 files changed, 159 insertions(+), 36 deletions(-)