aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/spinlock_types.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2008-08-28 15:17:49 +0100
committerRalf Baechle <ralf@linux-mips.org>2008-10-11 16:18:54 +0100
commit2a31b03335e570dce5fdd082e0d71d48b2cb4290 (patch)
tree17c691e8f53874eb309fa8ed9ed14f65167247d2 /arch/mips/include/asm/spinlock_types.h
parentb65a75b8c91c0f05047399401407371678fe9549 (diff)
MIPS: Rewrite spinlocks to ticket locks.
Based on patch by Chad Reese of Cavium Networks. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/spinlock_types.h')
-rw-r--r--arch/mips/include/asm/spinlock_types.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/mips/include/asm/spinlock_types.h b/arch/mips/include/asm/spinlock_types.h
index ce26c5048b1..adeedaa116c 100644
--- a/arch/mips/include/asm/spinlock_types.h
+++ b/arch/mips/include/asm/spinlock_types.h
@@ -6,7 +6,12 @@
#endif
typedef struct {
- volatile unsigned int lock;
+ /*
+ * bits 0..13: serving_now
+ * bits 14 : junk data
+ * bits 15..28: ticket
+ */
+ unsigned int lock;
} raw_spinlock_t;
#define __RAW_SPIN_LOCK_UNLOCKED { 0 }