public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* VIA 686 timer bugfix incomplete
@ 2001-11-07 11:50 Jonas Diemer
  2001-11-07 12:15 ` Alan Cox
  0 siblings, 1 reply; 18+ messages in thread
From: Jonas Diemer @ 2001-11-07 11:50 UTC (permalink / raw)
  To: Linux Kermel ML

HI!

I noticed with great happiness that the via timer bugfix had made it into linus'
version of the kernel as of 2.4.10.

but it seems that the patch was incomplete: The bug is still triggered on my
computer using 2.4.14, but the bugfix seems to work whith -ac kernels.
 

now I diffed the ac-version of that file whith the current version of linus'
kernel:

# diff -u arch/i386/kernel/time.c ../linux-2.4.10-ac12/arch/i386/kernel/time.c 


--- arch/i386/kernel/time.c     Wed Oct 24 17:16:13 2001
+++ ../linux-2.4.10-ac12/arch/i386/kernel/time.c        Sun Oct 14 16:23:52 2001
@@ -501,6 +501,24 @@
 
                count = inb_p(0x40);    /* read the latched count */
                count |= inb(0x40) << 8;
+
+
+                /* VIA686a test code... reset the latch if count > max */
+                if (count > LATCH) {
+                        static int last_whine;
+                        outb_p(0x34, 0x43);   
+                        outb_p(LATCH & 0xff, 0x40);
+                        outb(LATCH >> 8, 0x40);
+                        count = LATCH - 1;
+                        if(time_after(jiffies, last_whine))
+                        {
+                                printk(KERN_WARNING "probable hardware bug:
clock timer configuration lost - probably a VIA686a motherboard.\n");
+                                printk(KERN_WARNING "probable hardware bug:
restoring chip configuration.\n");
+                                last_whine = jiffies + HZ;
+                        }                       
+                }                               
+
+
                spin_unlock(&i8253_lock);
 
                count = ((LATCH-1) - count) * TICK_SIZE;


you can see what's missing to actually work around the via timer bug. I hope
this will go into 2.4.15.

regards

PS: CC me in your answers, I am not subscribed to the list

^ permalink raw reply	[flat|nested] 18+ messages in thread
* RE: VIA 686 timer bugfix incomplete
@ 2001-11-09 19:19 Grover, Andrew
  0 siblings, 0 replies; 18+ messages in thread
From: Grover, Andrew @ 2001-11-09 19:19 UTC (permalink / raw)
  To: 'george anzinger', Alan Cox
  Cc: Vojtech Pavlik, Jonas Diemer, linux-kernel

George, I was mistaken before, sorry.

The address of the PM timer is in a table, not in the ACPI namespace. It is
in the FADT. Therefore you should be able to use it iff acpi tables are
present, but it should not strictly require the interpreter.

Regards -- Andy

> -----Original Message-----
> From: george anzinger [mailto:george@mvista.com]
> Sent: Friday, November 09, 2001 9:22 AM
> To: Alan Cox
> Cc: Vojtech Pavlik; Jonas Diemer; linux-kernel@vger.kernel.org
> Subject: Re: VIA 686 timer bugfix incomplete
> Importance: High
> 
> 
> Alan Cox wrote:
> > 
> > > Me thinks the real solution is the ACPI pm timer.  3 times the
> > > resolution of the PIT and you can not stop it.  The 
> high-res-timers
> > > patch will allow you to use this as the time keeper and 
> just use the PIT
> > > to generate interrupts.
> > 
> > For awkward boxes you can use the PIT, for good boxes we 
> can use rdtsc or
> > eventually the ACPI timers when running with ACPI
> 
> I am attempting to use the ACPI timer without waiting for or running
> ACPI.  After all it is there if you can find it.
> 
> George
> 

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2001-11-09 19:21 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-07 11:50 VIA 686 timer bugfix incomplete Jonas Diemer
2001-11-07 12:15 ` Alan Cox
2001-11-07 19:25   ` Vojtech Pavlik
2001-11-07 19:48     ` Jonas Diemer
2001-11-07 20:14       ` Vojtech Pavlik
2001-11-07 22:32         ` Neale Banks
2001-11-08  8:02           ` Vojtech Pavlik
2001-11-08  9:21             ` Jonas Diemer
2001-11-08 20:08               ` Vojtech Pavlik
     [not found]                 ` <20011108221751.5273484e.diemer@gmx.de>
2001-11-08 21:22                   ` Vojtech Pavlik
2001-11-08 21:30                 ` george anzinger
2001-11-08 23:30                   ` Alan Cox
2001-11-09  8:34                     ` Vojtech Pavlik
2001-11-09 17:21                     ` george anzinger
2001-11-07 19:29   ` Steve Underwood
2001-11-08 20:11     ` Vojtech Pavlik
2001-11-09  2:57       ` Steve Underwood
  -- strict thread matches above, loose matches on Subject: below --
2001-11-09 19:19 Grover, Andrew

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