[PATCH] armv6: invalidate cache on DMA_FROM_DEVICE/DMA_BIDIRECTIONAL

Russell King - ARM Linux linux at arm.linux.org.uk
Mon Dec 21 07:44:38 EST 2009


On Mon, Dec 21, 2009 at 09:08:17AM +0000, Jamie Iles wrote:
> Some ARMv6 cores will use speculative prefetching. This can be a problem
> when devices DMA to memory and the core prefetches data before the
> device has written it. This can result in stale data being stored in the
> cache. The DMA API will request the invalidation but this is currently a
> no-op on v6. Use the same dma_unmap_area implementation as for v7.
> 
> Additionally, simplify v6_dma_map_area() so that we clean the cache lines
> for DMA_TO_DEVICE and DMA_FROM_DEVICE but don't do any invalidation. This
> will be done when we unmap.

I was thinking about doing this for ARMv6, but I thought the concensus
was that ARMv6 didn't have speculative prefetching.

Nevertheless, the patch is fine, can I just combine it with the other
DMA patches - it is after all just a copy of the ARMv7 code.



More information about the linux-arm-kernel mailing list