Source-Changes-HG archive

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

[src/trunk]: src/sys/dev NBPG -> PAGE_SIZE



details:   https://anonhg.NetBSD.org/src/rev/3ed6f10ef3ba
branches:  trunk
changeset: 499205:3ed6f10ef3ba
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Nov 14 18:21:00 2000 +0000

description:
NBPG -> PAGE_SIZE

diffstat:

 sys/dev/eisa/ahb.c          |   6 ++++--
 sys/dev/ic/adv.c            |   5 +++--
 sys/dev/ic/adw.c            |   5 +++--
 sys/dev/ic/aha.c            |   6 ++++--
 sys/dev/ic/aic7xxx.c        |   4 ++--
 sys/dev/ic/bha.c            |   4 ++--
 sys/dev/ic/cac.c            |   6 ++++--
 sys/dev/ic/dpt.c            |  10 ++++++----
 sys/dev/ic/elinkxl.c        |   8 +++++---
 sys/dev/ic/lsi64854.c       |   6 ++++--
 sys/dev/ic/pdqvar.h         |   4 ++--
 sys/dev/ic/rtl81x9.c        |   6 ++++--
 sys/dev/ic/sgec.c           |   6 ++++--
 sys/dev/ic/siop.c           |  39 +++++++++++++++++++++------------------
 sys/dev/ic/siopvar_common.h |   4 ++--
 sys/dev/ic/smc83c170.c      |   8 +++++---
 sys/dev/ic/uha.c            |   6 ++++--
 sys/dev/isa/if_le_isa.c     |   6 ++++--
 sys/dev/isa/isadma.c        |   4 ++--
 sys/dev/isa/wds.c           |  16 +++++++++-------
 20 files changed, 94 insertions(+), 65 deletions(-)

diffs (truncated from 642 to 300 lines):

diff -r 49c2c5e8d1a5 -r 3ed6f10ef3ba sys/dev/eisa/ahb.c
--- a/sys/dev/eisa/ahb.c        Tue Nov 14 18:01:54 2000 +0000
+++ b/sys/dev/eisa/ahb.c        Tue Nov 14 18:21:00 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ahb.c,v 1.30 2000/07/12 21:15:33 thorpej Exp $ */
+/*     $NetBSD: ahb.c,v 1.31 2000/11/14 18:29:17 thorpej Exp $ */
 
 #include "opt_ddb.h"
 
@@ -73,6 +73,8 @@
 #include <sys/proc.h>
 #include <sys/user.h>
 
+#include <uvm/uvm_extern.h>
+
 #include <machine/bus.h>
 #include <machine/intr.h>
 
@@ -785,7 +787,7 @@
         * Allocate the ECBs.
         */
        if ((error = bus_dmamem_alloc(sc->sc_dmat, ECBSIZE,
-           NBPG, 0, &seg, 1, &rseg, BUS_DMA_NOWAIT)) != 0) {
+           PAGE_SIZE, 0, &seg, 1, &rseg, BUS_DMA_NOWAIT)) != 0) {
                printf("%s: unable to allocate ecbs, error = %d\n",
                    sc->sc_dev.dv_xname, error);
                return (error);
diff -r 49c2c5e8d1a5 -r 3ed6f10ef3ba sys/dev/ic/adv.c
--- a/sys/dev/ic/adv.c  Tue Nov 14 18:01:54 2000 +0000
+++ b/sys/dev/ic/adv.c  Tue Nov 14 18:21:00 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: adv.c,v 1.19 2000/08/11 21:31:19 tls Exp $     */
+/*     $NetBSD: adv.c,v 1.20 2000/11/14 18:21:00 thorpej Exp $ */
 
 /*
  * Generic driver for the Advanced Systems Inc. Narrow SCSI controllers
@@ -124,7 +124,8 @@
          * Allocate the control blocks.
          */
        if ((error = bus_dmamem_alloc(sc->sc_dmat, sizeof(struct adv_control),
-                          NBPG, 0, &seg, 1, &rseg, BUS_DMA_NOWAIT)) != 0) {
+                          PAGE_SIZE, 0, &seg, 1, &rseg,
+                          BUS_DMA_NOWAIT)) != 0) {
                printf("%s: unable to allocate control structures,"
                       " error = %d\n", sc->sc_dev.dv_xname, error);
                return (error);
diff -r 49c2c5e8d1a5 -r 3ed6f10ef3ba sys/dev/ic/adw.c
--- a/sys/dev/ic/adw.c  Tue Nov 14 18:01:54 2000 +0000
+++ b/sys/dev/ic/adw.c  Tue Nov 14 18:21:00 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: adw.c,v 1.25 2000/06/28 17:12:50 mrg Exp $  */
+/* $NetBSD: adw.c,v 1.26 2000/11/14 18:21:00 thorpej Exp $      */
 
 /*
  * Generic driver for the Advanced Systems Inc. SCSI controllers
@@ -122,7 +122,8 @@
          * Allocate the control structure.
          */
        if ((error = bus_dmamem_alloc(sc->sc_dmat, sizeof(struct adw_control),
-                          NBPG, 0, &seg, 1, &rseg, BUS_DMA_NOWAIT)) != 0) {
+                          PAGE_SIZE, 0, &seg, 1, &rseg,
+                          BUS_DMA_NOWAIT)) != 0) {
                printf("%s: unable to allocate control structures,"
                       " error = %d\n", sc->sc_dev.dv_xname, error);
                return (error);
diff -r 49c2c5e8d1a5 -r 3ed6f10ef3ba sys/dev/ic/aha.c
--- a/sys/dev/ic/aha.c  Tue Nov 14 18:01:54 2000 +0000
+++ b/sys/dev/ic/aha.c  Tue Nov 14 18:21:00 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aha.c,v 1.28 2000/03/30 12:45:28 augustss Exp $        */
+/*     $NetBSD: aha.c,v 1.29 2000/11/14 18:21:00 thorpej Exp $ */
 
 #include "opt_ddb.h"
 
@@ -74,6 +74,8 @@
 #include <sys/proc.h>
 #include <sys/user.h>
 
+#include <uvm/uvm_extern.h>
+
 #include <machine/bus.h>
 #include <machine/intr.h>
 
@@ -998,7 +1000,7 @@
         * Allocate the mailbox and control blocks.
         */
        if ((error = bus_dmamem_alloc(sc->sc_dmat, sizeof(struct aha_control),
-           NBPG, 0, &seg, 1, &rseg, BUS_DMA_NOWAIT)) != 0) {
+           PAGE_SIZE, 0, &seg, 1, &rseg, BUS_DMA_NOWAIT)) != 0) {
                printf("%s: unable to allocate control structures, "
                    "error = %d\n", sc->sc_dev.dv_xname, error);
                return (error);
diff -r 49c2c5e8d1a5 -r 3ed6f10ef3ba sys/dev/ic/aic7xxx.c
--- a/sys/dev/ic/aic7xxx.c      Tue Nov 14 18:01:54 2000 +0000
+++ b/sys/dev/ic/aic7xxx.c      Tue Nov 14 18:21:00 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aic7xxx.c,v 1.60 2000/08/11 21:31:19 tls Exp $ */
+/*     $NetBSD: aic7xxx.c,v 1.61 2000/11/14 18:21:01 thorpej Exp $     */
 
 /*
  * Generic driver for the aic7xxx based adaptec SCSI controllers
@@ -666,7 +666,7 @@
 {
        int error, level = 0;
 
-       if ((error = bus_dmamem_alloc(tag, size, NBPG, 0,
+       if ((error = bus_dmamem_alloc(tag, size, PAGE_SIZE, 0,
                        seg, 1, nseg, BUS_DMA_NOWAIT)) != 0) {
                printf("%s: failed to allocate DMA mem for %s, error = %d\n",
                        myname, what, error);
diff -r 49c2c5e8d1a5 -r 3ed6f10ef3ba sys/dev/ic/bha.c
--- a/sys/dev/ic/bha.c  Tue Nov 14 18:01:54 2000 +0000
+++ b/sys/dev/ic/bha.c  Tue Nov 14 18:21:00 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bha.c,v 1.38 2000/10/03 14:07:36 simonb Exp $  */
+/*     $NetBSD: bha.c,v 1.39 2000/11/14 18:21:01 thorpej Exp $ */
 
 #include "opt_ddb.h"
 #undef BHADIAG
@@ -1135,7 +1135,7 @@
         * Allocate the mailbox and control blocks.
         */
        if ((error = bus_dmamem_alloc(sc->sc_dmat, sizeof(struct bha_control),
-           NBPG, 0, &seg, 1, &rseg, BUS_DMA_NOWAIT)) != 0) {
+           PAGE_SIZE, 0, &seg, 1, &rseg, BUS_DMA_NOWAIT)) != 0) {
                printf("%s: unable to allocate control structures, "
                    "error = %d\n", sc->sc_dev.dv_xname, error);
                return (error);
diff -r 49c2c5e8d1a5 -r 3ed6f10ef3ba sys/dev/ic/cac.c
--- a/sys/dev/ic/cac.c  Tue Nov 14 18:01:54 2000 +0000
+++ b/sys/dev/ic/cac.c  Tue Nov 14 18:21:00 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cac.c,v 1.14 2000/11/08 19:20:35 ad Exp $      */
+/*     $NetBSD: cac.c,v 1.15 2000/11/14 18:21:01 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -51,6 +51,8 @@
 #include <sys/malloc.h>
 #include <sys/pool.h>
 
+#include <uvm/uvm_extern.h>
+
 #include <machine/bswap.h>
 #include <machine/bus.h>
 
@@ -103,7 +105,7 @@
 
         size = sizeof(struct cac_ccb) * CAC_MAX_CCBS;
 
-       if ((error = bus_dmamem_alloc(sc->sc_dmat, size, NBPG, 0, &seg, 1, 
+       if ((error = bus_dmamem_alloc(sc->sc_dmat, size, PAGE_SIZE, 0, &seg, 1, 
            &rseg, BUS_DMA_NOWAIT)) != 0) {
                printf("%s: unable to allocate CCBs, error = %d\n",
                    sc->sc_dv.dv_xname, error);
diff -r 49c2c5e8d1a5 -r 3ed6f10ef3ba sys/dev/ic/dpt.c
--- a/sys/dev/ic/dpt.c  Tue Nov 14 18:01:54 2000 +0000
+++ b/sys/dev/ic/dpt.c  Tue Nov 14 18:21:00 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dpt.c,v 1.23 2000/07/18 15:27:44 ad Exp $      */
+/*     $NetBSD: dpt.c,v 1.24 2000/11/14 18:21:01 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -55,7 +55,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.23 2000/07/18 15:27:44 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dpt.c,v 1.24 2000/11/14 18:21:01 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -66,6 +66,8 @@
 #include <sys/buf.h>
 #include <sys/endian.h>
 
+#include <uvm/uvm_extern.h>
+
 #include <machine/bswap.h>
 #include <machine/bus.h>
 
@@ -217,8 +219,8 @@
        sc->sc_dmamapsize = sc->sc_nccbs * sizeof(struct dpt_ccb) + 
            sc->sc_scrlen + sizeof(struct eata_sp);
                
-       if ((error = bus_dmamem_alloc(sc->sc_dmat, sc->sc_dmamapsize, NBPG, 0, 
-           &seg, 1, &rseg, BUS_DMA_NOWAIT)) != 0) {
+       if ((error = bus_dmamem_alloc(sc->sc_dmat, sc->sc_dmamapsize,
+           PAGE_SIZE, 0, &seg, 1, &rseg, BUS_DMA_NOWAIT)) != 0) {
                printf("%s: unable to allocate CCBs, error = %d\n",
                    sc->sc_dv.dv_xname, error);
                return;
diff -r 49c2c5e8d1a5 -r 3ed6f10ef3ba sys/dev/ic/elinkxl.c
--- a/sys/dev/ic/elinkxl.c      Tue Nov 14 18:01:54 2000 +0000
+++ b/sys/dev/ic/elinkxl.c      Tue Nov 14 18:21:00 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: elinkxl.c,v 1.43 2000/10/17 16:16:52 bouyer Exp $      */
+/*     $NetBSD: elinkxl.c,v 1.44 2000/11/14 18:21:01 thorpej Exp $     */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -56,6 +56,8 @@
 #include <sys/rnd.h>
 #endif
 
+#include <uvm/uvm_extern.h>
+
 #include <net/if.h>
 #include <net/if_dl.h>
 #include <net/if_ether.h>
@@ -232,7 +234,7 @@
         * map for them.
         */
        if ((error = bus_dmamem_alloc(sc->sc_dmat,
-           EX_NUPD * sizeof (struct ex_upd), NBPG, 0, &sc->sc_useg, 1, 
+           EX_NUPD * sizeof (struct ex_upd), PAGE_SIZE, 0, &sc->sc_useg, 1, 
             &sc->sc_urseg, BUS_DMA_NOWAIT)) != 0) {
                printf("%s: can't allocate upload descriptors, error = %d\n",
                    sc->sc_dev.dv_xname, error);
@@ -277,7 +279,7 @@
         * map for them.
         */
        if ((error = bus_dmamem_alloc(sc->sc_dmat,
-           EX_NDPD * sizeof (struct ex_dpd), NBPG, 0, &sc->sc_dseg, 1, 
+           EX_NDPD * sizeof (struct ex_dpd), PAGE_SIZE, 0, &sc->sc_dseg, 1, 
            &sc->sc_drseg, BUS_DMA_NOWAIT)) != 0) {
                printf("%s: can't allocate download descriptors, error = %d\n",
                    sc->sc_dev.dv_xname, error);
diff -r 49c2c5e8d1a5 -r 3ed6f10ef3ba sys/dev/ic/lsi64854.c
--- a/sys/dev/ic/lsi64854.c     Tue Nov 14 18:01:54 2000 +0000
+++ b/sys/dev/ic/lsi64854.c     Tue Nov 14 18:21:00 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lsi64854.c,v 1.13 2000/10/31 08:06:14 eeh Exp $ */
+/*     $NetBSD: lsi64854.c,v 1.14 2000/11/14 18:21:02 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -44,6 +44,8 @@
 #include <sys/device.h>
 #include <sys/malloc.h>
 
+#include <uvm/uvm_extern.h>
+
 #include <machine/bus.h>
 #include <machine/autoconf.h>
 #include <machine/cpu.h>
@@ -304,7 +306,7 @@
                long bcnt = sc->sc_dmasize;
                long eaddr = bcnt + (long)*sc->sc_dmaaddr;
                if ((eaddr & PGOFSET) != 0)
-                       bcnt = roundup(bcnt, NBPG);
+                       bcnt = roundup(bcnt, PAGE_SIZE);
                bus_space_write_4(sc->sc_bustag, sc->sc_regs, L64854_REG_CNT,
                                  bcnt);
        }
diff -r 49c2c5e8d1a5 -r 3ed6f10ef3ba sys/dev/ic/pdqvar.h
--- a/sys/dev/ic/pdqvar.h       Tue Nov 14 18:01:54 2000 +0000
+++ b/sys/dev/ic/pdqvar.h       Tue Nov 14 18:21:00 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pdqvar.h,v 1.29 2000/06/28 17:13:02 mrg Exp $  */
+/*     $NetBSD: pdqvar.h,v 1.30 2000/11/14 18:21:02 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1995, 1996 Matt Thomas <matt%3am-software.com@localhost>
@@ -79,7 +79,7 @@
 #define        PDQ_OS_PREFIX                   "%s%d: "
 #define        PDQ_OS_PREFIX_ARGS              pdq->pdq_os_name, pdq->pdq_unit
 #endif
-#if defined(__FreeBSD__) && BSD >= 199506
+#if (defined(__FreeBSD__) && BSD >= 199506) || defined(__NetBSD__)
 #define        PDQ_OS_PAGESIZE                 PAGE_SIZE
 #else
 #define        PDQ_OS_PAGESIZE                 NBPG
diff -r 49c2c5e8d1a5 -r 3ed6f10ef3ba sys/dev/ic/rtl81x9.c
--- a/sys/dev/ic/rtl81x9.c      Tue Nov 14 18:01:54 2000 +0000
+++ b/sys/dev/ic/rtl81x9.c      Tue Nov 14 18:21:00 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtl81x9.c,v 1.16 2000/10/15 19:59:22 thorpej Exp $     */
+/*     $NetBSD: rtl81x9.c,v 1.17 2000/11/14 18:21:02 thorpej Exp $     */
 
 /*
  * Copyright (c) 1997, 1998
@@ -100,6 +100,8 @@
 #include <sys/kernel.h>
 #include <sys/socket.h>
 
+#include <uvm/uvm_extern.h>
+
 #include <net/if.h>
 #include <net/if_arp.h>
 #include <net/if_ether.h>
@@ -667,7 +669,7 @@
        eaddr[5] = val >> 8;
 
        if ((error = bus_dmamem_alloc(sc->sc_dmat,
-           RTK_RXBUFLEN + 32, NBPG, 0, &sc->sc_dmaseg, 1, &sc->sc_dmanseg,
+           RTK_RXBUFLEN + 32, PAGE_SIZE, 0, &sc->sc_dmaseg, 1, &sc->sc_dmanseg,
            BUS_DMA_NOWAIT)) != 0) {
                printf("%s: can't allocate recv buffer, error = %d\n",



Home | Main Index | Thread Index | Old Index