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

From: Steven Rostedt
Date: Tue Jan 15 2008 - 16:27:23 EST



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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/