* [PATCH] powerpc: iommu: Add device name to iommu error printks
@ 2010-12-08 0:36 Anton Blanchard
2010-12-09 7:07 ` Olof Johansson
0 siblings, 1 reply; 2+ messages in thread
From: Anton Blanchard @ 2010-12-08 0:36 UTC (permalink / raw)
To: benh, linuxppc-dev
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>
---
Index: powerpc.git/arch/powerpc/kernel/iommu.c
===================================================================
--- powerpc.git.orig/arch/powerpc/kernel/iommu.c 2010-12-08 11:28:39.055483332 +1100
+++ powerpc.git/arch/powerpc/kernel/iommu.c 2010-12-08 11:30:54.569176185 +1100
@@ -311,8 +311,9 @@ int iommu_map_sg(struct device *dev, str
/* Handle failure */
if (unlikely(entry == DMA_ERROR_CODE)) {
if (printk_ratelimit())
- printk(KERN_INFO "iommu_alloc failed, tbl %p vaddr %lx"
- " npages %lx\n", tbl, vaddr, npages);
+ dev_info(dev, "iommu_alloc failed, tbl %p "
+ "vaddr %lx npages %lu\n", tbl, vaddr,
+ npages);
goto failure;
}
@@ -579,9 +580,9 @@ dma_addr_t iommu_map_page(struct device
attrs);
if (dma_handle == DMA_ERROR_CODE) {
if (printk_ratelimit()) {
- printk(KERN_INFO "iommu_alloc failed, "
- "tbl %p vaddr %p npages %d\n",
- tbl, vaddr, npages);
+ dev_info(dev, "iommu_alloc failed, tbl %p "
+ "vaddr %p npages %d\n", tbl, vaddr,
+ npages);
}
} else
dma_handle |= (uaddr & ~IOMMU_PAGE_MASK);
@@ -627,7 +628,8 @@ void *iommu_alloc_coherent(struct device
* the tce tables.
*/
if (order >= IOMAP_MAX_ORDER) {
- printk("iommu_alloc_consistent size too large: 0x%lx\n", size);
+ dev_info(dev, "iommu_alloc_consistent size too large: 0x%lx\n",
+ size);
return NULL;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc: iommu: Add device name to iommu error printks
2010-12-08 0:36 [PATCH] powerpc: iommu: Add device name to iommu error printks Anton Blanchard
@ 2010-12-09 7:07 ` Olof Johansson
0 siblings, 0 replies; 2+ messages in thread
From: Olof Johansson @ 2010-12-09 7:07 UTC (permalink / raw)
To: Anton Blanchard; +Cc: linuxppc-dev
On Wed, Dec 08, 2010 at 11:36:05AM +1100, Anton Blanchard wrote:
>
> 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>
Acked-by: Olof Johansson <olof@lixom.net>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-09 7:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-08 0:36 [PATCH] powerpc: iommu: Add device name to iommu error printks Anton Blanchard
2010-12-09 7:07 ` Olof Johansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).