Skip to content

Commit b208108

Browse files
davidhildenbrandhcahca
authored andcommitted
s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility
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 <[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]>
1 parent bae1cd3 commit b208108

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/s390/kernel/setup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -937,9 +937,9 @@ static int __init setup_hwcaps(void)
937937
if (MACHINE_HAS_VX) {
938938
elf_hwcap |= HWCAP_S390_VXRS;
939939
if (test_facility(134))
940-
elf_hwcap |= HWCAP_S390_VXRS_EXT;
941-
if (test_facility(135))
942940
elf_hwcap |= HWCAP_S390_VXRS_BCD;
941+
if (test_facility(135))
942+
elf_hwcap |= HWCAP_S390_VXRS_EXT;
943943
if (test_facility(148))
944944
elf_hwcap |= HWCAP_S390_VXRS_EXT2;
945945
if (test_facility(152))

0 commit comments

Comments
 (0)