diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2001-08-18 21:59:49 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2001-08-18 21:59:49 +0000 |
commit | b1e41d29b9fa3b3ad468fb118890930df7d98de1 (patch) | |
tree | 8689f054ba917348896fb5b8253f17ec75374805 | |
parent | 0f96b4dc9153270feb54bf3509bd20b2d8038cab (diff) |
Some NBPG to PAGE_SIZE conversions.
-rw-r--r-- | sys/arch/powerpc/powerpc/dma.c | 6 | ||||
-rw-r--r-- | sys/arch/powerpc/powerpc/opendev.c | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/sys/arch/powerpc/powerpc/dma.c b/sys/arch/powerpc/powerpc/dma.c index b6b1875fd61..cd417021b47 100644 --- a/sys/arch/powerpc/powerpc/dma.c +++ b/sys/arch/powerpc/powerpc/dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dma.c,v 1.9 2001/08/01 23:53:09 pvalchev Exp $ */ +/* $OpenBSD: dma.c,v 1.10 2001/08/18 21:59:48 drahn Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -167,7 +167,7 @@ _dmamap_load(t, map, buf, buflen, p, flags) /* * Compute the segment size, and adjust counts. */ - sgsize = NBPG - ((u_long)vaddr & PGOFSET); + sgsize = PAGE_SIZE - ((u_long)vaddr & PGOFSET); if (buflen < sgsize) sgsize = buflen; @@ -370,7 +370,7 @@ _dmamem_map(t, segs, nsegs, size, kvap, flags) for (curseg = 0; curseg < nsegs; curseg++) { for (addr = segs[curseg].ds_addr; addr < (segs[curseg].ds_addr + segs[curseg].ds_len); - addr += NBPG, va += NBPG, size -= NBPG) { + addr += PAGE_SIZE, va += PAGE_SIZE, size -= PAGE_SIZE) { if (size == 0) panic("_bus_dmamem_map: size botch"); pmap_enter(pmap_kernel(), va, addr, diff --git a/sys/arch/powerpc/powerpc/opendev.c b/sys/arch/powerpc/powerpc/opendev.c index 5c880293c5b..f8f72452ccd 100644 --- a/sys/arch/powerpc/powerpc/opendev.c +++ b/sys/arch/powerpc/powerpc/opendev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: opendev.c,v 1.4 2001/07/01 04:34:24 drahn Exp $ */ +/* $OpenBSD: opendev.c,v 1.5 2001/08/18 21:59:48 drahn Exp $ */ /* $NetBSD: openfirm.c,v 1.1 1996/09/30 16:34:52 ws Exp $ */ /* @@ -86,7 +86,7 @@ OF_package_to_path(phandle, buf, buflen) }; ofw_stack(); - if (buflen > NBPG) + if (buflen > PAGE_SIZE) return -1; args.phandle = phandle; args.buf = OF_buf; @@ -206,7 +206,7 @@ OF_open(dname) int l; ofw_stack(); - if ((l = strlen(dname)) >= NBPG) + if ((l = strlen(dname)) >= PAGE_SIZE) return -1; ofbcopy(dname, OF_buf, l + 1); args.dname = OF_buf; @@ -236,7 +236,7 @@ OF_close(handle) } /* - * This assumes that character devices don't read in multiples of NBPG. + * This assumes that character devices don't read in multiples of PAGE_SIZE. */ int OF_read(handle, addr, len) @@ -263,7 +263,7 @@ OF_read(handle, addr, len) args.ihandle = handle; args.addr = OF_buf; for (; len > 0; len -= l, addr += l) { - l = min(NBPG, len); + l = min(PAGE_SIZE, len); args.len = l; if (openfirmware(&args) == -1) return -1; @@ -307,7 +307,7 @@ OF_write(handle, addr, len) args.ihandle = handle; args.addr = OF_buf; for (; len > 0; len -= l, addr += l) { - l = min(NBPG, len); + l = min(PAGE_SIZE, len); ofbcopy(addr, OF_buf, l); args.len = l; if (openfirmware(&args) == -1) |