summaryrefslogtreecommitdiff
path: root/arch/i386/kernel/alternative.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-07-03 00:24:57 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-03 15:27:04 -0700
commit3047e99ede366298c6233d1870d12a520d4d92f3 (patch)
tree7e7626f2019c6b0564d7b20b039dc836cc29910d /arch/i386/kernel/alternative.c
parent2148270cd2ebe0d05e4289b7c77b1435c45481bf (diff)
[PATCH] lockdep: x86 smp alternatives workaround
Disable SMP alternatives fixups (the patching in of NOPs on 1-CPU systems) if the lock validator is enabled: there is a binutils section handling bug that causes corrupted instructions when UP instructions are patched in. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/kernel/alternative.c')
-rw-r--r--arch/i386/kernel/alternative.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/i386/kernel/alternative.c b/arch/i386/kernel/alternative.c
index 7b421b3a053e..28ab80649764 100644
--- a/arch/i386/kernel/alternative.c
+++ b/arch/i386/kernel/alternative.c
@@ -303,6 +303,16 @@ void alternatives_smp_switch(int smp)
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));