summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Loehle <christian.loehle@arm.com>2024-11-09 00:24:14 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-05 14:01:19 +0100
commitbffbf66b636303f00cd69ac6f2c0ac28dcc617ba (patch)
treebcb2f856d20d017d96b04a0859b0491c1a8470e7
parent494eb595a79a17e636ceee4374486485b49dba9f (diff)
sched/cpufreq: Ensure sd is rebuilt for EAS check
[ Upstream commit 70d8b6485b0bcd135b6699fc4252d2272818d1fb ] Ensure sugov_eas_rebuild_sd() is always called when sugov_init() succeeds. The out goto initialized sugov without forcing the rebuild. Previously the missing call to sugov_eas_rebuild_sd() could lead to EAS not being enabled on boot when it should have been, because it requires all policies to be controlled by schedutil while they might not have been initialized yet. Fixes: e7a1b32e43b1 ("cpufreq: Rebuild sched-domains when removing cpufreq driver") Signed-off-by: Christian Loehle <christian.loehle@arm.com> Link: https://patch.msgid.link/35e572d9-1152-406a-9e34-2525f7548af9@arm.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--kernel/sched/cpufreq_schedutil.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index c6ba15388ea7..28c77904ea74 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -783,9 +783,8 @@ static int sugov_init(struct cpufreq_policy *policy)
if (ret)
goto fail;
- sugov_eas_rebuild_sd();
-
out:
+ sugov_eas_rebuild_sd();
mutex_unlock(&global_tunables_lock);
return 0;