Patchwork [V3,1/3] sparc: support the ADP hw capability.

login
register
mail settings
Submitter Jose E. Marchesi
Date March 21, 2016, 6:17 p.m.
Message ID <1458584233-15225-2-git-send-email-jose.marchesi@oracle.com>
Download mbox | patch
Permalink /patch/11451/
State New
Headers show

Comments

Jose E. Marchesi - March 21, 2016, 6:17 p.m.
This patch adds support for the ADP (also known as adi) hardware
capability, as reported by the kernel sparc port when running on M7
machines.

Tested in both sparcv9-*-* and sparc64-*-* targets.
---
 ChangeLog                   | 7 +++++++
 sysdeps/sparc/bits/hwcap.h  | 1 +
 sysdeps/sparc/dl-procinfo.c | 4 ++--
 sysdeps/sparc/dl-procinfo.h | 2 +-
 4 files changed, 11 insertions(+), 3 deletions(-)

Patch

diff --git a/ChangeLog b/ChangeLog
index ffaf973..dfd460f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@ 
+2016-03-21  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+	* sysdeps/sparc/bits/hwcap.h (HWCAP_SPARC_ADP): Defined.
+	* sysdeps/sparc/dl-procinfo.c: Added "adp" to the
+	_dl_sparc_cap_flags array.
+	* sysdeps/sparc/dl-procinfo.h (_DL_HWCAP_COUNT): Increment.
+
 2016-03-21  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
 	* sysdeps/unix/sysv/linux/spawni.c (__spawnix): Fix implict checks
diff --git a/sysdeps/sparc/bits/hwcap.h b/sysdeps/sparc/bits/hwcap.h
index edd71ec..27f52d7 100644
--- a/sysdeps/sparc/bits/hwcap.h
+++ b/sysdeps/sparc/bits/hwcap.h
@@ -48,3 +48,4 @@ 
 #define HWCAP_SPARC_PAUSE	0x01000000
 #define HWCAP_SPARC_CBCOND	0x02000000
 #define HWCAP_SPARC_CRYPTO	0x04000000
+#define HWCAP_SPARC_ADP		0x08000000
diff --git a/sysdeps/sparc/dl-procinfo.c b/sysdeps/sparc/dl-procinfo.c
index 7151fd5..650af94 100644
--- a/sysdeps/sparc/dl-procinfo.c
+++ b/sysdeps/sparc/dl-procinfo.c
@@ -46,13 +46,13 @@ 
 #if !defined PROCINFO_DECL && defined SHARED
   ._dl_sparc_cap_flags
 #else
-PROCINFO_CLASS const char _dl_sparc_cap_flags[27][11]
+PROCINFO_CLASS const char _dl_sparc_cap_flags[28][11]
 #endif
 #ifndef PROCINFO_DECL
   = { "flush", "stbar", "swap", "muldiv", "v9", "ultra3", "v9v", "v9v2",
       "mul32", "div32", "fsmuld", "v8plus", "popc", "vis", "vis2",
       "ASIBlkInit", "fmaf", "vis3", "hpc", "random", "trans", "fjfmau",
-      "ima", "cspare", "pause", "cbcond", "crypto" }
+      "ima", "cspare", "pause", "cbcond", "crypto", "adp" }
 #endif
 #if !defined SHARED || defined PROCINFO_DECL
 ;
diff --git a/sysdeps/sparc/dl-procinfo.h b/sysdeps/sparc/dl-procinfo.h
index e187541..910e353 100644
--- a/sysdeps/sparc/dl-procinfo.h
+++ b/sysdeps/sparc/dl-procinfo.h
@@ -23,7 +23,7 @@ 
 #include <ldsodefs.h>
 #include <sysdep.h>
 
-#define _DL_HWCAP_COUNT 27
+#define _DL_HWCAP_COUNT 28
 
 static inline int
 __attribute__ ((unused))