mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC] Expand available hwcap bits with AT_HWCAP2 in auxv
@ 2012-11-16 22:53 Ryan Arnold
  0 siblings, 0 replies; only message in thread
From: Ryan Arnold @ 2012-11-16 22:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: libc-alpha, Benjamin Herrenschmidt

Hi,

We're out of bits in the AT_HWCAP entry for PowerPC. Per the following
discussion on libc-alpha, I'd like to propose the expansion of the auxv
to make additional space available for further system feature flags.  

http://www.sourceware.org/ml/libc-alpha/2012-10/msg00438.html

There are a few ways to do this (as pointed out by Ben Herrenschmidt).
glibc would prefer to parse an AT_HWCAP2 entry from the auxv and compose
those bits into the high 32-bits of the existing glibc uint64_t hwcap
field.

Currently, the high 32-bits of this field are only available in 64-bit
userspace, and only for platforms where the kernel designates the auxv
hwcap as unsigned long int (example: s390). Platforms like PowerPC, arm,
and x86 maintain parity between 64-bit and 32-bit userspace and thus
only allow 32-bits for capabilities.

I propose that the kernel shift capabilities designated in the high
32-bits into an AT_HWCAP2 auxv entry. In userspace, glibc will compose
that into the available high 32-bits of glibc's hwcap field making the
rest of it available to all platforms.

The beauty of this approach is that if either the Kernel or glibc lack
the AT_HWCAP2 improvement the high 32-bits of glibc's hwcap field will
remain empty, i.e., feature not available.

With this in mind, I need to reserve an identifier in
include/linux/auxvec.h for AT_HWCAP2.  I was thinking:

#define AT_HWCAP  26

GLIBC will have parity with this identifier in elf/elf.h.

I think Ben H. had planned to work on the kernel side of this and I have
a GLIBC patch in process.

Comments?

Ryan S. Arnold
IBM Linux Technology Center
glibc PowerPC maintainer


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-11-16 22:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-16 22:53 [RFC] Expand available hwcap bits with AT_HWCAP2 in auxv Ryan Arnold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®