Commit a8c096ad authored by Tim Gardner's avatar Tim Gardner Committed by Matthew Garrett
Browse files

intel_ips: Print MCP limit exceeded values.

Print some interesting values when MCP limits
are exceeded.
Signed-off-by: default avatarTim Gardner <>
Cc: Matthew Garrett <>
Signed-off-by: default avatarMatthew Garrett <>
parent eceab272
......@@ -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) {
"%sAvg temp %u, limit %u\n", msg, ips->mcp_avg_temp,
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) {
"MCP power or thermal limit exceeded\n");
"%sAvg power %u, limit %u\n", msg, avg_power,
ret = true;
spin_unlock_irqrestore(&ips->turbo_status_lock, flags);
return ret;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment