Re: 2.6.10-mm2: swsusp regression [update]

From: Rafael J. Wysocki
Date: Wed Jan 12 2005 - 14:40:41 EST


H,

On Saturday, 8 of January 2005 16:44, Pavel Machek wrote:
[-- snip --]
> > > > The regression is caused by the timer driver. Obviously, turning
> > > > timer_resume() in arch/x86_64/kernel/time.c into a NOOP makes it go
> > > > away.
[-- snip --]
> > >
> > > ..you might want to look at i386 time code, they have common
> > > ancestor, and i386 one seems to work.

Well, I've changed timer_resume() in arch/x86_64/kernel/time.c into the
following function:

static int timer_resume(struct sys_device *dev)
{
unsigned long flags;
unsigned long sec;
unsigned long ctime = get_cmos_time();
long sleep_length = (ctime - sleep_start) * HZ;

if (vxtime.hpet_address)
hpet_reenable();

sec = ctime + clock_cmos_diff;
write_seqlock_irqsave(&xtime_lock,flags);
xtime.tv_sec = sec;
xtime.tv_nsec = 0;
write_sequnlock_irqrestore(&xtime_lock,flags);
printk ("jiffies = %lu, sleep_length = %ld\n", jiffies, sleep_length);
return 0;
}

and that's what I get from the log:

Jan 12 19:43:42 albercik kernel: jiffies = 4294847120, sleep_length =
-3189288131000

(for example - the second number is always negative and huge). Would it mean
that get_cmos_time() needs fixing?

Greets,
RJW

--
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
-- Lewis Carroll "Alice's Adventures in Wonderland"
-
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/