diff options
author | ian <ian@FreeBSD.org> | 2013-02-15 23:41:47 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2013-02-15 23:41:47 +0000 |
commit | cea4bd3ed0299c6d5120bceae68da5287ce5f6c5 (patch) | |
tree | bc429c96d5049042aca77d0e99ae4bff61ca6001 /sys/arm | |
parent | ff49b0d5878fa588874022dc953f5d74e1056213 (diff) | |
download | FreeBSD-src-cea4bd3ed0299c6d5120bceae68da5287ce5f6c5.zip FreeBSD-src-cea4bd3ed0299c6d5120bceae68da5287ce5f6c5.tar.gz |
Set map->pmap before _bus_dmamap_count_pages() tries to use it.
Obtained from: Thomas Skibo <ThomasSkibo@sbcglobal.net>
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/arm/busdma_machdep-v6.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arm/arm/busdma_machdep-v6.c b/sys/arm/arm/busdma_machdep-v6.c index 0a0bdd8..1ac2c97 100644 --- a/sys/arm/arm/busdma_machdep-v6.c +++ b/sys/arm/arm/busdma_machdep-v6.c @@ -968,6 +968,8 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat, if (segs == NULL) segs = dmat->segments; + map->pmap = pmap; + if ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) { _bus_dmamap_count_pages(dmat, map, buf, buflen, flags); if (map->pagesneeded != 0) { @@ -979,7 +981,6 @@ _bus_dmamap_load_buffer(bus_dma_tag_t dmat, sl = NULL; vaddr = (vm_offset_t)buf; - map->pmap = pmap; while (buflen > 0) { /* |