diff options
author | Olof Johansson <olof@lixom.net> | 2014-05-05 23:18:49 +0200 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2014-05-05 23:18:49 +0200 |
commit | 186a73dc9a81b087d0708f21a990615957ec9c1c (patch) | |
tree | a1db8d517665fb27f25d44eacacd4b80a0d540ed /arch/hexagon/include/asm/atomic.h | |
parent | Merge tag 'versatile-leds' of git://git.kernel.org/pub/scm/linux/kernel/git/l... (diff) | |
parent | ARM: qcom: clean-up unneeded kconfig selects (diff) | |
download | linux-186a73dc9a81b087d0708f21a990615957ec9c1c.tar.xz linux-186a73dc9a81b087d0708f21a990615957ec9c1c.zip |
Merge tag 'kconfig-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux into next/cleanup
Merge Kconfig cleanups from Rob Herring:
Several mach kconfig clean-ups of redundant selects
* tag 'kconfig-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
ARM: qcom: clean-up unneeded kconfig selects
ARM: bcm: clean-up unneeded kconfig selects
ARM: mvebu: clean-up unneeded kconfig selects
+ Linux 3.15-rc2
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/hexagon/include/asm/atomic.h')
-rw-r--r-- | arch/hexagon/include/asm/atomic.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/hexagon/include/asm/atomic.h b/arch/hexagon/include/asm/atomic.h index 7aae4cb2a29a..17dc63780c06 100644 --- a/arch/hexagon/include/asm/atomic.h +++ b/arch/hexagon/include/asm/atomic.h @@ -26,7 +26,20 @@ #include <asm/cmpxchg.h> #define ATOMIC_INIT(i) { (i) } -#define atomic_set(v, i) ((v)->counter = (i)) + +/* Normal writes in our arch don't clear lock reservations */ + +static inline void atomic_set(atomic_t *v, int new) +{ + asm volatile( + "1: r6 = memw_locked(%0);\n" + " memw_locked(%0,p0) = %1;\n" + " if (!P0) jump 1b;\n" + : + : "r" (&v->counter), "r" (new) + : "memory", "p0", "r6" + ); +} /** * atomic_read - reads a word, atomically |