[PATCH] Support HWCAPs for MIPS
Joseph S. Myers
joseph@codesourcery.com
Tue Oct 14 23:13:00 GMT 2014
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
More information about the Libc-alpha
mailing list