iommu/rockchip: Free irqs in shutdown handler

A patch from »iommu/rockchip: Free irqs in shutdown handler« in state Mainline for linux-kernel

From: Heiko Stuebner <heiko@...> Date: Mon, 27 Aug 2018 12:49:19 +0200


In the iommu's shutdown handler we disable runtime-pm which could result in the irq-handler running unclocked and since commit 3fc7c5c0cff3 ("iommu/rockchip: Handle errors returned from PM framework") we warn about that fact. This can cause warnings on shutdown on some Rockchip machines, so free the irqs in the shutdown handler before we disable runtime-pm. Reported-by: Enric Balletbo i Serra <enric.balletbo@...> Fixes: 3fc7c5c0cff3 ("iommu/rockchip: Handle errors returned from PM framework") Signed-off-by: Heiko Stuebner <heiko@...>


drivers/iommu/rockchip-iommu.c | 6 ++++++ 1 file changed, 6 insertions(+)


  • 6 lines added
  • 0 lines removed


------------------------ drivers/iommu/rockchip-iommu.c ------------------------
index 258115b10fa9..ad3e2b97469e 100644
@@ -1241,6 +1241,12 @@ static int rk_iommu_probe(struct platform_device *pdev)
static void rk_iommu_shutdown(struct platform_device *pdev)
+ struct rk_iommu *iommu = platform_get_drvdata(pdev);
+ int i = 0, irq;
+ while ((irq = platform_get_irq(pdev, i++)) != -ENXIO)
+ devm_free_irq(iommu->dev, irq, iommu);

Recent Patches

About Us

Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec metus placerat consectetuer.