• Alexander Lobakin's avatar
    dma: compile-out DMA sync op calls when not used · fe7514b1
    Alexander Lobakin authored
    Some platforms do have DMA, but DMA there is always direct and coherent.
    Currently, even on such platforms DMA sync operations are compiled and
    called.
    Add a new hidden Kconfig symbol, DMA_NEED_SYNC, and set it only when
    either sync operations are needed or there is DMA ops or swiotlb
    or DMA debug is enabled. Compile global dma_sync_*() and dma_need_sync()
    only when it's set, otherwise provide empty inline stubs.
    The change allows for future optimizations of DMA sync calls depending
    on runtime conditions.
    Signed-off-by: default avatarAlexander Lobakin <aleksander.lobakin@intel.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    fe7514b1
Kconfig 7.46 KB