aboutsummaryrefslogtreecommitdiff
path: root/kernel/freezer.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-04-25 12:33:15 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2011-05-17 23:19:17 +0200
commitee940d8dccd899aa1777ea84da3d9cd04b1d2e8e (patch)
tree0bb19033f820a485dea0c5fc848206b6479fc7df /kernel/freezer.c
parent3c431936087e93d2219a184a8e19eaa68077e379 (diff)
downloadvexpress-lsk-ee940d8dccd899aa1777ea84da3d9cd04b1d2e8e.tar.gz
Freezer: Use SMP barriers
The freezer processes are dealing with multiple threads running simultaneously, and on a UP system, the memory reads/writes do not need barriers to keep things in sync. These are only needed on SMP systems, so use SMP barriers instead. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'kernel/freezer.c')
-rw-r--r--kernel/freezer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/freezer.c b/kernel/freezer.c
index 66ecd2ead21..7b01de98bb6 100644
--- a/kernel/freezer.c
+++ b/kernel/freezer.c
@@ -17,7 +17,7 @@ static inline void frozen_process(void)
{
if (!unlikely(current->flags & PF_NOFREEZE)) {
current->flags |= PF_FROZEN;
- wmb();
+ smp_wmb();
}
clear_freeze_flag(current);
}
@@ -93,7 +93,7 @@ bool freeze_task(struct task_struct *p, bool sig_only)
* the task as frozen and next clears its TIF_FREEZE.
*/
if (!freezing(p)) {
- rmb();
+ smp_rmb();
if (frozen(p))
return false;