Module Name: src
Committed By: matt
Date: Thu Jan 14 00:44:02 UTC 2010
Modified Files:
src/sys/arch/cobalt/cobalt [matt-nb5-mips64]: bus.c
src/sys/arch/ews4800mips/ews4800mips [matt-nb5-mips64]: bus_dma.c
Log Message:
More avail_end/avail_start fallout.
To generate a diff of this commit:
cvs rdiff -u -r1.35.16.1 -r1.35.16.2 src/sys/arch/cobalt/cobalt/bus.c
cvs rdiff -u -r1.9 -r1.9.16.1 src/sys/arch/ews4800mips/ews4800mips/bus_dma.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/cobalt/cobalt/bus.c
diff -u src/sys/arch/cobalt/cobalt/bus.c:1.35.16.1 src/sys/arch/cobalt/cobalt/bus.c:1.35.16.2
--- src/sys/arch/cobalt/cobalt/bus.c:1.35.16.1 Wed Aug 26 03:46:39 2009
+++ src/sys/arch/cobalt/cobalt/bus.c Thu Jan 14 00:44:02 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.c,v 1.35.16.1 2009/08/26 03:46:39 matt Exp $ */
+/* $NetBSD: bus.c,v 1.35.16.2 2010/01/14 00:44:02 matt Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.35.16.1 2009/08/26 03:46:39 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.35.16.2 2010/01/14 00:44:02 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -595,7 +595,6 @@
bus_size_t boundary, bus_dma_segment_t *segs, int nsegs, int *rsegs,
int flags)
{
- extern paddr_t avail_start, avail_end;
vaddr_t curaddr, lastaddr;
psize_t high;
struct vm_page *m;
@@ -605,12 +604,12 @@
/* Always round the size. */
size = round_page(size);
- high = avail_end - PAGE_SIZE;
+ high = mips_avail_end - PAGE_SIZE;
/*
* Allocate pages from the VM system.
*/
- error = uvm_pglistalloc(size, avail_start, high, alignment, boundary,
+ error = uvm_pglistalloc(size, mips_avail_start, high, alignment, boundary,
&mlist, nsegs, (flags & BUS_DMA_NOWAIT) == 0);
if (error)
return error;
@@ -628,7 +627,7 @@
for (; m != NULL; m = m->pageq.queue.tqe_next) {
curaddr = VM_PAGE_TO_PHYS(m);
#ifdef DIAGNOSTIC
- if (curaddr < avail_start || curaddr >= high) {
+ if (curaddr < mips_avail_start || curaddr >= high) {
printf("uvm_pglistalloc returned non-sensical"
" address 0x%lx\n", curaddr);
panic("_bus_dmamem_alloc");
Index: src/sys/arch/ews4800mips/ews4800mips/bus_dma.c
diff -u src/sys/arch/ews4800mips/ews4800mips/bus_dma.c:1.9 src/sys/arch/ews4800mips/ews4800mips/bus_dma.c:1.9.16.1
--- src/sys/arch/ews4800mips/ews4800mips/bus_dma.c:1.9 Wed Jun 4 12:41:41 2008
+++ src/sys/arch/ews4800mips/ews4800mips/bus_dma.c Thu Jan 14 00:44:02 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.9 2008/06/04 12:41:41 ad Exp $ */
+/* $NetBSD: bus_dma.c,v 1.9.16.1 2010/01/14 00:44:02 matt Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.9 2008/06/04 12:41:41 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.9.16.1 2010/01/14 00:44:02 matt Exp $");
/* #define BUS_DMA_DEBUG */
#include <sys/param.h>
@@ -538,7 +538,6 @@
bus_size_t boundary, bus_dma_segment_t *segs, int nsegs, int *rsegs,
int flags)
{
- extern paddr_t avail_start, avail_end;
vaddr_t curaddr, lastaddr;
psize_t high;
struct vm_page *m;
@@ -548,12 +547,12 @@
/* Always round the size. */
size = round_page(size);
- high = avail_end - PAGE_SIZE;
+ high = mips_avail_end - PAGE_SIZE;
/*
* Allocate pages from the VM system.
*/
- error = uvm_pglistalloc(size, avail_start, high, alignment, boundary,
+ error = uvm_pglistalloc(size, mips_avail_start, high, alignment, boundary,
&mlist, nsegs, (flags & BUS_DMA_NOWAIT) == 0);
if (error)
return error;
@@ -571,7 +570,7 @@
for (; m != NULL; m = m->pageq.queue.tqe_next) {
curaddr = VM_PAGE_TO_PHYS(m);
#ifdef DIAGNOSTIC
- if (curaddr < avail_start || curaddr >= high) {
+ if (curaddr < mips_avail_start || curaddr >= high) {
printf("uvm_pglistalloc returned non-sensical"
" address 0x%lx\n", curaddr);
panic("_bus_dmamem_alloc");