]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
s390: report new CPU capabilities
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 22 Jul 2019 18:24:33 +0000 (20:24 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
BugLink: https://bugs.launchpad.net/bugs/1836857
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>
(cherry picked from commit a8fd61688dfad6fdce95fa64cacd8a66595697b8)
Signed-off-by: Frank Heimes <frank.heimes@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/s390/include/asm/elf.h
arch/s390/kernel/processor.c
arch/s390/kernel/setup.c

index 3055c030f76579ff5fd45ffc5cb17d483b5f2e0e..92e73001de6b1e9c596cf47e8a1e64aef24525ca 100644 (file)
 #define HWCAP_S390_VXRS_BCD    4096
 #define HWCAP_S390_VXRS_EXT    8192
 #define HWCAP_S390_GS          16384
+#define HWCAP_S390_VXRS_EXT2   32768
+#define HWCAP_S390_VXRS_PDE    65536
+#define HWCAP_S390_SORT                131072
+#define HWCAP_S390_DFLT                262144
 
 /* Internal bits, not exposed via elf */
 #define HWCAP_INT_SIE          1UL
index 6fe2e1875058bec89419d680bef0110249ba9ed3..5de13307b7038a591561173594060fc9ea3bede0 100644 (file)
@@ -109,7 +109,8 @@ static void show_cpu_summary(struct seq_file *m, void *v)
 {
        static const char *hwcap_str[] = {
                "esan3", "zarch", "stfle", "msa", "ldisp", "eimm", "dfp",
-               "edat", "etf3eh", "highgprs", "te", "vx", "vxd", "vxe", "gs"
+               "edat", "etf3eh", "highgprs", "te", "vx", "vxd", "vxe", "gs",
+               "vxe2", "vxp", "sort", "dflt"
        };
        static const char * const int_hwcap_str[] = {
                "sie"
index 6f04df623e18c8924fe4070fa9a27d85a44a28cd..077d160d64d280848a6e8c2de9399529fb83189c 100644 (file)
@@ -785,7 +785,15 @@ static int __init setup_hwcaps(void)
                        elf_hwcap |= HWCAP_S390_VXRS_EXT;
                if (test_facility(135))
                        elf_hwcap |= HWCAP_S390_VXRS_BCD;
+               if (test_facility(148))
+                       elf_hwcap |= HWCAP_S390_VXRS_EXT2;
+               if (test_facility(152))
+                       elf_hwcap |= HWCAP_S390_VXRS_PDE;
        }
+       if (test_facility(150))
+               elf_hwcap |= HWCAP_S390_SORT;
+       if (test_facility(151))
+               elf_hwcap |= HWCAP_S390_DFLT;
 
        /*
         * Guarded storage support HWCAP_S390_GS is bit 12.