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 <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 1613e60 commit 77afe3e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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)