dovetail: Build warning about missing __noreturn annotation
Hi Philippe,
any idea why I get the following build warning on recent dovetail branches? I haven't checked that yet, but I think all branches >= 6.0 might be "affected".
The warning:
vmlinux.o: warning: objtool: arch_do_IRQ_pipelined+0x53f: __sysvec_reboot() is missing a __noreturn annotation
__sysvec_reboot calls stop_this_cpu() which is annotated with __noreturn. It's unclear to me why arch_do_IRQ_pipelined() is in the game here.
Best regards,
Florian
Quoted 6 lines · Florian Bezdeka
Hi Philippe,
any idea why I get the following build warning on recent dovetail branches? I haven't checked that yet, but I think all branches >= 6.0 might be "affected".
Quoted 8 lines
The warning:
vmlinux.o: warning: objtool:
arch_do_IRQ_pipelined+0x53f:__sysvec_reboot()is missing a__noreturnannotation
__sysvec_rebootcallsstop_this_cpu()which is annotated with__noreturn. It's unclear to me whyarch_do_IRQ_pipelined()is in the game here.
Because the call to __sysvec_reboot() is expanded inline in arch_do_IRQ_pipelined() via run_sysvec_on_irqstack_cond -> call_on_irqstack_cond. This inner call is missing the annotation.
The following patch would do the trick, although in a fairly ugly way:
arch/x86/include/asm/idtentry.h +8 -0
@@ -209,6 +209,14 @@ __visible noinstr void func(struct pt_regs *regs) \ \ __visible void __##func(struct pt_regs *regs) +#define DEFINE_IDTENTRY_SYSVEC_PIPELINED_NORETURN (vector, func) \ +__visible noinstr void func(struct pt_regs *regs) \ +{ \ + arch_pipeline_entry(regs, vector); \ +} \ + \ +__visible __noreturn void __##func(struct pt_regs *regs) +#define DEFINE_IDTENTRY_SYSVEC_SIMPLE_PIPELINED (vector, func) \ DEFINE_IDTENTRY_SYSVEC_PIPELINED(vector, func)
arch/x86/kernel/smp.c +1 -1
@@ -133,7 +133,7 @@ static int smp_stop_nmi_callback(unsigned int val, struct pt_regs *regs)/* * this function calls the 'stop' function on all other CPUs in the system. */ -DEFINE_IDTENTRY_SYSVEC_PIPELINED(REBOOT_VECTOR, sysvec_reboot) +DEFINE_IDTENTRY_SYSVEC_PIPELINED_NORETURN(REBOOT_VECTOR, sysvec_reboot) {ack_APIC_irq ();cpu_emergency_disable_virtualization ();
Signature · 1 line
Philippe.
Quoted 17 lines · Philippe Gerum
Quoted 6 lines · Florian Bezdeka
Hi Philippe,
any idea why I get the following build warning on recent dovetail branches? I haven't checked that yet, but I think all branches >= 6.0 might be "affected".
Quoted 8 lines
The warning:
vmlinux.o: warning: objtool:
arch_do_IRQ_pipelined+0x53f:__sysvec_reboot()is missing a__noreturnannotation
__sysvec_rebootcallsstop_this_cpu()which is annotated with__noreturn. It's unclear to me whyarch_do_IRQ_pipelined()is in the game here.
Quoted 5 lines
Because the call to
__sysvec_reboot()is expanded inline inarch_do_IRQ_pipelined()viarun_sysvec_on_irqstack_cond->call_on_irqstack_cond. This inner call is missing the annotation.The following patch would do the trick, although in a fairly ugly way:
No better idea here... As it is already part of all relevant 6.x branches no follow up necessary.
Thanks Philippe for taking care!
Quoted 1 line
[snip]
Quoted 22 lines · Florian Bezdeka
Quoted 21 lines · Philippe Gerum
Quoted 6 lines · Florian Bezdeka
Hi Philippe,
any idea why I get the following build warning on recent dovetail branches? I haven't checked that yet, but I think all branches >= 6.0 might be "affected".
Quoted 8 lines
The warning:
vmlinux.o: warning: objtool:
arch_do_IRQ_pipelined+0x53f:__sysvec_reboot()is missing a__noreturnannotation
__sysvec_rebootcallsstop_this_cpu()which is annotated with__noreturn. It's unclear to me whyarch_do_IRQ_pipelined()is in the game here.Because the call to
__sysvec_reboot()is expanded inline inarch_do_IRQ_pipelined()viarun_sysvec_on_irqstack_cond->call_on_irqstack_cond. This inner call is missing the annotation.
Quoted 7 lines
Quoted 1 line
The following patch would do the trick, although in a fairly ugly way:
No better idea here... As it is already part of all relevant 6.x branches no follow up necessary.
Thanks Philippe for taking care!
Np. I don't think there is any better way, so let's go with this.
Signature · 1 line
Philippe.