From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Peter Bergner <bergner@linux.ibm.com>,
linux-api@vger.kernel.org, linux-arch@vger.kernel.org,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Cc: Nicholas Piggin <npiggin@gmail.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Segher Boessenkool <segher@kernel.crashing.org>,
GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] uapi/auxvec: Define AT_HWCAP3 and AT_HWCAP4 aux vector, entries
Date: Wed, 27 Sep 2023 13:03:02 -0300 [thread overview]
Message-ID: <97eb2099-23c2-4921-89ac-9523226ad221@linaro.org> (raw)
In-Reply-To: <fd879f60-3f0b-48d1-bfa1-6d337768207e@linux.ibm.com>
On 26/09/23 19:02, Peter Bergner wrote:
> The powerpc toolchain keeps a copy of the HWCAP bit masks in our TCB for fast
> access by our __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, given distro unwillingness to apply ABI modifying patches
> to distro point releases. 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.
This is different than previously exported auxv, where each AT_* constant
would have a auxv entry. On glibc it would require changing _dl_parse_auxv
to iterate over the auxv_values to find AT_HWCAP3/AT_HWCAP4 (not ideal,
but doable).
Wouldn't be better to always export it on fs/binfmt_elf.c, along with all
the machinery to setup it (ELF_HWCAP3, etc), along with proper documentation?
>
> I scanned both 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. If anyone sees a problem with using those specific values, I'm
> amenable to using other values, just let me know what would be better.
>
> Peter
>
>
> Signed-off-by: Peter Bergner <bergner@linux.ibm.com>
> ---
> include/uapi/linux/auxvec.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/uapi/linux/auxvec.h b/include/uapi/linux/auxvec.h
> index 6991c4b8ab18..cc61cb9b3e9a 100644
> --- a/include/uapi/linux/auxvec.h
> +++ b/include/uapi/linux/auxvec.h
> @@ -32,6 +32,8 @@
> #define AT_HWCAP2 26 /* extension of AT_HWCAP */
> #define AT_RSEQ_FEATURE_SIZE 27 /* rseq supported feature size */
> #define AT_RSEQ_ALIGN 28 /* rseq allocation alignment */
> +#define AT_HWCAP3 29 /* extension of AT_HWCAP */
> +#define AT_HWCAP4 30 /* extension of AT_HWCAP */
>
> #define AT_EXECFN 31 /* filename of program */
>
next prev parent reply other threads:[~2023-09-27 16:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-26 22:02 Peter Bergner
2023-09-27 16:03 ` Adhemerval Zanella Netto [this message]
2023-10-02 21:19 ` Peter Bergner
2023-10-03 14:08 ` Adhemerval Zanella Netto
2023-10-03 22:12 ` Peter Bergner
2023-10-04 11:02 ` Adhemerval Zanella Netto
2023-10-17 23:14 ` [PING][PATCH] " Peter Bergner
2023-10-18 16:22 ` Szabolcs Nagy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=97eb2099-23c2-4921-89ac-9523226ad221@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=bergner@linux.ibm.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
--cc=segher@kernel.crashing.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).