Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp1879500pxb; Sun, 10 Jan 2021 14:54:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJz1zQJF2m53g/tkUIckASLrWrK2KCJ9lTuIIsGq4YevaooctCZLAVWaczUftvFIgW+UfREJ X-Received: by 2002:a17:907:214d:: with SMTP id rk13mr9262746ejb.501.1610319258151; Sun, 10 Jan 2021 14:54:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610319258; cv=none; d=google.com; s=arc-20160816; b=Hx6xC6VWLESsbtz2XzWeMntWnEwf9XvlRKhpPA51KPv3U3tcVFQATKm12ge52rHGg1 RbGKrCghn8E9x9setuFyosdB2E/n3vPz79JAgWg20D4v4xMpPjXUdcgj+vx/TZH6kPmB 1AA7aitiFqxUbeC039DQymLvO8IbnpqLAWjMWoZIN8+hXHx15dI/TCOEu/8AN9pp/dZn ur2W67L/JrT5evL6am8gck70F2xCWHREzYjcaZR8nDy1/F3UHiaXUC+l5CcDILJB5jx8 LK5jQ6/jjTan2c7xFE9oKyaXwwly6LIEZDeucrGqOX7yBXnlKjZjOtfuqQEZYSbGebB+ wyxg== 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; bh=FZyXkj/bzEqkEQ6QVb0KB0dWtSLvTfRa6tyZ/buUxpk=; b=K68qH5LrLYvXZEFktP5f0RygL4BqbDn6dOq5StFXLny0LJf7d2EHjYtM98ARWEO8Q4 S2wGYDWYTvMELLVls4/BpEuSSa4KjQ5+o+rLGmPdP/WlDlDmb6h0nWDbvUuxzhWMwgt/ PUiUMfTSLPGeUm63/6LziC0jzOl2zH6QKqh4bJSsgc69ZA6WDx1j4IVr5jRjpjtlqr7y fsBZyzU37yWiQrqQQsvqa4+d0FC5M7MNiPaEmFaM3kDtaseNzgqrM0ZXb4KLNEPMFgbd CeFKBxXx8kPABSCWXH0dkU3VX71ogenKBA9g0/AeO1UOxcJdybEb3YPGbRH8Z7ltfeC9 UbYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k29si6504647edk.367.2021.01.10.14.53.55; Sun, 10 Jan 2021 14:54:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727591AbhAJWvt (ORCPT + 99 others); Sun, 10 Jan 2021 17:51:49 -0500 Received: from foss.arm.com ([217.140.110.172]:39104 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727416AbhAJWvV (ORCPT ); Sun, 10 Jan 2021 17:51:21 -0500 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 74E7E152B; Sun, 10 Jan 2021 14:49:33 -0800 (PST) Received: from ewhatever.cambridge.arm.com (ewhatever.cambridge.arm.com [10.1.197.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 260843F719; Sun, 10 Jan 2021 14:49:32 -0800 (PST) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: coresight@lists.linaro.org, mathieu.poirier@linaro.org, anshuman.khandual@arm.com, mike.leach@linaro.org, leo.yan@linaro.org, linux-kernel@vger.kernel.org, jonathan.zhouwen@huawei.com, catalin.marinas@arm.com, Suzuki K Poulose Subject: [PATCH v7 20/28] coresight: etm4x: Expose trcdevarch via sysfs Date: Sun, 10 Jan 2021 22:48:42 +0000 Message-Id: <20210110224850.1880240-21-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20210110224850.1880240-1-suzuki.poulose@arm.com> References: <20210110224850.1880240-1-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Expose the TRCDEVARCH register via the sysfs for component detection. Given that the TRCIDR1 may not completely identify the ETM component and instead need to use TRCDEVARCH, expose this via sysfs for tools to use it for identification. Cc: Mike Leach Reviewed-by: Mathieu Poirier Signed-off-by: Suzuki K Poulose --- Changes since v5: - Move the trcdevarch to mgmt/ instead of the trcidr (Mike L) - Add sysfs documentation for the new register (Mike L) --- .../ABI/testing/sysfs-bus-coresight-devices-etm4x | 8 ++++++++ drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | 1 + 2 files changed, 9 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm4x b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm4x index 881f0cd99ce4..8e53a32f8150 100644 --- a/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm4x +++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm4x @@ -371,6 +371,14 @@ Contact: Mathieu Poirier Description: (Read) Print the content of the Device ID Register (0xFC8). The value is taken directly from the HW. +What: /sys/bus/coresight/devices/etm/mgmt/trcdevarch +Date: January 2021 +KernelVersion: 5.12 +Contact: Mathieu Poirier +Description: (Read) Print the content of the Device Architecture Register + (offset 0xFBC). The value is taken directly read + from the HW. + What: /sys/bus/coresight/devices/etm/mgmt/trcdevtype Date: April 2015 KernelVersion: 4.01 diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c index 45aeeac2f50e..b646d53a3133 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c @@ -2442,6 +2442,7 @@ static struct attribute *coresight_etmv4_mgmt_attrs[] = { coresight_etm4x_reg(trcoslsr, TRCOSLSR), coresight_etm4x_reg(trcconfig, TRCCONFIGR), coresight_etm4x_reg(trctraceid, TRCTRACEIDR), + coresight_etm4x_reg(trcdevarch, TRCDEVARCH), NULL, }; -- 2.24.1