Skip to content

Commit 4054eee

Browse files
mmindavpatel
authored andcommitted
RISC-V: KVM: include missing hwcap.h into vcpu_fp
vcpu_fp uses the riscv_isa_extension mechanism which gets defined in hwcap.h but doesn't include that head file. While it seems to work in most cases, in certain conditions this can lead to build failures like ../arch/riscv/kvm/vcpu_fp.c: In function ‘kvm_riscv_vcpu_fp_reset’: ../arch/riscv/kvm/vcpu_fp.c:22:13: error: implicit declaration of function ‘riscv_isa_extension_available’ [-Werror=implicit-function-declaration] 22 | if (riscv_isa_extension_available(&isa, f) || | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../arch/riscv/kvm/vcpu_fp.c:22:49: error: ‘f’ undeclared (first use in this function) 22 | if (riscv_isa_extension_available(&isa, f) || Fix this by simply including the necessary header. Fixes: 0a86512 ("RISC-V: KVM: Factor-out FP virtualization into separate sources") Signed-off-by: Heiko Stuebner <[email protected]> Signed-off-by: Anup Patel <[email protected]>
1 parent ebdef0d commit 4054eee

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/riscv/kvm/vcpu_fp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/err.h>
1212
#include <linux/kvm_host.h>
1313
#include <linux/uaccess.h>
14+
#include <asm/hwcap.h>
1415

1516
#ifdef CONFIG_FPU
1617
void kvm_riscv_vcpu_fp_reset(struct kvm_vcpu *vcpu)

0 commit comments

Comments
 (0)