[PATCH 1/2] nptl: sysdep headers re-factoring

Khem Raj raj.khem at gmail.com
Thu Jan 7 17:59:52 UTC 2010


On (07/01/10 15:27), Carmelo AMOROSO wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Carmelo AMOROSO wrote:
> > This patch will re-factor and simplify sysdep headers
> > handling for nptl branch.
> > The reason is to use some useful macros in asm code (i.e. ENTRY()) that are available
> > only into nptl branch because are defined in sysdep.h header under the nptl folder
> > even if they are not related to NPTL at all (this was likely due to a bad choice done
> > at the early stage of NPTL porting).
> > This is a required steps for integrating into master branch some asm code available in
> > nptl branch for sh4.
> > 
> > The main changes are described below:
> > 
> > nptl/sysdeps/generic/sysdep.h (moved) ---> libc/sysdeps/linux/common/sysdep.h
> > nptl/sysdeps/arm/sysdep.h     (moved) ---> libc/sysdeps/linux/arm/sysdep.h
> > 
> > nptl/sysdeps/sh/sysdep.h ---------------------|
> > nptl/sysdeps/unix/sh/sysdep.h ----------------|
> > nptl/sysdeps/unix/sysv/linux/sh/sysdep.h -----|
> > nptl/sysdeps/unix/sysv/linux/sh/sh4/sysdep.h -|
> >                                               |(merged) ---> libc/sysdeps/linux/sh
> > 
> > nptl/sysdeps/unix/sysdep.h (deleted)
> > 
> > Similarly the mips and arm sysdep.h should be merged and updated as for sh arch.
> > 
> > Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>
> > ---
> >  Rules.mak                                          |    2 +-
> >  libc/sysdeps/linux/arm/sysdep.h                    |   91 +++++++
> >  libc/sysdeps/linux/common/sysdep.h                 |  139 ++++++++++
> >  libc/sysdeps/linux/sh/sysdep.h                     |  277 ++++++++++++++++++++
> >  libpthread/nptl/sysdeps/arm/sysdep.h               |   91 -------
> >  libpthread/nptl/sysdeps/generic/sysdep.h           |  137 ----------
> >  libpthread/nptl/sysdeps/sh/sysdep.h                |   82 ------
> >  libpthread/nptl/sysdeps/unix/sh/sysdep.h           |   29 --
> >  libpthread/nptl/sysdeps/unix/sysdep.h              |   63 -----
> >  .../nptl/sysdeps/unix/sysv/linux/sh/sh4/sysdep.h   |    4 -
> >  .../nptl/sysdeps/unix/sysv/linux/sh/sysdep.h       |  224 ----------------
> >  11 files changed, 508 insertions(+), 631 deletions(-)
> >  create mode 100644 libc/sysdeps/linux/arm/sysdep.h
> >  create mode 100644 libc/sysdeps/linux/common/sysdep.h
> >  create mode 100644 libc/sysdeps/linux/sh/sysdep.h
> >  delete mode 100644 libpthread/nptl/sysdeps/arm/sysdep.h
> >  delete mode 100644 libpthread/nptl/sysdeps/generic/sysdep.h
> >  delete mode 100644 libpthread/nptl/sysdeps/sh/sysdep.h
> >  delete mode 100644 libpthread/nptl/sysdeps/unix/sh/sysdep.h
> >  delete mode 100644 libpthread/nptl/sysdeps/unix/sysdep.h
> >  delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sh/sh4/sysdep.h
> >  delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sh/sysdep.h
> > 
> 
> Both patches are meant for NPTL branch (forgot to specify the branch in the subject).
> This work is completed for SH (the only I can test build/run).
> I'd like some ARM NPTL user (Khem ?) would complete this stuff by merging
> the nptl/arm sysdep into libc/arm one.

OK I will have a go at it.
> 
> With this patch in place the current situation is as below:
> 
> ./libc/string/mips/sysdep.h
> ./libc/string/ia64/sysdep.h
> 
> ./libc/sysdeps/linux/powerpc/bits/sysdep.h
> ./libc/sysdeps/linux/mips/sysdep.h
> ./libc/sysdeps/linux/ia64/sysdep.h
> ./libc/sysdeps/linux/xtensa/sysdep.h
> ./libc/sysdeps/linux/arm/sysdep.h
> ./libc/sysdeps/linux/cris/sysdep.h
> ./libc/sysdeps/linux/bfin/sysdep.h
> 
> ./libc/sysdeps/linux/sh/sysdep.h
> ./libc/sysdeps/linux/common/sysdep.h
> 
> ./libpthread/linuxthreads/sysdeps/arm/sysdep.h
> 
> ./libpthread/nptl/sysdeps/mips/sysdep.h
> ./libpthread/nptl/sysdeps/i386/sysdep.h
> ./libpthread/nptl/sysdeps/x86_64/sysdep.h
> 
> ./libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sysdep.h
> ./libpthread/nptl/sysdeps/unix/sysv/linux/mips/sysdep.h
> ./libpthread/nptl/sysdeps/unix/sysv/linux/i386/sysdep.h
> ./libpthread/nptl/sysdeps/unix/sysv/linux/arm/sysdep.h
> ./libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/sysdep.h
> 
> My idea (as I've done for sh) is to move all ARCH sysdep from nptl
> to libc/sysdeps/linux/ARCH, merging the several occurences into just
> one header.
> 
> Indeed the sysdep.h from nptl are not nptl related and glibc keeps them
> in <root>/sysdpes/ and not in <root>/nptl/sysdeps
> 
> Further we can get rid of the multiple subdirs under sysdeps/unix because
> we don't support other Unix variants than Linux
> 
> I think that i386 sysdeps can be easily merged into a libc/sysdeps/linux/i386.
> The same applies to x86_64 and sparc because there is not a counterpart
> already present under libc/sysdeps/linux/ARCH.
> 
> ARM needs to be manually merged (Khem ?)
> MIPS needs much more attention because there are multiple instances of
> a MIPS sysdep in several places.


> 
> If this idea is fine, I'd go ahead committing my patch,

idea sounds fine to me. However I think we also need to test LT.old
atleast with the merged sysdeps.

> asking the NPTL/ARCH maintainer (Austin ?) to do the same on their arch...
> I don't know who could at least test/build MIPS.

I would try it out on mips. 
> 
> After that we can work to integrate this change on master where required.
> 
> Cheers,
> Carmelo
> 
> 
> 
> 
> 
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
> 
> iEYEARECAAYFAktF72cACgkQoRq/3BrK1s/MjACgu0A3Vkja+YolzZKEYvTyd4KC
> 974Anjv0KljSYtzN8E/aGvfqapjksOdH
> =V8lz
> -----END PGP SIGNATURE-----
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://lists.busybox.net/mailman/listinfo/uclibc


More information about the uClibc mailing list