arm64/sysreg: Correct the values for GICv4.1
PATCH 1/1 arm64/sysreg: Correct the values for GICv4.1
Currently, sysreg has value as 0b0010 for the presence of GICv4.1 in ID_PFR1_EL1 and ID_AA64PFR0_EL1, instead of 0b0011 as per ARM ARM. Hence, correct them to reflect ARM ARM.
--- arch/arm64/tools/sysreg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/tools/sysreg +2 -2
@@ -149,7 +149,7 @@ Res0 63:32 UnsignedEnum 31:28 GIC 0b0000 NI 0b0001 GICv3 - 0b0010 GICv4p1 + 0b0011 GICv4p1 EndEnum UnsignedEnum 27:24 Virt_frac 0b0000 NI
@@ -903,7 +903,7 @@ EndEnum UnsignedEnum 27:24 GIC 0b0000 NI 0b0001 IMP - 0b0010 V4P1 + 0b0011 V4P1 EndEnum SignedEnum 23:20 AdvSIMD 0b0000 IMP
base-commit: 0c3836482481200ead7b416ca80c68a29cfdaabd
Signature · 1 line
2.45.2.1089.g2a221341d9-goog
Quoted 24 lines · Raghavendra Rao Ananta
Currently, sysreg has value as 0b0010 for the presence of GICv4.1 in
ID_PFR1_EL1andID_AA64PFR0_EL1, instead of 0b0011 as per ARM ARM. Hence, correct them to reflect ARM ARM.Signed-off-by Raghavendra Rao Ananta <[email protected]>--- arch/arm64/tools/sysreg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/tools/sysreg +1
-1@@ -149,7 +149,7 @@ Res0 63:32 UnsignedEnum 31:28 GIC 0b0000 NI 0b0001 GICv3 - 0b0010 GICv4p1 + 0b0011 GICv4p1 EndEnum UnsignedEnum 27:24 Virt_frac 0b0000 NI
arch/arm64/tools/sysreg EndEnum · line 906
Quoted 5 lines
arch/arm64/tools/sysreg +1
-1@@ -903,7 +903,7 @@ EndEnum UnsignedEnum 27:24 GIC 0b0000 NI 0b0001 IMP - 0b0010 V4P1 + 0b0011 V4P1
I wonder why we have different naming schemes for the same feature...
arch/arm64/tools/sysreg EndEnum · line 909
Quoted 4 lines
arch/arm64/tools/sysreg +0
-0EndEnum SignedEnum 23:20 AdvSIMD 0b0000 IMP
Yup, this looks correct and checks out against revision H.b of the GICv3 spec, revision K.a of the ARM ARM, and even I.a (which the original patches were referencing).
Once more, it shows that these dumps should be automatically generated from the XML instead of (creatively) hand-written.
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Quoted 23 lines · Raghavendra Rao Ananta
Currently, sysreg has value as 0b0010 for the presence of GICv4.1 in
ID_PFR1_EL1andID_AA64PFR0_EL1, instead of 0b0011 as per ARM ARM. Hence, correct them to reflect ARM ARM.Signed-off-by Raghavendra Rao Ananta <[email protected]>--- arch/arm64/tools/sysreg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/tools/sysreg +1
-1@@ -149,7 +149,7 @@ Res0 63:32 UnsignedEnum 31:28 GIC 0b0000 NI 0b0001 GICv3 - 0b0010 GICv4p1 + 0b0011 GICv4p1 EndEnum UnsignedEnum 27:24 Virt_frac 0b0000 NI
arch/arm64/tools/sysreg EndEnum · line 909
Quoted 8 lines
arch/arm64/tools/sysreg +1
-1@@ -903,7 +903,7 @@ EndEnum UnsignedEnum 27:24 GIC 0b0000 NI 0b0001 IMP - 0b0010 V4P1 + 0b0011 V4P1 EndEnum SignedEnum 23:20 AdvSIMD 0b0000 IMP
Fortunately there is no user for this bit inside kernel. We had checked against the correct hard-coded value (0x3) in gic_cpuif_has_vsgi().
Quoted 25 lines · Marc Zyngier
Quoted 23 lines · Raghavendra Rao Ananta
Currently, sysreg has value as 0b0010 for the presence of GICv4.1 in
ID_PFR1_EL1andID_AA64PFR0_EL1, instead of 0b0011 as per ARM ARM. Hence, correct them to reflect ARM ARM.Signed-off-by Raghavendra Rao Ananta <[email protected]>--- arch/arm64/tools/sysreg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/tools/sysreg +1
-1@@ -149,7 +149,7 @@ Res0 63:32 UnsignedEnum 31:28 GIC 0b0000 NI 0b0001 GICv3 - 0b0010 GICv4p1 + 0b0011 GICv4p1 EndEnum UnsignedEnum 27:24 Virt_frac 0b0000 NI
Quoted 8 lines
arch/arm64/tools/sysreg EndEnum · line 906
Quoted 6 lines
arch/arm64/tools/sysreg +1
-1@@ -903,7 +903,7 @@ EndEnum UnsignedEnum 27:24 GIC 0b0000 NI 0b0001 IMP - 0b0010 V4P1 + 0b0011 V4P1I wonder why we have different naming schemes for the same feature...
Both definitions were added via different commits and different developers who might just have interpreted the following common description bit differently.
"System register interface to version 4.1 of the GIC CPU interface is supported"
1224308075f1 ("arm64/sysreg: Convert ID_PFR1_EL1 to automatic generation") cea08f2bf406 ("arm64/sysreg: Convert ID_AA64PFR0_EL1 to automatic generation")
But I agree that same fields should be named exactly the same both in their 32 bit and 64 bit variants.
Quoted 17 lines
arch/arm64/tools/sysreg EndEnum · line 909
Quoted 5 lines
arch/arm64/tools/sysreg +0
-0EndEnum SignedEnum 23:20 AdvSIMD 0b0000 IMPYup, this looks correct and checks out against revision H.b of the GICv3 spec, revision K.a of the ARM ARM, and even I.a (which the original patches were referencing).
Once more, it shows that these dumps should be automatically generated from the XML instead of (creatively) hand-written.
Reviewed-by Marc Zyngier <[email protected]>M.
Quoted 27 lines · Zenghui Yu
Quoted 26 lines · Raghavendra Rao Ananta
Currently, sysreg has value as 0b0010 for the presence of GICv4.1 in
ID_PFR1_EL1andID_AA64PFR0_EL1, instead of 0b0011 as per ARM ARM. Hence, correct them to reflect ARM ARM.Signed-off-by Raghavendra Rao Ananta <[email protected]>---
arch/arm64/tools/sysreg | 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/tools/sysreg +0
-0@@ -149,7 +149,7 @@ Res0 63:32UnsignedEnum 31:28 GIC
0b0000 NI
0b0001 GICv3
- 0b0010 GICv4p1
+ 0b0011 GICv4p1
EndEnum
UnsignedEnum 27:24Virt_frac
0b0000 NIarch/arm64/tools/sysreg +0
-0@@ -903,7 +903,7 @@ EndEnumUnsignedEnum 27:24 GIC
0b0000 NI
0b0001 IMP
Quoted 8 lines
Quoted 5 lines
- 0b0010 V4P1
+ 0b0011 V4P1
EndEnum
SignedEnum 23:20 AdvSIMD
0b0000 IMPFortunately there is no user for this bit inside kernel. We had checked against the correct hard-coded value (
0x3) ingic_cpuif_has_vsgi().
which probably helped this problem to be left unnoticed till now :) but I guess it would be better to use ID_AA64PFR0_EL1_GIC_V4P1 there instead.
Quoted 3 lines
Reviewed-by Zenghui Yu <[email protected]>
Quoted 32 lines · Raghavendra Rao Ananta
Currently, sysreg has value as 0b0010 for the presence of GICv4.1 in
ID_PFR1_EL1andID_AA64PFR0_EL1, instead of 0b0011 as per ARM ARM. Hence, correct them to reflect ARM ARM.Signed-off-by Raghavendra Rao Ananta <[email protected]>--- arch/arm64/tools/sysreg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/tools/sysreg +2
-2@@ -149,7 +149,7 @@ Res0 63:32 UnsignedEnum 31:28 GIC 0b0000 NI 0b0001 GICv3 - 0b0010 GICv4p1 + 0b0011 GICv4p1 EndEnum UnsignedEnum 27:24 Virt_frac 0b0000 NI@@ -903,7 +903,7 @@ EndEnum UnsignedEnum 27:24 GIC 0b0000 NI 0b0001 IMP - 0b0010 V4P1 + 0b0011 V4P1 EndEnum SignedEnum 23:20 AdvSIMD 0b0000 IMP
Quoted 1 line
base-commit:
0c3836482481200ead7b416ca80c68a29cfdaabd
This checks against ARM DDI 0487K.a and ddi0601/2024-06 XML.
Quoted 5 lines · Raghavendra Rao Ananta
Currently, sysreg has value as 0b0010 for the presence of GICv4.1 in
ID_PFR1_EL1andID_AA64PFR0_EL1, instead of 0b0011 as per ARM ARM. Hence, correct them to reflect ARM ARM.
Applied to arm64 (for-next/core), thanks!
[1/1] arm64/sysreg: Correct the values for GICv4.1
https://git.kernel.org/arm64/c/f3dfcd25455b
Cheers,
Signature · 5 lines
Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev