Re: [PATCH 6.0 659/862] ARM/dma-mappіng: dont override ->dma_coherent when set from a bus notifier

From: Bagas Sanjaya
Date: Wed Oct 19 2022 - 21:46:35 EST


On 10/19/22 15:32, Greg Kroah-Hartman wrote:
> From: Christoph Hellwig <hch@xxxxxx>
>
> [ Upstream commit 49bc8bebae79c8516cb12f91818f3a7907e3ebce ]
>
> 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 never clearing the dma_coherent flag in
> arm_coherent_dma_ops().
>

The patch subject looks mangled, right?

--
An old man doll... just what I always wanted! - Clara