From: Anup Patel <anup@brainfault.org> To: Heiko Stuebner <heiko@sntech.de> Cc: Atish Patra <atishp@atishpatra.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, KVM General <kvm@vger.kernel.org>, "open list:KERNEL VIRTUAL MACHINE FOR RISC-V (KVM/riscv)" <kvm-riscv@lists.infradead.org>, linux-riscv <linux-riscv@lists.infradead.org>, "linux-kernel@vger.kernel.org List" <linux-kernel@vger.kernel.org> Subject: Re: [PATCH] RISC-V: KVM: include missing hwcap.h into vcpu_fp Date: Sat, 9 Apr 2022 09:21:11 +0530 [thread overview] Message-ID: <CAAhSdy0ZPH2a9D0jDNhp5OU2oRdvC-wZcu0Zjtcq9ZhMWcrMng@mail.gmail.com> (raw) In-Reply-To: <20220408092415.1603661-1-heiko@sntech.de> On Fri, Apr 8, 2022 at 2:54 PM Heiko Stuebner <heiko@sntech.de> wrote: > > 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> I have queued this for RC fixes. Thanks, Anup > --- > arch/riscv/kvm/vcpu_fp.c | 1 + > 1 file changed, 1 insertion(+) > > 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) > -- > 2.35.1 >
WARNING: multiple messages have this Message-ID (diff)
From: Anup Patel <anup@brainfault.org> To: Heiko Stuebner <heiko@sntech.de> Cc: Atish Patra <atishp@atishpatra.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, KVM General <kvm@vger.kernel.org>, "open list:KERNEL VIRTUAL MACHINE FOR RISC-V (KVM/riscv)" <kvm-riscv@lists.infradead.org>, linux-riscv <linux-riscv@lists.infradead.org>, "linux-kernel@vger.kernel.org List" <linux-kernel@vger.kernel.org> Subject: Re: [PATCH] RISC-V: KVM: include missing hwcap.h into vcpu_fp Date: Sat, 9 Apr 2022 09:21:11 +0530 [thread overview] Message-ID: <CAAhSdy0ZPH2a9D0jDNhp5OU2oRdvC-wZcu0Zjtcq9ZhMWcrMng@mail.gmail.com> (raw) In-Reply-To: <20220408092415.1603661-1-heiko@sntech.de> On Fri, Apr 8, 2022 at 2:54 PM Heiko Stuebner <heiko@sntech.de> wrote: > > 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> I have queued this for RC fixes. Thanks, Anup > --- > arch/riscv/kvm/vcpu_fp.c | 1 + > 1 file changed, 1 insertion(+) > > 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) > -- > 2.35.1 > _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2022-04-09 3:51 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-08 9:24 [PATCH] RISC-V: KVM: include missing hwcap.h into vcpu_fp Heiko Stuebner 2022-04-08 9:24 ` Heiko Stuebner 2022-04-09 3:51 ` Anup Patel [this message] 2022-04-09 3:51 ` Anup Patel
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAAhSdy0ZPH2a9D0jDNhp5OU2oRdvC-wZcu0Zjtcq9ZhMWcrMng@mail.gmail.com \ --to=anup@brainfault.org \ --cc=aou@eecs.berkeley.edu \ --cc=atishp@atishpatra.org \ --cc=heiko@sntech.de \ --cc=kvm-riscv@lists.infradead.org \ --cc=kvm@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-riscv@lists.infradead.org \ --cc=palmer@dabbelt.com \ --cc=paul.walmsley@sifive.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.