[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181008152523.70705-52-sashal@kernel.org>
Date: Mon, 8 Oct 2018 11:25:17 -0400
From: Sasha Levin <sashal@...nel.org>
To: stable@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Heiko Stuebner <heiko@...ech.de>, Joerg Roedel <jroedel@...e.de>,
Sasha Levin <alexander.levin@...rosoft.com>
Subject: [PATCH AUTOSEL 4.18 52/58] iommu/rockchip: Free irqs in shutdown handler
From: Heiko Stuebner <heiko@...ech.de>
[ Upstream commit 74bc2abca7603c956d1e331e8b9bee7b874c1eec ]
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@...labora.com>
Fixes: 3fc7c5c0cff3 ("iommu/rockchip: Handle errors returned from PM framework")
Signed-off-by: Heiko Stuebner <heiko@...ech.de>
Tested-by: Enric Balletbo i Serra <enric.balletbo@...labora.com>
Acked-by: Marc Zyngier <marc.zyngier@....com>
Signed-off-by: Joerg Roedel <jroedel@...e.de>
Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
---
drivers/iommu/rockchip-iommu.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c
index 2b1724e8d307..701820b39fd1 100644
--- a/drivers/iommu/rockchip-iommu.c
+++ b/drivers/iommu/rockchip-iommu.c
@@ -1242,6 +1242,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);
+
pm_runtime_force_suspend(&pdev->dev);
}
--
2.17.1
Powered by blists - more mailing lists