public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* Add Arm HWCAP values from Linux 6.2 to bits/hwcap.h
@ 2023-02-25  1:50 Joseph Myers
  2023-02-25  9:56 ` Andreas Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: Joseph Myers @ 2023-02-25  1:50 UTC (permalink / raw)
  To: libc-alpha

Linux 6.2 adds six new Arm HWCAP values and two new HWCAP2 values; add
them to glibc's Arm bits/hwcap.h, with corresponding dl-procinfo.c and
dl-procinfo.h updates.

Tested with build-many-glibcs.py for arm-linux-gnueabi.

diff --git a/sysdeps/unix/sysv/linux/arm/bits/hwcap.h b/sysdeps/unix/sysv/linux/arm/bits/hwcap.h
index 8e228c1d56..f325fa93d6 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/hwcap.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/hwcap.h
@@ -43,3 +43,9 @@
 #define HWCAP_ARM_VFPD32	524288
 #define HWCAP_ARM_LPAE		1048576
 #define HWCAP_ARM_EVTSTRM	2097152
+#define HWCAP_FPHP		4194304
+#define HWCAP_ASIMDHP		8388608
+#define HWCAP_ASIMDDP		16777216
+#define HWCAP_ASIMDFHM		33554432
+#define HWCAP_ASIMDBF16		67108864
+#define HWCAP_I8MM		134217728
diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c
index 80aa4796d0..aac6ba7045 100644
--- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.c
+++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.c
@@ -45,14 +45,15 @@
 #if !defined PROCINFO_DECL && defined SHARED
   ._dl_arm_cap_flags
 #else
-PROCINFO_CLASS const char _dl_arm_cap_flags[27][10]
+PROCINFO_CLASS const char _dl_arm_cap_flags[35][10]
 #endif
 #ifndef PROCINFO_DECL
 = {
     "swp", "half", "thumb", "26bit", "fastmult", "fpa", "vfp", "edsp",
     "java", "iwmmxt", "crunch", "thumbee", "neon", "vfpv3", "vfpv3d16",
     "tls", "vfpv4", "idiva", "idivt", "vfpd32", "lpae", "evtstrm",
-    "aes", "pmull", "sha1", "sha2", "crc32",
+    "fphp", "asimdhp", "asimddp", "asimdfhm", "asimdbf16", "i8mm",
+    "aes", "pmull", "sha1", "sha2", "crc32", "sb", "ssbs",
   }
 #endif
 #if !defined SHARED || defined PROCINFO_DECL
diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
index 7d682978aa..ea886464ab 100644
--- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
+++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
@@ -24,11 +24,11 @@
 
 #define _DL_HWCAP_COUNT 27
 
-/* Low 22 bits are allocated in HWCAP.  */
-#define _DL_HWCAP_LAST		21
+/* Low 28 bits are allocated in HWCAP.  */
+#define _DL_HWCAP_LAST		27
 
 /* Low 5 bits are allocated in HWCAP2.  */
-#define _DL_HWCAP2_LAST		4
+#define _DL_HWCAP2_LAST		6
 
 /* The kernel provides platform data but it is not interesting.  */
 #define _DL_HWCAP_PLATFORM	0

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Add Arm HWCAP values from Linux 6.2 to bits/hwcap.h
  2023-02-25  1:50 Add Arm HWCAP values from Linux 6.2 to bits/hwcap.h Joseph Myers
@ 2023-02-25  9:56 ` Andreas Schwab
  2023-02-28  0:09   ` Joseph Myers
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2023-02-25  9:56 UTC (permalink / raw)
  To: Joseph Myers; +Cc: libc-alpha

On Feb 25 2023, Joseph Myers wrote:

> Linux 6.2 adds six new Arm HWCAP values and two new HWCAP2 values; add
> them to glibc's Arm bits/hwcap.h, with corresponding dl-procinfo.c and
> dl-procinfo.h updates.

Ok.

>
> Tested with build-many-glibcs.py for arm-linux-gnueabi.
>
> diff --git a/sysdeps/unix/sysv/linux/arm/bits/hwcap.h b/sysdeps/unix/sysv/linux/arm/bits/hwcap.h
> index 8e228c1d56..f325fa93d6 100644
> --- a/sysdeps/unix/sysv/linux/arm/bits/hwcap.h
> +++ b/sysdeps/unix/sysv/linux/arm/bits/hwcap.h
> @@ -43,3 +43,9 @@
>  #define HWCAP_ARM_VFPD32	524288
>  #define HWCAP_ARM_LPAE		1048576
>  #define HWCAP_ARM_EVTSTRM	2097152
> +#define HWCAP_FPHP		4194304
> +#define HWCAP_ASIMDHP		8388608
> +#define HWCAP_ASIMDDP		16777216
> +#define HWCAP_ASIMDFHM		33554432
> +#define HWCAP_ASIMDBF16		67108864
> +#define HWCAP_I8MM		134217728

Should that also get defines for HWCAP2?

> diff --git a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
> index 7d682978aa..ea886464ab 100644
> --- a/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
> +++ b/sysdeps/unix/sysv/linux/arm/dl-procinfo.h
> @@ -24,11 +24,11 @@
>  
>  #define _DL_HWCAP_COUNT 27
>  
> -/* Low 22 bits are allocated in HWCAP.  */
> -#define _DL_HWCAP_LAST		21
> +/* Low 28 bits are allocated in HWCAP.  */
> +#define _DL_HWCAP_LAST		27
>  
>  /* Low 5 bits are allocated in HWCAP2.  */

s/5/7/

> -#define _DL_HWCAP2_LAST		4
> +#define _DL_HWCAP2_LAST		6

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Add Arm HWCAP values from Linux 6.2 to bits/hwcap.h
  2023-02-25  9:56 ` Andreas Schwab
@ 2023-02-28  0:09   ` Joseph Myers
  0 siblings, 0 replies; 3+ messages in thread
From: Joseph Myers @ 2023-02-28  0:09 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: libc-alpha

On Sat, 25 Feb 2023, Andreas Schwab wrote:

> > diff --git a/sysdeps/unix/sysv/linux/arm/bits/hwcap.h b/sysdeps/unix/sysv/linux/arm/bits/hwcap.h
> > index 8e228c1d56..f325fa93d6 100644
> > --- a/sysdeps/unix/sysv/linux/arm/bits/hwcap.h
> > +++ b/sysdeps/unix/sysv/linux/arm/bits/hwcap.h
> > @@ -43,3 +43,9 @@
> >  #define HWCAP_ARM_VFPD32	524288
> >  #define HWCAP_ARM_LPAE		1048576
> >  #define HWCAP_ARM_EVTSTRM	2097152
> > +#define HWCAP_FPHP		4194304
> > +#define HWCAP_ASIMDHP		8388608
> > +#define HWCAP_ASIMDDP		16777216
> > +#define HWCAP_ASIMDFHM		33554432
> > +#define HWCAP_ASIMDBF16		67108864
> > +#define HWCAP_I8MM		134217728
> 
> Should that also get defines for HWCAP2?

I don't know - for whatever reason the initial HWCAP2 support 
<https://sourceware.org/legacy-ml/libc-alpha/2014-06/msg00756.html> didn't 
add defines to the header.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-28  0:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-25  1:50 Add Arm HWCAP values from Linux 6.2 to bits/hwcap.h Joseph Myers
2023-02-25  9:56 ` Andreas Schwab
2023-02-28  0:09   ` Joseph Myers

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