From: Thomas Gleixner <tglx@linutronix.de>
To: Pavel Machek <pavel@suse.cz>
Cc: kernel list <linux-kernel@vger.kernel.org>,
Linux-pm mailing list <linux-pm@lists.osdl.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: 2.6.27-rc6: nohz + s2ram = need to press keys to get progress
Date: Tue, 16 Sep 2008 10:02:51 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.1.10.0809161000410.3875@apollo.tec.linutronix.de> (raw)
In-Reply-To: <alpine.LFD.1.10.0809160715120.3606@apollo.tec.linutronix.de>
On Tue, 16 Sep 2008, Thomas Gleixner wrote:
> On Mon, 15 Sep 2008, Pavel Machek wrote:
> > > cg-seek here, and problem is back. Good. I can get the
Does the patch below fix it ?
Thanks,
tglx
----
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index 1876b52..eb8736f 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -69,6 +69,9 @@ void clockevents_set_mode(struct clock_event_device *dev,
dev->set_mode(mode, dev);
dev->mode = mode;
}
+
+ if (mode == CLOCK_EVT_MODE_SHUTDOWN)
+ dev->next_event.tv64 = KTIME_MAX;
}
/**
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
index 2f5a382..6b0b230 100644
--- a/kernel/time/tick-broadcast.c
+++ b/kernel/time/tick-broadcast.c
@@ -434,6 +434,19 @@ again:
}
/*
+ * We shutdown the device which will stop anyway, but we keep the
+ * next_event untouched as it carries the information when we
+ * broadcast.
+ */
+static void tick_broadcast_shutdown_device(struct clock_event_device *dev)
+{
+ if (dev->mode != CLOCK_EVT_MODE_SHUTDOWN) {
+ dev->set_mode(CLOCK_EVT_MODE_SHUTDOWN, dev);
+ dev->mode = CLOCK_EVT_MODE_SHUTDOWN;
+ }
+}
+
+/*
* Powerstate information: The system enters/leaves a state, where
* affected devices might stop
*/
@@ -464,7 +477,7 @@ void tick_broadcast_oneshot_control(unsigned long reason)
if (reason == CLOCK_EVT_NOTIFY_BROADCAST_ENTER) {
if (!cpu_isset(cpu, tick_broadcast_oneshot_mask)) {
cpu_set(cpu, tick_broadcast_oneshot_mask);
- clockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN);
+ tick_broadcast_shutdown_device(dev);
if (dev->next_event.tv64 < bc->next_event.tv64)
tick_broadcast_set_event(dev->next_event, 1);
}
prev parent reply other threads:[~2008-09-16 17:02 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-12 8:31 2.6.27-rc6: nohz + s2ram = need to press keys to get progress Pavel Machek
2008-09-12 19:13 ` Thomas Gleixner
2008-09-12 19:17 ` Rafael J. Wysocki
2008-09-12 19:15 ` Thomas Gleixner
2008-09-12 20:45 ` Rafael J. Wysocki
2008-09-12 21:05 ` Thomas Gleixner
2008-09-14 2:56 ` Thomas Gleixner
2008-09-14 10:09 ` Pavel Machek
2008-09-14 10:14 ` Pavel Machek
2008-09-14 17:35 ` Pavel Machek
2008-09-14 17:51 ` Thomas Gleixner
2008-09-14 18:12 ` Pavel Machek
2008-09-14 19:15 ` Thomas Gleixner
2008-09-15 9:19 ` Pavel Machek
2008-09-15 14:08 ` Thomas Gleixner
2008-09-15 19:26 ` Pavel Machek
2008-09-15 19:59 ` Pavel Machek
2008-09-16 14:16 ` Thomas Gleixner
2008-09-16 17:02 ` Thomas Gleixner [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=alpine.LFD.1.10.0809161000410.3875@apollo.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.osdl.org \
--cc=pavel@suse.cz \
--cc=rjw@sisk.pl \
/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