Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3727675imm; Mon, 8 Oct 2018 08:35:20 -0700 (PDT) X-Google-Smtp-Source: ACcGV63PwXDMXFVWgdcnIIMCVltEC+dToc6LtRzFrVBxOnvwedbrQ8/oP6oeqEobteJtY1lQEAI5 X-Received: by 2002:a62:7788:: with SMTP id s130-v6mr25648609pfc.189.1539012920228; Mon, 08 Oct 2018 08:35:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539012920; cv=none; d=google.com; s=arc-20160816; b=UuWTbcKEd/cHenkDm17kdbRXV0rvWw8nAX2rO/UMm5AnO7WijzBQuClxaz3Sm4ICJX hFutfz9kTK0B5iVyadOUrOufzmTmjfxixRIZjdHtKFjT8y9eRbuarrt6Pmk4g9n03EnH gYGX3GEvI9ICGs/XhjjLkl+GMXlzIIPjrVE8YGf5zlfpxNwPp/5ZA4naNYF3UpxBVrE+ yC3dPweJB9RwgXVZPNiQPK/svd4nQf50Eika9H14tcxYV2Tlb4ZwhkTeCp4pf3uXsKhq nXJfnvnQdWcA9rjHGKtwsqR9t0LsMlMRFqmtLhHSXWA/prbitv/nYPTYn/yX0b2cb527 uLtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=bj9H0n6S1OvZueoS//UFRxMMzn3lCqLxvMKKEJwT0wM=; b=x86RVhCgMzzd+Ynj89MZ8Oj2wlEo/fNS9UW6G8eRF/iVZybjtShD98MWdG/Wn77Dda kBqJ+ZnshQbtkbt80/7VmkjO/ZtVoaJ25Pj8tesGSEGO0xgqThqt7rXDquOUhayx527g XXRG0sRHrKW6vDxpK6HGm55K4Dk9k8cTVYWq2lMrwmwQCjNj06832jdyAV2Qpvp3cI/R Mzjgn8BRNGhjM30BD+E+dnSG+HR5cfJlfotixkfQd2Q0q02wF1n9TJJDcd5tIFFqNAW7 S/F3dhrqPZMWo6I1ABJfiXULOIeHtDIhVfGi1th9TO8ybElKzGxxUoSvy+gAsJ+LYfuT kGvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=a4ng2kDK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x10-v6si17183071plo.100.2018.10.08.08.35.05; Mon, 08 Oct 2018 08:35:20 -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=a4ng2kDK; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728082AbeJHWib (ORCPT + 99 others); Mon, 8 Oct 2018 18:38:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:57114 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728066AbeJHWia (ORCPT ); Mon, 8 Oct 2018 18:38:30 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3F42C214FA; Mon, 8 Oct 2018 15:26:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539012375; bh=wE0d+Xpm740wxksxowzwVpuhsYdIKCoXXe7w+ze4l6M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a4ng2kDKrhnYJPH3Lz0rRQ2GqzB9FB0GzFM5aJsoQqbXx1WhyQ9n6JJdFopsknp4H 1+xDQqxe5WEoxBbGIdLj8t80lPnYSRuDy2p5olg6tW9faXDkmAmJnUQ8WVxsbH+S/r 1ju/yQyVXLyXDMHgDG4FDupmECxFkthhVmbf2BqI= From: Sasha Levin To: stable@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Heiko Stuebner , Joerg Roedel , Sasha Levin Subject: [PATCH AUTOSEL 4.18 52/58] iommu/rockchip: Free irqs in shutdown handler Date: Mon, 8 Oct 2018 11:25:17 -0400 Message-Id: <20181008152523.70705-52-sashal@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181008152523.70705-1-sashal@kernel.org> References: <20181008152523.70705-1-sashal@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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