summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorBang Li <libang.linuxer@gmail.com>2022-03-19 10:03:16 +0800
committerVineet Gupta <vgupta@kernel.org>2022-04-18 14:47:05 -0700
commitc6ed4d84a2c49de7d6f490144cca7b4a4831fb6e (patch)
tree8bd44a9893de75dde44a568294e510ae4aef87ab /arch
parentac411e41ec065daa867b5668b6e71ea1aff7b36a (diff)
ARC: remove redundant READ_ONCE() in cmpxchg loop
This patch reverts commit 7082a29c22ac ("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 d57f727264f1 ("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>
Diffstat (limited to 'arch')
-rw-r--r--arch/arc/kernel/smp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arc/kernel/smp.c b/arch/arc/kernel/smp.c
index 383fefee2ae5..d947473f1e6d 100644
--- a/arch/arc/kernel/smp.c
+++ b/arch/arc/kernel/smp.c
@@ -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);