[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <e58b6fc54a8671c673f9c3c5753a4242255a0599.1468483951.git.jslaby@suse.cz>
Date: Thu, 14 Jul 2016 10:15:10 +0200
From: Jiri Slaby <jslaby@...e.cz>
To: stable@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Aaro Koskinen <aaro.koskinen@....fi>,
Michael Ellerman <mpe@...erman.id.au>,
Oliver Neukum <oliver@...kum.org>, Jiri Slaby <jslaby@...e.cz>
Subject: [PATCH 3.12 18/88] drivers: macintosh: rack-meter: limit idle ticks to total ticks
From: Aaro Koskinen <aaro.koskinen@....fi>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit c796d1d97c3035cf54d4d5a9e75abd094db80e76 upstream.
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@....fi>
Signed-off-by: Michael Ellerman <mpe@...erman.id.au>
Cc: Oliver Neukum <oliver@...kum.org>
Signed-off-by: Jiri Slaby <jslaby@...e.cz>
---
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 cad0e19b47a2..0b569da3c467 100644
--- a/drivers/macintosh/rack-meter.c
+++ b/drivers/macintosh/rack-meter.c
@@ -225,6 +225,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.9.1
Powered by blists - more mailing lists