diff options
author | Adhemerval Zanella Netto <adhemerval.zanella@linaro.org> | 2023-03-23 10:13:51 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-03-29 14:33:06 -0300 |
commit | 33237fe83d553dff111915024c9670adc3f06048 (patch) | |
tree | 610ddd2195dca3c3901cfcc74f76e4ab6eb6c0e7 /sysdeps/unix/sysv/linux | |
parent | 6384171fa0cef59b738ce8d0499fcea4f5009411 (diff) | |
download | glibc-33237fe83d553dff111915024c9670adc3f06048.tar glibc-33237fe83d553dff111915024c9670adc3f06048.tar.gz glibc-33237fe83d553dff111915024c9670adc3f06048.tar.bz2 glibc-33237fe83d553dff111915024c9670adc3f06048.zip |
Remove --enable-tunables configure option
And make always supported. The configure option was added on glibc 2.25
and some features require it (such as hwcap mask, huge pages support, and
lock elisition tuning). It also simplifies the build permutations.
Changes from v1:
* Remove glibc.rtld.dynamic_sort changes, it is orthogonal and needs
more discussion.
* Cleanup more code.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r-- | sysdeps/unix/sysv/linux/Makefile | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/aarch64/cpu-features.c | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/elision-conf.c | 8 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/elision-conf.c | 8 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86/elision-conf.c | 8 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/64/Makefile | 2 |
6 files changed, 4 insertions, 32 deletions
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index f8bd12d991..b4323b2604 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -245,11 +245,9 @@ tests-internal += \ tst-sigcontext-get_pc \ # tests-internal -ifneq (no,$(have-tunables)) tests-internal += \ tst-rseq-disable \ - # tests-internal $(have-tunables) -endif + # tests-internal tests-time64 += \ tst-adjtimex-time64 \ diff --git a/sysdeps/unix/sysv/linux/aarch64/cpu-features.c b/sysdeps/unix/sysv/linux/aarch64/cpu-features.c index 0380f116de..dc09c1c827 100644 --- a/sysdeps/unix/sysv/linux/aarch64/cpu-features.c +++ b/sysdeps/unix/sysv/linux/aarch64/cpu-features.c @@ -30,7 +30,6 @@ to see when pointer have been correctly tagged. */ #define MTE_ALLOWED_TAGS (0xfffe << PR_MTE_TAG_SHIFT) -#if HAVE_TUNABLES struct cpu_list { const char *name; @@ -59,19 +58,16 @@ get_midr_from_mcpu (const char *mcpu) return UINT64_MAX; } -#endif static inline void init_cpu_features (struct cpu_features *cpu_features) { register uint64_t midr = UINT64_MAX; -#if HAVE_TUNABLES /* Get the tunable override. */ const char *mcpu = TUNABLE_GET (glibc, cpu, name, const char *, NULL); if (mcpu != NULL) midr = get_midr_from_mcpu (mcpu); -#endif /* If there was no useful tunable override, query the MIDR if the kernel allows it. */ @@ -100,13 +96,11 @@ init_cpu_features (struct cpu_features *cpu_features) cpu_features->mte_state = 0; #ifdef USE_MTAG -# if HAVE_TUNABLES int mte_state = TUNABLE_GET (glibc, mem, tagging, unsigned, 0); cpu_features->mte_state = (GLRO (dl_hwcap2) & HWCAP2_MTE) ? mte_state : 0; /* If we lack the MTE feature, disable the tunable, since it will otherwise cause instructions that won't run on this CPU to be used. */ TUNABLE_SET (glibc, mem, tagging, cpu_features->mte_state); -# endif if (cpu_features->mte_state & 4) /* Enable choosing system-preferred faulting mode. */ diff --git a/sysdeps/unix/sysv/linux/powerpc/elision-conf.c b/sysdeps/unix/sysv/linux/powerpc/elision-conf.c index 8cd945a6c5..7c98dbd0d0 100644 --- a/sysdeps/unix/sysv/linux/powerpc/elision-conf.c +++ b/sysdeps/unix/sysv/linux/powerpc/elision-conf.c @@ -22,9 +22,7 @@ #include <unistd.h> #include <dl-procinfo.h> -#if HAVE_TUNABLES -# define TUNABLE_NAMESPACE elision -#endif +#define TUNABLE_NAMESPACE elision #include <elf/dl-tunables.h> /* Reasonable initial tuning values, may be revised in the future. @@ -51,7 +49,6 @@ struct elision_config __elision_aconf = .skip_trylock_internal_abort = 3, }; -#if HAVE_TUNABLES static inline void __always_inline do_set_elision_enable (int32_t elision_enable) @@ -94,14 +91,12 @@ TUNABLE_CALLBACK_FNDECL (skip_lock_internal_abort, int32_t); TUNABLE_CALLBACK_FNDECL (skip_lock_out_of_tbegin_retries, int32_t); TUNABLE_CALLBACK_FNDECL (try_tbegin, int32_t); TUNABLE_CALLBACK_FNDECL (skip_trylock_internal_abort, int32_t); -#endif /* Initialize elision. */ void __lll_elision_init (void) { -#if HAVE_TUNABLES /* Elision depends on tunables and must be explicitly turned on by setting the appropriate tunable on a supported platform. */ @@ -117,7 +112,6 @@ __lll_elision_init (void) TUNABLE_CALLBACK (set_elision_try_tbegin)); TUNABLE_GET (skip_trylock_internal_abort, int32_t, TUNABLE_CALLBACK (set_elision_skip_trylock_internal_abort)); -#endif /* Linux from 3.9 through 4.2 do not abort HTM transaction on syscalls, instead it suspends the transaction and resumes it when returning to diff --git a/sysdeps/unix/sysv/linux/s390/elision-conf.c b/sysdeps/unix/sysv/linux/s390/elision-conf.c index 5911e51097..6a6d6814ee 100644 --- a/sysdeps/unix/sysv/linux/s390/elision-conf.c +++ b/sysdeps/unix/sysv/linux/s390/elision-conf.c @@ -22,9 +22,7 @@ #include <unistd.h> #include <dl-procinfo.h> -#if HAVE_TUNABLES -# define TUNABLE_NAMESPACE elision -#endif +#define TUNABLE_NAMESPACE elision #include <elf/dl-tunables.h> /* Reasonable initial tuning values, may be revised in the future. @@ -51,7 +49,6 @@ struct elision_config __elision_aconf = .skip_trylock_internal_abort = 3, }; -#if HAVE_TUNABLES static inline void __always_inline do_set_elision_enable (int32_t elision_enable) @@ -93,14 +90,12 @@ TUNABLE_CALLBACK_FNDECL (skip_lock_internal_abort, int32_t); TUNABLE_CALLBACK_FNDECL (skip_lock_out_of_tbegin_retries, int32_t); TUNABLE_CALLBACK_FNDECL (try_tbegin, int32_t); TUNABLE_CALLBACK_FNDECL (skip_trylock_internal_abort, int32_t); -#endif /* Initialize elison. */ void __lll_elision_init (void) { -#if HAVE_TUNABLES /* Elision depends on tunables and must be explicitly turned on by setting the appropriate tunable on a supported platform. */ @@ -116,7 +111,6 @@ __lll_elision_init (void) TUNABLE_CALLBACK (set_elision_try_tbegin)); TUNABLE_GET (skip_trylock_internal_abort, int32_t, TUNABLE_CALLBACK (set_elision_skip_trylock_internal_abort)); -#endif if (!__pthread_force_elision) __elision_aconf.try_tbegin = 0; /* Disable elision on rwlocks. */ diff --git a/sysdeps/unix/sysv/linux/x86/elision-conf.c b/sysdeps/unix/sysv/linux/x86/elision-conf.c index 6447bda96b..cfd9a71e31 100644 --- a/sysdeps/unix/sysv/linux/x86/elision-conf.c +++ b/sysdeps/unix/sysv/linux/x86/elision-conf.c @@ -22,9 +22,7 @@ #include <elision-conf.h> #include <unistd.h> -#if HAVE_TUNABLES -# define TUNABLE_NAMESPACE elision -#endif +#define TUNABLE_NAMESPACE elision #include <elf/dl-tunables.h> /* Reasonable initial tuning values, may be revised in the future. @@ -48,7 +46,6 @@ struct elision_config __elision_aconf = .skip_trylock_internal_abort = 3, }; -#if HAVE_TUNABLES static __always_inline void do_set_elision_enable (int32_t elision_enable) { @@ -87,14 +84,12 @@ TUNABLE_CALLBACK_FNDECL (skip_lock_busy, int32_t); TUNABLE_CALLBACK_FNDECL (skip_lock_internal_abort, int32_t); TUNABLE_CALLBACK_FNDECL (retry_try_xbegin, int32_t); TUNABLE_CALLBACK_FNDECL (skip_trylock_internal_abort, int32_t); -#endif /* Initialize elision. */ void __lll_elision_init (void) { -#if HAVE_TUNABLES /* Elision depends on tunables and must be explicitly turned on by setting the appropriate tunable on a supported platform. */ @@ -108,7 +103,6 @@ __lll_elision_init (void) TUNABLE_CALLBACK (set_elision_retry_try_xbegin)); TUNABLE_GET (skip_trylock_internal_abort, int32_t, TUNABLE_CALLBACK (set_elision_skip_trylock_internal_abort)); -#endif if (!__pthread_force_elision) __elision_aconf.retry_try_xbegin = 0; /* Disable elision on rwlocks. */ diff --git a/sysdeps/unix/sysv/linux/x86_64/64/Makefile b/sysdeps/unix/sysv/linux/x86_64/64/Makefile index 8ff4f27786..1bf7d528b2 100644 --- a/sysdeps/unix/sysv/linux/x86_64/64/Makefile +++ b/sysdeps/unix/sysv/linux/x86_64/64/Makefile @@ -2,7 +2,6 @@ default-abi := 64 ifeq ($(subdir),elf) -ifneq ($(have-tunables),no) tests-map-32bit = \ tst-map-32bit-1a \ @@ -24,4 +23,3 @@ tst-map-32bit-1b-ENV = GLIBC_TUNABLES=glibc.cpu.prefer_map_32bit_exec=1 $(objpfx)tst-map-32bit-1b: $(objpfx)tst-map-32bit-mod.so endif -endif |