From 32de988d29ee8e79cca4b3b2775a72ede736b7e5 Mon Sep 17 00:00:00 2001 From: thorpej Date: Wed, 26 May 1999 00:37:40 +0000 Subject: [PATCH] No longer need to pmap_emulate_reference() in cpu_fork() or cpu_swapin(), since uvm_fault_wire() does the right thing with access_type. --- sys/arch/alpha/alpha/vm_machdep.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/sys/arch/alpha/alpha/vm_machdep.c b/sys/arch/alpha/alpha/vm_machdep.c index ce672b966059..ad1e89c5bc56 100644 --- a/sys/arch/alpha/alpha/vm_machdep.c +++ b/sys/arch/alpha/alpha/vm_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.47 1999/05/16 22:24:16 thorpej Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.48 1999/05/26 00:37:40 thorpej Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -29,7 +29,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.47 1999/05/16 22:24:16 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.48 1999/05/26 00:37:40 thorpej Exp $"); #include #include @@ -145,7 +145,6 @@ cpu_fork(p1, p2, stack, stacksize) size_t stacksize; { struct user *up = p2->p_addr; - int i; p2->p_md.md_tf = p1->p_md.md_tf; p2->p_md.md_flags = p1->p_md.md_flags & MDP_FPUSED; @@ -156,16 +155,6 @@ cpu_fork(p1, p2, stack, stacksize) */ p2->p_md.md_pcbpaddr = (void *)vtophys((vaddr_t)&up->u_pcb); - /* - * Simulate a write to the process's U-area pages, - * so that the system doesn't lose badly. - * (If this isn't done, the kernel can't read or - * write the kernel stack. "Ouch!") - */ - for (i = 0; i < UPAGES; i++) - pmap_emulate_reference(p2, (vaddr_t)up + i * PAGE_SIZE, - 0, 1); - /* * Copy floating point state from the FP chip to the PCB * if this process has state stored there. @@ -286,23 +275,12 @@ cpu_swapin(p) register struct proc *p; { struct user *up = p->p_addr; - int i; /* * Cache the physical address of the pcb, so we can swap to * it easily. */ p->p_md.md_pcbpaddr = (void *)vtophys((vaddr_t)&up->u_pcb); - - /* - * Simulate a write to the process's U-area pages, - * so that the system doesn't lose badly. - * (If this isn't done, the kernel can't read or - * write the kernel stack. "Ouch!") - */ - for (i = 0; i < UPAGES; i++) - pmap_emulate_reference(p, (vaddr_t)up + i * PAGE_SIZE, - 0, 1); } /*