From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Siddhesh Poyarekar <siddhesh@sourceware.org>, libc-alpha@sourceware.org
Subject: Re: [PATCH 2/5] tunables: Add LD_HWCAP_MASK to tunables
Date: Mon, 22 May 2017 13:20:00 -0000 [thread overview]
Message-ID: <108e5809-1c71-f6b2-5527-802c13f54cab@linaro.org> (raw)
In-Reply-To: <1495138038-32212-3-git-send-email-siddhesh@sourceware.org>
On 18/05/2017 17:07, Siddhesh Poyarekar wrote:
> Add LD_HWCAP_MASK to tunables in preparation of it being removed from
> rtld.c. This allows us to read LD_HWCAP_MASK much earlier so that it
> can influence IFUNC resolution in aarch64.
>
> This patch does not actually do anything other than read the
> LD_HWCAP_MASK variable and add the tunables way to set the
> LD_HWCAP_MASK, i.e. via the glibc.tune.hwcap_mask tunable. In a
> follow-up patch, the _dl_hwcap_mask will be replaced with
> glibc.tune.hwcap_mask to complete the transition.
>
> * elf/dl-tunables.list: Add glibc.tune.hwcap_mask.
> * scripts/gen-tunables.awk: Include dl-procinfo.h.
> * manual/tunables.texi: Document glibc.tune.hwcap_mask.
LGTM with a small fix below.
> ---
> elf/dl-tunables.list | 7 +++++++
> manual/tunables.texi | 22 ++++++++++++++++++++++
> scripts/gen-tunables.awk | 1 +
> 3 files changed, 30 insertions(+)
>
> diff --git a/elf/dl-tunables.list b/elf/dl-tunables.list
> index b9f1488..41ce9af 100644
> --- a/elf/dl-tunables.list
> +++ b/elf/dl-tunables.list
> @@ -77,4 +77,11 @@ glibc {
> security_level: SXID_IGNORE
> }
> }
> + tune {
> + hwcap_mask {
> + type: UINT_64
> + env_alias: LD_HWCAP_MASK
> + default: HWCAP_IMPORTANT
> + }
> + }
> }
> diff --git a/manual/tunables.texi b/manual/tunables.texi
> index ac8c38f..37aefca 100644
> --- a/manual/tunables.texi
> +++ b/manual/tunables.texi
> @@ -31,6 +31,8 @@ their own namespace.
> @menu
> * Tunable names:: The structure of a tunable name
> * Memory Allocation Tunables:: Tunables in the memory allocation subsystem
> +* Hardware Capability Tunables:: Tunables that modify the hardware
> + capabilities seen by @theglibc{}
> @end menu
>
> @node Tunable names
> @@ -190,3 +192,23 @@ number of arenas is determined by the number of CPU cores online. For 32-bit
> systems the limit is twice the number of cores online and on 64-bit systems, it
> is 8 times the number of cores online.
> @end deftp
> +
> +@node Hardware Capability Tunables
> +@section Hardware Capability Tunables
> +@cindex hardware capability tunables
> +@cindex hwcap tunables
> +@cindex tunables, hwcap
> +
> +@deftp {Tunable namespace} glibc.tune
> +Behavior of @theglibc{} can be tuned to assume specific hardware capabilities
> +by setting the following tunables in the @code{tune} namespace:
> +@end deftp
> +
> +@deftp Tunable glibc.tune.hwcap_mask
> +This tunable supersedes the @env{LD_HWCAP_MASK} environment variable and is
> +identical in features.
> +
> +The @code{AT_HWCAP} key in the Auxilliary Vector specifies instruction set
> +extensions available in the processor at runtime for some architectures. The
> +@code{glibc.tune.hwcap_mask} tunable allows the user to mask out those
> +capabilities at runtime, thus disabling use of those extensions.
Missing @end deftp here.
> diff --git a/scripts/gen-tunables.awk b/scripts/gen-tunables.awk
> index b10b00e..93e5aff 100644
> --- a/scripts/gen-tunables.awk
> +++ b/scripts/gen-tunables.awk
> @@ -134,6 +134,7 @@ END {
> print "# error \"Do not include this file directly.\""
> print "# error \"Include tunables.h instead.\""
> print "#endif"
> + print "#include <dl-procinfo.h>\n"
>
> # Now, the enum names
> print "\ntypedef enum"
>
next prev parent reply other threads:[~2017-05-22 13:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 20:07 [PATCH v2 0/5] aarch64: Allow overriding HWCAP_CPUID feature check Siddhesh Poyarekar
2017-05-18 20:07 ` [PATCH 5/5] aarch64: Allow overriding HWCAP_CPUID feature check using HWCAP_MASK Siddhesh Poyarekar
2017-05-19 9:49 ` Szabolcs Nagy
2017-05-19 17:44 ` Siddhesh Poyarekar
2017-05-19 22:12 ` Szabolcs Nagy
2017-05-20 3:32 ` Siddhesh Poyarekar
2017-05-20 12:35 ` Szabolcs Nagy
2017-05-20 13:23 ` Siddhesh Poyarekar
2017-05-18 20:07 ` [PATCH 3/5] tunables: Use glibc.tune.hwcap_mask tunable instead of _dl_hwcap_mask Siddhesh Poyarekar
2017-05-22 14:51 ` Adhemerval Zanella
2017-05-18 20:07 ` [PATCH 1/5] tunables: Add hooks to get and update tunables Siddhesh Poyarekar
2017-05-22 14:07 ` Adhemerval Zanella
2017-05-18 20:07 ` [PATCH 2/5] tunables: Add LD_HWCAP_MASK to tunables Siddhesh Poyarekar
2017-05-22 13:20 ` Adhemerval Zanella [this message]
2017-05-18 20:07 ` [PATCH 4/5] Delay initialization of CPU features struct in static binaries Siddhesh Poyarekar
2017-05-25 3:05 ` H.J. Lu
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=108e5809-1c71-f6b2-5527-802c13f54cab@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
--cc=siddhesh@sourceware.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).