From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-by2nam03on0136.outbound.protection.outlook.com ([104.47.42.136]:20608 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726142AbeIBRMG (ORCPT ); Sun, 2 Sep 2018 13:12:06 -0400 From: Sasha Levin To: Marc Zyngier CC: "stable@vger.kernel.org" , Olof Johansson Subject: Re: [PATCH AUTOSEL 4.18 008/113] iommu/rockchip: Handle errors returned from PM framework Date: Sun, 2 Sep 2018 12:56:21 +0000 Message-ID: <20180902063932.GG35539@sasha-vm> References: <20180830180050.35735-1-alexander.levin@microsoft.com> <20180830180050.35735-8-alexander.levin@microsoft.com> <86y3ckwdbi.wl-marc.zyngier@arm.com> In-Reply-To: <86y3ckwdbi.wl-marc.zyngier@arm.com> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-ID: <51D13D7F136FFA429473F73BF31C3BA1@namprd21.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: On Sun, Sep 02, 2018 at 08:47:29AM +0100, Marc Zyngier wrote: >On Thu, 30 Aug 2018 19:01:16 +0100, >Sasha Levin wrote: >> >> From: Marc Zyngier >> >> [ Upstream commit 3fc7c5c0cff3150e471f5fd12f59971c6d2c6513 ] >> >> 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") >> Reviewed-by: Heiko Stuebner >> Signed-off-by: Marc Zyngier >> Signed-off-by: Olof Johansson >> Signed-off-by: Sasha Levin > >Picking this patch on its own feels like a bad idea if CONFIG_PM is >not selected. Consider picking up 7db7a8f5638a and d1558dfd9f22 which >guarantee that things won't break. Grabbed those 2 as well, thanks!=