Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp1879017pxb; Sun, 10 Jan 2021 14:52:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJzox6OQPdxITGACMvXPHh4ZreEd5jK3ugcG4Y5TjqGHjvrGfBRai5kJAbY4M/dOEY/XpSf6 X-Received: by 2002:a17:906:6c8b:: with SMTP id s11mr8852685ejr.187.1610319162367; Sun, 10 Jan 2021 14:52:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610319162; cv=none; d=google.com; s=arc-20160816; b=jdQ2xfPGDWVwwPCTrrC4NsapHEWoM2BiGj9zke8ZhV2IJasv6dyFHdYZfAdBo6wqhL 8VIvLP0xqpUA3dr4b87koon5zmrmav/fJh02QC56ng7LXrcFFWBcuXcmY/BExIJeLxCK hApps+TyWnM9vPaIo+nBgHkrtwxUbVPm09uygJ872MLALVTcPgkz+S8TNn0mePTv2bol jt+/iUMSXZ0Q709XRCMeffAOb1YVIOi1uAOKo+d0KbONBWqo6TueXZuZLmkMpkQvXHtv UZs+yiUGx2N3D7LTjEaoqm1rk/Rrrd/Hr/GNXHO6FSg6LBHglaXtPOH5CyRYg3l0ZgOU Pehg== 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=zKT0AyvTcvE2XkFTwxhYRIUqUlVZiMerkoDTEr4InOL5LHkPC/TH4hxpeTqAvLKY4D jfUwEOqGuZrEBXZOXi8edlawCyJVBKx9Q9+otnM7ljzcDj9QcXPitqBlly/Xb/cUHucw aZuewc65TDE5vZyibWFoMNDW0ECrcRzt1YLAj/83z9UpZUhEeCnznzV4Dy1CAXY05q7F ru+jpZhu4I5KkUYpFiKLN+z7tQPCWoCGlru3EaqmwGHP66s3QU6viaisv9x+OdUNvTjs 7KumPDgSDsSn8Z3R8xtP61S0apzsuAeuYdHgh08zaWILHVjKdDn+ENJ0znQSQ5ct76Ka /ecQ== 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 ss22si5836389ejb.110.2021.01.10.14.52.19; Sun, 10 Jan 2021 14:52:42 -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 S1727191AbhAJWug (ORCPT + 99 others); Sun, 10 Jan 2021 17:50:36 -0500 Received: from foss.arm.com ([217.140.110.172]:39072 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727169AbhAJWuf (ORCPT ); Sun, 10 Jan 2021 17:50:35 -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 69CF31435; Sun, 10 Jan 2021 14:49:13 -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 1AA8F3F719; Sun, 10 Jan 2021 14:49:12 -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 07/28] coresight: etm4x: Always read the registers on the host CPU Date: Sun, 10 Jan 2021 22:48:29 +0000 Message-Id: <20210110224850.1880240-8-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 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