blob: 952bd0100c5c050289baff430ab0e4e30f56e0fc [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
Eric Dumazetceb7b402012-01-03 17:35:40 +01007672: lock
Adrian Bunk7e02cb92007-10-17 18:04:38 +02008 .section .smp_locks,"a"
Jan Beulich5967ed82010-04-21 16:08:14 +01009 .balign 4
Eric Dumazetceb7b402012-01-03 17:35:40 +010010 .long 672b - .
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__ */