blob: 091508b533b46810603bb3dfa86a207d24e1e9c0 [file] [log] [blame]
Adrian Bunk7e02cb92007-10-17 18:04:38 +02001#ifdef __ASSEMBLY__
2
Jan Beulich99063c02009-11-27 15:06:16 +00003#include <asm/asm.h>
Adrian Bunk7e02cb92007-10-17 18:04:38 +02004
5#ifdef CONFIG_SMP
6 .macro LOCK_PREFIX
71: lock
8 .section .smp_locks,"a"
Jan Beulich5967ed82010-04-21 16:08:14 +01009 .balign 4
10 .long 1b - .
Adrian Bunk7e02cb92007-10-17 18:04:38 +020011 .previous
12 .endm
13#else
14 .macro LOCK_PREFIX
15 .endm
16#endif
17
Fenghua Yu9072d112011-05-17 15:29:13 -070018.macro altinstruction_entry orig alt feature orig_len alt_len
Andy Lutomirski59e97e42011-07-13 09:24:10 -040019 .long \orig - .
20 .long \alt - .
Fenghua Yu9072d112011-05-17 15:29:13 -070021 .word \feature
22 .byte \orig_len
23 .byte \alt_len
24.endm
25
Adrian Bunk7e02cb92007-10-17 18:04:38 +020026#endif /* __ASSEMBLY__ */