Re: x86/idle: Remove barriers for X86_BUG_CLFLUSH_MONITOR

From: Dave Hansen
Date: Wed Apr 02 2025 - 10:05:28 EST


On 4/2/25 02:10, Andrew Cooper wrote:
> i.e. The SDM was incorrect at the time, and barriers should not have been
> inserted. Double checking the original AAI65 errata (not available from
> intel.com any more) shows no mention of barriers either.

There's a near copy-and-paste of that code here:

> static __cpuidle void mwait_idle(void)
> {
> if (!current_set_polling_and_test()) {
> if (this_cpu_has(X86_BUG_CLFLUSH_MONITOR)) {
> mb(); /* quirk */
> clflush((void *)&current_thread_info()->flags);
> mb(); /* quirk */
> }

Any reason it can't get the same treatment?