This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Support HWCAPs for MIPS
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, "Moore, Catherine (Catherine_Moore at mentor dot com)" <Catherine_Moore at mentor dot com>, 'Andrew Pinski' <pinskia at gmail dot com>, "Rich Felker (dalias at libc dot org)" <dalias at libc dot org>, Rich Fuhler <Rich dot Fuhler at imgtec dot com>, "'macro at codesourcery dot com'" <macro at codesourcery dot com>
- Date: Tue, 14 Oct 2014 23:13:39 +0000
- Subject: Re: [PATCH] Support HWCAPs for MIPS
- Authentication-results: sourceware.org; auth=none
- References: <6D39441BF12EF246A7ABCE6654B0235320F271C0 at LEMAIL01 dot le dot imgtec dot org>
On Tue, 14 Oct 2014, Matthew Fortune wrote:
> +#define HWCAP_MIPS_R6 0x00000001
> +#define HWCAP_MIPS_MSA 0x00000002
HWCAP values are assigned by the kernel; they are not ELF-level interfaces
but interfaces between the kernel and userspace; we normally add new
values once there's been a kernel.org release with those values in, as
part of the routine review of new kernel releases for any new interfaces
of relevance to glibc. In this case, I don't see these values in
kernel.org git at all, so it seems premature to add them to glibc; please
resubmit this patch once the values have been assigned in the kernel (or
if one value is assigned before the other, it's fine to submit a patch
with just that value as soon as it's been assigned).
If I've missed the definition of these values in the kernel, please give
more details of where they are defined
(git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git rather
than any other, e.g. architecture-specific, git tree).
Being Linux-specific, I think the right location for these files is
sysdeps/unix/sysv/linux/mips/ similar to ARM (although other architectures
putting such OS-specific definitions in OS-independent files doesn't cause
practical problems in the absence of other-OS ports for those
architectures).
If you want to get other patches depending on HWCAP tests in some way into
glibc before the HWCAP values are allocated in the kernel, I advise
setting up the glibc code to hardcode whatever it would do with an old
kernel that never sets a nonzero HWCAP, and then adding support for
handling new kernel features later when the values are allocated.
--
Joseph S. Myers
joseph@codesourcery.com