94084c
commit cb44a620ef2336449af60694b6696efced161774
94084c
Author: Stefan Liebler <stli@linux.ibm.com>
94084c
Date:   Tue Oct 5 16:14:10 2021 +0200
94084c
94084c
    S390: Add PCI_MIO and SIE HWCAPs
94084c
    
94084c
    Both new HWCAPs were introduced in these kernel commits:
94084c
    - 7e8403ecaf884f307b627f3c371475913dd29292
94084c
      "s390: add HWCAP_S390_PCI_MIO to ELF hwcaps"
94084c
    - 7e82523f2583e9813e4109df3656707162541297
94084c
      "s390/hwcaps: make sie capability regular hwcap"
94084c
    
94084c
    Also note that the kernel commit 511ad531afd4090625def4d9aba1f5227bd44b8e
94084c
    "s390/hwcaps: shorten HWCAP defines" has shortened the prefix of the macros
94084c
    from "HWCAP_S390_" to "HWCAP_".  For compatibility reasons, we do not
94084c
    change the prefix in public glibc header file.
94084c
    
94084c
    (cherry picked from commit f2e06656d04a9fcb0603802a4f8ce7aa3a1f055e)
94084c
94084c
diff --git a/sysdeps/s390/dl-procinfo.c b/sysdeps/s390/dl-procinfo.c
94084c
index c174e27b3559c57c..155f0bd99eccb3f9 100644
94084c
--- a/sysdeps/s390/dl-procinfo.c
94084c
+++ b/sysdeps/s390/dl-procinfo.c
94084c
@@ -46,13 +46,13 @@
94084c
 #if !defined PROCINFO_DECL && defined SHARED
94084c
   ._dl_s390_cap_flags
94084c
 #else
94084c
-PROCINFO_CLASS const char _dl_s390_cap_flags[21][9]
94084c
+PROCINFO_CLASS const char _dl_s390_cap_flags[23][9]
94084c
 #endif
94084c
 #ifndef PROCINFO_DECL
94084c
 = {
94084c
      "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp", "edat", "etf3eh",
94084c
      "highgprs", "te", "vx", "vxd", "vxe", "gs", "vxe2", "vxp", "sort", "dflt",
94084c
-     "vxp2", "nnpa"
94084c
+     "vxp2", "nnpa", "pcimio", "sie"
94084c
   }
94084c
 #endif
94084c
 #if !defined SHARED || defined PROCINFO_DECL
94084c
diff --git a/sysdeps/s390/dl-procinfo.h b/sysdeps/s390/dl-procinfo.h
94084c
index 2d9c3058083e5dda..e4e3e334a5b3d47c 100644
94084c
--- a/sysdeps/s390/dl-procinfo.h
94084c
+++ b/sysdeps/s390/dl-procinfo.h
94084c
@@ -21,7 +21,7 @@
94084c
 #define _DL_PROCINFO_H	1
94084c
 #include <ldsodefs.h>
94084c
 
94084c
-#define _DL_HWCAP_COUNT 21
94084c
+#define _DL_HWCAP_COUNT 23
94084c
 
94084c
 #define _DL_PLATFORMS_COUNT	10
94084c
 
94084c
@@ -63,6 +63,8 @@ enum
94084c
   HWCAP_S390_DFLT = 1 << 18,
94084c
   HWCAP_S390_VXRS_PDE2 = 1 << 19,
94084c
   HWCAP_S390_NNPA = 1 << 20,
94084c
+  HWCAP_S390_PCI_MIO = 1 << 21,
94084c
+  HWCAP_S390_SIE = 1 << 22,
94084c
 };
94084c
 
94084c
 #define HWCAP_IMPORTANT (HWCAP_S390_ZARCH | HWCAP_S390_LDISP \
94084c
diff --git a/sysdeps/unix/sysv/linux/s390/bits/hwcap.h b/sysdeps/unix/sysv/linux/s390/bits/hwcap.h
94084c
index e9bd3684db862d1b..00e73a3e3bfdb711 100644
94084c
--- a/sysdeps/unix/sysv/linux/s390/bits/hwcap.h
94084c
+++ b/sysdeps/unix/sysv/linux/s390/bits/hwcap.h
94084c
@@ -22,6 +22,11 @@
94084c
 
94084c
 /*
94084c
  * The following must match the kernels asm/elf.h.
94084c
+ * Note: The kernel commit 511ad531afd4090625def4d9aba1f5227bd44b8e
94084c
+ * "s390/hwcaps: shorten HWCAP defines" has shortened the prefix of the macros
94084c
+ * from "HWCAP_S390_" to "HWCAP_".  For compatibility reasons, we do not
94084c
+ * change the prefix in public glibc header file.
94084c
+ *
94084c
  * Note that these are *not* the same as the STORE FACILITY LIST bits.
94084c
  */
94084c
 #define HWCAP_S390_ESAN3        1
94084c
@@ -48,3 +53,5 @@
94084c
 #define HWCAP_S390_DFLT         262144
94084c
 #define HWCAP_S390_VXRS_PDE2    524288
94084c
 #define HWCAP_S390_NNPA         1048576
94084c
+#define HWCAP_S390_PCI_MIO      2097152
94084c
+#define HWCAP_S390_SIE          4194304