Skip to content

Commit a8fd616

Browse files
author
Martin Schwidefsky
committed
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>
1 parent 769f020 commit a8fd616

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

‎arch/s390/include/asm/elf.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@
107107
#define HWCAP_S390_VXRS_BCD 4096
108108
#define HWCAP_S390_VXRS_EXT 8192
109109
#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
110114

111115
/* Internal bits, not exposed via elf */
112116
#define HWCAP_INT_SIE 1UL

‎arch/s390/kernel/processor.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ static void show_cpu_summary(struct seq_file *m, void *v)
109109
{
110110
static const char *hwcap_str[] = {
111111
"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"
113114
};
114115
static const char * const int_hwcap_str[] = {
115116
"sie"

‎arch/s390/kernel/setup.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,15 @@ static int __init setup_hwcaps(void)
919919
elf_hwcap |= HWCAP_S390_VXRS_EXT;
920920
if (test_facility(135))
921921
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;
922926
}
927+
if (test_facility(150))
928+
elf_hwcap |= HWCAP_S390_SORT;
929+
if (test_facility(151))
930+
elf_hwcap |= HWCAP_S390_DFLT;
923931

924932
/*
925933
* Guarded storage support HWCAP_S390_GS is bit 12.

0 commit comments

Comments
 (0)