Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Mar 2008 09:17:37 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        "Randall R. Stewart" <rrs@freebsd.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 137019 for review
Message-ID:  <200803070917.37450.jhb@freebsd.org>
In-Reply-To: <200803061950.m26JoDXx034770@repoman.freebsd.org>
References:  <200803061950.m26JoDXx034770@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803070917.37450.jhb>