aboutsummaryrefslogtreecommitdiff
path: root/arch/parisc/include/asm/spinlock_types.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-20 14:38:14 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-20 14:40:31 -0700
commite3d2f927f788adcdabc42f8a1616f6cc56c53bbe (patch)
treeff051e33cff49e23f4c4ef84360f22cf7a1998c9 /arch/parisc/include/asm/spinlock_types.h
parenta9b6148d25f15ddfe9d7a7f3e526fdb64e7cf7da (diff)
parent81e192d6ce303b6792aa38ff35f41a1a7357f23a (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6: parisc: convert to generic compat_sys_ptrace parisc: add rtc platform driver parisc: initialize unwinder much earlier parisc: add new syscalls parisc: hijack jump to start_kernel parisc: add pdc_coproc_cfg_unlocked and set_firmware_width_unlocked parisc: move include/asm-parisc to arch/parisc/include/asm parisc: move pdc_result to real2.S parisc: unify CCIO_COLLECT_STATS implementation parisc: add arch/parisc/kernel/.gitignore parisc: ropes.h - fix <asm-parisc/*> -> <asm/*> parisc: parisc-agp - fix <asm-parisc/*> -> <asm/*> Resolve remove/rename conflict: include/asm-parisc/a.out.h is no longer relevant.
Diffstat (limited to 'arch/parisc/include/asm/spinlock_types.h')
-rw-r--r--arch/parisc/include/asm/spinlock_types.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/parisc/include/asm/spinlock_types.h b/arch/parisc/include/asm/spinlock_types.h
new file mode 100644
index 00000000000..3f72f47cf4b
--- /dev/null
+++ b/arch/parisc/include/asm/spinlock_types.h
@@ -0,0 +1,21 @@
+#ifndef __ASM_SPINLOCK_TYPES_H
+#define __ASM_SPINLOCK_TYPES_H
+
+typedef struct {
+#ifdef CONFIG_PA20
+ volatile unsigned int slock;
+# define __RAW_SPIN_LOCK_UNLOCKED { 1 }
+#else
+ volatile unsigned int lock[4];
+# define __RAW_SPIN_LOCK_UNLOCKED { { 1, 1, 1, 1 } }
+#endif
+} raw_spinlock_t;
+
+typedef struct {
+ raw_spinlock_t lock;
+ volatile int counter;
+} raw_rwlock_t;
+
+#define __RAW_RW_LOCK_UNLOCKED { __RAW_SPIN_LOCK_UNLOCKED, 0 }
+
+#endif