This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] hp-timing for ppc32/64
- From: Steve Munroe <sjmunroe at us dot ibm dot com>
- To: Benjamin Herrenschmidt <benh at kernel dot crashing dot org>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Thu, 20 Oct 2005 13:16:44 -0500
- Subject: Re: [PATCH] hp-timing for ppc32/64
Benjamin Herrenschmidt <email@example.com> wrote on 10/12/2005
> On Wed, 2005-10-12 at 09:36 -0500, Steve Munroe wrote:
> > firstname.lastname@example.org wrote on 10/11/2005 07:11:30 PM:
> > > On Mon, 2005-10-10 at 17:18 -0500, Steve Munroe wrote:
> > >
> > > > This patch adds hp-timing for powerpc32 and powerpc64.
> > >
> > > A couple of questions here:
> > >
> > > - Do you have any provision to deal with ppc32 CPUs that do not
> > > the TB but different timing mecanisms ? Should we add a CPU feature
> > > exposed by the kernel to userland ?
> > >
> > Which CPUs don't implement the timebase. It is a required element of
> > PowerPC architecture (not optional).
> At least 601 and 403GX. I've just submitted a kernel patch that adds a
> feature bit "NO_TB" that indicates that there is no standard timebase on
> the CPU. The idea here is that older kernels don't have it, so you just
> proceed with your code and too bad if you have the wrong CPU, but on
> newer kernels, you'll be able to detect that bit and bail out
What is the expected behavior with NO_TB?
Silently fail. getimeofday syscall, use instruction that only work on the
601 or 403GX? Is this instruction the same for 601 vs 403GX?
Also to implement clock_gettime(CLOCK_THREAD_CPUTIME_ID, ) I need the
timebase freq. Today I can get it from /proc/cpuinfo tomorrow I may get
from VDSO. But what about these 601/403GX things? Will the frequency of
the timebase be published and where.
Finally 601 and 403GX are old. Does any one really care about 60MHz 601
Steven J. Munroe
Linux on Power Toolchain Architect
IBM Corporation, Linux Technology Center