[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 <[email protected]>
This commit is contained in:
Martin Schwidefsky 2010-10-25 16:10:51 +02:00 • committed by Martin Schwidefsky
commit 14375bc4eb
12 changed files with 66 additions and 74 deletions

View file

@ -154,14 +154,7 @@ static inline int ap_instructions_available(void)
*/
static int ap_interrupts_available(void)
{
unsigned long long facility_bits[2];
if (stfle(facility_bits, 2) <= 1)
return 0;
if (!(facility_bits[0] & (1ULL << 61)) ||
!(facility_bits[1] & (1ULL << 62)))
return 0;
return 1;
return test_facility(1) && test_facility(2);
}
/**