Skip to content

Commit

Permalink
ARC: remove redundant READ_ONCE() in cmpxchg loop
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
libang-linuxer authored and vineetgarc committed Apr 18, 2022
1 parent ac411e4 commit c6ed4d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ static void ipi_send_msg_one(int cpu, enum ipi_msg_type msg)
* and read back old value
*/
do {
new = old = READ_ONCE(*ipi_data_ptr);
new = old = *ipi_data_ptr;
new |= 1U << msg;
} while (cmpxchg(ipi_data_ptr, old, new) != old);

Expand Down

0 comments on commit c6ed4d8

Please sign in to comment.