From: Andreas Hartmann <andihartmann@freenet.de>
To: Jeronimo Pellegrini <pellegrini@mpcnet.com.br>
Cc: Kernel-Mailingliste <linux-kernel@vger.kernel.org>,
Marcelo Tosatti <marcelo@conectiva.com.br>
Subject: Re: [2.4.17rc1] fatal problem: system time suddenly changes
Date: Fri, 21 Dec 2001 15:51:48 +0100 [thread overview]
Message-ID: <3C234C84.6050802@athlon.maya.org> (raw)
In-Reply-To: <Pine.LNX.4.21.0112181509150.4456-100000@freak.distro.conectiva> <3C1F901E.6050800@athlon.maya.org> <20011218195245.GA28160@socrates>
Hello all,
Jeronimo Pellegrini wrote:
> Hi.
>
> That's a VIA timer bug. The patch that fixes it was inthe kernel some
> time ago, but was removed because the workaround was being triggered
> when it shouldn't, if I remember correctly.
>
> Here:
>
>
> --- linux-2.4.15-pre3/arch/i386/kernel/time.c Sun Nov 11 21:33:31 2001
> +++ linux-2.4.15-pre3-new/arch/i386/kernel/time.c Mon Nov 12 14:04:20 2001
> @@ -501,6 +501,19 @@
>
> count = inb_p(0x40); /* read the latched count */
> count |= inb(0x40) << 8;
> +
> + /*
> + * When using some via chipsets (as the vt82c686a, for example)
> + * the system timer counter (i8253) should be reprogrammed in
> + * this case, otherwise it may be reset to a wrong value.
> + */
> + if (count > LATCH-1) {
> + outb_p(0x34, 0x43);
> + outb_p(LATCH & 0xff, 0x40);
> + outb(LATCH >> 8, 0x40);
> + count = LATCH - 1;
> + }
> +
> spin_unlock(&i8253_lock);
>
> count = ((LATCH-1) - count) * TICK_SIZE;
>
I tested this patch with 2.4.17rc[1|2] - and I couldn't find any
problem. The systemtime has always been correct.
Could you please apply this patch to the next kernelversion, maybe
spezifically for the VIA - chipset or with some other needed changes as
Jeronimo wrote?
Thanks,
Andreas Hartmann
next prev parent reply other threads:[~2001-12-21 14:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-18 18:17 [2.4.17rc1] fatal problem: system time suddenly changes Andreas Hartmann
2001-12-18 17:09 ` Marcelo Tosatti
2001-12-18 18:51 ` Andreas Hartmann
[not found] ` <20011218195245.GA28160@socrates>
2001-12-18 21:35 ` Andreas Hartmann
2001-12-21 14:51 ` Andreas Hartmann [this message]
2001-12-21 16:26 ` Alan Cox
[not found] ` <20011218104500.F22677@nic1-pc.us.oracle.com>
2001-12-18 19:20 ` Andreas Hartmann
[not found] ` <20011218124132.B32316@asooo.flowerfire.com>
2001-12-18 20:15 ` Andreas Hartmann
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=3C234C84.6050802@athlon.maya.org \
--to=andihartmann@freenet.de \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=pellegrini@mpcnet.com.br \
/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