Skip to content

Commit

Permalink
[PATCH] Correct bound checking from the value returned from _PPC method.
Browse files Browse the repository at this point in the history
processor_perflib.c::acpi_processor_ppc_notifier() check if the value
returned by the processor's _PPC method is 0 and return failed if so.
This is wrong since 0 indicate that the bios think the processor can go
to the highest frequency.  This patch for example fix the HP NX 6125 to
allow its highest frequency to be available.

Signed-off-by: Bruno Ducrot <ducrot@poupinou.org>
Cc: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Dave Jones authored and Linus Torvalds committed Nov 23, 2006
1 parent 5261d66 commit 0916bd3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/acpi/processor_perflib.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ static int acpi_processor_ppc_notifier(struct notifier_block *nb,
goto out;

ppc = (unsigned int)pr->performance_platform_limit;
if (!ppc)
goto out;

if (ppc > pr->performance->state_count)
if (ppc >= pr->performance->state_count)
goto out;

cpufreq_verify_within_limits(policy, 0,
Expand Down

0 comments on commit 0916bd3

Please sign in to comment.