Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp259043pxx; Thu, 29 Oct 2020 01:45:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmgplITz/03PGuHwyD6lt/gDAPzLF6bogU3dgyWEhenX6mkAM9XbeYe3A1mu55JsdMVMxZ X-Received: by 2002:aa7:cc84:: with SMTP id p4mr2758388edt.97.1603961150650; Thu, 29 Oct 2020 01:45:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603961150; cv=none; d=google.com; s=arc-20160816; b=i2UPDSdU791XuBGdWmtxxNa8vyq35Nj0Aa2zeXwwTUo+mIirAOdn0Pk4NbcmxdFrWd pt9nl8u3akhL15kpKavK827YVEb7OFaoJCqQqnBT/2bd0wSNc9/CoD+7vXADk8P70qsa Lj2l3CJCSVQLgZuRM+Kv38KdqfjDXL1eynzguiGdJ8P2jVde+6LzztAMI5dn+7DXLpKE TA8maQGheOipgiStJwaNWyAnMz4+i4koqHjddBz2OQccfJnW/Ox/N8rRbSv/bmA25ZWs ajm7rREOwmqxfDsjm7oysNkhv3ufoMWk2kf5xVSFnLpcYbCuBnlwc8ir+KEkIqDmPpyE PfHA== 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=HOhZo/N0Y0Xax/7XRLBfiAbFB1LXrugxrBImtGcvfo/yYDuGfej9gV3emVbxrMG1ih 5oPruMoGkUq8dBn1ww0t/tJnQLLm7kziP/GocAjzmg2lq/1WoFFaOvDBMuYrJf47vl9u FZjBLmW7CVrIuISfM1URR1e5joJbWNrzlCtAslKMk2iyog9qL9yOzeVbMyz8vNbMD7nT 1LHmvFhEQyQ645xfUpadlRqfcCd1ouY1Lnkw8+iYwQhDGn8JVBjQPUMEnGcUOQGkDXgm ioLfbe9viJqEAML+960aWiP25BRQ5dyzykebAHQNKIqtG9WWKjmBLuBbj1ojWMmc5EuO l4Qg== 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 w15si1490800eds.448.2020.10.29.01.45.28; Thu, 29 Oct 2020 01:45:50 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730453AbgJ2BDe (ORCPT + 99 others); Wed, 28 Oct 2020 21:03:34 -0400 Received: from foss.arm.com ([217.140.110.172]:39114 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730470AbgJ1WKN (ORCPT ); Wed, 28 Oct 2020 18:10:13 -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 4E6E01764; Wed, 28 Oct 2020 15:10:13 -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 69C6D3F73C; Wed, 28 Oct 2020 15:10:12 -0700 (PDT) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: mathieu.poirier@linaro.org, mike.leach@linaro.org, coresight@lists.linaro.org, linux-kernel@vger.kernel.org, Suzuki K Poulose Subject: [PATCH v3 11/26] coresight: etm4x: Always read the registers on the host CPU Date: Wed, 28 Oct 2020 22:09:30 +0000 Message-Id: <20201028220945.3826358-13-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20201028220945.3826358-1-suzuki.poulose@arm.com> References: <20201028220945.3826358-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