Skip to content
  • Masahiro Yamada's avatar
    mmc: sdhci: fix missing cache invalidation after reading by DMA · 4155ad9a
    Masahiro Yamada authored and Peng Fan's avatar Peng Fan committed
    
    
    This driver currently performs cache operation before the DMA start,
    but does nothing after the DMA completion.
    
    When reading data by DMA, the cache invalidation is needed also after
    finishing the DMA transfer. Otherwise, the CPU might read data from
    the cache instead of from the main memory when speculative memory read
    or memory prefetch occurs.
    
    Instead of calling the cache operation directly, this commit adds
    dma_unmap_single(), which performs cache invalidation internally,
    but drivers do not need which operation is being run.
    
    Signed-off-by: Masahiro Yamada's avatarMasahiro Yamada <yamada.masahiro@socionext.com>
    4155ad9a