Message ID | 20230602062552.565992-15-anshuman.khandual@arm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp835650vqr; Thu, 1 Jun 2023 23:48:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6RJTA/g2OxBpZpKeSMUOvjt7P0T3LJez8omd9bKw3EMWEWb+2slNLTePZX2aqv8GZbPnUH X-Received: by 2002:ac8:5e11:0:b0:3f7:fe04:bf30 with SMTP id h17-20020ac85e11000000b003f7fe04bf30mr14350887qtx.28.1685688523843; Thu, 01 Jun 2023 23:48:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685688523; cv=none; d=google.com; s=arc-20160816; b=EDKLzmv/oCn+i175mmD1/opWz+xtWVHqdtFOrXQbKXnuX08R0ZN7kaUQmjL94m6+wb 4DTaOG4oWtaTHHHlDI9WDhkuE87WHnRcY1pSES0hlkoW4LgH9Ldaf8F2Cx7SWBaIlPpT d7TtR7hvSPfxrtrCJ1WLiD+tvrVI45V6jHxazlgE2UvMXFW3b8LxrYKEWUG3Zws3CqEt 080jCU20Cyq3V0uDxdu2sHDTnrsJwMErq5gzL1riD4x1L6py8vyKpeDYeNodG7d8ji0Z CUoCCp/hFo7XGzYytdEYrbDDcb78g+re30w9fiYjsT5228iWddz+SqQTxaAwarggNOPg nawQ== 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=glAne+xJJzAY5U4LFZKG69+fiHgRuW4t6mBt4H5xWaY=; b=uesKmPXQ41rZdzxuCTR8zbI9NtOZ1IekPDlil6XMQOsohr9RJJ9c/fRDtEuQ69chdH j4dlrlE+v3bczIrUj/2/T0Fq3m80HEF0sPY0oZ1jYwHz1ZMabip0VZhVmK8NqS6+Wjo8 xhrwMUKrYz/YLNBmnibXbs3wYPOUxhjSTLIFyr/Wo3snGPE6R9ug52HNfq5wTkl1T2KZ 41AQ5RGiluAdyFFA0KjrdJV1TflXhuBuS7S7ZHXrzoB/C8H8RV6BE2OV7Iw02QEOVqv3 vq4cCuSWjAAntS4skYbPgyFGRylSrMJNgtWleVIN4QqI8QKF8ieZ9PtgTcZnmt0hbj1J Yt2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m9-20020a654389000000b0053ef0ac79c8si516121pgp.263.2023.06.01.23.48.29; Thu, 01 Jun 2023 23:48:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S233982AbjFBG1s (ORCPT <rfc822;limurcpp@gmail.com> + 99 others); Fri, 2 Jun 2023 02:27:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40772 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233916AbjFBG1M (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 2 Jun 2023 02:27:12 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1832FE52 for <linux-kernel@vger.kernel.org>; Thu, 1 Jun 2023 23:27:07 -0700 (PDT) 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 055FA1042; Thu, 1 Jun 2023 23:27:53 -0700 (PDT) Received: from a077893.blr.arm.com (unknown [10.162.41.6]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 111DE3F67D; Thu, 1 Jun 2023 23:27:03 -0700 (PDT) From: Anshuman Khandual <anshuman.khandual@arm.com> To: linux-arm-kernel@lists.infradead.org, broonie@kernel.org Cc: Anshuman Khandual <anshuman.khandual@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Marc Zyngier <maz@kernel.org>, Rob Herring <robh@kernel.org>, Suzuki K Poulose <suzuki.poulose@arm.com>, James Morse <james.morse@arm.com>, kvmarm@lists.linux.dev, coresight@lists.linaro.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 14/14] arm64/sysreg: Convert TRBIDR_EL1 register to automatic generation Date: Fri, 2 Jun 2023 11:55:52 +0530 Message-Id: <20230602062552.565992-15-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230602062552.565992-1-anshuman.khandual@arm.com> References: <20230602062552.565992-1-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767572529839323707?= X-GMAIL-MSGID: =?utf-8?q?1767572529839323707?= |
Series |
arm64/sysreg: Convert TRBE registers to automatic generation
|
|
Commit Message
Anshuman Khandual
June 2, 2023, 6:25 a.m. UTC
This converts TRBIDR_EL1 register to automatic generation without
causing any functional change.
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
arch/arm64/include/asm/sysreg.h | 6 ------
arch/arm64/tools/sysreg | 9 +++++++++
2 files changed, 9 insertions(+), 6 deletions(-)
Comments
On Fri, Jun 02, 2023 at 11:55:52AM +0530, Anshuman Khandual wrote: > This converts TRBIDR_EL1 register to automatic generation without > causing any functional change. > +Sysreg TRBIDR_EL1 3 0 9 11 7 > +Res0 63:12 > +Field 11:8 EA EA is another field which looks like it should be an enum, as with the others this shouldn't be a blocker and could be done incrementally. > +Res0 7:6 > +Field 5 F > +Field 4 P > +Field 3:0 Align Align arguably too though really it's just encoding the relevant power of 2 with the enum coming from the fact that it's limited to at most 2KB alignment so a Field may well make more sense. Reviewed-by: Mark Brown <broonie@kernel.org>
On 6/2/23 17:42, Mark Brown wrote: > On Fri, Jun 02, 2023 at 11:55:52AM +0530, Anshuman Khandual wrote: >> This converts TRBIDR_EL1 register to automatic generation without >> causing any functional change. > >> +Sysreg TRBIDR_EL1 3 0 9 11 7 >> +Res0 63:12 >> +Field 11:8 EA > > EA is another field which looks like it should be an enum, as with the > others this shouldn't be a blocker and could be done incrementally. Will fold the following changes in this patch. --- a/arch/arm64/tools/sysreg +++ b/arch/arm64/tools/sysreg @@ -2267,7 +2267,11 @@ EndSysreg Sysreg TRBIDR_EL1 3 0 9 11 7 Res0 63:12 -Field 11:8 EA +Enum 11:8 EA + 0b0000 NON_DESC + 0b0001 IGNORE + 0b0010 SERROR +EndEnum Res0 7:6 Field 5 F Field 4 P > >> +Res0 7:6 >> +Field 5 F >> +Field 4 P >> +Field 3:0 Align > > Align arguably too though really it's just encoding the relevant power > of 2 with the enum coming from the fact that it's limited to at most 2KB > alignment so a Field may well make more sense. Can fold the following changes in this patch (if required) unless the Field looks better than Enum. --- a/arch/arm64/tools/sysreg +++ b/arch/arm64/tools/sysreg @@ -2275,5 +2275,18 @@ EndEnum Res0 7:6 Field 5 F Field 4 P -Field 3:0 Align +Enum 3:0 Align + 0b0000 BYTE + 0b0001 HALF_WORD + 0b0010 WORD + 0b0011 DOUBLE_WORD + 0b0100 16_BYTES + 0b0101 32_BYTES + 0b0110 64_BYTES + 0b0111 128_BYTES + 0b1000 156_BYTES + 0b1001 512_BYTES + 0b1010 1_KB + 0b1011 2_KB +EndEnum EndSysreg > > Reviewed-by: Mark Brown <broonie@kernel.org>
On Tue, Jun 13, 2023 at 09:56:31AM +0530, Anshuman Khandual wrote: > Sysreg TRBIDR_EL1 3 0 9 11 7 > Res0 63:12 > -Field 11:8 EA > +Enum 11:8 EA > + 0b0000 NON_DESC > + 0b0001 IGNORE > + 0b0010 SERROR > +EndEnum Sure. > >> +Field 3:0 Align > > > > Align arguably too though really it's just encoding the relevant power > > of 2 with the enum coming from the fact that it's limited to at most 2KB > > alignment so a Field may well make more sense. > > Can fold the following changes in this patch (if required) unless the Field > looks better than Enum. > > --- a/arch/arm64/tools/sysreg > +++ b/arch/arm64/tools/sysreg > @@ -2275,5 +2275,18 @@ EndEnum > Res0 7:6 > Field 5 F > Field 4 P > -Field 3:0 Align > +Enum 3:0 Align > + 0b0000 BYTE > + 0b0001 HALF_WORD > + 0b0010 WORD I'm not sure this one makes sense as an enum, though it is technically one.
diff --git a/arch/arm64/include/asm/sysreg.h b/arch/arm64/include/asm/sysreg.h index b3a32a67088f..4f6e60f6c7cf 100644 --- a/arch/arm64/include/asm/sysreg.h +++ b/arch/arm64/include/asm/sysreg.h @@ -235,14 +235,8 @@ /*** End of Statistical Profiling Extension ***/ -#define SYS_TRBIDR_EL1 sys_reg(3, 0, 9, 11, 7) - #define TRBSR_EL1_BSC_MASK GENMASK(5, 0) #define TRBSR_EL1_BSC_SHIFT 0 -#define TRBIDR_EL1_F BIT(5) -#define TRBIDR_EL1_P BIT(4) -#define TRBIDR_EL1_Align_MASK GENMASK(3, 0) -#define TRBIDR_EL1_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) diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg index 98dff7010b86..af823803eca2 100644 --- a/arch/arm64/tools/sysreg +++ b/arch/arm64/tools/sysreg @@ -2255,3 +2255,12 @@ Sysreg TRBTRG_EL1 3 0 9 11 6 Res0 63:32 Field 31:0 TRG EndSysreg + +Sysreg TRBIDR_EL1 3 0 9 11 7 +Res0 63:12 +Field 11:8 EA +Res0 7:6 +Field 5 F +Field 4 P +Field 3:0 Align +EndSysreg