diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/kernel/alternative.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/arch/i386/kernel/alternative.c b/arch/i386/kernel/alternative.c index 9eca21b49f6b..426f59b0106b 100644 --- a/arch/i386/kernel/alternative.c +++ b/arch/i386/kernel/alternative.c | |||
@@ -5,15 +5,9 @@ | |||
5 | #include <asm/alternative.h> | 5 | #include <asm/alternative.h> |
6 | #include <asm/sections.h> | 6 | #include <asm/sections.h> |
7 | 7 | ||
8 | static int no_replacement = 0; | ||
9 | static int smp_alt_once = 0; | 8 | static int smp_alt_once = 0; |
10 | static int debug_alternative = 0; | 9 | static int debug_alternative = 0; |
11 | 10 | ||
12 | static int __init noreplacement_setup(char *s) | ||
13 | { | ||
14 | no_replacement = 1; | ||
15 | return 1; | ||
16 | } | ||
17 | static int __init bootonly(char *str) | 11 | static int __init bootonly(char *str) |
18 | { | 12 | { |
19 | smp_alt_once = 1; | 13 | smp_alt_once = 1; |
@@ -25,7 +19,6 @@ static int __init debug_alt(char *str) | |||
25 | return 1; | 19 | return 1; |
26 | } | 20 | } |
27 | 21 | ||
28 | __setup("noreplacement", noreplacement_setup); | ||
29 | __setup("smp-alt-boot", bootonly); | 22 | __setup("smp-alt-boot", bootonly); |
30 | __setup("debug-alternative", debug_alt); | 23 | __setup("debug-alternative", debug_alt); |
31 | 24 | ||
@@ -252,9 +245,6 @@ void alternatives_smp_module_add(struct module *mod, char *name, | |||
252 | struct smp_alt_module *smp; | 245 | struct smp_alt_module *smp; |
253 | unsigned long flags; | 246 | unsigned long flags; |
254 | 247 | ||
255 | if (no_replacement) | ||
256 | return; | ||
257 | |||
258 | if (smp_alt_once) { | 248 | if (smp_alt_once) { |
259 | if (boot_cpu_has(X86_FEATURE_UP)) | 249 | if (boot_cpu_has(X86_FEATURE_UP)) |
260 | alternatives_smp_unlock(locks, locks_end, | 250 | alternatives_smp_unlock(locks, locks_end, |
@@ -289,7 +279,7 @@ void alternatives_smp_module_del(struct module *mod) | |||
289 | struct smp_alt_module *item; | 279 | struct smp_alt_module *item; |
290 | unsigned long flags; | 280 | unsigned long flags; |
291 | 281 | ||
292 | if (no_replacement || smp_alt_once) | 282 | if (smp_alt_once) |
293 | return; | 283 | return; |
294 | 284 | ||
295 | spin_lock_irqsave(&smp_alt, flags); | 285 | spin_lock_irqsave(&smp_alt, flags); |
@@ -320,7 +310,7 @@ void alternatives_smp_switch(int smp) | |||
320 | return; | 310 | return; |
321 | #endif | 311 | #endif |
322 | 312 | ||
323 | if (no_replacement || smp_alt_once) | 313 | if (smp_alt_once) |
324 | return; | 314 | return; |
325 | BUG_ON(!smp && (num_online_cpus() > 1)); | 315 | BUG_ON(!smp && (num_online_cpus() > 1)); |
326 | 316 | ||
@@ -386,13 +376,6 @@ extern struct paravirt_patch __start_parainstructions[], | |||
386 | void __init alternative_instructions(void) | 376 | void __init alternative_instructions(void) |
387 | { | 377 | { |
388 | unsigned long flags; | 378 | unsigned long flags; |
389 | if (no_replacement) { | ||
390 | printk(KERN_INFO "(SMP-)alternatives turned off\n"); | ||
391 | free_init_pages("SMP alternatives", | ||
392 | (unsigned long)__smp_alt_begin, | ||
393 | (unsigned long)__smp_alt_end); | ||
394 | return; | ||
395 | } | ||
396 | 379 | ||
397 | local_irq_save(flags); | 380 | local_irq_save(flags); |
398 | apply_alternatives(__alt_instructions, __alt_instructions_end); | 381 | apply_alternatives(__alt_instructions, __alt_instructions_end); |