From: Victor Do Nascimento <victor.donascimento@arm.com>
To: <gcc-patches@gcc.gnu.org>
Cc: <kyrylo.tkachov@arm.com>, <richard.sandiford@arm.com>,
<Richard.Earnshaw@arm.com>,
Victor Do Nascimento <victor.donascimento@arm.com>
Subject: [PATCH v4 0/4] Libatomic: Add LSE128 atomics support for AArch64
Date: Wed, 24 Jan 2024 17:17:29 +0000 [thread overview]
Message-ID: <20240124171853.3112540-1-victor.donascimento@arm.com> (raw)
v4 updates
1. Make use of HWCAP2_LSE128, as defined in the Linux kernel v6.7
for feature check. This has required adding a new patch to the
series, enabling ifunc resolvers to read a second arg of type
`__ifunc_arg_t *', from which the `_hwcap2' member can be queried
for LSE128 support. HWCAP2_LSE128, HWCAP_ATOMICS and __ifunc_arg_t
are conditionally defined in the `host-config.h' file to allow
backwards compatibility with older versions of glibc which lack
definitions for these.
2. Run configure test LIBAT_TEST_FEAT_LSE128 unconditionally,
renaming it to LIBAT_TEST_FEAT_AARCH64_LSE128. While it may seem
counter-intuitive to run an aarch64 test on non-aarch64 targets, the
Automake manual makes it clear:
"Note that you must arrange for every AM_CONDITIONAL to be
invoked every time configure is run. If AM_CONDITIONAL is
run conditionally (e.g., in a shell if statement), then
the result will confuse automake."
Failure to do so has been found to result in Libatomic build
failures on arm and x86_64 targets.
3. Minor changes in the implementations of {ENTRY|END}_FEAT and
ALIAS macros used in `config/linux/aarch64/atomic_16.S'
4. Improve commit message in PATCH 2/3 documenting design choice
around merging REL and ACQ_REL memory orderings in LSE128 atomic
functions.
Regression-tested on aarch64-none-linux-gnu on Cortex-A72 and
LSE128-enabled Armv-A Base RevC AEM FVP.
---
Building upon Wilco Dijkstra's work on AArch64 128-bit atomics for
Libatomic, namely the patches from [1] and [2], this patch series
extends the library's capabilities to dynamically select and emit
Armv9.4-a LSE128 implementations of atomic operations via ifuncs at
run-time whenever architectural support is present.
Regression tested on aarch64-linux-gnu target with LSE128-support.
[1] https://gcc.gnu.org/pipermail/gcc-patches/2023-June/620529.html
[2] https://gcc.gnu.org/pipermail/gcc-patches/2023-August/626358.html
Victor Do Nascimento (4):
libatomic: atomic_16.S: Improve ENTRY, END and ALIAS macro interface
libatomic: Add support for __ifunc_arg_t arg in ifunc resolver
libatomic: Enable LSE128 128-bit atomics for armv9.4-a
aarch64: Add explicit checks for implicit LSE/LSE2 requirements.
libatomic/Makefile.am | 3 +
libatomic/Makefile.in | 1 +
libatomic/acinclude.m4 | 19 ++
libatomic/auto-config.h.in | 3 +
libatomic/config/linux/aarch64/atomic_16.S | 247 ++++++++++++++++---
libatomic/config/linux/aarch64/host-config.h | 60 ++++-
libatomic/configure | 61 ++++-
libatomic/configure.ac | 3 +
libatomic/configure.tgt | 2 +-
9 files changed, 358 insertions(+), 41 deletions(-)
--
2.42.0
next reply other threads:[~2024-01-24 17:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 17:17 Victor Do Nascimento [this message]
2024-01-24 17:17 ` [PATCH v4 1/4] libatomic: atomic_16.S: Improve ENTRY, END and ALIAS macro interface Victor Do Nascimento
2024-01-25 17:17 ` Richard Sandiford
2024-01-24 17:17 ` [PATCH v4 2/4] libatomic: Add support for __ifunc_arg_t arg in ifunc resolver Victor Do Nascimento
2024-01-25 17:28 ` Richard Sandiford
2024-01-24 17:17 ` [PATCH v4 3/4] libatomic: Enable LSE128 128-bit atomics for armv9.4-a Victor Do Nascimento
2024-01-25 17:38 ` Richard Sandiford
2024-01-24 17:17 ` [PATCH v4 4/4] aarch64: Add explicit checks for implicit LSE/LSE2 requirements Victor Do Nascimento
2024-01-25 17:41 ` Richard Sandiford
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=20240124171853.3112540-1-victor.donascimento@arm.com \
--to=victor.donascimento@arm.com \
--cc=Richard.Earnshaw@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=kyrylo.tkachov@arm.com \
--cc=richard.sandiford@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).