sh: SHMLBA & cache shape info from auxvt
Carmelo AMOROSO
carmelo.amoroso at st.com
Tue Dec 1 10:17:48 UTC 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi All, Paul
we are adding the code in uClibc ld.so to retrieve the value
of shm_alignment from the cache shape info passed to the user space
through the AUXVT for sh arch.
Currently in bits/shm.h we have
/* Segment low boundary address multiple. */
/*
* XXX: This is misleading, SH-4 and SH-3 7705 in 32kb mode have dcache
* aliases to contend with in the 4k page case. This is not an issue for
* the other parts. Leave this bumped up for sanity until this can be
* accurately defined by the L1D shape through the auxiliary vector.
*/
#define SHMLBA (__getpagesize() << 2)
The comment (I guess Paul added) is definitely clear.
We would like to have something like that
#define SHMLBA __get_shm_alignment()
but this will add a reference to a new function into any binaries
compiled using the new header that will not work with older runtime libraries
(not a major problem because header and libraries should be always aligned).
My doubt is it is allowed to add/export a new function in lib C that is not
part of the POSIX API.
Another option could be to remap the macro with sysconf, so
#define SHMLBA sysconf(_SC_SHM_ALIGNMENT)
or something like that, but also in this case we need to export a new
sysconf name in bits/confname.h; is this allowed ?
Cheers,
Carmelo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iEYEARECAAYFAksU7UwACgkQoRq/3BrK1s/cZQCeME4hljRMipGGlN8Gpi1hdZd5
IXAAnA1U9XGq6Q9R3nMLk06pRe7Ca3gS
=dwqq
-----END PGP SIGNATURE-----
More information about the uClibc
mailing list