aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2013-12-19 15:30:03 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2013-12-19 15:30:03 -0500
commit7d590cca7cd2cce4ed7c47d221d6f90566653ba8 (patch)
tree0100935f6b39020b26a2ea0b2dae66527a42e41c
parent7e98b71920464b8d15fa95c74366416cd3c88861 (diff)
x86, idle: Add memory barriers around clflush in mwait_play_dead()
For consistency with mwait_idle_with_hints(). Not sure they help, but they really won't hurt... Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Len Brown <len.brown@intel.com> Link: http://lkml.kernel.org/r/CA%2B55aFzGxcML7j8CEvQPYzh0W81uVoAAVmGctMOUZ7CZ1yYd2A@mail.gmail.com
-rw-r--r--arch/x86/kernel/smpboot.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 85dc05a3aa02..f5252c4eec8c 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1417,7 +1417,9 @@ static inline void mwait_play_dead(void)
1417 * The WBINVD is insufficient due to the spurious-wakeup 1417 * The WBINVD is insufficient due to the spurious-wakeup
1418 * case where we return around the loop. 1418 * case where we return around the loop.
1419 */ 1419 */
1420 mb();
1420 clflush(mwait_ptr); 1421 clflush(mwait_ptr);
1422 mb();
1421 __monitor(mwait_ptr, 0, 0); 1423 __monitor(mwait_ptr, 0, 0);
1422 mb(); 1424 mb();
1423 __mwait(eax, 0); 1425 __mwait(eax, 0);