[PATCH] ARM: mvebu: select OF_DMA_DEFAULT_COHERENT if MACH_MVEBU_V7

Christoph Hellwig hch at lst.de
Tue Oct 4 01:30:10 PDT 2022


On Tue, Oct 04, 2022 at 10:17:23AM +0200, Marek Behún wrote:
> Commit ae626eb97376 ("ARM/dma-mapping: use dma-direct unconditionally")
> caused a regression on the mvebu platform, wherein devices that are
> dma-coherent are marked as dma-noncoherent, because although
> mvebu_hwcc_notifier() after that commit still marks then as coherent,
> the arm_coherent_dma_ops() function, which is called later, overwrites
> this setting, since it is being called from drivers/of/device.c with
> coherency parameter determined by of_dma_is_coherent(), and the
> device-trees do not declare the 'dma-coherent' property.
> 
> Fix this by defaulting to dma-coherent for this platform in the
> of_dma_is_coherent() function, if neither dma-coherent nor
> dma-noncoherent is declared.

Can't mvebu be part of multi-platform builds that would be broken by
this change?

Also if we do this, shouldn't we also remove the notifier that set
->dma_coherent?



More information about the linux-arm-kernel mailing list