lkml.org 
[lkml]   [1998]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: clock too slow (6 times !) in kernel 2.0.36+ (Xeon450/permedia2)

as a quick workaround, it's more or less safe to fix this up in
user-space, just do this in a root process:

#include <asm/io.h>
#include <unistd.h>

#define HZ 100
#define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ)
#define CLOCK_TICK_RATE 1193180

main()
{
iopl(3);

/* set the clock to 100 Hz */
outb(0x34,0x43);
outb(LATCH & 0xff , 0x40); /* LSB */
outb(LATCH >> 8 , 0x40); /* MSB */
}

(compile it with -O2. i have not actually tested or compiled this)

-- mingo


On 15 Dec 1998 storner@image.dk wrote:

> In <Pine.LNX.4.05.9812150814410.29586-100000@ace.ulyssis.student.kuleuven.ac.be> Bert de Bruijn <bob@ace.ulyssis.student.kuleuven.ac.be> writes:
>
> >A strange problem occurs on a Xeon-450 we have here (running RedHat 5.2) :
> >the machine has a Permedia 2 AGP video card, that gets set to IRQ10 by
> >the BIOS.
> >The kernel clock runs fine, until I start X (XFree86-3DLabs-3.3.3). After
> >that, the clock runs about six times too slow.
> >So it takes about 6 seconds before there have been 100 timer interrupts.
>
> I've seen this reported on a local (danish) LUG list. It appears to be
> a problem with the X server mistakenly reprogramming the timer chip
> to interrupt at a different rate. In other words, it is an X server
> bug, not a kernel bug.
>
> --
> Henrik Storner
> Praetra censeo, Microsoftem esse delendam!
> (Thanks to Erik Corry).
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/
>


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.070 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site