Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Fix G5 thermal shutdown

This changes the thresholds for the liquid cooled G5 thermal
shutdown mechanism to prevent an errant shutdown with some
models.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Josh Boyer and committed by
Benjamin Herrenschmidt
de0b632b f09b7b2a

+25 -7
+24 -6
drivers/macintosh/therm_pm72.c
··· 948 948 printk(KERN_WARNING "Warning ! Temperature way above maximum (%d) !\n", 949 949 temp_combi >> 16); 950 950 state0->overtemp += CPU_MAX_OVERTEMP / 4; 951 - } else if (temp_combi > (state0->mpu.tmax << 16)) 951 + } else if (temp_combi > (state0->mpu.tmax << 16)) { 952 952 state0->overtemp++; 953 - else 953 + printk(KERN_WARNING "Temperature %d above max %d. overtemp %d\n", 954 + temp_combi >> 16, state0->mpu.tmax, state0->overtemp); 955 + } else { 956 + if (state0->overtemp) 957 + printk(KERN_WARNING "Temperature back down to %d\n", 958 + temp_combi >> 16); 954 959 state0->overtemp = 0; 960 + } 955 961 if (state0->overtemp >= CPU_MAX_OVERTEMP) 956 962 critical_state = 1; 957 963 if (state0->overtemp > 0) { ··· 1029 1023 " (%d) !\n", 1030 1024 state->index, temp >> 16); 1031 1025 state->overtemp += CPU_MAX_OVERTEMP / 4; 1032 - } else if (temp > (state->mpu.tmax << 16)) 1026 + } else if (temp > (state->mpu.tmax << 16)) { 1033 1027 state->overtemp++; 1034 - else 1028 + printk(KERN_WARNING "CPU %d temperature %d above max %d. overtemp %d\n", 1029 + state->index, temp >> 16, state->mpu.tmax, state->overtemp); 1030 + } else { 1031 + if (state->overtemp) 1032 + printk(KERN_WARNING "CPU %d temperature back down to %d\n", 1033 + state->index, temp >> 16); 1035 1034 state->overtemp = 0; 1035 + } 1036 1036 if (state->overtemp >= CPU_MAX_OVERTEMP) 1037 1037 critical_state = 1; 1038 1038 if (state->overtemp > 0) { ··· 1097 1085 " (%d) !\n", 1098 1086 state->index, temp >> 16); 1099 1087 state->overtemp = CPU_MAX_OVERTEMP / 4; 1100 - } else if (temp > (state->mpu.tmax << 16)) 1088 + } else if (temp > (state->mpu.tmax << 16)) { 1101 1089 state->overtemp++; 1102 - else 1090 + printk(KERN_WARNING "CPU %d temperature %d above max %d. overtemp %d\n", 1091 + state->index, temp >> 16, state->mpu.tmax, state->overtemp); 1092 + } else { 1093 + if (state->overtemp) 1094 + printk(KERN_WARNING "CPU %d temperature back down to %d\n", 1095 + state->index, temp >> 16); 1103 1096 state->overtemp = 0; 1097 + } 1104 1098 if (state->overtemp >= CPU_MAX_OVERTEMP) 1105 1099 critical_state = 1; 1106 1100 if (state->overtemp > 0) {
+1 -1
drivers/macintosh/therm_pm72.h
··· 269 269 #define CPU_TEMP_HISTORY_SIZE 2 270 270 #define CPU_POWER_HISTORY_SIZE 10 271 271 #define CPU_PID_INTERVAL 1 272 - #define CPU_MAX_OVERTEMP 30 272 + #define CPU_MAX_OVERTEMP 90 273 273 274 274 #define CPUA_PUMP_RPM_INDEX 7 275 275 #define CPUB_PUMP_RPM_INDEX 8