Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: current kernel on amd64 crashes



On Thu, Jan 10, 2008 at 08:41:35PM +0000, David Laight wrote:
> > Could it be this change ?
> > -       low = inb(IO_TIMER1 + TIMER_CNTR0);
> > -       high = inb(IO_TIMER1 + TIMER_CNTR0);
> > -       count = rtclock_tval - ((high << 8) | low);
> > -
> > +       /* insb to make the read atomic */
> > +       insb(IO_TIMER1+TIMER_CNTR0, &rdval, 2);
> > +       count = rtclock_tval - rdval;
> 
> I don't know, but I also have no reason to believe that the comment (and
> hence the modified code) is correct.

The only real diff is that you won't get interrupts processed in the
middle, I think. That doesn't matter much as the code is running on
splhigh anyway.

> In order to get a consistent view of the counter, you have to latch it.

The timer is always latched.

Joerg



Home | Main Index | Thread Index | Old Index