linux-stable/drivers/cpuidle
Ulf Hansson fff6b31b49 cpuidle: dt: Return the correct numbers of parsed idle states
[ Upstream commit ee3c2c8ad6 ]

While we correctly skips to initialize an idle state from a disabled idle
state node in DT, the returned value from dt_init_idle_driver() don't get
adjusted accordingly. Instead the number of found idle state nodes are
returned, while the callers are expecting the number of successfully
initialized idle states from DT.

This leads to cpuidle drivers unnecessarily continues to initialize their
idle state specific data. Moreover, in the case when all idle states have
been disabled in DT, we would end up registering a cpuidle driver, rather
than relying on the default arch specific idle call.

Fixes: 9f14da3455 ("drivers: cpuidle: implement DT based idle states infrastructure")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-18 11:30:04 +01:00
..
governors cpuidle: menu: Fix wakeup statistics updates for polling state 2019-11-24 08:20:07 +01:00
Kconfig
Kconfig.arm
Kconfig.mips
Kconfig.powerpc
Makefile
coupled.c
cpuidle-arm.c ARM: cpuidle: Don't register the driver when back-end init returns -ENXIO 2018-11-21 09:19:23 +01:00
cpuidle-at91.c
cpuidle-big_little.c cpuidle: big.LITTLE: fix refcount leak 2019-02-12 19:47:08 +01:00
cpuidle-calxeda.c
cpuidle-clps711x.c
cpuidle-cps.c
cpuidle-exynos.c
cpuidle-kirkwood.c
cpuidle-mvebu-v7.c
cpuidle-powernv.c powernv/cpuidle: Use parsed device tree values for cpuidle_init 2018-07-31 19:56:44 +10:00
cpuidle-pseries.c powerpc/pseries/cpuidle: Fix preempt warning 2019-01-26 09:32:37 +01:00
cpuidle-ux500.c
cpuidle-zynq.c
cpuidle.c cpuidle: Fixup IRQ state 2020-09-09 19:04:23 +02:00
cpuidle.h
driver.c cpuidle: Do not unset the driver if it is there already 2019-12-17 20:35:00 +01:00
dt_idle_states.c cpuidle: dt: Return the correct numbers of parsed idle states 2023-01-18 11:30:04 +01:00
dt_idle_states.h
governor.c
poll_state.c cpuidle: menu: Fix wakeup statistics updates for polling state 2019-11-24 08:20:07 +01:00
sysfs.c cpuidle: Fix kobject memory leaks in error paths 2021-11-26 11:36:08 +01:00