#ifndef __ASM_CRIS_ARCH_ATOMIC__
#define __ASM_CRIS_ARCH_ATOMIC__
-#include <asm/system.h>
+#include <linux/spinlock_types.h>
extern void cris_spin_unlock(void *l, int val);
extern void cris_spin_lock(void *l);
#define cris_atomic_save(addr, flags) \
local_irq_save(flags); \
- cris_spin_lock((void*)&cris_atomic_locks[HASH_ADDR(addr)].lock);
+ cris_spin_lock((void *)&cris_atomic_locks[HASH_ADDR(addr)].raw_lock.slock);
#define cris_atomic_restore(addr, flags) \
{ \
spinlock_t *lock = (void*)&cris_atomic_locks[HASH_ADDR(addr)]; \
__asm__ volatile ("move.d %1,%0" \
- : "=m" (lock->lock) \
- : "r" (1) \
- : "memory"); \
+ : "=m" (lock->raw_lock.slock) \
+ : "r" (1) \
+ : "memory"); \
local_irq_restore(flags); \
}