• Paul Mundt's avatar
    dma-coherent: Restore dma_alloc_from_coherent() large alloc fall back policy. · 0609697e
    Paul Mundt authored
    When doing large allocations (larger than the per-device coherent area)
    the generic memory allocators are silently fallen back on regardless of
    consideration for the per-device constraints.
    
    In the DMA_MEMORY_EXCLUSIVE case falling back on generic memory is not
    an option, as it tends not to be addressable by the DMA hardware in
    question. This issue showed up with the 8139too breakage on the
    Dreamcast, where non-addressable buffers were silently allocated due to
    the size mismatch calculation -- while it should have simply errored out
    upon being unable to satisfy the allocation with the given device
    constraints.
    
    This restores fall back behaviour to what it was before the oversized
    request change caused multiple regressions.
    Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
    0609697e
dma-coherent.c 4.4 KB