Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2225890imm; Thu, 18 Oct 2018 11:00:50 -0700 (PDT) X-Google-Smtp-Source: ACcGV6098kgMXA0sFZsMfKkr9Wri0AYQs/ww1b31mMte75IRS9xytWmfW0h1E9Al+BBbavF4DcVj X-Received: by 2002:a65:40c2:: with SMTP id u2-v6mr29419072pgp.123.1539885650596; Thu, 18 Oct 2018 11:00:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539885650; cv=none; d=google.com; s=arc-20160816; b=ugTm0dbQsfIvbsjcgvhwQVSTM/TzVb1YTsaHGc69Z107nKdUzkNZx77MCtIvzGqU2U F1qr8Zx9jvTSXg0ureSaNAHydkPDxiQKkBPzh3VRBafEyazu5L+3gOsCE28I6e6MCKCK 1SRbdT8qveNAE82bSHB2pWGHWuydq7Mtt4/8Jlv84tpSdIkLDpsO6AWNwF1Gh3nGLyyN 5lrtugcfMAGqO5yJarlzZDZc9/zanzON3lGRm85NWnDjbKE1X7Ucw0EYuFmNKW4SJD53 oAn8hR/wVO13PgJ3ybuxSzEX+EDwnAJ0iNlyJuinMLV6LtMrHg5ddJO1ivuoW1HGJ9Ge VJTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ox74fIWp/QwXRxbhAenEFK7MHW7cpe1HPmbeDI1Hn3w=; b=orZtUoXSPB9w9KDp9beZ/3kR6PzirA64qhZ1e3qGObRc2M0h3yTGAbKPmlzL/GRl0h z/GaD/QYRpLfLP6YATv5Wdl7AtzIHLHn4o+GQosjPiDuvWD7WnYCzqcZwNp7dlgZ+xm5 DjeBGjY86BVAaUaJJAz0KVpTki1S5FTQftdkPPBpicU3ecPPoZYSSa9cirVWrkewG8eJ 1/+sLlGZipIatjE78Ruk28xtLm3QufdH8QkrG6z2//AEO40xcssu2/qFAWJbRLR2B32T dDoM1/6s1MBtS99GPHaCPhDu/ocW+BlOLEn31DwY2VN+XRso1qhYiGF/Y6DZYZ4Jl7Rc ntDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2PJJokxd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5-v6si21781524pgh.364.2018.10.18.11.00.35; Thu, 18 Oct 2018 11:00:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2PJJokxd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728728AbeJSCBJ (ORCPT + 99 others); Thu, 18 Oct 2018 22:01:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:48786 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727608AbeJSCBJ (ORCPT ); Thu, 18 Oct 2018 22:01:09 -0400 Received: from localhost (ip-213-127-77-176.ip.prioritytelecom.net [213.127.77.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C1AF321473; Thu, 18 Oct 2018 17:59:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539885544; bh=zutqkF59nIVYBOTXf60RRb6y5wwy2F/x5ib8mK1rcPY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2PJJokxdsD9Z0OIy6cB5htli8DP3Oct8d7qp4k+w3+2+m318gPHcF4I1N5BHEQoFg TrmWvIiPNO31P/qnWIzLGuP+uAmVzEDGIaLB7CLK/d2yudN98F8L7eHN5DAjeWL0FH W6W8a2evR/FiJAFismprHBEoVGVEZsxgf2+k+OKw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Enric Balletbo i Serra , Heiko Stuebner , Marc Zyngier , Joerg Roedel , Sasha Levin Subject: [PATCH 4.18 43/53] iommu/rockchip: Free irqs in shutdown handler Date: Thu, 18 Oct 2018 19:54:36 +0200 Message-Id: <20181018175423.843074215@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181018175416.561567978@linuxfoundation.org> References: <20181018175416.561567978@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Heiko Stuebner [ 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 Fixes: 3fc7c5c0cff3 ("iommu/rockchip: Handle errors returned from PM framework") Signed-off-by: Heiko Stuebner Tested-by: Enric Balletbo i Serra Acked-by: Marc Zyngier Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/iommu/rockchip-iommu.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/drivers/iommu/rockchip-iommu.c +++ b/drivers/iommu/rockchip-iommu.c @@ -1242,6 +1242,12 @@ err_unprepare_clocks: 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); }