aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/intel_pstate.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 9ab109c0f90c..bcb9a6d0ae11 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -446,7 +446,7 @@ static void core_set_pstate(struct cpudata *cpudata, int pstate)
446 if (limits.no_turbo) 446 if (limits.no_turbo)
447 val |= (u64)1 << 32; 447 val |= (u64)1 << 32;
448 448
449 wrmsrl(MSR_IA32_PERF_CTL, val); 449 wrmsrl_on_cpu(cpudata->cpu, MSR_IA32_PERF_CTL, val);
450} 450}
451 451
452static struct cpu_defaults core_params = { 452static struct cpu_defaults core_params = {
@@ -771,14 +771,17 @@ static int intel_pstate_verify_policy(struct cpufreq_policy *policy)
771 return 0; 771 return 0;
772} 772}
773 773
774static int intel_pstate_cpu_exit(struct cpufreq_policy *policy) 774static void intel_pstate_stop_cpu(struct cpufreq_policy *policy)
775{ 775{
776 int cpu = policy->cpu; 776 int cpu_num = policy->cpu;
777 struct cpudata *cpu = all_cpu_data[cpu_num];
777 778
778 del_timer(&all_cpu_data[cpu]->timer); 779 pr_info("intel_pstate CPU %d exiting\n", cpu_num);
779 kfree(all_cpu_data[cpu]); 780
780 all_cpu_data[cpu] = NULL; 781 del_timer(&all_cpu_data[cpu_num]->timer);
781 return 0; 782 intel_pstate_set_pstate(cpu, cpu->pstate.min_pstate);
783 kfree(all_cpu_data[cpu_num]);
784 all_cpu_data[cpu_num] = NULL;
782} 785}
783 786
784static int intel_pstate_cpu_init(struct cpufreq_policy *policy) 787static int intel_pstate_cpu_init(struct cpufreq_policy *policy)
@@ -816,7 +819,7 @@ static struct cpufreq_driver intel_pstate_driver = {
816 .setpolicy = intel_pstate_set_policy, 819 .setpolicy = intel_pstate_set_policy,
817 .get = intel_pstate_get, 820 .get = intel_pstate_get,
818 .init = intel_pstate_cpu_init, 821 .init = intel_pstate_cpu_init,
819 .exit = intel_pstate_cpu_exit, 822 .stop_cpu = intel_pstate_stop_cpu,
820 .name = "intel_pstate", 823 .name = "intel_pstate",
821}; 824};
822 825