From 7082a29c22ac0ab276b346f2a5c1d24a2102f158 Mon Sep 17 00:00:00 2001 From: Vineet Gupta Date: Mon, 15 Dec 2014 18:42:24 +0530 Subject: ARC: use ACCESS_ONCE in cmpxchg loop Signed-off-by: Vineet Gupta --- arch/arc/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c index 20ebb602ea2f..6a400b1b0b62 100644 --- a/arch/arc/kernel/smp.c +++ b/arch/arc/kernel/smp.c @@ -221,7 +221,7 @@ static void ipi_send_msg_one(int cpu, enum ipi_msg_type msg) * and read back old value */ do { - new = old = *ipi_data_ptr; + new = old = ACCESS_ONCE(*ipi_data_ptr); new |= 1U << msg; } while (cmpxchg(ipi_data_ptr, old, new) != old); -- cgit v1.2.3