From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 545E1C54EBD for ; Fri, 13 Jan 2023 03:04:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LWCutCxOW0KLSgLpixPBuoVmTtPsRik7+5z3VRh97Cw=; b=LQYGNs2loxsZBL 5rsL3GEMNIJI491oeEZP7yCV+OsdAcUmnSx5E8+ocQfWsmLiFXUutvZv+o1CDDuiwfwKyUoh2WlpR a2tOV8IHwuoPWPkGPoXxnwXDtSguoYWE9IPUUvi38eNiS+3KPvVkmi+i8gdNY7UqTQ7zVVnIq8JGH fbB+lV1ckmz1YfyFXt5sh8SHsORaDEkS79PXEvdQ7yr7Fp9HK903kwKL39pnyDuW6JtcI08BwDDj6 GRqtro5B2aAc3dWEtXMC8LVepilSpH5bF2+Qf1E5cdMDtqI5qmMAPcKrpIrtz9dxZuseXNOO8P1R4 zXyB/kJI8ecnzJeYAeog==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGALT-000CZD-Gl; Fri, 13 Jan 2023 03:03:07 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGALP-000CXq-LO for linux-arm-kernel@lists.infradead.org; Fri, 13 Jan 2023 03:03:05 +0000 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 CF628FEC; Thu, 12 Jan 2023 19:03:35 -0800 (PST) Received: from [10.162.41.9] (unknown [10.162.41.9]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C85573F587; Thu, 12 Jan 2023 19:02:50 -0800 (PST) Message-ID: <16dcb986-74df-9a78-5cfc-e9f59fbe0997@arm.com> Date: Fri, 13 Jan 2023 08:32:47 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH V7 2/6] arm64/perf: Add BRBE registers and fields Content-Language: en-US To: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Catalin Marinas , Will Deacon , Marc Zyngier , Mark Brown References: <20230105031039.207972-1-anshuman.khandual@arm.com> <20230105031039.207972-3-anshuman.khandual@arm.com> From: Anshuman Khandual In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230112_190303_800251_5CBFA960 X-CRM114-Status: GOOD ( 19.26 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 1/12/23 18:54, Mark Rutland wrote: > Hi Anshuman, > > On Thu, Jan 05, 2023 at 08:40:35AM +0530, Anshuman Khandual wrote: >> This adds BRBE related register definitions and various other related field >> macros there in. These will be used subsequently in a BRBE driver which is >> being added later on. > > I haven't verified the specific values, but this looks good to me aside from > one minor nit below. > > [...] > >> +# This is just a dummy register declaration to get all common field masks and >> +# shifts for accessing given BRBINF contents. >> +Sysreg BRBINF_EL1 2 1 8 0 0 > > We don't need a dummy declaration, as we have 'SysregFields' that can be used > for this, e.g. > > SysregFields BRBINFx_EL1 > ... > EndSysregFields > > ... which will avoid accidental usage of the register encoding. Note that I've > also added an 'x' there in place of the index, which we do for other registers, > e.g. TTBRx_EL1. > > Could you please update to that? There is a problem in defining SysregFields (which I did explore earlier as well). SysregFields unfortunately does not support enums fields. Following build failure comes up, while trying to convert BRBINFx_EL1 into a SysregFields definition. Error at 932: unexpected Enum (inside SysregFields) =============================================================================== diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg index a7f9054bd84c..519c4f080898 100644 --- a/arch/arm64/tools/sysreg +++ b/arch/arm64/tools/sysreg @@ -921,10 +921,7 @@ Enum 3:0 BT EndEnum EndSysreg - -# This is just a dummy register declaration to get all common field masks and -# shifts for accessing given BRBINF contents. -Sysreg BRBINF_EL1 2 1 8 0 0 +SysregFields BRBINFx_EL1 Res0 63:47 Field 46 CCU Field 45:32 CC @@ -967,7 +964,7 @@ Enum 1:0 VALID 0b10 SOURCE 0b11 FULL EndEnum -EndSysreg +EndSysregFields Sysreg BRBCR_EL1 2 1 9 0 0 Res0 63:24 =============================================================================== There are three enum fields in BRBINFx_EL1 as listed here. Enum 13:8 TYPE Enum 7:6 EL Enum 1:0 VALID However, BRBINF_EL1 can be changed as BRBINFx_EL1, indicating its more generic nature with a potential to be used for any index value register thereafter. > > With that: > > Acked-by: Mark Rutland > > Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel