summaryrefslogtreecommitdiffstats
path: root/include/asm-arm/system.h
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-06-28 19:22:25 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-06-28 19:22:25 +0100
commit053a7b5b7617a72d7c61b6f84196d1c0f79b9849 (patch)
tree53859118b6a815278987a5c679575f1b4b37a1c7 /include/asm-arm/system.h
parent4b0ef3b1127776d4a2787d7530ac0c4da82c2331 (diff)
downloadop-kernel-dev-053a7b5b7617a72d7c61b6f84196d1c0f79b9849.zip
op-kernel-dev-053a7b5b7617a72d7c61b6f84196d1c0f79b9849.tar.gz
[PATCH] ARM SMP: __xchg support
This enables the existing __xchg implementation to be used on SMP. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/system.h')
-rw-r--r--include/asm-arm/system.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index 3d0d286..cdf49f4 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -290,7 +290,6 @@ do { \
})
#ifdef CONFIG_SMP
-#error SMP not supported
#define smp_mb() mb()
#define smp_rmb() rmb()
@@ -304,6 +303,8 @@ do { \
#define smp_wmb() barrier()
#define smp_read_barrier_depends() do { } while(0)
+#endif /* CONFIG_SMP */
+
#if defined(CONFIG_CPU_SA1100) || defined(CONFIG_CPU_SA110)
/*
* On the StrongARM, "swp" is terminally broken since it bypasses the
@@ -316,9 +317,16 @@ do { \
*
* We choose (1) since its the "easiest" to achieve here and is not
* dependent on the processor type.
+ *
+ * NOTE that this solution won't work on an SMP system, so explcitly
+ * forbid it here.
*/
+#ifdef CONFIG_SMP
+#error SMP is not supported on SA1100/SA110
+#else
#define swp_is_buggy
#endif
+#endif
static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size)
{
@@ -361,8 +369,6 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size
return ret;
}
-#endif /* CONFIG_SMP */
-
#endif /* __ASSEMBLY__ */
#define arch_align_stack(x) (x)
OpenPOWER on IntegriCloud