[PATCH] cpuidle: psci: Avoid initializing faux device if no DT idle states are present
Sudeep Holla
sudeep.holla at arm.com
Fri May 2 08:50:30 PDT 2025
On Fri, May 02, 2025 at 05:16:48PM +0200, Ulf Hansson wrote:
> On Fri, 2 May 2025 at 16:01, Sudeep Holla <sudeep.holla at arm.com> wrote:
> >
> > Commit af5376a77e87 ("cpuidle: psci: Transition to the faux device interface")
> > transitioned the PSCI cpuidle driver from using a platform device to the
> > faux device framework. However, unlike platform devices, the faux device
> > infrastructure logs an error when the probe function fails, even if the
> > failure is intentional or expected.
> >
> > To prevent unnecessary error logs, we can skip creating the faux device
> > entirely if there are no PSCI idle states defined in the device tree.
> > Introduce a check for DT idle states during initialization and avoid
> > setting up the device if none are found.
> >
> > This ensures cleaner logs and avoids misleading probe failure messages
> > when PSCI idle support is intentionally not described in DT.
> >
> > Cc: Lorenzo Pieralisi <lpieralisi at kernel.org>
> > Cc: Ulf Hansson <ulf.hansson at linaro.org>
> > Cc: "Rafael J. Wysocki" <rafael at kernel.org>
> > Fixes: af5376a77e87 ("cpuidle: psci: Transition to the faux device interface")
> > Reported-by: Jon Hunter <jonathanh at nvidia.com>
> > Closes: https://lore.kernel.org/r/cf4e70e4-9fe5-4697-8744-8c12c41b5ff9@nvidia.com
> > Signed-off-by: Sudeep Holla <sudeep.holla at arm.com>
>
> Reviewed-by: Ulf Hansson <ulf.hansson at linaro.org>
>
> Rafael, please pick this one.
>
> BTW, I was not cced the original offending commit and it was funneld
> via Rafael's tree. No worries this time, but probably easier to stick
> with my pmdomain tree future wise, to avoid any churns. This is also
> reflected in MAINTAINERS.
>
Understood. The original patch was part of the series and I seem to have
missed you on it. Sorry for that.
--
Regards,
Sudeep
More information about the linux-arm-kernel
mailing list