Commit d034d68c authored by Dave Jones's avatar Dave Jones

[CPUFREQ] Don't break on FFFFFFFF'd frequencies.

 
Some BIOSes export invalid _PSS entries where all bits are set to one. While
this is totally contrary to the ACPI specification, BIOS vendors try to
tell userspace that these entries should not be considered or used. In order
to not fail on such entries, the speedstep-centrino already contains a
method to ignore these things. However, due to a wrong ordering of checks
the driver aborts nonetheless. So move some checks around.
Signed-off-by: default avatarDominik Brodowski <linux@brodo.de>
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent 014455ab
......@@ -415,6 +415,11 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy)
cur_freq = get_cur_freq(policy->cpu);
for (i=0; i<p.state_count; i++) {
if (!p.states[i].core_frequency) {
centrino_model->op_points[i].frequency = CPUFREQ_ENTRY_INVALID;
continue;
}
if (extract_clock(centrino_model->op_points[i].index) !=
(centrino_model->op_points[i].frequency)) {
printk(KERN_DEBUG "Invalid encoded frequency\n");
......@@ -424,8 +429,6 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy)
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;
}
return 0;
......
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