Re: [PATCH 1/1] x86/cpu: Add INTEL_LUNARLAKE_M to X86_BUG_MONITOR

From: Rafael J. Wysocki
Date: Tue Nov 12 2024 - 08:29:27 EST


On Tue, Nov 12, 2024 at 6:37 AM Len Brown <lenb@xxxxxxxxxx> wrote:
>
> From: Len Brown <len.brown@xxxxxxxxx>
>
> Under some conditions, MONITOR wakeups on Lunar Lake processors
> can be lost, resulting in significant user-visible delays.
>
> Add LunarLake to X86_BUG_MONITOR so that wake_up_idle_cpu()
> always sends an IPI, avoiding this potential delay.
>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219364
>
> Cc: stable@xxxxxxxxxxxxxxx # 6.11
> Signed-off-by: Len Brown <len.brown@xxxxxxxxx>

So again

Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>

and see one super-minor nit below.

> ---
> arch/x86/kernel/cpu/intel.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
> index e7656cbef68d..284cd561499c 100644
> --- a/arch/x86/kernel/cpu/intel.c
> +++ b/arch/x86/kernel/cpu/intel.c
> @@ -586,7 +586,9 @@ static void init_intel(struct cpuinfo_x86 *c)
> c->x86_vfm == INTEL_WESTMERE_EX))
> set_cpu_bug(c, X86_BUG_CLFLUSH_MONITOR);
>
> - if (boot_cpu_has(X86_FEATURE_MWAIT) && c->x86_vfm == INTEL_ATOM_GOLDMONT)
> + if (boot_cpu_has(X86_FEATURE_MWAIT) &&
> + (c->x86_vfm == INTEL_ATOM_GOLDMONT
> + || c->x86_vfm == INTEL_LUNARLAKE_M))

I would put the || at the end of the previous line, that is

> + (c->x86_vfm == INTEL_ATOM_GOLDMONT ||
> + c->x86_vfm == INTEL_LUNARLAKE_M))

> set_cpu_bug(c, X86_BUG_MONITOR);
>
> #ifdef CONFIG_X86_64
> --
> 2.43.0
>