Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

uapi/auxvec: Define AT_HWCAP3 and AT_HWCAP4 aux vector, entries

The powerpc toolchain keeps a copy of the HWCAP bit masks in the TCB
for fast access by the __builtin_cpu_supports() built-in function. The
TCB space for the HWCAP entries - which are created in pairs - is an ABI
extension, so waiting to create the space for HWCAP3 and HWCAP4 until
they are needed is problematic. Define AT_HWCAP3 and AT_HWCAP4 in the
generic uapi header so they can be used in glibc to reserve space in the
powerpc TCB for their future use.

I scanned through the Linux and GLIBC source codes looking for unused
AT_* values and 29 and 30 did not seem to be used, so they are what I
went with.

Signed-off-by: Peter Bergner <bergner@linux.ibm.com>
Acked-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Acked-by: Nicholas Piggin <npiggin@gmail.com>
Acked-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/a406b535-dc55-4856-8ae9-5a063644a1af@linux.ibm.com

authored by

Peter Bergner and committed by
Michael Ellerman
3281366a 4b265584

+2
+2
include/uapi/linux/auxvec.h
··· 32 32 #define AT_HWCAP2 26 /* extension of AT_HWCAP */ 33 33 #define AT_RSEQ_FEATURE_SIZE 27 /* rseq supported feature size */ 34 34 #define AT_RSEQ_ALIGN 28 /* rseq allocation alignment */ 35 + #define AT_HWCAP3 29 /* extension of AT_HWCAP */ 36 + #define AT_HWCAP4 30 /* extension of AT_HWCAP */ 35 37 36 38 #define AT_EXECFN 31 /* filename of program */ 37 39