diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-07-03 03:24:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-03 18:27:04 -0400 |
commit | 3047e99ede366298c6233d1870d12a520d4d92f3 (patch) | |
tree | 7e7626f2019c6b0564d7b20b039dc836cc29910d /arch | |
parent | 2148270cd2ebe0d05e4289b7c77b1435c45481bf (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')
-rw-r--r-- | arch/i386/kernel/alternative.c | 10 |
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) | |||
303 | struct smp_alt_module *mod; | 303 | struct smp_alt_module *mod; |
304 | unsigned long flags; | 304 | unsigned long flags; |
305 | 305 | ||
306 | #ifdef CONFIG_LOCKDEP | ||
307 | /* | ||
308 | * A not yet fixed binutils section handling bug prevents | ||
309 | * alternatives-replacement from working reliably, so turn | ||
310 | * it off: | ||
311 | */ | ||
312 | printk("lockdep: not fixing up alternatives.\n"); | ||
313 | return; | ||
314 | #endif | ||
315 | |||
306 | if (no_replacement || smp_alt_once) | 316 | if (no_replacement || smp_alt_once) |
307 | return; | 317 | return; |
308 | BUG_ON(!smp && (num_online_cpus() > 1)); | 318 | BUG_ON(!smp && (num_online_cpus() > 1)); |