linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: Fix HFGxTR_EL2 field naming
@ 2023-07-03 13:04 Marc Zyngier
  2023-07-03 13:13 ` Mark Brown
  2023-07-13  9:54 ` Will Deacon
  0 siblings, 2 replies; 5+ messages in thread
From: Marc Zyngier @ 2023-07-03 13:04 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: Mark Brown, Will Deacon, Catalin Marinas, Mark Rutland

The HFGxTR_EL2 fields do not always follow the naming described
in the spec, nor do they match the name of the register they trap
in the rest of the kernel.

It is a bit sad that they were written by hand despite the availability
of a machine readable version...

Fixes: cc077e7facbe ("arm64/sysreg: Convert HFG[RW]TR_EL2 to automatic generation")
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.org>
Cc: Mark Rutland <mark.rutland@arm.com>
---
 arch/arm64/tools/sysreg | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/tools/sysreg b/arch/arm64/tools/sysreg
index c9a0d1fa3209..930c8cc0812f 100644
--- a/arch/arm64/tools/sysreg
+++ b/arch/arm64/tools/sysreg
@@ -1890,7 +1890,7 @@ Field	0	SM
 EndSysreg
 
 SysregFields	HFGxTR_EL2
-Field	63	nAMIAIR2_EL1
+Field	63	nAMAIR2_EL1
 Field	62	nMAIR2_EL1
 Field	61	nS2POR_EL1
 Field	60	nPOR_EL1
@@ -1905,9 +1905,9 @@ Field	52	nGCS_EL0
 Res0	51
 Field	50	nACCDATA_EL1
 Field	49	ERXADDR_EL1
-Field	48	EXRPFGCDN_EL1
-Field	47	EXPFGCTL_EL1
-Field	46	EXPFGF_EL1
+Field	48	ERXPFGCDN_EL1
+Field	47	ERXPFGCTL_EL1
+Field	46	ERXPFGF_EL1
 Field	45	ERXMISCn_EL1
 Field	44	ERXSTATUS_EL1
 Field	43	ERXCTLR_EL1
@@ -1922,8 +1922,8 @@ Field	35	TPIDR_EL0
 Field	34	TPIDRRO_EL0
 Field	33	TPIDR_EL1
 Field	32	TCR_EL1
-Field	31	SCTXNUM_EL0
-Field	30	SCTXNUM_EL1
+Field	31	SCXTNUM_EL0
+Field	30	SCXTNUM_EL1
 Field	29	SCTLR_EL1
 Field	28	REVIDR_EL1
 Field	27	PAR_EL1
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: Fix HFGxTR_EL2 field naming
  2023-07-03 13:04 [PATCH] arm64: Fix HFGxTR_EL2 field naming Marc Zyngier
@ 2023-07-03 13:13 ` Mark Brown
  2023-07-03 13:30   ` Marc Zyngier
  2023-07-13  9:54 ` Will Deacon
  1 sibling, 1 reply; 5+ messages in thread
From: Mark Brown @ 2023-07-03 13:13 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: linux-arm-kernel, Will Deacon, Catalin Marinas, Mark Rutland


[-- Attachment #1.1: Type: text/plain, Size: 477 bytes --]

On Mon, Jul 03, 2023 at 02:04:16PM +0100, Marc Zyngier wrote:

> The HFGxTR_EL2 fields do not always follow the naming described
> in the spec, nor do they match the name of the register they trap
> in the rest of the kernel.

Reviewed-by: Mark Brown <broonie@kernel.org>

> It is a bit sad that they were written by hand despite the availability
> of a machine readable version...

Indeed :/

> +Field	46	ERXPFGF_EL1

This one isn't symmetric between R and W, it's RES0 in W.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: Fix HFGxTR_EL2 field naming
  2023-07-03 13:13 ` Mark Brown
@ 2023-07-03 13:30   ` Marc Zyngier
  2023-07-03 14:59     ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Marc Zyngier @ 2023-07-03 13:30 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-arm-kernel, Will Deacon, Catalin Marinas, Mark Rutland

On Mon, 03 Jul 2023 14:13:45 +0100,
Mark Brown <broonie@kernel.org> wrote:
> 
> On Mon, Jul 03, 2023 at 02:04:16PM +0100, Marc Zyngier wrote:
> 
> > It is a bit sad that they were written by hand despite the availability
> > of a machine readable version...
> 
> Indeed :/

Any hope of a change on that front? It is hard to have the utmost
confidence in these dumps when they are handwritten. At the very
least, they should undergo an automated test against the XML.

> 
> > +Field	46	ERXPFGF_EL1
> 
> This one isn't symmetric between R and W, it's RES0 in W.

There is plenty more (bits 46, 42, 40, 28, 26, 25, 21, 18, 15, 14, 10,
9, 2) in 0487J.a.

	M.


-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: Fix HFGxTR_EL2 field naming
  2023-07-03 13:30   ` Marc Zyngier
@ 2023-07-03 14:59     ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2023-07-03 14:59 UTC (permalink / raw)
  To: Marc Zyngier; +Cc: linux-arm-kernel, Will Deacon, Catalin Marinas, Mark Rutland


[-- Attachment #1.1: Type: text/plain, Size: 618 bytes --]

On Mon, Jul 03, 2023 at 02:30:50PM +0100, Marc Zyngier wrote:
> Mark Brown <broonie@kernel.org> wrote:

> > On Mon, Jul 03, 2023 at 02:04:16PM +0100, Marc Zyngier wrote:

> > > It is a bit sad that they were written by hand despite the availability
> > > of a machine readable version...

> > Indeed :/

> Any hope of a change on that front? It is hard to have the utmost
> confidence in these dumps when they are handwritten. At the very
> least, they should undergo an automated test against the XML.

I wouldn't hold your breath sadly.  At least it's a little easier to
audit, and sets things up for helper macros.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] arm64: Fix HFGxTR_EL2 field naming
  2023-07-03 13:04 [PATCH] arm64: Fix HFGxTR_EL2 field naming Marc Zyngier
  2023-07-03 13:13 ` Mark Brown
@ 2023-07-13  9:54 ` Will Deacon
  1 sibling, 0 replies; 5+ messages in thread
From: Will Deacon @ 2023-07-13  9:54 UTC (permalink / raw)
  To: Marc Zyngier, linux-arm-kernel
  Cc: catalin.marinas, kernel-team, Will Deacon, Mark Brown,
	Catalin Marinas, Mark Rutland

On Mon, 3 Jul 2023 14:04:16 +0100, Marc Zyngier wrote:
> The HFGxTR_EL2 fields do not always follow the naming described
> in the spec, nor do they match the name of the register they trap
> in the rest of the kernel.
> 
> It is a bit sad that they were written by hand despite the availability
> of a machine readable version...
> 
> [...]

Applied to arm64 (for-next/fixes), thanks!

[1/1] arm64: Fix HFGxTR_EL2 field naming
      https://git.kernel.org/arm64/c/55b87b749963

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-07-13  9:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-03 13:04 [PATCH] arm64: Fix HFGxTR_EL2 field naming Marc Zyngier
2023-07-03 13:13 ` Mark Brown
2023-07-03 13:30   ` Marc Zyngier
2023-07-03 14:59     ` Mark Brown
2023-07-13  9:54 ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).