From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Stuebner Subject: Re: [PATCH 2/2] iommu/rockchip: Move irq request past pm_runtime_enable Date: Tue, 07 Aug 2018 13:45:26 +0200 Message-ID: <2114757.JfhfUCyzvi@phil> References: <20180807085406.3863-1-marc.zyngier@arm.com> <20180807085406.3863-3-marc.zyngier@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20180807085406.3863-3-marc.zyngier-5wv7dgnIgG8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Marc Zyngier Cc: Jeffy Chen , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: iommu@lists.linux-foundation.org Am Dienstag, 7. August 2018, 10:54:06 CEST schrieb Marc Zyngier: > Enabling the interrupt early, before power has been applied to the > device, can result in an interrupt being delivered too early if: > > - the IOMMU shares an interrupt with a VOP > - the VOP has a pending interrupt (after a kexec, for example) > > In these conditions, we end-up taking the interrupt without > the IOMMU being ready to handle the interrupt (not powered on). > > Moving the interrupt request past the pm_runtime_enable() call > makes sure we can at least access the IOMMU registers. Note that > this is only a partial fix, and that the VOP interrupt will still > be screaming until the VOP driver kicks in, which advocates for > a more synchronized interrupt enabling/disabling approach. > > Fixes: 0f181d3cf7d98 ("iommu/rockchip: Add runtime PM support") > Signed-off-by: Marc Zyngier Reviewed-by: Heiko Stuebner