[PATCH 1/1] aarch64: Add HWCAP_GCS

Andreas K. Huettel dilfridge@gentoo.org
Tue Jan 21 11:18:02 GMT 2025


Am Dienstag, 21. Januar 2025, 11:16:11 Mitteleuropäische Normalzeit schrieb Yury Khrustalev:
> Use upper 32 bits of HWCAP.

OK, kernel is released (just in time) and definition matches.

Reviewed-by: Andreas K. Huettel <dilfridge@gentoo.org>

> ---
>  sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h   | 1 +
>  sysdeps/unix/sysv/linux/aarch64/cpu-features.c | 4 ----
>  2 files changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h b/sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h
> index f2bebaaba9..d064a091a6 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h
> +++ b/sysdeps/unix/sysv/linux/aarch64/bits/hwcap.h
> @@ -54,6 +54,7 @@
>  #define HWCAP_SB		(1 << 29)
>  #define HWCAP_PACA		(1 << 30)
>  #define HWCAP_PACG		(1UL << 31)
> +#define HWCAP_GCS		(1UL << 32)
>  
>  #define HWCAP2_DCPODP		(1 << 0)
>  #define HWCAP2_SVE2		(1 << 1)
> diff --git a/sysdeps/unix/sysv/linux/aarch64/cpu-features.c b/sysdeps/unix/sysv/linux/aarch64/cpu-features.c
> index 1ecf6cd176..6d63c8a9ec 100644
> --- a/sysdeps/unix/sysv/linux/aarch64/cpu-features.c
> +++ b/sysdeps/unix/sysv/linux/aarch64/cpu-features.c
> @@ -177,10 +177,6 @@ init_cpu_features (struct cpu_features *cpu_features)
>    /* Check if MOPS is supported.  */
>    cpu_features->mops = GLRO (dl_hwcap2) & HWCAP2_MOPS;
>  
> -#ifndef HWCAP_GCS
> -#define HWCAP_GCS (1UL << 32)
> -#endif
> -
>    if (GLRO (dl_hwcap) & HWCAP_GCS)
>      /* GCS status may be updated later by binary compatibility checks.  */
>      GL (dl_aarch64_gcs) = TUNABLE_GET (glibc, cpu, aarch64_gcs, uint64_t, 0);
> 


-- 
Andreas K. Hüttel
dilfridge@gentoo.org
Gentoo Linux developer
(council, toolchain, base-system, perl, libreoffice)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 981 bytes
Desc: This is a digitally signed message part.
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20250121/2e98d06c/attachment-0001.sig>


More information about the Libc-alpha mailing list