Skip to content

Commit 3fd9203

Browse files
committed
cpufreq: powernv: Set .set_boost directly
The boost feature can be controlled at two levels currently, driver level (applies to all policies) and per-policy. Currently the driver enables driver level boost support from the per-policy ->init() callback, which isn't really efficient as that gets called for each policy and then there is online/offline path too where this gets done unnecessarily. Instead set the .set_boost field directly and always enable the boost support. If a policy doesn't support boost feature, the core will not enable it for that policy. Keep the initial state of driver level boost to disabled and let the user enable it if required as ideally the boost frequencies must be used only when really required. Signed-off-by: Viresh Kumar <[email protected]>
1 parent 13e9235 commit 3fd9203

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/cpufreq/powernv-cpufreq.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,17 +1124,14 @@ static int __init powernv_cpufreq_init(void)
11241124
goto out;
11251125

11261126
if (powernv_pstate_info.wof_enabled)
1127-
powernv_cpufreq_driver.boost_enabled = true;
1127+
powernv_cpufreq_driver.set_boost = cpufreq_boost_set_sw;
11281128

11291129
rc = cpufreq_register_driver(&powernv_cpufreq_driver);
11301130
if (rc) {
11311131
pr_info("Failed to register the cpufreq driver (%d)\n", rc);
11321132
goto cleanup;
11331133
}
11341134

1135-
if (powernv_pstate_info.wof_enabled)
1136-
cpufreq_enable_boost_support();
1137-
11381135
register_reboot_notifier(&powernv_cpufreq_reboot_nb);
11391136
opal_message_notifier_register(OPAL_MSG_OCC, &powernv_cpufreq_opal_nb);
11401137

0 commit comments

Comments
 (0)