s390: remove test_facility(2) (== z/Architecture mode active) checks
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Sat, 14 Feb 2015 10:23:21 +0000 (11:23 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 25 Mar 2015 10:49:37 +0000 (11:49 +0100)
Given that the kernel now always runs in 64 bit mode, it is
pointless to check if the z/Architecture mode is active.
Remove the checks.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/crypto/crypt_s390.h
arch/s390/pci/pci.c
drivers/s390/crypto/ap_bus.c

index 6c5cc6da71114e51e8430d2eaf5a32be6a676127..ba3b2aefddf55fa6dfa5a75f947273e0196a65e0 100644 (file)
@@ -369,14 +369,10 @@ static inline int crypt_s390_func_available(int func,
 
        if (facility_mask & CRYPT_S390_MSA && !test_facility(17))
                return 0;
-
-       if (facility_mask & CRYPT_S390_MSA3 &&
-           (!test_facility(2) || !test_facility(76)))
+       if (facility_mask & CRYPT_S390_MSA3 && !test_facility(76))
                return 0;
-       if (facility_mask & CRYPT_S390_MSA4 &&
-           (!test_facility(2) || !test_facility(77)))
+       if (facility_mask & CRYPT_S390_MSA4 && !test_facility(77))
                return 0;
-
        switch (func & CRYPT_S390_OP_MASK) {
        case CRYPT_S390_KM:
                ret = crypt_s390_km(KM_QUERY, &status, NULL, NULL, 0);
index f0b85443e06093d2f5d3d4c5dbe85554e459c138..c74c9ee3554aaaf8648707ce23ddbac4e888b227 100644 (file)
@@ -913,8 +913,7 @@ static int __init pci_base_init(void)
        if (!s390_pci_probe)
                return 0;
 
-       if (!test_facility(2) || !test_facility(69)
-           || !test_facility(71) || !test_facility(72))
+       if (!test_facility(69) || !test_facility(71) || !test_facility(72))
                return 0;
 
        rc = zpci_debug_init();
index 33890c9850de59deb02929a6c750cb030e1495d1..f0b9871a4bbd3ff209d77e56f28818fdbcce25e6 100644 (file)
@@ -165,7 +165,7 @@ static inline int ap_instructions_available(void)
  */
 static int ap_interrupts_available(void)
 {
-       return test_facility(2) && test_facility(65);
+       return test_facility(65);
 }
 
 /**
@@ -176,7 +176,7 @@ static int ap_interrupts_available(void)
  */
 static int ap_configuration_available(void)
 {
-       return test_facility(2) && test_facility(12);
+       return test_facility(12);
 }
 
 /**