Skip to content

Commit c6ed4d8

Browse files
libang-linuxervineetgarc
authored andcommitted
ARC: remove redundant READ_ONCE() in cmpxchg loop
This patch reverts commit 7082a29 ("ARC: use ACCESS_ONCE in cmpxchg loop"). It is not necessary to use READ_ONCE() because cmpxchg contains barrier. We can get it from commit d57f727 ("ARC: add compiler barrier to LLSC based cmpxchg"). Signed-off-by: Bang Li <libang.linuxer@gmail.com> Signed-off-by: Vineet Gupta <vgupta@kernel.org>
1 parent ac411e4 commit c6ed4d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arc/kernel/smp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ static void ipi_send_msg_one(int cpu, enum ipi_msg_type msg)
274274
* and read back old value
275275
*/
276276
do {
277-
new = old = READ_ONCE(*ipi_data_ptr);
277+
new = old = *ipi_data_ptr;
278278
new |= 1U << msg;
279279
} while (cmpxchg(ipi_data_ptr, old, new) != old);
280280

0 commit comments

Comments
 (0)