From f5423e77ba921961fe4b88c7cd4a64c470dc21a5 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sun, 23 May 2004 06:46:10 +0000 Subject: netbsd 1.54; do not count on new process having cleared condition codes; hunted down by brian poole as relevant for the occassional cron failure at startup... --- sys/arch/sparc64/sparc64/vm_machdep.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sys/arch') diff --git a/sys/arch/sparc64/sparc64/vm_machdep.c b/sys/arch/sparc64/sparc64/vm_machdep.c index 45864d16e23..a5dcebf5307 100644 --- a/sys/arch/sparc64/sparc64/vm_machdep.c +++ b/sys/arch/sparc64/sparc64/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.9 2003/02/24 07:55:08 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.10 2004/05/23 06:46:09 deraadt Exp $ */ /* $NetBSD: vm_machdep.c,v 1.38 2001/06/30 00:02:20 eeh Exp $ */ /* @@ -310,11 +310,15 @@ cpu_fork(p1, p2, stack, stacksize, func, arg) 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<tf_tstate &= + ~((PSTATE_PEF<