summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2019-02-05 10:15:01 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2019-04-25 09:34:10 -0400
commita8fd61688dfad6fdce95fa64cacd8a66595697b8 (patch)
tree1d6f9b50f50ec4905e5dfa0f36f8c5485335fe49
parent769f020b6c9283d61c59de3559375ec7e961a424 (diff)
s390: report new CPU capabilities
Add hardware capability bits and features tags to /proc/cpuinfo for 4 new CPU features: "Vector-Enhancements Facility 2" (tag "vxe2", hwcap 2^15) "Vector-Packed-Decimal-Enhancement Facility" (tag "vxp", hwcap 2^16) "Enhanced-Sort Facility" (tag "sort", hwcap 2^17) "Deflate-Conversion Facility" (tag "dflt", hwcap 2^18) Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/include/asm/elf.h4
-rw-r--r--arch/s390/kernel/processor.c3
-rw-r--r--arch/s390/kernel/setup.c8
3 files changed, 14 insertions, 1 deletions
diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h
index f74639a05f0f..5775fc22f410 100644
--- a/arch/s390/include/asm/elf.h
+++ b/arch/s390/include/asm/elf.h
@@ -107,6 +107,10 @@
107#define HWCAP_S390_VXRS_BCD 4096 107#define HWCAP_S390_VXRS_BCD 4096
108#define HWCAP_S390_VXRS_EXT 8192 108#define HWCAP_S390_VXRS_EXT 8192
109#define HWCAP_S390_GS 16384 109#define HWCAP_S390_GS 16384
110#define HWCAP_S390_VXRS_EXT2 32768
111#define HWCAP_S390_VXRS_PDE 65536
112#define HWCAP_S390_SORT 131072
113#define HWCAP_S390_DFLT 262144
110 114
111/* Internal bits, not exposed via elf */ 115/* Internal bits, not exposed via elf */
112#define HWCAP_INT_SIE 1UL 116#define HWCAP_INT_SIE 1UL
diff --git a/arch/s390/kernel/processor.c b/arch/s390/kernel/processor.c
index 6fe2e1875058..5de13307b703 100644
--- a/arch/s390/kernel/processor.c
+++ b/arch/s390/kernel/processor.c
@@ -109,7 +109,8 @@ static void show_cpu_summary(struct seq_file *m, void *v)
109{ 109{
110 static const char *hwcap_str[] = { 110 static const char *hwcap_str[] = {
111 "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp", 111 "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp",
112 "edat", "etf3eh", "highgprs", "te", "vx", "vxd", "vxe", "gs" 112 "edat", "etf3eh", "highgprs", "te", "vx", "vxd", "vxe", "gs",
113 "vxe2", "vxp", "sort", "dflt"
113 }; 114 };
114 static const char * const int_hwcap_str[] = { 115 static const char * const int_hwcap_str[] = {
115 "sie" 116 "sie"
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 70197a68e6fa..12d136e567c4 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -919,7 +919,15 @@ static int __init setup_hwcaps(void)
919 elf_hwcap |= HWCAP_S390_VXRS_EXT; 919 elf_hwcap |= HWCAP_S390_VXRS_EXT;
920 if (test_facility(135)) 920 if (test_facility(135))
921 elf_hwcap |= HWCAP_S390_VXRS_BCD; 921 elf_hwcap |= HWCAP_S390_VXRS_BCD;
922 if (test_facility(148))
923 elf_hwcap |= HWCAP_S390_VXRS_EXT2;
924 if (test_facility(152))
925 elf_hwcap |= HWCAP_S390_VXRS_PDE;
922 } 926 }
927 if (test_facility(150))
928 elf_hwcap |= HWCAP_S390_SORT;
929 if (test_facility(151))
930 elf_hwcap |= HWCAP_S390_DFLT;
923 931
924 /* 932 /*
925 * Guarded storage support HWCAP_S390_GS is bit 12. 933 * Guarded storage support HWCAP_S390_GS is bit 12.