mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Jan Beulich" <JBeulich@novell.com>
Cc: "Andrew Morton" <akpm@osdl.org>, "Andi Kleen" <ak@suse.de>,
	linux-kernel@vger.kernel.org, discuss@x86-64.org
Subject: Re: 2.6.15-rc5-mm1 (x86_64-hpet-overflow.patch breaks resume from disk)
Date: Fri, 9 Dec 2005 18:34:38 +0100	[thread overview]
Message-ID: <200512091834.38960.rjw@sisk.pl> (raw)
In-Reply-To: <439989A7.76F0.0078.0@novell.com>

On Friday, 9 December 2005 13:41, Jan Beulich wrote:
> >>> "Rafael J. Wysocki" <rjw@sisk.pl> 09.12.05 12:20:05 >>>
> >On Friday, 9 December 2005 10:15, Jan Beulich wrote:
> >> It's a possible way to address this, but I'd rather just set a flag
> >> indicating that the last-whatever values should not be considered
> (to
> >> get into a state just like after initial boot). Jan
> >
> >OK, but what is the interrupt handler supposed to do if the
> >vxtime.last* values are invalid?  I guess assume delta = 0?
> 
> As I said, the state should be (re)set to whatever is in effect at
> boot.

Is the appended patch better than the previous one?

Rafael


 arch/x86_64/kernel/time.c |    9 +++++++++
 1 files changed, 9 insertions(+)

Index: linux-2.6.15-rc5-mm1/arch/x86_64/kernel/time.c
===================================================================
--- linux-2.6.15-rc5-mm1.orig/arch/x86_64/kernel/time.c	2005-12-08 22:57:33.000000000 +0100
+++ linux-2.6.15-rc5-mm1/arch/x86_64/kernel/time.c	2005-12-09 14:37:31.000000000 +0100
@@ -65,6 +65,7 @@ unsigned long hpet_tick;
 static int hpet_use_timer;
 unsigned long vxtime_hz = PIT_TICK_RATE;
 unsigned long long monotonic_base;
+static int vxtime_last_invalid;		/* for the interrupt handler */
 static int report_lost_ticks;			/* command line option */
 
 
@@ -417,6 +418,13 @@ static irqreturn_t timer_interrupt(int i
 
 	rdtscll_sync(&tsc);
 
+	if (vxtime_last_invalid) {
+		if (vxtime.mode == VXTIME_HPET)
+			vxtime.last = offset;
+		vxtime.last_tsc = tsc;
+		vxtime_last_invalid = 0;
+	}
+
 	if (vxtime.mode == VXTIME_HPET) {
 		if (hpet64 > 0) {
 			unsigned long delta = offset - vxtime.last;
@@ -1125,6 +1133,7 @@ static int timer_resume(struct sys_devic
 
 	sec = ctime + clock_cmos_diff;
 	write_seqlock_irqsave(&xtime_lock,flags);
+	vxtime_last_invalid = 1;
 	xtime.tv_sec = sec;
 	xtime.tv_nsec = 0;
 	write_sequnlock_irqrestore(&xtime_lock,flags);

  parent reply	other threads:[~2005-12-09 17:33 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-05  7:21 2.6.15-rc5-mm1 Andrew Morton
2005-12-05  6:49 ` 2.6.15-rc5-mm1 Carlos Martín
2005-12-06  3:04   ` 2.6.15-rc5-mm1 Andrew Morton
2005-12-06  6:59     ` 2.6.15-rc5-mm1 Ingo Molnar
2005-12-05 19:06 ` 2.6.15-rc5-mm1: git-alsa-vs-git-pcmcia.patch introduces new compile errors Adrian Bunk
2005-12-05 20:05   ` Takashi Iwai
2005-12-05 21:40 ` 2.6.15-rc5-mm1: USB_IP problems Adrian Bunk
2005-12-07  0:02   ` Greg KH
2005-12-07  0:08     ` Adrian Bunk
2005-12-05 23:05 ` 2.6.15-rc5-mm1 J.A. Magallon
2005-12-05 23:06   ` 2.6.15-rc5-mm1 Randy.Dunlap
2005-12-10 23:36   ` 2.6.15-rc5-mm1 Greg KH
2005-12-10 23:46     ` 2.6.15-rc5-mm1 J.A. Magallon
2005-12-11 21:36       ` 2.6.15-rc5-mm1 J.A. Magallon
2005-12-12 22:58         ` 2.6.15-rc5-mm1 Andrew Morton
2005-12-13  3:44           ` [linux-usb-devel] 2.6.15-rc5-mm1 Alan Stern
2005-12-13 13:51             ` J.A. Magallon
2005-12-13 15:35               ` Alan Stern
2005-12-13 16:47                 ` David Brownell
2005-12-06 13:33 ` 2.6.15-rc5-mm1 KAMEZAWA Hiroyuki
2005-12-07  0:46 ` 2.6.15-rc5-mm1 (x86_64-hpet-overflow.patch breaks resume from disk) Rafael J. Wysocki
2005-12-07 23:15   ` Rafael J. Wysocki
2005-12-08  8:43     ` [discuss] " Jan Beulich
2005-12-08 10:53       ` Rafael J. Wysocki
2005-12-08 22:35         ` Rafael J. Wysocki
2005-12-09  9:15           ` Jan Beulich
2005-12-09  9:16             ` Andi Kleen
2005-12-09 11:20             ` Rafael J. Wysocki
2005-12-09 12:41               ` Jan Beulich
2005-12-09 13:10                 ` Rafael J. Wysocki
2005-12-09 17:34                 ` Rafael J. Wysocki [this message]
2005-12-12  7:58                   ` Jan Beulich
2005-12-12  8:05                     ` [discuss] " Andi Kleen
2005-12-08 22:47       ` Andi Kleen
2005-12-08 23:00         ` Rafael J. Wysocki
2005-12-09  9:08         ` Jan Beulich
2005-12-09  9:16           ` Andi Kleen
2005-12-09 10:57             ` Jan Beulich
2005-12-08 19:09 ` 2.6.15-rc5-mm1 Badari Pulavarty
2005-12-08 21:14   ` 2.6.15-rc5-mm1 James Courtier-Dutton
2005-12-08 23:02   ` 2.6.15-rc5-mm1 Adrian Bunk
2005-12-09  7:15     ` [Alsa-devel] 2.6.15-rc5-mm1 Jaroslav Kysela
2005-12-09  1:09 ` 2.6.15-rc5-mm1 Alexander E. Patrakov
2005-12-09  1:52   ` 2.6.15-rc5-mm1 Jeff Garzik
2005-12-12 16:12   ` 2.6.15-rc5-mm1 Alan Cox
2005-12-13 22:49 ` 2.6.15-rc5-mm1 J.A. Magallon
2005-12-13 23:24   ` 2.6.15-rc5-mm1 Andrew Morton
2005-12-14  0:17     ` 2.6.15-rc5-mm1 J.A. Magallon
2005-12-14  0:22       ` 2.6.15-rc5-mm1 Andrew Morton
2005-12-14  1:33         ` 2.6.15-rc5-mm1 Dmitry Torokhov
2005-12-14  0:31       ` 2.6.15-rc5-mm1 Ben Pfaff

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=200512091834.38960.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=JBeulich@novell.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=discuss@x86-64.org \
    --cc=linux-kernel@vger.kernel.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

Powered by JetHome