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/9c86bcadc31d
branches: trunk
changeset: 499207:9c86bcadc31d
user: thorpej <thorpej%NetBSD.org@localhost>
date: Tue Nov 14 18:42:55 2000 +0000
description:
NBPG -> PAGE_SIZE
diffstat:
sys/dev/i2o/iop.c | 8 +++++---
sys/dev/isapnp/if_le_isapnp.c | 6 ++++--
sys/dev/pci/auvia.c | 8 +++++---
sys/dev/pci/fms.c | 8 +++++---
sys/dev/pci/if_de.c | 8 ++++----
sys/dev/pci/if_le_pci.c | 6 ++++--
sys/dev/pci/if_lmc.c | 6 +++---
sys/dev/pci/if_ti.c | 8 +++++---
sys/dev/pci/if_tireg.h | 4 ++--
sys/dev/pci/isp_pci.c | 13 ++++++++-----
sys/dev/pci/pciide.c | 4 +++-
sys/dev/pci/pciidereg.h | 4 ++--
sys/dev/pci/pcscp.c | 6 ++++--
sys/dev/pci/twe.c | 7 ++++---
sys/dev/pci/twereg.h | 4 ++--
sys/dev/pci/twevar.h | 3 ++-
16 files changed, 62 insertions(+), 41 deletions(-)
diffs (truncated from 436 to 300 lines):
diff -r d6bb40039e73 -r 9c86bcadc31d sys/dev/i2o/iop.c
--- a/sys/dev/i2o/iop.c Tue Nov 14 18:35:10 2000 +0000
+++ b/sys/dev/i2o/iop.c Tue Nov 14 18:42:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iop.c,v 1.3 2000/11/09 17:20:24 itojun Exp $ */
+/* $NetBSD: iop.c,v 1.4 2000/11/14 18:48:14 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -53,6 +53,8 @@
#include <sys/endian.h>
#include <sys/pool.h>
+#include <uvm/uvm_extern.h>
+
#include <machine/bus.h>
#include <dev/i2o/i2o.h>
@@ -508,7 +510,7 @@
int rseg, rv;
bus_dma_segment_t seg;
- if ((rv = bus_dmamem_alloc(sc->sc_dmat, size, NBPG, 0,
+ if ((rv = bus_dmamem_alloc(sc->sc_dmat, size, PAGE_SIZE, 0,
&seg, 1, &rseg, BUS_DMA_NOWAIT)) != 0) {
printf("%s: dmamem_alloc = %d\n", sc->sc_dv.dv_xname, rv);
return (rv);
@@ -556,7 +558,7 @@
mb->msgfunc = I2O_MSGFUNC(I2O_TID_IOP, I2O_EXEC_OUTBOUND_INIT);
mb->msgictx = IOP_ICTX;
mb->msgtctx = im->im_tctx;
- mb->pagesize = NBPG;
+ mb->pagesize = PAGE_SIZE;
mb->flags = 0x80 | ((IOP_MAX_MSG_SIZE >> 2) << 16);
status = 0;
diff -r d6bb40039e73 -r 9c86bcadc31d sys/dev/isapnp/if_le_isapnp.c
--- a/sys/dev/isapnp/if_le_isapnp.c Tue Nov 14 18:35:10 2000 +0000
+++ b/sys/dev/isapnp/if_le_isapnp.c Tue Nov 14 18:42:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_le_isapnp.c,v 1.17 1999/03/22 10:00:11 mycroft Exp $ */
+/* $NetBSD: if_le_isapnp.c,v 1.18 2000/11/14 18:46:36 thorpej Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -81,6 +81,8 @@
#include <sys/select.h>
#include <sys/device.h>
+#include <uvm/uvm_extern.h>
+
#include <net/if.h>
#include <net/if_dl.h>
#include <net/if_ether.h>
@@ -212,7 +214,7 @@
/*
* Allocate a DMA area for the card.
*/
- if (bus_dmamem_alloc(dmat, LE_ISAPNP_MEMSIZE, NBPG, 0, &seg, 1,
+ if (bus_dmamem_alloc(dmat, LE_ISAPNP_MEMSIZE, PAGE_SIZE, 0, &seg, 1,
&rseg, BUS_DMA_NOWAIT)) {
printf("%s: couldn't allocate memory for card\n",
sc->sc_dev.dv_xname);
diff -r d6bb40039e73 -r 9c86bcadc31d sys/dev/pci/auvia.c
--- a/sys/dev/pci/auvia.c Tue Nov 14 18:35:10 2000 +0000
+++ b/sys/dev/pci/auvia.c Tue Nov 14 18:42:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: auvia.c,v 1.5 2000/09/01 00:02:04 jdolecek Exp $ */
+/* $NetBSD: auvia.c,v 1.6 2000/11/14 18:42:55 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -52,6 +52,8 @@
#include <sys/device.h>
#include <sys/audioio.h>
+#include <uvm/uvm_extern.h>
+
#include <dev/pci/pcidevs.h>
#include <dev/pci/pcivar.h>
@@ -700,8 +702,8 @@
return 0;
p->size = size;
- if ((error = bus_dmamem_alloc(sc->sc_dmat, size, NBPG, 0, &p->seg, 1,
- &rseg, BUS_DMA_NOWAIT)) != 0) {
+ if ((error = bus_dmamem_alloc(sc->sc_dmat, size, PAGE_SIZE, 0, &p->seg,
+ 1, &rseg, BUS_DMA_NOWAIT)) != 0) {
printf("%s: unable to allocate dma, error = %d\n",
sc->sc_dev.dv_xname, error);
goto fail_alloc;
diff -r d6bb40039e73 -r 9c86bcadc31d sys/dev/pci/fms.c
--- a/sys/dev/pci/fms.c Tue Nov 14 18:35:10 2000 +0000
+++ b/sys/dev/pci/fms.c Tue Nov 14 18:42:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fms.c,v 1.6 2000/06/26 04:56:24 simonb Exp $ */
+/* $NetBSD: fms.c,v 1.7 2000/11/14 18:42:55 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -47,6 +47,8 @@
#include <sys/device.h>
#include <sys/audioio.h>
+#include <uvm/uvm_extern.h>
+
#include <machine/bus.h>
#include <machine/cpu.h>
@@ -763,8 +765,8 @@
return 0;
p->size = size;
- if ((error = bus_dmamem_alloc(sc->sc_dmat, size, NBPG, 0, &p->seg, 1,
- &rseg, BUS_DMA_NOWAIT)) != 0) {
+ if ((error = bus_dmamem_alloc(sc->sc_dmat, size, PAGE_SIZE, 0, &p->seg,
+ 1, &rseg, BUS_DMA_NOWAIT)) != 0) {
printf("%s: unable to allocate dma, error = %d\n",
sc->sc_dev.dv_xname, error);
goto fail_alloc;
diff -r d6bb40039e73 -r 9c86bcadc31d sys/dev/pci/if_de.c
--- a/sys/dev/pci/if_de.c Tue Nov 14 18:35:10 2000 +0000
+++ b/sys/dev/pci/if_de.c Tue Nov 14 18:42:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_de.c,v 1.93 2000/09/28 10:29:42 tsutsui Exp $ */
+/* $NetBSD: if_de.c,v 1.94 2000/11/14 18:42:55 thorpej Exp $ */
/*-
* Copyright (c) 1994-1997 Matt Thomas (matt%3am-software.com@localhost)
@@ -4464,7 +4464,7 @@
do {
int len = m0->m_len;
caddr_t addr = mtod(m0, caddr_t);
- unsigned clsize = NBPG - (((u_long) addr) & PGOFSET);
+ unsigned clsize = PAGE_SIZE - (((u_long) addr) & PAGE_MASK);
while (len > 0) {
unsigned slen = min(len, clsize);
@@ -4526,7 +4526,7 @@
if (partial)
continue;
#endif
- clsize = NBPG;
+ clsize = PAGE_SIZE;
}
} while ((m0 = m0->m_next) != NULL);
#endif /* TULIP_BUS_DMA */
@@ -5175,7 +5175,7 @@
{
bus_dma_segment_t segs[1];
int nsegs, error;
- error = bus_dmamem_alloc(sc->tulip_dmatag, size, 1, NBPG,
+ error = bus_dmamem_alloc(sc->tulip_dmatag, size, 1, PAGE_SIZE,
segs, sizeof(segs)/sizeof(segs[0]),
&nsegs, BUS_DMA_NOWAIT);
if (error == 0) {
diff -r d6bb40039e73 -r 9c86bcadc31d sys/dev/pci/if_le_pci.c
--- a/sys/dev/pci/if_le_pci.c Tue Nov 14 18:35:10 2000 +0000
+++ b/sys/dev/pci/if_le_pci.c Tue Nov 14 18:42:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_le_pci.c,v 1.28 2000/06/28 16:08:44 mrg Exp $ */
+/* $NetBSD: if_le_pci.c,v 1.29 2000/11/14 18:42:56 thorpej Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -85,6 +85,8 @@
#include <sys/socket.h>
#include <sys/device.h>
+#include <uvm/uvm_extern.h>
+
#include <net/if.h>
#include <net/if_ether.h>
#include <net/if_media.h>
@@ -309,7 +311,7 @@
/*
* Allocate a DMA area for the card.
*/
- if (bus_dmamem_alloc(dmat, LE_PCI_MEMSIZE, NBPG, 0, &seg, 1,
+ if (bus_dmamem_alloc(dmat, LE_PCI_MEMSIZE, PAGE_SIZE, 0, &seg, 1,
&rseg, BUS_DMA_NOWAIT)) {
printf("%s: couldn't allocate memory for card\n",
sc->sc_dev.dv_xname);
diff -r d6bb40039e73 -r 9c86bcadc31d sys/dev/pci/if_lmc.c
--- a/sys/dev/pci/if_lmc.c Tue Nov 14 18:35:10 2000 +0000
+++ b/sys/dev/pci/if_lmc.c Tue Nov 14 18:42:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_lmc.c,v 1.5 2000/06/28 16:08:44 mrg Exp $ */
+/* $NetBSD: if_lmc.c,v 1.6 2000/11/14 18:42:56 thorpej Exp $ */
/*-
* Copyright (c) 1997-1999 LAN Media Corporation (LMC)
@@ -948,7 +948,7 @@
do {
int len = m0->m_len;
caddr_t addr = mtod(m0, caddr_t);
- unsigned clsize = NBPG - (((u_long) addr) & PGOFSET);
+ unsigned clsize = PAGE_SIZE - (((u_long) addr) & PAGE_MASK);
while (len > 0) {
unsigned slen = min(len, clsize);
@@ -1013,7 +1013,7 @@
if (partial)
continue;
#endif
- clsize = NBPG;
+ clsize = PAGE_SIZE;
}
} while ((m0 = m0->m_next) != NULL);
diff -r d6bb40039e73 -r 9c86bcadc31d sys/dev/pci/if_ti.c
--- a/sys/dev/pci/if_ti.c Tue Nov 14 18:35:10 2000 +0000
+++ b/sys/dev/pci/if_ti.c Tue Nov 14 18:42:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ti.c,v 1.12 2000/11/12 18:32:43 bouyer Exp $ */
+/* $NetBSD: if_ti.c,v 1.13 2000/11/14 18:42:57 thorpej Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -95,6 +95,8 @@
#include <sys/device.h>
#include <sys/reboot.h>
+#include <uvm/uvm_extern.h>
+
#include <net/if.h>
#include <net/if_arp.h>
#include <net/if_ether.h>
@@ -587,7 +589,7 @@
/* Grab a big chunk o' storage. */
if ((error = bus_dmamem_alloc(sc->sc_dmat,
- TI_JMEM, NBPG, 0, &dmaseg, 1, &dmanseg,
+ TI_JMEM, PAGE_SIZE, 0, &dmaseg, 1, &dmanseg,
BUS_DMA_NOWAIT)) != 0) {
printf("%s: can't allocate jumbo buffer, error = %d\n",
sc->sc_dev.dv_xname, error);
@@ -1743,7 +1745,7 @@
/* Allocate the general information block and ring buffers. */
if ((error = bus_dmamem_alloc(sc->sc_dmat,
- sizeof(struct ti_ring_data), NBPG, 0, &dmaseg, 1, &dmanseg,
+ sizeof(struct ti_ring_data), PAGE_SIZE, 0, &dmaseg, 1, &dmanseg,
BUS_DMA_NOWAIT)) != 0) {
printf("%s: can't allocate ring buffer, error = %d\n",
sc->sc_dev.dv_xname, error);
diff -r d6bb40039e73 -r 9c86bcadc31d sys/dev/pci/if_tireg.h
--- a/sys/dev/pci/if_tireg.h Tue Nov 14 18:35:10 2000 +0000
+++ b/sys/dev/pci/if_tireg.h Tue Nov 14 18:42:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_tireg.h,v 1.1 1999/09/01 11:47:46 drochner Exp $ */
+/* $NetBSD: if_tireg.h,v 1.2 2000/11/14 18:42:57 thorpej Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -997,7 +997,7 @@
#define TI_JRAWLEN (TI_JUMBO_FRAMELEN + ETHER_ALIGN + sizeof(u_int64_t))
#define TI_JLEN (TI_JRAWLEN + (sizeof(u_int64_t) - \
(TI_JRAWLEN % sizeof(u_int64_t))))
-#define TI_JPAGESZ NBPG
+#define TI_JPAGESZ PAGE_SIZE
#define TI_RESID (TI_JPAGESZ - (TI_JLEN * TI_JSLOTS) % TI_JPAGESZ)
#define TI_JMEM ((TI_JLEN * TI_JSLOTS) + TI_RESID)
diff -r d6bb40039e73 -r 9c86bcadc31d sys/dev/pci/isp_pci.c
--- a/sys/dev/pci/isp_pci.c Tue Nov 14 18:35:10 2000 +0000
+++ b/sys/dev/pci/isp_pci.c Tue Nov 14 18:42:55 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isp_pci.c,v 1.58 2000/10/17 17:39:10 mjacob Exp $ */
+/* $NetBSD: isp_pci.c,v 1.59 2000/11/14 18:42:57 thorpej Exp $ */
/*
* This driver, which is contained in NetBSD in the files:
*
@@ -747,7 +747,7 @@
return (1);
}
for (i = 0; i < isp->isp_maxcmds; i++) {
- if (bus_dmamap_create(dmat, MAXPHYS, (MAXPHYS / NBPG) + 1,
+ if (bus_dmamap_create(dmat, MAXPHYS, (MAXPHYS / PAGE_SIZE) + 1,
MAXPHYS, 0, BUS_DMA_NOWAIT, &pcs->pci_xfer_dmap[i])) {
isp_prt(isp, ISP_LOGERR, "cannot create dma maps");
break;
@@ -768,7 +768,8 @@
* Allocate and map the request queue.
*/
len = ISP_QUEUE_SIZE(RQUEST_QUEUE_LEN(isp));
- if (bus_dmamem_alloc(dmat, len, NBPG, 0, &sg, 1, &rs, BUS_DMA_NOWAIT) ||
+ if (bus_dmamem_alloc(dmat, len, PAGE_SIZE, 0, &sg, 1, &rs,
+ BUS_DMA_NOWAIT) ||
bus_dmamem_map(pcs->pci_dmat, &sg, rs, len,
(caddr_t *)&isp->isp_rquest, BUS_DMA_NOWAIT|BUS_DMA_COHERENT)) {
goto dmafail;
@@ -787,7 +788,8 @@
* Allocate and map the result queue.
*/
len = ISP_QUEUE_SIZE(RESULT_QUEUE_LEN(isp));
- if (bus_dmamem_alloc(dmat, len, NBPG, 0, &sg, 1, &rs, BUS_DMA_NOWAIT) ||
+ if (bus_dmamem_alloc(dmat, len, PAGE_SIZE, 0, &sg, 1, &rs,
+ BUS_DMA_NOWAIT) ||
Home |
Main Index |
Thread Index |
Old Index