public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v1.1 0/7] aarch64: Allow overriding HWCAP_CPUID feature check
@ 2017-05-11 14:51 Siddhesh Poyarekar
  2017-05-11 14:52 ` [PATCH 2/7] tunables: Add support for tunables of uint64_t type Siddhesh Poyarekar
                   ` (7 more replies)
  0 siblings, 8 replies; 31+ messages in thread
From: Siddhesh Poyarekar @ 2017-05-11 14:51 UTC (permalink / raw)
  To: libc-alpha

Hi,

This set of patches moves LD_HWCAP_MASK environment variable to tunables
as glibc.tune.hwcap_mask and gets all of its uses using tunables instead.
This is needed to override the HWCAP_CPUID bit for aarch64 to allow
disabling of the multiarch MIDR check if needed.

The patchset enhances the tunables framework further for this and as a
result, the tunable_list is now laid out in the .relro section so that it
cannot be modified after relocations have been processed.  Also, tunables
can now be set to have a default value, and can also take unsigned int64
values.

I have done a sanity test of this patchset on aarch64 and seems to work
just fine.  x86 would perhaps benefit from a similar delaying of
cpu_features reading for static binaries so that they can be overriden by
tunables in future (an aarch64 patch coming up; spoiler alert: the tunable
name proposed is glibc.tune.mcpu) but I haven't done that at this time
since it is not necessary for this patchset.

Update from last set:

 - Fixed up removal of dl_hwcap_mask in one case I missed during rebase.

Siddhesh


Siddhesh Poyarekar (7):
  tunables: Specify a default value for tunables
  tunables: Add support for tunables of uint64_t type
  tunables: Add hooks to get and update tunables
  tunables: Add LD_HWCAP_MASK to tunables
  tunables: Use glibc.tune.hwcap_mask tunable instead of _dl_hwcap_mask
  Delay initialization of CPU features struct in static binaries
  aarch64: Allow overriding HWCAP_CPUID feature check using HWCAP_MASK

 csu/libc-start.c                               |   6 ++
 elf/dl-cache.c                                 |   9 +-
 elf/dl-hwcaps.c                                |  15 ++-
 elf/dl-support.c                               |   2 +
 elf/dl-tunable-types.h                         |   1 +
 elf/dl-tunables.c                              | 142 ++++++++++++++-----------
 elf/dl-tunables.h                              |  43 +++++---
 elf/dl-tunables.list                           |   7 ++
 elf/rtld.c                                     |   4 +
 scripts/gen-tunables.awk                       |  13 ++-
 sysdeps/generic/ldsodefs.h                     |   2 +
 sysdeps/sparc/sparc32/dl-machine.h             |   7 +-
 sysdeps/unix/sysv/linux/aarch64/cpu-features.c |  15 ++-
 sysdeps/unix/sysv/linux/aarch64/libc-start.c   |  23 +---
 sysdeps/x86/cpu-features.c                     |   4 +
 sysdeps/x86/libc-start.c                       |  23 +---
 16 files changed, 192 insertions(+), 124 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2017-05-18 20:44 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-11 14:51 [PATCH v1.1 0/7] aarch64: Allow overriding HWCAP_CPUID feature check Siddhesh Poyarekar
2017-05-11 14:52 ` [PATCH 2/7] tunables: Add support for tunables of uint64_t type Siddhesh Poyarekar
2017-05-15 22:09   ` Adhemerval Zanella
2017-05-17  7:07     ` Siddhesh Poyarekar
2017-05-17 13:49       ` Adhemerval Zanella
2017-05-11 14:52 ` [PATCH 5/7] tunables: Use glibc.tune.hwcap_mask tunable instead of _dl_hwcap_mask Siddhesh Poyarekar
2017-05-17 15:29   ` Adhemerval Zanella
2017-05-17 15:29   ` Adhemerval Zanella
2017-05-18 20:20     ` Siddhesh Poyarekar
2017-05-11 14:52 ` [PATCH 4/7] tunables: Add LD_HWCAP_MASK to tunables Siddhesh Poyarekar
2017-05-16 20:35   ` Adhemerval Zanella
2017-05-17  7:18     ` Siddhesh Poyarekar
2017-05-17  9:44       ` Siddhesh Poyarekar
2017-05-17 13:53         ` Adhemerval Zanella
2017-05-11 14:52 ` [PATCH 6/7] Delay initialization of CPU features struct in static binaries Siddhesh Poyarekar
2017-05-17 19:20   ` Adhemerval Zanella
2017-05-11 14:52 ` [PATCH 7/7] aarch64: Allow overriding HWCAP_CPUID feature check using HWCAP_MASK Siddhesh Poyarekar
2017-05-17 19:22   ` Adhemerval Zanella
2017-05-18 20:44     ` Siddhesh Poyarekar
2017-05-11 14:52 ` [PATCH 3/7] tunables: Add hooks to get and update tunables Siddhesh Poyarekar
2017-05-16 20:30   ` Adhemerval Zanella
2017-05-17  7:17     ` Siddhesh Poyarekar
2017-05-17 13:53       ` Adhemerval Zanella
2017-05-11 14:52 ` [PATCH 1/7] tunables: Specify a default value for tunables Siddhesh Poyarekar
2017-05-15 21:13   ` Adhemerval Zanella
2017-05-15 21:55     ` Adhemerval Zanella
2017-05-11 15:38 ` [PATCH v1.1 0/7] aarch64: Allow overriding HWCAP_CPUID feature check Adhemerval Zanella
2017-05-11 16:49   ` Siddhesh Poyarekar
2017-05-12 12:10     ` Szabolcs Nagy
2017-05-12 13:44       ` Siddhesh Poyarekar
2017-05-12 13:55         ` Adhemerval Zanella

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).