Shawn Guo
d511caa25d
cpuidle: psci: Iterate backwards over list in psci_pd_remove()
...
commit 6b0313c2fa3d2cf991c9ffef6fae6e7ef592ce6d upstream.
In case that psci_pd_init_topology() fails for some reason,
psci_pd_remove() will be responsible for deleting provider and removing
genpd from psci_pd_providers list. There will be a failure when removing
the cluster PD, because the cpu (child) PDs haven't been removed.
[ 0.050232] CPUidle PSCI: init PM domain cpu0
[ 0.050278] CPUidle PSCI: init PM domain cpu1
[ 0.050329] CPUidle PSCI: init PM domain cpu2
[ 0.050370] CPUidle PSCI: init PM domain cpu3
[ 0.050422] CPUidle PSCI: init PM domain cpu-cluster0
[ 0.050475] PM: genpd_remove: unable to remove cpu-cluster0
[ 0.051412] PM: genpd_remove: removed cpu3
[ 0.051449] PM: genpd_remove: removed cpu2
[ 0.051499] PM: genpd_remove: removed cpu1
[ 0.051546] PM: genpd_remove: removed cpu0
Fix the problem by iterating the provider list reversely, so that parent
PD gets removed after child's PDs like below.
[ 0.029052] CPUidle PSCI: init PM domain cpu0
[ 0.029076] CPUidle PSCI: init PM domain cpu1
[ 0.029103] CPUidle PSCI: init PM domain cpu2
[ 0.029124] CPUidle PSCI: init PM domain cpu3
[ 0.029151] CPUidle PSCI: init PM domain cpu-cluster0
[ 0.029647] PM: genpd_remove: removed cpu0
[ 0.029666] PM: genpd_remove: removed cpu1
[ 0.029690] PM: genpd_remove: removed cpu2
[ 0.029714] PM: genpd_remove: removed cpu3
[ 0.029738] PM: genpd_remove: removed cpu-cluster0
Fixes: a65a397f2451 ("cpuidle: psci: Add support for PM domains by using genpd")
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: 5.10+ <stable@vger.kernel.org> # 5.10+
Signed-off-by: Rafael J. Wysocki <rjw@rjwysocki.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-03-22 13:34:04 +01:00
..
2022-06-14 16:01:35 +02:00
2022-08-31 20:54:01 +02:00
2020-05-19 12:58:07 +02:00
2022-06-10 14:51:35 +02:00
2020-10-26 10:15:24 +01:00
2019-05-30 11:29:52 -07:00
2019-12-20 10:04:27 +01:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2022-03-09 19:59:45 +01:00
2022-06-10 14:51:35 +02:00
2022-08-31 21:09:54 +02:00
2023-03-22 13:34:04 +01:00
2022-07-05 13:32:59 -07:00
2022-03-10 09:29:44 -08:00
2021-08-04 10:53:38 +10:00
2022-02-03 21:54:48 -06:00
2022-09-23 03:56:00 -07:00
2021-10-05 19:11:40 +02:00
2021-08-16 13:42:34 +01:00
2019-05-30 11:29:52 -07:00
2022-08-08 14:29:00 -07:00
2019-09-11 17:36:30 +02:00
2021-04-07 19:26:44 +02:00
2022-03-10 09:29:44 -08:00
2022-03-10 09:29:44 -08:00
2022-12-31 13:31:55 +01:00
2017-11-02 11:10:55 +01:00
2022-09-03 20:14:51 +02:00
2022-03-10 09:29:51 -08:00
2023-03-10 09:34:22 +01:00
2019-05-21 10:50:46 +02:00
2019-05-21 10:50:46 +02:00
2022-03-10 09:29:51 -08:00
2022-03-10 09:29:51 -08:00
2019-11-29 11:48:39 +01:00
2022-01-05 18:31:17 +01:00