Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/mips Check for ASTs in Syscall and UserGenExce...
details: https://anonhg.NetBSD.org/src/rev/70ecec37b960
branches: trunk
changeset: 502216:70ecec37b960
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Jan 13 23:49:12 2001 +0000
description:
Check for ASTs in Syscall and UserGenException, too; AST processing
must be done on *every* return to userland.
diffstat:
sys/arch/mips/mips/locore_mips1.S | 30 +++++++++++++++++++++++++++---
sys/arch/mips/mips/locore_mips3.S | 26 +++++++++++++++++++++++++-
2 files changed, 52 insertions(+), 4 deletions(-)
diffs (98 lines):
diff -r 97b6e0fd8f6e -r 70ecec37b960 sys/arch/mips/mips/locore_mips1.S
--- a/sys/arch/mips/mips/locore_mips1.S Sat Jan 13 21:40:56 2001 +0000
+++ b/sys/arch/mips/mips/locore_mips1.S Sat Jan 13 23:49:12 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore_mips1.S,v 1.48 2000/10/09 10:14:23 nisimura Exp $ */
+/* $NetBSD: locore_mips1.S,v 1.49 2001/01/13 23:49:12 thorpej Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -358,7 +358,19 @@
*/
jal _C_LABEL(trap)
mtc0 t0, MIPS_COP_0_STATUS
-
+/*
+ * Check pending asynchronous traps.
+ */
+ lw t0, _C_LABEL(astpending) # any pending ast?
+ nop
+ beq t0, zero, 1f # if no, skip ast processing
+ nop
+/*
+ * We have pending asynchronous traps; all the state is already saved.
+ */
+ jal _C_LABEL(ast)
+ lw a0, CALLFRAME_SIZ + FRAME_EPC(sp)
+1:
la ra, _C_LABEL(mips1_xcpt_return)
j ra # pretend function return
nop
@@ -435,7 +447,19 @@
*/
jal _C_LABEL(syscall)
mtc0 t0, MIPS_COP_0_STATUS
-
+/*
+ * Check pending asynchronous traps.
+ */
+ lw t0, _C_LABEL(astpending) # any pending ast?
+ nop
+ beq t0, zero, 1f
+ nop
+/*
+ * We have pending asynchronous traps; all the state is already saved.
+ */
+ jal _C_LABEL(ast)
+ lw a0, CALLFRAME_SIZ + FRAME_EPC(sp)
+1:
la ra, _C_LABEL(mips1_xcpt_return)
j ra # pretend function return
nop
diff -r 97b6e0fd8f6e -r 70ecec37b960 sys/arch/mips/mips/locore_mips3.S
--- a/sys/arch/mips/mips/locore_mips3.S Sat Jan 13 21:40:56 2001 +0000
+++ b/sys/arch/mips/mips/locore_mips3.S Sat Jan 13 23:49:12 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore_mips3.S,v 1.62 2000/12/20 05:48:06 jeffs Exp $ */
+/* $NetBSD: locore_mips3.S,v 1.63 2001/01/13 23:49:13 thorpej Exp $ */
/*
* Copyright (c) 1997 Jonathan Stone (hereinafter referred to as the author)
@@ -560,6 +560,18 @@
jal _C_LABEL(trap)
sw a3, CALLFRAME_SIZ-4(sp) # for debugging
/*
+ * Check pending asynchronous traps.
+ */
+ lw t0, _C_LABEL(astpending)
+ beq t0, zero, 1f
+ nop
+/*
+ * We have pending asynchronous traps; all the state is already saved.
+ */
+ jal _C_LABEL(ast)
+ lw a0, CALLFRAME_SIZ + FRAME_EPC(sp)
+1:
+/*
* Restore user registers and return.
* First disable interrupts and set exception level.
*/
@@ -692,6 +704,18 @@
jal _C_LABEL(syscall)
nop
/*
+ * Check pending asynchronous traps.
+ */
+ lw t0, _C_LABEL(astpending)
+ beq t0, zero, 1f
+ nop
+/*
+ * We have pending asynchronous traps; all the state is already saved.
+ */
+ jal _C_LABEL(ast)
+ lw a0, CALLFRAME_SIZ + FRAME_EPC(sp)
+1:
+/*
* Restore user registers and return.
* First disable interrupts and set exception level.
*/
Home |
Main Index |
Thread Index |
Old Index