[PATCH] powerpc: Fix windfarm_pm112 not starting all control loops

This adds a couple of printk's to windfarm_pm112 to display which
control loops are actually starting and fixes a bug where it would not
start all loops.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
Benjamin Herrenschmidt 2006-03-03 17:13:30 +11:00 committed by Paul Mackerras
parent b55fafc5a8
commit e2a002b9a7

View File

@ -358,6 +358,7 @@ static void backside_fan_tick(void)
return; return;
if (!backside_tick) { if (!backside_tick) {
/* first time; initialize things */ /* first time; initialize things */
printk(KERN_INFO "windfarm: Backside control loop started.\n");
backside_param.min = backside_fan->ops->get_min(backside_fan); backside_param.min = backside_fan->ops->get_min(backside_fan);
backside_param.max = backside_fan->ops->get_max(backside_fan); backside_param.max = backside_fan->ops->get_max(backside_fan);
wf_pid_init(&backside_pid, &backside_param); wf_pid_init(&backside_pid, &backside_param);
@ -407,6 +408,7 @@ static void drive_bay_fan_tick(void)
return; return;
if (!drive_bay_tick) { if (!drive_bay_tick) {
/* first time; initialize things */ /* first time; initialize things */
printk(KERN_INFO "windfarm: Drive bay control loop started.\n");
drive_bay_prm.min = drive_bay_fan->ops->get_min(drive_bay_fan); drive_bay_prm.min = drive_bay_fan->ops->get_min(drive_bay_fan);
drive_bay_prm.max = drive_bay_fan->ops->get_max(drive_bay_fan); drive_bay_prm.max = drive_bay_fan->ops->get_max(drive_bay_fan);
wf_pid_init(&drive_bay_pid, &drive_bay_prm); wf_pid_init(&drive_bay_pid, &drive_bay_prm);
@ -458,6 +460,7 @@ static void slots_fan_tick(void)
return; return;
if (!slots_started) { if (!slots_started) {
/* first time; initialize things */ /* first time; initialize things */
printk(KERN_INFO "windfarm: Slots control loop started.\n");
wf_pid_init(&slots_pid, &slots_param); wf_pid_init(&slots_pid, &slots_param);
slots_started = 1; slots_started = 1;
} }
@ -504,6 +507,7 @@ static void pm112_tick(void)
if (!started) { if (!started) {
started = 1; started = 1;
printk(KERN_INFO "windfarm: CPUs control loops started.\n");
for (i = 0; i < nr_cores; ++i) { for (i = 0; i < nr_cores; ++i) {
if (create_cpu_loop(i) < 0) { if (create_cpu_loop(i) < 0) {
failure_state = FAILURE_PERM; failure_state = FAILURE_PERM;
@ -594,8 +598,6 @@ static void pm112_new_sensor(struct wf_sensor *sr)
{ {
unsigned int i; unsigned int i;
if (have_all_sensors)
return;
if (!strncmp(sr->name, "cpu-temp-", 9)) { if (!strncmp(sr->name, "cpu-temp-", 9)) {
i = sr->name[9] - '0'; i = sr->name[9] - '0';
if (sr->name[10] == 0 && i < NR_CORES && if (sr->name[10] == 0 && i < NR_CORES &&