Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7d590cca authored by H. Peter Anvin's avatar H. Peter Anvin
Browse files

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: default avatarH. 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
parent 7e98b719
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1417,7 +1417,9 @@ static inline void mwait_play_dead(void)
		 * The WBINVD is insufficient due to the spurious-wakeup
		 * case where we return around the loop.
		 */
		mb();
		clflush(mwait_ptr);
		mb();
		__monitor(mwait_ptr, 0, 0);
		mb();
		__mwait(eax, 0);