[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-ac34ad27fc160b5bd31c731cdaaf6e1d1890ccb2@git.kernel.org>
Date: Tue, 26 May 2015 16:07:39 -0700
From: tip-bot for Alexandre Belloni <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: hpa@...or.com, alexandre.belloni@...e-electrons.com,
nicolas.ferre@...el.com, boris.brezillon@...e-electrons.com,
maxime.ripard@...e-electrons.com, linux-kernel@...r.kernel.org,
daniel.lezcano@...aro.org, mingo@...nel.org, tglx@...utronix.de,
sylvain.rochet@...secur.com
Subject: [tip:timers/core] clockevents: Do not suspend/resume if unused
Commit-ID: ac34ad27fc160b5bd31c731cdaaf6e1d1890ccb2
Gitweb: http://git.kernel.org/tip/ac34ad27fc160b5bd31c731cdaaf6e1d1890ccb2
Author: Alexandre Belloni <alexandre.belloni@...e-electrons.com>
AuthorDate: Fri, 16 Jan 2015 10:05:51 +0100
Committer: Thomas Gleixner <tglx@...utronix.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@...secur.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@...e-electrons.com>
Cc: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: Nicolas Ferre <nicolas.ferre@...el.com>
Cc: Boris Brezillon <boris.brezillon@...e-electrons.com>
Cc: Maxime Ripard <maxime.ripard@...e-electrons.com>
Cc: linux-arm-kernel@...ts.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@...utronix.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);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists