blob: 4554cc6fb96afec6625814ba2fbd983eb0f7f00e [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
19 .align 8
Andy Lutomirski59e97e42011-07-13 09:24:10 -040020 .long \orig - .
21 .long \alt - .
Fenghua Yu9072d112011-05-17 15:29:13 -070022 .word \feature
23 .byte \orig_len
24 .byte \alt_len
25.endm
26
Adrian Bunk7e02cb92007-10-17 18:04:38 +020027#endif /* __ASSEMBLY__ */