diff options
-rw-r--r-- | sys/x86/x86/busdma_bounce.c | 27 |
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) && |