All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Poimboeuf <jpoimboe@kernel.org>
To: x86@kernel.org
Cc: linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Miroslav Benes <mbenes@suse.cz>,
	linux-btrfs@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>,
	linux-scsi@vger.kernel.org, linux-hyperv@vger.kernel.org,
	Arnd Bergmann <arnd@arndb.de>,
	"Guilherme G . Piccoli" <gpiccoli@igalia.com>,
	Michael Kelley <mikelley@microsoft.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Nathan Chancellor <nathan@kernel.org>
Subject: [PATCH v2 03/11] x86/head: Mark *_start_kernel() __noreturn
Date: Wed, 12 Apr 2023 16:49:33 -0700	[thread overview]
Message-ID: <c2525f96b88be98ee027ee0291d58003036d4120.1681342859.git.jpoimboe@kernel.org> (raw)
In-Reply-To: <cover.1681342859.git.jpoimboe@kernel.org>

Now that start_kernel() is __noreturn, mark its chain of callers
__noreturn.

Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
---
 arch/x86/include/asm/setup.h | 6 +++---
 arch/x86/kernel/head32.c     | 2 +-
 arch/x86/kernel/head64.c     | 4 ++--
 tools/objtool/check.c        | 2 ++
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h
index f37cbff7354c..f3495623ac99 100644
--- a/arch/x86/include/asm/setup.h
+++ b/arch/x86/include/asm/setup.h
@@ -125,11 +125,11 @@ void clear_bss(void);
 
 #ifdef __i386__
 
-asmlinkage void __init i386_start_kernel(void);
+asmlinkage void __init __noreturn i386_start_kernel(void);
 
 #else
-asmlinkage void __init x86_64_start_kernel(char *real_mode);
-asmlinkage void __init x86_64_start_reservations(char *real_mode_data);
+asmlinkage void __init __noreturn x86_64_start_kernel(char *real_mode);
+asmlinkage void __init __noreturn x86_64_start_reservations(char *real_mode_data);
 
 #endif /* __i386__ */
 #endif /* _SETUP */
diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c
index ec6fefbfd3c0..10c27b4261eb 100644
--- a/arch/x86/kernel/head32.c
+++ b/arch/x86/kernel/head32.c
@@ -29,7 +29,7 @@ static void __init i386_default_early_setup(void)
 	x86_init.mpparse.setup_ioapic_ids = setup_ioapic_ids_from_mpc;
 }
 
-asmlinkage __visible void __init i386_start_kernel(void)
+asmlinkage __visible void __init __noreturn i386_start_kernel(void)
 {
 	/* Make sure IDT is set up before any exception happens */
 	idt_setup_early_handler();
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index 387e4b12e823..49f7629b17f7 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -471,7 +471,7 @@ static void __init copy_bootdata(char *real_mode_data)
 	sme_unmap_bootdata(real_mode_data);
 }
 
-asmlinkage __visible void __init x86_64_start_kernel(char * real_mode_data)
+asmlinkage __visible void __init __noreturn x86_64_start_kernel(char * real_mode_data)
 {
 	/*
 	 * Build-time sanity checks on the kernel image and module
@@ -537,7 +537,7 @@ asmlinkage __visible void __init x86_64_start_kernel(char * real_mode_data)
 	x86_64_start_reservations(real_mode_data);
 }
 
-void __init x86_64_start_reservations(char *real_mode_data)
+void __init __noreturn x86_64_start_reservations(char *real_mode_data)
 {
 	/* version is always not zero if it is copied */
 	if (!boot_params.hdr.version)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index a6f9a4aeb77b..4e89342dd8fb 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -225,6 +225,8 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
 		"start_kernel",
 		"stop_this_cpu",
 		"usercopy_abort",
+		"x86_64_start_kernel",
+		"x86_64_start_reservations",
 		"xen_cpu_bringup_again",
 		"xen_start_kernel",
 	};
-- 
2.39.2


  parent reply	other threads:[~2023-04-12 23:50 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-12 23:49 [PATCH v2 00/11] Sprinkle more __noreturn Josh Poimboeuf
2023-04-12 23:49 ` [PATCH v2 01/11] init: Mark [arch_call_]rest_init() __noreturn Josh Poimboeuf
2023-04-17 10:46   ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2023-04-12 23:49 ` [PATCH v2 02/11] init: Mark start_kernel() __noreturn Josh Poimboeuf
2023-04-17 10:46   ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2023-04-12 23:49 ` Josh Poimboeuf [this message]
2023-04-17 10:46   ` [tip: objtool/core] x86/head: Mark *_start_kernel() __noreturn tip-bot2 for Josh Poimboeuf
2023-04-12 23:49 ` [PATCH v2 04/11] arm64/cpu: Mark cpu_park_loop() and friends __noreturn Josh Poimboeuf
2023-04-17 10:46   ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2023-04-12 23:49 ` [PATCH v2 05/11] cpu: Mark panic_smp_self_stop() __noreturn Josh Poimboeuf
2023-04-17 10:46   ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2023-04-12 23:49 ` [PATCH v2 06/11] cpu: Mark nmi_panic_self_stop() __noreturn Josh Poimboeuf
2023-04-17 10:46   ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2023-04-12 23:49 ` [PATCH v2 07/11] objtool: Include weak functions in global_noreturns check Josh Poimboeuf
2023-04-14 14:32   ` Miroslav Benes
2023-04-17 10:46   ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2023-04-12 23:49 ` [PATCH v2 08/11] btrfs: Mark btrfs_assertfail() __noreturn Josh Poimboeuf
2023-04-13 14:57   ` David Sterba
2023-04-15  7:19   ` Anand Jain
2023-04-17 10:46   ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2023-04-12 23:49 ` [PATCH v2 09/11] x86/cpu: Mark {hlt,resume}_play_dead() __noreturn Josh Poimboeuf
2023-04-17 10:46   ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2023-04-12 23:49 ` [PATCH v2 10/11] scsi: message: fusion: Mark mpt_halt_firmware() __noreturn Josh Poimboeuf
2023-04-17 10:46   ` [tip: objtool/core] " tip-bot2 for Josh Poimboeuf
2023-04-12 23:49 ` [PATCH v2 11/11] x86/hyperv: Mark hv_ghcb_terminate() as noreturn Josh Poimboeuf
2023-04-17 10:46   ` [tip: objtool/core] " tip-bot2 for Guilherme G. Piccoli

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=c2525f96b88be98ee027ee0291d58003036d4120.1681342859.git.jpoimboe@kernel.org \
    --to=jpoimboe@kernel.org \
    --cc=arnd@arndb.de \
    --cc=gpiccoli@igalia.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mbenes@suse.cz \
    --cc=mikelley@microsoft.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=peterz@infradead.org \
    --cc=x86@kernel.org \
    /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: link
Be 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.