Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp850854pxb; Thu, 28 Jan 2021 01:36:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJx6eqxFjDW6gqISc+EXawlEp62ZVylruB8+ao48gC4/yZiSrHhgPBAHtFD2aN3DMaIfCFCd X-Received: by 2002:a17:906:398c:: with SMTP id h12mr10295926eje.469.1611826576194; Thu, 28 Jan 2021 01:36:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611826576; cv=none; d=google.com; s=arc-20160816; b=bErG2avMaJ8L2dsR7Ge0V5v8iX8aXriWOLO15UQKw17MwSVc2tiLc4v9/Bd/jM80fi jAqNGS0X3lsVqLy7pa/8PyNosehhNhjig/g0jO8hEe+Qyl9bAzjrbHfTKt/pNE64mQBO SF45XOlVof3MXCE9NZu3kfBrTdGB9dr5guWO6RxiS8h1Y/a1EgPqM/S/0mpilKwLI57c /vcXwJSYmilxz7nQ5nQwdGdp7SVLszt5HynShCt+eOuFc7m8iGuHKLDbHWDuku1jqo7M GJ4ISWpcXw8uy2O9dqDek5i7iy3E9SkE/u//FdzMpkc7ECKgsl4maXZmQ0sLsP7VWoEM 3dwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=xpSejmYRYLU09hmHeZw7CzN2UWdK9HHBlxitHkAAnWw=; b=hG4sh7Ye19aiED363kOomWnCo0v9FVe2Qh6wOUtykf9jqjHEJJExZq6zRLjvpbN+JA dgZQc5BEApd0YA2bom8NpEBUstoOgdLMYQjq2ygtIrrD3wlMqq26N7DqYMlN9eziZBdZ H3rHKoHIgt0ezaerO8rXof4y4SFZBoKIVHYDFjcFgaiSBbjmb0yWB/wXo/54InmfgPsf EDvk7yR7QkVRDtFc3QWvcmCQ0hOF+9YsXo+6fxxmxJ03PIefFLeeGGu0/bcf8MhsbzOQ vQRaki67WfAZMfz4o2HqWeAJXFRllx75Lg1/XDLMEq3BQ+OSv+0gRxOHH24yShJn7C92 Is8g== 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 lr24si2246117ejb.92.2021.01.28.01.35.51; Thu, 28 Jan 2021 01:36:16 -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 S232440AbhA1JfB (ORCPT + 99 others); Thu, 28 Jan 2021 04:35:01 -0500 Received: from foss.arm.com ([217.140.110.172]:55196 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232566AbhA1Jc3 (ORCPT ); Thu, 28 Jan 2021 04:32:29 -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 3C7F01042; Thu, 28 Jan 2021 01:31:42 -0800 (PST) Received: from [10.57.45.249] (unknown [10.57.45.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 318AA3F766; Thu, 28 Jan 2021 01:31:40 -0800 (PST) Subject: Re: [PATCH V3 09/14] arm64: Add TRBE definitions To: Anshuman Khandual , linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org Cc: mathieu.poirier@linaro.org, mike.leach@linaro.org, lcherian@marvell.com, linux-kernel@vger.kernel.org, Will Deacon , Catalin Marinas , Mark Rutland References: <1611737738-1493-1-git-send-email-anshuman.khandual@arm.com> <1611737738-1493-10-git-send-email-anshuman.khandual@arm.com> From: Suzuki K Poulose Message-ID: Date: Thu, 28 Jan 2021 09:31:34 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <1611737738-1493-10-git-send-email-anshuman.khandual@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/27/21 8:55 AM, Anshuman Khandual wrote: > This adds TRBE related registers and corresponding feature macros. > > Cc: Mathieu Poirier > Cc: Mike Leach > Cc: Suzuki K Poulose Cc: Catalin Marinas Cc: Mark Rutland Cc: Will Deacon > Signed-off-by: Anshuman Khandual Reviewed-by: Suzuki K Poulose > --- > Changes in V3: > > - ID_AA64DFR0_TRBE_SHIFT has been moved here from the TRBE driver > - Changed TRBLIMITR_TRIG_MODE_SHIFT as 3 > > arch/arm64/include/asm/sysreg.h | 50 +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 50 insertions(+) > > diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h > index 4acff97..85ae4db 100644 > --- a/arch/arm64/include/asm/sysreg.h > +++ b/arch/arm64/include/asm/sysreg.h > @@ -329,6 +329,55 @@ > > /*** End of Statistical Profiling Extension ***/ > > +/* > + * TRBE Registers > + */ > +#define SYS_TRBLIMITR_EL1 sys_reg(3, 0, 9, 11, 0) > +#define SYS_TRBPTR_EL1 sys_reg(3, 0, 9, 11, 1) > +#define SYS_TRBBASER_EL1 sys_reg(3, 0, 9, 11, 2) > +#define SYS_TRBSR_EL1 sys_reg(3, 0, 9, 11, 3) > +#define SYS_TRBMAR_EL1 sys_reg(3, 0, 9, 11, 4) > +#define SYS_TRBTRG_EL1 sys_reg(3, 0, 9, 11, 6) > +#define SYS_TRBIDR_EL1 sys_reg(3, 0, 9, 11, 7) > + > +#define TRBLIMITR_LIMIT_MASK GENMASK_ULL(51, 0) > +#define TRBLIMITR_LIMIT_SHIFT 12 > +#define TRBLIMITR_NVM BIT(5) > +#define TRBLIMITR_TRIG_MODE_MASK GENMASK(1, 0) > +#define TRBLIMITR_TRIG_MODE_SHIFT 3 > +#define TRBLIMITR_FILL_MODE_MASK GENMASK(1, 0) > +#define TRBLIMITR_FILL_MODE_SHIFT 1 > +#define TRBLIMITR_ENABLE BIT(0) > +#define TRBPTR_PTR_MASK GENMASK_ULL(63, 0) > +#define TRBPTR_PTR_SHIFT 0 > +#define TRBBASER_BASE_MASK GENMASK_ULL(51, 0) > +#define TRBBASER_BASE_SHIFT 12 > +#define TRBSR_EC_MASK GENMASK(5, 0) > +#define TRBSR_EC_SHIFT 26 > +#define TRBSR_IRQ BIT(22) > +#define TRBSR_TRG BIT(21) > +#define TRBSR_WRAP BIT(20) > +#define TRBSR_ABORT BIT(18) > +#define TRBSR_STOP BIT(17) > +#define TRBSR_MSS_MASK GENMASK(15, 0) > +#define TRBSR_MSS_SHIFT 0 > +#define TRBSR_BSC_MASK GENMASK(5, 0) > +#define TRBSR_BSC_SHIFT 0 > +#define TRBSR_FSC_MASK GENMASK(5, 0) > +#define TRBSR_FSC_SHIFT 0 > +#define TRBMAR_SHARE_MASK GENMASK(1, 0) > +#define TRBMAR_SHARE_SHIFT 8 > +#define TRBMAR_OUTER_MASK GENMASK(3, 0) > +#define TRBMAR_OUTER_SHIFT 4 > +#define TRBMAR_INNER_MASK GENMASK(3, 0) > +#define TRBMAR_INNER_SHIFT 0 > +#define TRBTRG_TRG_MASK GENMASK(31, 0) > +#define TRBTRG_TRG_SHIFT 0 > +#define TRBIDR_FLAG BIT(5) > +#define TRBIDR_PROG BIT(4) > +#define TRBIDR_ALIGN_MASK GENMASK(3, 0) > +#define TRBIDR_ALIGN_SHIFT 0 > + > #define SYS_PMINTENSET_EL1 sys_reg(3, 0, 9, 14, 1) > #define SYS_PMINTENCLR_EL1 sys_reg(3, 0, 9, 14, 2) > > @@ -831,6 +880,7 @@ > #define ID_AA64MMFR2_CNP_SHIFT 0 > > /* id_aa64dfr0 */ > +#define ID_AA64DFR0_TRBE_SHIFT 44 > #define ID_AA64DFR0_TRACE_FILT_SHIFT 40 > #define ID_AA64DFR0_DOUBLELOCK_SHIFT 36 > #define ID_AA64DFR0_PMSVER_SHIFT 32 >