Module Name: src
Committed By: jmcneill
Date: Wed Dec 14 12:29:59 UTC 2011
Modified Files:
src/sys/arch/usermode/dev: cpu.c
src/sys/arch/usermode/usermode: pmap.c
Log Message:
only need to setup altstack after fork, not in lwp tramp
To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/usermode/dev/cpu.c
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/usermode/usermode/pmap.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/usermode/dev/cpu.c
diff -u src/sys/arch/usermode/dev/cpu.c:1.51 src/sys/arch/usermode/dev/cpu.c:1.52
--- src/sys/arch/usermode/dev/cpu.c:1.51 Wed Dec 14 04:12:22 2011
+++ src/sys/arch/usermode/dev/cpu.c Wed Dec 14 12:29:59 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.51 2011/12/14 04:12:22 jmcneill Exp $ */
+/* $NetBSD: cpu.c,v 1.52 2011/12/14 12:29:59 jmcneill Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <[email protected]>
@@ -30,7 +30,7 @@
#include "opt_hz.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.51 2011/12/14 04:12:22 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.52 2011/12/14 12:29:59 jmcneill Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -302,7 +302,6 @@ cpu_lwp_trampoline(ucontext_t *ucp, void
/* actual jump */
thunk_makecontext(ucp, (void (*)(void)) func, 1, arg, NULL, NULL);
- thunk_sigaltstack(usermode_signal_stack(), NULL);
thunk_setcontext(ucp);
}
Index: src/sys/arch/usermode/usermode/pmap.c
diff -u src/sys/arch/usermode/usermode/pmap.c:1.77 src/sys/arch/usermode/usermode/pmap.c:1.78
--- src/sys/arch/usermode/usermode/pmap.c:1.77 Tue Dec 13 15:43:55 2011
+++ src/sys/arch/usermode/usermode/pmap.c Wed Dec 14 12:29:59 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.77 2011/12/13 15:43:55 reinoud Exp $ */
+/* $NetBSD: pmap.c,v 1.78 2011/12/14 12:29:59 jmcneill Exp $ */
/*-
* Copyright (c) 2011 Reinoud Zandijk <[email protected]>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.77 2011/12/13 15:43:55 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.78 2011/12/14 12:29:59 jmcneill Exp $");
#include "opt_memsize.h"
#include "opt_kmempages.h"
@@ -39,6 +39,7 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.7
#include <sys/malloc.h>
#include <sys/pool.h>
#include <machine/thunk.h>
+#include <machine/machdep.h>
#include <uvm/uvm.h>
@@ -369,7 +370,8 @@ pmap_bootstrap(void)
void
pmap_init(void)
{
- /* All deferred to pmap_create, because malloc() is nice. */
+ /* ensure signal stack is setup after urkelvisor fork */
+ thunk_sigaltstack(usermode_signal_stack(), NULL);
}
/* return kernel space start and end (including growth) */