aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-cris/arch-v32/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-cris/arch-v32/atomic.h')
-rw-r--r--include/asm-cris/arch-v32/atomic.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/asm-cris/arch-v32/atomic.h b/include/asm-cris/arch-v32/atomic.h
index bbfb7a5ae315..852ceff8013f 100644
--- a/include/asm-cris/arch-v32/atomic.h
+++ b/include/asm-cris/arch-v32/atomic.h
@@ -1,7 +1,7 @@
1#ifndef __ASM_CRIS_ARCH_ATOMIC__ 1#ifndef __ASM_CRIS_ARCH_ATOMIC__
2#define __ASM_CRIS_ARCH_ATOMIC__ 2#define __ASM_CRIS_ARCH_ATOMIC__
3 3
4#include <asm/system.h> 4#include <linux/spinlock_types.h>
5 5
6extern void cris_spin_unlock(void *l, int val); 6extern void cris_spin_unlock(void *l, int val);
7extern void cris_spin_lock(void *l); 7extern void cris_spin_lock(void *l);
@@ -18,15 +18,15 @@ extern spinlock_t cris_atomic_locks[];
18 18
19#define cris_atomic_save(addr, flags) \ 19#define cris_atomic_save(addr, flags) \
20 local_irq_save(flags); \ 20 local_irq_save(flags); \
21 cris_spin_lock((void*)&cris_atomic_locks[HASH_ADDR(addr)].lock); 21 cris_spin_lock((void *)&cris_atomic_locks[HASH_ADDR(addr)].raw_lock.slock);
22 22
23#define cris_atomic_restore(addr, flags) \ 23#define cris_atomic_restore(addr, flags) \
24 { \ 24 { \
25 spinlock_t *lock = (void*)&cris_atomic_locks[HASH_ADDR(addr)]; \ 25 spinlock_t *lock = (void*)&cris_atomic_locks[HASH_ADDR(addr)]; \
26 __asm__ volatile ("move.d %1,%0" \ 26 __asm__ volatile ("move.d %1,%0" \
27 : "=m" (lock->lock) \ 27 : "=m" (lock->raw_lock.slock) \
28 : "r" (1) \ 28 : "r" (1) \
29 : "memory"); \ 29 : "memory"); \
30 local_irq_restore(flags); \ 30 local_irq_restore(flags); \
31 } 31 }
32 32