Skip to content
Commit 4155ad9a authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Peng Fan
Browse files

mmc: sdhci: fix missing cache invalidation after reading by DMA



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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 58d8ace1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment