aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-18 07:41:56 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-10-18 07:41:56 -0400
commitbdbff71653db2da9c69ff29a02764c388649d08d (patch)
tree00a150d88d8d8da3833ab792d58d40eafddde463
parent35f9162d67c3e20a82b4bd6ec538f3e9c14fb055 (diff)
parent0e8244322b7fc45fd11a1c45f70b6bacddf4986f (diff)
Merge branch 'pm-fixes'
* pm-fixes: cpufreq: s3c64xx: Rename index to driver_data intel_pstate: Fix type mismatch warning cpufreq / intel_pstate: Fix max_perf_pct on resume
-rw-r--r--drivers/cpufreq/intel_pstate.c14
-rw-r--r--drivers/cpufreq/s3c64xx-cpufreq.c2
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 32b3479a2405..badf6206b2b2 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -383,6 +383,7 @@ static void intel_pstate_get_min_max(struct cpudata *cpu, int *min, int *max)
383static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate) 383static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate)
384{ 384{
385 int max_perf, min_perf; 385 int max_perf, min_perf;
386 u64 val;
386 387
387 intel_pstate_get_min_max(cpu, &min_perf, &max_perf); 388 intel_pstate_get_min_max(cpu, &min_perf, &max_perf);
388 389
@@ -394,11 +395,11 @@ static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate)
394 trace_cpu_frequency(pstate * 100000, cpu->cpu); 395 trace_cpu_frequency(pstate * 100000, cpu->cpu);
395 396
396 cpu->pstate.current_pstate = pstate; 397 cpu->pstate.current_pstate = pstate;
398 val = pstate << 8;
397 if (limits.no_turbo) 399 if (limits.no_turbo)
398 wrmsrl(MSR_IA32_PERF_CTL, BIT(32) | (pstate << 8)); 400 val |= (u64)1 << 32;
399 else
400 wrmsrl(MSR_IA32_PERF_CTL, pstate << 8);
401 401
402 wrmsrl(MSR_IA32_PERF_CTL, val);
402} 403}
403 404
404static inline void intel_pstate_pstate_increase(struct cpudata *cpu, int steps) 405static inline void intel_pstate_pstate_increase(struct cpudata *cpu, int steps)
@@ -637,8 +638,8 @@ static int intel_pstate_cpu_exit(struct cpufreq_policy *policy)
637 638
638static int intel_pstate_cpu_init(struct cpufreq_policy *policy) 639static int intel_pstate_cpu_init(struct cpufreq_policy *policy)
639{ 640{
640 int rc, min_pstate, max_pstate;
641 struct cpudata *cpu; 641 struct cpudata *cpu;
642 int rc;
642 643
643 rc = intel_pstate_init_cpu(policy->cpu); 644 rc = intel_pstate_init_cpu(policy->cpu);
644 if (rc) 645 if (rc)
@@ -652,9 +653,8 @@ static int intel_pstate_cpu_init(struct cpufreq_policy *policy)
652 else 653 else
653 policy->policy = CPUFREQ_POLICY_POWERSAVE; 654 policy->policy = CPUFREQ_POLICY_POWERSAVE;
654 655
655 intel_pstate_get_min_max(cpu, &min_pstate, &max_pstate); 656 policy->min = cpu->pstate.min_pstate * 100000;
656 policy->min = min_pstate * 100000; 657 policy->max = cpu->pstate.turbo_pstate * 100000;
657 policy->max = max_pstate * 100000;
658 658
659 /* cpuinfo and default policy values */ 659 /* cpuinfo and default policy values */
660 policy->cpuinfo.min_freq = cpu->pstate.min_pstate * 100000; 660 policy->cpuinfo.min_freq = cpu->pstate.min_pstate * 100000;
diff --git a/drivers/cpufreq/s3c64xx-cpufreq.c b/drivers/cpufreq/s3c64xx-cpufreq.c
index 8a72b0c555f8..15631f92ab7d 100644
--- a/drivers/cpufreq/s3c64xx-cpufreq.c
+++ b/drivers/cpufreq/s3c64xx-cpufreq.c
@@ -166,7 +166,7 @@ static void __init s3c64xx_cpufreq_config_regulator(void)
166 if (freq->frequency == CPUFREQ_ENTRY_INVALID) 166 if (freq->frequency == CPUFREQ_ENTRY_INVALID)
167 continue; 167 continue;
168 168
169 dvfs = &s3c64xx_dvfs_table[freq->index]; 169 dvfs = &s3c64xx_dvfs_table[freq->driver_data];
170 found = 0; 170 found = 0;
171 171
172 for (i = 0; i < count; i++) { 172 for (i = 0; i < count; i++) {