aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/therm_pm72.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-01-01 21:04:44 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-02 11:38:37 -0500
commitf12f4d90308a22396ac87f6c3a7b2620589614c3 (patch)
treebd086b38c2a3d3de8d765f52d0bbaae7035bab08 /drivers/macintosh/therm_pm72.c
parent557962a926c62a9c4bd79d6b36df873d4f8c51ef (diff)
[PATCH] powerpc: more g5 overtemp problem fix
Some G5s still occasionally experience shutdowns due to overtemp conditions despite the recent fix. After analyzing logs from such machines, it appears that the overtemp code is a bit too quick at shutting the machine down when reaching the critical temperature (tmax + 8) and doesn't leave the fan enough time to actually cool it down. This happens if the temperature of a CPU suddenly rises too high in a very short period of time, or occasionally on boot (that is the CPUs are already overtemp by the time the driver loads). This patches makes the code a bit more relaxed, leaving a few seconds to the fans to do their job before kicking the machine shutown. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/macintosh/therm_pm72.c')
-rw-r--r--drivers/macintosh/therm_pm72.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c
index 5bb36274a5c6..190878eef990 100644
--- a/drivers/macintosh/therm_pm72.c
+++ b/drivers/macintosh/therm_pm72.c
@@ -923,7 +923,7 @@ static void do_monitor_cpu_combined(void)
923 if (temp_combi >= ((state0->mpu.tmax + 8) << 16)) { 923 if (temp_combi >= ((state0->mpu.tmax + 8) << 16)) {
924 printk(KERN_WARNING "Warning ! Temperature way above maximum (%d) !\n", 924 printk(KERN_WARNING "Warning ! Temperature way above maximum (%d) !\n",
925 temp_combi >> 16); 925 temp_combi >> 16);
926 state0->overtemp = CPU_MAX_OVERTEMP; 926 state0->overtemp += CPU_MAX_OVERTEMP / 4;
927 } else if (temp_combi > (state0->mpu.tmax << 16)) 927 } else if (temp_combi > (state0->mpu.tmax << 16))
928 state0->overtemp++; 928 state0->overtemp++;
929 else 929 else
@@ -998,7 +998,7 @@ static void do_monitor_cpu_split(struct cpu_pid_state *state)
998 printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum" 998 printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum"
999 " (%d) !\n", 999 " (%d) !\n",
1000 state->index, temp >> 16); 1000 state->index, temp >> 16);
1001 state->overtemp = CPU_MAX_OVERTEMP; 1001 state->overtemp += CPU_MAX_OVERTEMP / 4;
1002 } else if (temp > (state->mpu.tmax << 16)) 1002 } else if (temp > (state->mpu.tmax << 16))
1003 state->overtemp++; 1003 state->overtemp++;
1004 else 1004 else
@@ -1060,7 +1060,7 @@ static void do_monitor_cpu_rack(struct cpu_pid_state *state)
1060 printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum" 1060 printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum"
1061 " (%d) !\n", 1061 " (%d) !\n",
1062 state->index, temp >> 16); 1062 state->index, temp >> 16);
1063 state->overtemp = CPU_MAX_OVERTEMP; 1063 state->overtemp = CPU_MAX_OVERTEMP / 4;
1064 } else if (temp > (state->mpu.tmax << 16)) 1064 } else if (temp > (state->mpu.tmax << 16))
1065 state->overtemp++; 1065 state->overtemp++;
1066 else 1066 else