]> git.dujemihanovic.xyz Git - linux.git/commitdiff
s390: report more CPU capabilities
authorHeiko Carstens <hca@linux.ibm.com>
Wed, 13 Jan 2021 13:14:01 +0000 (14:14 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 27 Jul 2021 07:39:19 +0000 (09:39 +0200)
Add hardware capability bits and feature tags to /proc/cpuinfo
for NNPA and Vector-Packed-Decimal-Enhancement Facility 2.

Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/include/asm/elf.h
arch/s390/kernel/processor.c
arch/s390/kernel/setup.c

index bd00c94620d3cd4b5fbead036fbbe4fb6982d221..6e55e4a2d6bd5225ea093f240a30e71050b47397 100644 (file)
 #define HWCAP_S390_VXRS_PDE    65536
 #define HWCAP_S390_SORT                131072
 #define HWCAP_S390_DFLT                262144
+#define HWCAP_S390_VXRS_PDE2   524288
+#define HWCAP_S390_NNPA                1048576
 
 /* Internal bits, not exposed via elf */
 #define HWCAP_INT_SIE          1UL
index 82df39b17bb559e42a0a7ac7271585e4b7c80ce5..9cd63efce1c1f882dfeccbecd4209fb0cb04ab48 100644 (file)
@@ -115,7 +115,7 @@ 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",
-               "vxe2", "vxp", "sort", "dflt"
+               "vxe2", "vxp", "sort", "dflt", "vxp2", "nnpa"
        };
        static const char * const int_hwcap_str[] = {
                "sie"
index c5bbf968669e08ffd9e65ee77e3bc798a69844cb..32ce8d40b2fb7e4022aa2bdc0eab4e3ca9f19623 100644 (file)
@@ -949,11 +949,15 @@ static int __init setup_hwcaps(void)
                        elf_hwcap |= HWCAP_S390_VXRS_EXT2;
                if (test_facility(152))
                        elf_hwcap |= HWCAP_S390_VXRS_PDE;
+               if (test_facility(192))
+                       elf_hwcap |= HWCAP_S390_VXRS_PDE2;
        }
        if (test_facility(150))
                elf_hwcap |= HWCAP_S390_SORT;
        if (test_facility(151))
                elf_hwcap |= HWCAP_S390_DFLT;
+       if (test_facility(165))
+               elf_hwcap |= HWCAP_S390_NNPA;
 
        /*
         * Guarded storage support HWCAP_S390_GS is bit 12.