Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4030377pxb; Mon, 1 Feb 2021 10:31:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJxFQY3eVhjn6vM1VuIIzq/ZhqGi0PQgCiCA8S+SJqAOPK9/Gdvj+wSUB2YGYzuiV3tZ1UFR X-Received: by 2002:aa7:c384:: with SMTP id k4mr20047978edq.23.1612204312504; Mon, 01 Feb 2021 10:31:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612204312; cv=none; d=google.com; s=arc-20160816; b=rWiXg5mYWaSQO1oy1jlBy+3rfyJK0m343bRi9SIi9Ysq+e7QXHJjV7lR4wnKsA8ZfL N3hbwvSkiGZIBprjM1c2J1jcybJYBUFeiLdSTANJX/8jKdzabqAgHGxeSR2OV+4heUNH LU/EI1UaQU/jVtN0muqCVglnMVdNkAIDRL0wU5wx2j6ssc6uHRBof5ni8oJBCe6qEFeU 9XBDfD217+Y270ONYlxOQ+TpMSdEwocr/7eCVT/iZHhPdu6oY3dDlK5GKX+akh8pWIuB iafC+UNFu27m9ivq6UrMokgurstBYt75L6DR4u0nQRYUXYjwiVVfTcwDH1rK1gJaxT5d Kjvg== 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 :dkim-signature; bh=oFuVLB0cXXkCbZq5RshAnDWx0pBkz/WKfxxkwoPXbjk=; b=DVv1olFyPyfoEHWBFt59h3PPRMN7d67nc7tCFLv+CDh2k6dHRPXmA70gz/L6skv3WK 7Q12/fmNxTnTx7z6HHQKNXI5+jPoBXqAdYn8x+hMQsCPhO+6MFTni46sn4Hx0uzZrv5z ijN7UCciKoFUUeQd0HT/c2brcOckwDmFq42uiMfOlRKM+ei4cw7OejJfwBLErqsT1Jze PoD1posWElI+qmjwOilaeE6KiLx9BxIPqQIEHtX0+4JW68wtMIY+qEI01oKaHesDqP3p QQswQYowEmwmDos4za6smGXX5GdNbR7Mi2i4FMCufvd2yyBcnts+h7/BQeDaJ9STdx8H 5VjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nMPWMiXP; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w12si11371843edf.27.2021.02.01.10.31.27; Mon, 01 Feb 2021 10:31:52 -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; dkim=pass header.i=@linaro.org header.s=google header.b=nMPWMiXP; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232807AbhBASaj (ORCPT + 99 others); Mon, 1 Feb 2021 13:30:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232260AbhBASPa (ORCPT ); Mon, 1 Feb 2021 13:15:30 -0500 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A434EC06121E for ; Mon, 1 Feb 2021 10:14:17 -0800 (PST) Received: by mail-pf1-x42b.google.com with SMTP id y205so12141646pfc.5 for ; Mon, 01 Feb 2021 10:14:17 -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=Chci0M3bzkWB7VoMfKTDgspiRnWdJwntJ173wIMZKwWdwFRAL1tnkyH6Ub/gPCA54l Rb9ZMpTJb6FIcUWkZtVVNXpCHY0X9U1yH1+M1CZA9+VD0V3VJupCXtl4EvN5cv9lk1In vNbIt87h8KBSXAO9ibkArZUunG5ygN8RCSa0dhy3ng2vCp+Ih+KH/ASi3XH3kYPGXEMK 4mfqIRcbOSfdS5VQtwTaDhO9fA7q7OnxQaCBMiezuwK2BgMoao8jH53Ef7KtSdwqj3Nq bscO2SkZT7D4aWv/m3BXKMDnZn89yriFTYdzFZJT07aexEz3MeT9qGUUkbCiNOBvMaKV ksZA== X-Gm-Message-State: AOAM531qtOn6wGbTxc9kKnPz6DwGo6LuF6kTe9WG45vVyZiI/ex1n0x/ WFGYuJmG/zgRM/BIcuJJx1C6T0r7rNyQuw== 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 Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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, }; -- 2.25.1