summaryrefslogtreecommitdiffstats
path: root/arch/m68k/kernel
diff options
context:
space:
mode:
authorGreg Ungerer2011-10-14 07:41:56 +0200
committerGreg Ungerer2011-12-30 01:20:24 +0100
commitbbc6f1ba509cf9cda42ce63bbd40afe577ab028e (patch)
tree281010e3d781b995e429efaacd7c99d0947c2bdf /arch/m68k/kernel
parentm68k: add ColdFire 54xx CPU MMU memory init code (diff)
downloadkernel-qcow2-linux-bbc6f1ba509cf9cda42ce63bbd40afe577ab028e.tar.gz
kernel-qcow2-linux-bbc6f1ba509cf9cda42ce63bbd40afe577ab028e.tar.xz
kernel-qcow2-linux-bbc6f1ba509cf9cda42ce63bbd40afe577ab028e.zip
m68k: set register a2 to current if MMU enabled on ColdFire
Virtual memory m68k systems build with register a2 dedicated to being the current proc pointer (non-MMU don't do this). Add code to the ColdFire interrupt and exception processing to set this on entry, and at context switch time. We use the same GET_CURRENT() macro that MMU enabled code uses - modifying it so that the assembler is ColdFire clean. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Acked-by: Matt Waddel <mwaddel@yahoo.com> Acked-by: Kurt Mahan <kmahan@xmission.com> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/kernel')
-rw-r--r--arch/m68k/kernel/entry_no.S3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/m68k/kernel/entry_no.S b/arch/m68k/kernel/entry_no.S
index ac86a9ffc1d7..d80cba45589f 100644
--- a/arch/m68k/kernel/entry_no.S
+++ b/arch/m68k/kernel/entry_no.S
@@ -44,6 +44,7 @@
ENTRY(buserr)
SAVE_ALL_INT
+ GET_CURRENT(%d0)
movel %sp,%sp@- /* stack frame pointer argument */
jsr buserr_c
addql #4,%sp
@@ -51,6 +52,7 @@ ENTRY(buserr)
ENTRY(trap)
SAVE_ALL_INT
+ GET_CURRENT(%d0)
movel %sp,%sp@- /* stack frame pointer argument */
jsr trap_c
addql #4,%sp
@@ -61,6 +63,7 @@ ENTRY(trap)
.globl dbginterrupt
ENTRY(dbginterrupt)
SAVE_ALL_INT
+ GET_CURRENT(%d0)
movel %sp,%sp@- /* stack frame pointer argument */
jsr dbginterrupt_c
addql #4,%sp