diff options
author | Andi Kleen <ak@suse.de> | 2006-09-26 04:52:29 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2006-09-26 04:52:29 -0400 |
commit | 07c9819b31eda7954feddc83f2fae035f31c11e1 (patch) | |
tree | 7eb34bdcd74075d0e01da0daa93d5123032bc7bb | |
parent | b06babac45e1546dfb504f1f25eb0495632bfc41 (diff) |
[PATCH] i386: add alternative-asm.h to allow LOCK_PREFIX replacement in .S files
LOCK_PREFIX is replaced by nops on UP systems, so it has to be a special
macro. Previously this was only possible from C. Allow it for pure
assembly files too. Similar to earlier x86-64 patch.
Signed-off-by: Andi Kleen <ak@suse.de>
-rw-r--r-- | include/asm-i386/alternative-asm.i | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asm-i386/alternative-asm.i b/include/asm-i386/alternative-asm.i new file mode 100644 index 000000000000..6c47e3b9484b --- /dev/null +++ b/include/asm-i386/alternative-asm.i | |||
@@ -0,0 +1,14 @@ | |||
1 | #include <linux/config.h> | ||
2 | |||
3 | #ifdef CONFIG_SMP | ||
4 | .macro LOCK_PREFIX | ||
5 | 1: lock | ||
6 | .section .smp_locks,"a" | ||
7 | .align 4 | ||
8 | .long 1b | ||
9 | .previous | ||
10 | .endm | ||
11 | #else | ||
12 | .macro LOCK_PREFIX | ||
13 | .endm | ||
14 | #endif | ||