bca718
From 571d49008b0c44b4aabb66b2ac3ce690fd802466 Mon Sep 17 00:00:00 2001
bca718
From: Stefan Liebler <stli@linux.vnet.ibm.com>
bca718
Date: Thu, 8 Oct 2015 10:45:29 +0200
bca718
Subject: [PATCH 06/30] S390: Add hwcaps value for vector facility.
bca718
bca718
upstream-commit-id: 4e28fa80886c71e6aaf85016b82ce981c0f12e6d
bca718
https://www.sourceware.org/ml/libc-alpha/2015-07/msg00075.html
bca718
bca718
The HWCAP_S390_VX flag in hwcap field of auxiliary vector indicates
bca718
if the vector facility is available and the kernel is aware of it.
bca718
This can be tested with LD_SHOW_AUXV=1 <prog>.
bca718
Currently it does not show te, because it was not incremented
bca718
by commit "S/390: Add hwcap value for transactional execution.".
bca718
Thus _DL_HWCAP_COUNT is incremented by two.
bca718
bca718
ChangeLog:
bca718
bca718
	* sysdeps/s390/dl-procinfo.c (_dl_s390_platforms): Add vector flag.
bca718
	* sysdeps/s390/dl-procinfo.h: Add vector capability.
bca718
	* sysdeps/unix/sysv/linux/s390/bits/hwcap.h (HWCAP_S390_VX): Define.
bca718
---
bca718
 sysdeps/s390/dl-procinfo.c                | 4 ++--
bca718
 sysdeps/s390/dl-procinfo.h                | 3 ++-
bca718
 sysdeps/unix/sysv/linux/s390/bits/hwcap.h | 1 +
bca718
 3 files changed, 5 insertions(+), 3 deletions(-)
bca718
bca718
diff --git a/sysdeps/s390/dl-procinfo.c b/sysdeps/s390/dl-procinfo.c
bca718
index 9590146..96d438a 100644
bca718
--- a/sysdeps/s390/dl-procinfo.c
bca718
+++ b/sysdeps/s390/dl-procinfo.c
bca718
@@ -46,11 +46,11 @@
bca718
 #if !defined PROCINFO_DECL && defined SHARED
bca718
   ._dl_s390_cap_flags
bca718
 #else
bca718
-PROCINFO_CLASS const char _dl_s390_cap_flags[11][9]
bca718
+PROCINFO_CLASS const char _dl_s390_cap_flags[12][9]
bca718
 #endif
bca718
 #ifndef PROCINFO_DECL
bca718
 = {
bca718
-     "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp", "edat", "etf3eh", "highgprs", "te"
bca718
+     "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp", "edat", "etf3eh", "highgprs", "te", "vx"
bca718
   }
bca718
 #endif
bca718
 #if !defined SHARED || defined PROCINFO_DECL
bca718
diff --git a/sysdeps/s390/dl-procinfo.h b/sysdeps/s390/dl-procinfo.h
bca718
index 26de043..89766e0 100644
bca718
--- a/sysdeps/s390/dl-procinfo.h
bca718
+++ b/sysdeps/s390/dl-procinfo.h
bca718
@@ -21,7 +21,7 @@
bca718
 #define _DL_PROCINFO_H	1
bca718
 #include <ldsodefs.h>
bca718
 
bca718
-#define _DL_HWCAP_COUNT 10
bca718
+#define _DL_HWCAP_COUNT 12
bca718
 
bca718
 #define _DL_PLATFORMS_COUNT	5
bca718
 
bca718
@@ -50,6 +50,7 @@ enum
bca718
   HWCAP_S390_ETF3EH = 1 << 8,
bca718
   HWCAP_S390_HIGH_GPRS = 1 << 9,
bca718
   HWCAP_S390_TE = 1 << 10,
bca718
+  HWCAP_S390_VX = 1 << 11,
bca718
 };
bca718
 
bca718
 #define HWCAP_IMPORTANT (HWCAP_S390_ZARCH | HWCAP_S390_LDISP \
bca718
diff --git a/sysdeps/unix/sysv/linux/s390/bits/hwcap.h b/sysdeps/unix/sysv/linux/s390/bits/hwcap.h
bca718
index 59d68b0..bd2ce3a 100644
bca718
--- a/sysdeps/unix/sysv/linux/s390/bits/hwcap.h
bca718
+++ b/sysdeps/unix/sysv/linux/s390/bits/hwcap.h
bca718
@@ -35,3 +35,4 @@
bca718
 #define HWCAP_S390_ETF3EH       256
bca718
 #define HWCAP_S390_HIGH_GPRS    512
bca718
 #define HWCAP_S390_TE           1024
bca718
+#define HWCAP_S390_VX           2048
bca718
-- 
bca718
2.3.0
bca718