Date: Thu, 6 Mar 2008 19:51:14 GMT From: "Randall R. Stewart" <rrs@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 137020 for review Message-ID: <200803061951.m26JpEBb034836@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=137020 Change 137020 by rrs@rrs-mips2-jnpr on 2008/03/06 19:50:45 Don't blast 0 in carefully disable ints and preserve the rest of the SR. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#16 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#16 (text+ko) ==== @@ -172,20 +172,23 @@ lw a1, PC_CURPCB(a1) 1: - .set noat - li v0, SR_EXL + mfc0 v0, COP_0_STATUS_REG # set exeption level bit. + or v0, SR_EXL + and v0, ~(SR_INT_ENAB) mtc0 v0, COP_0_STATUS_REG # set exeption level bit. nop nop nop nop - RESTORE_U_PCB_REG(t0, MULLO, a1) - RESTORE_U_PCB_REG(t1, MULHI, a1) + .set noat + move k1, a1 + RESTORE_U_PCB_REG(t0, MULLO, k1) + RESTORE_U_PCB_REG(t1, MULHI, k1) mtlo t0 mthi t1 - RESTORE_U_PCB_REG(a0, PC, a1) - RESTORE_U_PCB_REG(AT, AST, a1) - RESTORE_U_PCB_REG(v0, V0, a1) + RESTORE_U_PCB_REG(a0, PC, k1) + RESTORE_U_PCB_REG(AT, AST, k1) + RESTORE_U_PCB_REG(v0, V0, k1) _MTC0 a0, COP_0_EXC_PC # set return address /* @@ -193,7 +196,6 @@ * after interrupts are disabled. Otherwise it will get overwritten * by the interrupt code. */ - move k1, a1 RESTORE_U_PCB_REG(v1, V1, k1) RESTORE_U_PCB_REG(a0, A0, k1) RESTORE_U_PCB_REG(a1, A1, k1) @@ -267,8 +269,7 @@ mfc0 t0, COP_0_STATUS_REG # t0 = saved status register nop nop - - and a3, t0, SR_KX + and a3, t0, ~(SR_INT_ENAB) mtc0 a3, COP_0_STATUS_REG # Disable all interrupts ITLBNOPFIX j mips_sw1 # We're not interested in old @@ -287,7 +288,7 @@ mfc0 t0, COP_0_STATUS_REG # t0 = saved status register nop nop - and a3, t0, SR_KX + and a3, t0, ~(SR_INT_ENAB) mtc0 a3, COP_0_STATUS_REG # Disable all interrupts ITLBNOPFIX beqz a0, mips_sw1
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803061951.m26JpEBb034836>