This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] hp-timing for ppc32/64



Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote on 10/12/2005
05:20:51 PM:

> On Wed, 2005-10-12 at 09:36 -0500, Steve Munroe wrote:
> > libc-alpha-owner@sources.redhat.com 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
provide
> > > the TB but different timing mecanisms ? Should we add a CPU feature
bit
> > > exposed by the kernel to userland ?
> > >
> > Which CPUs don't implement the timebase. It is a required element of
the
> > 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
> gracefully.
>

I am at impasse adding the 601/403gx backward compatibility based on
PPC_FEATURE_NO_TB and PPC_FEATURE_601_INSTR. The problem is a circular
dependency between hp-timing.h and ldsodefs.h. The hp-timing requires
ldsodefs for access to dl_hwcap to test for PPC_FEATURE_NO_TB. But ldsodefs
(plus several down stream includes) requires hp-timing for type hp-timing_t
as a field within several loader structs.

The restructuring required to resolve this is hard to justify to support
outdated hardware. The vast majority of the PowerPC hardware supports the
timebase compatible with the original patch.

I believe that it is better to support the majority in the libc trunk based
on the PowerPC arch timebase. We would deprecate support for 601 and 403gx
and move any support to ports. We can now use -with-cpu=[601,403] to
override hp-timing.h (either simply disables hp-timing or add chip specific
implementation). This compromise allows the powerp32 majority to use
hp-timing and allows anyone who wants to build libc for 601 or 403 to do
so.

Steven J. Munroe
Linux on Power Toolchain Architect
IBM Corporation, Linux Technology Center


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]