diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-05-07 20:30:26 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-05-07 20:30:26 +0000 |
commit | 33cf55e2ae5446307e6a70f3543c8fcb11a785a0 (patch) | |
tree | 3e900f3232126019595ac5279d13071a125094c4 | |
parent | 62cdf65a9c5dffc8a14c5bb25a1b0bfd622d7794 (diff) |
Check for astpending in u_general (userland traps) in addition to u_intr
(hardware interrupts occuring while cpu is in usermode), fixes
regress/sys/kern/sig-stop on sgi.
-rw-r--r-- | sys/arch/mips64/mips64/exception.S | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sys/arch/mips64/mips64/exception.S b/sys/arch/mips64/mips64/exception.S index 294b7c058ab..9047f87d34e 100644 --- a/sys/arch/mips64/mips64/exception.S +++ b/sys/arch/mips64/mips64/exception.S @@ -1,4 +1,4 @@ -/* $OpenBSD: exception.S,v 1.10 2007/04/24 16:47:36 miod Exp $ */ +/* $OpenBSD: exception.S,v 1.11 2007/05/07 20:30:25 miod Exp $ */ /* * Copyright (c) 2002-2003 Opsycon AB (www.opsycon.se / www.opsycon.com) @@ -440,6 +440,20 @@ NNON_LEAF(u_general, FRAMESZ(CF_SZ), ra) jal trap PTR_S a3, CF_RA_OFFS(sp) # for debugging + lw v0, astpending + beq v0, zero, 4f + nop + + PTR_L t0, curprocpaddr + SAVE_CPU_SREG(t0, 0) + + jal softintr + nop + + PTR_L t0, curprocpaddr + RESTORE_CPU_SREG(t0, 0) + +4: #ifdef PERFCNTRS lw t0, cpu_is_rm7k beqz t0, 1f # not an RM7K. Don't do perf setup. @@ -460,8 +474,6 @@ NNON_LEAF(u_general, FRAMESZ(CF_SZ), ra) nop;nop;nop;nop 1: #endif - -4: mfc0 t0, COP_0_STATUS_REG # dis int preserve settings. li t1, ~SR_INT_ENAB and t0, t0, t1 |