From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Stuebner Subject: Re: [PATCH 1/2] iommu/rockchip: Handle errors returned from PM framework Date: Wed, 08 Aug 2018 08:33:54 +0200 Message-ID: <1943708.zxIcSzHDJ6@phil> References: <20180807085406.3863-1-marc.zyngier@arm.com> <20180807085406.3863-2-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-2-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:05 CEST schrieb Marc Zyngier: > pm_runtime_get_if_in_use can fail: either PM has been disabled > altogether (-EINVAL), or the device hasn't been enabled yet (0). > Sadly, the Rockchip IOMMU driver tends to conflate the two things > by considering a non-zero return value as successful. > > This has the consequence of hiding other bugs, so let's handle this > case throughout the driver, with a WARN_ON_ONCE so that we can try > and work out what happened. > > Fixes: 0f181d3cf7d98 ("iommu/rockchip: Add runtime PM support") > Signed-off-by: Marc Zyngier With Rockchip platforms always selecting PM [see other longer thread in reply to the patch] Reviewed-by: Heiko Stuebner