PERFORCE change 133971 for review

Warner Losh imp at FreeBSD.org
Wed Jan 23 21:51:06 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=133971

Change 133971 by imp at imp_paco-paco on 2008/01/24 05:50:23

	Save and restore the gp register.  mips2 did this and I can't for the
	life of me think of why you wouldn't want to do this.  But I'm still
	confused by the limited number of registers saved here and need to
	understand why better...
	
	Even without this change, we make it way past cpu_switch and get
	tangled up somewhere past fork_exit().  I wonder if the time has
	come to understand John Baldwin's mail about ast().
	
	I also need to double check to see if mips32 cpus have
	odd-ball multiply registers.

Affected files ...

.. //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#8 edit

Differences ...

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

@@ -246,6 +246,7 @@
 	SAVE_U_PCB_CONTEXT(s8, 9, a0)
 	SAVE_U_PCB_CONTEXT(ra, 10, a0)
 	SAVE_U_PCB_CONTEXT(v0, 11, a0)
+	SAVE_U_PCB_CONTEXT(gp, 12, a0)
 	/*
 	 * FREEBSD_DEVELOPERS_FIXME:
 	 * In case there are CPU-specific registers that need
@@ -300,6 +301,7 @@
 	SAVE_U_PCB_CONTEXT(s8, 9, a0)
 	SAVE_U_PCB_CONTEXT(ra, 10, a0)		# save return address
 	SAVE_U_PCB_CONTEXT(t0, 11, a0)		# save status register
+	SAVE_U_PCB_CONTEXT(gp, 12, a0)
 	/*
 	 * FREEBSD_DEVELOPERS_FIXME:
 	 * In case there are CPU-specific registers that need
@@ -380,6 +382,7 @@
  * Restore registers and return.
  */
 	lw	a0, TD_PCB(s7)
+	RESTORE_U_PCB_CONTEXT(gp, 12, a0)
 	RESTORE_U_PCB_CONTEXT(v0, 11, a0)	# restore kernel context
 	RESTORE_U_PCB_CONTEXT(ra, 10, a0)
 	RESTORE_U_PCB_CONTEXT(s0, 0, a0)


More information about the p4-projects mailing list