public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Nigel Cunningham <ncunningham-jjFNsPSvq+iXDw4h08c5KA@public.gmane.org>
To: "Peter Münster" <pmlists-GANU6spQydw@public.gmane.org>
Cc: ACPI List <acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: wrong system time after wakeup
Date: Tue, 11 Jan 2005 07:44:38 +1100	[thread overview]
Message-ID: <1105389878.2941.10.camel@desktop.cunninghams> (raw)
In-Reply-To: <Pine.LNX.4.58.0501102008270.22897-iBKnCo7tEuSksujEA26zIQ@public.gmane.org>

Hi Peter.

That attached little patch will fix your issue.

Regards,

Nigel

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 10:03:24.000000000 +1100
+++ 910-original-time-patch-new/arch/i386/kernel/time.c	2005-01-08 10:23:28.335811408 +1100
@@ -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;
 }
 


On Tue, 2005-01-11 at 06:39, Peter Münster wrote:
> Hello,
> when resuming from S1, the system-time is completely wrong: about 22h
> instead of 11h.
> The system goes to sleep the day before at about 22h30 with the following
> commands:
> modprobe genrtc
> sleep 5
> echo 2005-01-11 11:10:00 >/proc/acpi/alarm
> sleep 5
> echo 1 >/proc/acpi/sleep
> 
> What could be wrong?
> I'm using Linux-2.6.10 and ASUS A7N8X-X ACPI BIOS Rev 1006.
> 
> Thanks in advance for any help! Please tell me, if you need more information.
> Kind regards, Peter
-- 
Nigel Cunningham
Software Engineer, Canberra, Australia
http://www.cyclades.com

Ph: +61 (2) 6292 8028      Mob: +61 (417) 100 574



-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt

      parent reply	other threads:[~2005-01-10 20:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-10 19:39 wrong system time after wakeup Peter Münster
     [not found] ` <Pine.LNX.4.58.0501102008270.22897-iBKnCo7tEuSksujEA26zIQ@public.gmane.org>
2005-01-10 20:44   ` Nigel Cunningham [this message]

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=1105389878.2941.10.camel@desktop.cunninghams \
    --to=ncunningham-jjfnspsvq+ixdw4h08c5ka@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=pmlists-GANU6spQydw@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox