[PATCH v2 2/2] powerpc: Add HWCAP3/HWCAP4 data to TCB for Power Architecture.
Peter Bergner
bergner@linux.ibm.com
Tue Mar 19 23:50:31 GMT 2024
On 12/13/23 5:47 PM, Peter Bergner wrote:
> On 12/5/23 6:38 AM, Manjunath Matti wrote:
>> This patch adds a new feature for powerpc. In order to get faster
>> access to the HWCAP3/HWCAP4 masks, similar to HWCAP/HWCAP2 (i.e. for
>> implementing __builtin_cpu_supports() in GCC) without the overhead of
>> reading them from the auxiliary vector, we now reserve space for them
>> in the TCB.
>>
>> This is an ABI change for GLIBC 2.39.
>>
>> Suggested-by: Peter Bergner <bergner@linux.ibm.com>
>> ---
>> elf/dl-diagnostics.c | 2 +
>> elf/dl-support.c | 2 +
>> elf/elf.h | 4 ++
>> sysdeps/generic/ldsodefs.h | 2 +
>> sysdeps/powerpc/dl-procinfo.c | 6 ++-
>> sysdeps/powerpc/dl-procinfo.h | 52 +++++++++++++------
>> sysdeps/powerpc/hwcapinfo.c | 11 ++--
>> sysdeps/unix/sysv/linux/dl-parse_auxv.h | 2 +
>> sysdeps/unix/sysv/linux/dl-sysdep.c | 2 +
>> .../unix/sysv/linux/powerpc/cpu-features.c | 2 +
>> .../unix/sysv/linux/powerpc/cpu-features.h | 2 +
>> sysdeps/unix/sysv/linux/powerpc/libc-start.c | 6 +++
>> 12 files changed, 74 insertions(+), 19 deletions(-)
>
> LGTM. The only catch is that this patch is dependent on the associated
> kernel patch that adds the AT_HWCAP3 and AT_HWCAP4 getting upstream so
> glibc can rely on their values. I'm still working on upstreaming that.
The kernel patch this is dependent on has finally reached Linus's tree,
so I have pushed this patch.
Peter
More information about the Libc-alpha
mailing list