lkml.org 
[lkml]   [2008]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC patch 04/15] get_cycles() : powerpc64 HAVE_GET_CYCLES (update)
From
From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Date: Thu, 16 Oct 2008 20:43:28 -0400

> * Paul Mackerras (paulus@samba.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.


\
 
 \ /
  Last update: 2008-10-17 03:45    [W:0.056 / U:1.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site