aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/macintosh')
-rw-r--r--drivers/macintosh/therm_pm72.c30
-rw-r--r--drivers/macintosh/therm_pm72.h2
-rw-r--r--drivers/macintosh/windfarm_core.c1
-rw-r--r--drivers/macintosh/windfarm_smu_controls.c1
4 files changed, 27 insertions, 7 deletions
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c
index 5738d8bf2d97..921373e4e3af 100644
--- a/drivers/macintosh/therm_pm72.c
+++ b/drivers/macintosh/therm_pm72.c
@@ -948,10 +948,16 @@ static void do_monitor_cpu_combined(void)
948 printk(KERN_WARNING "Warning ! Temperature way above maximum (%d) !\n", 948 printk(KERN_WARNING "Warning ! Temperature way above maximum (%d) !\n",
949 temp_combi >> 16); 949 temp_combi >> 16);
950 state0->overtemp += CPU_MAX_OVERTEMP / 4; 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 state0->overtemp++; 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 state0->overtemp = 0; 959 state0->overtemp = 0;
960 }
955 if (state0->overtemp >= CPU_MAX_OVERTEMP) 961 if (state0->overtemp >= CPU_MAX_OVERTEMP)
956 critical_state = 1; 962 critical_state = 1;
957 if (state0->overtemp > 0) { 963 if (state0->overtemp > 0) {
@@ -1023,10 +1029,16 @@ static void do_monitor_cpu_split(struct cpu_pid_state *state)
1023 " (%d) !\n", 1029 " (%d) !\n",
1024 state->index, temp >> 16); 1030 state->index, temp >> 16);
1025 state->overtemp += CPU_MAX_OVERTEMP / 4; 1031 state->overtemp += CPU_MAX_OVERTEMP / 4;
1026 } else if (temp > (state->mpu.tmax << 16)) 1032 } else if (temp > (state->mpu.tmax << 16)) {
1027 state->overtemp++; 1033 state->overtemp++;
1028 else 1034 printk(KERN_WARNING "CPU %d temperature %d above max %d. overtemp %d\n",
1035 state->index, temp >> 16, state->mpu.tmax, state->overtemp);
1036 } else {
1037 if (state->overtemp)
1038 printk(KERN_WARNING "CPU %d temperature back down to %d\n",
1039 state->index, temp >> 16);
1029 state->overtemp = 0; 1040 state->overtemp = 0;
1041 }
1030 if (state->overtemp >= CPU_MAX_OVERTEMP) 1042 if (state->overtemp >= CPU_MAX_OVERTEMP)
1031 critical_state = 1; 1043 critical_state = 1;
1032 if (state->overtemp > 0) { 1044 if (state->overtemp > 0) {
@@ -1085,10 +1097,16 @@ static void do_monitor_cpu_rack(struct cpu_pid_state *state)
1085 " (%d) !\n", 1097 " (%d) !\n",
1086 state->index, temp >> 16); 1098 state->index, temp >> 16);
1087 state->overtemp = CPU_MAX_OVERTEMP / 4; 1099 state->overtemp = CPU_MAX_OVERTEMP / 4;
1088 } else if (temp > (state->mpu.tmax << 16)) 1100 } else if (temp > (state->mpu.tmax << 16)) {
1089 state->overtemp++; 1101 state->overtemp++;
1090 else 1102 printk(KERN_WARNING "CPU %d temperature %d above max %d. overtemp %d\n",
1103 state->index, temp >> 16, state->mpu.tmax, state->overtemp);
1104 } else {
1105 if (state->overtemp)
1106 printk(KERN_WARNING "CPU %d temperature back down to %d\n",
1107 state->index, temp >> 16);
1091 state->overtemp = 0; 1108 state->overtemp = 0;
1109 }
1092 if (state->overtemp >= CPU_MAX_OVERTEMP) 1110 if (state->overtemp >= CPU_MAX_OVERTEMP)
1093 critical_state = 1; 1111 critical_state = 1;
1094 if (state->overtemp > 0) { 1112 if (state->overtemp > 0) {
diff --git a/drivers/macintosh/therm_pm72.h b/drivers/macintosh/therm_pm72.h
index 393cc9df94e1..df3680e2a22f 100644
--- a/drivers/macintosh/therm_pm72.h
+++ b/drivers/macintosh/therm_pm72.h
@@ -269,7 +269,7 @@ struct slots_pid_state
269#define CPU_TEMP_HISTORY_SIZE 2 269#define CPU_TEMP_HISTORY_SIZE 2
270#define CPU_POWER_HISTORY_SIZE 10 270#define CPU_POWER_HISTORY_SIZE 10
271#define CPU_PID_INTERVAL 1 271#define CPU_PID_INTERVAL 1
272#define CPU_MAX_OVERTEMP 30 272#define CPU_MAX_OVERTEMP 90
273 273
274#define CPUA_PUMP_RPM_INDEX 7 274#define CPUA_PUMP_RPM_INDEX 7
275#define CPUB_PUMP_RPM_INDEX 8 275#define CPUB_PUMP_RPM_INDEX 8
diff --git a/drivers/macintosh/windfarm_core.c b/drivers/macintosh/windfarm_core.c
index 437f55c5d18d..419795f4a2aa 100644
--- a/drivers/macintosh/windfarm_core.c
+++ b/drivers/macintosh/windfarm_core.c
@@ -321,6 +321,7 @@ int wf_register_sensor(struct wf_sensor *new_sr)
321 kref_init(&new_sr->ref); 321 kref_init(&new_sr->ref);
322 list_add(&new_sr->link, &wf_sensors); 322 list_add(&new_sr->link, &wf_sensors);
323 323
324 sysfs_attr_init(&new_sr->attr.attr);
324 new_sr->attr.attr.name = new_sr->name; 325 new_sr->attr.attr.name = new_sr->name;
325 new_sr->attr.attr.mode = 0444; 326 new_sr->attr.attr.mode = 0444;
326 new_sr->attr.show = wf_show_sensor; 327 new_sr->attr.show = wf_show_sensor;
diff --git a/drivers/macintosh/windfarm_smu_controls.c b/drivers/macintosh/windfarm_smu_controls.c
index 6c68b9e5f5c4..43137b421f92 100644
--- a/drivers/macintosh/windfarm_smu_controls.c
+++ b/drivers/macintosh/windfarm_smu_controls.c
@@ -173,6 +173,7 @@ static struct smu_fan_control *smu_fan_create(struct device_node *node,
173 173
174 fct->fan_type = pwm_fan; 174 fct->fan_type = pwm_fan;
175 fct->ctrl.type = pwm_fan ? WF_CONTROL_PWM_FAN : WF_CONTROL_RPM_FAN; 175 fct->ctrl.type = pwm_fan ? WF_CONTROL_PWM_FAN : WF_CONTROL_RPM_FAN;
176 sysfs_attr_init(&fct->ctrl.attr.attr);
176 177
177 /* We use the name & location here the same way we do for SMU sensors, 178 /* We use the name & location here the same way we do for SMU sensors,
178 * see the comment in windfarm_smu_sensors.c. The locations are a bit 179 * see the comment in windfarm_smu_sensors.c. The locations are a bit