Commit b9b11b13 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'dma-mapping-5.15-1' of git://git.infradead.org/users/hch/dma-mapping

Pull dma-mapping fixes from Christoph Hellwig:

 - page align size in sparc32 arch_dma_alloc (Andreas Larsson)

 - tone down a new dma-debug message (Hamza Mahfooz)

 - fix the kerneldoc for dma_map_sg_attrs (me)

* tag 'dma-mapping-5.15-1' of git://git.infradead.org/users/hch/dma-mapping:
  sparc32: page align size in arch_dma_alloc
  dma-debug: prevent an error message from causing runtime problems
  dma-mapping: fix the kerneldoc for dma_map_sg_attrs
parents 7639afad 59583f74
...@@ -356,7 +356,9 @@ void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, ...@@ -356,7 +356,9 @@ void *arch_dma_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle,
void arch_dma_free(struct device *dev, size_t size, void *cpu_addr, void arch_dma_free(struct device *dev, size_t size, void *cpu_addr,
dma_addr_t dma_addr, unsigned long attrs) dma_addr_t dma_addr, unsigned long attrs)
{ {
if (!sparc_dma_free_resource(cpu_addr, PAGE_ALIGN(size))) size = PAGE_ALIGN(size);
if (!sparc_dma_free_resource(cpu_addr, size))
return; return;
dma_make_coherent(dma_addr, size); dma_make_coherent(dma_addr, size);
......
...@@ -567,7 +567,8 @@ static void add_dma_entry(struct dma_debug_entry *entry) ...@@ -567,7 +567,8 @@ static void add_dma_entry(struct dma_debug_entry *entry)
pr_err("cacheline tracking ENOMEM, dma-debug disabled\n"); pr_err("cacheline tracking ENOMEM, dma-debug disabled\n");
global_disable = true; global_disable = true;
} else if (rc == -EEXIST) { } else if (rc == -EEXIST) {
pr_err("cacheline tracking EEXIST, overlapping mappings aren't supported\n"); err_printk(entry->dev, entry,
"cacheline tracking EEXIST, overlapping mappings aren't supported\n");
} }
} }
......
...@@ -207,6 +207,7 @@ static int __dma_map_sg_attrs(struct device *dev, struct scatterlist *sg, ...@@ -207,6 +207,7 @@ static int __dma_map_sg_attrs(struct device *dev, struct scatterlist *sg,
* dma_map_sg_attrs - Map the given buffer for DMA * dma_map_sg_attrs - Map the given buffer for DMA
* @dev: The device for which to perform the DMA operation * @dev: The device for which to perform the DMA operation
* @sg: The sg_table object describing the buffer * @sg: The sg_table object describing the buffer
* @nents: Number of entries to map
* @dir: DMA direction * @dir: DMA direction
* @attrs: Optional DMA attributes for the map operation * @attrs: Optional DMA attributes for the map operation
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment