summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2006-11-29 12:47:50 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2006-11-29 12:47:50 +0000
commit98c4330df10a3ea21f170a57ea3944d8ea99cc53 (patch)
treec4cb02a0c3b86cac9d5ff54b0ac91dfa3f49aca9 /sys
parentdd6ae57e92d7c64edd63b836223abe9422ff0d63 (diff)
cpu_swapin is nomore
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/hppa/hppa/vm_machdep.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/sys/arch/hppa/hppa/vm_machdep.c b/sys/arch/hppa/hppa/vm_machdep.c
index 56e4b3f2fde..018725193cc 100644
--- a/sys/arch/hppa/hppa/vm_machdep.c
+++ b/sys/arch/hppa/hppa/vm_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vm_machdep.c,v 1.57 2006/11/29 12:26:13 miod Exp $ */
+/* $OpenBSD: vm_machdep.c,v 1.58 2006/11/29 12:47:49 mickey Exp $ */
/*
* Copyright (c) 1999-2004 Michael Shalayeff
@@ -113,23 +113,6 @@ pagemove(from, to, size)
pmap_update(pmap_kernel());
}
-void cpu_swapin(struct proc *p);
-
-void
-cpu_swapin(struct proc *p)
-{
- struct trapframe *tf = p->p_md.md_regs;
- paddr_t pa;
-
- /*
- * Stash the physical for the pcb of U for later perusal
- */
- if (!pmap_extract(pmap_kernel(), (vaddr_t)p->p_addr, &pa))
- panic("pmap_extract(%p) failed", p->p_addr);
-
- tf->tf_cr30 = pa;
-}
-
void
cpu_fork(p1, p2, stack, stacksize, func, arg)
struct proc *p1, *p2;
@@ -143,6 +126,7 @@ cpu_fork(p1, p2, stack, stacksize, func, arg)
struct pcb *pcbp;
struct trapframe *tf;
register_t sp, osp;
+ paddr_t pa;
#ifdef DIAGNOSTIC
if (round_page(sizeof(struct user)) > NBPG)
@@ -171,10 +155,12 @@ cpu_fork(p1, p2, stack, stacksize, func, arg)
bcopy(p1->p_md.md_regs, tf, sizeof(*tf));
/*
- * cpu_swapin() is supposed to fill out all the PAs
- * we gonna need in locore
+ * Stash the physical for the pcb of U for later perusal
*/
- cpu_swapin(p2);
+ if (!pmap_extract(pmap_kernel(), (vaddr_t)p2->p_addr, &pa))
+ panic("pmap_extract(%p) failed", p2->p_addr);
+
+ tf->tf_cr30 = pa;
tf->tf_sr0 = tf->tf_sr1 = tf->tf_sr2 = tf->tf_sr3 =
tf->tf_sr4 = tf->tf_sr5 = tf->tf_sr6 =