From 3344a8d246306a2d5b9376ef7fc2afc3027c6222 Mon Sep 17 00:00:00 2001 From: Han Gao Date: Tue, 27 Aug 2024 17:29:17 +0800 Subject: [PATCH] fix: riscv: xtheadvector: fix setup_v_vsize riscv: xtheadvector: fix setup_v_vsize Signed-off-by: Han Gao Signed-off-by: Han Gao --- arch/riscv/kernel/cpufeature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index 4efc0790195d..268187d4c8de 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -538,7 +538,7 @@ void __init riscv_fill_hwcap(void) elf_hwcap &= ~COMPAT_HWCAP_ISA_F; } - if (elf_hwcap & COMPAT_HWCAP_ISA_V) { + if ((elf_hwcap & COMPAT_HWCAP_ISA_V) || test_bit(RISCV_ISA_EXT_XTHEADVECTOR, hart_isa[0].isa)) { riscv_v_setup_vsize(); /* * ISA string in device tree might have 'v' flag, but