cpuidle: Use a lighter barrier in snooze_loop()
Subsystems (2)
RFC PATCH 1/1 cpuidle: Use a lighter barrier in snooze_loop()
Using smp_mb() here so that the bit clear is not reordered is an overkill.
It is more appropriate to use smp_mb__after_atomic() which ensures that the bit clear is not reordered.
Signed-off-by Pranith Kumar <[email protected]>
--- drivers/cpuidle/cpuidle-powernv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/cpuidle/cpuidle-powernv.c +2 -1
@@ -48,7 +48,8 @@ static int snooze_loop(struct cpuidle_device *dev,HMT_medium ();ppc64_runlatch_on ();clear_thread_flag (TIF_POLLING_NRFLAG ); -smp_mb (); +/* ensure bit clear is not reordered */ +smp_mb__after_atomic ();return index; }
Signature · 1 line
1.9.1