Skip to contentSkip to conversation

arm64: Fix HFGxTR_EL2 field naming

PATCH Applied Marc Zyngier 3 participants 5 messages Jul 3, 2023 – Jul 13, 2023 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: Fix HFGxTR_EL2 field naming

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")
Cc Mark Brown <[email protected]>
Cc Will Deacon <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Mark Rutland <[email protected]>
---
 arch/arm64/tools/sysreg | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
arch/arm64/tools/sysreg +6 -6
index c9a0d1fa3209..930c8cc0812f 100644
@@ -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
Signature · 7 lines
2.34.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Marc Zyngier

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.

Quoted 2 lines

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

Indeed :/

Quoted 1 line

+Field 46 ERXPFGF_EL1

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

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#2 lore raw
Quoted 7 lines · Mark Brown
Quoted 2 lines · Marc Zyngier

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.

Quoted 4 lines
Quoted 2 lines

+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.
Signature · 6 lines
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#3 lore raw
Quoted 4 lines · Marc Zyngier
Quoted 1 line · Mark Brown

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

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

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.

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

maintainer Applied
#4 lore raw
In reply to Marc Zyngier
Quoted 8 lines · Marc Zyngier

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,

Signature · 10 lines
Will

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

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel