Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1512640
| From | Geert Uytterhoeven <geert+renesas@glider.be> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/2] swiotlb: Rate-limit printing when running out of SW-IOMMU space |
| Date | 2016-10-31 16:50 +0100 |
| Message-ID | <syn0u-4i5-15@gated-at.bofh.it> (permalink) |
| References | <syn0t-4i5-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
If the system runs out of SW-IOMMU space, changes are high successive requests will fail, too, flooding the kernel log. This is true especially for streaming DMA, which is typically used repeatedly outside the driver's initialization routine. Add rate-limiting to fix this. While at it, get rid of the open-coded dev_name() handling by using the appropriate dev_err_*() variant. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> --- lib/swiotlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 22e13a0e19d76a2b..6ce764410ae475cc 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -714,8 +714,8 @@ void swiotlb_tbl_sync_single(struct device *hwdev, phys_addr_t tlb_addr, * When the mapping is small enough return a static buffer to limit * the damage, or panic when the transfer is too big. */ - printk(KERN_ERR "DMA: Out of SW-IOMMU space for %zu bytes at " - "device %s\n", size, dev ? dev_name(dev) : "?"); + dev_err_ratelimited(dev, "DMA: Out of SW-IOMMU space for %zu bytes\n", + size); if (size <= io_tlb_overflow || !do_panic) return; -- 1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/2] swiotlb: Rate-limit printing and 64-bit memory debugging Geert Uytterhoeven <geert+renesas@glider.be> - 2016-10-31 16:50 +0100
[PATCH 1/2] swiotlb: Rate-limit printing when running out of SW-IOMMU space Geert Uytterhoeven <geert+renesas@glider.be> - 2016-10-31 16:50 +0100
Re: [PATCH 1/2] swiotlb: Rate-limit printing when running out of SW-IOMMU space Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-10-31 17:10 +0100
Re: [PATCH 1/2] swiotlb: Rate-limit printing when running out of SW-IOMMU space Konrad Rzeszutek Wilk <konrad@darnok.org> - 2016-11-05 20:50 +0100
[PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option Geert Uytterhoeven <geert+renesas@glider.be> - 2016-10-31 16:50 +0100
Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option Robin Murphy <robin.murphy@arm.com> - 2016-10-31 18:50 +0100
Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option Geert Uytterhoeven <geert@linux-m68k.org> - 2016-10-31 19:30 +0100
Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option Robin Murphy <robin.murphy@arm.com> - 2016-11-01 12:50 +0100
Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option Geert Uytterhoeven <geert@linux-m68k.org> - 2016-11-07 16:50 +0100
Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option Robin Murphy <robin.murphy@arm.com> - 2016-11-07 18:20 +0100
Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> - 2016-10-31 19:00 +0100
Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option Geert Uytterhoeven <geert@linux-m68k.org> - 2016-11-07 20:20 +0100
Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> - 2016-11-07 20:30 +0100
csiph-web