This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] PowerPC - Add a function to read the Time Basefrequency
- From: Ryan Arnold <rsa at us dot ibm dot com>
- To: "Carlos O'Donell" <carlos at systemhalted dot org>
- Cc: Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>, libc-alpha at sourceware dot org
- Date: Tue, 25 Sep 2012 12:03:27 -0500
- Subject: Re: [PATCH] PowerPC - Add a function to read the Time Basefrequency
- References: <1345833351-10398-1-git-send-email-tuliom@linux.vnet.ibm.com> <5038D642.9070500@systemhalted.org>
- Reply-to: rsa at us dot ibm dot com
On Sat, 2012-08-25 at 09:42 -0400, Carlos O'Donell wrote:
> On 8/24/2012 2:35 PM, Tulio Magno Quites Machado Filho wrote:
> > Programs that directly read the Time Base register need to get
> > access to the frequency at which it is updated to properly calculate the
> > time passed between 2 reads.
> > librt already has __get_clockfreq that reads this value from the vdso or
> > from /proc/cpuinfo. The new function reuses the available one without
> > exposing it.
> > Notice that this patch does include __get_clockfreq implementation into
> > the PowerPC build of libc. However, it will remain out of libc for other
> > architectures.
> >
> > 2012-08-22 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
> >
> > * manual/platform.texi (PowerPC): Documents __ppc_get_timebase_freq.
> > * sysdeps/powerpc/sys/platform/ppc.h: Include the operating
> > system header.
> > * sysdeps/unix/sysv/linux/powerpc/Makefile (sysdep_headers):
> > Likewise.
> > (sydep_routines): Add the new and the internal functions.
> > * sysdeps/unix/sysv/linux/powerpc/bits/ppc.h: New file.
> > * sysdeps/unix/sysv/linux/powerpc/get_timebase_freq.c: Likewise.
> > * sysdeps/unix/sysv/linux/powerpc/powerpc32/Versions
> > (GLIBC_2.17): Add the new function.
> > * sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/libc.abilist
> > (GLIBC_2.17): Likewise.
> > * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions
> > (GLIBC_2.17): Likewise.
> > * sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/libc.abilist
> > (GLIBC_2.17): Likewise.
> > * sysdeps/unix/sysv/linux/powerpc/test-gettimebasefreq.c: New file.
>
> This looks good to me, I don't see anything wrong.
>
> Thanks for adding a testcase *and* documentation!
>
> Ryan should review this as power maintainer.
I'm going to commit this since there were no objections. I do remain
concerned about including the __get_clockfreq object code in libc only
for PowerPC, but I'm fine with it if others are not concerned.
Ryan S. Arnold
IBM Linux Technology Center