.L_ap_cet_done:
#endif /* CONFIG_XEN_SHSTK || CONFIG_XEN_IBT */
- call start_secondary
- BUG /* start_secondary() shouldn't return. */
+ tailcall start_secondary
.L_bsp:
/* Pass off the Multiboot info structure to C land (if applicable). */
mov multiboot_ptr(%rip),%edi
- call __start_xen
- BUG /* __start_xen() shouldn't return. */
+ tailcall __start_xen
.section .data.page_aligned, "aw", @progbits
.align PAGE_SIZE, 0
.byte 0x0f, 0x01, 0xdd
.endm
+/*
+ * Call a noreturn function. This could be JMP, but CALL results in a more
+ * helpful backtrace. BUG is to catch functions which do decide to return...
+ */
+.macro tailcall fn:req
+ call \fn
+ BUG /* Shouldn't return */
+.endm
+
.macro INDIRECT_BRANCH insn:req arg:req
/*
* Create an indirect branch. insn is one of call/jmp, arg is a single
DISPATCH(X86_EXC_CP, do_entry_CP)
#undef DISPATCH
- call do_unhandled_trap
- BUG /* do_unhandled_trap() shouldn't return. */
+ tailcall do_unhandled_trap
.L_exn_dispatch_done:
mov %r15, STACK_CPUINFO_FIELD(xen_cr3)(%r14)
FATAL_exception_with_ints_disabled:
xorl %esi,%esi
movq %rsp,%rdi
- call fatal_trap
- BUG /* fatal_trap() shouldn't return. */
+ tailcall fatal_trap
ENTRY(divide_error)
ENDBR64
.Ldblf_cr3_okay:
movq %rsp,%rdi
- call do_double_fault
- BUG /* do_double_fault() shouldn't return. */
+ tailcall do_double_fault
ENTRY(nmi)
ENDBR64
DISPATCH(X86_EXC_MC, do_machine_check)
#undef DISPATCH
- call do_unhandled_trap
- BUG /* do_unhandled_trap() shouldn't return. */
+ tailcall do_unhandled_trap
.L_ist_dispatch_done:
mov %r15, STACK_CPUINFO_FIELD(xen_cr3)(%r14)