Skip to content

Commit

Permalink
drivers: macintosh: rack-meter: limit idle ticks to total ticks
Browse files Browse the repository at this point in the history
Limit idle ticks to total ticks. This prevents the annoying rackmeter
leds fully ON / OFF blinking state that happens on fully idling
G5 Xserve systems.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Aaro Koskinen authored and Michael Ellerman committed Apr 12, 2016
1 parent 7f92bc5 commit c796d1d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/macintosh/rack-meter.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ static void rackmeter_do_timer(struct work_struct *work)

total_idle_ticks = get_cpu_idle_time(cpu);
idle_ticks = (unsigned int) (total_idle_ticks - rcpu->prev_idle);
idle_ticks = min(idle_ticks, total_ticks);
rcpu->prev_idle = total_idle_ticks;

/* We do a very dumb calculation to update the LEDs for now,
Expand Down

0 comments on commit c796d1d

Please sign in to comment.