]> Git Repo - linux.git/commitdiff
s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility
authorDavid Hildenbrand <[email protected]>
Mon, 3 May 2021 12:12:44 +0000 (14:12 +0200)
committerHeiko Carstens <[email protected]>
Tue, 4 May 2021 17:10:56 +0000 (19:10 +0200)
The PoP documents:
134: The vector packed decimal facility is installed in the
     z/Architecture architectural mode. When bit 134 is
     one, bit 129 is also one.
135: The vector enhancements facility 1 is installed in
     the z/Architecture architectural mode. When bit 135
     is one, bit 129 is also one.

Looks like we confuse the vector enhancements facility 1 ("EXT") with the
Vector packed decimal facility ("BCD"). Let's fix the facility checks.

Detected while working on QEMU/tcg z14 support and only unlocking
the vector enhancements facility 1, but not the vector packed decimal
facility.

Fixes: 2583b848cad0 ("s390: report new vector facilities")
Cc: Vasily Gorbik <[email protected]>
Signed-off-by: David Hildenbrand <[email protected]>
Reviewed-by: Christian Borntraeger <[email protected]>
Reviewed-by: Cornelia Huck <[email protected]>
Reviewed-by: Janosch Frank <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Heiko Carstens <[email protected]>
arch/s390/kernel/setup.c

index 72134f9f6ff5274c90bffe5e37ff146ac00b46e5..5aab59ad56881f61a65b0fda7f321ddad6f6a059 100644 (file)
@@ -937,9 +937,9 @@ static int __init setup_hwcaps(void)
        if (MACHINE_HAS_VX) {
                elf_hwcap |= HWCAP_S390_VXRS;
                if (test_facility(134))
-                       elf_hwcap |= HWCAP_S390_VXRS_EXT;
-               if (test_facility(135))
                        elf_hwcap |= HWCAP_S390_VXRS_BCD;
+               if (test_facility(135))
+                       elf_hwcap |= HWCAP_S390_VXRS_EXT;
                if (test_facility(148))
                        elf_hwcap |= HWCAP_S390_VXRS_EXT2;
                if (test_facility(152))
This page took 0.070353 seconds and 4 git commands to generate.