iommu: rockchip: Drop verbose prints in the interrupt handler
Subsystems (2)
PATCH 1/1 iommu: rockchip: Drop verbose prints in the interrupt handler
Printing verbosely via WARN macros and friends in interrupt handlers is strongly discouraged. Drop them and use proper ratelimited prints.
--- drivers/iommu/rockchip-iommu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/iommu/rockchip-iommu.c +6 -4
@@ -523,11 +523,13 @@ static irqreturn_t rk_iommu_irq(int irq, void *dev_id)irqreturn_t ret =IRQ_NONE ;int i; -if (WARN_ON (!pm_runtime_get_if_in_use (iommu->dev))) -return 0 ; +if (!pm_runtime_get_if_in_use (iommu->dev)) +return ret; -if (WARN_ON (clk_bulk_enable (iommu->num_clocks, iommu->clocks))) +if (clk_bulk_enable (iommu->num_clocks, iommu->clocks)) { +dev_err_ratelimited (iommu->dev,"couldn't enable clocks\n" ); goto out; + }for (i =0 ; i < iommu->num_mmu; i++) { int_status =rk_iommu_read (iommu->bases[i],RK_MMU_INT_STATUS );
@@ -544,7 +546,7 @@ static irqreturn_t rk_iommu_irq(int irq, void *dev_id) flags = (status &RK_MMU_STATUS_PAGE_FAULT_IS_WRITE ) ?IOMMU_FAULT_WRITE :IOMMU_FAULT_READ ; -dev_err (iommu->dev,"Page fault at %pad of type %s\n" , +dev_err_ratelimited (iommu->dev,"Page fault at %pad of type %s\n" , &iova, (flags ==IOMMU_FAULT_WRITE ) ?"write" :"read" );
Signature · 1 line
2.18.0
Heiko Stuebner
maintainerPATCH 1/1 iommu: rockchip: Drop verbose prints in the interrupt handler
Am Freitag, 31. August 2018, 00:28:32 CEST schrieb Ezequiel Garcia:
Quoted 5 lines
Printing verbosely via WARN macros and friends in interrupt handlers is strongly discouraged. Drop them and use proper ratelimited prints.
Signed-off-by Ezequiel Garcia <[email protected]>
Joerg Roedel
maintainerPATCH 1/1 iommu: rockchip: Drop verbose prints in the interrupt handler
In reply to Ezequiel GarciaQuoted 8 lines · Ezequiel Garcia
Printing verbosely via WARN macros and friends in interrupt handlers is strongly discouraged. Drop them and use proper ratelimited prints.
Signed-off-by Ezequiel Garcia <[email protected]>--- drivers/iommu/rockchip-iommu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
This doesn't apply cleanly to v4.19-rc5, can you please base the patch on that tag, add the Reviewed-by and re-send?
Thanks,
Joerg
PATCH 1/1 iommu: rockchip: Drop verbose prints in the interrupt handler
Quoted 5 lines · Joerg Roedel
Quoted 4 lines · Ezequiel Garcia
Printing verbosely via WARN macros and friends in interrupt handlers is strongly discouraged. Drop them and use proper ratelimited prints.
Quoted 8 lines
Quoted 4 lines
Signed-off-by Ezequiel Garcia <[email protected]>--- drivers/iommu/rockchip-iommu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)This doesn't apply cleanly to v4.19-rc5, can you please base the patch on that tag, add the Reviewed-by and re-send?
Well, after looking at the latest code, now I'm wondering why Marc changed the WARN_ON with a WARN_ON_ONCE, instead of a less verbose ratelimited print.
PATCH 1/1 iommu: rockchip: Drop verbose prints in the interrupt handler
Quoted 11 lines · Ezequiel Garcia
Quoted 10 lines · Joerg Roedel
Quoted 8 lines · Ezequiel Garcia
Printing verbosely via WARN macros and friends in interrupt handlers is strongly discouraged. Drop them and use proper ratelimited prints.
Signed-off-by Ezequiel Garcia <[email protected]>--- drivers/iommu/rockchip-iommu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
Quoted 7 lines
Quoted 3 lines
This doesn't apply cleanly to v4.19-rc5, can you please base the patch on that tag, add the Reviewed-by and re-send?
Well, after looking at the latest code, now I'm wondering why Marc changed the
WARN_ONwith aWARN_ON_ONCE, instead of a less verbose ratelimited print.
WARN_ONCE does it exactly once. A rate-limited printk will still spit as many messages as you want.
Thanks,
M.
Signature · 1 line
Jazz is not dead. It just smells funny...