aarch64: add HWCAP_ATOMICS to HWCAP_IMPORTANT

Szabolcs Nagy szabolcs.nagy@arm.com
Thu Apr 19 16:58:00 GMT 2018


On 19/04/18 17:08, Steve Ellcey wrote:
> On Thu, 2018-04-19 at 12:51 +0100, Szabolcs Nagy wrote:
>> 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.
> 
> I don't know if this is relavent or not but I checked in changes a few
> months ago to use IFUNC in libatomic so that it could use LSE (or not)
> depending on the aarch64 hardware it is running on.  So if a user is
> just using libatomic calls then they don't need a separate library or a
> sperate search path.  If they want their own libraries with versions
> that do or do not use LSE directly (and don't want to use IFUNCs) then
> this could still be needed/desired.
> 

yeah, i mainly want to enable libpthread/libc with lse atomics,
it's not practical to ifunc all pthread primitives and malloc
in glibc, but the armv8.1 atomic instructions may give significant
benefit so we want a way to use those in distros.

> https://gcc.gnu.org/ml/gcc-patches/2017-12/msg00187.html
> https://gcc.gnu.org/ml/gcc-patches/2017-12/msg00434.html
> 
> Steve Ellcey
> sellcey@cavium.com
> 



More information about the Libc-alpha mailing list