]> git.baikalelectronics.ru Git - kernel.git/commit
RISC-V: KVM: include missing hwcap.h into vcpu_fp
authorHeiko Stuebner <heiko@sntech.de>
Sat, 9 Apr 2022 03:46:00 +0000 (09:16 +0530)
committerAnup Patel <anup@brainfault.org>
Sat, 9 Apr 2022 03:46:00 +0000 (09:16 +0530)
commit9fabe651da58d373b212a4f5f9d197fb31b9fab1
tree4cfe681d701765ba6ee9cb41bf514f3589976de1
parentdcb89c3048def9882e9d607507460009dae1ff8d
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: 7f5cce0f157c ("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>
arch/riscv/kvm/vcpu_fp.c