[PATCH 09/27] efi/loongarch: Mark loongarch efi_boot_kernel() non-standard for objtool
From: Josh Poimboeuf
Date: Fri Aug 28 2026 - 00:53:56 EST
efi_boot_kernel() ends with a tail call through a __noreturn function
pointer, so the compiler emits nothing after it. Objtool can't tell that
in indirect call doesn't return, so it sees execution fall off the end
of the function:
vmlinux.o: warning: objtool: __efistub_efi_boot_kernel() falls through to next function __efistub_efi_get_memory_map()
This is boot code for which objtool/ORC coverage doesn't matter, so tell
objtool to ignore it.
Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
---
drivers/firmware/efi/libstub/loongarch.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/firmware/efi/libstub/loongarch.c b/drivers/firmware/efi/libstub/loongarch.c
index 2b0c87dc99088..737de9afd6a40 100644
--- a/drivers/firmware/efi/libstub/loongarch.c
+++ b/drivers/firmware/efi/libstub/loongarch.c
@@ -5,6 +5,7 @@
* Copyright (C) 2020-2022 Loongson Technology Corporation Limited
*/
+#include <linux/objtool.h>
#include <asm/efi.h>
#include <asm/addrspace.h>
#include "efistub.h"
@@ -103,3 +104,10 @@ efi_status_t efi_boot_kernel(void *handle, efi_loaded_image_t *image,
real_kernel_entry(true, (unsigned long)cmdline_ptr,
(unsigned long)efi_system_table);
}
+
+/*
+ * Objtool has no way of knowing the real_kernel_entry() indirect call is
+ * noreturn. Just tell it to ignore this function: it's boot code anyway, so
+ * ORC coverage isn't needed.
+ */
+STACK_FRAME_NON_STANDARD(efi_boot_kernel);
--
2.55.0