powerpmac_thermal: Improve thermal regulation on G5 quad models

Add a new "high temp" threshold below the max temp, in order to ramp the
fans (or pump for liquid cooled quads) sooner, and avoid the maximum
temperature.  From the PR, this makes older G5 quads louder, but usable,
instead of hitting max temperature and forcing a thermal shutdown.

PR:		209202
Submitted by:	gmbroome (PR)
This commit is contained in:
Justin Hibbits committed 2026-09-11 22:05:06 -04:00
1 parent fe81d42176
commit fc3eca3913
4 files changed
+10 -8

No files matched your search

+3 -3
View File
@@ -42,7 +42,7 @@
#include "powermac_thermal.h"
/* A 10 second timer for spinning down fans. */
#define FAN_HYSTERESIS_TIMER 10
#define FAN_HYSTERESIS_TIMER 30
static void fan_management_proc(void);
static void pmac_therm_manage_fans(void);
@@ -142,10 +142,10 @@ pmac_therm_manage_fans(void)
average_excess = max_excess_zone = 0;
SLIST_FOREACH(sensor, &sensors, entries) {
temp = imin(sensor->last_val,
sensor->sensor->max_temp);
sensor->sensor->high_temp);
frac_excess = (temp -
sensor->sensor->target_temp)*100 /
(sensor->sensor->max_temp - temp + 1);
(sensor->sensor->high_temp - temp + 1);
if (frac_excess < 0)
frac_excess = 0;
if (sensor->sensor->zone == fan->fan->zone) {
+1 -1
View File
@@ -42,7 +42,7 @@ struct pmac_fan {
};
struct pmac_therm {
int target_temp, max_temp; /* Tenths of a degree K */
int target_temp, high_temp, max_temp; /* Tenths of a degree K */
char name[32];
int zone;
+3 -2
View File
@@ -1244,8 +1244,9 @@ smu_attach_sensors(device_t dev, phandle_t sensroot)
if (sens->type == SMU_TEMP_SENSOR) {
/* Make up some numbers */
sens->therm.target_temp = 500 + 2731; /* 50 C */
sens->therm.max_temp = 900 + 2731; /* 90 C */
sens->therm.target_temp = 400 + 2732; /* 40 C */
sens->therm.high_temp = 750 + 2732; /* 75 C */
sens->therm.max_temp = 950 + 2732; /* 95 C */
sens->therm.read =
(int (*)(struct pmac_therm *))smu_sensor_read;
+3 -2
View File
@@ -181,8 +181,9 @@ smusat_attach(device_t dev)
if (sens->type == SMU_TEMP_SENSOR) {
/* Make up some numbers */
sens->therm.target_temp = 500 + 2731; /* 50 C */
sens->therm.max_temp = 900 + 2731; /* 90 C */
sens->therm.target_temp = 400 + 2732; /* 40 C */
sens->therm.high_temp = 750 + 2732; /* 75 C */
sens->therm.max_temp = 950 + 2732; /* 95 C */
sens->therm.read =
(int (*)(struct pmac_therm *))smusat_sensor_read;
pmac_thermal_sensor_register(&sens->therm);