Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/sparc64 cpu_fork: clear PSTATE_PEF for a ch...
details: https://anonhg.NetBSD.org/src/rev/33faede5a32e
branches: trunk
changeset: 535262:33faede5a32e
user: petrov <petrov%NetBSD.org@localhost>
date: Tue Aug 13 05:08:19 2002 +0000
description:
cpu_fork: clear PSTATE_PEF for a child process, reviewed by thorpej
diffstat:
sys/arch/sparc64/sparc64/vm_machdep.c | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
diffs (46 lines):
diff -r 761b08ba630d -r 33faede5a32e sys/arch/sparc64/sparc64/vm_machdep.c
--- a/sys/arch/sparc64/sparc64/vm_machdep.c Tue Aug 13 04:57:48 2002 +0000
+++ b/sys/arch/sparc64/sparc64/vm_machdep.c Tue Aug 13 05:08:19 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.43 2002/06/03 18:08:43 eeh Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.44 2002/08/13 05:08:19 petrov Exp $ */
/*
* Copyright (c) 1996-2002 Eduardo Horvath. All rights reserved.
@@ -69,11 +69,6 @@
#include <sparc64/sparc64/cache.h>
-/* XXX These are in sbusvar.h, but including that would be problematical */
-struct sbus_softc *sbus0;
-void sbus_enter __P((struct sbus_softc *, vaddr_t va, int64_t pa, int flags));
-void sbus_remove __P((struct sbus_softc *, vaddr_t va, int len));
-
/*
* Move pages from one kernel virtual address to another.
*/
@@ -245,9 +240,6 @@
* the FPU user, we must save the FPU state first.
*/
-#ifdef NOTDEF_DEBUG
- printf("cpu_fork()\n");
-#endif
if (p1 == curproc) {
write_user_windows();
@@ -329,11 +321,13 @@
npcb->pcb_pc = (long)proc_trampoline - 8;
npcb->pcb_sp = (long)rp - STACK_OFFSET;
+
/* Need to create a %tstate if we're forking from proc0 */
if (p1 == &proc0)
tf2->tf_tstate = (ASI_PRIMARY_NO_FAULT<<TSTATE_ASI_SHIFT) |
((PSTATE_USER)<<TSTATE_PSTATE_SHIFT);
-
+ else
+ tf2->tf_tstate &= ~(PSTATE_PEF<<TSTATE_PSTATE_SHIFT);
#ifdef NOTDEF_DEBUG
printf("cpu_fork: Copying over trapframe: otf=%p ntf=%p sp=%p opcb=%p npcb=%p\n",
Home |
Main Index |
Thread Index |
Old Index