search for: arch_iommu_detach_device

Displaying 8 results from an estimated 8 matches for "arch_iommu_detach_device".

2018 Apr 25
0
[PATCH 3/4] ARM: dma-mapping: Implement arch_iommu_detach_device()
...44 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h @@ -103,6 +103,9 @@ extern void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, #define arch_teardown_dma_ops arch_teardown_dma_ops extern void arch_teardown_dma_ops(struct device *dev); +#define arch_iommu_detach_device arch_iommu_detach_device +extern void arch_iommu_detach_device(struct device *dev); + /* do not use this function in a driver */ static inline bool is_device_dma_coherent(struct device *dev) { diff --git a/arch/arm/mm/dma-mapping-nommu.c b/arch/arm/mm/dma-mapping-nommu.c index 619f24a42d09..60fe...
2018 Apr 25
0
[PATCH v2 3/5] ARM: dma-mapping: Implement arch_iommu_detach_device()
...44 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h @@ -103,6 +103,9 @@ extern void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, #define arch_teardown_dma_ops arch_teardown_dma_ops extern void arch_teardown_dma_ops(struct device *dev); +#define arch_iommu_detach_device arch_iommu_detach_device +extern void arch_iommu_detach_device(struct device *dev); + /* do not use this function in a driver */ static inline bool is_device_dma_coherent(struct device *dev) { diff --git a/arch/arm/mm/dma-mapping-nommu.c b/arch/arm/mm/dma-mapping-nommu.c index 619f24a42d09..60fe...
2018 Apr 25
1
[PATCH v2 3/5] ARM: dma-mapping: Implement arch_iommu_detach_device()
> +void arch_iommu_detach_device(struct device *dev) > +{ > +#ifdef CONFIG_ARM_DMA_USE_IOMMU > + struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev); > + const struct dma_map_ops *dma_ops; > + > + if (!mapping) > + return; > + > + arm_iommu_release_mapping(mapping); > + arm_iommu_detach_dev...
2018 Apr 26
0
[PATCH v2 3/5] ARM: dma-mapping: Implement arch_iommu_detach_device()
On Wed, Apr 25, 2018 at 08:20:49AM -0700, Christoph Hellwig wrote: > > +void arch_iommu_detach_device(struct device *dev) > > +{ > > +#ifdef CONFIG_ARM_DMA_USE_IOMMU > > + struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev); > > + const struct dma_map_ops *dma_ops; > > + > > + if (!mapping) > > + return; > > + > > + arm_iommu_release_...
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 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
2018 Apr 25
0
[PATCH v2 2/5] dma-mapping: Introduce dma_iommu_detach_device() API
...mapping.c index d82566d6e237..18ddf32b10c9 100644 --- a/drivers/base/dma-mapping.c +++ b/drivers/base/dma-mapping.c @@ -366,3 +366,11 @@ void dma_deconfigure(struct device *dev) of_dma_deconfigure(dev); acpi_dma_deconfigure(dev); } + +void dma_iommu_detach_device(struct device *dev) +{ +#ifdef arch_iommu_detach_device + arch_iommu_detach_device(dev); +#endif +} +EXPORT_SYMBOL(dma_iommu_detach_device); diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index f8ab1c0f589e..732191a2c64e 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -671,6 +671,8 @@ static inline v...
2018 Apr 25
0
[PATCH v2 5/5] ARM: Unconditionally enable ARM_DMA_USE_IOMMU
...get_iommu_dma_map_ops arm_get_dma_map_ops - -#endif /* CONFIG_ARM_DMA_USE_IOMMU */ - static const struct dma_map_ops *arm_get_dma_map_ops(bool coherent) { return coherent ? &arm_coherent_dma_ops : &arm_dma_ops; @@ -2426,7 +2410,6 @@ void arch_teardown_dma_ops(struct device *dev) void arch_iommu_detach_device(struct device *dev) { -#ifdef CONFIG_ARM_DMA_USE_IOMMU struct dma_iommu_mapping *mapping = to_dma_iommu_mapping(dev); const struct dma_map_ops *dma_ops; @@ -2438,5 +2421,4 @@ void arch_iommu_detach_device(struct device *dev) dma_ops = arm_get_dma_map_ops(dev->archdata.dma_coherent);...