d8307d
commit 1a7df49c92f62e14d8727f083fd055eba7c91ad9
d8307d
Author: Stefan Liebler <stli@linux.ibm.com>
d8307d
Date:   Fri Mar 22 11:14:07 2019 +0100
d8307d
d8307d
    S390: Add new hwcap values for new cpu architecture arch13.
d8307d
    
d8307d
    The new hwcap values indicate support for:
d8307d
    -"Vector-Enhancements Facility 2" (tag "vxe2", hwcap 2^15)
d8307d
    -"Vector-Packed-Decimal-Enhancement Facility" (tag "vxp", hwcap 2^16)
d8307d
    -"Enhanced-Sort Facility" (tag "sort", hwcap 2^17)
d8307d
    -"Deflate-Conversion Facility" (tag "dflt", hwcap 2^18)
d8307d
    
d8307d
    The vxe2 hwcap is also marked as important hwcap.
d8307d
    
d8307d
    ChangeLog:
d8307d
    
d8307d
            * sysdeps/s390/dl-procinfo.c (_dl_s390_cap_flags):
d8307d
            Add vxe2, vxp, dflt, sort flags.
d8307d
            * sysdeps/s390/dl-procinfo.h: Add HWCAP_S390_VXRS_EXT2,
d8307d
            HWCAP_S390_VXRS_PDE, HWCAP_S390_SORT, HWCAP_S390_DFLT
d8307d
            capabilities.
d8307d
            (HWCAP_IMPORTANT): Add HWCAP_S390_VXRS_EXT2.
d8307d
            * sysdeps/unix/sysv/linux/s390/bits/hwcap.h
d8307d
            (HWCAP_S390_VXRS_EXT2, HWCAP_S390_VXRS_PDE, HWCAP_S390_SORT,
d8307d
            HWCAP_S390_DFLT): Define.
d8307d
d8307d
diff --git a/sysdeps/s390/dl-procinfo.c b/sysdeps/s390/dl-procinfo.c
d8307d
index 86c964caff6a1bc4..6ea220a171d8fab7 100644
d8307d
--- a/sysdeps/s390/dl-procinfo.c
d8307d
+++ b/sysdeps/s390/dl-procinfo.c
d8307d
@@ -46,12 +46,12 @@
d8307d
 #if !defined PROCINFO_DECL && defined SHARED
d8307d
   ._dl_s390_cap_flags
d8307d
 #else
d8307d
-PROCINFO_CLASS const char _dl_s390_cap_flags[15][9]
d8307d
+PROCINFO_CLASS const char _dl_s390_cap_flags[19][9]
d8307d
 #endif
d8307d
 #ifndef PROCINFO_DECL
d8307d
 = {
d8307d
      "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp", "edat", "etf3eh",
d8307d
-     "highgprs", "te", "vx", "vxd", "vxe", "gs"
d8307d
+     "highgprs", "te", "vx", "vxd", "vxe", "gs", "vxe2", "vxp", "sort", "dflt"
d8307d
   }
d8307d
 #endif
d8307d
 #if !defined SHARED || defined PROCINFO_DECL
d8307d
diff --git a/sysdeps/s390/dl-procinfo.h b/sysdeps/s390/dl-procinfo.h
d8307d
index f71d64c3ab24e715..d03c69fffdbd06de 100644
d8307d
--- a/sysdeps/s390/dl-procinfo.h
d8307d
+++ b/sysdeps/s390/dl-procinfo.h
d8307d
@@ -21,7 +21,7 @@
d8307d
 #define _DL_PROCINFO_H	1
d8307d
 #include <ldsodefs.h>
d8307d
 
d8307d
-#define _DL_HWCAP_COUNT 15
d8307d
+#define _DL_HWCAP_COUNT 19
d8307d
 
d8307d
 #define _DL_PLATFORMS_COUNT	9
d8307d
 
d8307d
@@ -54,11 +54,16 @@ enum
d8307d
   HWCAP_S390_VXD = 1 << 12,
d8307d
   HWCAP_S390_VXE = 1 << 13,
d8307d
   HWCAP_S390_GS = 1 << 14,
d8307d
+  HWCAP_S390_VXRS_EXT2 = 1 << 15,
d8307d
+  HWCAP_S390_VXRS_PDE = 1 << 16,
d8307d
+  HWCAP_S390_SORT = 1 << 17,
d8307d
+  HWCAP_S390_DFLT = 1 << 18,
d8307d
 };
d8307d
 
d8307d
 #define HWCAP_IMPORTANT (HWCAP_S390_ZARCH | HWCAP_S390_LDISP \
d8307d
 			 | HWCAP_S390_EIMM | HWCAP_S390_DFP  \
d8307d
-			 | HWCAP_S390_VX | HWCAP_S390_VXE)
d8307d
+			 | HWCAP_S390_VX | HWCAP_S390_VXE    \
d8307d
+			 | HWCAP_S390_VXRS_EXT2)
d8307d
 
d8307d
 /* We cannot provide a general printing function.  */
d8307d
 #define _dl_procinfo(type, word) -1
d8307d
diff --git a/sysdeps/unix/sysv/linux/s390/bits/hwcap.h b/sysdeps/unix/sysv/linux/s390/bits/hwcap.h
d8307d
index 2564712399948375..6b9b59522e3d3bec 100644
d8307d
--- a/sysdeps/unix/sysv/linux/s390/bits/hwcap.h
d8307d
+++ b/sysdeps/unix/sysv/linux/s390/bits/hwcap.h
d8307d
@@ -39,3 +39,7 @@
d8307d
 #define HWCAP_S390_VXD          4096
d8307d
 #define HWCAP_S390_VXE          8192
d8307d
 #define HWCAP_S390_GS           16384
d8307d
+#define HWCAP_S390_VXRS_EXT2    32768
d8307d
+#define HWCAP_S390_VXRS_PDE     65536
d8307d
+#define HWCAP_S390_SORT         131072
d8307d
+#define HWCAP_S390_DFLT         262144