On Fri, Jun 08, 2007 at 10:29:42AM +0200, Franck Bui-Huu wrote: > Well it increments every other clock. So it's not impossible to have a > an other higher rated counter. In practice that's very rare. Otoh there are reasons why the cp0 counter might be unusable - clockscaling, no interrupt, CPU powered off. > >But even if so, the basic solution is the same - just ignore the interrupt > >whenever it happens to be triggered. Or if it isn't shared with an > >active performance counter interrupt, you could even disable_irq() it. > > OK, but the current code doesn't seem to support very well multiple > clock event devices. For example the global_cd array is not updated if > a new clock event device is registered. Even ll_timer_interrupt() > handler should be renamed something like ll_hpt_interrupt() for > example. global_cd is meant to only hold the pointers to all processors' count/compare clockevent devices, nothing else. So if another clockevent device should have a higher rating on a particular CPU the content of global_cd[] just doesn't matter. Ralf