aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/intel_pstate.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-06-03 09:03:27 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-06-03 09:03:27 -0400
commit5ece2399181a5abaf42a4cb607463770686778e6 (patch)
tree5c789755fce670511f2ac1bc3eebf39e26ed1724 /drivers/cpufreq/intel_pstate.c
parentbf8102228a8bf053051f311e5486042fe0542894 (diff)
parent8d65775d17941d6d41f5913fc6a99a134c588e01 (diff)
Merge back earlier cpufreq material.
Conflicts: arch/mips/loongson/lemote-2f/clock.c drivers/cpufreq/intel_pstate.c
Diffstat (limited to 'drivers/cpufreq/intel_pstate.c')
-rw-r--r--drivers/cpufreq/intel_pstate.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index db2e45b4808e..aebd4572eb6d 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -32,8 +32,6 @@
32#include <asm/msr.h> 32#include <asm/msr.h>
33#include <asm/cpu_device_id.h> 33#include <asm/cpu_device_id.h>
34 34
35#define SAMPLE_COUNT 3
36
37#define BYT_RATIOS 0x66a 35#define BYT_RATIOS 0x66a
38#define BYT_VIDS 0x66b 36#define BYT_VIDS 0x66b
39#define BYT_TURBO_RATIOS 0x66c 37#define BYT_TURBO_RATIOS 0x66c
@@ -90,8 +88,6 @@ struct _pid {
90struct cpudata { 88struct cpudata {
91 int cpu; 89 int cpu;
92 90
93 char name[64];
94
95 struct timer_list timer; 91 struct timer_list timer;
96 92
97 struct pstate_data pstate; 93 struct pstate_data pstate;
@@ -549,8 +545,6 @@ static inline void intel_pstate_pstate_decrease(struct cpudata *cpu, int steps)
549 545
550static void intel_pstate_get_cpu_pstates(struct cpudata *cpu) 546static void intel_pstate_get_cpu_pstates(struct cpudata *cpu)
551{ 547{
552 sprintf(cpu->name, "Intel 2nd generation core");
553
554 cpu->pstate.min_pstate = pstate_funcs.get_min(); 548 cpu->pstate.min_pstate = pstate_funcs.get_min();
555 cpu->pstate.max_pstate = pstate_funcs.get_max(); 549 cpu->pstate.max_pstate = pstate_funcs.get_max();
556 cpu->pstate.turbo_pstate = pstate_funcs.get_turbo(); 550 cpu->pstate.turbo_pstate = pstate_funcs.get_turbo();
@@ -560,9 +554,9 @@ static void intel_pstate_get_cpu_pstates(struct cpudata *cpu)
560 intel_pstate_set_pstate(cpu, cpu->pstate.min_pstate); 554 intel_pstate_set_pstate(cpu, cpu->pstate.min_pstate);
561} 555}
562 556
563static inline void intel_pstate_calc_busy(struct cpudata *cpu, 557static inline void intel_pstate_calc_busy(struct cpudata *cpu)
564 struct sample *sample)
565{ 558{
559 struct sample *sample = &cpu->sample;
566 int64_t core_pct; 560 int64_t core_pct;
567 int32_t rem; 561 int32_t rem;
568 562
@@ -595,7 +589,7 @@ static inline void intel_pstate_sample(struct cpudata *cpu)
595 cpu->sample.aperf -= cpu->prev_aperf; 589 cpu->sample.aperf -= cpu->prev_aperf;
596 cpu->sample.mperf -= cpu->prev_mperf; 590 cpu->sample.mperf -= cpu->prev_mperf;
597 591
598 intel_pstate_calc_busy(cpu, &cpu->sample); 592 intel_pstate_calc_busy(cpu);
599 593
600 cpu->prev_aperf = aperf; 594 cpu->prev_aperf = aperf;
601 cpu->prev_mperf = mperf; 595 cpu->prev_mperf = mperf;
@@ -684,10 +678,13 @@ static const struct x86_cpu_id intel_pstate_cpu_ids[] = {
684 ICPU(0x37, byt_params), 678 ICPU(0x37, byt_params),
685 ICPU(0x3a, core_params), 679 ICPU(0x3a, core_params),
686 ICPU(0x3c, core_params), 680 ICPU(0x3c, core_params),
681 ICPU(0x3d, core_params),
687 ICPU(0x3e, core_params), 682 ICPU(0x3e, core_params),
688 ICPU(0x3f, core_params), 683 ICPU(0x3f, core_params),
689 ICPU(0x45, core_params), 684 ICPU(0x45, core_params),
690 ICPU(0x46, core_params), 685 ICPU(0x46, core_params),
686 ICPU(0x4f, core_params),
687 ICPU(0x56, core_params),
691 {} 688 {}
692}; 689};
693MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids); 690MODULE_DEVICE_TABLE(x86cpu, intel_pstate_cpu_ids);