Date: Thu, 24 Jan 2008 05:51:05 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 133971 for review Message-ID: <200801240551.m0O5p5QX079021@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=133971 Change 133971 by imp@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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801240551.m0O5p5QX079021>