]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/alternatives: Remove noaltinstr option
authorSven Schnelle <svens@linux.ibm.com>
Tue, 16 Jul 2024 11:50:48 +0000 (13:50 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Tue, 23 Jul 2024 14:02:31 +0000 (16:02 +0200)
The current Kernel doesn't boot without alternative patching on
z16 machines. To avoid such bugs in the future, remove the option
disable alternative patching.

Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Documentation/admin-guide/kernel-parameters.txt
arch/s390/kernel/alternative.c

index c1134ad5f06d13f0b3e68e63cb6331fc893cd7fe..f1384c7b59c9282fc6fb40569a92f6c13861bbb9 100644 (file)
 
        noalign         [KNL,ARM]
 
-       noaltinstr      [S390,EARLY] Disables alternative instructions
-                       patching (CPU alternatives feature).
-
        noapic          [SMP,APIC,EARLY] Tells the kernel to not make use of any
                        IOAPICs that may be present in the system.
 
index 1ac5f707dd70500e568354631e1193b259721828..7971bc1bf49638607d60e8e447bdb39c93d73966 100644 (file)
@@ -7,18 +7,8 @@
 #include <asm/facility.h>
 #include <asm/nospec-branch.h>
 
-static int __initdata_or_module alt_instr_disabled;
-
-static int __init disable_alternative_instructions(char *str)
-{
-       alt_instr_disabled = 1;
-       return 0;
-}
-
-early_param("noaltinstr", disable_alternative_instructions);
-
-static void __init_or_module __apply_alternatives(struct alt_instr *start,
-                                                 struct alt_instr *end)
+void __init_or_module apply_alternatives(struct alt_instr *start,
+                                        struct alt_instr *end)
 {
        struct alt_instr *a;
        u8 *instr, *replacement;
@@ -37,13 +27,6 @@ static void __init_or_module __apply_alternatives(struct alt_instr *start,
        }
 }
 
-void __init_or_module apply_alternatives(struct alt_instr *start,
-                                        struct alt_instr *end)
-{
-       if (!alt_instr_disabled)
-               __apply_alternatives(start, end);
-}
-
 extern struct alt_instr __alt_instructions[], __alt_instructions_end[];
 void __init apply_alternative_instructions(void)
 {