aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-cris
diff options
context:
space:
mode:
authorJesper Nilsson <jesper.nilsson@axis.com>2008-01-28 10:53:19 -0500
committerJesper Nilsson <jesper.nilsson@axis.com>2008-02-08 05:06:38 -0500
commit209e9c43ade3938feab8abcc7978c0e17c79cdc3 (patch)
tree1a68fb77d3dbd5a652f73e8acc320a01bd4ebfbe /include/asm-cris
parente52c2c72ddfa7460f0a959e26f84d74180ca0a1b (diff)
CRIS v32: Adjust arch-v32/atomic.h for new spinlock/rwlock infrastructure
Diffstat (limited to 'include/asm-cris')
-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