diff options
author | scottl <scottl@FreeBSD.org> | 2003-08-04 23:40:35 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2003-08-04 23:40:35 +0000 |
commit | c5cc3acad05c083c81ec2feefaf72a6e6c91eca4 (patch) | |
tree | 9fbd438fb413bb1a2eec27644853d76820f8890c /sys | |
parent | 1e97e213cf48605295d4c8eb400a5a90a9b00a7a (diff) | |
download | FreeBSD-src-c5cc3acad05c083c81ec2feefaf72a6e6c91eca4.zip FreeBSD-src-c5cc3acad05c083c81ec2feefaf72a6e6c91eca4.tar.gz |
In _bus_dmamap_load_buffer(), only count the number of bounce pages needed if
they haven't been counted before. This test was ommitted when bus_dmamap_load()
was merged into this function, and results in the pagesneeded field growing
without bounds when multiple deferrals happen.
Thanks to Paul Saab for beating his head against this for a few hours =-)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/busdma_machdep.c | 3 | ||||
-rw-r--r-- | sys/i386/i386/busdma_machdep.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/amd64/amd64/busdma_machdep.c b/sys/amd64/amd64/busdma_machdep.c index 058210b..7b183b7 100644 --- a/sys/amd64/amd64/busdma_machdep.c +++ b/sys/amd64/amd64/busdma_machdep.c @@ -476,7 +476,8 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat, else pmap = NULL; - if (dmat->lowaddr < ptoa((vm_paddr_t)Maxmem)) { + if (dmat->lowaddr < ptoa((vm_paddr_t)Maxmem) && + map->pagesneeded == 0) { vm_offset_t vendaddr; /* diff --git a/sys/i386/i386/busdma_machdep.c b/sys/i386/i386/busdma_machdep.c index 6bce740..ab7bd21 100644 --- a/sys/i386/i386/busdma_machdep.c +++ b/sys/i386/i386/busdma_machdep.c @@ -494,7 +494,8 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat, else pmap = NULL; - if (dmat->lowaddr < ptoa((vm_paddr_t)Maxmem)) { + if (dmat->lowaddr < ptoa((vm_paddr_t)Maxmem) && + map->pagesneeded == 0) { vm_offset_t vendaddr; /* |