diff options
author | Anton Blanchard <anton@samba.org> | 2010-12-07 09:36:05 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-12-08 23:35:32 -0500 |
commit | 4dfa9c474859629a2c4a3f8d29804d6a6c994908 (patch) | |
tree | 8d5866ae6388530ca5861ed07f9d795992331efe /arch/powerpc/kernel/iommu.c | |
parent | 7a9d12568e34e37a72d9e00ce01b62dec527e663 (diff) |
powerpc: iommu: Add device name to iommu error printks
Right now its difficult to see which device is running out of iommu space:
iommu_alloc failed, tbl c00000076e096660 vaddr c000000768806600 npages 1
Use dev_info() so we get the device name and location:
ipr 0000:00:01.0: iommu_alloc failed, tbl c00000076e096660 vaddr c000000768806600 npages 1
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/iommu.c')
-rw-r--r-- | arch/powerpc/kernel/iommu.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index d5839179ec77..961bb03413f3 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c | |||
@@ -311,8 +311,9 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | |||
311 | /* Handle failure */ | 311 | /* Handle failure */ |
312 | if (unlikely(entry == DMA_ERROR_CODE)) { | 312 | if (unlikely(entry == DMA_ERROR_CODE)) { |
313 | if (printk_ratelimit()) | 313 | if (printk_ratelimit()) |
314 | printk(KERN_INFO "iommu_alloc failed, tbl %p vaddr %lx" | 314 | dev_info(dev, "iommu_alloc failed, tbl %p " |
315 | " npages %lx\n", tbl, vaddr, npages); | 315 | "vaddr %lx npages %lu\n", tbl, vaddr, |
316 | npages); | ||
316 | goto failure; | 317 | goto failure; |
317 | } | 318 | } |
318 | 319 | ||
@@ -579,9 +580,9 @@ dma_addr_t iommu_map_page(struct device *dev, struct iommu_table *tbl, | |||
579 | attrs); | 580 | attrs); |
580 | if (dma_handle == DMA_ERROR_CODE) { | 581 | if (dma_handle == DMA_ERROR_CODE) { |
581 | if (printk_ratelimit()) { | 582 | if (printk_ratelimit()) { |
582 | printk(KERN_INFO "iommu_alloc failed, " | 583 | dev_info(dev, "iommu_alloc failed, tbl %p " |
583 | "tbl %p vaddr %p npages %d\n", | 584 | "vaddr %p npages %d\n", tbl, vaddr, |
584 | tbl, vaddr, npages); | 585 | npages); |
585 | } | 586 | } |
586 | } else | 587 | } else |
587 | dma_handle |= (uaddr & ~IOMMU_PAGE_MASK); | 588 | dma_handle |= (uaddr & ~IOMMU_PAGE_MASK); |
@@ -627,7 +628,8 @@ void *iommu_alloc_coherent(struct device *dev, struct iommu_table *tbl, | |||
627 | * the tce tables. | 628 | * the tce tables. |
628 | */ | 629 | */ |
629 | if (order >= IOMAP_MAX_ORDER) { | 630 | if (order >= IOMAP_MAX_ORDER) { |
630 | printk("iommu_alloc_consistent size too large: 0x%lx\n", size); | 631 | dev_info(dev, "iommu_alloc_consistent size too large: 0x%lx\n", |
632 | size); | ||
631 | return NULL; | 633 | return NULL; |
632 | } | 634 | } |
633 | 635 | ||