Skip to content

Commit

Permalink
IPS driver: apply BIOS provided CPU limit if different from default
Browse files Browse the repository at this point in the history
The BIOS may hand us a lower CPU power limit than the default for a
given SKU.  We should use it in case the platform isn't designed to
dissapate the full TDP of a given part.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
  • Loading branch information
Jesse Barnes authored and Matthew Garrett committed Oct 5, 2010
1 parent 070c0ee commit 4fd07ac
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/platform/x86/intel_ips.c
Original file line number Diff line number Diff line change
Expand Up @@ -1391,9 +1391,10 @@ static struct ips_mcp_limits *ips_detect_cpu(struct ips_driver *ips)
tdp = turbo_power & TURBO_TDP_MASK;

/* Sanity check TDP against CPU */
if (limits->mcp_power_limit != (tdp / 8) * 1000) {
dev_warn(&ips->dev->dev, "Warning: CPU TDP doesn't match expected value (found %d, expected %d)\n",
tdp / 8, limits->mcp_power_limit / 1000);
if (limits->core_power_limit != (tdp / 8) * 1000) {
dev_info(&ips->dev->dev, "CPU TDP doesn't match expected value (found %d, expected %d)\n",
tdp / 8, limits->core_power_limit / 1000);
limits->core_power_limit = (tdp / 8) * 1000;
}

out:
Expand Down

0 comments on commit 4fd07ac

Please sign in to comment.