On Wed, Aug 28, 2002 at 06:32:06PM -0700, Matthew Dharm wrote: > Reading the information on the new time.c system, I'm wondering who > sets CP0_COMPARE the first time. > > The timer_interrupt() function will re-set the CP0_COMPARE to a new > value when processing an interrupt. But what sets the CP0_COMPARE > initially? Is that the responsiblity of the board_timer_setup() > function? That's what it looks like, but... If so, what's the proper > value? CP0_COUNT + cycle_per_jiffy? But cycles_per_jiffy is static > to time.c... c0_compare = c0_count + mips_counter_frequency / HZ. That's what the individual boards are currently doing themselves though that should be done in generic code. > Oh, and the Documentation/mips/time.README needs to be updated -- the > CPU counter does not necessarily run at the CPU frequency, tho it > often does. I've seen c0_compare running at CPU clock /1, /2 and even /8. For most CPUs that rate is hardwired but on a few like the Nevada it's programmable. Another assumption that not generally is true is that all cycle counters in multiprocessor systems are running at the same speed or are synchronized in any way. Origins are one of the counter examples. Ralf