aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/spinlock_types.h
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-08-22 10:34:31 +0900
committerPaul Mundt <lethal@linux-sh.org>2007-09-21 11:57:51 +0900
commit8a467a529f01c3471b195a0e8989c6177fe145ef (patch)
tree0f3c5bf78acf98c28ebb36110c94d6b8dc2e836b /include/asm-sh/spinlock_types.h
parentsh: Kill off volatile silliness in sq_flush_range(). (diff)
downloadlinux-dev-8a467a529f01c3471b195a0e8989c6177fe145ef.tar.xz
linux-dev-8a467a529f01c3471b195a0e8989c6177fe145ef.zip
sh: Overhaul spinlocks and rwlocks for SH-4A SMP.
This rips out some of the old spinlock and rwlock behaviour that the SH-2 parts were using and reworks them for LL/SC semantics on the SH-4A. This is primarily only useful for SH-X3 multi-cores, but can also be used for building CONFIG_SMP=y testing kernels on SH-4A UP. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/spinlock_types.h')
-rw-r--r--include/asm-sh/spinlock_types.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/include/asm-sh/spinlock_types.h b/include/asm-sh/spinlock_types.h
index 5c58134f2c4e..b4d244e7b60c 100644
--- a/include/asm-sh/spinlock_types.h
+++ b/include/asm-sh/spinlock_types.h
@@ -6,19 +6,16 @@
#endif
typedef struct {
- volatile unsigned long lock;
+ volatile unsigned int lock;
} raw_spinlock_t;
-#define __RAW_SPIN_LOCK_UNLOCKED { 1 }
-
-#include <asm/atomic.h>
+#define __RAW_SPIN_LOCK_UNLOCKED { 1 }
typedef struct {
- raw_spinlock_t lock;
- atomic_t counter;
+ volatile unsigned int lock;
} raw_rwlock_t;
#define RW_LOCK_BIAS 0x01000000
-#define __RAW_RW_LOCK_UNLOCKED { { 0 }, { RW_LOCK_BIAS } }
+#define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS }
#endif