Skip to content

Commit

Permalink
IPS driver: Fix limit clamping when reducing CPU power
Browse files Browse the repository at this point in the history
Values here are in internal units rather than Watts, so we shouldn't
perform any conversion.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
  • Loading branch information
Matthew Garrett committed Oct 5, 2010
1 parent 96f3823 commit d24a9da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/platform/x86/intel_ips.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ static void ips_cpu_lower(struct ips_driver *ips)
new_limit = cur_limit - 8; /* 1W decrease */

/* Clamp to SKU TDP limit */
if (((new_limit * 10) / 8) < (ips->orig_turbo_limit & TURBO_TDP_MASK))
if (new_limit < (ips->orig_turbo_limit & TURBO_TDP_MASK))
new_limit = ips->orig_turbo_limit & TURBO_TDP_MASK;

thm_writew(THM_MPCPC, (new_limit * 10) / 8);
Expand Down

0 comments on commit d24a9da

Please sign in to comment.