Module Name: src
Committed By: matt
Date: Thu Jan 14 00:37:27 UTC 2010
Modified Files:
src/sys/arch/algor/isa [matt-nb5-mips64]: isadma_bounce.c
src/sys/arch/arc/arc [matt-nb5-mips64]: bus_dma.c
src/sys/arch/arc/isa [matt-nb5-mips64]: isadma_bounce.c
src/sys/arch/mipsco/mipsco [matt-nb5-mips64]: bus_dma.c
src/sys/arch/newsmips/newsmips [matt-nb5-mips64]: bus.c
locore_machdep.S
src/sys/arch/sbmips/conf [matt-nb5-mips64]: files.sbmips
src/sys/arch/sgimips/sgimips [matt-nb5-mips64]: bus.c
Added Files:
src/sys/arch/sbmips/include [matt-nb5-mips64]: bus.h
Log Message:
Deal with various changes with avail_end and avail_start, etc.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.18.1 src/sys/arch/algor/isa/isadma_bounce.c
cvs rdiff -u -r1.30 -r1.30.16.1 src/sys/arch/arc/arc/bus_dma.c
cvs rdiff -u -r1.11 -r1.11.18.1 src/sys/arch/arc/isa/isadma_bounce.c
cvs rdiff -u -r1.22 -r1.22.16.1 src/sys/arch/mipsco/mipsco/bus_dma.c
cvs rdiff -u -r1.28.16.1 -r1.28.16.2 src/sys/arch/newsmips/newsmips/bus.c
cvs rdiff -u -r1.14 -r1.14.96.1 \
src/sys/arch/newsmips/newsmips/locore_machdep.S
cvs rdiff -u -r1.14 -r1.14.28.1 src/sys/arch/sbmips/conf/files.sbmips
cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/sbmips/include/bus.h
cvs rdiff -u -r1.55.16.2 -r1.55.16.3 src/sys/arch/sgimips/sgimips/bus.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/algor/isa/isadma_bounce.c
diff -u src/sys/arch/algor/isa/isadma_bounce.c:1.8 src/sys/arch/algor/isa/isadma_bounce.c:1.8.18.1
--- src/sys/arch/algor/isa/isadma_bounce.c:1.8 Mon Apr 28 20:23:10 2008
+++ src/sys/arch/algor/isa/isadma_bounce.c Thu Jan 14 00:37:27 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: isadma_bounce.c,v 1.8 2008/04/28 20:23:10 martin Exp $ */
+/* $NetBSD: isadma_bounce.c,v 1.8.18.1 2010/01/14 00:37:27 matt Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isadma_bounce.c,v 1.8 2008/04/28 20:23:10 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isadma_bounce.c,v 1.8.18.1 2010/01/14 00:37:27 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -52,8 +52,6 @@
#include <uvm/uvm_extern.h>
-extern paddr_t avail_end;
-
/*
* Cookie used by bouncing ISA DMA. A pointer to one of these is stashed
* in the DMA map.
@@ -138,7 +136,7 @@
* ISA DMA controller), we may have to bounce it as well.
*/
cookieflags = 0;
- if (avail_end > (t->_wbase + t->_wsize) ||
+ if (mips_avail_end > (t->_wbase + t->_wsize) ||
((map->_dm_size / PAGE_SIZE) + 1) > map->_dm_segcnt) {
cookieflags |= ID_MIGHT_NEED_BOUNCE;
cookiesize += (sizeof(bus_dma_segment_t) *
@@ -540,10 +538,10 @@
{
paddr_t high;
- if (avail_end > ISA_DMA_BOUNCE_THRESHOLD)
+ if (mips_avail_end > ISA_DMA_BOUNCE_THRESHOLD)
high = trunc_page(ISA_DMA_BOUNCE_THRESHOLD);
else
- high = trunc_page(avail_end);
+ high = trunc_page(mips_avail_end);
return (_bus_dmamem_alloc_range(t, size, alignment, boundary,
segs, nsegs, rsegs, flags, 0, high));
Index: src/sys/arch/arc/arc/bus_dma.c
diff -u src/sys/arch/arc/arc/bus_dma.c:1.30 src/sys/arch/arc/arc/bus_dma.c:1.30.16.1
--- src/sys/arch/arc/arc/bus_dma.c:1.30 Wed Jun 4 12:41:40 2008
+++ src/sys/arch/arc/arc/bus_dma.c Thu Jan 14 00:37:27 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.30 2008/06/04 12:41:40 ad Exp $ */
+/* $NetBSD: bus_dma.c,v 1.30.16.1 2010/01/14 00:37:27 matt Exp $ */
/* NetBSD: bus_dma.c,v 1.20 2000/01/10 03:24:36 simonb Exp */
/*-
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.30 2008/06/04 12:41:40 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.30.16.1 2010/01/14 00:37:27 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -53,8 +53,6 @@
void *, bus_size_t, struct vmspace *, int, paddr_t *,
int *, int);
-extern paddr_t avail_start, avail_end; /* from pmap.c */
-
void
_bus_dma_tag_init(bus_dma_tag_t t)
{
@@ -555,7 +553,8 @@
{
return _bus_dmamem_alloc_range(t, size, alignment, boundary,
- segs, nsegs, rsegs, flags, avail_start, trunc_page(avail_end));
+ segs, nsegs, rsegs, flags, mips_avail_start,
+ trunc_page(mips_avail_end));
}
/*
@@ -575,7 +574,7 @@
/* 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.
@@ -599,7 +598,7 @@
for (; m != NULL; m = TAILQ_NEXT(m, pageq.queue)) {
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%llx\n", (long long)curaddr);
panic("_bus_dmamem_alloc_range");
Index: src/sys/arch/arc/isa/isadma_bounce.c
diff -u src/sys/arch/arc/isa/isadma_bounce.c:1.11 src/sys/arch/arc/isa/isadma_bounce.c:1.11.18.1
--- src/sys/arch/arc/isa/isadma_bounce.c:1.11 Mon Apr 28 20:23:13 2008
+++ src/sys/arch/arc/isa/isadma_bounce.c Thu Jan 14 00:37:27 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: isadma_bounce.c,v 1.11 2008/04/28 20:23:13 martin Exp $ */
+/* $NetBSD: isadma_bounce.c,v 1.11.18.1 2010/01/14 00:37:27 matt Exp $ */
/* NetBSD: isadma_bounce.c,v 1.2 2000/06/01 05:49:36 thorpej Exp */
/*-
@@ -33,7 +33,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: isadma_bounce.c,v 1.11 2008/04/28 20:23:13 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isadma_bounce.c,v 1.11.18.1 2010/01/14 00:37:27 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -51,8 +51,6 @@
#include <uvm/uvm_extern.h>
-extern paddr_t avail_end; /* from pmap.c */
-
/*
* Cookie used by bouncing ISA DMA. A pointer to one of these is stashed
* in the DMA map.
@@ -174,7 +172,7 @@
* ISA DMA controller), we may have to bounce it as well.
*/
cookieflags = 0;
- if (avail_end > ISA_DMA_BOUNCE_THRESHOLD ||
+ if (mips_avail_end > ISA_DMA_BOUNCE_THRESHOLD ||
((map->_dm_size / PAGE_SIZE) + 1) > map->_dm_segcnt) {
cookieflags |= ID_MIGHT_NEED_BOUNCE;
cookiesize += (sizeof(bus_dma_segment_t) *
@@ -570,10 +568,10 @@
{
paddr_t high;
- if (avail_end > ISA_DMA_BOUNCE_THRESHOLD)
+ if (mips_avail_end > ISA_DMA_BOUNCE_THRESHOLD)
high = trunc_page(ISA_DMA_BOUNCE_THRESHOLD);
else
- high = trunc_page(avail_end);
+ high = trunc_page(mips_avail_end);
return _bus_dmamem_alloc_range(t, size, alignment, boundary,
segs, nsegs, rsegs, flags, 0, high);
Index: src/sys/arch/mipsco/mipsco/bus_dma.c
diff -u src/sys/arch/mipsco/mipsco/bus_dma.c:1.22 src/sys/arch/mipsco/mipsco/bus_dma.c:1.22.16.1
--- src/sys/arch/mipsco/mipsco/bus_dma.c:1.22 Wed Jun 4 12:41:41 2008
+++ src/sys/arch/mipsco/mipsco/bus_dma.c Thu Jan 14 00:37:27 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.c,v 1.22 2008/06/04 12:41:41 ad Exp $ */
+/* $NetBSD: bus_dma.c,v 1.22.16.1 2010/01/14 00:37:27 matt Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.22 2008/06/04 12:41:41 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.22.16.1 2010/01/14 00:37:27 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -52,8 +52,6 @@
void *, bus_size_t, struct vmspace *, int, paddr_t *,
int *, int));
-extern paddr_t avail_start, avail_end; /* from pmap.c */
-
void
_bus_dma_tag_init(t)
bus_dma_tag_t t;
@@ -543,7 +541,7 @@
{
return (_bus_dmamem_alloc_range(t, size, alignment, boundary,
- segs, nsegs, rsegs, flags, avail_start, trunc_page(avail_end)));
+ segs, nsegs, rsegs, flags, mips_avail_start, trunc_page(mips_avail_end)));
}
/*
@@ -570,7 +568,7 @@
/* 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.
@@ -594,7 +592,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%llx\n", (long long)curaddr);
panic("_bus_dmamem_alloc_range");
Index: src/sys/arch/newsmips/newsmips/bus.c
diff -u src/sys/arch/newsmips/newsmips/bus.c:1.28.16.1 src/sys/arch/newsmips/newsmips/bus.c:1.28.16.2
--- src/sys/arch/newsmips/newsmips/bus.c:1.28.16.1 Wed Aug 26 03:46:40 2009
+++ src/sys/arch/newsmips/newsmips/bus.c Thu Jan 14 00:37:26 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.c,v 1.28.16.1 2009/08/26 03:46:40 matt Exp $ */
+/* $NetBSD: bus.c,v 1.28.16.2 2010/01/14 00:37:26 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.28.16.1 2009/08/26 03:46:40 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.28.16.2 2010/01/14 00:37:26 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -701,7 +701,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;
@@ -711,12 +710,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;
@@ -734,7 +733,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/newsmips/newsmips/locore_machdep.S
diff -u src/sys/arch/newsmips/newsmips/locore_machdep.S:1.14 src/sys/arch/newsmips/newsmips/locore_machdep.S:1.14.96.1
--- src/sys/arch/newsmips/newsmips/locore_machdep.S:1.14 Sun Dec 11 12:18:25 2005
+++ src/sys/arch/newsmips/newsmips/locore_machdep.S Thu Jan 14 00:37:27 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: locore_machdep.S,v 1.14 2005/12/11 12:18:25 christos Exp $ */
+/* $NetBSD: locore_machdep.S,v 1.14.96.1 2010/01/14 00:37:27 matt Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -60,6 +60,8 @@
#include <machine/machConst.h>
#include <machine/param.h>
+#include "assym.h"
+
.set noreorder
LEAF(to_monitor)
Index: src/sys/arch/sbmips/conf/files.sbmips
diff -u src/sys/arch/sbmips/conf/files.sbmips:1.14 src/sys/arch/sbmips/conf/files.sbmips:1.14.28.1
--- src/sys/arch/sbmips/conf/files.sbmips:1.14 Wed Feb 20 21:43:35 2008
+++ src/sys/arch/sbmips/conf/files.sbmips Thu Jan 14 00:37:26 2010
@@ -1,4 +1,4 @@
-# $NetBSD: files.sbmips,v 1.14 2008/02/20 21:43:35 drochner Exp $
+# $NetBSD: files.sbmips,v 1.14.28.1 2010/01/14 00:37:26 matt Exp $
maxpartitions 8
@@ -16,6 +16,7 @@
file arch/mips/cfe/cfe_api.c
file arch/mips/mips/softintr.c
file arch/mips/mips/mips3_clock.c
+file arch/mips/mips/bus_dma.c
###
### MI device inclusion
Index: src/sys/arch/sgimips/sgimips/bus.c
diff -u src/sys/arch/sgimips/sgimips/bus.c:1.55.16.2 src/sys/arch/sgimips/sgimips/bus.c:1.55.16.3
--- src/sys/arch/sgimips/sgimips/bus.c:1.55.16.2 Mon Nov 23 18:28:47 2009
+++ src/sys/arch/sgimips/sgimips/bus.c Thu Jan 14 00:37:26 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.c,v 1.55.16.2 2009/11/23 18:28:47 matt Exp $ */
+/* $NetBSD: bus.c,v 1.55.16.3 2010/01/14 00:37:26 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.55.16.2 2009/11/23 18:28:47 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.55.16.3 2010/01/14 00:37:26 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1075,7 +1075,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;
@@ -1085,7 +1084,7 @@
/* Always round the size. */
size = round_page(size);
- high = avail_end - PAGE_SIZE;
+ high = mips_avail_end - PAGE_SIZE;
#if defined(_MIPS_PADDR_T_64BIT) || defined(_LP64)
/*
@@ -1100,7 +1099,7 @@
/*
* 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;
@@ -1118,7 +1117,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");
Added files:
Index: src/sys/arch/sbmips/include/bus.h
diff -u /dev/null src/sys/arch/sbmips/include/bus.h:1.1.2.1
--- /dev/null Thu Jan 14 00:37:27 2010
+++ src/sys/arch/sbmips/include/bus.h Thu Jan 14 00:37:26 2010
@@ -0,0 +1,10 @@
+/* $NetBSD: bus.h,v 1.1.2.1 2010/01/14 00:37:26 matt Exp $ */
+
+#ifndef _SBMIPS_BUS_H_
+#define _SBMIPS_BUS_H_
+#define _MIPS_NEED_BUS_DMA_BOUNCE
+
+#include <mips/bus_space.h>
+#include <mips/bus_dma.h>
+
+#endif /* _SBMIPS_BUS_H_ */