diff options
author | Heiko Stuebner <heiko@sntech.de> | 2022-04-09 09:16:00 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2022-04-09 09:16:00 +0530 |
commit | 4054eee9290248bf66c5eacb58879c9aaad37f71 (patch) | |
tree | 4cfe681d701765ba6ee9cb41bf514f3589976de1 /arch/riscv/kvm/vcpu_fp.c | |
parent | ebdef0de2dbc40e697adaa6b3408130f7a7b8351 (diff) | |
download | linux-stable-4054eee9290248bf66c5eacb58879c9aaad37f71.tar.gz linux-stable-4054eee9290248bf66c5eacb58879c9aaad37f71.tar.bz2 linux-stable-4054eee9290248bf66c5eacb58879c9aaad37f71.zip |
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: 0a86512dc113 ("RISC-V: KVM: Factor-out FP virtualization into separate
sources")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'arch/riscv/kvm/vcpu_fp.c')
-rw-r--r-- | arch/riscv/kvm/vcpu_fp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/riscv/kvm/vcpu_fp.c b/arch/riscv/kvm/vcpu_fp.c index 4449a976e5a6..d4308c512007 100644 --- a/arch/riscv/kvm/vcpu_fp.c +++ b/arch/riscv/kvm/vcpu_fp.c @@ -11,6 +11,7 @@ #include <linux/err.h> #include <linux/kvm_host.h> #include <linux/uaccess.h> +#include <asm/hwcap.h> #ifdef CONFIG_FPU void kvm_riscv_vcpu_fp_reset(struct kvm_vcpu *vcpu) |