diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2010-10-25 10:10:51 -0400 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-10-25 10:10:21 -0400 |
commit | 14375bc4eb8dd0fb0e765390650564c35bb31068 (patch) | |
tree | 27200620658245c582ee9497fc969a082b304cab /drivers/s390 | |
parent | eca577ef5989d25dedc6b0fae3c4622ceaee8005 (diff) |
[S390] cleanup facility list handling
Store the facility list once at system startup with stfl/stfle and
reuse the result for all facility tests.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/crypto/ap_bus.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c index 91c6028d7b74..8fd8c62455e9 100644 --- a/drivers/s390/crypto/ap_bus.c +++ b/drivers/s390/crypto/ap_bus.c | |||
@@ -154,14 +154,7 @@ static inline int ap_instructions_available(void) | |||
154 | */ | 154 | */ |
155 | static int ap_interrupts_available(void) | 155 | static int ap_interrupts_available(void) |
156 | { | 156 | { |
157 | unsigned long long facility_bits[2]; | 157 | return test_facility(1) && test_facility(2); |
158 | |||
159 | if (stfle(facility_bits, 2) <= 1) | ||
160 | return 0; | ||
161 | if (!(facility_bits[0] & (1ULL << 61)) || | ||
162 | !(facility_bits[1] & (1ULL << 62))) | ||
163 | return 0; | ||
164 | return 1; | ||
165 | } | 158 | } |
166 | 159 | ||
167 | /** | 160 | /** |