Re: [RFC PATCH 17/30 v3] initialize the clock source to jiffies clock.

Steven Rostedt
2008-01-15T21:27:21Z

On Tue, 15 Jan 2008, Mathieu Desnoyers wrote:
> >
> > This patch simply initializes the clock to use clocksource_jiffies, so
> > that any early user of clocksource_read will not crash.
> >
>
> Hrm, is it sane at all to use the jiffies as a clocksource at early
> boot? I thought it was updated by the timer interrupt, which is only
> activated late in the boot process.

It gives us a bogus value, but we know it's always there. This was
discovered in the -rt patch where we had a hard hang at early bootup.
Seems that the tracer was calling for a clock source before it was
initialized, and it called a null pointer.

The original fix was to just make a dummy timer source that returned zero.
But using jiffies seemed a better solution.

-- Steve