summaryrefslogtreecommitdiffstats
path: root/arch/mn10300/include/asm/frame.inc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mn10300/include/asm/frame.inc')
-rw-r--r--arch/mn10300/include/asm/frame.inc56
1 files changed, 13 insertions, 43 deletions
diff --git a/arch/mn10300/include/asm/frame.inc b/arch/mn10300/include/asm/frame.inc
index 406060e5e1c0..2ee58e3eb6b3 100644
--- a/arch/mn10300/include/asm/frame.inc
+++ b/arch/mn10300/include/asm/frame.inc
@@ -18,9 +18,7 @@
#ifndef __ASM_OFFSETS_H__
#include <asm/asm-offsets.h>
#endif
-#ifdef CONFIG_SMP
-#include <proc/smp-regs.h>
-#endif
+#include <asm/thread_info.h>
#define pi break
@@ -40,27 +38,15 @@
movm [d2,d3,a2,a3,exreg0,exreg1,exother],(sp)
mov sp,fp # FRAME pointer in A3
add -12,sp # allow for calls to be made
-#ifdef CONFIG_SMP
-#ifdef CONFIG_PREEMPT /* FIXME */
- mov epsw,d2
- and ~EPSW_IE,epsw
-#endif
- mov (CPUID),a0
- add a0,a0
- add a0,a0
- mov (___frame,a0),a1
- mov a1,(REG_NEXT,fp)
- mov fp,(___frame,a0)
-#ifdef CONFIG_PREEMPT /* FIXME */
- mov d2,epsw
-#endif
-#else /* CONFIG_SMP */
- mov (__frame),a1
- mov a1,(REG_NEXT,fp)
- mov fp,(__frame)
-#endif /* CONFIG_SMP */
- and ~EPSW_FE,epsw # disable the FPU inside the kernel
+ # push the exception frame onto the front of the list
+ GET_THREAD_INFO a1
+ mov (TI_frame,a1),a0
+ mov a0,(REG_NEXT,fp)
+ mov fp,(TI_frame,a1)
+
+ # disable the FPU inside the kernel
+ and ~EPSW_FE,epsw
# we may be holding current in E2
#ifdef CONFIG_MN10300_CURRENT_IN_E2
@@ -76,27 +62,11 @@
.macro RESTORE_ALL
# peel back the stack to the calling frame
# - this permits execve() to discard extra frames due to kernel syscalls
-#ifdef CONFIG_SMP
-#ifdef CONFIG_PREEMPT /* FIXME */
- mov epsw,d2
- and ~EPSW_IE,epsw
-#endif
- mov (CPUID),a0
- add a0,a0
- add a0,a0
- mov (___frame,a0),fp
- mov fp,sp
- mov (REG_NEXT,fp),d0 # userspace has regs->next == 0
- mov d0,(___frame,a0)
-#ifdef CONFIG_PREEMPT /* FIXME */
- mov d2,epsw
-#endif
-#else /* CONFIG_SMP */
- mov (__frame),fp
+ GET_THREAD_INFO a0
+ mov (TI_frame,a0),fp
mov fp,sp
- mov (REG_NEXT,fp),d0 # userspace has regs->next == 0
- mov d0,(__frame)
-#endif /* CONFIG_SMP */
+ mov (REG_NEXT,fp),d0
+ mov d0,(TI_frame,a0) # userspace has regs->next == 0
#ifndef CONFIG_MN10300_USING_JTAG
mov (REG_EPSW,fp),d0