aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/include/asm/processor.h
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@uclinux.org>2010-11-04 13:53:26 +1000
committerGreg Ungerer <gerg@uclinux.org>2011-01-05 15:19:18 +1000
commit1c83af5f9d7e15a091f11394ad5916a7dcf1a99e (patch)
treeaa41743fb552319bb53959a7df228233d4f04ba2 /arch/m68k/include/asm/processor.h
parent0762346034a3e94f9c3a5fe8d7c4bcaffbc1cd53 (diff)
downloadkernel_samsung_smdk4412-1c83af5f9d7e15a091f11394ad5916a7dcf1a99e.zip
kernel_samsung_smdk4412-1c83af5f9d7e15a091f11394ad5916a7dcf1a99e.tar.gz
kernel_samsung_smdk4412-1c83af5f9d7e15a091f11394ad5916a7dcf1a99e.tar.bz2
m68knommu: use user stack pointer hardware on some ColdFire cores
The more modern ColdFire parts (even if based on older version cores) have separate user and supervisor stack pointers (a7 register). Modify the ColdFire CPU setup and exception code to enable and use this on parts that have it. Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/m68k/include/asm/processor.h')
-rw-r--r--arch/m68k/include/asm/processor.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/m68k/include/asm/processor.h b/arch/m68k/include/asm/processor.h
index 7a6a759..278c69b 100644
--- a/arch/m68k/include/asm/processor.h
+++ b/arch/m68k/include/asm/processor.h
@@ -20,23 +20,26 @@
static inline unsigned long rdusp(void)
{
-#ifdef CONFIG_COLDFIRE
+#ifdef CONFIG_COLDFIRE_SW_A7
extern unsigned int sw_usp;
return sw_usp;
#else
- unsigned long usp;
- __asm__ __volatile__("move %/usp,%0" : "=a" (usp));
+ register unsigned long usp __asm__("a0");
+ /* move %usp,%a0 */
+ __asm__ __volatile__(".word 0x4e68" : "=a" (usp));
return usp;
#endif
}
static inline void wrusp(unsigned long usp)
{
-#ifdef CONFIG_COLDFIRE
+#ifdef CONFIG_COLDFIRE_SW_A7
extern unsigned int sw_usp;
sw_usp = usp;
#else
- __asm__ __volatile__("move %0,%/usp" : : "a" (usp));
+ register unsigned long a0 __asm__("a0") = usp;
+ /* move %a0,%usp */
+ __asm__ __volatile__(".word 0x4e60" : : "a" (a0) );
#endif
}