ARC: use ACCESS_ONCE in cmpxchg loop
authorVineet Gupta <vgupta@synopsys.com>
Mon, 15 Dec 2014 13:12:24 +0000 (18:42 +0530)
committerVineet Gupta <vgupta@synopsys.com>
Mon, 2 Feb 2015 11:38:37 +0000 (17:08 +0530)
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/kernel/smp.c

index 20ebb60..6a400b1 100644 (file)
@@ -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);