linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND 1/2] drivers: macintosh: rack-meter: limit idle ticks to total ticks
@ 2016-04-10 19:53 Aaro Koskinen
  2016-04-10 19:53 ` [PATCH RESEND 2/2] drivers: macintosh: rack-meter: fix bogus memsets Aaro Koskinen
  2016-04-13 13:33 ` [RESEND, 1/2] drivers: macintosh: rack-meter: limit idle ticks to total ticks Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: Aaro Koskinen @ 2016-04-10 19:53 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Michael Ellerman, linuxppc-dev; +Cc: Aaro Koskinen

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>
---
 drivers/macintosh/rack-meter.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c
index caaec65..ba7e330 100644
--- a/drivers/macintosh/rack-meter.c
+++ b/drivers/macintosh/rack-meter.c
@@ -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,
-- 
2.7.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-13 13:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-10 19:53 [PATCH RESEND 1/2] drivers: macintosh: rack-meter: limit idle ticks to total ticks Aaro Koskinen
2016-04-10 19:53 ` [PATCH RESEND 2/2] drivers: macintosh: rack-meter: fix bogus memsets Aaro Koskinen
2016-04-13 13:33 ` [RESEND, 1/2] drivers: macintosh: rack-meter: limit idle ticks to total ticks Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).