aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorTim Gardner <tim.gardner@canonical.com>2010-09-28 16:58:15 -0400
committerMatthew Garrett <mjg@redhat.com>2010-10-05 14:59:17 -0400
commita8c096adbd2b55942ff13c8bbc573a7551768003 (patch)
tree086a38b7d983a5428ed8666e822f7b6dd6da7b52 /drivers/platform
parenteceab272fb895148f6293b5c0644fc2dd36d3aff (diff)
intel_ips: Print MCP limit exceeded values.
Print some interesting values when MCP limits are exceeded. Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/intel_ips.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/drivers/platform/x86/intel_ips.c b/drivers/platform/x86/intel_ips.c
index c402cc417108..07a1a4aac609 100644
--- a/drivers/platform/x86/intel_ips.c
+++ b/drivers/platform/x86/intel_ips.c
@@ -600,17 +600,29 @@ static bool mcp_exceeded(struct ips_driver *ips)
600{ 600{
601 unsigned long flags; 601 unsigned long flags;
602 bool ret = false; 602 bool ret = false;
603 u32 temp_limit;
604 u32 avg_power;
605 const char *msg = "MCP limit exceeded: ";
603 606
604 spin_lock_irqsave(&ips->turbo_status_lock, flags); 607 spin_lock_irqsave(&ips->turbo_status_lock, flags);
605 if (ips->mcp_avg_temp > (ips->mcp_temp_limit * 100)) 608
606 ret = true; 609 temp_limit = ips->mcp_temp_limit * 100;
607 if (ips->cpu_avg_power + ips->mch_avg_power > ips->mcp_power_limit) 610 if (ips->mcp_avg_temp > temp_limit) {
611 dev_info(&ips->dev->dev,
612 "%sAvg temp %u, limit %u\n", msg, ips->mcp_avg_temp,
613 temp_limit);
608 ret = true; 614 ret = true;
609 spin_unlock_irqrestore(&ips->turbo_status_lock, flags); 615 }
610 616
611 if (ret) 617 avg_power = ips->cpu_avg_power + ips->mch_avg_power;
618 if (avg_power > ips->mcp_power_limit) {
612 dev_info(&ips->dev->dev, 619 dev_info(&ips->dev->dev,
613 "MCP power or thermal limit exceeded\n"); 620 "%sAvg power %u, limit %u\n", msg, avg_power,
621 ips->mcp_power_limit);
622 ret = true;
623 }
624
625 spin_unlock_irqrestore(&ips->turbo_status_lock, flags);
614 626
615 return ret; 627 return ret;
616} 628}