|
@@ -484,12 +484,11 @@ static void __init intel_pstate_sysfs_expose_params(void)
|
|
|
}
|
|
|
/************************** sysfs end ************************/
|
|
|
|
|
|
-static void intel_pstate_hwp_enable(void)
|
|
|
+static void intel_pstate_hwp_enable(struct cpudata *cpudata)
|
|
|
{
|
|
|
- hwp_active++;
|
|
|
pr_info("intel_pstate: HWP enabled\n");
|
|
|
|
|
|
- wrmsrl( MSR_PM_ENABLE, 0x1);
|
|
|
+ wrmsrl_on_cpu(cpudata->cpu, MSR_PM_ENABLE, 0x1);
|
|
|
}
|
|
|
|
|
|
static int byt_get_min_pstate(void)
|
|
@@ -932,6 +931,10 @@ static int intel_pstate_init_cpu(unsigned int cpunum)
|
|
|
cpu = all_cpu_data[cpunum];
|
|
|
|
|
|
cpu->cpu = cpunum;
|
|
|
+
|
|
|
+ if (hwp_active)
|
|
|
+ intel_pstate_hwp_enable(cpu);
|
|
|
+
|
|
|
intel_pstate_get_cpu_pstates(cpu);
|
|
|
|
|
|
init_timer_deferrable(&cpu->timer);
|
|
@@ -1245,7 +1248,7 @@ static int __init intel_pstate_init(void)
|
|
|
return -ENOMEM;
|
|
|
|
|
|
if (static_cpu_has_safe(X86_FEATURE_HWP) && !no_hwp)
|
|
|
- intel_pstate_hwp_enable();
|
|
|
+ hwp_active++;
|
|
|
|
|
|
if (!hwp_active && hwp_only)
|
|
|
goto out;
|