]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/alternatives: Remove alternative facility list
authorHeiko Carstens <hca@linux.ibm.com>
Tue, 16 Jul 2024 11:50:56 +0000 (13:50 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 23 Jul 2024 14:02:31 +0000 (16:02 +0200)
The alternative and the normal facility list are always identical. Remove
the alternative facility list, which allows to simplify the alternatives
code.

Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
Tested-by: Sven Schnelle <svens@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/alternative.h
arch/s390/include/asm/facility.h
arch/s390/kernel/alternative.c
arch/s390/kernel/early.c
arch/s390/kernel/setup.c

index 5f56a2f3aba624832918b1bc033c46ae13d80243..3ddd6dbe5635dfcb02038d8d1077376800299531 100644 (file)
 #define ALT_CTX_LATE           2
 #define ALT_CTX_ALL            (ALT_CTX_EARLY | ALT_CTX_LATE)
 
-#define ALT_TYPE_FACILITY_EARLY        0
-#define ALT_TYPE_FACILITY      1
-#define ALT_TYPE_SPEC          2
+#define ALT_TYPE_FACILITY      0
+#define ALT_TYPE_SPEC          1
 
 #define ALT_DATA_SHIFT         0
 #define ALT_TYPE_SHIFT         20
 #define ALT_CTX_SHIFT          28
 
-#define ALT_FACILITY_EARLY(facility)   (ALT_CTX_EARLY << ALT_CTX_SHIFT            | \
-                                        ALT_TYPE_FACILITY_EARLY << ALT_TYPE_SHIFT | \
+#define ALT_FACILITY_EARLY(facility)   (ALT_CTX_EARLY << ALT_CTX_SHIFT         | \
+                                        ALT_TYPE_FACILITY << ALT_TYPE_SHIFT    | \
                                         (facility) << ALT_DATA_SHIFT)
 
 #define ALT_FACILITY(facility)         (ALT_CTX_LATE << ALT_CTX_SHIFT          | \
index d46cc725f0241eb62d7cdcf866a3ff211df3c460..b7d234838a3667bd7fb15f097e0480fa3dc0c82d 100644 (file)
@@ -20,7 +20,6 @@
 #define MAX_FACILITY_BIT (sizeof(stfle_fac_list) * 8)
 
 extern u64 stfle_fac_list[16];
-extern u64 alt_stfle_fac_list[16];
 
 static inline void __set_facility(unsigned long nr, void *facilities)
 {
index 05545669552ffa8e37819f85f34fc73130218771..eae254466192298ccc74484c0e3984cf26c50990 100644 (file)
@@ -19,14 +19,9 @@ void __apply_alternatives(struct alt_instr *start, struct alt_instr *end, unsign
                if (!(a->ctx & ctx))
                        continue;
                switch (a->type) {
-               case ALT_TYPE_FACILITY_EARLY:
-                       replace = test_facility(a->data);
-                       break;
-#ifndef __DECOMPRESSOR
                case ALT_TYPE_FACILITY:
-                       replace = __test_facility(a->data, alt_stfle_fac_list);
+                       replace = test_facility(a->data);
                        break;
-#endif
                case ALT_TYPE_SPEC:
                        replace = nobp_enabled();
                        break;
index d142598e05323034b0e9b9a82fcf19250fa89459..3ce77cee272dd0575530de86f67ecf296f118375 100644 (file)
@@ -190,11 +190,6 @@ static noinline __init void setup_lowcore_early(void)
        get_lowcore()->preempt_count = INIT_PREEMPT_COUNT;
 }
 
-static noinline __init void setup_facility_list(void)
-{
-       memcpy(alt_stfle_fac_list, stfle_fac_list, sizeof(alt_stfle_fac_list));
-}
-
 static __init void detect_diag9c(void)
 {
        unsigned int cpu_address;
@@ -289,7 +284,6 @@ void __init startup_init(void)
        lockdep_off();
        sort_amode31_extable();
        setup_lowcore_early();
-       setup_facility_list();
        detect_machine_type();
        setup_arch_string();
        setup_boot_command_line();
index 178daf4e356359b2c76d845c0ad3b3790d297253..700003e1bc76eb7ee66cbe6e7ff869364f983de9 100644 (file)
@@ -155,7 +155,6 @@ unsigned int __bootdata_preserved(zlib_dfltcc_support);
 EXPORT_SYMBOL(zlib_dfltcc_support);
 u64 __bootdata_preserved(stfle_fac_list[16]);
 EXPORT_SYMBOL(stfle_fac_list);
-u64 alt_stfle_fac_list[16];
 struct oldmem_data __bootdata_preserved(oldmem_data);
 
 unsigned long VMALLOC_START;