Commit 20cb09d1 authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[CPUFREQ] speedstep-centrino: ignore 0xffff'ed P-States

Some ACPI tables contain 0xffff'ed entries for "P-States". This is
obviously incorrect according to the ACPI specifications, nonetheless
it should "just work". So, simply ignore such invalid P-States instead
of aborting. Thanks to Frederik Reiss for testing (and fixing) this
patch.
Signed-off-by: default avatarDominik Brodowski <linux@brodo.de>
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent c428f6d1
......@@ -347,6 +347,12 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy)
goto err_unreg;
}
if (p.states[i].core_frequency > p.states[0].core_frequency) {
printk(KERN_DEBUG "P%u has larger frequency than P0, skipping\n", i);
p.states[i].core_frequency = 0;
continue;
}
if (extract_clock(p.states[i].control) !=
(p.states[i].core_frequency * 1000)) {
printk(KERN_DEBUG "Invalid encoded frequency\n");
......@@ -378,6 +384,8 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy)
centrino_model->op_points[i].frequency = p.states[i].core_frequency * 1000;
if (cur_freq == centrino_model->op_points[i].frequency)
p.state = i;
if (!p.states[i].core_frequency)
centrino_model->op_points[i].frequency = CPUFREQ_ENTRY_INVALID;
}
centrino_model->op_points[p.state_count].frequency = CPUFREQ_TABLE_END;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment