add support for the global coherent pool to the dma core
Subsystems (3)
Hi all,
this series adds support for using the global coherent (aka uncached) pool to the generic dma-direct code and then switches arm-nommu and hexagon over to it, together with a bunch of cleanups.
Diffstat:
arch/arm/Kconfig | 5 - arch/arm/mm/dma-mapping-nommu.c | 173 +--------------------------------------- arch/hexagon/Kconfig | 1 arch/hexagon/kernel/dma.c | 57 ++----------- include/linux/dma-map-ops.h | 18 ++-- kernel/dma/Kconfig | 4 kernel/dma/coherent.c | 159 +++++++++++++++++------------------- kernel/dma/direct.c | 15 +++ 8 files changed, 124 insertions(+), 308 deletions(-)
PATCH 1/7 dma-direct: add support for dma_coherent_default_memory
Add an option to allocate uncached memory for dma_alloc_coherent from the global dma_coherent_default_memory. This will allow to move arm-nommu (and eventually other platforms) to use generic code for allocating uncached memory from a pre-populated pool.
Note that this is a different pool from the one that platforms that can remap at runtime use for GFP_ATOMIC allocations for now, although there might be opportunities to eventually end up with a common codebase for the two use cases.
--- kernel/dma/Kconfig | 4 ++++ kernel/dma/direct.c | 15 +++++++++++++++ 2 files changed, 19 insertions(+)
kernel/dma/Kconfig +4 -0
@@ -93,6 +93,10 @@ config DMA_COHERENT_POOL select GENERIC_ALLOCATOR bool +config DMA_GLOBAL_POOL + select DMA_DECLARE_COHERENT + bool + config DMA_REMAP bool depends on MMU
kernel/dma/direct.c +15 -0
@@ -156,9 +156,14 @@ void *dma_direct_alloc(struct device *dev, size_t size,if (!IS_ENABLED (CONFIG_ARCH_HAS_DMA_SET_UNCACHED ) && !IS_ENABLED (CONFIG_DMA_DIRECT_REMAP ) && + !IS_ENABLED (CONFIG_DMA_GLOBAL_POOL ) && !dev_is_dma_coherent (dev))return arch_dma_alloc (dev, size, dma_handle, gfp, attrs); +if (IS_ENABLED (CONFIG_DMA_GLOBAL_POOL ) && + !dev_is_dma_coherent (dev)) +return dma_alloc_from_global_coherent (dev, size, dma_handle); +/* * Remapping or decrypting memory may block. If either is required and * we can't block, allocate the memory from the atomic pools.
@@ -255,11 +260,19 @@ void dma_direct_free(struct device *dev, size_t size,if (!IS_ENABLED (CONFIG_ARCH_HAS_DMA_SET_UNCACHED ) && !IS_ENABLED (CONFIG_DMA_DIRECT_REMAP ) && + !IS_ENABLED (CONFIG_DMA_GLOBAL_POOL ) && !dev_is_dma_coherent (dev)) {arch_dma_free (dev, size, cpu_addr, dma_addr, attrs);return ; } +if (IS_ENABLED (CONFIG_DMA_GLOBAL_POOL ) && + !dev_is_dma_coherent (dev)) { +if (!dma_release_from_global_coherent (page_order, cpu_addr)) +WARN_ON_ONCE (1 ); +return ; + } +/* If cpu_addr is not from an atomic pool, dma_free_from_pool() fails */ if (IS_ENABLED (CONFIG_DMA_COHERENT_POOL ) &&dma_free_from_pool (dev, cpu_addr,PAGE_ALIGN (size)))
@@ -462,6 +475,8 @@ int dma_direct_mmap(struct device *dev, struct vm_area_struct *vma,if (dma_mmap_from_dev_coherent (dev, vma, cpu_addr, size, &ret))return ret; +if (dma_mmap_from_global_coherent (vma, cpu_addr, size, &ret)) +return ret;if (vma->vm_pgoff >= count || user_count > count - vma->vm_pgoff)return -ENXIO ;
Signature · 1 line
2.30.2
PATCH 2/7 ARM/nommu: use the generic dma-direct code for non-coherent devices
In reply to Christoph HellwigSelect the right options to just use the generic dma-direct code instead of reimplementing it.
--- arch/arm/Kconfig | 5 +- arch/arm/mm/dma-mapping-nommu.c | 173 ++------------------------------ 2 files changed, 9 insertions(+), 169 deletions(-)
arch/arm/Kconfig +3 -2
@@ -18,8 +18,8 @@ config ARM select ARCH_HAS_SET_MEMORY select ARCH_HAS_STRICT_KERNEL_RWX if MMU && !XIP_KERNEL select ARCH_HAS_STRICT_MODULE_RWX if MMU - select ARCH_HAS_SYNC_DMA_FOR_DEVICE if SWIOTLB - select ARCH_HAS_SYNC_DMA_FOR_CPU if SWIOTLB + select ARCH_HAS_SYNC_DMA_FOR_DEVICE if SWIOTLB || !MMU + select ARCH_HAS_SYNC_DMA_FOR_CPU if SWIOTLB || !MMU select ARCH_HAS_TEARDOWN_DMA_OPS if MMU select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST select ARCH_HAVE_CUSTOM_GPIO_H
@@ -44,6 +44,7 @@ config ARM select CPU_PM if SUSPEND || CPU_IDLE select DCACHE_WORD_ACCESS if HAVE_EFFICIENT_UNALIGNED_ACCESS select DMA_DECLARE_COHERENT + select DMA_GLOBAL_POOL if !MMU select DMA_OPS select DMA_REMAP if MMU select EDAC_SUPPORT
arch/arm/mm/dma-mapping-nommu.c +6 -167
207 lines not on this page · raw message
Signature · 1 line
2.30.2
PATCH 3/7 dma-mapping: allow using the global coherent pool for !ARM
In reply to Christoph HellwigSwitch an ifdef so that the global coherent pool is initialized for any architecture that selects the DMA_GLOBAL_POOL symbol insted of hardcoding ARM.
--- kernel/dma/coherent.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/dma/coherent.c +2 -0
@@ -361,7 +361,9 @@ static int __init rmem_dma_setup(struct reserved_mem *rmem)pr_err ("Reserved memory: regions without no-map are not yet supported\n" );return -EINVAL ; } +#endif +#ifdef CONFIG_DMA_GLOBAL_POOL if (of_get_flat_dt_prop (node,"linux,dma-default" ,NULL )) {WARN (dma_reserved_default_memory,"Reserved memory: region for default DMA coherent area is redefined\n" );
Signature · 1 line
2.30.2
PATCH 4/7 dma-mapping: simplify dma_init_coherent_memory
In reply to Christoph HellwigReturn the allocated dma_coherent_mem structure, set the use_dma_pfn_offset and print the failure warning inside of dma_init_coherent_memory instead of leaving that to the callers.
--- kernel/dma/coherent.c | 78 ++++++++++++++++++------------------------- 1 file changed, 33 insertions(+), 45 deletions(-)
kernel/dma/coherent.c +33 -45
@@ -37,51 +37,44 @@ static inline dma_addr_t dma_get_device_base(struct device *dev,return mem->device_base; } -static int dma_init_coherent_memory (phys_addr_t phys_addr, -dma_addr_t device_addr,size_t size, -struct dma_coherent_mem **mem) +static struct dma_coherent_mem *dma_init_coherent_memory (phys_addr_t phys_addr, +dma_addr_t device_addr,size_t size,bool use_dma_pfn_offset) { -struct dma_coherent_mem *dma_mem =NULL ; -void *mem_base =NULL ; +struct dma_coherent_mem *dma_mem;int pages = size >>PAGE_SHIFT ;int bitmap_size =BITS_TO_LONGS (pages) *sizeof (long ); -int ret; +void *mem_base; -if (!size) { - ret = -EINVAL ; - goto out; - } +if (!size) +return ERR_PTR (-EINVAL ); mem_base =memremap (phys_addr, size,MEMREMAP_WC ); -if (!mem_base) { - ret = -EINVAL ; - goto out; - } +if (!mem_base) +return ERR_PTR (-EINVAL ); + dma_mem =kzalloc (sizeof (struct dma_coherent_mem ),GFP_KERNEL ); -if (!dma_mem) { - ret = -ENOMEM ; - goto out; - } +if (!dma_mem) + goto out_unmap_membase; dma_mem->bitmap =kzalloc (bitmap_size,GFP_KERNEL ); -if (!dma_mem->bitmap) { - ret = -ENOMEM ; - goto out; - } +if (!dma_mem->bitmap) + goto out_free_dma_mem; dma_mem->virt_base = mem_base; dma_mem->device_base = device_addr; dma_mem->pfn_base =PFN_DOWN (phys_addr); dma_mem->size = pages; + dma_mem->use_dev_dma_pfn_offset = use_dma_pfn_offset;spin_lock_init (&dma_mem->spinlock); - *mem = dma_mem; -return 0 ; +return dma_mem; -out: +out_free_dma_mem:kfree (dma_mem); -if (mem_base) -memunmap (mem_base); -return ret; +out_unmap_membase: +memunmap (mem_base); +pr_err ("Reserved memory: failed to init DMA memory pool at %pa, size %zd MiB\n" , + &phys_addr, size /SZ_1M ); +return ERR_PTR (-ENOMEM ); }static void dma_release_coherent_memory (struct dma_coherent_mem *mem)
@@ -130,9 +123,9 @@ int dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,struct dma_coherent_mem *mem;int ret; - ret =dma_init_coherent_memory (phys_addr, device_addr, size, &mem); -if (ret) -return ret; + mem =dma_init_coherent_memory (phys_addr, device_addr, size, false); +if (IS_ERR (mem)) +return PTR_ERR (mem); ret =dma_assign_coherent_memory (dev, mem);if (ret)
@@ -319,21 +312,16 @@ static struct reserved_mem *dma_reserved_default_memory __initdata;static int rmem_dma_device_init (struct reserved_mem *rmem,struct device *dev) { -struct dma_coherent_mem *mem = rmem->priv; -int ret; - -if (!mem) { - ret =dma_init_coherent_memory (rmem->base, rmem->base, - rmem->size, &mem); -if (ret) { -pr_err ("Reserved memory: failed to init DMA memory pool at %pa, size %ld MiB\n" , - &rmem->base, (unsigned long )rmem->size /SZ_1M ); -return ret; - } +if (!rmem->priv) { +struct dma_coherent_mem *mem; + + mem =dma_init_coherent_memory (rmem->base, rmem->base, + rmem->size, true); +if (IS_ERR (mem)) +return PTR_ERR (mem); + rmem->priv = mem; } - mem->use_dev_dma_pfn_offset = true; - rmem->priv = mem; -dma_assign_coherent_memory (dev, mem); +dma_assign_coherent_memory (dev, rmem->priv);return 0 ; }
Signature · 1 line
2.30.2
PATCH 5/7 dma-mapping: add a dma_init_global_coherent helper
In reply to Christoph HellwigAdd a new helper to initialize the global coherent pool. This both cleans up the existing initialization which indirects through the reserved_mem_ops that are normally only used for struct device, and also allows using the global pool for non-devicetree architectures.
--- include/linux/dma-map-ops.h | 2 +- kernel/dma/coherent.c | 32 ++++++++++++++------------------ 2 files changed, 15 insertions(+), 19 deletions(-)
include/linux/dma-map-ops.h +1 -1
@@ -176,7 +176,7 @@ void *dma_alloc_from_global_coherent(struct device *dev, ssize_t size,int dma_release_from_global_coherent (int order,void *vaddr);int dma_mmap_from_global_coherent (struct vm_area_struct *vma,void *cpu_addr,size_t size,int *ret); - +int dma_init_global_coherent (phys_addr_t phys_addr,size_t size);#else static inline int dma_declare_coherent_memory (struct device *dev,phys_addr_t phys_addr,dma_addr_t device_addr,size_t size)
kernel/dma/coherent.c +14 -18
@@ -300,6 +300,18 @@ int dma_mmap_from_global_coherent(struct vm_area_struct *vma, void *vaddr, vaddr, size, ret); } +int dma_init_global_coherent (phys_addr_t phys_addr,size_t size) +{ +struct dma_coherent_mem *mem; + + mem =dma_init_coherent_memory (phys_addr, phys_addr, size, true); +if (IS_ERR (mem)) +return PTR_ERR (mem); + dma_coherent_default_memory = mem; +pr_info ("DMA: default coherent area is set\n" ); +return 0 ; +} +/* * Support for reserved memory regions defined in device tree */
@@ -367,26 +379,10 @@ static int __init rmem_dma_setup(struct reserved_mem *rmem)static int __init dma_init_reserved_memory (void ) { -const struct reserved_mem_ops *ops; -int ret; -if (!dma_reserved_default_memory)return -ENOMEM ; - - ops = dma_reserved_default_memory->ops; - -/* -* We rely on rmem_dma_device_init() does not propagate error of -* dma_assign_coherent_memory() for "NULL" device. -*/ - ret = ops->device_init (dma_reserved_default_memory,NULL ); - -if (!ret) { - dma_coherent_default_memory = dma_reserved_default_memory->priv; -pr_info ("DMA: default coherent area is set\n" ); - } - -return ret; +return dma_init_global_coherent (dma_reserved_default_memory->base, + dma_reserved_default_memory->size); }core_initcall (dma_init_reserved_memory);
Signature · 1 line
2.30.2
PATCH 6/7 dma-mapping: make the global coherent pool conditional
In reply to Christoph HellwigOnly build the code to support the global coherent pool if support for it is enabled.
--- include/linux/dma-map-ops.h | 18 +++++++------- kernel/dma/coherent.c | 47 ++++++++++++++++++++----------------- 2 files changed, 35 insertions(+), 30 deletions(-)
include/linux/dma-map-ops.h +10 -8
@@ -170,13 +170,6 @@ int dma_alloc_from_dev_coherent(struct device *dev, ssize_t size,int dma_release_from_dev_coherent (struct device *dev,int order,void *vaddr);int dma_mmap_from_dev_coherent (struct device *dev,struct vm_area_struct *vma,void *cpu_addr,size_t size,int *ret); - -void *dma_alloc_from_global_coherent (struct device *dev,ssize_t size, -dma_addr_t *dma_handle); -int dma_release_from_global_coherent (int order,void *vaddr); -int dma_mmap_from_global_coherent (struct vm_area_struct *vma,void *cpu_addr, -size_t size,int *ret); -int dma_init_global_coherent (phys_addr_t phys_addr,size_t size);#else static inline int dma_declare_coherent_memory (struct device *dev,phys_addr_t phys_addr,dma_addr_t device_addr,size_t size)
@@ -186,7 +179,16 @@ static inline int dma_declare_coherent_memory(struct device *dev,#define dma_alloc_from_dev_coherent (dev, size, handle, ret) (0)#define dma_release_from_dev_coherent (dev, order, vaddr) (0)#define dma_mmap_from_dev_coherent (dev, vma, vaddr, order, ret) (0) +#endif /* CONFIG_DMA_DECLARE_COHERENT */ +#ifdef CONFIG_DMA_GLOBAL_POOL +void *dma_alloc_from_global_coherent (struct device *dev,ssize_t size, +dma_addr_t *dma_handle); +int dma_release_from_global_coherent (int order,void *vaddr); +int dma_mmap_from_global_coherent (struct vm_area_struct *vma,void *cpu_addr, +size_t size,int *ret); +int dma_init_global_coherent (phys_addr_t phys_addr,size_t size); +#else static inline void *dma_alloc_from_global_coherent (struct device *dev,ssize_t size,dma_addr_t *dma_handle) {
@@ -201,7 +203,7 @@ static inline int dma_mmap_from_global_coherent(struct vm_area_struct *vma, {return 0 ; } -#endif /* CONFIG_DMA_DECLARE_COHERENT */ +#endif /* CONFIG_DMA_GLOBAL_POOL */ /* * This is the actual return value from the ->alloc_noncontiguous method.
kernel/dma/coherent.c +25 -22
90 lines not on this page · raw message
Signature · 1 line
2.30.2
Re: [PATCH 6/7] dma-mapping: make the global coherent pool conditional
Quoted 147 lines · Christoph Hellwig
Only build the code to support the global coherent pool if support for it is enabled.
Signed-off-by Christoph Hellwig <[email protected]>Tested-by Dillon Min <[email protected]>--- include/linux/dma-map-ops.h | 18 +++++++------- kernel/dma/coherent.c | 47 ++++++++++++++++++++----------------- 2 files changed, 35 insertions(+), 30 deletions(-)include/linux/dma-map-ops.h +10
-8@@ -170,13 +170,6 @@ int dma_alloc_from_dev_coherent(struct device *dev, ssize_t size,int dma_release_from_dev_coherent (struct device *dev,int order,void *vaddr);int dma_mmap_from_dev_coherent (struct device *dev,struct vm_area_struct *vma,void *cpu_addr,size_t size,int *ret); - -void *dma_alloc_from_global_coherent (struct device *dev,ssize_t size, -dma_addr_t *dma_handle); -int dma_release_from_global_coherent (int order,void *vaddr); -int dma_mmap_from_global_coherent (struct vm_area_struct *vma,void *cpu_addr, -size_t size,int *ret); -int dma_init_global_coherent (phys_addr_t phys_addr,size_t size);#else static inline int dma_declare_coherent_memory (struct device *dev,phys_addr_t phys_addr,dma_addr_t device_addr,size_t size)@@ -186,7 +179,16 @@ static inline int dma_declare_coherent_memory(struct device *dev,#define dma_alloc_from_dev_coherent (dev, size, handle, ret) (0)#define dma_release_from_dev_coherent (dev, order, vaddr) (0)#define dma_mmap_from_dev_coherent (dev, vma, vaddr, order, ret) (0) +#endif /* CONFIG_DMA_DECLARE_COHERENT */ +#ifdef CONFIG_DMA_GLOBAL_POOL +void *dma_alloc_from_global_coherent (struct device *dev,ssize_t size, +dma_addr_t *dma_handle); +int dma_release_from_global_coherent (int order,void *vaddr); +int dma_mmap_from_global_coherent (struct vm_area_struct *vma,void *cpu_addr, +size_t size,int *ret); +int dma_init_global_coherent (phys_addr_t phys_addr,size_t size); +#else static inline void *dma_alloc_from_global_coherent (struct device *dev,ssize_t size,dma_addr_t *dma_handle) {@@ -201,7 +203,7 @@ static inline int dma_mmap_from_global_coherent(struct vm_area_struct *vma, {return 0 ; } -#endif /* CONFIG_DMA_DECLARE_COHERENT */ +#endif /* CONFIG_DMA_GLOBAL_POOL */ /* * This is the actual return value from the ->alloc_noncontiguous method. kernel/dma/coherent.c +24
-21@@ -20,8 +20,6 @@ struct dma_coherent_mem {bool use_dev_dma_pfn_offset; }; -static struct dma_coherent_mem *dma_coherent_default_memory__ro_after_init ; -static inline struct dma_coherent_mem *dev_get_coherent_memory (struct device *dev) {if (dev && dev->dma_mem)@@ -191,16 +189,6 @@ int dma_alloc_from_dev_coherent(struct device *dev, ssize_t size,return 1 ; } -void *dma_alloc_from_global_coherent (struct device *dev,ssize_t size, -dma_addr_t *dma_handle) -{ -if (!dma_coherent_default_memory) -return NULL ; - -return __dma_alloc_from_coherent (dev, dma_coherent_default_memory, size, - dma_handle); -} -static int __dma_release_from_coherent (struct dma_coherent_mem *mem,int order,void *vaddr) {@@ -236,15 +224,6 @@ int dma_release_from_dev_coherent(struct device *dev, int order, void *vaddr)return __dma_release_from_coherent (mem, order, vaddr); } -int dma_release_from_global_coherent (int order,void *vaddr) -{ -if (!dma_coherent_default_memory) -return 0 ; - -return __dma_release_from_coherent (dma_coherent_default_memory, order, - vaddr); -} -static int __dma_mmap_from_coherent (struct dma_coherent_mem *mem,struct vm_area_struct *vma,void *vaddr,size_t size,int *ret) {@@ -290,6 +269,28 @@ int dma_mmap_from_dev_coherent(struct device *dev, struct vm_area_struct *vma,return __dma_mmap_from_coherent (mem, vma, vaddr, size, ret); } +#ifdef CONFIG_DMA_GLOBAL_POOL +static struct dma_coherent_mem *dma_coherent_default_memory__ro_after_init ; + +void *dma_alloc_from_global_coherent (struct device *dev,ssize_t size, +dma_addr_t *dma_handle) +{ +if (!dma_coherent_default_memory) +return NULL ; + +return __dma_alloc_from_coherent (dev, dma_coherent_default_memory, size, + dma_handle); +} + +int dma_release_from_global_coherent (int order,void *vaddr) +{ +if (!dma_coherent_default_memory) +return 0 ; + +return __dma_release_from_coherent (dma_coherent_default_memory, order, + vaddr); +} +int dma_mmap_from_global_coherent (struct vm_area_struct *vma,void *vaddr,size_t size,int *ret) {@@ -311,6 +312,7 @@ int dma_init_global_coherent(phys_addr_t phys_addr, size_t size)pr_info ("DMA: default coherent area is set\n" ); return 0; } +#endif /* CONFIG_DMA_GLOBAL_POOL */ /* * Support for reserved memory regions defined in device tree @@ -377,6 +379,7 @@ static int __init rmem_dma_setup(struct reserved_mem *rmem)return 0 ; } +#ifdef CONFIG_DMA_GLOBAL_POOL static int __init dma_init_reserved_memory (void ) {if (!dma_reserved_default_memory)
kernel/dma/coherent.c static int __init dma_init_reserved_memory(void) · line 388
Quoted 2 lines
kernel/dma/coherent.c +0
-0@@ -384,8 +387,8 @@ static int __init dma_init_reserved_memory(void)return dma_init_global_coherent (dma_reserved_default_memory->base, dma_reserved_default_memory->size);
dma_reserved_default_memory also needs to be moved inside CONFIG_DMA_GLOBAL_POOL because
all the usages are already part of that config.
Quoted 14 lines
kernel/dma/coherent.c +1
-2} -core_initcall (dma_init_reserved_memory); +#endif /* CONFIG_DMA_GLOBAL_POOL */ RESERVEDMEM_OF_DECLARE (dma,"shared-dma-pool" , rmem_dma_setup);#endif --2.30.2
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
PATCH 7/7 hexagon: use the generic global coherent pool
In reply to Christoph HellwigSwitch hexagon to use the generic code for dma_alloc_coherent from a global pre-filled pool.
--- arch/hexagon/Kconfig | 1 + arch/hexagon/kernel/dma.c | 57 ++++++++------------------------------- 2 files changed, 12 insertions(+), 46 deletions(-)
arch/hexagon/Kconfig +1 -0
@@ -7,6 +7,7 @@ config HEXAGON select ARCH_32BIT_OFF_T select ARCH_HAS_SYNC_DMA_FOR_DEVICE select ARCH_NO_PREEMPT + select DMA_GLOBAL_POOL # Other pending projects/to-do items. # select HAVE_REGS_AND_STACK_ACCESS_API # select HAVE_HW_BREAKPOINT if PERF_EVENTS
arch/hexagon/kernel/dma.c +11 -46
68 lines not on this page · raw message
Signature · 1 line
2.30.2
RE: [PATCH 7/7] hexagon: use the generic global coherent pool
Quoted 4 lines
-----Original Message-----
From: Christoph Hellwig <[email protected]>
...
Quoted 4 lines
Switch hexagon to use the generic code for
dma_alloc_coherentfrom a global pre-filled pool.Signed-off-by Christoph Hellwig <[email protected]>
Re: [PATCH 7/7] hexagon: use the generic global coherent pool
Thanks,
I've pulled the whole series into the dma-mapping for-next tree.
Quoted 6 lines
-----Original Message-----
From: Christoph Hellwig <[email protected]>
Sent: Monday, July 12, 2021 1:17 AM
To: [email protected]; Russell King
Quoted 11 lines
Brian Cain <[email protected]>
Cc: Dillon Min <[email protected]>; Vladimir Murzin <[email protected]>; [email protected]; linux- [email protected]; [email protected]
Subject: add support for the global coherent pool to the dma coreHi all,
this series adds support for using the global coherent (aka uncached) pool to the generic dma-direct code and then switches arm-nommu and hexagon over to it, together with a bunch of cleanups.
Christoph,
Thanks for sending this -- I will take a look and give some feedback soon.
Quoted 3 lines
Diffstat:
arch/arm/Kconfig | 5 - arch/arm/mm/dma-mapping-nommu.c | 173
+--------------------------------------
Quoted 6 lines
-
arch/hexagon/Kconfig | 1 arch/hexagon/kernel/dma.c | 57 ++----------- include/linux/dma-map-ops.h | 18 ++-- kernel/dma/Kconfig | 4 kernel/dma/coherent.c | 159
+++++++++++++++++-------------------
Quoted 2 lines
kernel/dma/direct.c | 15 +++ 8 files changed, 124 insertions(+), 308 deletions(-)
Quoted 7 lines · Brian Cain
Quoted 3 lines
this series adds support for using the global coherent (aka uncached) pool to the generic dma-direct code and then switches arm-nommu and hexagon over to it, together with a bunch of cleanups.
Christoph,
Thanks for sending this -- I will take a look and give some feedback soon.
Any chance you'll get to this in the next days? I'd love to merge this series for the current merge window with a little time in linux-next.
Any more comments?
Otherwise I'm going to pull this into the dma-mapping tree next week.