From: tip-bot for Alexandre Belloni <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, alexandre.belloni@free-electrons.com,
nicolas.ferre@atmel.com, boris.brezillon@free-electrons.com,
maxime.ripard@free-electrons.com, linux-kernel@vger.kernel.org,
daniel.lezcano@linaro.org, mingo@kernel.org, tglx@linutronix.de,
sylvain.rochet@finsecur.com
Subject: [tip:timers/core] clockevents: Do not suspend/resume if unused
Date: Tue, 26 May 2015 16:07:39 -0700 [thread overview]
Message-ID: <tip-ac34ad27fc160b5bd31c731cdaaf6e1d1890ccb2@git.kernel.org> (raw)
In-Reply-To: <1421399151-26800-1-git-send-email-alexandre.belloni@free-electrons.com>
Commit-ID: ac34ad27fc160b5bd31c731cdaaf6e1d1890ccb2
Gitweb: http://git.kernel.org/tip/ac34ad27fc160b5bd31c731cdaaf6e1d1890ccb2
Author: Alexandre Belloni <alexandre.belloni@free-electrons.com>
AuthorDate: Fri, 16 Jan 2015 10:05:51 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Wed, 27 May 2015 01:03:38 +0200
clockevents: Do not suspend/resume if unused
There is no point in calling suspend/resume for unused clockevents as
they are already stopped and disabled.
This is really important for AT91 as the hardware is a trainwreck and
takes ages to synchronize.
Reported-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1421399151-26800-1-git-send-email-alexandre.belloni@free-electrons.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
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 4922f1b..2a5c369 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -638,7 +638,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);
}
@@ -650,7 +650,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);
}
prev parent reply other threads:[~2015-05-26 23:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-16 9:05 [PATCH] clockevents: don't " Alexandre Belloni
2015-01-16 9:20 ` Sylvain Rochet
2015-01-16 11:17 ` Russell King - ARM Linux
2015-01-16 11:20 ` Russell King - ARM Linux
2015-01-16 16:59 ` Alexandre Belloni
2015-03-06 12:54 ` Alexandre Belloni
2015-05-25 16:19 ` Alexandre Belloni
2015-05-25 16:56 ` Thomas Gleixner
2015-05-25 18:48 ` Thomas Gleixner
2015-05-25 19:06 ` Sylvain Rochet
2015-05-25 20:11 ` Thomas Gleixner
2015-05-25 20:53 ` Sylvain Rochet
2015-05-26 23:07 ` tip-bot for Alexandre Belloni [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-ac34ad27fc160b5bd31c731cdaaf6e1d1890ccb2@git.kernel.org \
--to=tipbot@zytor.com \
--cc=alexandre.belloni@free-electrons.com \
--cc=boris.brezillon@free-electrons.com \
--cc=daniel.lezcano@linaro.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=maxime.ripard@free-electrons.com \
--cc=mingo@kernel.org \
--cc=nicolas.ferre@atmel.com \
--cc=sylvain.rochet@finsecur.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome