projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[powerpc.git]
/
arch
/
i386
/
kernel
/
alternative.c
diff --git
a/arch/i386/kernel/alternative.c
b/arch/i386/kernel/alternative.c
index
50eb0e0
..
28ab806
100644
(file)
--- 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)
}
}
}
}
+#ifdef CONFIG_SMP
+
static void alternatives_smp_save(struct alt_instr *start, struct alt_instr *end)
{
struct alt_instr *a;
static void alternatives_smp_save(struct alt_instr *start, struct alt_instr *end)
{
struct alt_instr *a;
@@
-301,6
+303,16
@@
void alternatives_smp_switch(int smp)
struct smp_alt_module *mod;
unsigned long flags;
struct smp_alt_module *mod;
unsigned long flags;
+#ifdef CONFIG_LOCKDEP
+ /*
+ * A not yet fixed binutils section handling bug prevents
+ * alternatives-replacement from working reliably, so turn
+ * it off:
+ */
+ printk("lockdep: not fixing up alternatives.\n");
+ return;
+#endif
+
if (no_replacement || smp_alt_once)
return;
BUG_ON(!smp && (num_online_cpus() > 1));
if (no_replacement || smp_alt_once)
return;
BUG_ON(!smp && (num_online_cpus() > 1));
@@
-328,6
+340,8
@@
void alternatives_smp_switch(int smp)
spin_unlock_irqrestore(&smp_alt, flags);
}
spin_unlock_irqrestore(&smp_alt, flags);
}
+#endif
+
void __init alternative_instructions(void)
{
if (no_replacement) {
void __init alternative_instructions(void)
{
if (no_replacement) {
@@
-349,6
+363,7
@@
void __init alternative_instructions(void)
smp_alt_once = 1;
#endif
smp_alt_once = 1;
#endif
+#ifdef CONFIG_SMP
if (smp_alt_once) {
if (1 == num_possible_cpus()) {
printk(KERN_INFO "SMP alternatives: switching to UP code\n");
if (smp_alt_once) {
if (1 == num_possible_cpus()) {
printk(KERN_INFO "SMP alternatives: switching to UP code\n");
@@
-370,4
+385,5
@@
void __init alternative_instructions(void)
_text, _etext);
alternatives_smp_switch(0);
}
_text, _etext);
alternatives_smp_switch(0);
}
+#endif
}
}