From patchwork Mon Feb 1 18:13:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 12059691 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42A01C433E0 for ; Mon, 1 Feb 2021 18:22:22 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CCEA860295 for ; Mon, 1 Feb 2021 18:22:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CCEA860295 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=WovmWqt4D3WR6z1rWCukx8ndjXFdSHm2dMjFAuGBAIo=; b=EMrHhytfD6ZrSxeryJYvHyJOW EzeLtQ8UqeDbi5qvrePFmz2eogjWCqCIuzCxAP+96VxeC7XeihTxFPVU+YhoMWyQSTMl6B25V69CZ KLZcVViSe+RICDP3rFyBIJkFS2UKbJCd66vu8nxAL9c6bKhsjX1pRDL6gshxIr096QwvEEFVaEjB/ v2obLUCLefS/7VxLBQPh+sRwyi9Dz8XLGF4djb60ZC/FFQJIo8WuVId16nWg/4Sg9aCAWPS+gpmcP /LUkkNtS//wpVTyjzCqIuQcRrQMLz7bdwMAmkYoFmPUouDieaM0CbtN7pZssrY3WWtKCzNqmm36Qt fZiHmxfIQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6dnq-00061x-0Y; Mon, 01 Feb 2021 18:19:59 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6diN-00036n-Kb for linux-arm-kernel@lists.infradead.org; Mon, 01 Feb 2021 18:14:35 +0000 Received: by mail-pf1-x430.google.com with SMTP id w18so12133034pfu.9 for ; Mon, 01 Feb 2021 10:14:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oFuVLB0cXXkCbZq5RshAnDWx0pBkz/WKfxxkwoPXbjk=; b=nMPWMiXPJizdFscCnDFFH3UbjG1xkfRaIs1iiscPr/JRkNG6JChOvOXWD1SOqSlHW1 dHt/xwPCKLz0c8W4MuSx4e4dEpfFXdmpsLYcpk89MaTSH5uU6nFhhrBRWW4g9qSv9sXk URHVEteOG+Go5TWYNdctYs2kAbomqYXvidrJXeo4ac7EuKAVv61+/pg/GItv8ekuxw1E mM7mYu+x0NcQUxmOoD//zkrdYTDBysQTC4YPBrqVvXEjLcu0TLVSix6esovUcIMYWPd4 cRRJVZroTJqNjdbAQml9nayDLXEdE2AEZjhnFx13ZSfUu/qE1omsq3gv/FgMBAw8ZUAa G/Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oFuVLB0cXXkCbZq5RshAnDWx0pBkz/WKfxxkwoPXbjk=; b=ejV0DNwj1IKEQ+7oFVfc97RVXE7+wCw4UTDtu7QBX4T+mkICu/ADeufgcjDWMu0i4F R4u9upHw3TcM+1odk3PCJ31PkzufmZzQKTDN8EMyEivDVSnnvAC6lxQ3UlfryILKBBY2 0Y30JG6HBTyeoU49I4vB+AJwzJDZ0Pn+O5uda0XH04gdtgMqAkxDoNFxL3vLxGvu+ZLK TrR/oqNM1n95OpTU0ktwGRq0/IGzWke0OdqaX0J6P+GGnV/vNxxmuOepZ7dw0U6HB2If EHgokCpymFvnScPtBHVj7nKZFu3zHpVju7ElrcVkXYJEAgmWPMawXMnFitFHCXOy085Z e80A== X-Gm-Message-State: AOAM5303YVHBcUd5Jf5nPCyNycqG3tzkt1mWZDpN8u+tP0Bfw6Fr8BPc /ORuc6EiHR3DpduzJ41J8nMPAQ== X-Google-Smtp-Source: ABdhPJxWbngpziKVIIg6rRKNSMKpa4KZhltNrUD8MuKX12sY9N8c5ytWprHm2L/1B0AIlAZfnTrSpA== X-Received: by 2002:a63:5014:: with SMTP id e20mr18068896pgb.152.1612203257247; Mon, 01 Feb 2021 10:14:17 -0800 (PST) Received: from xps15.cg.shawcable.net (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id e12sm75784pjj.23.2021.02.01.10.14.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Feb 2021 10:14:16 -0800 (PST) From: Mathieu Poirier To: gregkh@linuxfoundation.org Subject: [PATCH 22/31] coresight: etm4x: Expose trcdevarch via sysfs Date: Mon, 1 Feb 2021 11:13:42 -0700 Message-Id: <20210201181351.1475223-23-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210201181351.1475223-1-mathieu.poirier@linaro.org> References: <20210201181351.1475223-1-mathieu.poirier@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210201_131419_863777_6A794759 X-CRM114-Status: GOOD ( 13.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Suzuki K Poulose 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 Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210110224850.1880240-21-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier --- .../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, };