misc warning cleanup in arch/risc-v
Subsystems (3)
cover misc warning cleanup in arch/risc-v
From: Conor Dooley <[email protected]>
Hey all,
Couple fixes here for most of what's left of the {sparse,} warnings in arch/riscv that are still in need of patches. Ben has sent patches for the VDSO issue already (although they seem to need rework).
VDSO aside, With this patchset applied, we are left with:
- cpuinfo_ops missing prototype: this likely needs to go into an asm-generic header & I'll send a separate patch for that.
- Complaints about an error in mm/init.c:
"error inarch/riscv/mm/init.c:819:2: error: "setup_vm() is <trunc> I think this can be ignored.
- 600+ -Woverride-init warnings for syscall table setup where overriding seems to be the whole point of the macro.
- Warnings about imported kvm core code.
- Flexible array member warnings that look like common KVM code patterns
- An unexpected unlock in kvm_riscv_check_vcpu_requests that was added intentionally:
https://lore.kernel.org/all/20220710151105.687193-1-apatel at ventanamicro.com/ Is it worth looking into whether that's a false positive or not?
Thanks,
Conor.
Conor Dooley (4):
riscv: kvm: vcpu_timer: fix unused variable warnings
riscv: kvm: move extern sbi_ext declarations to a header
riscv: signal: fix missing prototype warning
riscv: traps: add missing prototype
arch/riscv/include/asm/kvm_vcpu_sbi.h | 12 ++++++++++++ arch/riscv/include/asm/signal.h | 12 ++++++++++++ arch/riscv/include/asm/thread_info.h | 2 ++ arch/riscv/kernel/signal.c | 1 + arch/riscv/kernel/traps.c | 3 ++- arch/riscv/kvm/vcpu_sbi.c | 12 +----------- arch/riscv/kvm/vcpu_timer.c | 4 ---- 7 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 arch/riscv/include/asm/signal.h
Signature · 1 line
2.37.1
PATCH 1/4 riscv: kvm: vcpu_timer: fix unused variable warnings
From: Conor Dooley <[email protected]>
In two places, csr is set but never used:
arch/riscv/kvm/vcpu_timer.c:302:23: warning: variable 'csr' set but not used [-Wunused-but-set-variable]
struct kvm_vcpu_csr *csr;
^
arch/riscv/kvm/vcpu_timer.c:327:23: warning: variable 'csr' set but not used [-Wunused-but-set-variable]
struct kvm_vcpu_csr *csr;
^Remove the variable.
--- arch/riscv/kvm/vcpu_timer.c | 4 ---- 1 file changed, 4 deletions(-)
arch/riscv/kvm/vcpu_timer.c +0 -4
@@ -299,7 +299,6 @@ static void kvm_riscv_vcpu_update_timedelta(struct kvm_vcpu *vcpu)void kvm_riscv_vcpu_timer_restore (struct kvm_vcpu *vcpu) { -struct kvm_vcpu_csr *csr;struct kvm_vcpu_timer *t = &vcpu->arch.timer;kvm_riscv_vcpu_update_timedelta (vcpu);
@@ -307,7 +306,6 @@ void kvm_riscv_vcpu_timer_restore(struct kvm_vcpu *vcpu)if (!t->sstc_enabled)return ; - csr = &vcpu->arch.guest_csr;#if defined(CONFIG_32BIT )csr_write (CSR_VSTIMECMP , (u32 )t->next_cycles);csr_write (CSR_VSTIMECMPH , (u32)(t->next_cycles >>32 ));
@@ -324,13 +322,11 @@ void kvm_riscv_vcpu_timer_restore(struct kvm_vcpu *vcpu)void kvm_riscv_vcpu_timer_save (struct kvm_vcpu *vcpu) { -struct kvm_vcpu_csr *csr;struct kvm_vcpu_timer *t = &vcpu->arch.timer;if (!t->sstc_enabled)return ; - csr = &vcpu->arch.guest_csr; t = &vcpu->arch.timer;#if defined(CONFIG_32BIT ) t->next_cycles =csr_read (CSR_VSTIMECMP );
Signature · 1 line
2.37.1
Anup Patel
maintainerRe: [PATCH 1/4] riscv: kvm: vcpu_timer: fix unused variable warnings
Quoted 12 lines · Conor Dooley
From: Conor Dooley <[email protected]>
In two places, csr is set but never used:
arch/riscv/kvm/vcpu_timer.c:302:23: warning: variable 'csr' set but not used [-Wunused-but-set-variable]struct kvm_vcpu_csr *csr; ^ arch/riscv/kvm/vcpu_timer.c:327:23: warning: variable 'csr' set but not used [-Wunused-but-set-variable] struct kvm_vcpu_csr *csr; ^
Quoted 4 lines
Remove the variable.
Fixes 8f5cb44b1bae ("RISC-V: KVM: Support sstc extension")Signed-off-by Conor Dooley <[email protected]>
I have queued this fix for 6.0-rc1
Thanks,
Anup
Quoted 41 lines
--- arch/riscv/kvm/vcpu_timer.c | 4 ---- 1 file changed, 4 deletions(-)arch/riscv/kvm/vcpu_timer.c +0
-5@@ -299,7 +299,6 @@ static void kvm_riscv_vcpu_update_timedelta(struct kvm_vcpu *vcpu)void kvm_riscv_vcpu_timer_restore (struct kvm_vcpu *vcpu) { -struct kvm_vcpu_csr *csr;struct kvm_vcpu_timer *t = &vcpu->arch.timer;kvm_riscv_vcpu_update_timedelta (vcpu);@@ -307,7 +306,6 @@ void kvm_riscv_vcpu_timer_restore(struct kvm_vcpu *vcpu)if (!t->sstc_enabled)return ; - csr = &vcpu->arch.guest_csr;#if defined(CONFIG_32BIT )csr_write (CSR_VSTIMECMP , (u32 )t->next_cycles);csr_write (CSR_VSTIMECMPH , (u32)(t->next_cycles >>32 ));@@ -324,13 +322,11 @@ void kvm_riscv_vcpu_timer_restore(struct kvm_vcpu *vcpu)void kvm_riscv_vcpu_timer_save (struct kvm_vcpu *vcpu) { -struct kvm_vcpu_csr *csr;struct kvm_vcpu_timer *t = &vcpu->arch.timer;if (!t->sstc_enabled)return ; - csr = &vcpu->arch.guest_csr; t = &vcpu->arch.timer;#if defined(CONFIG_32BIT ) t->next_cycles =csr_read (CSR_VSTIMECMP ); --2.37.1
Re: [PATCH 1/4] riscv: kvm: vcpu_timer: fix unused variable warnings
In reply to Conor DooleyQuoted 55 lines · Conor Dooley
From: Conor Dooley <[email protected]>
In two places, csr is set but never used:
arch/riscv/kvm/vcpu_timer.c:302:23: warning: variable 'csr' set but not used [-Wunused-but-set-variable]struct kvm_vcpu_csr *csr; ^ arch/riscv/kvm/vcpu_timer.c:327:23: warning: variable 'csr' set but not used [-Wunused-but-set-variable] struct kvm_vcpu_csr *csr; ^Remove the variable.
Fixes 8f5cb44b1bae ("RISC-V: KVM: Support sstc extension")Signed-off-by Conor Dooley <[email protected]>--- arch/riscv/kvm/vcpu_timer.c | 4 ---- 1 file changed, 4 deletions(-)arch/riscv/kvm/vcpu_timer.c +0
-5@@ -299,7 +299,6 @@ static void kvm_riscv_vcpu_update_timedelta(struct kvm_vcpu *vcpu)void kvm_riscv_vcpu_timer_restore (struct kvm_vcpu *vcpu) { -struct kvm_vcpu_csr *csr;struct kvm_vcpu_timer *t = &vcpu->arch.timer;kvm_riscv_vcpu_update_timedelta (vcpu);@@ -307,7 +306,6 @@ void kvm_riscv_vcpu_timer_restore(struct kvm_vcpu *vcpu)if (!t->sstc_enabled)return ; - csr = &vcpu->arch.guest_csr;#if defined(CONFIG_32BIT )csr_write (CSR_VSTIMECMP , (u32 )t->next_cycles);csr_write (CSR_VSTIMECMPH , (u32)(t->next_cycles >>32 ));@@ -324,13 +322,11 @@ void kvm_riscv_vcpu_timer_restore(struct kvm_vcpu *vcpu)void kvm_riscv_vcpu_timer_save (struct kvm_vcpu *vcpu) { -struct kvm_vcpu_csr *csr;struct kvm_vcpu_timer *t = &vcpu->arch.timer;if (!t->sstc_enabled)return ; - csr = &vcpu->arch.guest_csr; t = &vcpu->arch.timer;#if defined(CONFIG_32BIT ) t->next_cycles =csr_read (CSR_VSTIMECMP ); --
Quoted 2 lines
2.37.1
Thanks for fixing this. Sorry for missing those.
--
Regards,
Atish
PATCH 2/4 riscv: kvm: move extern sbi_ext declarations to a header
In reply to Conor DooleyFrom: Conor Dooley <[email protected]>
Sparse complains about missing statics in the declarations of several
variables:arch/riscv/kvm/vcpu_sbi_replace.c:38:37: warning: symbol 'vcpu_sbi_ext_time' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_replace.c:73:37: warning: symbol 'vcpu_sbi_ext_ipi' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_replace.c:126:37: warning: symbol 'vcpu_sbi_ext_rfence' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_replace.c:170:37: warning: symbol 'vcpu_sbi_ext_srst' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_base.c:69:37: warning: symbol 'vcpu_sbi_ext_base' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_base.c:90:37: warning: symbol 'vcpu_sbi_ext_experimental' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_base.c:96:37: warning: symbol 'vcpu_sbi_ext_vendor' was not declared. Should it be static? arch/riscv/kvm/vcpu_sbi_hsm.c:115:37: warning: symbol 'vcpu_sbi_ext_hsm' was not declared. Should it be static?
These variables are however used in vcpu_sbi.c where they are declared as extern. Move them to kvm_vcpu_sbi.h which is handily already included by the three other files.
--- arch/riscv/include/asm/kvm_vcpu_sbi.h | 12 ++++++++++++ arch/riscv/kvm/vcpu_sbi.c | 12 +----------- 2 files changed, 13 insertions(+), 11 deletions(-)
arch/riscv/include/asm/kvm_vcpu_sbi.h +12 -0
@@ -33,4 +33,16 @@ void kvm_riscv_vcpu_sbi_system_reset(struct kvm_vcpu *vcpu, u32 type, u64 flags);const struct kvm_vcpu_sbi_extension *kvm_vcpu_sbi_find_ext (unsigned long extid); +#ifdef CONFIG_RISCV_SBI_V01 +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_v01; +#endif +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_base; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_time; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_ipi; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_rfence; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_srst; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_hsm; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_experimental; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_vendor; +#endif /* __RISCV_KVM_VCPU_SBI_H__ */
arch/riscv/kvm/vcpu_sbi.c +1 -11
@@ -32,23 +32,13 @@ static int kvm_linux_err_map_sbi(int err) }; } -#ifdef CONFIG_RISCV_SBI_V01 -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_v01; -#else +#ifndef CONFIG_RISCV_SBI_V01 static const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_v01 = { .extid_start =-1UL , .extid_end =-1UL , .handler =NULL , };#endif -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_base; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_time; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_ipi; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_rfence; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_srst; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_hsm; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_experimental; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_vendor;static const struct kvm_vcpu_sbi_extension *sbi_ext[] = { &vcpu_sbi_ext_v01,
Signature · 1 line
2.37.1
Anup Patel
maintainerRe: [PATCH 2/4] riscv: kvm: move extern sbi_ext declarations to a header
Quoted 14 lines · Conor Dooley
From: Conor Dooley <[email protected]>
Sparse complains about missing statics in the declarations of several
variables:arch/riscv/kvm/vcpu_sbi_replace.c:38:37: warning: symbol 'vcpu_sbi_ext_time' was not declared. Should it be static?arch/riscv/kvm/vcpu_sbi_replace.c:73:37: warning: symbol 'vcpu_sbi_ext_ipi' was not declared. Should it be static?arch/riscv/kvm/vcpu_sbi_replace.c:126:37: warning: symbol 'vcpu_sbi_ext_rfence' was not declared. Should it be static?arch/riscv/kvm/vcpu_sbi_replace.c:170:37: warning: symbol 'vcpu_sbi_ext_srst' was not declared. Should it be static?arch/riscv/kvm/vcpu_sbi_base.c:69:37: warning: symbol 'vcpu_sbi_ext_base' was not declared. Should it be static?arch/riscv/kvm/vcpu_sbi_base.c:90:37: warning: symbol 'vcpu_sbi_ext_experimental' was not declared. Should it be static?arch/riscv/kvm/vcpu_sbi_base.c:96:37: warning: symbol 'vcpu_sbi_ext_vendor' was not declared. Should it be static?arch/riscv/kvm/vcpu_sbi_hsm.c:115:37: warning: symbol 'vcpu_sbi_ext_hsm' was not declared. Should it be static?
Quoted 8 lines
These variables are however used in
vcpu_sbi.cwhere they are declared as extern. Move them tokvm_vcpu_sbi.hwhich is handily already included by the three other files.Fixes a046c2d8578c ("RISC-V: KVM: Reorganize SBI code by moving SBI v0.1 to its own file")Fixes 5f862df5585c ("RISC-V: KVM: Add v0.1 replacement SBI extensions defined in v0.2")Fixes 3e1d86569c21 ("RISC-V: KVM: Add SBI HSM extension in KVM")Signed-off-by Conor Dooley <[email protected]>
I have queued this fix for 6.0-rc1
Thanks,
Anup
Quoted 58 lines
--- arch/riscv/include/asm/kvm_vcpu_sbi.h | 12 ++++++++++++ arch/riscv/kvm/vcpu_sbi.c | 12 +----------- 2 files changed, 13 insertions(+), 11 deletions(-)arch/riscv/include/asm/kvm_vcpu_sbi.h +12
-0@@ -33,4 +33,16 @@ void kvm_riscv_vcpu_sbi_system_reset(struct kvm_vcpu *vcpu, u32 type, u64 flags);const struct kvm_vcpu_sbi_extension *kvm_vcpu_sbi_find_ext (unsigned long extid); +#ifdef CONFIG_RISCV_SBI_V01 +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_v01; +#endif +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_base; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_time; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_ipi; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_rfence; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_srst; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_hsm; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_experimental; +extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_vendor; +#endif /* __RISCV_KVM_VCPU_SBI_H__ */ arch/riscv/kvm/vcpu_sbi.c +1
-12@@ -32,23 +32,13 @@ static int kvm_linux_err_map_sbi(int err) }; } -#ifdef CONFIG_RISCV_SBI_V01 -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_v01; -#else +#ifndef CONFIG_RISCV_SBI_V01 static const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_v01 = { .extid_start =-1UL , .extid_end =-1UL , .handler =NULL , };#endif -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_base; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_time; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_ipi; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_rfence; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_srst; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_hsm; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_experimental; -extern const struct kvm_vcpu_sbi_extension vcpu_sbi_ext_vendor;static const struct kvm_vcpu_sbi_extension *sbi_ext[] = { &vcpu_sbi_ext_v01, --2.37.1
PATCH 3/4 riscv: signal: fix missing prototype warning
In reply to Conor DooleyFrom: Conor Dooley <[email protected]>
Fix the warning:arch/riscv/kernel/signal.c:316:27: warning: no previous prototype for function 'do_notify_resume' [-Wmissing-prototypes] asmlinkage __visible void do_notify_resume(struct pt_regs *regs,
All other functions in the file are static & none of the existing headers stood out as an obvious location. Create signal.h to hold the declaration.
--- arch/riscv/include/asm/signal.h | 12 ++++++++++++ arch/riscv/kernel/signal.c | 1 + 2 files changed, 13 insertions(+) create mode 100644 arch/riscv/include/asm/signal.h
arch/riscv/include/asm/signal.h new file +12 -0
@@ -0,0 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef __ASM_SIGNAL_H +#define __ASM_SIGNAL_H + +#include <uapi/asm/signal.h> +#include <uapi/asm/ptrace.h> + +asmlinkage __visible +void do_notify_resume (struct pt_regs *regs,unsigned long thread_info_flags); + +#endif
arch/riscv/kernel/signal.c +1 -0
@@ -15,6 +15,7 @@#include <asm/ucontext.h> #include <asm/vdso.h> +#include <asm/signal.h> #include <asm/signal32.h> #include <asm/switch_to.h> #include <asm/csr.h>
Signature · 1 line
2.37.1
PATCH 4/4 riscv: traps: add missing prototype
In reply to Conor DooleyFrom: Conor Dooley <[email protected]>
Sparse complains:arch/riscv/kernel/traps.c:213:6: warning: symbol 'shadow_stack' was not declared. Should it be static?
The variable is used in entry.S, so declare shadow_stack there alongside SHADOW_OVERFLOW_STACK_SIZE.
--- arch/riscv/include/asm/thread_info.h | 2 ++ arch/riscv/kernel/traps.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-)
arch/riscv/include/asm/thread_info.h +2 -0
@@ -42,6 +42,8 @@#ifndef __ASSEMBLY__ +extern long shadow_stack[SHADOW_OVERFLOW_STACK_SIZE /sizeof (long )]; +#include <asm/processor.h> #include <asm/csr.h>
arch/riscv/kernel/traps.c +2 -1
@@ -20,9 +20,10 @@#include <asm/asm-prototypes.h> #include <asm/bug.h> +#include <asm/csr.h> #include <asm/processor.h> #include <asm/ptrace.h> -#include <asm/csr.h> +#include <asm/thread_info.h> int show_unhandled_signals =1 ;
Signature · 1 line
2.37.1
Quoted 32 lines · mail at conchuod.ie
From: Conor Dooley <[email protected]>
Hey all,
Couple fixes here for most of what's left of the {sparse,} warnings inarch/riscvthat are still in need of patches. Ben has sent patches for the VDSO issue already (although they seem to need rework).VDSO aside, With this patchset applied, we are left with:
-cpuinfo_opsmissing prototype: this likely needs to go into an asm-generic header & I'll send a separate patch for that.
- Complaints about an error inmm/init.c:
"errorinarch/riscv/mm/init.c:819:2: error: "setup_vm()is <trunc> I think this can be ignored.
- 600+ -Woverride-init warnings for syscall table setup where overriding seems to be the whole point of the macro.
- Warnings about imported kvm core code.
- Flexible array member warnings that look like common KVM code patterns
- An unexpected unlock inkvm_riscv_check_vcpu_requeststhat was added intentionally:
https://lore.kernel.org/all/20220710151105.687193-1-apatel at ventanamicro.com/ Is it worth looking into whether that's a false positive or not?Thanks,
Conor.Conor Dooley (4):
riscv: kvm:vcpu_timer: fix unused variable warnings
riscv: kvm: move externsbi_extdeclarations to a header
riscv: signal: fix missing prototype warning
riscv: traps: add missing prototype
Quoted 9 lines
arch/riscv/include/asm/kvm_vcpu_sbi.h | 12 ++++++++++++ arch/riscv/include/asm/signal.h | 12 ++++++++++++ arch/riscv/include/asm/thread_info.h | 2 ++ arch/riscv/kernel/signal.c | 1 + arch/riscv/kernel/traps.c | 3 ++- arch/riscv/kvm/vcpu_sbi.c | 12 +----------- arch/riscv/kvm/vcpu_timer.c | 4 ---- 7 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 arch/riscv/include/asm/signal.h
These generally look good to me. Anup handles the KVM bits so I'll let him chime in there, but
on all of them.
Happy to do some sort of shared tag thing, but it looks like these are all independent enough that it'd be easier to just split them up. I've put the non-KVM bits over at palmer/riscv-variable_fixes_without_kvm, if you guys are all OK splitting this up then I'll go take those onto riscv/fixes. I'll wait a bit for folks to get a chance to look, so it won't be for tomorrow morning.
Thanks!
Quoted 51 lines · Palmer Dabbelt
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
Quoted 39 lines · mail at conchuod.ie
From: Conor Dooley <[email protected]>
Hey all,
Couple fixes here for most of what's left of the {sparse,} warnings inarch/riscvthat are still in need of patches. Ben has sent patches for the VDSO issue already (although they seem to need rework).VDSO aside, With this patchset applied, we are left with:
-cpuinfo_opsmissing prototype: this likely needs to go into an
? asm-generic header & I'll send a separate patch for that.
- Complaints about an error inmm/init.c:
? "errorinarch/riscv/mm/init.c:819:2: error: "setup_vm()is <trunc> ? I think this can be ignored.
- 600+ -Woverride-init warnings for syscall table setup where
? overriding seems to be the whole point of the macro.
- Warnings about imported kvm core code.
- Flexible array member warnings that look like common KVM code
? patterns
- An unexpected unlock inkvm_riscv_check_vcpu_requeststhat was added ? intentionally:
? https://lore.kernel.org/all/20220710151105.687193-1-apatel at ventanamicro.com/ ? Is it worth looking into whether that's a false positive or not?Thanks,
Conor.Conor Dooley (4):
? riscv: kvm:vcpu_timer: fix unused variable warnings ? riscv: kvm: move externsbi_extdeclarations to a header ? riscv: signal: fix missing prototype warning
? riscv: traps: add missing prototype?arch/riscv/include/asm/kvm_vcpu_sbi.h | 12 ++++++++++++ ?arch/riscv/include/asm/signal.h?????? | 12 ++++++++++++ ?arch/riscv/include/asm/thread_info.h? |? 2 ++ ?arch/riscv/kernel/signal.c??????????? |? 1 + ?arch/riscv/kernel/traps.c???????????? |? 3 ++- ?arch/riscv/kvm/vcpu_sbi.c???????????? | 12 +----------- ?arch/riscv/kvm/vcpu_timer.c?????????? |? 4 ----Quoted 2 lines
?7 files changed, 30 insertions(+), 16 deletions(-) ?create mode 100644
arch/riscv/include/asm/signal.hThese generally look good to me.? Anup handles the KVM bits so I'll let him chime in there, but
Reviewed-by Palmer Dabbelt <[email protected]>Acked-by Palmer Dabbelt <[email protected]>
Quoted 7 lines
on all of them.
Happy to do some sort of shared tag thing, but it looks like these are all independent enough that it'd be easier to just split them up.? I've put the non-KVM bits over at palmer/riscv-variable_fixes_without_kvm, if you guys are all OK splitting this up then I'll go take those onto riscv/fixes.
Yeah, I see no reason that the kvm patches can't just go via the riscv kvm tree. I sent the patches as a single series mostly because I wanted to mention what was left warning wise in the cover.
Quoted 2 lines
I'll wait a bit for folks to get a chance to look, so it won't be for tomorrow morning.
They've been there a while and nothing has gone up in flames, I am sure we will survive a few weeks more :)
Thanks,
Conor.
Quoted 50 lines · Palmer Dabbelt
Quoted 32 lines · mail at conchuod.ie
From: Conor Dooley <[email protected]>
Hey all,
Couple fixes here for most of what's left of the {sparse,} warnings inarch/riscvthat are still in need of patches. Ben has sent patches for the VDSO issue already (although they seem to need rework).VDSO aside, With this patchset applied, we are left with:
-cpuinfo_opsmissing prototype: this likely needs to go into an asm-generic header & I'll send a separate patch for that.
- Complaints about an error inmm/init.c:
"errorinarch/riscv/mm/init.c:819:2: error: "setup_vm()is <trunc> I think this can be ignored.
- 600+ -Woverride-init warnings for syscall table setup where overriding seems to be the whole point of the macro.
- Warnings about imported kvm core code.
- Flexible array member warnings that look like common KVM code patterns
- An unexpected unlock inkvm_riscv_check_vcpu_requeststhat was added intentionally:
https://lore.kernel.org/all/20220710151105.687193-1-apatel at ventanamicro.com/ Is it worth looking into whether that's a false positive or not?Thanks,
Conor.Conor Dooley (4):
riscv: kvm:vcpu_timer: fix unused variable warnings
riscv: kvm: move externsbi_extdeclarations to a header
riscv: signal: fix missing prototype warning
riscv: traps: add missing prototypeQuoted 9 lines
arch/riscv/include/asm/kvm_vcpu_sbi.h | 12 ++++++++++++ arch/riscv/include/asm/signal.h | 12 ++++++++++++ arch/riscv/include/asm/thread_info.h | 2 ++ arch/riscv/kernel/signal.c | 1 + arch/riscv/kernel/traps.c | 3 ++- arch/riscv/kvm/vcpu_sbi.c | 12 +----------- arch/riscv/kvm/vcpu_timer.c | 4 ---- 7 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 arch/riscv/include/asm/signal.hThese generally look good to me. Anup handles the KVM bits so I'll let him chime in there, but
Reviewed-by Palmer Dabbelt <[email protected]>Acked-by Palmer Dabbelt <[email protected]>
Quoted 8 lines
on all of them.
Happy to do some sort of shared tag thing, but it looks like these are all independent enough that it'd be easier to just split them up. I've put the non-KVM bits over at palmer/riscv-variable_fixes_without_kvm, if you guys are all OK splitting this up then I'll go take those onto riscv/fixes. I'll wait a bit for folks to get a chance to look, so it won't be for tomorrow morning.
Thanks Palmer. I have queued the KVM fixes (first two patches).
Regards,
Anup
Quoted 7 lines
Thanks!
--
kvm-riscv mailing list
kvm-riscv at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kvm-riscv
Palmer Dabbelt
maintainerQuoted 53 lines · apatel at ventanamicro.com
Quoted 52 lines · Palmer Dabbelt
Quoted 32 lines · mail at conchuod.ie
From: Conor Dooley <[email protected]>
Hey all,
Couple fixes here for most of what's left of the {sparse,} warnings inarch/riscvthat are still in need of patches. Ben has sent patches for the VDSO issue already (although they seem to need rework).VDSO aside, With this patchset applied, we are left with:
-cpuinfo_opsmissing prototype: this likely needs to go into an asm-generic header & I'll send a separate patch for that.
- Complaints about an error inmm/init.c:
"errorinarch/riscv/mm/init.c:819:2: error: "setup_vm()is <trunc> I think this can be ignored.
- 600+ -Woverride-init warnings for syscall table setup where overriding seems to be the whole point of the macro.
- Warnings about imported kvm core code.
- Flexible array member warnings that look like common KVM code patterns
- An unexpected unlock inkvm_riscv_check_vcpu_requeststhat was added intentionally:
https://lore.kernel.org/all/20220710151105.687193-1-apatel at ventanamicro.com/ Is it worth looking into whether that's a false positive or not?Thanks,
Conor.Conor Dooley (4):
riscv: kvm:vcpu_timer: fix unused variable warnings
riscv: kvm: move externsbi_extdeclarations to a header
riscv: signal: fix missing prototype warning
riscv: traps: add missing prototypeQuoted 9 lines
arch/riscv/include/asm/kvm_vcpu_sbi.h | 12 ++++++++++++ arch/riscv/include/asm/signal.h | 12 ++++++++++++ arch/riscv/include/asm/thread_info.h | 2 ++ arch/riscv/kernel/signal.c | 1 + arch/riscv/kernel/traps.c | 3 ++- arch/riscv/kvm/vcpu_sbi.c | 12 +----------- arch/riscv/kvm/vcpu_timer.c | 4 ---- 7 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 arch/riscv/include/asm/signal.hThese generally look good to me. Anup handles the KVM bits so I'll let him chime in there, but
Reviewed-by Palmer Dabbelt <[email protected]>Acked-by Palmer Dabbelt <[email protected]>on all of them.
Quoted 8 lines
Quoted 6 lines
Happy to do some sort of shared tag thing, but it looks like these are all independent enough that it'd be easier to just split them up. I've put the non-KVM bits over at palmer/riscv-variable_fixes_without_kvm, if you guys are all OK splitting this up then I'll go take those onto riscv/fixes. I'll wait a bit for folks to get a chance to look, so it won't be for tomorrow morning.
Thanks Palmer. I have queued the KVM fixes (first two patches).
Sounds good. The others are in riscv/fixes.
Quoted 11 lines
Regards,
AnupQuoted 7 lines
Thanks!
--
kvm-riscv mailing list
kvm-riscv at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kvm-riscv