linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@suse.cz>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Shawn Starr <shawn.starr@rogers.com>, linux-kernel@vger.kernel.org
Subject: Re: [2.6.10][Suspend] - Time problems
Date: Wed, 12 Jan 2005 23:50:11 +0100	[thread overview]
Message-ID: <20050112225011.GQ1408@elf.ucw.cz> (raw)
In-Reply-To: <200501122344.11508.rjw@sisk.pl>

Hi!

> > > When resuming from suspend, I noticed the clock is waay off (its 10:16pm, 
> it 
> > > shows 2:34AM EST time). This is even after a reboot the bios now shows 
> wrong 
> > > time?
> > 
> > Yes, see for example thread "2.6.10-mm2: swsusp regression
> > [update]". Nigel has some patch that should fix it...
> 
> Do you mean patches in the "[RFC] Patches to reduce delay in 
> arch/kernel/time.c" thread?

I meant this one... (cut&pasted, apply by hand). But it seems to be
included in 2.6.11-rc1. I'm now confused.
								Pavel

diff -ruNp 910-original-time-patch-old/arch/i386/kernel/time.c
910-original-time-patch-new/arch/i386/kernel/time.c
--- 910-original-time-patch-old/arch/i386/kernel/time.c 2004-12-27
+++ 910-original-time-patch-new/arch/i386/kernel/time.c 2005-01-08
@@ -343,12 +343,13 @@ static int timer_resume(struct sys_devic
                hpet_reenable();
 #endif
        sec = get_cmos_time() + clock_cmos_diff;
-       sleep_length = get_cmos_time() - sleep_start;
+       sleep_length = (get_cmos_time() - sleep_start) * HZ;
        write_seqlock_irqsave(&xtime_lock, flags);
        xtime.tv_sec = sec;
        xtime.tv_nsec = 0;
        write_sequnlock_irqrestore(&xtime_lock, flags);
-       jiffies += sleep_length * HZ;
+       jiffies += sleep_length;
+       wall_jiffies += sleep_length;
        return 0;
 }


-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

  reply	other threads:[~2005-01-12 22:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-11  7:35 [2.6.10][Suspend] - Time problems Shawn Starr
2005-01-12 22:24 ` Pavel Machek
2005-01-12 22:44   ` Rafael J. Wysocki
2005-01-12 22:50     ` Pavel Machek [this message]
2005-01-13  0:31       ` Shawn Starr
2005-03-28  7:51         ` [2.6.12-rc1] suspend to Disk success - T42 laptop Shawn Starr
2005-03-29 11:38           ` Pavel Machek
2005-03-31 16:59             ` Stefan Seyfried

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=20050112225011.GQ1408@elf.ucw.cz \
    --to=pavel@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=shawn.starr@rogers.com \
    /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).