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
This commit is contained in:
@@ -356,7 +356,9 @@ err_nomem:
|
|||||||
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)
|
|||||||
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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -206,7 +206,8 @@ 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
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user