[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNAS+p-4X-ns6XnsjA+UMhUOv7sZzd3oTVfZwPe1t_sSeFA@mail.gmail.com>
Date: Sun, 25 Feb 2024 18:06:49 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Petr Pavlu <petr.pavlu@...e.com>
Cc: nathan@...nel.org, nicolas@...sle.eu, mark.rutland@....com,
linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] kbuild: Use -fmin-function-alignment when available
On Thu, Feb 22, 2024 at 10:35 PM Petr Pavlu <petr.pavlu@...e.com> wrote:
>
> GCC recently added option -fmin-function-alignment, which should appear
> in GCC 14. Unlike -falign-functions, this option causes all functions to
> be aligned at the specified value, including the cold ones.
>
> In particular, when an arm64 kernel is built with
> DYNAMIC_FTRACE_WITH_CALL_OPS=y, the 8-byte function alignment is
> required for correct functionality. This was done by -falign-functions=8
> and having workarounds in the kernel to force the compiler to follow
> this alignment. The new -fmin-function-alignment option directly
> guarantees it.
>
> Detect availability of -fmin-function-alignment and use it instead of
> -falign-functions when present. Introduce CC_HAS_SANE_FUNCTION_ALIGNMENT
> and enable __cold to work as expected when it is set.
>
> Signed-off-by: Petr Pavlu <petr.pavlu@...e.com>
> Reviewed-by: Nathan Chancellor <nathan@...nel.org>
> Acked-by: Mark Rutland <mark.rutland@....com>
> ---
Applied to linux-kbuild.
Thanks.
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists