From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2 0/3] clocksource: add db8500 PRCMU timer
Date: Thu, 2 Jun 2011 10:46:22 +0100 [thread overview]
Message-ID: <20110602094622.GS3660@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1307007271-1004-1-git-send-email-mattias.wallin@stericsson.com>
On Thu, Jun 02, 2011 at 11:34:31AM +0200, Mattias Wallin wrote:
> The Multi Timer Unit (MTU) is currently used as clocksource and sched_clk
> for the u8500 machine. The MTU block loose power during cpuidle sleep states
> so an alternate clocksource is needed and these patches adds the db8500 PRCMU
> timer.
Why don't we just find a way of fixing sched_clock so that the value
doesn't reset over a suspend/resume cycle? IOW, lets fix the problem
for _everyone_ rather than only fixing it for one platform at a time.
Could you try this patch to check whether sched_clock() behaves better
across a suspend/resume cycle please?
arch/arm/kernel/sched_clock.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/arch/arm/kernel/sched_clock.c b/arch/arm/kernel/sched_clock.c
index 9a46370..4be4019 100644
--- a/arch/arm/kernel/sched_clock.c
+++ b/arch/arm/kernel/sched_clock.c
@@ -10,6 +10,7 @@
#include <linux/jiffies.h>
#include <linux/kernel.h>
#include <linux/sched.h>
+#include <linux/syscore_ops.h>
#include <linux/timer.h>
#include <asm/sched_clock.h>
@@ -72,3 +73,20 @@ void __init sched_clock_postinit(void)
{
sched_clock_poll(sched_clock_timer.data);
}
+
+static int sched_clock_suspend(void)
+{
+ sched_clock_poll(sched_clock_timer.data);
+ return 0;
+}
+
+static struct syscore_ops sched_clock_ops = {
+ .suspend = sched_clock_suspend,
+};
+
+static int __init sched_clock_syscore_init(void)
+{
+ register_syscore_ops(&sched_clock_ops);
+ return 0;
+}
+device_initcall(sched_clock_syscore_init);
next prev parent reply other threads:[~2011-06-02 9:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-02 9:34 [PATCHv2 0/3] clocksource: add db8500 PRCMU timer Mattias Wallin
2011-06-02 9:46 ` Russell King - ARM Linux [this message]
2011-06-02 10:18 ` Mattias Wallin
2011-06-02 11:01 ` Russell King - ARM Linux
2011-06-02 12:10 ` Mattias Wallin
2011-06-02 12:57 ` Santosh Shilimkar
2011-06-02 13:04 ` Russell King - ARM Linux
2011-06-02 13:16 ` Santosh Shilimkar
2011-06-02 18:47 ` john stultz
2011-06-08 13:44 ` Mattias Wallin
2011-06-09 21:59 ` Russell King - ARM Linux
2011-06-10 8:54 ` Mattias Wallin
2011-06-10 16:00 ` Mattias Wallin
2011-07-10 14:19 ` Russell King - ARM Linux
2012-02-04 12:30 ` Russell King - ARM Linux
2012-02-05 15:11 ` Linus Walleij
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=20110602094622.GS3660@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).