瀏覽代碼

[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>
Benjamin Herrenschmidt 19 年之前
父節點
當前提交
f12f4d9030
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      drivers/macintosh/therm_pm72.c

+ 3 - 3
drivers/macintosh/therm_pm72.c

@@ -923,7 +923,7 @@ static void do_monitor_cpu_combined(void)
 	if (temp_combi >= ((state0->mpu.tmax + 8) << 16)) {
 	if (temp_combi >= ((state0->mpu.tmax + 8) << 16)) {
 		printk(KERN_WARNING "Warning ! Temperature way above maximum (%d) !\n",
 		printk(KERN_WARNING "Warning ! Temperature way above maximum (%d) !\n",
 		       temp_combi >> 16);
 		       temp_combi >> 16);
-		state0->overtemp = CPU_MAX_OVERTEMP;
+		state0->overtemp += CPU_MAX_OVERTEMP / 4;
 	} else if (temp_combi > (state0->mpu.tmax << 16))
 	} else if (temp_combi > (state0->mpu.tmax << 16))
 		state0->overtemp++;
 		state0->overtemp++;
 	else
 	else
@@ -998,7 +998,7 @@ static void do_monitor_cpu_split(struct cpu_pid_state *state)
 		printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum"
 		printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum"
 		       " (%d) !\n",
 		       " (%d) !\n",
 		       state->index, temp >> 16);
 		       state->index, temp >> 16);
-		state->overtemp = CPU_MAX_OVERTEMP;
+		state->overtemp += CPU_MAX_OVERTEMP / 4;
 	} else if (temp > (state->mpu.tmax << 16))
 	} else if (temp > (state->mpu.tmax << 16))
 		state->overtemp++;
 		state->overtemp++;
 	else
 	else
@@ -1060,7 +1060,7 @@ static void do_monitor_cpu_rack(struct cpu_pid_state *state)
 		printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum"
 		printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum"
 		       " (%d) !\n",
 		       " (%d) !\n",
 		       state->index, temp >> 16);
 		       state->index, temp >> 16);
-		state->overtemp = CPU_MAX_OVERTEMP;
+		state->overtemp = CPU_MAX_OVERTEMP / 4;
 	} else if (temp > (state->mpu.tmax << 16))
 	} else if (temp > (state->mpu.tmax << 16))
 		state->overtemp++;
 		state->overtemp++;
 	else
 	else