aboutsummaryrefslogtreecommitdiff
path: root/kernel/smp.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/smp.c')
-rw-r--r--kernel/smp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/smp.c b/kernel/smp.c
index 4dba0f7b72a..ad4ca7c571e 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -2,6 +2,7 @@
* Generic helpers for smp ipi calls
*
* (C) Jens Axboe <jens.axboe@oracle.com> 2008
+ * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
*/
#include <linux/rcupdate.h>
#include <linux/rculist.h>
@@ -12,10 +13,10 @@
#include <linux/gfp.h>
#include <linux/smp.h>
#include <linux/cpu.h>
+#include <asm/relaxed.h>
#include "smpboot.h"
-#ifdef CONFIG_USE_GENERIC_SMP_HELPERS
enum {
CSD_FLAG_LOCK = 0x01,
};
@@ -102,8 +103,8 @@ void __init call_function_init(void)
*/
static void csd_lock_wait(struct call_single_data *csd)
{
- while (csd->flags & CSD_FLAG_LOCK)
- cpu_relax();
+ while (cpu_relaxed_read_short(&csd->flags) & CSD_FLAG_LOCK)
+ cpu_read_relax();
}
static void csd_lock(struct call_single_data *csd)
@@ -470,7 +471,6 @@ int smp_call_function(smp_call_func_t func, void *info, int wait)
return 0;
}
EXPORT_SYMBOL(smp_call_function);
-#endif /* USE_GENERIC_SMP_HELPERS */
/* Setup configured maximum number of CPUs to activate */
unsigned int setup_max_cpus = NR_CPUS;
@@ -658,7 +658,7 @@ void on_each_cpu_cond(bool (*cond_func)(int cpu, void *info),
if (cond_func(cpu, info)) {
ret = smp_call_function_single(cpu, func,
info, wait);
- WARN_ON_ONCE(!ret);
+ WARN_ON_ONCE(ret);
}
preempt_enable();
}