PERFORCE change 137019 for review
John Baldwin
jhb at freebsd.org
Fri Mar 7 14:19:22 UTC 2008
On Thursday 06 March 2008 02:50:13 pm Randall R. Stewart wrote:
> http://perforce.freebsd.org/chv.cgi?CH=137019
>
> Change 137019 by rrs at rrs-mips2-jnpr on 2008/03/06 19:49:46
>
> The ast was in the wrong place causing all kinds of pain.
You need to disable interrupts before checking for ASTPENDING though.
Something like this:
1: disable interrupts
check TDF_NEEDRESCHED | TDF_ASTPENDING
if not set, branch to 2f
enable interrupts
call ast
branch 1b
2:
set exception level
>
> Affected files ...
>
> .. //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#21 edit
>
> Differences ...
>
> ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#21 (text+ko)
> ====
>
> @@ -392,12 +392,6 @@
> jalr k0
> sw a3, STAND_RA_OFFSET + KERN_REG_SIZE(sp) # for debugging
>
> -/* .set at*/
> -
> -/* Should I DO the AST stuff here? */
> -
> -/* .set noat*/
> -
> RESTORE_CPU # v0 contains the return address.
> sync
> eret
> @@ -497,14 +491,14 @@
> * Restore user registers and return.
> * First disable interrupts and set exeption level.
> */
> + DO_AST
> +
> mtc0 zero, COP_0_STATUS_REG # disable int
> ITLBNOPFIX
> li v0, SR_EXL
> mtc0 v0, COP_0_STATUS_REG # set exeption level
> ITLBNOPFIX
>
> - DO_AST
> -
> /*
> * The use of k1 for storing the PCB pointer must be done only
> * after interrupts are disabled. Otherwise it will get overwritten
--
John Baldwin
More information about the p4-projects
mailing list