Skip to content

Commit

Permalink
Merge branch 'pm-fixes'
Browse files Browse the repository at this point in the history
* pm-fixes:
  cpufreq: s3c64xx: Rename index to driver_data
  intel_pstate: Fix type mismatch warning
  cpufreq / intel_pstate: Fix max_perf_pct on resume
  • Loading branch information
Rafael J. Wysocki committed Oct 18, 2013
2 parents 35f9162 + 0e82443 commit bdbff71
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions drivers/cpufreq/intel_pstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ static void intel_pstate_get_min_max(struct cpudata *cpu, int *min, int *max)
static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate)
{
int max_perf, min_perf;
u64 val;

intel_pstate_get_min_max(cpu, &min_perf, &max_perf);

Expand All @@ -394,11 +395,11 @@ static void intel_pstate_set_pstate(struct cpudata *cpu, int pstate)
trace_cpu_frequency(pstate * 100000, cpu->cpu);

cpu->pstate.current_pstate = pstate;
val = pstate << 8;
if (limits.no_turbo)
wrmsrl(MSR_IA32_PERF_CTL, BIT(32) | (pstate << 8));
else
wrmsrl(MSR_IA32_PERF_CTL, pstate << 8);
val |= (u64)1 << 32;

wrmsrl(MSR_IA32_PERF_CTL, val);
}

static inline void intel_pstate_pstate_increase(struct cpudata *cpu, int steps)
Expand Down Expand Up @@ -637,8 +638,8 @@ static int intel_pstate_cpu_exit(struct cpufreq_policy *policy)

static int intel_pstate_cpu_init(struct cpufreq_policy *policy)
{
int rc, min_pstate, max_pstate;
struct cpudata *cpu;
int rc;

rc = intel_pstate_init_cpu(policy->cpu);
if (rc)
Expand All @@ -652,9 +653,8 @@ static int intel_pstate_cpu_init(struct cpufreq_policy *policy)
else
policy->policy = CPUFREQ_POLICY_POWERSAVE;

intel_pstate_get_min_max(cpu, &min_pstate, &max_pstate);
policy->min = min_pstate * 100000;
policy->max = max_pstate * 100000;
policy->min = cpu->pstate.min_pstate * 100000;
policy->max = cpu->pstate.turbo_pstate * 100000;

/* cpuinfo and default policy values */
policy->cpuinfo.min_freq = cpu->pstate.min_pstate * 100000;
Expand Down
2 changes: 1 addition & 1 deletion drivers/cpufreq/s3c64xx-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ static void __init s3c64xx_cpufreq_config_regulator(void)
if (freq->frequency == CPUFREQ_ENTRY_INVALID)
continue;

dvfs = &s3c64xx_dvfs_table[freq->index];
dvfs = &s3c64xx_dvfs_table[freq->driver_data];
found = 0;

for (i = 0; i < count; i++) {
Expand Down

0 comments on commit bdbff71

Please sign in to comment.