Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch G/C "MAPPECOPY". It is the deadest of wood, and ne...



details:   https://anonhg.NetBSD.org/src/rev/f0bb9d265540
branches:  trunk
changeset: 997585:f0bb9d265540
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Mar 14 16:59:09 2019 +0000

description:
G/C "MAPPECOPY".  It is the deadest of wood, and never actually worked in
NetBSD.

diffstat:

 sys/arch/cesfic/conf/GENERIC       |    6 +-
 sys/arch/hp300/conf/GENERIC        |    5 +-
 sys/arch/hp300/conf/INSTALL        |    6 +-
 sys/arch/hp300/hp300/machdep.c     |   15 +--
 sys/arch/m68k/conf/files.m68k      |    3 +-
 sys/arch/m68k/include/m68k.h       |    9 +-
 sys/arch/m68k/m68k/copy.s          |   10 +-
 sys/arch/m68k/m68k/mappedcopy.c    |  188 -------------------------------------
 sys/arch/mvme68k/mvme68k/machdep.c |   17 +--
 sys/arch/news68k/news68k/machdep.c |   16 +--
 sys/arch/next68k/next68k/machdep.c |   15 +--
 sys/arch/x68k/conf/GENERIC         |    5 +-
 sys/arch/x68k/conf/INSTALL         |    5 +-
 sys/arch/x68k/x68k/machdep.c       |   16 +--
 14 files changed, 21 insertions(+), 295 deletions(-)

diffs (truncated from 565 to 300 lines):

diff -r 0fc8a67cd6ba -r f0bb9d265540 sys/arch/cesfic/conf/GENERIC
--- a/sys/arch/cesfic/conf/GENERIC      Thu Mar 14 10:26:10 2019 +0000
+++ b/sys/arch/cesfic/conf/GENERIC      Thu Mar 14 16:59:09 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.70 2018/08/01 20:04:10 maxv Exp $
+# $NetBSD: GENERIC,v 1.71 2019/03/14 16:59:09 thorpej Exp $
 #
 # GENERIC machine description file
 # 
@@ -90,10 +90,6 @@
 #options       ALTQ_RIO        # RED with IN/OUT
 #options       ALTQ_WFQ        # Weighted Fair Queueing
 
-# This option enables a different copyin/copyout that uses page
-# mapping for large copies.
-#options       MAPPEDCOPY      # different copyin/copyout for large copies
-
 options        COMPAT_M68K4K   # compat. with NetBSD/m68k4k binaries
 options        COMPAT_AOUT_M68K # support for NetBSD a.out executables
 
diff -r 0fc8a67cd6ba -r f0bb9d265540 sys/arch/hp300/conf/GENERIC
--- a/sys/arch/hp300/conf/GENERIC       Thu Mar 14 10:26:10 2019 +0000
+++ b/sys/arch/hp300/conf/GENERIC       Thu Mar 14 16:59:09 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.200 2018/12/19 13:57:47 maxv Exp $
+# $NetBSD: GENERIC,v 1.201 2019/03/14 16:59:09 thorpej Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "GENERIC-$Revision: 1.200 $"
+#ident                 "GENERIC-$Revision: 1.201 $"
 
 makeoptions    COPTS="-O2 -fno-reorder-blocks" # see share/mk/sys.mk
 
@@ -149,7 +149,6 @@
 options        USELEDS         # make the lights twinkle
 #options       PANICBUTTON     # two fast <reset>s on HIL dump kernel
 #options       CONSCODE=9      # force console at this select code
-#options       MAPPEDCOPY      # different copyin/copyout for large copies
 
 # These options enable verbose messages for several subsystems.
 # Warning, these may compile large string tables into the kernel!
diff -r 0fc8a67cd6ba -r f0bb9d265540 sys/arch/hp300/conf/INSTALL
--- a/sys/arch/hp300/conf/INSTALL       Thu Mar 14 10:26:10 2019 +0000
+++ b/sys/arch/hp300/conf/INSTALL       Thu Mar 14 16:59:09 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.63 2018/08/01 20:04:11 maxv Exp $
+# $NetBSD: INSTALL,v 1.64 2019/03/14 16:59:09 thorpej Exp $
 #
 # INSTALL machine description file
 #
@@ -89,10 +89,6 @@
 #options       PANICBUTTON     # two fast <reset>s on HIL dump kernel
 #options       CONSCODE=9      # force console at this select code
 
-# This option enables a different copyin/copyout that uses page
-# mapping for large copies.
-#options       MAPPEDCOPY      # different copyin/copyout for large copies
-
 # Debugging options
 #options       DIAGNOSTIC      # Extra kernel sanity checks
 #options       DEBUG           # Enable misc. kernel debugging code
diff -r 0fc8a67cd6ba -r f0bb9d265540 sys/arch/hp300/hp300/machdep.c
--- a/sys/arch/hp300/hp300/machdep.c    Thu Mar 14 10:26:10 2019 +0000
+++ b/sys/arch/hp300/hp300/machdep.c    Thu Mar 14 16:59:09 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.229 2014/04/20 04:12:54 tsutsui Exp $    */
+/*     $NetBSD: machdep.c,v 1.230 2019/03/14 16:59:09 thorpej Exp $    */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.229 2014/04/20 04:12:54 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.230 2019/03/14 16:59:09 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -868,17 +868,6 @@
 initcpu(void)
 {
 
-#ifdef MAPPEDCOPY
-       /*
-        * 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 (ectype == EC_VIRT)
-               mappedcopysize = -1;    /* in case it was patched */
-       else
-               mappedcopysize = PAGE_SIZE;
-#endif
        parityenable();
 #ifdef USELEDS
        ledinit();
diff -r 0fc8a67cd6ba -r f0bb9d265540 sys/arch/m68k/conf/files.m68k
--- a/sys/arch/m68k/conf/files.m68k     Thu Mar 14 10:26:10 2019 +0000
+++ b/sys/arch/m68k/conf/files.m68k     Thu Mar 14 16:59:09 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.m68k,v 1.48 2018/12/19 13:57:47 maxv Exp $
+#      $NetBSD: files.m68k,v 1.49 2019/03/14 16:59:09 thorpej Exp $
 #
 
 defflag        opt_fpsp.h              FPSP
@@ -21,7 +21,6 @@
 file   arch/m68k/m68k/kobj_machdep.c           modular
 file   arch/m68k/m68k/lock_stubs.s
 file   arch/m68k/m68k/m68k_machdep.c
-file   arch/m68k/m68k/mappedcopy.c             mappedcopy
 file   arch/m68k/m68k/oc_cksum.s               (inet | inet6) & cpu_in_cksum
 file   arch/m68k/m68k/process_machdep.c
 file   arch/m68k/m68k/reenter_syscall.s
diff -r 0fc8a67cd6ba -r f0bb9d265540 sys/arch/m68k/include/m68k.h
--- a/sys/arch/m68k/include/m68k.h      Thu Mar 14 10:26:10 2019 +0000
+++ b/sys/arch/m68k/include/m68k.h      Thu Mar 14 16:59:09 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: m68k.h,v 1.22 2012/02/19 21:06:13 rmind Exp $  */
+/*     $NetBSD: m68k.h,v 1.23 2019/03/14 16:59:10 thorpej Exp $        */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -120,13 +120,6 @@
 /* fpu.c */
 int    fpu_probe(void);
 
-#ifdef MAPPEDCOPY
-/* mappedcopy.c */
-int    mappedcopyin(void *fromp, void *top, size_t count);
-int    mappedcopyout(void *fromp, void *top, size_t count);
-extern u_int mappedcopysize;
-#endif /* MAPPEDCOPY */
-
 /* regdump.c */
 void   regdump(struct trapframe *, int);
 
diff -r 0fc8a67cd6ba -r f0bb9d265540 sys/arch/m68k/m68k/copy.s
--- a/sys/arch/m68k/m68k/copy.s Thu Mar 14 10:26:10 2019 +0000
+++ b/sys/arch/m68k/m68k/copy.s Thu Mar 14 16:59:09 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: copy.s,v 1.45 2013/09/07 19:06:29 chs Exp $    */
+/*     $NetBSD: copy.s,v 1.46 2019/03/14 16:59:10 thorpej Exp $        */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -122,10 +122,6 @@
        CHECK_SFC
        movl    12(%sp),%d0             | check count
        jeq     .Lciret                 | == 0, don't do anything
-#ifdef MAPPEDCOPY
-       cmpl    _C_LABEL(mappedcopysize),%d0 | size >= mappedcopysize
-       jcc     _C_LABEL(mappedcopyin)  | yes, go do it the new way
-#endif
        movl    %d2,-(%sp)              | save scratch register
        GETCURPCB(%a0)                  | set fault handler
        movl    #.Lcifault,PCB_ONFAULT(%a0)
@@ -187,10 +183,6 @@
        CHECK_DFC
        movl    12(%sp),%d0             | check count
        jeq     .Lcoret                 | == 0, don't do anything
-#ifdef MAPPEDCOPY
-       cmpl    _C_LABEL(mappedcopysize),%d0 | size >= mappedcopysize
-       jcc     _C_LABEL(mappedcopyout) | yes, go do it the new way
-#endif
        movl    %d2,-(%sp)              | save scratch register
        GETCURPCB(%a0)                  | set fault handler
        movl    #.Lcofault,PCB_ONFAULT(%a0)
diff -r 0fc8a67cd6ba -r f0bb9d265540 sys/arch/m68k/m68k/mappedcopy.c
--- a/sys/arch/m68k/m68k/mappedcopy.c   Thu Mar 14 10:26:10 2019 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,188 +0,0 @@
-/*     $NetBSD: mappedcopy.c,v 1.27 2018/09/03 16:29:25 riastradh Exp $        */
-
-/*
- * XXX This doesn't work yet.  Soon.  --thorpej%NetBSD.org@localhost
- */
-
-/*
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1982, 1986, 1990, 1993
- *     The Regents of the University of California.  All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: Utah $Hdr: vm_machdep.c 1.21 91/04/06$
- *
- *     @(#)vm_machdep.c        8.6 (Berkeley) 1/12/94
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mappedcopy.c,v 1.27 2018/09/03 16:29:25 riastradh Exp $");
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-
-#include <uvm/uvm_extern.h>
-
-#include <machine/cpu.h>
-
-#ifdef DEBUG
-#define        MDB_COPYIN      0x01
-#define        MDB_COPYOUT     0x02
-int    mappedcopydebug = 0;
-
-int    mappedcopyincount;
-int    mappedcopyoutcount;
-#endif
-
-/*
- * This turns off mappedcopy by default.  Ports initialize the
- * threshold in initcpu().
- */
-u_int  mappedcopysize = -1;
-
-static void *caddr1 = 0;
-
-int
-mappedcopyin(void *f, void *t, size_t count)
-{
-       void *fromp = f, *top = t;
-       vaddr_t kva;
-       paddr_t upa;
-       register size_t len;
-       int off, alignable;
-       pmap_t upmap;
-#define CADDR1 caddr1
-
-#ifdef DEBUG
-       if (mappedcopydebug & MDB_COPYIN)
-               printf("mappedcopyin(%p, %p, %lu), pid %d\n",
-                   fromp, top, (u_long)count, curproc->p_pid);
-       mappedcopyincount++;
-#endif
-
-       if (CADDR1 == 0)
-               CADDR1 = (void *) uvm_km_alloc(kernel_map, PAGE_SIZE, 0,
-                   UVM_KMF_VAONLY);
-
-       kva = (vaddr_t)CADDR1;
-       off = (int)((u_long)fromp & PAGE_MASK);
-       alignable = (off == ((u_long)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 memcpy data in from it
-                */
-               if (pmap_extract(upmap, trunc_page((vaddr_t)fromp), &upa)
-                   == false)
-                       panic("mappedcopyin: null page frame");
-               len = uimin(count, (PAGE_SIZE - off));
-               pmap_enter(pmap_kernel(), kva, upa,
-                   VM_PROT_READ, VM_PROT_READ | PMAP_WIRED);
-               pmap_update(pmap_kernel());
-               if (len == PAGE_SIZE && alignable && off == 0)
-                       copypage((void *)kva, top);
-               else
-                       memcpy(top, (void *)(kva + off), len);
-               fromp += len;
-               top += len;
-               count -= len;
-               off = 0;



Home | Main Index | Thread Index | Old Index