Re: spin_lock error in arch/i386/kernel/time.c on APM resume
From: Pavel Machek
Date: Sun Mar 13 2005 - 13:39:11 EST
> >>And more... That this occures implies we are attempting to update the cmos
> >>clock on resume seems wrong. One would presume that the time is wrong at
> >>time and we are about to save that wrong time. Possibly the APM code
> >>change time_status to STA_UNSYNC on the way into the sleep (or what ever
> >>it is
> >>called). Who should we ping with this?
> >timer_resume, which appears to be the problem, wants to calculate amount
> >of time was spent suspended, also your unconditional irq enable in
> >get_cmos_time breaks the atomicity of device_power_up and would deadlock
> >in sections of code which call get_time_diff() with xtime_lock held. I
> >sent a patch subject "APM: fix interrupts enabled in device_power_up"
> >which should address this.
> I agree. Still in all that follows, no one has addressed the apparent race
> described above. The reason the system reported the errors that started
> this thread is that the APM restore code was trying to read the cmos clock
> (I assume to set the xtime clock) WHILE the timer interrupt code what
> trying to set the cmos clock from xtime. In other words, it is destroying
> the time it is trying to read. I repeat "Possibly the APM code should
> change time_status to STA_UNSYNC on the way into the sleep." I am not sure
> how ntp is supposed to react to the resume but I suspect that the system
> time is rather out of sync...
It needs to work without NTP, too. You don't get NTP on plane (etc)
where suspend is most usefull.
We have CMOS clock, it should be possible to get time from there
without resorting to NTP..
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
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/