diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-10-05 01:18:40 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-10-05 01:18:40 +0000 |
commit | 012bb3e61e5eced6c610f9e036372bf0c8def2d1 (patch) | |
tree | 87efc733f9b164e8c85c0336f92c8fb7eff6d183 /include/asm-mips/spinlock.h | |
parent | 625a1589d3d6464b5d90b8a0918789e3afffd220 (diff) |
Merge with Linux 2.4.0-test9. Please check DECstation, I had a number
of rejects to fixup while integrating Linus patches. I also found
that this kernel will only boot SMP on Origin; the UP kernel freeze
soon after bootup with SCSI timeout messages. I commit this anyway
since I found that the last CVS versions had the same problem.
Diffstat (limited to 'include/asm-mips/spinlock.h')
-rw-r--r-- | include/asm-mips/spinlock.h | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/include/asm-mips/spinlock.h b/include/asm-mips/spinlock.h index 724d10520..4ac282bbc 100644 --- a/include/asm-mips/spinlock.h +++ b/include/asm-mips/spinlock.h @@ -1,5 +1,4 @@ -/* $Id: spinlock.h,v 1.8 2000/01/23 21:15:52 ralf Exp $ - * +/* * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive * for more details. @@ -29,9 +28,6 @@ typedef struct { * We make no fairness assumptions. They have a cost. */ -typedef struct { unsigned long a[100]; } __dummy_lock_t; -#define __dummy_lock(lock) (*(__dummy_lock_t *)(lock)) - static inline void spin_lock(spinlock_t *lock) { unsigned int tmp; @@ -45,8 +41,8 @@ static inline void spin_lock(spinlock_t *lock) "beqz\t%1, 1b\n\t" " sync\n\t" ".set\treorder" - : "=o" (__dummy_lock(lock)), "=&r" (tmp) - : "o" (__dummy_lock(lock)) + : "=o" (lock->lock), "=&r" (tmp) + : "o" (lock->lock) : "memory"); } @@ -57,8 +53,8 @@ static inline void spin_unlock(spinlock_t *lock) "sync\n\t" "sw\t$0, %0\n\t" ".set\treorder" - : "=o" (__dummy_lock(lock)) - : "o" (__dummy_lock(lock)) + : "=o" (lock->lock) + : "o" (lock->lock) : "memory"); } @@ -92,8 +88,8 @@ static inline void read_lock(rwlock_t *rw) "beqz\t%1, 1b\n\t" " sync\n\t" ".set\treorder" - : "=o" (__dummy_lock(rw)), "=&r" (tmp) - : "o" (__dummy_lock(rw)) + : "=o" (rw->lock), "=&r" (tmp) + : "o" (rw->lock) : "memory"); } @@ -111,8 +107,8 @@ static inline void read_unlock(rwlock_t *rw) "sc\t%1, %0\n\t" "beqz\t%1, 1b\n\t" ".set\treorder" - : "=o" (__dummy_lock(rw)), "=&r" (tmp) - : "o" (__dummy_lock(rw)) + : "=o" (rw->lock), "=&r" (tmp) + : "o" (rw->lock) : "memory"); } @@ -129,8 +125,8 @@ static inline void write_lock(rwlock_t *rw) "beqz\t%1, 1b\n\t" " sync\n\t" ".set\treorder" - : "=o" (__dummy_lock(rw)), "=&r" (tmp) - : "o" (__dummy_lock(rw)) + : "=o" (rw->lock), "=&r" (tmp) + : "o" (rw->lock) : "memory"); } @@ -141,8 +137,8 @@ static inline void write_unlock(rwlock_t *rw) "sync\n\t" "sw\t$0, %0\n\t" ".set\treorder" - : "=o" (__dummy_lock(rw)) - : "o" (__dummy_lock(rw)) + : "=o" (rw->lock) + : "o" (rw->lock) : "memory"); } |