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