Skip to contentSkip to conversation

ARM: vfp: Add missing VFP instructions to neon_support_hook

PATCH In review Mark-PK Tsai 3 participants 4 messages Sep 25, 2023 – Oct 19, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: vfp: Add missing VFP instructions to neon_support_hook

Add the missing "Unconditional Advanced SIMD and floating-point instructions" in [1] to the VFP undef hook.

This commit addresses the issue reported in [2], where executing the vudot instruction on a platform with FEAT_DotProd support resulted in an undefined instruction error.

---
 arch/arm/vfp/vfpmodule.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/vfp/vfpmodule.c +18 -0
index 7e8773a2d99d..b68efe643a12 100644
@@ -800,6 +800,24 @@ static struct undef_hook neon_support_hook[] = {{
 	.cpsr_mask	= PSR_T_BIT,
 	.cpsr_val	= PSR_T_BIT,
 	.fn		= vfp_support_entry,
+}, {
+	.instr_mask	= 0xff000800,
+	.instr_val	= 0xfc000800,
+	.cpsr_mask	= 0,
+	.cpsr_val	= 0,
+	.fn		= vfp_support_entry,
+}, {
+	.instr_mask	= 0xff000800,
+	.instr_val	= 0xfd000800,
+	.cpsr_mask	= 0,
+	.cpsr_val	= 0,
+	.fn		= vfp_support_entry,
+}, {
+	.instr_mask	= 0xff000800,
+	.instr_val	= 0xfe000800,
+	.cpsr_mask	= 0,
+	.cpsr_val	= 0,
+	.fn		= vfp_support_entry,
 }};
 
 static struct undef_hook vfp_support_hook = {
Signature · 1 line
2.18.0
#1 lore raw
Quoted 35 lines · Mark-PK Tsai

Add the missing "Unconditional Advanced SIMD and floating-point instructions" in [1] to the VFP undef hook.

This commit addresses the issue reported in [2], where executing the vudot instruction on a platform with FEAT_DotProd support resulted in an undefined instruction error.

Link:
https://developer.arm.com/documentation/ddi0597/2023-06/?lang=en [1] Link:
https://lore.kernel.org/lkml/[email protected]/

---
 arch/arm/vfp/vfpmodule.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/vfp/vfpmodule.c +9 -0
index 7e8773a2d99d..b68efe643a12 100644
@@ -800,6 +800,24 @@ static struct undef_hook neon_support_hook[] =
 {{
 	.cpsr_mask	= PSR_T_BIT,
 	.cpsr_val	= PSR_T_BIT,
 	.fn		= vfp_support_entry,
+}, {
+	.instr_mask	= 0xff000800,
+	.instr_val	= 0xfc000800,
+	.cpsr_mask	= 0,
+	.cpsr_val	= 0,
+	.fn		= vfp_support_entry,
+}, {
+	.instr_mask	= 0xff000800,
+	.instr_val	= 0xfd000800,

arch/arm/vfp/vfpmodule.c static struct undef_hook neon_support_hook[] = · line 822

Quoted 10 lines
arch/arm/vfp/vfpmodule.c +9 -0
+	.cpsr_mask	= 0,
+	.cpsr_val	= 0,
+	.fn		= vfp_support_entry,
+}, {
+	.instr_mask	= 0xff000800,
+	.instr_val	= 0xfe000800,
+	.cpsr_mask	= 0,
+	.cpsr_val	= 0,
+	.fn		= vfp_support_entry,
 }};

Could someone please kindly review this patch?
Thanks.

Tested-by
#2 lore raw
Quoted 42 lines · Mark-PK Tsai (蔡沛剛)
Quoted 40 lines · Mark-PK Tsai

Add the missing "Unconditional Advanced SIMD and floating-point instructions" in [1] to the VFP undef hook.

This commit addresses the issue reported in [2], where executing the vudot instruction on a platform with FEAT_DotProd support resulted in an undefined instruction error.

Link:
https://developer.arm.com/documentation/ddi0597/2023-06/?lang=en [1] Link:
https://lore.kernel.org/lkml/[email protected]/

---
 arch/arm/vfp/vfpmodule.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/vfp/vfpmodule.c +14 -0
index 7e8773a2d99d..b68efe643a12 100644
@@ -800,6 +800,24 @@ static struct undef_hook neon_support_hook[] =
 {{
      .cpsr_mask      = PSR_T_BIT,
      .cpsr_val       = PSR_T_BIT,
      .fn             = vfp_support_entry,
+}, {
+     .instr_mask     = 0xff000800,
+     .instr_val      = 0xfc000800,
+     .cpsr_mask      = 0,
+     .cpsr_val       = 0,
+     .fn             = vfp_support_entry,
+}, {
+     .instr_mask     = 0xff000800,
+     .instr_val      = 0xfd000800,
+     .cpsr_mask      = 0,
+     .cpsr_val       = 0,
+     .fn             = vfp_support_entry,
+}, {
+     .instr_mask     = 0xff000800,
Quoted 8 lines

arch/arm/vfp/vfpmodule.c static struct undef_hook neon_support_hook[] = {{ · line 821

Quoted 5 lines
arch/arm/vfp/vfpmodule.c +4 -0
+     .instr_val      = 0xfe000800,
+     .cpsr_mask      = 0,
+     .cpsr_val       = 0,
+     .fn             = vfp_support_entry,
 }};

Could someone please kindly review this patch?
Thanks.

I tested on unisoc sharkl3 platform, and no problems occurred.

Thanks!

#3 lore raw
In reply to Mark-PK Tsai (蔡沛剛)
Quoted 41 lines · Mark-PK Tsai (蔡沛剛)
Quoted 40 lines · Mark-PK Tsai

Add the missing "Unconditional Advanced SIMD and floating-point instructions" in [1] to the VFP undef hook.

This commit addresses the issue reported in [2], where executing the vudot instruction on a platform with FEAT_DotProd support resulted in an undefined instruction error.

Link:
https://developer.arm.com/documentation/ddi0597/2023-06/?lang=en [1] Link:
https://lore.kernel.org/lkml/[email protected]/

---
 arch/arm/vfp/vfpmodule.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/vfp/vfpmodule.c +14 -0
index 7e8773a2d99d..b68efe643a12 100644
@@ -800,6 +800,24 @@ static struct undef_hook neon_support_hook[] =
 {{
 	.cpsr_mask	= PSR_T_BIT,
 	.cpsr_val	= PSR_T_BIT,
 	.fn		= vfp_support_entry,
+}, {
+	.instr_mask	= 0xff000800,
+	.instr_val	= 0xfc000800,
+	.cpsr_mask	= 0,
+	.cpsr_val	= 0,
+	.fn		= vfp_support_entry,
+}, {
+	.instr_mask	= 0xff000800,
+	.instr_val	= 0xfd000800,
+	.cpsr_mask	= 0,
+	.cpsr_val	= 0,
+	.fn		= vfp_support_entry,
+}, {
+	.instr_mask	= 0xff000800,
Quoted 8 lines

arch/arm/vfp/vfpmodule.c static struct undef_hook neon_support_hook[] = {{ · line 821

Quoted 5 lines
arch/arm/vfp/vfpmodule.c +4 -0
+	.instr_val	= 0xfe000800,
+	.cpsr_mask	= 0,
+	.cpsr_val	= 0,
+	.fn		= vfp_support_entry,
 }};

Could someone please kindly review this patch?
Thanks.

And if someone drops it into the patch system then it might get applied before the merge window.

Thanks.

Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!