Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Mar 2008 17:48:10 GMT
From:      "Randall R. Stewart" <rrs@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 137626 for review
Message-ID:  <200803131748.m2DHmA1B087874@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=137626

Change 137626 by rrs@rrs-mips2-jnpr on 2008/03/13 17:47:17

	Disable interupts right away after DO_AST and then
	       use k1.

Affected files ...

.. //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#22 edit

Differences ...

==== //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#22 (text+ko) ====

@@ -714,38 +714,29 @@
  * k0 or k1 to store the PCB pointer.  This is because k0 and k1
  * are not preserved across interrupts.
  */
-	GET_CPU_PCPU(a1)
-	lw	a1, PC_CURPCB(a1)
-	RESTORE_U_PCB_REG(s0, S0, a1)
-	RESTORE_U_PCB_REG(s1, S1, a1)
-	RESTORE_U_PCB_REG(s2, S2, a1)
-	RESTORE_U_PCB_REG(s3, S3, a1)
-	RESTORE_U_PCB_REG(s4, S4, a1)
-	RESTORE_U_PCB_REG(s5, S5, a1)
-	RESTORE_U_PCB_REG(s6, S6, a1)
-	RESTORE_U_PCB_REG(s7, S7, a1)
-	RESTORE_U_PCB_REG(s8, S8, a1)
-
 	mtc0	zero, COP_0_STATUS_REG
 	ITLBNOPFIX
 	li	v0, SR_EXL
 	mtc0	v0, COP_0_STATUS_REG	# set exeption level bit.
 	ITLBNOPFIX
 
-	RESTORE_U_PCB_REG(t0, MULLO, a1)
-	RESTORE_U_PCB_REG(t1, MULHI, a1)
-	RESTORE_U_PCB_REG(t2, PC, a1)
+	GET_CPU_PCPU(k1)
+	lw	a1, PC_CURPCB(k1)
+	RESTORE_U_PCB_REG(s0, S0, k1)
+	RESTORE_U_PCB_REG(s1, S1, k1)
+	RESTORE_U_PCB_REG(s2, S2, k1)
+	RESTORE_U_PCB_REG(s3, S3, k1)
+	RESTORE_U_PCB_REG(s4, S4, k1)
+	RESTORE_U_PCB_REG(s5, S5, k1)
+	RESTORE_U_PCB_REG(s6, S6, k1)
+	RESTORE_U_PCB_REG(s7, S7, k1)
+	RESTORE_U_PCB_REG(s8, S8, k1)
+	RESTORE_U_PCB_REG(t0, MULLO, k1)
+	RESTORE_U_PCB_REG(t1, MULHI, k1)
+	RESTORE_U_PCB_REG(t2, PC, k1)
 	mtlo	t0
 	mthi	t1
 	_MTC0	t2, COP_0_EXC_PC	# set return address
-
-/*
- * The use of k1 to store the PCB pointer must be done only
- * after interrupts are disabled.  Otherwise it will get overwritten
- * by the interrUpt code.
- */
-	move	k1, a1
-
 	RESTORE_U_PCB_REG(v0, V0, k1)
 	RESTORE_U_PCB_REG(v1, V1, k1)
 	RESTORE_U_PCB_REG(a0, A0, k1)
@@ -769,7 +760,7 @@
 #ifdef TARGET_OCTEON
 	and k0, k0, ~(MIPS_SR_KX | MIPS_SR_SX | MIPS_SR_UX)
 #endif
-	or  k0, k0, (MIPS_SR_INT_IE)
+	or  k0, k0, (MIPS_SR_INT_IE|SR_EXL)
 	.set	noat
 	RESTORE_U_PCB_REG(AT, AST, k1)
 



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