Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp680862ybh; Wed, 22 Jul 2020 10:23:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwW0Lluo+3JEXGwJgfXRrX7IsyfO83LDn7A+xMXKwxVgQwZ8a4pRLdZX8h2P72GYfevk2ld X-Received: by 2002:a05:6402:3113:: with SMTP id dc19mr540605edb.20.1595438617470; Wed, 22 Jul 2020 10:23:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595438617; cv=none; d=google.com; s=arc-20160816; b=KouaOPWV80DsAYyUJAJdhPLYvsKDYW+hXzvIN1Z2Jr0aTxUMIHxX5F41u/IcHx74yJ CZ/j8v5HG3MCVFMYE8T6/PQTuXLlqLb2wMMdbPkJJHfFS7VhJ/2nDxreFT2zXsYh2Uwx +FOJdV+DioSnM1kY3FwPPRYq+HGTU5DeVJMw9RxtH8tHo8PXMPEi/wTNTtZJHNi5st9K PlRmY8pc8EdLqRIjF7fJclNdZlp/tf/5Fds/I1M0KYMCEp/KqGklW7rZ53feTw6AW/lg OJkrlpDF6+QaPpdELTaJN6Q/f+huDIjSbzuwRn2cj4zy3NvwJb5EyoqS3DR18yZFF2QW 4DPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=z3kzVaDqVZDTt+aVFIqDaTqb/JtFmBYP0JzrkOyCV4g=; b=fqrqZBVvkK+WGF7beJl4ANDzxqQ/7nG3qSd/dYlWhojEjYHWLGbIASNSe/JZp4Kusw 9OylOHFqWz0p2j0StrBGvoANn+7rRJtagefN7yl+4Gop6lItTHLZpofWV58cOAL07WcT 6qwWQUuTeH1oWi0RK1hsH9XpTQjE7zesnbafSa0bwpOA0mR/dcR4CRjSQlaZLPEez/Ij kyZNdmK0YiSYZJZU/CXYtBBXphPVLiO4il5hbeTJ2DJeULfioTLPFAooqLQckzNH4J9V Ip+ufoIoUGz0xdswsROKJ6kzfvs5cXBqDlnhV/432MkfA/xrwjPcT+A6vTVUz6wGyfmD eOOQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ha25si355851ejb.628.2020.07.22.10.23.14; Wed, 22 Jul 2020 10:23:37 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732347AbgGVRVi (ORCPT + 99 others); Wed, 22 Jul 2020 13:21:38 -0400 Received: from foss.arm.com ([217.140.110.172]:60002 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731710AbgGVRVE (ORCPT ); Wed, 22 Jul 2020 13:21:04 -0400 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 83C9F1435; Wed, 22 Jul 2020 10:21:03 -0700 (PDT) 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 9F4413F66F; Wed, 22 Jul 2020 10:21:02 -0700 (PDT) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, mike.leach@linaro.org, mathieu.poirier@linaro.org, coresight@lists.linaro.org, Suzuki K Poulose Subject: [RFC PATCH 07/14] coresight: etm4x: Always read the registers on the host CPU Date: Wed, 22 Jul 2020 18:20:33 +0100 Message-Id: <20200722172040.1299289-8-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200722172040.1299289-1-suzuki.poulose@arm.com> References: <20200722172040.1299289-1-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org 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: Mathieu Poirier Cc: Mike Leach 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 b673e738bc9a..90c75ba31a0c 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c @@ -2341,23 +2341,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