From d37f3bc5a9fbf2fbb415f565ca1da45c2aa5f0f3 Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Fri, 5 Feb 2010 03:52:16 +0000 Subject: [PATCH] --- yaml --- r: 187795 b: refs/heads/master c: de0b632ba05bc88949e67d33d1c313fcf922ae2e h: refs/heads/master i: 187793: 6ae96109e3f80fab76e907d4ad4a9fcb58086db0 187791: cc03e1ff6825e13335ad8d2c6e5f15a30162411c v: v3 --- [refs] | 2 +- trunk/drivers/macintosh/therm_pm72.c | 30 ++++++++++++++++++++++------ trunk/drivers/macintosh/therm_pm72.h | 2 +- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 0b5b3b099493..182422ea061b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f09b7b2a1115d3afe02c66156746287f6c63bba0 +refs/heads/master: de0b632ba05bc88949e67d33d1c313fcf922ae2e diff --git a/trunk/drivers/macintosh/therm_pm72.c b/trunk/drivers/macintosh/therm_pm72.c index 5738d8bf2d97..921373e4e3af 100644 --- a/trunk/drivers/macintosh/therm_pm72.c +++ b/trunk/drivers/macintosh/therm_pm72.c @@ -948,10 +948,16 @@ static void do_monitor_cpu_combined(void) printk(KERN_WARNING "Warning ! Temperature way above maximum (%d) !\n", temp_combi >> 16); state0->overtemp += CPU_MAX_OVERTEMP / 4; - } else if (temp_combi > (state0->mpu.tmax << 16)) + } else if (temp_combi > (state0->mpu.tmax << 16)) { state0->overtemp++; - else + printk(KERN_WARNING "Temperature %d above max %d. overtemp %d\n", + temp_combi >> 16, state0->mpu.tmax, state0->overtemp); + } else { + if (state0->overtemp) + printk(KERN_WARNING "Temperature back down to %d\n", + temp_combi >> 16); state0->overtemp = 0; + } if (state0->overtemp >= CPU_MAX_OVERTEMP) critical_state = 1; if (state0->overtemp > 0) { @@ -1023,10 +1029,16 @@ static void do_monitor_cpu_split(struct cpu_pid_state *state) " (%d) !\n", state->index, temp >> 16); state->overtemp += CPU_MAX_OVERTEMP / 4; - } else if (temp > (state->mpu.tmax << 16)) + } else if (temp > (state->mpu.tmax << 16)) { state->overtemp++; - else + printk(KERN_WARNING "CPU %d temperature %d above max %d. overtemp %d\n", + state->index, temp >> 16, state->mpu.tmax, state->overtemp); + } else { + if (state->overtemp) + printk(KERN_WARNING "CPU %d temperature back down to %d\n", + state->index, temp >> 16); state->overtemp = 0; + } if (state->overtemp >= CPU_MAX_OVERTEMP) critical_state = 1; if (state->overtemp > 0) { @@ -1085,10 +1097,16 @@ static void do_monitor_cpu_rack(struct cpu_pid_state *state) " (%d) !\n", state->index, temp >> 16); state->overtemp = CPU_MAX_OVERTEMP / 4; - } else if (temp > (state->mpu.tmax << 16)) + } else if (temp > (state->mpu.tmax << 16)) { state->overtemp++; - else + printk(KERN_WARNING "CPU %d temperature %d above max %d. overtemp %d\n", + state->index, temp >> 16, state->mpu.tmax, state->overtemp); + } else { + if (state->overtemp) + printk(KERN_WARNING "CPU %d temperature back down to %d\n", + state->index, temp >> 16); state->overtemp = 0; + } if (state->overtemp >= CPU_MAX_OVERTEMP) critical_state = 1; if (state->overtemp > 0) { diff --git a/trunk/drivers/macintosh/therm_pm72.h b/trunk/drivers/macintosh/therm_pm72.h index 393cc9df94e1..df3680e2a22f 100644 --- a/trunk/drivers/macintosh/therm_pm72.h +++ b/trunk/drivers/macintosh/therm_pm72.h @@ -269,7 +269,7 @@ struct slots_pid_state #define CPU_TEMP_HISTORY_SIZE 2 #define CPU_POWER_HISTORY_SIZE 10 #define CPU_PID_INTERVAL 1 -#define CPU_MAX_OVERTEMP 30 +#define CPU_MAX_OVERTEMP 90 #define CPUA_PUMP_RPM_INDEX 7 #define CPUB_PUMP_RPM_INDEX 8