Module Name:    src
Committed By:   skrll
Date:           Thu Feb 13 15:04:18 UTC 2014

Modified Files:
        src/sys/arch/hppa/hppa: trap.c

Log Message:
Simplify cpu_spawn_return - setregs has done all the work already.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/hppa/hppa/trap.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/hppa/hppa/trap.c
diff -u src/sys/arch/hppa/hppa/trap.c:1.104 src/sys/arch/hppa/hppa/trap.c:1.105
--- src/sys/arch/hppa/hppa/trap.c:1.104	Fri Oct 25 09:46:10 2013
+++ src/sys/arch/hppa/hppa/trap.c	Thu Feb 13 15:04:18 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.104 2013/10/25 09:46:10 martin Exp $	*/
+/*	$NetBSD: trap.c,v 1.105 2014/02/13 15:04:18 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.104 2013/10/25 09:46:10 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.105 2014/02/13 15:04:18 skrll Exp $");
 
 /* #define INTRDEBUG */
 /* #define TRAPDEBUG */
@@ -983,27 +983,6 @@ child_return(void *arg)
 void
 cpu_spawn_return(struct lwp *l)
 {
-	struct proc *p = l->l_proc;
-	pmap_t pmap = p->p_vmspace->vm_map.pmap;
-	pa_space_t space = pmap->pm_space;
-	struct trapframe *tf = l->l_md.md_regs;
-
-	/* Load all of the user's space registers. */
-	tf->tf_sr0 = tf->tf_sr1 = tf->tf_sr3 = tf->tf_sr2 =
-	tf->tf_sr4 = tf->tf_sr5 = tf->tf_sr6 = space;
-	tf->tf_iisq_head = tf->tf_iisq_tail = space;
-
-	/* Load the protection registers */
-	tf->tf_pidr1 = tf->tf_pidr2 = pmap->pm_pid;
-
-	/*
-	 * theoretically these could be inherited from the father,
-	 * but just in case.
-	 */
-	tf->tf_sr7 = HPPA_SID_KERNEL;
-	mfctl(CR_EIEM, tf->tf_eiem);
-	tf->tf_ipsw = PSW_C | PSW_Q | PSW_P | PSW_D | PSW_I /* | PSW_L */ |
-	    (curcpu()->ci_psw & PSW_O);
 
 	userret(l, l->l_md.md_regs->tf_iioq_head, 0);
 #ifdef DEBUG

Reply via email to