diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-11-28 01:24:43 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-11-28 01:24:43 +0000 |
commit | c51a554db7b34fa09912603268d0a4464d346076 (patch) | |
tree | 935569ed91a1a1f190addbe1928ea4a5629b06ce /sys/arch/mvme68k | |
parent | 93f592f1c84cbc2fbff0e7f6e59e02b7871bcb90 (diff) |
delete last chunks of MAPPEDCOPY
Diffstat (limited to 'sys/arch/mvme68k')
-rw-r--r-- | sys/arch/mvme68k/mvme68k/machdep.c | 14 | ||||
-rw-r--r-- | sys/arch/mvme68k/mvme68k/vm_machdep.c | 91 |
2 files changed, 2 insertions, 103 deletions
diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c index f16899d4486..f237d375f85 100644 --- a/sys/arch/mvme68k/mvme68k/machdep.c +++ b/sys/arch/mvme68k/mvme68k/machdep.c @@ -1,4 +1,4 @@ -/* $Id: machdep.c,v 1.3 1995/11/07 08:50:20 deraadt Exp $ */ +/* $Id: machdep.c,v 1.4 1995/11/28 01:24:40 deraadt Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -1192,18 +1192,6 @@ dumpsys() initcpu() { -#ifdef MAPPEDCOPY - extern u_int mappedcopysize; - - /* - * Initialize lower bound for doing copyin/copyout using - * page mapping (if not already set). We don't do this on - * VAC machines as it loses big time. - */ - if (mappedcopysize == 0) { - mappedcopysize = NBPG; - } -#endif } straytrap(pc, evec) diff --git a/sys/arch/mvme68k/mvme68k/vm_machdep.c b/sys/arch/mvme68k/mvme68k/vm_machdep.c index f6aa89705b3..913539004fc 100644 --- a/sys/arch/mvme68k/mvme68k/vm_machdep.c +++ b/sys/arch/mvme68k/mvme68k/vm_machdep.c @@ -1,4 +1,4 @@ -/* $Id: vm_machdep.c,v 1.2 1995/11/07 08:50:29 deraadt Exp $ */ +/* $Id: vm_machdep.c,v 1.3 1995/11/28 01:24:42 deraadt Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -321,92 +321,3 @@ vunmapbuf(bp) bp->b_data = bp->b_saveaddr; bp->b_saveaddr = NULL; } - -#ifdef MAPPEDCOPY -u_int mappedcopysize = 4096; - -mappedcopyin(fromp, top, count) - register char *fromp, *top; - register int count; -{ - register vm_offset_t kva, upa; - register int off, len; - int alignable; - pmap_t upmap; - extern caddr_t CADDR1; - - kva = (vm_offset_t) CADDR1; - off = (vm_offset_t)fromp & PAGE_MASK; - alignable = (off == ((vm_offset_t)top & PAGE_MASK)); - upmap = vm_map_pmap(&curproc->p_vmspace->vm_map); - while (count > 0) { - /* - * First access of a page, use fubyte to make sure - * page is faulted in and read access allowed. - */ - if (fubyte(fromp) == -1) - return (EFAULT); - /* - * Map in the page and bcopy data in from it - */ - upa = pmap_extract(upmap, trunc_page(fromp)); - if (upa == 0) - panic("mappedcopyin"); - len = min(count, PAGE_SIZE-off); - pmap_enter(pmap_kernel(), kva, upa, VM_PROT_READ, TRUE); - if (len == PAGE_SIZE && alignable && off == 0) - copypage(kva, top); - else - bcopy((caddr_t)(kva+off), top, len); - fromp += len; - top += len; - count -= len; - off = 0; - } - pmap_remove(pmap_kernel(), kva, kva+PAGE_SIZE); - return (0); -} - -mappedcopyout(fromp, top, count) - register char *fromp, *top; - register int count; -{ - register vm_offset_t kva, upa; - register int off, len; - int alignable; - pmap_t upmap; - extern caddr_t CADDR2; - - kva = (vm_offset_t) CADDR2; - off = (vm_offset_t)top & PAGE_MASK; - alignable = (off == ((vm_offset_t)fromp & PAGE_MASK)); - upmap = vm_map_pmap(&curproc->p_vmspace->vm_map); - while (count > 0) { - /* - * First access of a page, use subyte to make sure - * page is faulted in and write access allowed. - */ - if (subyte(top, *fromp) == -1) - return (EFAULT); - /* - * Map in the page and bcopy data out to it - */ - upa = pmap_extract(upmap, trunc_page(top)); - if (upa == 0) - panic("mappedcopyout"); - len = min(count, PAGE_SIZE-off); - pmap_enter(pmap_kernel(), kva, upa, - VM_PROT_READ|VM_PROT_WRITE, TRUE); - if (len == PAGE_SIZE && alignable && off == 0) - copypage(fromp, kva); - else - bcopy(fromp, (caddr_t)(kva+off), len); - fromp += len; - top += len; - count -= len; - off = 0; - } - pmap_remove(pmap_kernel(), kva, kva+PAGE_SIZE); - return (0); -} -#endif |