Commit b9b11b13 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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,
		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;

	dma_make_coherent(dma_addr, size);
+2 −1
Original line number Diff line number Diff line
@@ -567,7 +567,8 @@ static void add_dma_entry(struct dma_debug_entry *entry)
		pr_err("cacheline tracking ENOMEM, dma-debug disabled\n");
		global_disable = true;
	} 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");
	}
}

+2 −1
Original line number Diff line number Diff line
@@ -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
 * @dev:	The device for which to perform the DMA operation
 * @sg:		The sg_table object describing the buffer
 * @nents:	Number of entries to map
 * @dir:	DMA direction
 * @attrs:	Optional DMA attributes for the map operation
 *