From b96b83d10ef7e2e3405fca8517ecd084c059cee0 Mon Sep 17 00:00:00 2001 From: Scott Jones Date: Sat, 14 Nov 2026 10:38:49 -0500 Subject: [PATCH] cpufreq: apple-soc: offer no boost control without turbo-mode OPPs Since commit f677f7c87b7c ("cpufreq: apple-soc: start with boost enabled") the driver turns boost on when it registers. On SoCs whose device tree marks no OPP as turbo-mode, such as the M3 (T8122) and the MacBook Neo, no policy supports boost. The driver still sets .set_boost, so the core creates the global boost file anyway, and enabling it fails: cpufreq: cpufreq_boost_trigger_state: Cannot enable BOOST cpufreq: store_boost: Cannot enable BOOST! power-profiles-daemon writes that file when it applies a profile, so on these Macs it fails, and power-saver no longer lowers the CPU limit. Leave .set_boost unset when the tree has no turbo-mode OPP, so no boost file appears there. SoCs with turbo-mode OPPs keep boost control as before. Tested on an M3 MacBook Air (J613) and a MacBook Neo: no boost errors, and power-saver caps the P-cores (J613: 4056 to 2424 MHz). On a 16" M4 Pro (J616s) the boost file is still there: power-saver runs the P-cores at 4104 MHz and performance at 4512 MHz. Assisted-by: Claude:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 Signed-off-by: Scott Jones --- drivers/cpufreq/apple-soc-cpufreq.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/cpufreq/apple-soc-cpufreq.c b/drivers/cpufreq/apple-soc-cpufreq.c index 09233d4b4208d..9f606b37e3662 100644 --- a/drivers/cpufreq/apple-soc-cpufreq.c +++ b/drivers/cpufreq/apple-soc-cpufreq.c @@ -1626,6 +1626,19 @@ static int __init apple_soc_cpufreq_module_init(void) if (!of_machine_is_compatible("apple,arm-platform")) return -ENODEV; + + /* + * Boost only means something with turbo-mode OPPs. Without any, no + * policy supports it, and turning it on through the global "boost" + * file fails with -EINVAL; power-profiles-daemon then cannot set its + * profile. Offer no boost control on such SoCs. + */ + np = of_find_node_with_property(NULL, "turbo-mode"); + if (np) + of_node_put(np); + else + apple_soc_cpufreq_driver.set_boost = NULL; + if (of_machine_is_compatible("apple,t8132")) { apple_soc_cpufreq_driver.online = apple_soc_cpufreq_online; apple_soc_cpufreq_driver.offline = apple_soc_cpufreq_offline;