From: Andi Kleen Date: Tue, 26 Sep 2006 08:52:29 +0000 (+0200) Subject: [PATCH] i386: add alternative-asm.h to allow LOCK_PREFIX replacement in .S files X-Git-Tag: v2.6.19-rc1~1077^2~185 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=07c9819b31eda7954feddc83f2fae035f31c11e1;p=linux-2.6-omap-h63xx.git [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 --- diff --git a/include/asm-i386/alternative-asm.i b/include/asm-i386/alternative-asm.i new file mode 100644 index 00000000000..6c47e3b9484 --- /dev/null +++ b/include/asm-i386/alternative-asm.i @@ -0,0 +1,14 @@ +#include + +#ifdef CONFIG_SMP + .macro LOCK_PREFIX +1: lock + .section .smp_locks,"a" + .align 4 + .long 1b + .previous + .endm +#else + .macro LOCK_PREFIX + .endm +#endif