From: Luca Capello <luca-wlebWZzHoyE@public.gmane.org>
To: ML ACPI-devel
<acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: 2.6.9 S4: clock not updated after resume
Date: Fri, 22 Oct 2004 10:10:26 +0200 [thread overview]
Message-ID: <4178C072.1020905@pca.it> (raw)
In-Reply-To: <20041021202051.GA21624-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2655 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Pavel,
on 10/21/04 22:20, Pavel Machek wrote:
> It is a bug, here's the fix.
actually, your fix doesn't work, as you can see from the attached
syslog: I still need to synchronise the clock via NTP.
BTW, I'm sure I applied your patch and the kernel is the right one:
=====
luca@gismo:~$ ls -l /lib/modules/2.6.9/
total 200
drwxr-xr-x 2 root root 4096 Oct 22 09:03 bcm
lrwxr-xr-x 1 root root 34 Oct 22 09:03 build ->
/usr/src/linux-2.6.9-battery-clock
drwxr-xr-x 9 root root 4096 Oct 21 02:03 kernel
- -rw-r--r-- 1 root root 37325 Oct 22 09:03 modules.alias
- -rw-r--r-- 1 root root 69 Oct 22 09:03 modules.ccwmap
- -rw-r--r-- 1 root root 18819 Oct 22 09:03 modules.dep
- -rw-r--r-- 1 root root 443 Oct 22 09:03 modules.ieee1394map
- -rw-r--r-- 1 root root 700 Oct 22 09:03 modules.inputmap
- -rw-r--r-- 1 root root 235 Oct 22 09:03 modules.isapnpmap
- -rw-r--r-- 1 root root 43506 Oct 22 09:03 modules.pcimap
- -rw-r--r-- 1 root root 37599 Oct 22 09:03 modules.symbols
- -rw-r--r-- 1 root root 26434 Oct 22 09:03 modules.usbmap
lrwxr-xr-x 1 root root 34 Oct 22 09:03 source ->
/usr/src/linux-2.6.9-battery-clock
drwxr-xr-x 3 root root 4096 Oct 21 02:03 updates
luca@gismo:~$ cd /usr/src
luca@gismo:/usr/src$ diff linux-2.6.9-battery/arch/i386/kernel/time.c
linux-2.6.9-battery-clock/arch/i386/kernel/time.c
- --- linux-2.6.9-battery/arch/i386/kernel/time.c 2004-10-18 23:54:08 +0200
+++ linux-2.6.9-battery-clock/arch/i386/kernel/time.c 2004-10-22
00:33:44 +0200
@@ -319,7 +319,7 @@
return retval;
}
- -static long clock_cmos_diff;
+static long clock_cmos_diff, sleep_start;
static int time_suspend(struct sys_device *dev, u32 state)
{
@@ -328,6 +328,7 @@
*/
clock_cmos_diff = -get_cmos_time();
clock_cmos_diff += get_seconds();
+ sleep_start = get_cmos_time();
return 0;
}
@@ -335,10 +336,13 @@
{
unsigned long flags;
unsigned long sec = get_cmos_time() + clock_cmos_diff;
+ unsigned long sleep_length = get_cmos_time() - sleep_start;
+
write_seqlock_irqsave(&xtime_lock, flags);
xtime.tv_sec = sec;
xtime.tv_nsec = 0;
write_sequnlock_irqrestore(&xtime_lock, flags);
+ jiffies += sleep_length * HZ;
return 0;
}
luca@gismo:/usr/src$
=====
I'm here for other tests :-)
Thx, bye,
Gismo / Luca
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org
iD8DBQFBeMBwVAp7Xm10JmkRAipNAKCCUt5346gWnXg7Y8UDP1BvQ5c2cACaAvMV
ywsbUI6EmXZ9qe0Jz8z9y3M=
=rSh4
-----END PGP SIGNATURE-----
[-- Attachment #2: syslog_20041022.gz --]
[-- Type: application/x-gzip, Size: 10117 bytes --]
next prev parent reply other threads:[~2004-10-22 8:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-21 12:21 2.6.9 S4: clock not updated after resume Luca Capello
[not found] ` <4177A9DC.7060503-wlebWZzHoyE@public.gmane.org>
2004-10-21 20:20 ` Pavel Machek
[not found] ` <20041021202051.GA21624-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2004-10-22 8:10 ` Luca Capello [this message]
2004-10-23 15:03 ` Jon Valvatne
[not found] ` <loom.20041023T170041-953-eS7Uydv5nfjZ+VzJOa5vwg@public.gmane.org>
2004-10-23 17:49 ` Luca Capello
[not found] ` <417A99B4.40707-wlebWZzHoyE@public.gmane.org>
2004-10-26 20:01 ` Luca Capello
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=4178C072.1020905@pca.it \
--to=luca-wlebwzzhoye@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.