Re: [2.6.10][Suspend] - Time problems

From: Shawn Starr
Date: Wed Jan 12 2005 - 19:46:38 EST


I'll just bump to 2.6.11-rc1, Rafael, not that one

In either case, it won't be a problem in a few moments. :)

Shawn.

On January 12, 2005 17:50, Pavel Machek wrote:
> 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;
> }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/