]> err.no Git - linux-2.6/commitdiff
ACPI: Discard invalid elements in _PSS package
authorZhang Rui <rui.zhang@intel.com>
Thu, 14 Jun 2007 01:24:02 +0000 (21:24 -0400)
committerLen Brown <len.brown@intel.com>
Thu, 14 Jun 2007 01:24:02 +0000 (21:24 -0400)
Make sure that the _PSS list is sorted in
descending order by typical power dissipation.

http://bugzilla.kernel.org/show_bug.cgi?id=7880

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c

index 10baa3501ed336c37b5d9a5662ce99484c48d651..9ba2b69fc64aeb4c1fc14fdaa2a4715cace8d181 100644 (file)
@@ -668,8 +668,8 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
        data->max_freq = perf->states[0].core_frequency * 1000;
        /* table init */
        for (i=0; i<perf->state_count; i++) {
-               if (i>0 && perf->states[i].core_frequency ==
-                   perf->states[i-1].core_frequency)
+               if (i>0 && perf->states[i].core_frequency >=
+                   data->freq_table[valid_states-1].frequency / 1000)
                        continue;
 
                data->freq_table[valid_states].index = i;