public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] s390/kdump: Mark __do_machine_kexec as __noreturn
@ 2025-11-14 11:03 Thorsten Blum
  2025-11-14 11:03 ` [PATCH v2 2/3] s390/kdump: Mark __machine_kexec " Thorsten Blum
  2025-11-14 11:03 ` [PATCH v2 3/3] s390/kdump: Mark __do_machine_kdump " Thorsten Blum
  0 siblings, 2 replies; 3+ messages in thread
From: Thorsten Blum @ 2025-11-14 11:03 UTC (permalink / raw)
  To: Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle
  Cc: Thorsten Blum, linux-s390, linux-kernel

__do_machine_kexec() ends by calling the non-returning function
disabled_wait() and therefore also never returns. Annotate it with the
__noreturn attribute to improve compiler optimizations.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
Changes in v2:
- Drop the first two patches from the series because store_status() does
  return to the caller (Heiko)
- Link to v1: https://lore.kernel.org/lkml/20251110132803.1520-1-thorsten.blum@linux.dev/
---
 arch/s390/kernel/machine_kexec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c
index baeb3dcfc1c8..9be6f58a6553 100644
--- a/arch/s390/kernel/machine_kexec.c
+++ b/arch/s390/kernel/machine_kexec.c
@@ -224,7 +224,7 @@ void machine_crash_shutdown(struct pt_regs *regs)
 /*
  * Do normal kexec
  */
-static void __do_machine_kexec(void *data)
+static void __noreturn __do_machine_kexec(void *data)
 {
 	unsigned long data_mover, entry, diag308_subcode;
 	struct kimage *image = data;
-- 
2.51.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2 2/3] s390/kdump: Mark __machine_kexec as __noreturn
  2025-11-14 11:03 [PATCH v2 1/3] s390/kdump: Mark __do_machine_kexec as __noreturn Thorsten Blum
@ 2025-11-14 11:03 ` Thorsten Blum
  2025-11-14 11:03 ` [PATCH v2 3/3] s390/kdump: Mark __do_machine_kdump " Thorsten Blum
  1 sibling, 0 replies; 3+ messages in thread
From: Thorsten Blum @ 2025-11-14 11:03 UTC (permalink / raw)
  To: Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle
  Cc: Thorsten Blum, linux-s390, linux-kernel

__machine_kexec() ends by calling the non-returning function
__do_machine_kexec() and therefore also never returns. Annotate it with
the __noreturn attribute to improve compiler optimizations.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 arch/s390/kernel/machine_kexec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c
index 9be6f58a6553..1d1c709bc088 100644
--- a/arch/s390/kernel/machine_kexec.c
+++ b/arch/s390/kernel/machine_kexec.c
@@ -248,7 +248,7 @@ static void __noreturn __do_machine_kexec(void *data)
 /*
  * Reset system and call either kdump or normal kexec
  */
-static void __machine_kexec(void *data)
+static void __noreturn __machine_kexec(void *data)
 {
 	pfault_fini();
 	tracing_off();
-- 
2.51.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2 3/3] s390/kdump: Mark __do_machine_kdump as __noreturn
  2025-11-14 11:03 [PATCH v2 1/3] s390/kdump: Mark __do_machine_kexec as __noreturn Thorsten Blum
  2025-11-14 11:03 ` [PATCH v2 2/3] s390/kdump: Mark __machine_kexec " Thorsten Blum
@ 2025-11-14 11:03 ` Thorsten Blum
  1 sibling, 0 replies; 3+ messages in thread
From: Thorsten Blum @ 2025-11-14 11:03 UTC (permalink / raw)
  To: Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
	Christian Borntraeger, Sven Schnelle
  Cc: Thorsten Blum, linux-s390, linux-kernel

__do_machine_kdump() ends by calling the non-returning function
disabled_wait() and therefore also never returns. Annotate it with the
__noreturn attribute to improve compiler optimizations.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 arch/s390/kernel/machine_kexec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c
index 1d1c709bc088..c1103044c647 100644
--- a/arch/s390/kernel/machine_kexec.c
+++ b/arch/s390/kernel/machine_kexec.c
@@ -45,7 +45,7 @@ extern const unsigned long long relocate_kernel_len;
  * Reset the system, copy boot CPU registers to absolute zero,
  * and jump to the kdump image
  */
-static void __do_machine_kdump(void *data)
+static void __noreturn __do_machine_kdump(void *data)
 {
 	struct kimage *image = data;
 	purgatory_t purgatory;
-- 
2.51.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-11-14 11:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-14 11:03 [PATCH v2 1/3] s390/kdump: Mark __do_machine_kexec as __noreturn Thorsten Blum
2025-11-14 11:03 ` [PATCH v2 2/3] s390/kdump: Mark __machine_kexec " Thorsten Blum
2025-11-14 11:03 ` [PATCH v2 3/3] s390/kdump: Mark __do_machine_kdump " Thorsten Blum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox