All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clockevents: don't suspend/resume if unused
@ 2015-01-16  9:05 ` Alexandre Belloni
  0 siblings, 0 replies; 25+ messages in thread
From: Alexandre Belloni @ 2015-01-16  9:05 UTC (permalink / raw)
  To: linux-arm-kernel

There is no point in calling suspend/resume for unused
clockevents as they are already stopped and disabled.

Furthermore, it can take some time to wait for some IPs to stop counting.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Reported-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
---
 kernel/time/clockevents.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index 55449909f114..0eff982c1c11 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -525,7 +525,7 @@ void clockevents_suspend(void)
 	struct clock_event_device *dev;
 
 	list_for_each_entry_reverse(dev, &clockevent_devices, list)
-		if (dev->suspend)
+		if (dev->suspend && dev->mode != CLOCK_EVT_MODE_UNUSED)
 			dev->suspend(dev);
 }
 
@@ -537,7 +537,7 @@ void clockevents_resume(void)
 	struct clock_event_device *dev;
 
 	list_for_each_entry(dev, &clockevent_devices, list)
-		if (dev->resume)
+		if (dev->resume && dev->mode != CLOCK_EVT_MODE_UNUSED)
 			dev->resume(dev);
 }
 
-- 
2.1.0

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

end of thread, other threads:[~2015-05-26 23:08 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-16  9:05 [PATCH] clockevents: don't suspend/resume if unused Alexandre Belloni
2015-01-16  9:05 ` Alexandre Belloni
2015-01-16  9:20 ` Sylvain Rochet
2015-01-16  9:20   ` Sylvain Rochet
2015-01-16 11:17   ` Russell King - ARM Linux
2015-01-16 11:17     ` Russell King - ARM Linux
2015-01-16 11:20     ` Russell King - ARM Linux
2015-01-16 11:20       ` Russell King - ARM Linux
2015-01-16 16:59   ` Alexandre Belloni
2015-01-16 16:59     ` Alexandre Belloni
2015-03-06 12:54     ` Alexandre Belloni
2015-03-06 12:54       ` Alexandre Belloni
2015-05-25 16:19     ` Alexandre Belloni
2015-05-25 16:19       ` Alexandre Belloni
2015-05-25 16:56     ` Thomas Gleixner
2015-05-25 16:56       ` Thomas Gleixner
2015-05-25 18:48 ` Thomas Gleixner
2015-05-25 18:48   ` Thomas Gleixner
2015-05-25 19:06   ` Sylvain Rochet
2015-05-25 19:06     ` Sylvain Rochet
2015-05-25 20:11     ` Thomas Gleixner
2015-05-25 20:11       ` Thomas Gleixner
2015-05-25 20:53       ` Sylvain Rochet
2015-05-25 20:53         ` Sylvain Rochet
2015-05-26 23:07 ` [tip:timers/core] clockevents: Do not " tip-bot for Alexandre Belloni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.