public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] VIA timer fix was removed?
@ 2001-11-12 13:14 Jeronimo Pellegrini
  2001-11-12 14:48 ` Andrzej Krzysztofowicz
  0 siblings, 1 reply; 13+ messages in thread
From: Jeronimo Pellegrini @ 2001-11-12 13:14 UTC (permalink / raw)
  To: linux-kernel; +Cc: vojtech

Hello.

The following patch (introduced by Vojtech Pavlik some time ago) was
removed somewhere between 2.4.14 and 2.4.15-pre3.
Without it, the timer counter is reset to a wrong value and
gettimeofday() starts to return strange values.

Nothing aboutit is mentioned in the changelog, so I suppose it wasn't
supposed to be removed?

J.

--- 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 10:45:57 2001
@@ -501,6 +501,14 @@
 
 		count = inb_p(0x40);    /* read the latched count */
 		count |= inb(0x40) << 8;
+
+		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;

^ permalink raw reply	[flat|nested] 13+ messages in thread
[parent not found: <20011119182927.A19179@suse.cz>]

end of thread, other threads:[~2002-04-08  7:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-12 13:14 [PATCH] VIA timer fix was removed? Jeronimo Pellegrini
2001-11-12 14:48 ` Andrzej Krzysztofowicz
2001-11-12 16:05   ` Jeronimo Pellegrini
2001-11-12 18:49     ` Nils Philippsen
2001-11-12 19:00       ` Jeronimo Pellegrini
2001-11-12 19:21         ` Nils Philippsen
2001-11-12 21:27         ` Neale Banks
2001-11-12 21:31           ` Alan Cox
2001-11-12 21:58             ` Vojtech Pavlik
2001-11-12 21:59             ` Neale Banks
2001-11-12 22:43               ` Alan Cox
     [not found] <20011119182927.A19179@suse.cz>
2002-04-08  6:33 ` Neale Banks
2002-04-08  7:24   ` Vojtech Pavlik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox