diff options
author | Andy Chiu <andy.chiu@sifive.com> | 2024-05-10 00:26:51 +0800 |
---|---|---|
committer | Palmer Dabbelt <palmer@rivosinc.com> | 2024-05-30 14:33:04 -0700 |
commit | 77afe3e514b89a12143c89d263cfe2365672cfc3 (patch) | |
tree | 0133d859e52116d6ea0c578beecc1957a606e2db | |
parent | 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0 (diff) |
riscv: vector: add a comment when calling riscv_setup_vsize()
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>
Link: https://lore.kernel.org/r/20240510-zve-detection-v5-1-0711bdd26c12@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
-rw-r--r-- | arch/riscv/kernel/cpufeature.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index 5ef48cb20ee1..ccba08548004 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -687,6 +687,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 |