[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250210162751.GC1264@sol.localdomain>
Date: Mon, 10 Feb 2025 08:27:51 -0800
From: Eric Biggers <ebiggers@...nel.org>
To: x86@...nel.org
Cc: linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H . Peter Anvin" <hpa@...or.com>,
Sean Christopherson <seanjc@...gle.com>
Subject: Re: [PATCH v2] x86/fpu: make WARN_ON_FPU get fully optimized out
On Mon, Jan 27, 2025 at 02:45:23PM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@...gle.com>
>
> Currently WARN_ON_FPU evaluates its argument even if
> CONFIG_X86_DEBUG_FPU is disabled, which adds unnecessary instructions to
> several functions, for example kernel_fpu_begin(). Fix this by using
> BUILD_BUG_ON_INVALID(x) in the no-debug case rather than (void)(x).
>
> Fixes: 83242c515881 ("x86/fpu: Make WARN_ON_FPU() more robust in the !CONFIG_X86_DEBUG_FPU case")
> Suggested-by: Sean Christopherson <seanjc@...gle.com>
> Signed-off-by: Eric Biggers <ebiggers@...gle.com>
> ---
>
> v2: use BUILD_BUG_ON_INVALID() as suggested by Sean Christopherson.
>
> arch/x86/kernel/fpu/internal.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Ping. Any interest in taking this through the x86 tree?
- Eric
Powered by blists - more mailing lists