patch-2.0.21-2.1.0 linux/arch/m68k/ifpsp060/iskeleton.S
Next file: linux/arch/m68k/ifpsp060/os.S
Previous file: linux/arch/m68k/ifpsp060/fskeleton.S
Back to the patch index
Back to the overall index
- Lines: 123
- Date:
Wed Sep 25 10:47:39 1996
- Orig file:
lx2.0/v2.0.21/linux/arch/m68k/ifpsp060/iskeleton.S
- Orig date:
Fri Apr 26 12:12:35 1996
diff -u --recursive --new-file lx2.0/v2.0.21/linux/arch/m68k/ifpsp060/iskeleton.S linux/arch/m68k/ifpsp060/iskeleton.S
@@ -34,6 +34,15 @@
| (3) example "Call-out" table
|
+#include <linux/linkage.h>
+
+LOFF_ORIG_D0 = 0x20
+
+#define SAVE_ALL \
+ clrl %sp@-; /* stk_adj */ \
+ movel %d0,%sp@-; /* orig d0 */ \
+ movel %d0,%sp@-; /* d0 */ \
+ moveml %d1-%d5/%a0-%a1,%sp@-
|################################
| (1) EXAMPLE CALL-OUTS #
@@ -61,9 +70,22 @@
| To simply continue execution at the next instruction, just
| do an "rte".
|
+| Linux/68k: If returning to user space, check for needed reselections.
+
.global _060_isp_done
_060_isp_done:
+ btst #0x5,%sp@ | supervisor bit set in saved SR?
+ beq Lnotkern
rte
+Lnotkern:
+ tstl SYMBOL_NAME(need_resched)
+ bne Lmustsched
+ rte
+Lmustsched:
+ SAVE_ALL
+ moveq #-1,%d0
+ movel %d0,%sp@(LOFF_ORIG_D0) | indicate stack frame not for syscall
+ bral SYMBOL_NAME(ret_from_exception) | deliver signals, reschedule etc..
|
| _060_real_chk():
@@ -71,13 +93,15 @@
| This is an alternate exit point for the Unimplemented Integer
| Instruction exception handler. If the instruction was a "chk2"
| and the operand was out of bounds, then _isp_unimp() creates
-| a CHK exception stack frame from the Unimplemented Integer Instruction
+| a CHK exception stack frame from the Unimplemented Integer Instrcution
| stack frame and branches to this routine.
|
+| Linux/68k: commented out test for tracing
+
.global _060_real_chk
_060_real_chk:
- tst.b (%sp) | is tracing enabled?
- bpls real_chk_end | no
+| tst.b (%sp) | is tracing enabled?
+| bpls real_chk_end | no
|
| CHK FRAME TRACE FRAME
@@ -92,11 +116,11 @@
| * SR * * SR *
| ***************** *****************
|
- move.b #0x24,0x7(%sp) | set trace vecno
- bral _060_real_trace
+| move.b #0x24,0x7(%sp) | set trace vecno
+| bral _060_real_trace
real_chk_end:
- rte
+ bral SYMBOL_NAME(trap) | jump to trap handler
|
| _060_real_divbyzero:
@@ -112,10 +136,12 @@
| then it create a Trace exception stack frame from the "chk" exception
| stack frame and branches to the _real_trace() entry point.
|
+| Linux/68k: commented out test for tracing
+
.global _060_real_divbyzero
_060_real_divbyzero:
- tst.b (%sp) | is tracing enabled?
- bpls real_divbyzero_end | no
+| tst.b (%sp) | is tracing enabled?
+| bpls real_divbyzero_end | no
|
| DIVBYZERO FRAME TRACE FRAME
@@ -130,11 +156,11 @@
| * SR * * SR *
| ***************** *****************
|
- move.b #0x24,0x7(%sp) | set trace vecno
- bral _060_real_trace
+| move.b #0x24,0x7(%sp) | set trace vecno
+| bral _060_real_trace
real_divbyzero_end:
- rte
+ bral SYMBOL_NAME(trap) | jump to trap handler
|##########################
@@ -177,6 +203,9 @@
| Expected outputs:
| d0 = 0 -> success; non-zero -> failure
|
+| Linux/68k: As long as ints are disabled, no swapping out should
+| occur (hopefully...)
+|
.global _060_real_lock_page
_060_real_lock_page:
clr.l %d0
@@ -194,6 +223,9 @@
| d0 = `xxxxxxff -> supervisor; `xxxxxx00 -> user
| d1 = `xxxxxxff -> longword; `xxxxxx00 -> word
|
+| Linux/68k: As we do no special locking operation, also no unlocking
+| is needed...
+
.global _060_real_unlock_page
_060_real_unlock_page:
clr.l %d0
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov