On 2/23/07, David Miller <davem@xxxxxxxxxxxxx> wrote:-
> While probeing PLL information via radeon_get_pllinfo(), it does a
> "gettimeofday(); do_something(); gettimeofday();" type sequence
> explicitly with interrupts disabled, so ends up with a zero
> measurement which then results in a bunch of divisions by zero.
This is at module init time? If so I just sent out a patch yesterday
to akpm that might help this issue (assuming other clocksources are
available on the hardware).
> We should decide whether gettimeofday() can be expected to advance with
> interrupts disabled, or that clocksource_jiffies is simply invalid because
> of this behavior.
Some arches have no fine-grained timekeeping, so I don't think it can
always be assumed, but where hardware is available it should function.
It should be noted that with older kernels, if interrupts were
disabled right before a tick, it would be possible that
gettimeofday()'s limiting code would cause time to stop advancing
until interrupts were re-enabled. So theoretically its not really a
The timekeeping_is_continuous() function could be used to flag this
sort of "software driven vs continuous" clocksource cases.