Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211446
b: refs/heads/master
c: a8c096a
h: refs/heads/master
v: v3
  • Loading branch information
Tim Gardner authored and Matthew Garrett committed Oct 5, 2010
1 parent 2306ec7 commit 72fb536
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eceab272fb895148f6293b5c0644fc2dd36d3aff
refs/heads/master: a8c096adbd2b55942ff13c8bbc573a7551768003
24 changes: 18 additions & 6 deletions trunk/drivers/platform/x86/intel_ips.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,17 +600,29 @@ static bool mcp_exceeded(struct ips_driver *ips)
{
unsigned long flags;
bool ret = false;
u32 temp_limit;
u32 avg_power;
const char *msg = "MCP limit exceeded: ";

spin_lock_irqsave(&ips->turbo_status_lock, flags);
if (ips->mcp_avg_temp > (ips->mcp_temp_limit * 100))
ret = true;
if (ips->cpu_avg_power + ips->mch_avg_power > ips->mcp_power_limit)

temp_limit = ips->mcp_temp_limit * 100;
if (ips->mcp_avg_temp > temp_limit) {
dev_info(&ips->dev->dev,
"%sAvg temp %u, limit %u\n", msg, ips->mcp_avg_temp,
temp_limit);
ret = true;
spin_unlock_irqrestore(&ips->turbo_status_lock, flags);
}

if (ret)
avg_power = ips->cpu_avg_power + ips->mch_avg_power;
if (avg_power > ips->mcp_power_limit) {
dev_info(&ips->dev->dev,
"MCP power or thermal limit exceeded\n");
"%sAvg power %u, limit %u\n", msg, avg_power,
ips->mcp_power_limit);
ret = true;
}

spin_unlock_irqrestore(&ips->turbo_status_lock, flags);

return ret;
}
Expand Down

0 comments on commit 72fb536

Please sign in to comment.