Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45186
b: refs/heads/master
c: 8edc59d
h: refs/heads/master
v: v3
  • Loading branch information
Venkatesh Pallipadi authored and Dave Jones committed Dec 23, 2006
1 parent add09d3 commit c78090c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 917325d30ab12f9f23aee5c91dc96dfe81b0c6be
refs/heads/master: 8edc59d939ad233c24385fb67a62bd39db532901
9 changes: 5 additions & 4 deletions trunk/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy,
cpumask_t online_policy_cpus;
struct drv_cmd cmd;
unsigned int msr;
unsigned int next_state = 0;
unsigned int next_perf_state = 0;
unsigned int next_state = 0; /* Index into freq_table */
unsigned int next_perf_state = 0; /* Index into perf table */
unsigned int i;
int result = 0;

Expand Down Expand Up @@ -439,8 +439,8 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy,
else
cpu_set(policy->cpu, cmd.mask);

freqs.old = data->freq_table[perf->state].frequency;
freqs.new = data->freq_table[next_perf_state].frequency;
freqs.old = perf->states[perf->state].core_frequency * 1000;
freqs.new = data->freq_table[next_state].frequency;
for_each_cpu_mask(i, cmd.mask) {
freqs.cpu = i;
cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
Expand Down Expand Up @@ -677,6 +677,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
valid_states++;
}
data->freq_table[valid_states].frequency = CPUFREQ_TABLE_END;
perf->state = 0;

result = cpufreq_frequency_table_cpuinfo(policy, data->freq_table);
if (result)
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/cpufreq/cpufreq_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,17 @@ cpufreq_stat_notifier_trans (struct notifier_block *nb, unsigned long val,
stat = cpufreq_stats_table[freq->cpu];
if (!stat)
return 0;

old_index = freq_table_get_index(stat, freq->old);
new_index = freq_table_get_index(stat, freq->new);

cpufreq_stats_update(freq->cpu);
if (old_index == new_index)
return 0;

if (old_index == -1 || new_index == -1)
return 0;

spin_lock(&cpufreq_stats_lock);
stat->last_index = new_index;
#ifdef CONFIG_CPU_FREQ_STAT_DETAILS
Expand Down

0 comments on commit c78090c

Please sign in to comment.