linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ian Maclaine-cross <iml@ilm.mech.unsw.edu.au>
To: Pavel Machek <pavel@suse.cz>
Cc: linux-kernel@vger.kernel.org, Ian Maclaine-cross <iml@debian.org>
Subject: Re: PROBLEM: Linux updates RTC secretly when clock synchronizes
Date: Thu, 8 Nov 2001 16:09:38 +1100	[thread overview]
Message-ID: <20011108160938.A8855@ilm.mech.unsw.edu.au> (raw)
In-Reply-To: <20011031113312.A8738@ilm.mech.unsw.edu.au> <20011102121602.A45@toy.ucw.cz> <20011106112052.A10721@ilm.mech.unsw.edu.au> <20011106111846.D26034@atrey.karlin.mff.cuni.cz>
In-Reply-To: <20011106111846.D26034@atrey.karlin.mff.cuni.cz>

Hi!
On Tue, Nov 06, 2001 at 11:18:46AM +0100, Pavel Machek wrote:
[snip] 
> > I agree with you, Pavel. Commenting out the 11 minute update
> > code is a better solution. :)
> 
> Are you going to try to push patch trhough linus?

Yes, I will prepare a patch for the 2.5 series. Thanks to all for
their contributions.

Please find following a short, crude and preliminary, 2.4.12 i386
patch which I am now testing on my AMD K6-III machine.  Reasons for
commenting out the 11 minute update code are in my previous
linux-kernel email. My patched compressed kernel is 156 bytes smaller.
It has been running normally with clock synchronized to NTP for two
days and has left the RTC to drift freely.

diff -u --recursive linux.old/arch/i386/kernel/time.c linux/arch/i386/kernel/time.c
--- linux.old/arch/i386/kernel/time.c	Tue Sep 18 16:03:09 2001
+++ linux/arch/i386/kernel/time.c	Tue Nov  6 21:03:46 2001
@@ -313,6 +313,8 @@
 	write_unlock_irq(&xtime_lock);
 }
 
+#ifdef UPDATE_RTC
+
 /*
  * In order to set the CMOS clock precisely, set_rtc_mmss has to be
  * called 500 ms after the second nowtime has started, because when
@@ -384,6 +386,8 @@
 /* last time the cmos clock got updated */
 static long last_rtc_update;
 
+#endif
+
 int timer_ack;
 
 /*
@@ -426,6 +430,8 @@
 		smp_local_timer_interrupt(regs);
 #endif
 
+#ifdef UPDATE_RTC
+
 	/*
 	 * If we have an externally synchronized Linux clock, then update
 	 * CMOS clock accordingly every ~11 minutes. Set_rtc_mmss() has to be
@@ -440,6 +446,7 @@
 		else
 			last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */
 	}
+#endif
 	    
 #ifdef CONFIG_MCA
 	if( MCA_bus ) {





-- 
Regards,
Ian Maclaine-cross (iml@debian.org)

      reply	other threads:[~2001-11-08  5:10 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-31  0:33 PROBLEM: Linux updates RTC secretly when clock synchronizes Ian Maclaine-cross
2001-10-31  1:05 ` Kurt Roeckx
2001-10-31  2:55   ` Ian Maclaine-cross
2001-10-31 11:52     ` Kurt Roeckx
2001-11-01  0:52       ` Riley Williams
2001-11-01  1:26         ` Kurt Roeckx
2001-11-01 13:57         ` Alex Bligh - linux-kernel
2001-11-02  9:50           ` Riley Williams
2001-11-03 11:41             ` Alex Bligh - linux-kernel
2001-11-03 18:35               ` Riley Williams
2001-11-03 19:19                 ` Alex Bligh - linux-kernel
2001-11-03 21:04                 ` Kurt Roeckx
2001-11-06 10:01                 ` Pavel Machek
2001-11-06  9:57             ` Pavel Machek
2001-11-02 12:16 ` Pavel Machek
2001-11-05 23:08   ` Riley Williams
2001-11-06 10:17     ` Pavel Machek
2001-11-07  0:00       ` Riley Williams
2001-11-07  0:44         ` Alex Bligh - linux-kernel
2001-11-07  1:01           ` Kurt Roeckx
2001-11-07  1:15             ` Alex Bligh - linux-kernel
2001-11-07  9:24             ` Russell King
2001-11-08 12:26         ` Pavel Machek
2001-11-08 23:00           ` Riley Williams
2001-11-09  9:32             ` Pavel Machek
2001-11-09 21:11               ` Riley Williams
2001-11-09 21:30                 ` Pavel Machek
2001-11-09 22:54                   ` Riley Williams
2001-11-09 23:10                     ` Mark Zealey
2001-11-10 20:04                     ` Pavel Machek
2001-11-10 20:35                       ` Riley Williams
2001-11-10 20:43                         ` Pavel Machek
2001-11-10 20:49                         ` Doug McNaught
2001-11-06  0:20   ` Ian Maclaine-cross
2001-11-06 10:18     ` Pavel Machek
2001-11-08  5:09       ` Ian Maclaine-cross [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=20011108160938.A8855@ilm.mech.unsw.edu.au \
    --to=iml@ilm.mech.unsw.edu.au \
    --cc=iml@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    /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;
as well as URLs for NNTP newsgroup(s).