Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/alpha bcopy -> memcpy



details:   https://anonhg.NetBSD.org/src/rev/d743c899068b
branches:  trunk
changeset: 512658:d743c899068b
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Thu Jul 12 23:35:42 2001 +0000

description:
bcopy -> memcpy

diffstat:

 sys/arch/alpha/a12/if_ade.c              |  39 +++++++++++++++----------------
 sys/arch/alpha/a12/if_xb.c               |  20 ++++++++--------
 sys/arch/alpha/alpha/autoconf.c          |   6 ++--
 sys/arch/alpha/alpha/compat_13_machdep.c |   6 ++--
 sys/arch/alpha/alpha/machdep.c           |  12 ++++----
 sys/arch/alpha/alpha/process_machdep.c   |   8 +++---
 sys/arch/alpha/alpha/prom.c              |   8 +++---
 sys/arch/alpha/alpha/trap.c              |   6 ++--
 sys/arch/alpha/alpha/vm_machdep.c        |   6 ++--
 sys/arch/alpha/common/sgmap_typedep.c    |   6 ++--
 sys/arch/alpha/tc/tc_dma_3000_500.c      |   6 ++--
 11 files changed, 61 insertions(+), 62 deletions(-)

diffs (truncated from 503 to 300 lines):

diff -r 9afd532c63d4 -r d743c899068b sys/arch/alpha/a12/if_ade.c
--- a/sys/arch/alpha/a12/if_ade.c       Thu Jul 12 23:26:30 2001 +0000
+++ b/sys/arch/alpha/a12/if_ade.c       Thu Jul 12 23:35:42 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ade.c,v 1.11 2001/07/12 23:26:30 thorpej Exp $      */
+/*     $NetBSD: if_ade.c,v 1.12 2001/07/12 23:35:42 thorpej Exp $      */
 
 /*
  * NOTE: this version of if_de was modified for bounce buffers prior
@@ -267,7 +267,7 @@
                 */
                if(offset)
                        bounce[0] = dst[0];
-               bcopy(src,(int8_t *)bounce+offset,t);
+               memcpy((int8_t *)bounce+offset,src,t);
                for(i=llw; i>=0; --i) { /* reverse so d_status is last */
                        alpha_mb();
                        dst[i] = bounce[i];
@@ -292,7 +292,7 @@
        alpha_wmb();
 }
 
-#define BEGIN(p) do { tulip_desc_t t; bcopy((p),&t,sizeof(t))
+#define BEGIN(p) do { tulip_desc_t t; memcpy(&t,(p),sizeof(t))
 #define        END(p)                     a12r2pb(&t,(p),sizeof(t)); } while(0)
 
 static void setstatus(tulip_desc_t *t, u_int32_t val) {
@@ -374,8 +374,8 @@
     /*
      * Construct a LLC TEST message which will point to ourselves.
      */
-    bcopy(sc->tulip_enaddr, mtod(m, struct ether_header *)->ether_dhost, 6);
-    bcopy(sc->tulip_enaddr, mtod(m, struct ether_header *)->ether_shost, 6);
+    memcpy(mtod(m, struct ether_header *)->ether_dhost, sc->tulip_enaddr, 6);
+    memcpy(mtod(m, struct ether_header *)->ether_shost, sc->tulip_enaddr, 6);
     mtod(m, struct ether_header *)->ether_type = htons(3);
     mtod(m, unsigned char *)[14] = 0;
     mtod(m, unsigned char *)[15] = 0;
@@ -2134,7 +2134,7 @@
        return;
     if (memcmp(sc->tulip_rombuf + 29, "DE500", 5) == 0
        || memcmp(sc->tulip_rombuf + 29, "DE450", 5) == 0) {
-       bcopy(sc->tulip_rombuf + 29, &sc->tulip_boardid[D0], 8);
+       memcpy(&sc->tulip_boardid[D0], sc->tulip_rombuf + 29, 8);
        sc->tulip_boardid[D0+8] = ' ';
     }
 #undef D0
@@ -2382,7 +2382,7 @@
     /*
      * Save the hardware address.
      */
-    bcopy((caddr_t) shp->sh_ieee802_address, (caddr_t) sc->tulip_enaddr, 6);
+    memcpy((caddr_t) sc->tulip_enaddr, (caddr_t) shp->sh_ieee802_address, 6);
     /*
      * If this is a multiple port card, add the adapter index to the last
      * byte of the hardware address.  (if it isn't multiport, adding 0
@@ -2803,7 +2803,7 @@
 #if 0
                printf("ade%d: Warning: reinit srom! Old Avalon format!",
                        cf->cf_unit);
-               bcopy(sc->tulip_rombuf + 4, sc->tulip_enaddr, 6);
+               memcpy(sc->tulip_enaddr, sc->tulip_rombuf + 4, 6);
                sc->tulip_flags |= TULIP_ROMOK;
                goto check_oui;
 #endif
@@ -2828,7 +2828,7 @@
        if (sc->tulip_rombuf[0] == 0 && sc->tulip_rombuf[1] == 0
                && sc->tulip_rombuf[2] == 0)
            return -4;
-       bcopy(sc->tulip_rombuf, sc->tulip_enaddr, 6);
+       memcpy(sc->tulip_enaddr, sc->tulip_rombuf, 6);
        sc->tulip_flags |= TULIP_ROMOK;
        goto check_oui;
     } else {
@@ -2862,12 +2862,12 @@
                sc->tulip_boardsw = root_sc->tulip_boardsw;
                strcpy(sc->tulip_boardid, root_sc->tulip_boardid);
                if (sc->tulip_boardsw->bd_type == TULIP_21140_ISV) {
-                   bcopy(root_sc->tulip_rombuf, sc->tulip_rombuf,
+                   memcpy(sc->tulip_rombuf, root_sc->tulip_rombuf,
                          sizeof(sc->tulip_rombuf));
                    if (!tulip_srom_decode(sc))
                        return -5;
                } else {
-                   bcopy(root_sc->tulip_enaddr, sc->tulip_enaddr, 6);
+                   memcpy(sc->tulip_enaddr, root_sc->tulip_enaddr, 6);
                    sc->tulip_enaddr[5] += sc->tulip_unit - root_sc->tulip_unit;
                }
                /*
@@ -2901,7 +2901,7 @@
     if (memcmp(&sc->tulip_rombuf[0], tmpbuf, 8) != 0)
        return -2;
 
-    bcopy(sc->tulip_rombuf, sc->tulip_enaddr, 6);
+    memcpy(sc->tulip_enaddr, sc->tulip_rombuf, 6);
 
     cksum = *(u_int16_t *) &sc->tulip_enaddr[0];
     cksum *= 2;
@@ -3958,9 +3958,9 @@
                        ina->x_host = *(union ns_host *)(sc->tulip_enaddr);
                    } else {
                        ifp->if_flags &= ~IFF_RUNNING;
-                       bcopy((caddr_t)ina->x_host.c_host,
-                             (caddr_t)sc->tulip_enaddr,
-                             sizeof(sc->tulip_enaddr));
+                       memcpy((caddr_t)sc->tulip_enaddr,
+                           (caddr_t)ina->x_host.c_host,
+                           sizeof(sc->tulip_enaddr));
                    }
                    tulip_init(sc);
                    break;
@@ -3975,9 +3975,8 @@
            break;
        }
        case SIOCGIFADDR: {
-           bcopy((caddr_t) sc->tulip_enaddr,
-                 (caddr_t) ((struct sockaddr *)&ifr->ifr_data)->sa_data,
-                 6);
+           memcpy((caddr_t) ((struct sockaddr *)&ifr->ifr_data)->sa_data,
+               (caddr_t) sc->tulip_enaddr, 6);
            break;
        }
 
@@ -4102,7 +4101,7 @@
                ifp->if_flags |= IFF_OACTIVE;
                return;
            }
-           bcopy(sc->tulip_setupdata, sc->tulip_setupbuf,
+           memcpy(sc->tulip_setupbuf, sc->tulip_setupdata,
                   sizeof(sc->tulip_setupdata));
            sc->tulip_flags &= ~TULIP_WANTSETUP;
            sc->tulip_flags |= TULIP_DOINGSETUP;
@@ -5149,7 +5148,7 @@
 
 
 #if defined(__NetBSD__)
-    bcopy(self->dv_xname, sc->tulip_if.if_xname, IFNAMSIZ);
+    strcpy(sc->tulip_if.if_xname, self->dv_xname);
     sc->tulip_if.if_softc = sc;
     sc->tulip_pc = pa->pa_pc;
 #else
diff -r 9afd532c63d4 -r d743c899068b sys/arch/alpha/a12/if_xb.c
--- a/sys/arch/alpha/a12/if_xb.c        Thu Jul 12 23:26:30 2001 +0000
+++ b/sys/arch/alpha/a12/if_xb.c        Thu Jul 12 23:35:42 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_xb.c,v 1.7 2001/06/14 05:44:28 itojun Exp $ */
+/* $NetBSD: if_xb.c,v 1.8 2001/07/12 23:35:42 thorpej Exp $ */
 
 /* [Notice revision 2.2]
  * Copyright (c) 1997, 1998 Avalon Computer Systems, Inc.
@@ -74,7 +74,7 @@
 #include "opt_avalon_a12.h"            /* Config options headers */
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: if_xb.c,v 1.7 2001/06/14 05:44:28 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_xb.c,v 1.8 2001/07/12 23:35:42 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -230,11 +230,11 @@
 {
        struct xb_config *ccp;
 
-       bcopy(self->dv_xname, xbi.if_xname, IFNAMSIZ);
+       strcpy(xbi.if_xname, self->dv_xname);
        xbfound = 1;
        ccp = &xb_configuration;
        xb_init_config(ccp, 1);
-       printf(": driver %s mtu %d\n", "$Revision: 1.7 $", xbi.if_mtu);
+       printf(": driver %s mtu %d\n", "$Revision: 1.8 $", xbi.if_mtu);
 }
 
 static void
@@ -552,10 +552,10 @@
                xbaddr = (lladdr[i] & 0xff) - 1;
                if (!(0 <= xbaddr && xbaddr <= 11))     /* XXX */
                        DIE();          /* 12 or 13 will be OK later */
-               bcopy(&channel[xbaddr].lo64, xbh, 16);
+               memcpy(xbh, &channel[xbaddr].lo64, 16);
                xbh += 16;
        }
-       bcopy(&xbo_framesize, xbh, 8);
+       memcpy(xbh, &xbo_framesize, 8);
        s = splnet();
        if (IF_QFULL(&ifp->if_snd)) {
                IF_DROP(&ifp->if_snd);
@@ -674,14 +674,14 @@
                /* See function intro comment regarding padding */
                if (leftover_len + len < sizeof leftover) {
                        /* Heh, not even enough to write out */
-                       bcopy(blk, XFERADJ(), len);
+                       memcpy(XFERADJ(), blk, len);
                        leftover_len += len;
                        return 1;
                }
                xfertmp[0] = leftover[0];
                xfertmp[1] = leftover[1];
                fillin = sizeof leftover - leftover_len;
-               bcopy(blk, XFERADJ(), fillin);
+               memcpy(XFERADJ(), blk, fillin);
                blk += fillin;
                len -= fillin;
                xb_mcrp_write(xfertmp, 1, 0);
@@ -700,7 +700,7 @@
                        full = 1;
                }
                frag_len &= ~0xf;
-               bcopy(blk, xfertmp, frag_len);
+               memcpy(xfertmp, blk, frag_len);
                frag_len >>= 4;         /* Round down to switch word size */
                xb_mcrp_write(xfertmp, frag_len, 0);
                fifo_free -= frag_len;
@@ -712,7 +712,7 @@
                        goto restart;
                }
        }
-       bcopy(blk, leftover, len);
+       memcpy(leftover, blk, len);
        leftover_len = len;
        return 1;
 }
diff -r 9afd532c63d4 -r d743c899068b sys/arch/alpha/alpha/autoconf.c
--- a/sys/arch/alpha/alpha/autoconf.c   Thu Jul 12 23:26:30 2001 +0000
+++ b/sys/arch/alpha/alpha/autoconf.c   Thu Jul 12 23:35:42 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.37 2000/06/03 20:47:36 thorpej Exp $ */
+/* $NetBSD: autoconf.c,v 1.38 2001/07/12 23:35:42 thorpej Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -46,7 +46,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.37 2000/06/03 20:47:36 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.38 2001/07/12 23:35:42 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -121,7 +121,7 @@
        booted_partition = 0;
        bootdev_data = NULL;
 
-       bcopy(bootinfo.booted_dev, hacked_boot_dev,
+       memcpy(hacked_boot_dev, bootinfo.booted_dev,
            min(sizeof bootinfo.booted_dev, sizeof hacked_boot_dev));
 #if 0
        printf("parse_prom_bootdev: boot dev = \"%s\"\n", hacked_boot_dev);
diff -r 9afd532c63d4 -r d743c899068b sys/arch/alpha/alpha/compat_13_machdep.c
--- a/sys/arch/alpha/alpha/compat_13_machdep.c  Thu Jul 12 23:26:30 2001 +0000
+++ b/sys/arch/alpha/alpha/compat_13_machdep.c  Thu Jul 12 23:35:42 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compat_13_machdep.c,v 1.9 2000/12/22 22:58:52 jdolecek Exp $ */
+/* $NetBSD: compat_13_machdep.c,v 1.10 2001/07/12 23:35:42 thorpej Exp $ */
 
 /*
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.9 2000/12/22 22:58:52 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: compat_13_machdep.c,v 1.10 2001/07/12 23:35:42 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -94,7 +94,7 @@
        /* XXX ksc.sc_ownedfp ? */
        if (p->p_addr->u_pcb.pcb_fpcpu != NULL)
                fpusave_proc(p, 0);
-       bcopy((struct fpreg *)ksc.sc_fpregs, &p->p_addr->u_pcb.pcb_fp,
+       memcpy(&p->p_addr->u_pcb.pcb_fp, (struct fpreg *)ksc.sc_fpregs,
            sizeof(struct fpreg));
        /* XXX ksc.sc_fp_control ? */
 
diff -r 9afd532c63d4 -r d743c899068b sys/arch/alpha/alpha/machdep.c
--- a/sys/arch/alpha/alpha/machdep.c    Thu Jul 12 23:26:30 2001 +0000
+++ b/sys/arch/alpha/alpha/machdep.c    Thu Jul 12 23:35:42 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.246 2001/07/12 23:25:39 thorpej Exp $ */
+/* $NetBSD: machdep.c,v 1.247 2001/07/12 23:35:42 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.246 2001/07/12 23:25:39 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.247 2001/07/12 23:35:42 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -282,10 +282,10 @@
                                bootinfo.hwrpb_size =
                                    ((struct rpb *)HWRPB_ADDR)->rpb_size;
                        }
-                       bcopy(v1p->boot_flags, bootinfo.boot_flags,
+                       memcpy(bootinfo.boot_flags, v1p->boot_flags,
                            min(sizeof v1p->boot_flags,



Home | Main Index | Thread Index | Old Index