aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk Brandewie <dirk.j.brandewie@intel.com>2014-05-08 15:57:24 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-05-13 11:39:13 -0400
commitd40a63c45b506b0681918d7c62a15cc9d48c8681 (patch)
treeb0a0023a71d72947c0d691627010313580974683
parent21855ff5bcbdd075e1c99772827a84912ab083dd (diff)
intel_pstate: remove setting P state to MAX on init
Setting the P state of the core to max at init time is a hold over from early implementation of intel_pstate where intel_pstate disabled cpufreq and loaded VERY early in the boot sequence. This was to ensure that intel_pstate did not affect boot time. This in not needed now that intel_pstate is a cpufreq driver. Removing this covers the case where a CPU has gone through a manual CPU offline/online cycle and the P state is set to MAX on init and the CPU immediately goes idle. Due to HW coordination the P state request on the idle CPU will drag all cores to MAX P state until the load is reevaluated when to core goes non-idle. Reported-by: Patrick Marlier <patrick.marlier@gmail.com> Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com> Cc: 3.14+ <stable@vger.kernel.org> # 3.14+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/cpufreq/intel_pstate.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 39c4f8520848..eab8ccfe6beb 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -554,12 +554,7 @@ static void intel_pstate_get_cpu_pstates(struct cpudata *cpu)
554 554
555 if (pstate_funcs.get_vid) 555 if (pstate_funcs.get_vid)
556 pstate_funcs.get_vid(cpu); 556 pstate_funcs.get_vid(cpu);
557 557 intel_pstate_set_pstate(cpu, cpu->pstate.min_pstate);
558 /*
559 * goto max pstate so we don't slow up boot if we are built-in if we are
560 * a module we will take care of it during normal operation
561 */
562 intel_pstate_set_pstate(cpu, cpu->pstate.max_pstate);
563} 558}
564 559
565static inline void intel_pstate_calc_busy(struct cpudata *cpu, 560static inline void intel_pstate_calc_busy(struct cpudata *cpu,
@@ -704,11 +699,6 @@ static int intel_pstate_init_cpu(unsigned int cpunum)
704 cpu = all_cpu_data[cpunum]; 699 cpu = all_cpu_data[cpunum];
705 700
706 intel_pstate_get_cpu_pstates(cpu); 701 intel_pstate_get_cpu_pstates(cpu);
707 if (!cpu->pstate.current_pstate) {
708 all_cpu_data[cpunum] = NULL;
709 kfree(cpu);
710 return -ENODATA;
711 }
712 702
713 cpu->cpu = cpunum; 703 cpu->cpu = cpunum;
714 704
@@ -719,7 +709,6 @@ static int intel_pstate_init_cpu(unsigned int cpunum)
719 cpu->timer.expires = jiffies + HZ/100; 709 cpu->timer.expires = jiffies + HZ/100;
720 intel_pstate_busy_pid_reset(cpu); 710 intel_pstate_busy_pid_reset(cpu);
721 intel_pstate_sample(cpu); 711 intel_pstate_sample(cpu);
722 intel_pstate_set_pstate(cpu, cpu->pstate.max_pstate);
723 712
724 add_timer_on(&cpu->timer, cpunum); 713 add_timer_on(&cpu->timer, cpunum);
725 714