[PATCH 2/2] ARM: dma-mapping: flush FROM_DEVICE buffers on legacy backends

Karl Mehltretter kmehltretter at gmail.com
Fri Sep 11 23:55:08 PDT 2026


On Thu, Sep 10, 2026 at 08:36:20AM +0100, Karl Mehltretter wrote:
> The legacy write-back cache backends invalidate DMA_FROM_DEVICE buffers
> when ownership passes to the device. A plain invalidate can discard dirty
> CPU cache lines. If the device writes only part of the buffer, untouched
> bytes can expose memory contents older than those present at the handoff.

Sashiko flagged unused *_dma_inv_range helpers in its dashboard review
of this patch [1].

I can remove the unused invalidate helpers in a separate cleanup patch in
v2.

[1] https://sashiko.dev/#/patchset/20260910063620.17768-1-kmehltretter@gmail.com

Thanks,
Karl



More information about the linux-arm-kernel mailing list