2023-12-27 15:21:47

by Konrad Dybcio

[permalink] [raw]
Subject: [PATCH] pmdomain: core: Move the unused cleanup to a _sync initcall

The unused clock cleanup uses the _sync initcall to give all users at
earlier initcalls time to probe. Do the same to avoid leaving some PDs
dangling at "on" (which actually happened on qcom!).

Fixes: 2fe71dcdfd10 ("PM / domains: Add late_initcall to disable unused PM domains")
Signed-off-by: Konrad Dybcio <[email protected]>
---
drivers/pmdomain/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c
index a1f6cba3ae6c..18e232b5ed53 100644
--- a/drivers/pmdomain/core.c
+++ b/drivers/pmdomain/core.c
@@ -1109,7 +1109,7 @@ static int __init genpd_power_off_unused(void)

return 0;
}
-late_initcall(genpd_power_off_unused);
+late_initcall_sync(genpd_power_off_unused);

#ifdef CONFIG_PM_SLEEP


---
base-commit: 39676dfe52331dba909c617f213fdb21015c8d10
change-id: 20231227-topic-pmdomain_sync_cleanup-ae73d04133ec

Best regards,
--
Konrad Dybcio <[email protected]>



2024-01-22 16:49:47

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH] pmdomain: core: Move the unused cleanup to a _sync initcall

On Wed, 27 Dec 2023 at 16:21, Konrad Dybcio <[email protected]> wrote:
>
> The unused clock cleanup uses the _sync initcall to give all users at
> earlier initcalls time to probe. Do the same to avoid leaving some PDs
> dangling at "on" (which actually happened on qcom!).
>
> Fixes: 2fe71dcdfd10 ("PM / domains: Add late_initcall to disable unused PM domains")
> Signed-off-by: Konrad Dybcio <[email protected]>

Applied for fixes and by adding a stable tag, thanks!

Kind regards
Uffe



> ---
> drivers/pmdomain/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c
> index a1f6cba3ae6c..18e232b5ed53 100644
> --- a/drivers/pmdomain/core.c
> +++ b/drivers/pmdomain/core.c
> @@ -1109,7 +1109,7 @@ static int __init genpd_power_off_unused(void)
>
> return 0;
> }
> -late_initcall(genpd_power_off_unused);
> +late_initcall_sync(genpd_power_off_unused);
>
> #ifdef CONFIG_PM_SLEEP
>
>
> ---
> base-commit: 39676dfe52331dba909c617f213fdb21015c8d10
> change-id: 20231227-topic-pmdomain_sync_cleanup-ae73d04133ec
>
> Best regards,
> --
> Konrad Dybcio <[email protected]>
>

2024-01-22 17:38:03

by Konrad Dybcio

[permalink] [raw]
Subject: Re: [PATCH] pmdomain: core: Move the unused cleanup to a _sync initcall

On 22.01.2024 16:21, Ulf Hansson wrote:
> On Wed, 27 Dec 2023 at 16:21, Konrad Dybcio <[email protected]> wrote:
>>
>> The unused clock cleanup uses the _sync initcall to give all users at
>> earlier initcalls time to probe. Do the same to avoid leaving some PDs
>> dangling at "on" (which actually happened on qcom!).
>>
>> Fixes: 2fe71dcdfd10 ("PM / domains: Add late_initcall to disable unused PM domains")
>> Signed-off-by: Konrad Dybcio <[email protected]>
>
> Applied for fixes and by adding a stable tag, thanks!

Right, this deserved a stable cc, thanks for taking care of this!

Konrad