Date: Sat, 23 May 2009 18:00:20 +0000 (UTC) From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r192655 - projects/mips/sys/mips/mips Message-ID: <200905231800.n4NI0KXi062764@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: gonzo Date: Sat May 23 18:00:20 2009 New Revision: 192655 URL: http://svn.freebsd.org/changeset/base/192655 Log: - Remove stale comments - Replace a1 with k1 to while restoring context. a1 was there by mistake, interrupts are disabled at this point and it's safe to use k0, k1. This code never was reached beacasue current Status register handling prevented interrupta from user mode. Modified: projects/mips/sys/mips/mips/exception.S Modified: projects/mips/sys/mips/mips/exception.S ============================================================================== --- projects/mips/sys/mips/mips/exception.S Sat May 23 17:17:54 2009 (r192654) +++ projects/mips/sys/mips/mips/exception.S Sat May 23 18:00:20 2009 (r192655) @@ -689,36 +689,27 @@ NNON_LEAF(MipsUserIntr, STAND_FRAME_SIZE /* * Call the interrupt handler. */ + break la k0, _C_LABEL(cpu_intr) jalr k0 sw a3, STAND_RA_OFFSET(sp) # for debugging + /* - * Since interrupts are enabled at this point, we use a1 instead of - * k0 or k1 to store the PCB pointer. This is because k0 and k1 - * are not preserved across interrupts. ** RRS - And how did the - * get enabled? cpu_intr clears the cause register but it does - * not touch the sr as far as I can see thus intr are still - * disabled. + * DO_AST enabled interrupts */ DO_AST /* - * Restore user registers and return. NOTE: interrupts are enabled. - */ - -/* - * Since interrupts are enabled at this point, we use a1 instead of - * k0 or k1 to store the PCB pointer. This is because k0 and k1 - * are not preserved across interrupts. + * Restore user registers and return. */ - mtc0 zero, COP_0_STATUS_REG + mtc0 zero, COP_0_STATUS_REG # re-disable interrupts ITLBNOPFIX li v0, SR_EXL mtc0 v0, COP_0_STATUS_REG # set exeption level bit. ITLBNOPFIX GET_CPU_PCPU(k1) - lw a1, PC_CURPCB(k1) + lw k1, PC_CURPCB(k1) RESTORE_U_PCB_REG(s0, S0, k1) RESTORE_U_PCB_REG(s1, S1, k1) RESTORE_U_PCB_REG(s2, S2, k1)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905231800.n4NI0KXi062764>