Source
x
* overtemp handling core as it's not fully suited to the needs of those
/*
* Windfarm PowerMac thermal control.
* Control loops for RackMack3,1 (Xserve G5)
*
* Copyright (C) 2012 Benjamin Herrenschmidt, IBM Corp.
*
* Use and redistribute under the terms of the GNU GPL v2.
*/
/* define this to force CPU overtemp to 60 degree, useful for testing
* the overtemp code
*/
/* We currently only handle 2 chips */
/* Controls and sensors */
static struct wf_sensor *sens_cpu_temp[NR_CHIPS];
static struct wf_sensor *sens_cpu_volts[NR_CHIPS];
static struct wf_sensor *sens_cpu_amps[NR_CHIPS];
static struct wf_sensor *backside_temp;
static struct wf_sensor *slots_temp;
static struct wf_sensor *dimms_temp;
static struct wf_control *cpu_fans[NR_CHIPS][3];
static struct wf_control *backside_fan;
static struct wf_control *slots_fan;
static struct wf_control *cpufreq_clamp;
/* We keep a temperature history for average calculation of 180s */
/* PID loop state */
static const struct mpu_data *cpu_mpu_data[NR_CHIPS];
static struct wf_cpu_pid_state cpu_pid[NR_CHIPS];
static u32 cpu_thist[CPU_TEMP_HIST_SIZE];
static int cpu_thist_pt;
static s64 cpu_thist_total;
static s32 cpu_all_tmax = 100 << 16;
static struct wf_pid_state backside_pid;
static int backside_tick;
static struct wf_pid_state slots_pid;
static int slots_tick;
static int slots_speed;
static struct wf_pid_state dimms_pid;
static int dimms_output_clamp;
static int nr_chips;
static bool have_all_controls;
static bool have_all_sensors;
static bool started;
static int failure_state;
/* Overtemp values */