aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mn10300/include/asm/spinlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mn10300/include/asm/spinlock.h')
-rw-r--r--arch/mn10300/include/asm/spinlock.h16
1 files changed, 1 insertions, 15 deletions
diff --git a/arch/mn10300/include/asm/spinlock.h b/arch/mn10300/include/asm/spinlock.h
index fe413b41df6c..879cd0df53ba 100644
--- a/arch/mn10300/include/asm/spinlock.h
+++ b/arch/mn10300/include/asm/spinlock.h
@@ -84,6 +84,7 @@ static inline void arch_spin_lock_flags(arch_spinlock_t *lock,
84 : "d" (flags), "a"(&lock->slock), "i"(EPSW_IE | MN10300_CLI_LEVEL) 84 : "d" (flags), "a"(&lock->slock), "i"(EPSW_IE | MN10300_CLI_LEVEL)
85 : "memory", "cc"); 85 : "memory", "cc");
86} 86}
87#define arch_spin_lock_flags arch_spin_lock_flags
87 88
88#ifdef __KERNEL__ 89#ifdef __KERNEL__
89 90
@@ -98,18 +99,6 @@ static inline void arch_spin_lock_flags(arch_spinlock_t *lock,
98 * read-locks. 99 * read-locks.
99 */ 100 */
100 101
101/**
102 * read_can_lock - would read_trylock() succeed?
103 * @lock: the rwlock in question.
104 */
105#define arch_read_can_lock(x) ((int)(x)->lock > 0)
106
107/**
108 * write_can_lock - would write_trylock() succeed?
109 * @lock: the rwlock in question.
110 */
111#define arch_write_can_lock(x) ((x)->lock == RW_LOCK_BIAS)
112
113/* 102/*
114 * On mn10300, we implement read-write locks as a 32-bit counter 103 * On mn10300, we implement read-write locks as a 32-bit counter
115 * with the high bit (sign) being the "contended" bit. 104 * with the high bit (sign) being the "contended" bit.
@@ -183,9 +172,6 @@ static inline int arch_write_trylock(arch_rwlock_t *lock)
183 return 0; 172 return 0;
184} 173}
185 174
186#define arch_read_lock_flags(lock, flags) arch_read_lock(lock)
187#define arch_write_lock_flags(lock, flags) arch_write_lock(lock)
188
189#define _raw_spin_relax(lock) cpu_relax() 175#define _raw_spin_relax(lock) cpu_relax()
190#define _raw_read_relax(lock) cpu_relax() 176#define _raw_read_relax(lock) cpu_relax()
191#define _raw_write_relax(lock) cpu_relax() 177#define _raw_write_relax(lock) cpu_relax()