patch-2.3.48 linux/arch/mips/kernel/scall_o32.S
Next file: linux/arch/mips/kernel/semaphore.c
Previous file: linux/arch/mips/kernel/r6000_fpu.S
Back to the patch index
Back to the overall index
- Lines: 105
- Date:
Thu Feb 24 22:52:30 2000
- Orig file:
v2.3.47/linux/arch/mips/kernel/scall_o32.S
- Orig date:
Fri Jun 25 17:40:12 1999
diff -u --recursive --new-file v2.3.47/linux/arch/mips/kernel/scall_o32.S linux/arch/mips/kernel/scall_o32.S
@@ -1,4 +1,4 @@
-/* $Id: scall_o32.S,v 1.4 1998/06/25 20:01:01 ralf Exp $
+/* $Id: scall_o32.S,v 1.11 2000/02/23 01:33:55 ralf Exp $
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
@@ -12,6 +12,7 @@
#include <asm/mipsregs.h>
#include <asm/regdef.h>
#include <asm/stackframe.h>
+#include <asm/isadep.h>
#include <asm/unistd.h>
/* This duplicates the definition from <linux/sched.h> */
@@ -48,6 +49,7 @@
bgez t0, stackargs
stack_done:
+ sw a3, PT_R26(sp) # save for syscall restart
lw t0, TASK_FLAGS($28) # syscall tracing enabled?
andi t0, PF_TRACESYS
bnez t0, trace_a_syscall
@@ -64,13 +66,13 @@
1: sw v0, PT_R2(sp) # result
EXPORT(o32_ret_from_sys_call)
- lw t0,bh_mask
- lw t1,bh_active # unused delay slot
- and t0,t1
- bnez t0,o32_handle_bottom_half
+ lw t0, softirq_state
+ lw t1, softirq_state+4 # unused delay slot
+ and t0, t1
+ bnez t0, o32_handle_softirq
9: lw t0,PT_STATUS(sp) # returning to kernel mode?
- andi t1, t0, 0x10
+ andi t1, t0, KU_USER
lw t2, TASK_NEED_RESCHED($28)
beqz t1, o32_return # -> yes
bnez t2, o32_reschedule
@@ -83,13 +85,10 @@
o32_return:
RESTORE_SOME
- RESTORE_SP
- .set mips3
- eret
- .set mips0
+ RESTORE_SP_AND_RET
-o32_handle_bottom_half:
- jal do_bottom_half
+o32_handle_softirq:
+ jal do_softirq
b 9b
o32_reschedule:
SAVE_STATIC
@@ -100,9 +99,9 @@
trace_a_syscall:
SAVE_STATIC
- sw t2,PT_R1(sp)
+ sw t2, PT_R1(sp)
jal syscall_trace
- lw t2,PT_R1(sp)
+ lw t2, PT_R1(sp)
lw a0, PT_R4(sp) # Restore argument registers
lw a1, PT_R5(sp)
@@ -140,15 +139,28 @@
lw t0, PT_R29(sp) # get old user stack pointer
la t1, 3f # copy 1 to 2 arguments
- sll t3, t3, 3
+ sll t3, t3, 4
subu t1, t3
jr t1
/* Ok, copy the args from the luser stack to the kernel stack */
+ /*
+ * I know Ralf doesn't like nops but this avoids code
+ * duplication for R3000 targets (and this is the
+ * only place where ".set reorder" doesn't help).
+ * Harald.
+ */
+ .set push
+ .set noreorder
1: lw t1, 20(t0) # argument #6 from usp
+ nop
sw t1, 20(sp)
+ nop
2: lw t1, 16(t0) # argument #5 from usp
+ nop
sw t1, 16(sp)
+ nop
+ .set pop
3: j stack_done # go back
@@ -177,3 +189,4 @@
li t0, 1 # set error flag
sw t0, PT_R7(sp)
j ret_from_sys_call
+ END(handle_sys)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)