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

Carmelo AMOROSO carmelo.amoroso at st.com
Fri Jan 8 10:58:59 UTC 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Khem Raj wrote:
> On (07/01/10 15:27), Carmelo AMOROSO wrote:
> 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.
> 

Hi Khem,

>> OK I will have a go at it.

good, thanks.

> 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.
> 

They are not used in LT.old for sh4 currently.

Indeed I've already tested it on master by integrating the optimised asm string/mem
function already available in NPTL branch that use the ENTRY macro defined in the merged sysdep.h
and they are building fine.
But I would like to add the sh sysdep only after we have committed all the stuff
on the NPTL branch otherwise we will diverge again, and we must avoid it.

> 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. 

thanks again.

> After that we can work to integrate this change on master where required.
> 
> Cheers,
> Carmelo
> 

Let me know how it will go, so we can go ahead.

Carmelo
> 
> 
_______________________________________________
uClibc mailing list
uClibc at uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAktHD/IACgkQoRq/3BrK1s9iaQCgt9MqvFX6Xy2C1QrfkDil/KsK
LywAoI67lrF30E5qzr2f+QljDmrZSECZ
=iIiy
-----END PGP SIGNATURE-----


More information about the uClibc mailing list