diff options
author | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2018-08-02 23:49:19 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2018-08-02 23:49:19 +0530 |
commit | dce452dc5278f2985d21315721a6ba802537b862 (patch) | |
tree | 0c8c609c63fb53024b548fcac81b49a7c19db939 /sysdeps | |
parent | 506d7fb1d411c1ab0d786a5b858bd1d12217d0e4 (diff) | |
download | glibc-dce452dc5278f2985d21315721a6ba802537b862.tar.gz glibc-dce452dc5278f2985d21315721a6ba802537b862.tar.xz glibc-dce452dc5278f2985d21315721a6ba802537b862.zip |
Rename the glibc.tune namespace to glibc.cpu
The glibc.tune namespace is vaguely named since it is a 'tunable', so give it a more specific name that describes what it refers to. Rename the tunable namespace to 'cpu' to more accurately reflect what it encompasses. Also rename glibc.tune.cpu to glibc.cpu.name since glibc.cpu.cpu is weird. * NEWS: Mention the change. * elf/dl-tunables.list: Rename tune namespace to cpu. * sysdeps/powerpc/dl-tunables.list: Likewise. * sysdeps/x86/dl-tunables.list: Likewise. * sysdeps/aarch64/dl-tunables.list: Rename tune.cpu to cpu.name. * elf/dl-hwcaps.c (_dl_important_hwcaps): Adjust. * elf/dl-hwcaps.h (GET_HWCAP_MASK): Likewise. * manual/README.tunables: Likewise. * manual/tunables.texi: Likewise. * sysdeps/powerpc/cpu-features.c: Likewise. * sysdeps/unix/sysv/linux/aarch64/cpu-features.c (init_cpu_features): Likewise. * sysdeps/x86/cpu-features.c: Likewise. * sysdeps/x86/cpu-features.h: Likewise. * sysdeps/x86/cpu-tunables.c: Likewise. * sysdeps/x86_64/Makefile: Likewise. * sysdeps/x86/dl-cet.c: Likewise. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/aarch64/dl-tunables.list | 4 | ||||
-rw-r--r-- | sysdeps/powerpc/cpu-features.c | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/dl-tunables.list | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/aarch64/cpu-features.c | 2 | ||||
-rw-r--r-- | sysdeps/x86/Makefile | 6 | ||||
-rw-r--r-- | sysdeps/x86/cpu-features.c | 6 | ||||
-rw-r--r-- | sysdeps/x86/cpu-features.h | 2 | ||||
-rw-r--r-- | sysdeps/x86/cpu-tunables.c | 4 | ||||
-rw-r--r-- | sysdeps/x86/dl-cet.c | 2 | ||||
-rw-r--r-- | sysdeps/x86/dl-tunables.list | 2 | ||||
-rw-r--r-- | sysdeps/x86_64/Makefile | 4 |
11 files changed, 18 insertions, 18 deletions
diff --git a/sysdeps/aarch64/dl-tunables.list b/sysdeps/aarch64/dl-tunables.list index f6a88168cc..cfcf940ebd 100644 --- a/sysdeps/aarch64/dl-tunables.list +++ b/sysdeps/aarch64/dl-tunables.list @@ -17,8 +17,8 @@ # <http://www.gnu.org/licenses/>. glibc { - tune { - cpu { + cpu { + name { type: STRING } } diff --git a/sysdeps/powerpc/cpu-features.c b/sysdeps/powerpc/cpu-features.c index 955d4778a6..ad809b9815 100644 --- a/sysdeps/powerpc/cpu-features.c +++ b/sysdeps/powerpc/cpu-features.c @@ -30,7 +30,7 @@ init_cpu_features (struct cpu_features *cpu_features) tunables is enable, since for this case user can explicit disable unaligned optimizations. */ #if HAVE_TUNABLES - int32_t cached_memfunc = TUNABLE_GET (glibc, tune, cached_memopt, int32_t, + int32_t cached_memfunc = TUNABLE_GET (glibc, cpu, cached_memopt, int32_t, NULL); cpu_features->use_cached_memopt = (cached_memfunc > 0); #else diff --git a/sysdeps/powerpc/dl-tunables.list b/sysdeps/powerpc/dl-tunables.list index d26636a16b..b3372555f7 100644 --- a/sysdeps/powerpc/dl-tunables.list +++ b/sysdeps/powerpc/dl-tunables.list @@ -17,7 +17,7 @@ # <http://www.gnu.org/licenses/>. glibc { - tune { + cpu { cached_memopt { type: INT_32 minval: 0 diff --git a/sysdeps/unix/sysv/linux/aarch64/cpu-features.c b/sysdeps/unix/sysv/linux/aarch64/cpu-features.c index 39eba0186f..b4f348509e 100644 --- a/sysdeps/unix/sysv/linux/aarch64/cpu-features.c +++ b/sysdeps/unix/sysv/linux/aarch64/cpu-features.c @@ -57,7 +57,7 @@ init_cpu_features (struct cpu_features *cpu_features) #if HAVE_TUNABLES /* Get the tunable override. */ - const char *mcpu = TUNABLE_GET (glibc, tune, cpu, const char *, NULL); + const char *mcpu = TUNABLE_GET (glibc, cpu, name, const char *, NULL); if (mcpu != NULL) midr = get_midr_from_mcpu (mcpu); #endif diff --git a/sysdeps/x86/Makefile b/sysdeps/x86/Makefile index 337b0b63dc..f2fd031ac7 100644 --- a/sysdeps/x86/Makefile +++ b/sysdeps/x86/Makefile @@ -47,13 +47,13 @@ $(objpfx)tst-cet-legacy-4.out: $(objpfx)tst-cet-legacy-mod-4.so ifneq (no,$(have-tunables)) $(objpfx)tst-cet-legacy-4a: $(libdl) $(objpfx)tst-cet-legacy-4a.out: $(objpfx)tst-cet-legacy-mod-4.so -tst-cet-legacy-4a-ENV = GLIBC_TUNABLES=glibc.tune.x86_shstk=permissive +tst-cet-legacy-4a-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=permissive $(objpfx)tst-cet-legacy-4b: $(libdl) $(objpfx)tst-cet-legacy-4b.out: $(objpfx)tst-cet-legacy-mod-4.so -tst-cet-legacy-4b-ENV = GLIBC_TUNABLES=glibc.tune.x86_shstk=on +tst-cet-legacy-4b-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=on $(objpfx)tst-cet-legacy-4c: $(libdl) $(objpfx)tst-cet-legacy-4c.out: $(objpfx)tst-cet-legacy-mod-4.so -tst-cet-legacy-4c-ENV = GLIBC_TUNABLES=glibc.tune.x86_shstk=off +tst-cet-legacy-4c-ENV = GLIBC_TUNABLES=glibc.cpu.x86_shstk=off endif endif diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c index 51642f8b6a..f4e0f5a2ed 100644 --- a/sysdeps/x86/cpu-features.c +++ b/sysdeps/x86/cpu-features.c @@ -22,7 +22,7 @@ #include <libc-pointer-arith.h> #if HAVE_TUNABLES -# define TUNABLE_NAMESPACE tune +# define TUNABLE_NAMESPACE cpu # include <unistd.h> /* Get STDOUT_FILENO for _dl_printf. */ # include <elf/dl-tunables.h> @@ -419,7 +419,7 @@ no_cpuid: /* Reuse dl_platform, dl_hwcap and dl_hwcap_mask for x86. */ #if !HAVE_TUNABLES && defined SHARED - /* The glibc.tune.hwcap_mask tunable is initialized already, so no need to do + /* The glibc.cpu.hwcap_mask tunable is initialized already, so no need to do this. */ GLRO(dl_hwcap_mask) = HWCAP_IMPORTANT; #endif @@ -494,7 +494,7 @@ no_cpuid: /* Disable IBT and/or SHSTK if they are enabled by kernel, but disabled by environment variable: - GLIBC_TUNABLES=glibc.tune.hwcaps=-IBT,-SHSTK + GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK */ unsigned int cet_feature = 0; if (!HAS_CPU_FEATURE (IBT)) diff --git a/sysdeps/x86/cpu-features.h b/sysdeps/x86/cpu-features.h index 347a4b118d..4c6d08c709 100644 --- a/sysdeps/x86/cpu-features.h +++ b/sysdeps/x86/cpu-features.h @@ -141,7 +141,7 @@ struct cpu_features unsigned long int xsave_state_size; /* The full state size for XSAVE when XSAVEC is disabled by - GLIBC_TUNABLES=glibc.tune.hwcaps=-XSAVEC_Usable + GLIBC_TUNABLES=glibc.cpu.hwcaps=-XSAVEC_Usable */ unsigned int xsave_state_full_size; unsigned int feature[FEATURE_INDEX_MAX]; diff --git a/sysdeps/x86/cpu-tunables.c b/sysdeps/x86/cpu-tunables.c index 69155a8f44..8e92358c67 100644 --- a/sysdeps/x86/cpu-tunables.c +++ b/sysdeps/x86/cpu-tunables.c @@ -17,7 +17,7 @@ <http://www.gnu.org/licenses/>. */ #if HAVE_TUNABLES -# define TUNABLE_NAMESPACE tune +# define TUNABLE_NAMESPACE cpu # include <stdbool.h> # include <stdint.h> # include <unistd.h> /* Get STDOUT_FILENO for _dl_printf. */ @@ -116,7 +116,7 @@ TUNABLE_CALLBACK (set_hwcaps) (tunable_val_t *valp) the hardware which wasn't available when the selection was made. The environment variable: - GLIBC_TUNABLES=glibc.tune.hwcaps=-xxx,yyy,-zzz,.... + GLIBC_TUNABLES=glibc.cpu.hwcaps=-xxx,yyy,-zzz,.... can be used to enable CPU/ARCH feature yyy, disable CPU/ARCH feature yyy and zzz, where the feature name is case-sensitive and has to diff --git a/sysdeps/x86/dl-cet.c b/sysdeps/x86/dl-cet.c index b82ba14e75..78f36bcf53 100644 --- a/sysdeps/x86/dl-cet.c +++ b/sysdeps/x86/dl-cet.c @@ -128,7 +128,7 @@ dl_cet_check (struct link_map *m, const char *program) /* Enable IBT and SHSTK only if they are enabled in executable. NB: IBT and SHSTK may be disabled by environment variable: - GLIBC_TUNABLES=glibc.tune.hwcaps=-IBT,-SHSTK + GLIBC_TUNABLES=glibc.cpu.hwcaps=-IBT,-SHSTK */ enable_ibt &= (HAS_CPU_FEATURE (IBT) && (enable_ibt_type == CET_ALWAYS_ON diff --git a/sysdeps/x86/dl-tunables.list b/sysdeps/x86/dl-tunables.list index 73886b1352..2a457d0eec 100644 --- a/sysdeps/x86/dl-tunables.list +++ b/sysdeps/x86/dl-tunables.list @@ -17,7 +17,7 @@ # <http://www.gnu.org/licenses/>. glibc { - tune { + cpu { hwcaps { type: STRING } diff --git a/sysdeps/x86_64/Makefile b/sysdeps/x86_64/Makefile index 9f1562f1b2..d51cf03ac9 100644 --- a/sysdeps/x86_64/Makefile +++ b/sysdeps/x86_64/Makefile @@ -57,7 +57,7 @@ modules-names += x86_64/tst-x86_64mod-1 LDFLAGS-tst-x86_64mod-1.so = -Wl,-soname,tst-x86_64mod-1.so ifneq (no,$(have-tunables)) # Test the state size for XSAVE when XSAVEC is disabled. -tst-x86_64-1-ENV = GLIBC_TUNABLES=glibc.tune.hwcaps=-XSAVEC_Usable +tst-x86_64-1-ENV = GLIBC_TUNABLES=glibc.cpu.hwcaps=-XSAVEC_Usable endif $(objpfx)tst-x86_64-1: $(objpfx)x86_64/tst-x86_64mod-1.so @@ -74,7 +74,7 @@ $(objpfx)tst-platform-1.out: $(objpfx)x86_64/tst-platformmod-2.so # Turn off AVX512F_Usable and AVX2_Usable so that GLRO(dl_platform) is # always set to x86_64. tst-platform-1-ENV = LD_PRELOAD=$(objpfx)\$$PLATFORM/tst-platformmod-2.so \ - GLIBC_TUNABLES=glibc.tune.hwcaps=-AVX512F_Usable,-AVX2_Usable + GLIBC_TUNABLES=glibc.cpu.hwcaps=-AVX512F_Usable,-AVX2_Usable endif tests += tst-audit3 tst-audit4 tst-audit5 tst-audit6 tst-audit7 \ |