mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
powerpc: implement the DMA_ATTR_NO_WARN attribute
Add support for the DMA_ATTR_NO_WARN attribute on powerpc iommu code. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Mauricio Faria de Oliveira <[email protected]> Acked-by: Michael Ellerman <[email protected]> Cc: Keith Busch <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Krzysztof Kozlowski <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
a9a62c9384
commit
af8a24988e
1 changed files with 4 additions and 2 deletions
|
|
@ -479,7 +479,8 @@ int ppc_iommu_map_sg(struct device *dev, struct iommu_table *tbl,
|
|||
|
||||
/* Handle failure */
|
||||
if (unlikely(entry == DMA_ERROR_CODE)) {
|
||||
if (printk_ratelimit())
|
||||
if (!(attrs & DMA_ATTR_NO_WARN) &&
|
||||
printk_ratelimit())
|
||||
dev_info(dev, "iommu_alloc failed, tbl %p "
|
||||
"vaddr %lx npages %lu\n", tbl, vaddr,
|
||||
npages);
|
||||
|
|
@ -776,7 +777,8 @@ dma_addr_t iommu_map_page(struct device *dev, struct iommu_table *tbl,
|
|||
mask >> tbl->it_page_shift, align,
|
||||
attrs);
|
||||
if (dma_handle == DMA_ERROR_CODE) {
|
||||
if (printk_ratelimit()) {
|
||||
if (!(attrs & DMA_ATTR_NO_WARN) &&
|
||||
printk_ratelimit()) {
|
||||
dev_info(dev, "iommu_alloc failed, tbl %p "
|
||||
"vaddr %p npages %d\n", tbl, vaddr,
|
||||
npages);
|
||||
|
|
|
|||
Loading…
Reference in a new issue