Module Name: src
Committed By: snj
Date: Sat Jan 9 01:41:58 UTC 2010
Modified Files:
src/sys/arch/sparc/sparc [netbsd-5]: vm_machdep.c
Log Message:
Pull up following revision(s) (requested by mrg in ticket #1223):
sys/arch/sparc/sparc/vm_machdep.c: revision 1.99
sync this a little with sparc64: use cpu_setfunc() at the end of cpu_lwp_fork()
To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.95.4.1 src/sys/arch/sparc/sparc/vm_machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/sparc/sparc/vm_machdep.c
diff -u src/sys/arch/sparc/sparc/vm_machdep.c:1.95 src/sys/arch/sparc/sparc/vm_machdep.c:1.95.4.1
--- src/sys/arch/sparc/sparc/vm_machdep.c:1.95 Thu Oct 16 19:28:52 2008
+++ src/sys/arch/sparc/sparc/vm_machdep.c Sat Jan 9 01:41:57 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.95 2008/10/16 19:28:52 martin Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.95.4.1 2010/01/09 01:41:57 snj Exp $ */
/*
* Copyright (c) 1996
@@ -49,7 +49,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.95 2008/10/16 19:28:52 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.95.4.1 2010/01/09 01:41:57 snj Exp $");
#include "opt_multiprocessor.h"
#include "opt_coredump.h"
@@ -208,6 +208,10 @@
write_user_windows();
opcb->pcb_psr = getpsr();
}
+#ifdef DIAGNOSTIC
+ else if (l1 != &lwp0) /* XXX is this valid? */
+ panic("cpu_lwp_fork: curlwp");
+#endif
bcopy((void *)opcb, (void *)npcb, sizeof(struct pcb));
if (l1->l_md.md_fpstate != NULL) {
@@ -272,14 +276,8 @@
/* Construct kernel frame to return to in cpu_switch() */
rp = (struct rwindow *)((u_int)npcb + TOPFRAMEOFF);
- rp->rw_local[0] = (int)func; /* Function to call */
- rp->rw_local[1] = (int)arg; /* and its argument */
- rp->rw_local[2] = (int)l2; /* the new LWP */
- npcb->pcb_pc = (int)lwp_trampoline - 8;
- npcb->pcb_sp = (int)rp;
- npcb->pcb_psr &= ~PSR_CWP; /* Run in window #0 */
- npcb->pcb_wim = 1; /* Fence at window #1 */
+ cpu_setfunc(l2, func, arg);
}
/*