]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
s390/als: remove duplicated in-place implementation of stfle
authorVasily Gorbik <gor@linux.ibm.com>
Wed, 27 Feb 2019 15:26:22 +0000 (16:26 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 1 Mar 2019 07:00:37 +0000 (08:00 +0100)
Reuse __stfle call instead of in-place implementation. __stfle is using
memcpy and memset functions but they are safe to use, since mem.S is
built with -march=z900.

Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/boot/als.c

index d592e0d90d9fbbae85e41719674467e725b54f67..322e386bd9d012fdf5e0e31c385d8558b8058b61 100644 (file)
@@ -105,20 +105,7 @@ void verify_facilities(void)
 {
        int i;
 
-       for (i = 0; i < ARRAY_SIZE(S390_lowcore.stfle_fac_list); i++)
-               S390_lowcore.stfle_fac_list[i] = 0;
-       asm volatile(
-               "       stfl    0(0)\n"
-               : "=m" (S390_lowcore.stfl_fac_list));
-       S390_lowcore.stfle_fac_list[0] = (u64)S390_lowcore.stfl_fac_list << 32;
-       if (S390_lowcore.stfl_fac_list & 0x01000000) {
-               register unsigned long reg0 asm("0") = ARRAY_SIZE(als) - 1;
-
-               asm volatile(".insn s,0xb2b00000,0(%1)" /* stfle */
-                            : "+d" (reg0)
-                            : "a" (&S390_lowcore.stfle_fac_list)
-                            : "memory", "cc");
-       }
+       __stfle(S390_lowcore.stfle_fac_list, ARRAY_SIZE(S390_lowcore.stfle_fac_list));
        for (i = 0; i < ARRAY_SIZE(als); i++) {
                if ((S390_lowcore.stfle_fac_list[i] & als[i]) != als[i])
                        facility_mismatch();