[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081017020813.GA32468@Krystal>
Date: Thu, 16 Oct 2008 22:08:13 -0400
From: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
To: David Miller <davem@...emloft.net>
Cc: paulus@...ba.org, torvalds@...ux-foundation.org,
akpm@...ux-foundation.org, mingo@...e.hu,
linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
rostedt@...dmis.org, a.p.zijlstra@...llo.nl, tglx@...utronix.de,
benh@...nel.crashing.org, mingo@...hat.com
Subject: Re: [RFC patch 04/15] get_cycles() : powerpc64 HAVE_GET_CYCLES
(update)
* David Miller (davem@...emloft.net) wrote:
> From: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
> Date: Thu, 16 Oct 2008 20:43:28 -0400
>
> > * Paul Mackerras (paulus@...ba.org) wrote:
> > > Mathieu Desnoyers writes:
> > >
> > > > This patch selects HAVE_GET_CYCLES and makes sure get_cycles_barrier() and
> > > > get_cycles_rate() are implemented.
> > >
> > > [snip]
> > >
> > > > +static inline cycles_t get_cycles_rate(void)
> > > > +{
> > > > + return CLOCK_TICK_RATE;
> > > > +}
> > >
> > > CLOCK_TICK_RATE is certainly wrong. You want ppc_tb_freq (declared in
> > > asm/time.h). Or tb_ticks_per_sec, since we seem to have two variables
> > > for exactly the same thing, for some reason. :)
> > >
> > > Paul.
> >
> > Ok, this should work better. Thanks !
> >
> > Do you know if mtfb implies an instruction synchronization (isync) ? I
> > think that if it does not, the new get_cycles_barrier() might have to be
> > used at some locations in the kernel code if more precise timestamp
> > order is required.
>
> You'll need to make a similar fix on sparc64.
I guess you are talking about using sparc64_get_clock_tick rather than
CLOCK_TICK_RATE ? I assume sparc64_get_clock_tick() done on any CPU will
return the same rate ?
Thanks,
Mathieu
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists