[PATCH 2/5] cpuidle: psci: Fix error path via converting to a platform driver

Sudeep Holla sudeep.holla at arm.com
Fri Jun 26 10:42:18 EDT 2020

On Mon, Jun 15, 2020 at 05:20:51PM +0200, Ulf Hansson wrote:
> The current error paths for the cpuidle-psci driver, may leak memory or
> possibly leave CPU devices attached to their PM domains. These are quite
> harmless issues, but still deserves to be taken care of.
> Although, rather than fixing them by keeping track of allocations that
> needs to be freed, which tends to become a bit messy, let's convert into a
> platform driver. In this way, it gets easier to fix the memory leaks as we
> can rely on the devm_* functions.
> Moreover, converting to a platform driver also enables support for deferred
> probe, which subsequent changes takes benefit from.

Though I don't have strong opinion, I don't like platform device for cpuidle.
But that's not main issue. I am more worried about the need for whole
deferred probe for cpuidle. Is this due to OSI and Qcom dependencies ?
Ideally, the firmware is already to accept suspend calls soon after they
are powered on in psci f/w.


More information about the linux-arm-kernel mailing list