Re: [MIPS] Probe for usability of cp0 compare interrupt.

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

 



On Thu, Oct 18, 2007 at 01:10:33AM +0900, Atsushi Nemoto wrote:

> > Some processors offer the option of using the interrupt on which
> > normally the count / compare interrupt would be signaled as a normal
> > interupt pin.  Previously this required some ugly hackery for each
> > system which is much easier done by a quick and simple probe.
> 
> It seems write_c0_compare(0) will not work as expected if c0_count was
> near 0xffffffff.  How about write_c0_compare(read_c0_compare()) (or
> c0_timer_ack()) ?

The two things are a know lose end.  There is a bug in some old MIPS
processors where reading one of the compare or count registers in exactly
the moment when both have identical values in the interrupt getting lost.

Will have to dig up the details on that one again before I can implement
a proper workaround ...

> Also something calculated from mips_hpt_frequency would be better than
> the magic number 0x300000.

Well, we just don't care how long it really takes - but it has to be
slow enough to work even for stuff like qemu.  Then busy wait for a
number of cycles long enough to ensure the timer will have expired to
avoid the interrupt bug.

  Ralf


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux