projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9347ce5
)
RISC-V: Add READ_ONCE in arch_spin_is_locked()
author
Palmer Dabbelt
<palmer@sifive.com>
Tue, 28 Nov 2017 22:05:04 +0000
(14:05 -0800)
committer
Palmer Dabbelt
<palmer@sifive.com>
Tue, 28 Nov 2017 22:05:04 +0000
(14:05 -0800)
This was just incorrect in the original version.
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
arch/riscv/include/asm/spinlock.h
patch
|
blob
|
history
diff --git
a/arch/riscv/include/asm/spinlock.h
b/arch/riscv/include/asm/spinlock.h
index 04c71d938afdbf40f93d0d5d9d89229fa5f72c56..a6a005c4f2fb46f025cdfe6e5e628f96f42f4956 100644
(file)
--- a/
arch/riscv/include/asm/spinlock.h
+++ b/
arch/riscv/include/asm/spinlock.h
@@
-24,7
+24,7
@@
/* FIXME: Replace this with a ticket lock, like MIPS. */
-#define arch_spin_is_locked(x) (
(x)->lock
!= 0)
+#define arch_spin_is_locked(x) (
READ_ONCE((x)->lock)
!= 0)
static inline void arch_spin_unlock(arch_spinlock_t *lock)
{