[PATCH] arm64: cpufeature: Replace inline with __always_inline for GCS checks
Mark Brown
broonie at kernel.org
Fri Aug 15 08:38:11 PDT 2025
On Fri, Aug 15, 2025 at 09:19:05AM +0800, 15074444048 at 163.com wrote:
> When use __always_inline The compiler will almost certainly inline
> system_supports_gcs, which allows the compiler to optimize and check
> earlier during the compilation phase. If system_supports_gcs() returns
> false, then the line of code restore_gcs_context (&user) will not
> actually be generated, so the compiler will not report an error.
> -static inline bool system_supports_gcs(void)
> +static __always_inline bool system_supports_gcs(void)
> {
> return alternative_has_cap_unlikely(ARM64_HAS_GCS);
> }
If we're doing this for one of the system_supports_foo() functions we
should do it for all of them consistently, not just for one random one.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20250815/26382aa1/attachment.sig>
More information about the linux-arm-kernel
mailing list