Shawn Guo
d511caa25d
cpuidle: psci: Iterate backwards over list in psci_pd_remove()
commit 6b0313c2fa 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: a65a397f24 ("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
..
2023-01-24 07:24:37 +01:00
2023-03-22 13:34:04 +01:00
2022-11-09 15:41:27 +01:00
2023-03-10 09:32:32 +01:00
2023-03-11 13:55:16 +01:00
2023-03-11 13:55:39 +01:00
2023-03-22 13:33:47 +01:00
2023-03-10 09:33:53 +01:00
2023-03-17 08:50:19 +01:00
2023-03-17 08:50:30 +01:00
2023-03-22 13:33:40 +01:00
2023-03-10 09:33:03 +01:00
2023-01-24 07:24:35 +01:00
2022-12-31 13:32:41 +01:00
2023-03-10 09:33:01 +01:00
2023-03-22 13:34:04 +01:00
2023-03-10 09:34:19 +01:00
2023-03-10 09:34:20 +01:00
2023-03-10 09:34:25 +01:00
2023-01-07 11:11:40 +01:00
2022-12-31 13:32:38 +01:00
2023-03-10 09:33:39 +01:00
2023-02-09 11:28:23 +01:00
2023-02-01 08:34:40 +01:00
2022-12-31 13:32:39 +01:00
2023-02-09 11:27:59 +01:00
2023-03-22 13:33:56 +01:00
2023-03-10 09:33:34 +01:00
2023-02-09 11:28:04 +01:00
2023-03-10 09:33:18 +01:00
2023-03-22 13:34:01 +01:00
2023-03-17 08:50:17 +01:00
2022-12-31 13:32:45 +01:00
2023-02-09 11:28:21 +01:00
2023-03-22 13:33:52 +01:00
2023-03-10 09:33:31 +01:00
2023-03-10 09:33:29 +01:00
2023-03-10 09:32:36 +01:00
2023-03-11 13:55:35 +01:00
2023-03-11 13:55:40 +01:00
2023-03-17 08:50:19 +01:00
2023-03-22 13:33:58 +01:00
2023-03-11 13:55:40 +01:00
2023-03-10 09:33:07 +01:00
2023-02-09 11:28:04 +01:00
2023-03-10 09:33:26 +01:00
2023-03-17 08:50:31 +01:00
2022-12-31 13:32:55 +01:00
2022-12-31 13:32:41 +01:00
2023-03-22 13:33:58 +01:00
2023-03-22 13:33:53 +01:00
2023-03-22 13:33:56 +01:00
2022-12-31 13:32:25 +01:00
2023-03-11 13:55:32 +01:00
2023-03-11 13:55:39 +01:00
2023-03-22 13:34:03 +01:00
2023-03-11 13:55:21 +01:00
2023-03-22 13:34:04 +01:00
2023-03-22 13:33:46 +01:00
2023-03-10 09:34:20 +01:00
2023-03-22 13:34:02 +01:00
2023-02-09 11:28:25 +01:00
2023-02-22 12:59:46 +01:00
2023-03-10 09:33:01 +01:00
2023-01-07 11:11:55 +01:00
2022-11-09 15:40:32 +01:00
2023-03-22 13:33:45 +01:00
2023-02-01 08:34:49 +01:00
2023-03-11 13:55:40 +01:00
2023-03-10 09:33:59 +01:00
2023-03-17 08:50:27 +01:00
2022-12-31 13:31:56 +01:00
2023-03-10 09:33:36 +01:00
2023-03-10 09:32:56 +01:00
2023-03-11 13:55:25 +01:00
2023-03-11 13:55:17 +01:00
2022-12-31 13:32:00 +01:00
2023-03-10 09:34:25 +01:00
2023-03-10 09:34:26 +01:00
2023-02-01 08:34:05 +01:00
2023-03-10 09:33:45 +01:00
2023-03-11 13:55:30 +01:00
2023-03-10 09:33:02 +01:00
2023-03-22 13:33:43 +01:00
2022-11-09 15:40:14 +01:00
2022-11-10 18:45:40 +01:00
2023-03-22 13:33:53 +01:00
2023-03-11 13:55:40 +01:00
2023-03-17 08:50:20 +01:00
2023-03-17 08:50:16 +01:00
2023-02-09 11:28:12 +01:00
2022-11-17 09:22:12 +01:00
2023-03-11 13:55:32 +01:00
2023-01-24 07:24:37 +01:00
2023-03-22 13:33:55 +01:00
2023-03-10 09:34:00 +01:00
2022-12-31 13:32:38 +01:00
2023-03-11 13:55:44 +01:00
2023-03-22 13:34:03 +01:00
2023-03-10 09:34:32 +01:00
2023-03-22 13:33:44 +01:00
2023-03-22 13:34:04 +01:00
2023-03-10 09:34:14 +01:00
2023-01-24 07:24:31 +01:00
2023-02-01 08:34:26 +01:00
2023-03-11 13:55:24 +01:00
2023-03-10 09:33:02 +01:00