summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@libc.org>2016-03-05 04:59:55 +0000
committerRich Felker <dalias@libc.org>2016-03-05 04:59:55 +0000
commitb9beed0b251289fc92c3ce53874fee2af600b559 (patch)
tree2d882b89aab1c78516a2668f93042674ea8ad093
parent088bb2f9852384265cde697582ad36bb9d9dfdc1 (diff)
downloadlinux-sh-draft.tar.gz
SH: only use J-Core cas.l instruction on SMP configurationslinux-sh-draft
This allows non-SMP kernels to be built using toolchains that do not have support for cas.l.
-rw-r--r--arch/sh/include/asm/bitops.h2
-rw-r--r--arch/sh/include/asm/cmpxchg.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/sh/include/asm/bitops.h b/arch/sh/include/asm/bitops.h
index 9f855477e189..a8699d60a8c4 100644
--- a/arch/sh/include/asm/bitops.h
+++ b/arch/sh/include/asm/bitops.h
@@ -18,7 +18,7 @@
#include <asm/bitops-op32.h>
#elif defined(CONFIG_CPU_SH4A)
#include <asm/bitops-llsc.h>
-#elif defined(CONFIG_CPU_J2)
+#elif defined(CONFIG_CPU_J2) && defined(CONFIG_SMP)
#include <asm/bitops-cas.h>
#else
#include <asm-generic/bitops/atomic.h>
diff --git a/arch/sh/include/asm/cmpxchg.h b/arch/sh/include/asm/cmpxchg.h
index a5a5dfc9b799..3dfe0467a773 100644
--- a/arch/sh/include/asm/cmpxchg.h
+++ b/arch/sh/include/asm/cmpxchg.h
@@ -13,7 +13,7 @@
#include <asm/cmpxchg-grb.h>
#elif defined(CONFIG_CPU_SH4A)
#include <asm/cmpxchg-llsc.h>
-#elif defined(CONFIG_CPU_J2)
+#elif defined(CONFIG_CPU_J2) && defined(CONFIG_SMP)
#include <asm/cmpxchg-cas.h>
#else
#include <asm/cmpxchg-irq.h>