Skip to content

Commit 77afe3e

Browse files
AndybnACTpalmer-dabbelt
authored andcommitted
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>
1 parent 1613e60 commit 77afe3e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

arch/riscv/kernel/cpufeature.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,9 @@ void __init riscv_fill_hwcap(void)
687687
}
688688

689689
if (elf_hwcap & COMPAT_HWCAP_ISA_V) {
690+
/*
691+
* This cannot fail when called on the boot hart
692+
*/
690693
riscv_v_setup_vsize();
691694
/*
692695
* ISA string in device tree might have 'v' flag, but

0 commit comments

Comments
 (0)