swiotlb: Rate-limit printing when running out of SW-IOMMU space
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 31 Oct 2016 15:45:03 +0000 (16:45 +0100)
committerKonrad Rzeszutek Wilk <konrad@kernel.org>
Mon, 7 Nov 2016 20:06:26 +0000 (15:06 -0500)
commit0d2e18985a99bc8ff9ef260a7e10e6fcdc159f2a
tree0b468b5601fc48b09c1ca8930988b64475865e3d
parentc8d2bc9bc39ebea8437fd974fdbc21847bb897a3
swiotlb: Rate-limit printing when running out of SW-IOMMU space

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>
Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
lib/swiotlb.c