* [PATCH v2] powerpc/boot: Add missing __noreturn annotations
@ 2026-11-05 11:44 Thorsten Blum
0 siblings, 0 replies; only message in thread
From: Thorsten Blum @ 2026-11-05 11:44 UTC (permalink / raw)
To: Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy (CS GROUP), Ritesh Harjani (IBM),
Shrikanth Hegde, Geoff Levand
Cc: Thorsten Blum, linuxppc-dev, linux-kernel
Mark start(), exit(), ps3_exit(), and the PS3 platform_init() as
__noreturn to document that they never return and to potentially improve
compiler optimizations.
Signed-off-by: Thorsten Blum <blum@kernel.org>
---
Changes in v2:
- Update patch subject and description
- Mark start() and platform_init() as __noreturn
- v1: https://lore.kernel.org/r/20260807152353.306889-2-thorsten.blum@linux.dev/
arch/powerpc/boot/ops.h | 4 ++--
arch/powerpc/boot/ps3.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h
index a40c2162a4e9..42b2721dbe61 100644
--- a/arch/powerpc/boot/ops.h
+++ b/arch/powerpc/boot/ops.h
@@ -80,7 +80,7 @@ struct loader_info {
};
extern struct loader_info loader_info;
-void start(void);
+void __noreturn start(void);
void fdt_init(void *blob);
int serial_console_init(void);
int ns16550_console_init(void *devp, struct serial_console_data *scdp);
@@ -217,7 +217,7 @@ static inline void free(void *ptr)
platform_ops.free(ptr);
}
-static inline void exit(void)
+static inline void __noreturn exit(void)
{
if (platform_ops.exit)
platform_ops.exit();
diff --git a/arch/powerpc/boot/ps3.c b/arch/powerpc/boot/ps3.c
index 89ff46b8b225..f94d3818815a 100644
--- a/arch/powerpc/boot/ps3.c
+++ b/arch/powerpc/boot/ps3.c
@@ -45,7 +45,7 @@ static void ps3_console_write(const char *buf, int len)
{
}
-static void ps3_exit(void)
+static void __noreturn ps3_exit(void)
{
printf("ps3_exit\n");
@@ -100,7 +100,7 @@ void ps3_copy_vectors(void)
flush_cache((void *)0x100, 512);
}
-void platform_init(void)
+void __noreturn platform_init(void)
{
const u32 heapsize = 0x1000000 - (u32)_end; /* 16MiB */
void *chosen;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-05 11:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-05 11:44 [PATCH v2] powerpc/boot: Add missing __noreturn annotations Thorsten Blum
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®