search for: arch_setup_dma_ops

Displaying 20 results from an estimated 55 matches for "arch_setup_dma_ops".

2018 May 30
2
[PATCH v3 1/2] ARM: dma-mapping: Implement arm_dma_iommu_detach_device()
...les changed, 23 insertions(+) > > diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h > index 8436f6ade57d..5960e9f3a9d0 100644 > --- 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 arm_dma_iommu_detach_device arm_dma_iommu_detach_device > +extern void arm_dma_iommu_detach_device(struct dev...
2018 May 30
2
[PATCH v3 1/2] ARM: dma-mapping: Implement arm_dma_iommu_detach_device()
...diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h > > > index 8436f6ade57d..5960e9f3a9d0 100644 > > > --- 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 arm_dma_iommu_detach_device arm_dma_iommu_detach_device > > > +extern void arm_dm...
2018 May 30
0
[PATCH v3 1/2] ARM: dma-mapping: Implement arm_dma_iommu_detach_device()
...| 16 ++++++++++++++++ 3 files changed, 23 insertions(+) diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 8436f6ade57d..5960e9f3a9d0 100644 --- 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 arm_dma_iommu_detach_device arm_dma_iommu_detach_device +extern void arm_dma_iommu_detach_device(struct device *dev); + /* do not use...
2018 May 30
4
[PATCH v3 0/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping
From: Thierry Reding <treding at nvidia.com> An unfortunate interaction between the 32-bit ARM DMA/IOMMU mapping code and Tegra SMMU driver changes to support IOMMU groups introduced a boot- time regression on Tegra124. This was caught very late because none of the standard configurations that are tested on Tegra enable the ARM DMA/ IOMMU mapping code since it is not needed. The reason for
2018 Aug 02
2
[RFC PATCH v1 0/6] Resolve unwanted DMA backing with IOMMU
...group *group; > > group = iommu_group_get(dev); > if (!group) > return NULL; > > iommu_group_put(group); > > if (!ops->implicit_iommu_for_dma_is_allowed) > return true; > > return ops->implicit_iommu_for_dma_is_allowed(dev); > } > > Then arch_setup_dma_ops() could have a clue whether implicit IOMMU backing > for a device is appropriate. Guys, does it sound good to you or maybe you have something else on your mind? Even if it's not an ideal solution, it fixes the immediate problem and should be good enough for the starter.
2018 May 30
0
[PATCH v3 1/2] ARM: dma-mapping: Implement arm_dma_iommu_detach_device()
...git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h >>>> index 8436f6ade57d..5960e9f3a9d0 100644 >>>> --- 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 arm_dma_iommu_detach_device arm_dma_iommu_detach_device >>>> +extern v...
2018 May 30
0
[PATCH v3 1/2] ARM: dma-mapping: Implement arm_dma_iommu_detach_device()
...> > > > diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h > > index 8436f6ade57d..5960e9f3a9d0 100644 > > --- 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 arm_dma_iommu_detach_device arm_dma_iommu_detach_device > > +extern void arm_dma_iommu_detach_devic...
2018 Aug 15
2
[RFC PATCH v1 0/6] Resolve unwanted DMA backing with IOMMU
...iommu_group_put(group); > >> > >> if (!ops->implicit_iommu_for_dma_is_allowed) > >> > >> return true; > >> > >> return ops->implicit_iommu_for_dma_is_allowed(dev); > >> > >> } > >> > >> Then arch_setup_dma_ops() could have a clue whether implicit IOMMU > >> backing > >> for a device is appropriate. > > > > Guys, does it sound good to you or maybe you have something else on your > > mind? Even if it's not an ideal solution, it fixes the immediate problem > >...
2018 Jul 02
1
[PATCH v4 1/2] ARM: dma-mapping: Set proper DMA ops in arm_iommu_detach_device()
...static void arm_teardown_iommu_dma_ops(struct device *dev) { } > > #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; > -} > - > void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, > const struct iommu_ops *iommu, bool coherent) > { > -- > 2.17.0 > -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available...
2018 Aug 03
0
[RFC PATCH v1 0/6] Resolve unwanted DMA backing with IOMMU
...p_get(dev); >> if (!group) >> return NULL; >> >> iommu_group_put(group); >> >> if (!ops->implicit_iommu_for_dma_is_allowed) >> return true; >> >> return ops->implicit_iommu_for_dma_is_allowed(dev); >> } >> >> Then arch_setup_dma_ops() could have a clue whether implicit IOMMU backing >> for a device is appropriate. > > Guys, does it sound good to you or maybe you have something else on your mind? > Even if it's not an ideal solution, it fixes the immediate problem and should > be good enough for the start...
2018 Jul 27
3
[RFC PATCH v1 0/6] Resolve unwanted DMA backing with IOMMU
...onst struct iommu_ops *ops = dev->bus->iommu_ops; struct iommu_group *group; group = iommu_group_get(dev); if (!group) return NULL; iommu_group_put(group); if (!ops->implicit_iommu_for_dma_is_allowed) return true; return ops->implicit_iommu_for_dma_is_allowed(dev); } Then arch_setup_dma_ops() could have a clue whether implicit IOMMU backing for a device is appropriate.
2018 Aug 16
0
[RFC PATCH v1 0/6] Resolve unwanted DMA backing with IOMMU
...;>>> >>>> if (!ops->implicit_iommu_for_dma_is_allowed) >>>> >>>> return true; >>>> >>>> return ops->implicit_iommu_for_dma_is_allowed(dev); >>>> >>>> } >>>> >>>> Then arch_setup_dma_ops() could have a clue whether implicit IOMMU >>>> backing >>>> for a device is appropriate. >>> >>> Guys, does it sound good to you or maybe you have something else on your >>> mind? Even if it's not an ideal solution, it fixes the immediate prob...
2018 May 30
8
[PATCH v4 0/2] drm/nouveau: tegra: Detach from ARM DMA/IOMMU mapping
From: Thierry Reding <treding at nvidia.com> An unfortunate interaction between the 32-bit ARM DMA/IOMMU mapping code and Tegra SMMU driver changes to support IOMMU groups introduced a boot- time regression on Tegra124. This was caught very late because none of the standard configurations that are tested on Tegra enable the ARM DMA/ IOMMU mapping code since it is not needed. The reason for
2018 Apr 25
0
[PATCH 3/4] ARM: dma-mapping: Implement arch_iommu_detach_device()
...| 19 +++++++++++++++++++ 3 files changed, 26 insertions(+) diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 8436f6ade57d..d6d5bd44f962 100644 --- 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 func...
2018 Apr 25
0
[PATCH v2 2/5] dma-mapping: Introduce dma_iommu_detach_device() API
...rch_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 void arch_setup_dma_ops(struct device *dev, u64 dma_base, static inline void arch_teardown_dma_ops(struct device *dev) { } #endif +extern void dma_iommu_detach_device(struct device *dev); + static inline unsigned int dma_get_max_seg_size(struct device *dev) { if (dev->dma_parms && dev->dma_parms->...
2018 Apr 25
0
[PATCH v2 3/5] ARM: dma-mapping: Implement arch_iommu_detach_device()
...| 17 +++++++++++++++++ 3 files changed, 24 insertions(+) diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 8436f6ade57d..d6d5bd44f962 100644 --- 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 func...
2018 May 30
0
[PATCH v4 1/2] ARM: dma-mapping: Set proper DMA ops in arm_iommu_detach_device()
...;, dev_name(dev)); } @@ -2357,11 +2362,6 @@ static void arm_teardown_iommu_dma_ops(struct device *dev) { } #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; -} - void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, const struct iommu_ops *iommu, bool coherent) { -- 2.17.0
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
2019 Oct 14
3
[PATCH 1/2] dma-mapping: Add dma_addr_is_phys_addr()
...Except in very specific setups, DMA addresses exist in a different > + * address space from CPU physical addresses and cannot be directly used > + * to reference system memory. > + */ > + return false; > +} > +#endif > + > #ifdef CONFIG_ARCH_HAS_SETUP_DMA_OPS > void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, > const struct iommu_ops *iommu, bool coherent); > diff --git a/kernel/dma/Kconfig b/kernel/dma/Kconfig > index 9decbba..6209b46 100644 > --- a/kernel/dma/Kconfig > +++ b/kernel/dma/Kconfig > @@ -51,6 +51,9 @@ config ARCH_HAS_DMA_MMAP...
2019 Oct 14
3
[PATCH 1/2] dma-mapping: Add dma_addr_is_phys_addr()
...Except in very specific setups, DMA addresses exist in a different > + * address space from CPU physical addresses and cannot be directly used > + * to reference system memory. > + */ > + return false; > +} > +#endif > + > #ifdef CONFIG_ARCH_HAS_SETUP_DMA_OPS > void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, > const struct iommu_ops *iommu, bool coherent); > diff --git a/kernel/dma/Kconfig b/kernel/dma/Kconfig > index 9decbba..6209b46 100644 > --- a/kernel/dma/Kconfig > +++ b/kernel/dma/Kconfig > @@ -51,6 +51,9 @@ config ARCH_HAS_DMA_MMAP...