Re: [PATCH v2] uapi/auxvec: Define AT_HWCAP3 and AT_HWCAP4 aux vector, entries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Peter Bergner <bergner@xxxxxxxxxxxxx> writes:
> On 2/15/24 2:16 AM, Arnd Bergmann wrote:
>> On Wed, Feb 14, 2024, at 23:34, Peter Bergner wrote:
>>> The powerpc toolchain keeps a copy of the HWCAP bit masks in our 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 we need them is
>>> problematical.  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.  This has received Acked-by's from both GLIBC and Linux kernel
>>> developers and no reservations or Nacks from anyone.
>>>
>>> Arnd, we seem to have consensus on the patch below.  Is this something
>>> you could take and apply to your tree? 
>>>
>> 
>> I don't mind taking it, but it may be better to use the
>> powerpc tree if that is where it's actually being used.
>
> So this is not a powerpc only patch, but we may be the first arch
> to use it.  Szabolcs mentioned that aarch64 was pretty quickly filling
> up their AT_HWCAP2 and that they will eventually require using AT_HWCAP3
> as well.  If you still think this should go through the powerpc tree,
> I can check on that.

I'm happy to take it with Arnd's ack.

I trimmed up the commit message a bit, see below.

cheers


Author:     Peter Bergner <bergner@xxxxxxxxxxxxx>
AuthorDate: Wed Feb 14 16:34:06 2024 -0600
Commit:     Michael Ellerman <mpe@xxxxxxxxxxxxxx>
CommitDate: Fri Feb 16 12:42:59 2024 +1100

    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@xxxxxxxxxxxxx>
    Acked-by: Adhemerval Zanella <adhemerval.zanella@xxxxxxxxxx>
    Acked-by: Nicholas Piggin <npiggin@xxxxxxxxx>
    Acked-by: Szabolcs Nagy <szabolcs.nagy@xxxxxxx>
    Acked-by: Arnd Bergmann <arnd@xxxxxxxx>
    Signed-off-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
    Link: https://msgid.link/a406b535-dc55-4856-8ae9-5a063644a1af@xxxxxxxxxxxxx




[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux