Re: [PATCH AUTOSEL 4.18 008/113] iommu/rockchip: Handle errors returned from PM framework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 30 Aug 2018 19:01:16 +0100,
Sasha Levin <Alexander.Levin@xxxxxxxxxxxxx> wrote:
> 
> From: Marc Zyngier <marc.zyngier@xxxxxxx>
> 
> [ 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 <heiko@xxxxxxxxx>
> Signed-off-by: Marc Zyngier <marc.zyngier@xxxxxxx>
> Signed-off-by: Olof Johansson <olof@xxxxxxxxx>
> Signed-off-by: Sasha Levin <alexander.levin@xxxxxxxxxxxxx>

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.

Thanks,

	M.

-- 
Jazz is not dead, it just smell funny.



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux