Skip to content

Commit

Permalink
Merge tag 'dma-mapping-5.15-1' of git://git.infradead.org/users/hch/d…
Browse files Browse the repository at this point in the history
…ma-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
  • Loading branch information
Linus Torvalds committed Sep 17, 2021
2 parents 7639afa + 59583f7 commit b9b11b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion arch/sparc/kernel/ioport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion kernel/dma/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}

Expand Down
3 changes: 2 additions & 1 deletion kernel/dma/mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* @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
* @attrs: Optional DMA attributes for the map operation
*
Expand Down

0 comments on commit b9b11b1

Please sign in to comment.