From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Heiko Stuebner <heiko@sntech.de>, Joerg Roedel <jroedel@suse.de>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH AUTOSEL 4.18 3/8] iommu/rockchip: Free irqs in shutdown handler
Date: Thu, 25 Oct 2018 10:10:24 -0400 [thread overview]
Message-ID: <20181025141029.213274-3-sashal@kernel.org> (raw)
In-Reply-To: <20181025141029.213274-1-sashal@kernel.org>
From: Heiko Stuebner <heiko@sntech.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@collabora.com>
Fixes: 3fc7c5c0cff3 ("iommu/rockchip: Handle errors returned from PM framework")
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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
next prev parent reply other threads:[~2018-10-25 14:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-25 14:10 [PATCH AUTOSEL 4.18 1/8] x86/paravirt: Fix some warning messages Sasha Levin
2018-10-25 14:10 ` [PATCH AUTOSEL 4.18 2/8] libertas: call into generic suspend code before turning off power Sasha Levin
2018-10-25 14:10 ` Sasha Levin [this message]
2018-10-25 14:10 ` [PATCH AUTOSEL 4.18 4/8] powerpc/numa: Skip onlining a offline node in kdump path Sasha Levin
2018-10-25 14:10 ` [PATCH AUTOSEL 4.18 5/8] powerpc/numa: Use associativity if VPHN hcall is successful Sasha Levin
2018-10-25 14:10 ` [PATCH AUTOSEL 4.18 6/8] perf report: Don't try to map ip to invalid map Sasha Levin
2018-10-25 14:10 ` [PATCH AUTOSEL 4.18 7/8] tls: Fix improper revert in zerocopy_from_iter Sasha Levin
2018-10-25 14:10 ` [PATCH AUTOSEL 4.18 8/8] HID: i2c-hid: Remove RESEND_REPORT_DESCR quirk and its handling Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181025141029.213274-3-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=heiko@sntech.de \
--cc=jroedel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox