* [RFC PATCH] cpuidle: Use a lighter barrier in snooze_loop()
@ 2014-11-16 2:00 Pranith Kumar
0 siblings, 0 replies; only message in thread
From: Pranith Kumar @ 2014-11-16 2:00 UTC (permalink / raw)
To: Rafael J. Wysocki, Daniel Lezcano, open list:CPUIDLE DRIVERS,
open list
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 <bobby.prani@gmail.com>
---
drivers/cpuidle/cpuidle-powernv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c
index 7d3a349..b0bfcbe 100644
--- a/drivers/cpuidle/cpuidle-powernv.c
+++ b/drivers/cpuidle/cpuidle-powernv.c
@@ -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;
}
--
1.9.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-11-16 2:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-16 2:00 [RFC PATCH] cpuidle: Use a lighter barrier in snooze_loop() Pranith Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox