search for: arm_setup_iommu_dma_op

Displaying 6 results from an estimated 6 matches for "arm_setup_iommu_dma_op".

2018 Apr 25
0
[PATCH 3/4] ARM: dma-mapping: Implement arch_iommu_detach_device()
...g *mapping = to_dma_iommu_mapping(dev); + const struct dma_map_ops *dma_ops; + + if (!mapping) + return; + + arm_iommu_release_mapping(mapping); + arm_iommu_detach_device(dev); + + dma_ops = arm_get_dma_map_ops(dev->archdata.dma_coherent); + set_dma_ops(dev, dma_ops); +} + #else static bool arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 size, @@ -2378,6 +2393,10 @@ static void arm_teardown_iommu_dma_ops(struct device *dev) { } #define arm_get_iommu_dma_map_ops arm_get_dma_map_ops +void arch_iommu_detach_device(struct device *dev) +{ +} + #endif /* CONFIG_ARM_DMA_USE_IOMMU */ static c...
2018 Apr 25
5
[PATCH 1/4] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping
From: Thierry Reding <treding at nvidia.com> Depending on the kernel configuration, early ARM architecture setup code may have attached the GPU to a DMA/IOMMU mapping that transparently uses the IOMMU to back the DMA API. Tegra requires special handling for IOMMU backed buffers (a special bit in the GPU's MMU page tables indicates the memory path to take: via the SMMU or directly to the
2018 May 30
2
[PATCH v3 1/2] ARM: dma-mapping: Implement arm_dma_iommu_detach_device()
On Wed, May 30, 2018 at 02:54:46PM +0200, Thierry Reding wrote: > On Wed, May 30, 2018 at 10:59:30AM +0100, Robin Murphy wrote: > > On 30/05/18 09:03, Thierry Reding wrote: > > > From: Thierry Reding <treding at nvidia.com> > > > > > > Implement this function to enable drivers from detaching from any IOMMU > > > domains that architecture code
2018 May 30
0
[PATCH v3 1/2] ARM: dma-mapping: Implement arm_dma_iommu_detach_device()
...> should fix this pretty nicely. OK, having a second look at the ARM code I see I had indeed overlooked that extra reference held until arm_teardown_iommu_dma_ops() - mea culpa - but frankly that looks wrong anyway, as it basically defeats the point of refcounting the mapping at all. AFAICS arm_setup_iommu_dma_ops() should just be made to behave 'normally' by unconditionally dropping the initial reference after calling __arm_iommu_attach_device(), then we don't need all these odd and confusing release calls dotted around at all. Robin.
2018 Apr 25
0
[PATCH v2 5/5] ARM: Unconditionally enable ARM_DMA_USE_IOMMU
...debug_do_init); -#ifdef CONFIG_ARM_DMA_USE_IOMMU - static int __dma_info_to_prot(enum dma_data_direction dir, unsigned long attrs) { int prot = 0; @@ -2366,20 +2364,6 @@ static void arm_teardown_iommu_dma_ops(struct device *dev) arm_iommu_release_mapping(mapping); } -#else - -static bool arm_setup_iommu_dma_ops(struct device *dev, u64 dma_base, u64 size, - const struct iommu_ops *iommu) -{ - return false; -} - -static void arm_teardown_iommu_dma_ops(struct device *dev) { } - -#define arm_get_iommu_dma_map_ops arm_get_dma_map_ops - -#endif /* CONFIG_ARM_DMA_USE_IOMMU */ - static const struct dma_m...
2018 Apr 25
11
[PATCH v2 1/5] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping
From: Thierry Reding <treding at nvidia.com> Depending on the kernel configuration, early ARM architecture setup code may have attached the GPU to a DMA/IOMMU mapping that transparently uses the IOMMU to back the DMA API. Tegra requires special handling for IOMMU backed buffers (a special bit in the GPU's MMU page tables indicates the memory path to take: via the SMMU or directly to the