This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
aarch64: add HWCAP_ATOMICS to HWCAP_IMPORTANT
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Cc: nd at arm dot com
- Date: Thu, 19 Apr 2018 12:51:46 +0100
- Subject: aarch64: add HWCAP_ATOMICS to HWCAP_IMPORTANT
- Nodisclaimer: True
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
This enables searching shared libraries in atomics/ when the hardware
supports LSE atomics of armv8.1 so one can provide optimized variants
of libraries in a portable way.
LSE atomics does not affect library abi, the new instructions can
interoperate with old ones.
I'm not familiar with how this feature of the dynamic linker is used
in practice by distros or others so comments are welcome.
2018-04-19 Szabolcs Nagy <szabolcs.nagy@arm.com>
* sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h (HWCAP_IMPORTANT): Add
HWCAP_ATOMICS.
diff --git a/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h b/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h
index 6887713149..4530cc2159 100644
--- a/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h
+++ b/sysdeps/unix/sysv/linux/aarch64/dl-procinfo.h
@@ -27,9 +27,9 @@
/* We cannot provide a general printing function. */
#define _dl_procinfo(type, word) -1
-/* HWCAP_CPUID should be available by default to influence IFUNC as well as
- library search. */
-#define HWCAP_IMPORTANT HWCAP_CPUID
+/* Default hwcap_mask setting, affects the library search path and cpu_features
+ used by glibc internal IFUNCs when the selected hwcaps are available. */
+#define HWCAP_IMPORTANT (HWCAP_CPUID | HWCAP_ATOMICS)
static inline const char *
__attribute__ ((unused))