diff options
| -rw-r--r-- | drivers/cpufreq/intel_pstate.c | 14 | ||||
| -rw-r--r-- | drivers/cpufreq/s3c64xx-cpufreq.c | 2 |
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) | |||
| 383 | static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate) | 383 | static 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 | ||
| 404 | static inline void intel_pstate_pstate_increase(struct cpudata *cpu, int steps) | 405 | static 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 | ||
| 638 | static int intel_pstate_cpu_init(struct cpufreq_policy *policy) | 639 | static 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++) { |
