Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp270872pxu; Thu, 7 Jan 2021 04:45:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJwMI7bCgrIex12IK4753ku6kYFky9/H4mvhdevVUnCADb0CzwkBk17MY58hc7LiJ262/GH1 X-Received: by 2002:a05:6402:a52:: with SMTP id bt18mr1582669edb.228.1610023522893; Thu, 07 Jan 2021 04:45:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610023522; cv=none; d=google.com; s=arc-20160816; b=OhqM2Ct1MPUQ5zpExJwofh+j4RPyZrxkhbb+kfe3PtfdFdd4/nWkptZkZyUO4fJYos dUkwL4H7ExpxMBOjdYo3teDVJMuR54kwEkyyG+XhDylOXrOA9k48mthkbzigQr69gzVb F6j8La4/EsGoRBSsOTu/nCwtevMm0uGhoW8lxDXG19ZHuWGanmR/dAEPCmo6d50HRobA 55tgRbUEYGRZiTukR6bGIdjQSE251OI3lbgb+p0AWaO5L/iERiasSn+aYfdgZ9T6qUvh lRt3mG+wgKLyV6OIVP1/eFA3o0/pu8GnhzoQc5oTMFVHAb8TD85AnGwZmLiBb5CcWIvE oAbw== 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=xvxcFEiDr3B5bFg2yXIc2C51HBgD9AMmF7uc/+Spzwo=; b=O1Mn8apXBm6+Enh3waeb4LbK640OUtaOvdUfSdNiHT94YnUl6fgCEFPFwYnbOH0izj T71uqig31r1y524cacI+beRrx+aWYR+FRboZdbKIRMeSC/ElMlckHgxtmuIkFH6npHbN jdKVmfvVGr96+N4KuwXwxuyx6sQOX0fi0HDDHLwwWlaLMgxtXrUQGPY692nJQODd7jVV eHDOdEHcqXr0hG12m78kASpbTFG7LQuLASycb+GrmeKR5xpeqVVe2UMNYW6O7Jqb4huZ GuWdGbIVGwIozUwfufersI/IxU9Up5dN7BIuWqYqCHSPnGZr81KE2D36JPBnb8hHvD8Z Hojw== 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 t17si2089751eji.269.2021.01.07.04.44.59; Thu, 07 Jan 2021 04:45:22 -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 S1728269AbhAGMks (ORCPT + 99 others); Thu, 7 Jan 2021 07:40:48 -0500 Received: from foss.arm.com ([217.140.110.172]:59936 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728261AbhAGMkr (ORCPT ); Thu, 7 Jan 2021 07:40:47 -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 4FAC013A1; Thu, 7 Jan 2021 04:39:24 -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 35B3C3F719; Thu, 7 Jan 2021 04:39:23 -0800 (PST) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, coresight@lists.linaro.org, mathieu.poirier@linaro.org, leo.yan@linaro.org, mike.leach@linaro.org, anshuman.khandual@arm.com, Suzuki K Poulose Subject: [PATCH v6 07/26] coresight: etm4x: Always read the registers on the host CPU Date: Thu, 7 Jan 2021 12:38:40 +0000 Message-Id: <20210107123859.674252-8-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20210107123859.674252-1-suzuki.poulose@arm.com> References: <20210107123859.674252-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 As we are about to add support for sysreg access to ETM4.4+ components, make sure that we read the registers only on the host CPU. Cc: Mike Leach Reviewed-by: Mathieu Poirier Signed-off-by: Suzuki K Poulose --- .../coresight/coresight-etm4x-sysfs.c | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c index 989ce7b8ade7..c4781d4e5886 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c @@ -2344,23 +2344,20 @@ static u32 etmv4_cross_read(const struct device *dev, u32 offset) return reg.data; } -#define coresight_etm4x_reg(name, offset) \ - coresight_simple_reg32(struct etmv4_drvdata, name, offset) - #define coresight_etm4x_cross_read(name, offset) \ coresight_simple_func(struct etmv4_drvdata, etmv4_cross_read, \ name, offset) -coresight_etm4x_reg(trcpdcr, TRCPDCR); -coresight_etm4x_reg(trcpdsr, TRCPDSR); -coresight_etm4x_reg(trclsr, TRCLSR); -coresight_etm4x_reg(trcauthstatus, TRCAUTHSTATUS); -coresight_etm4x_reg(trcdevid, TRCDEVID); -coresight_etm4x_reg(trcdevtype, TRCDEVTYPE); -coresight_etm4x_reg(trcpidr0, TRCPIDR0); -coresight_etm4x_reg(trcpidr1, TRCPIDR1); -coresight_etm4x_reg(trcpidr2, TRCPIDR2); -coresight_etm4x_reg(trcpidr3, TRCPIDR3); +coresight_etm4x_cross_read(trcpdcr, TRCPDCR); +coresight_etm4x_cross_read(trcpdsr, TRCPDSR); +coresight_etm4x_cross_read(trclsr, TRCLSR); +coresight_etm4x_cross_read(trcauthstatus, TRCAUTHSTATUS); +coresight_etm4x_cross_read(trcdevid, TRCDEVID); +coresight_etm4x_cross_read(trcdevtype, TRCDEVTYPE); +coresight_etm4x_cross_read(trcpidr0, TRCPIDR0); +coresight_etm4x_cross_read(trcpidr1, TRCPIDR1); +coresight_etm4x_cross_read(trcpidr2, TRCPIDR2); +coresight_etm4x_cross_read(trcpidr3, TRCPIDR3); coresight_etm4x_cross_read(trcoslsr, TRCOSLSR); coresight_etm4x_cross_read(trcconfig, TRCCONFIGR); coresight_etm4x_cross_read(trctraceid, TRCTRACEIDR); -- 2.24.1