diff mbox series

[v5,1/8] riscv: vector: add a comment when calling riscv_setup_vsize()

Message ID 20240510-zve-detection-v5-1-0711bdd26c12@sifive.com (mailing list archive)
State Accepted
Commit 77afe3e514b89a12143c89d263cfe2365672cfc3
Headers show
Series Support Zve32[xf] and Zve64[xfd] Vector subextensions | expand

Commit Message

Andy Chiu May 9, 2024, 4:26 p.m. UTC
The function would fail when it detects the calling hart's vlen doesn't
match the first one's. The boot hart is the first hart calling this
function during riscv_fill_hwcap, so it is impossible to fail here. Add
a comment about this behavior.

Signed-off-by: Andy Chiu <andy.chiu@sifive.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
---
Changelog v2, v5:
 - update the comment (Conor)
---
 arch/riscv/kernel/cpufeature.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c
index 3ed2359eae35..15ffda1968d8 100644
--- a/arch/riscv/kernel/cpufeature.c
+++ b/arch/riscv/kernel/cpufeature.c
@@ -683,6 +683,9 @@  void __init riscv_fill_hwcap(void)
 	}
 
 	if (elf_hwcap & COMPAT_HWCAP_ISA_V) {
+		/*
+		 * This cannot fail when called on the boot hart
+		 */
 		riscv_v_setup_vsize();
 		/*
 		 * ISA string in device tree might have 'v' flag, but