Re: [PATCH] x86: printk_time to use tsc before cpu_clock is ready

Ingo Molnar
2008-08-27T08:03:22Z

* Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:

> On Wed, 2008-08-27 at 09:42 +0200, Ingo Molnar wrote:
> > * Yinghai Lu <yhlu.kernel@gmail.com> wrote:
> >
> > > +static unsigned long long tsc_clock(int cpu)
> > > +{
> > > + unsigned long long t;
> > > +
> > > + rdtscll(t);
> > > +
> > > + return t;
> > > +}
> >
> > hm, i'm not sure i like the whole direction - this reintroduces
> > printk_clock in essence.
> >
> > how about initializing cpu_clock() sooner, so that printk timestamps
> > start ticking as soon as possible?
>
> which will make some archs quite unhappy iirc, see those arm and ia64
> bugs I caused the other day.

that's OK - that still allows arches to start their clocks whenever they
want to. But also add the possibility for architectures to initialize
things even sooner.

Ingo