public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Szabolcs Nagy <szabolcs.nagy@arm.com>
To: GNU C Library <libc-alpha@sourceware.org>
Cc: nd@arm.com
Subject: aarch64: add HWCAP_ATOMICS to HWCAP_IMPORTANT
Date: Thu, 19 Apr 2018 11:51:00 -0000	[thread overview]
Message-ID: <1d8eb765-e147-534e-ed1e-daa8deb8d5a7@arm.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 536 bytes --]

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.

[-- Attachment #2: atomics.diff --]
[-- Type: text/x-patch, Size: 767 bytes --]

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

             reply	other threads:[~2018-04-19 11:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-19 11:51 Szabolcs Nagy [this message]
2018-04-19 14:38 ` Adhemerval Zanella
2018-04-19 17:07   ` Szabolcs Nagy
2018-04-19 19:25     ` Adhemerval Zanella
2018-04-30 15:27     ` Carlos O'Donell
2018-04-19 16:08 ` Steve Ellcey
2018-04-19 16:58   ` Szabolcs Nagy
2018-04-30 15:34 ` Carlos O'Donell

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=1d8eb765-e147-534e-ed1e-daa8deb8d5a7@arm.com \
    --to=szabolcs.nagy@arm.com \
    --cc=libc-alpha@sourceware.org \
    --cc=nd@arm.com \
    /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).