diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2019-02-27 10:26:22 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2019-03-01 02:00:37 -0500 |
commit | 96d3b64b527f6dc8799ebf00a95e931554311daf (patch) | |
tree | 2aa03d22d9948add30b63b31cc50490d2e2fceb6 | |
parent | 7b660c225fa021b254be69aafb5787e79ec58af0 (diff) |
s390/als: remove duplicated in-place implementation of stfle
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>
-rw-r--r-- | arch/s390/boot/als.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/arch/s390/boot/als.c b/arch/s390/boot/als.c index d592e0d90d9f..322e386bd9d0 100644 --- a/arch/s390/boot/als.c +++ b/arch/s390/boot/als.c | |||
@@ -105,20 +105,7 @@ void verify_facilities(void) | |||
105 | { | 105 | { |
106 | int i; | 106 | int i; |
107 | 107 | ||
108 | for (i = 0; i < ARRAY_SIZE(S390_lowcore.stfle_fac_list); i++) | 108 | __stfle(S390_lowcore.stfle_fac_list, ARRAY_SIZE(S390_lowcore.stfle_fac_list)); |
109 | S390_lowcore.stfle_fac_list[i] = 0; | ||
110 | asm volatile( | ||
111 | " stfl 0(0)\n" | ||
112 | : "=m" (S390_lowcore.stfl_fac_list)); | ||
113 | S390_lowcore.stfle_fac_list[0] = (u64)S390_lowcore.stfl_fac_list << 32; | ||
114 | if (S390_lowcore.stfl_fac_list & 0x01000000) { | ||
115 | register unsigned long reg0 asm("0") = ARRAY_SIZE(als) - 1; | ||
116 | |||
117 | asm volatile(".insn s,0xb2b00000,0(%1)" /* stfle */ | ||
118 | : "+d" (reg0) | ||
119 | : "a" (&S390_lowcore.stfle_fac_list) | ||
120 | : "memory", "cc"); | ||
121 | } | ||
122 | for (i = 0; i < ARRAY_SIZE(als); i++) { | 109 | for (i = 0; i < ARRAY_SIZE(als); i++) { |
123 | if ((S390_lowcore.stfle_fac_list[i] & als[i]) != als[i]) | 110 | if ((S390_lowcore.stfle_fac_list[i] & als[i]) != als[i]) |
124 | facility_mismatch(); | 111 | facility_mismatch(); |