]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
arm: dma-mapping: Don't override dma_ops in arch_setup_dma_ops()
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 14 May 2015 23:00:02 +0000 (02:00 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Sep 2017 16:19:06 +0000 (18:19 +0200)
commit92099ed392044e59ed5085455896a16d99a72bf5
tree93500501af12436a1e70e5b57c49c94a0f3422ef
parent355efd65e02b9a1a32184909efc4f8f4ec4df8b2
arm: dma-mapping: Don't override dma_ops in arch_setup_dma_ops()

The arch_setup_dma_ops() function is in charge of setting dma_ops with a
call to set_dma_ops(). set_dma_ops() is also called from

- highbank and mvebu bus notifiers
- dmabounce (to be replaced with swiotlb)
- arm_iommu_attach_device

(arm_iommu_attach_device is itself called from IOMMU and bus master
device drivers)

To allow the arch_setup_dma_ops() call to be moved from device add time
to device probe time we must ensure that dma_ops already setup by any of
the above callers will not be overriden.

Aftering replacing dmabounce with swiotlb, converting IOMMU drivers to
of_xlate and taking care of highbank and mvebu, the workaround should be
removed.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
arch/arm/mm/dma-mapping.c