This is the mail archive of the
libc-alpha@sourceware.org
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, Tom Gall <tom_gall at vnet dot ibm dot com>
- Date: Mon, 14 Nov 2005 15:18:25 -0600
- Subject: Re: [PATCH] hp-timing for ppc32/64
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote on 11/14/2005
02:44:22 PM:
>
> How do they implement hp timing on, let's say, x86 where they have all
> sort of different time sources depending on the processor they are
> running on ? They don't have access to dl_hwcap ?
>
On x86 they only implement hp-timing on i686 and newer based on the "Time
Stamp Counter" and the "read time-stamp counter" instruction. Since they
only have one "kind" of timebase they don't need to access dl_hwcap in
hp-timing. This is also true for alpha, ia64, sparc, X86_64 and powerpc64.
It would be true for ppc32 except for the 601 and 403 chips ...
The whole idea of hp-timing is that is fast, simple, and inline code. It
is not a general purpose clock. It must also work in the restricted
environment of the dynamic loader itself, like before and the durring the
time the loader is relocating its self!
Steven J. Munroe
Linux on Power Toolchain Architect
IBM Corporation, Linux Technology Center