aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/kernel/alternative.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/i386/kernel/alternative.c b/arch/i386/kernel/alternative.c
index 50eb0e03777e..7b421b3a053e 100644
--- a/arch/i386/kernel/alternative.c
+++ b/arch/i386/kernel/alternative.c
@@ -168,6 +168,8 @@ void apply_alternatives(struct alt_instr *start, struct alt_instr *end)
168 } 168 }
169} 169}
170 170
171#ifdef CONFIG_SMP
172
171static void alternatives_smp_save(struct alt_instr *start, struct alt_instr *end) 173static void alternatives_smp_save(struct alt_instr *start, struct alt_instr *end)
172{ 174{
173 struct alt_instr *a; 175 struct alt_instr *a;
@@ -328,6 +330,8 @@ void alternatives_smp_switch(int smp)
328 spin_unlock_irqrestore(&smp_alt, flags); 330 spin_unlock_irqrestore(&smp_alt, flags);
329} 331}
330 332
333#endif
334
331void __init alternative_instructions(void) 335void __init alternative_instructions(void)
332{ 336{
333 if (no_replacement) { 337 if (no_replacement) {
@@ -349,6 +353,7 @@ void __init alternative_instructions(void)
349 smp_alt_once = 1; 353 smp_alt_once = 1;
350#endif 354#endif
351 355
356#ifdef CONFIG_SMP
352 if (smp_alt_once) { 357 if (smp_alt_once) {
353 if (1 == num_possible_cpus()) { 358 if (1 == num_possible_cpus()) {
354 printk(KERN_INFO "SMP alternatives: switching to UP code\n"); 359 printk(KERN_INFO "SMP alternatives: switching to UP code\n");
@@ -370,4 +375,5 @@ void __init alternative_instructions(void)
370 _text, _etext); 375 _text, _etext);
371 alternatives_smp_switch(0); 376 alternatives_smp_switch(0);
372 } 377 }
378#endif
373} 379}