Re: [PATCH v3 2/3] x86/smp native_play_dead: Prefer cpuidle_play_dead() over mwait_play_dead()
From: Dave Hansen
Date: Wed Nov 13 2024 - 11:14:27 EST
On 11/13/24 03:41, Gautham R. Shenoy wrote:
> + /*
> + * This is ugly. But AMD processors don't prefer MWAIT based
> + * C-states when processors are offlined.
> + */
> + if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD ||
> + boot_cpu_data.x86_vendor == X86_VENDOR_HYGON)
> + return -ENODEV;
Can we get an X86_FEATURE for this, please? Either a positive one:
X86_FEATURE_MWAIT_OK_FOR_OFFLINE
or a negative one:
X86_FEATURE_MWAIT_BUSTED_FOR_OFFLINE
... with better names.
Or even a helper. Because if you add this AMD||HYGON check, it'll be at
_least_ the second one of these for the same logical reason.