summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2004-11-19 17:56:22 +0000
committerscottl <scottl@FreeBSD.org>2004-11-19 17:56:22 +0000
commitf6f04e816f7aa1cd86b92a6123c523989250859f (patch)
tree9f0973be3bb429af36fc558027bb995334ec759d /sys/i386
parent34b1372302db893de7631a54497bcf488be42579 (diff)
downloadFreeBSD-src-f6f04e816f7aa1cd86b92a6123c523989250859f.zip
FreeBSD-src-f6f04e816f7aa1cd86b92a6123c523989250859f.tar.gz
Revert part of rev 1.57. The tag boundary is honored by splitting the
segment, not by bouncing.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/busdma_machdep.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sys/i386/i386/busdma_machdep.c b/sys/i386/i386/busdma_machdep.c
index 6a47246..67f8123 100644
--- a/sys/i386/i386/busdma_machdep.c
+++ b/sys/i386/i386/busdma_machdep.c
@@ -135,8 +135,7 @@ static int reserve_bounce_pages(bus_dma_tag_t dmat, bus_dmamap_t map,
static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map,
vm_offset_t vaddr, bus_size_t size);
static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage);
-static __inline int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr,
- bus_size_t len);
+static __inline int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr);
/*
* Return true if a match is made.
@@ -147,18 +146,15 @@ static __inline int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr,
* to check for a match, if there is no filter callback then assume a match.
*/
static __inline int
-run_filter(bus_dma_tag_t dmat, bus_addr_t paddr, bus_size_t len)
+run_filter(bus_dma_tag_t dmat, bus_addr_t paddr)
{
- bus_size_t bndy;
int retval;
retval = 0;
- bndy = dmat->boundary;
do {
if (((paddr > dmat->lowaddr && paddr <= dmat->highaddr)
- || ((paddr & (dmat->alignment - 1)) != 0)
- || ((paddr & bndy) != ((paddr + len) & bndy)))
+ || ((paddr & (dmat->alignment - 1)) != 0))
&& (dmat->filter == NULL
|| (*dmat->filter)(dmat->filterarg, paddr) != 0))
retval = 1;
@@ -586,7 +582,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat,
while (vaddr < vendaddr) {
paddr = pmap_kextract(vaddr);
- if (run_filter(dmat, paddr, 0) != 0) {
+ if (run_filter(dmat, paddr) != 0) {
needbounce = 1;
map->pagesneeded++;
}
@@ -647,7 +643,7 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat,
sgsize = (baddr - curaddr);
}
- if (map->pagesneeded != 0 && run_filter(dmat, curaddr, sgsize))
+ if (map->pagesneeded != 0 && run_filter(dmat, curaddr))
curaddr = add_bounce_page(dmat, map, vaddr, sgsize);
/*
OpenPOWER on IntegriCloud