x86, idle: add barriers to CLFLUSH workaround

... since the documentation is explicit that CLFLUSH is only ordered
with respect to MFENCE.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
H. Peter Anvin authored and Jan Beulich committed 2014-09-09 18:09:08 +02:00
1 parent a4e0cea6fc
commit 48d32458bc
1 file changed
+4
+4
View File
@@ -336,7 +336,11 @@ void mwait_idle_with_hints(unsigned int eax, unsigned int ecx)
s_time_t expires = per_cpu(timer_deadline, cpu);
if ( boot_cpu_has(X86_FEATURE_CLFLUSH_MONITOR) )
{
mb();
clflush((void *)&mwait_wakeup(cpu));
mb();
}
__monitor((void *)&mwait_wakeup(cpu), 0, 0);
smp_mb();
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.