Skip to content

Commit 814cb6d

Browse files
David Hildenbrandgregkh
authored andcommitted
s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility
commit b208108 upstream. 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: 2583b84 ("s390: report new vector facilities") Cc: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: David Hildenbrand <david@redhat.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Link: https://lore.kernel.org/r/20210503121244.25232-1-david@redhat.com Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent be4ed1a commit 814cb6d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎arch/s390/kernel/setup.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -925,9 +925,9 @@ static int __init setup_hwcaps(void)
925925
if (MACHINE_HAS_VX) {
926926
elf_hwcap |= HWCAP_S390_VXRS;
927927
if (test_facility(134))
928-
elf_hwcap |= HWCAP_S390_VXRS_EXT;
929-
if (test_facility(135))
930928
elf_hwcap |= HWCAP_S390_VXRS_BCD;
929+
if (test_facility(135))
930+
elf_hwcap |= HWCAP_S390_VXRS_EXT;
931931
if (test_facility(148))
932932
elf_hwcap |= HWCAP_S390_VXRS_EXT2;
933933
if (test_facility(152))

0 commit comments

Comments
 (0)