From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05B6C25F988 for ; Fri, 7 Aug 2026 15:32:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786116769; cv=none; b=dl1jAHguhol+D48Ma0A5+GH7IdcU+puF4bqUxv7mFw9Hs+VtLzVxzkKShVg2/d2MoYFfApqSNZilAweRMXAifDJGbttFz4Y3d0Ws+ar/txzjq+ak+v18id0i3GF68/5dja/32VhHoDipSclLz0TscT85qLwEaajRgmwC45IZHR4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786116769; c=relaxed/simple; bh=4y8tGCTuFdsjtenJkbfn+rGI+zIQl1eX6Fd7vh1hD1Y=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=OcV2wXMnUaw975C4tRdFkRJsmY7j2lWqQqHmi5KXHukFPiJILRahLx1othScuNH/5JpUcpxidBr7gf9A9wlt0205jiBK1uXvWvC00LZtHsrIS1nHStZeEn0jy7YekDEPXjNmklknX4QTmvQfSYUiRJhQd47ebchsQoRRQauCOGw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mX0EuKR6; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mX0EuKR6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1893D1F00A3A; Fri, 7 Aug 2026 15:32:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786116767; bh=ZT7C2HKeSDCTz1i5MS0qtmVe36LfLMZoGrCwyPKq500=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=mX0EuKR6SA7+WFixfUFKJdqRAHyW3bXS4b/gjZPgc0sZGzWIJ7tPww5zBh30Qx98U Ut2ZUTL4qw7Gwqh99h3EzXG9XFBIqvCjUl9vB6bpv6EHdxAeb6iOE0Taw/ic+99TOr xLmJilpR1/7MY2lNlBSkLx7xD3MhbXLy6/VpenQuqPRMsDaY08nJ+OYeGCgMeePmtX ZqUEPLHxwjCVvQKwM8+GdVe6/o3x5oRejhPcqK0SOoox7TEjOt12zWLGNwNUGukp6G UI1ZLgjJEdjwfQf+R57uEjkIbN/n6++sasQRX83iFortJMu0ifLrgOz6TxfdcwuO7j W5dU6Sajt+LPA== Message-ID: <41e20610-6bc5-400c-9e44-c214162605e0@kernel.org> Date: Fri, 7 Aug 2026 17:32:44 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] powerpc/boot: Mark exit() and ps3_exit() as __noreturn To: Thorsten Blum , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Geoff Levand Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <20260807152353.306889-2-thorsten.blum@linux.dev> Content-Language: fr-FR From: "Christophe Leroy (CS GROUP)" In-Reply-To: <20260807152353.306889-2-thorsten.blum@linux.dev> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 ? Christophe > > Signed-off-by: Thorsten Blum > --- > arch/powerpc/boot/ops.h | 2 +- > arch/powerpc/boot/ps3.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/boot/ops.h b/arch/powerpc/boot/ops.h > index a40c2162a4e9..df52b14816e2 100644 > --- a/arch/powerpc/boot/ops.h > +++ b/arch/powerpc/boot/ops.h > @@ -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..22fa35960926 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"); >