summaryrefslogtreecommitdiffstats
path: root/sys/x86
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2014-05-27 14:06:23 +0000
committerscottl <scottl@FreeBSD.org>2014-05-27 14:06:23 +0000
commit7cb2cf17efd6760be46cfb9f97d25ca94bb4dee1 (patch)
tree20fec90e7185f8b5b08e8af894d4d7d37de4a200 /sys/x86
parent056b4f56cf8f6e368c188e2a1ca8fce23ff3f753 (diff)
downloadFreeBSD-src-7cb2cf17efd6760be46cfb9f97d25ca94bb4dee1.zip
FreeBSD-src-7cb2cf17efd6760be46cfb9f97d25ca94bb4dee1.tar.gz
Revert r266481. It was based on faulty analysis of the problem. A correct
fix is forthcoming. Obtained from: Netflix, Inc.
Diffstat (limited to 'sys/x86')
-rw-r--r--sys/x86/x86/busdma_bounce.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/sys/x86/x86/busdma_bounce.c b/sys/x86/x86/busdma_bounce.c
index 18e0b75..a767bff 100644
--- a/sys/x86/x86/busdma_bounce.c
+++ b/sys/x86/x86/busdma_bounce.c
@@ -172,35 +172,12 @@ bounce_bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
newtag->map_count = 0;
newtag->segments = NULL;
- /*
- * Bouncing might be needed if there's a filter.
- * XXX Filters are likely broken as there's no way to
- * guarantee that bounce pages will also satisfy the
- * filter requirement.
- */
if (parent != NULL && ((newtag->common.filter != NULL) ||
((parent->common.flags & BUS_DMA_COULD_BOUNCE) != 0)))
newtag->common.flags |= BUS_DMA_COULD_BOUNCE;
- /*
- * Bouncing might be needed if there's an upper memory
- * restriction.
- */
- if (newtag->common.lowaddr < ptoa((vm_paddr_t)Maxmem))
- newtag->common.flags |= BUS_DMA_COULD_BOUNCE;
-
- /*
- * Bouncing might be needed if there's an alignment
- * restriction that can't be satisfied by breaking up
- * the segment.
- * XXX Need to consider non-natural alignment.
- * XXX Static allocations that tie to bus_dmamem_alloc()
- * will likely pass this test and be penalized with
- * the COULD_BOUNCE flag. Should probably have
- * bus_dmamem_alloc() clear this flag.
- */
- if ((newtag->common.nsegments <= 1) &&
- (newtag->common.alignment > 1))
+ if (newtag->common.lowaddr < ptoa((vm_paddr_t)Maxmem) ||
+ newtag->common.alignment > 1)
newtag->common.flags |= BUS_DMA_COULD_BOUNCE;
if (((newtag->common.flags & BUS_DMA_COULD_BOUNCE) != 0) &&
OpenPOWER on IntegriCloud