svn commit: r195127 - projects/mips/sys/mips/mips
Oleksandr Tymoshenko
gonzo at FreeBSD.org
Sat Jun 27 23:01:35 UTC 2009
Author: gonzo
Date: Sat Jun 27 23:01:35 2009
New Revision: 195127
URL: http://svn.freebsd.org/changeset/base/195127
Log:
- Make cpu_set_upcall_kse conform MIPS ABI. T9 should be
the same as PC in subroutine entry point
- Preserve interrupt mask
Modified:
projects/mips/sys/mips/mips/vm_machdep.c
Modified: projects/mips/sys/mips/mips/vm_machdep.c
==============================================================================
--- projects/mips/sys/mips/mips/vm_machdep.c Sat Jun 27 22:23:06 2009 (r195126)
+++ projects/mips/sys/mips/mips/vm_machdep.c Sat Jun 27 23:01:35 2009 (r195127)
@@ -351,9 +351,18 @@ cpu_set_upcall_kse(struct thread *td, vo
bzero(tf, sizeof(struct trapframe));
tf->sp = (register_t)sp;
tf->pc = (register_t)entry;
+ /*
+ * MIPS ABI requires T9 to be the same as PC
+ * in subroutine entry point
+ */
+ tf->t9 = (register_t)entry;
tf->a0 = (register_t)arg;
- tf->sr = SR_KSU_USER | SR_EXL;
+ /*
+ * Keep interrupt mask
+ */
+ tf->sr = SR_KSU_USER | SR_EXL | (SR_INT_MASK & mips_rd_status()) |
+ MIPS_SR_INT_IE;
#ifdef TARGET_OCTEON
tf->sr |= MIPS_SR_INT_IE | MIPS_SR_COP_0_BIT | MIPS_SR_UX |
MIPS_SR_KX;
More information about the svn-src-projects
mailing list