From 405d27e871f7bc85a786f84877a35da54c813b39 Mon Sep 17 00:00:00 2001 From: Srinivas Pandruvada Date: Wed, 5 Nov 2025 09:57:03 -0800 Subject: [PATCH] cpufreq: intel_pstate: Reevaluate IDA presence on no_turbo attribute change If hardware disabled IDA (Intel Dynamic Acceleration technology) feature before OS boot, turbo mode support will be disabled permanently. In this case CPUID.06H: EAX[1] reports 0 and attribute "/sys/devices/system/cpu/intel_pstate/no_turbo" will show "1" and status can't be changed to "0". When no_turbo is written with 0, in this case evaluate CPUID.06H: EAX[1] again. If the feature status is changed to 1 post OS boot then allow to enable turbo mode. Signed-off-by: Srinivas Pandruvada --- drivers/cpufreq/intel_pstate.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 43e847e9f741..0ec45a610b45 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -596,10 +596,15 @@ static void intel_pstate_hybrid_hwp_adjust(struct cpudata *cpu) static bool turbo_is_disabled(void) { + unsigned int eax, ebx, ecx, edx; u64 misc_en; - if (!cpu_feature_enabled(X86_FEATURE_IDA)) + eax = 0; + cpuid(6, &eax, &ebx, &ecx, &edx); + if (!(eax & BIT(1))) { + pr_info("Turbo is disabled\n"); return true; + } rdmsrl(MSR_IA32_MISC_ENABLE, misc_en); -- 2.43.0