Re: [PATCH] powerpc/boot: Mark exit() and ps3_exit() as __noreturn

From: Thorsten Blum

Date: Fri Aug 07 2026 - 15:55:29 EST


On Fri, Aug 07, 2026 at 05:32:44PM +0200, Christophe Leroy (CS GROUP) wrote:
> Le 07/08/2026 à 17:23, Thorsten Blum a écrit :
> > Since neither exit() nor ps3_exit() return, annotate both functions with
> > the __noreturn attribute to improve compiler optimizations.
>
> Is it worth spending time optimising a boot sequence that will run only once
> at startup ?
>
> Do you have any figure on the improvement ?

No, and I haven't checked its impact. Maybe compilers can already infer
that both functions never return and optimize them accordingly. Besides
potential compiler optimizations, it also serves as documentation.

I can reword the commit message to clarify that, or drop the patch.

Thanks,
Thorsten