Commit 7e02cb941ddc129158c276648c10a69dca7d36d3

Authored by Adrian Bunk
Committed by Thomas Gleixner
1 parent 3f4ed1511d

x86: rename .i assembler includes to .h

.i is an ending used for preprocessed stuff.

This patch therefore renames assembler include files to .h and guards
the contents with an #ifdef __ASSEMBLY__.

[ tglx: arch/x86 adaptation ]

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Showing 12 changed files with 64 additions and 67 deletions Side-by-side Diff

arch/x86/lib/rwlock_64.S
... ... @@ -2,7 +2,7 @@
2 2  
3 3 #include <linux/linkage.h>
4 4 #include <asm/rwlock.h>
5   -#include <asm/alternative-asm.i>
  5 +#include <asm/alternative-asm.h>
6 6 #include <asm/dwarf2.h>
7 7  
8 8 /* rdi: pointer to rwlock_t */
arch/x86/lib/semaphore_32.S
... ... @@ -15,8 +15,8 @@
15 15  
16 16 #include <linux/linkage.h>
17 17 #include <asm/rwlock.h>
18   -#include <asm/alternative-asm.i>
19   -#include <asm/frame.i>
  18 +#include <asm/alternative-asm.h>
  19 +#include <asm/frame.h>
20 20 #include <asm/dwarf2.h>
21 21  
22 22 /*
include/asm-um/alternative-asm.h
  1 +#ifndef __UM_ALTERNATIVE_ASM_I
  2 +#define __UM_ALTERNATIVE_ASM_I
  3 +
  4 +#include "asm/arch/alternative-asm.h"
  5 +
  6 +#endif
include/asm-um/alternative-asm.i
1   -#ifndef __UM_ALTERNATIVE_ASM_I
2   -#define __UM_ALTERNATIVE_ASM_I
3   -
4   -#include "asm/arch/alternative-asm.i"
5   -
6   -#endif
include/asm-um/frame.h
  1 +#ifndef __UM_FRAME_I
  2 +#define __UM_FRAME_I
  3 +
  4 +#include "asm/arch/frame.h"
  5 +
  6 +#endif
include/asm-um/frame.i
1   -#ifndef __UM_FRAME_I
2   -#define __UM_FRAME_I
3   -
4   -#include "asm/arch/frame.i"
5   -
6   -#endif
include/asm-x86/alternative-asm.h
  1 +#ifdef __ASSEMBLY__
  2 +
  3 +#ifdef CONFIG_X86_32
  4 +# define X86_ALIGN .long
  5 +#else
  6 +# define X86_ALIGN .quad
  7 +#endif
  8 +
  9 +#ifdef CONFIG_SMP
  10 + .macro LOCK_PREFIX
  11 +1: lock
  12 + .section .smp_locks,"a"
  13 + .align 4
  14 + X86_ALIGN 1b
  15 + .previous
  16 + .endm
  17 +#else
  18 + .macro LOCK_PREFIX
  19 + .endm
  20 +#endif
  21 +
  22 +#endif /* __ASSEMBLY__ */
include/asm-x86/alternative-asm.i
1   -#ifdef CONFIG_X86_32
2   -# include "alternative-asm_32.i"
3   -#else
4   -# include "alternative-asm_64.i"
5   -#endif
include/asm-x86/alternative-asm_32.i
1   -#ifdef CONFIG_SMP
2   - .macro LOCK_PREFIX
3   -1: lock
4   - .section .smp_locks,"a"
5   - .align 4
6   - .long 1b
7   - .previous
8   - .endm
9   -#else
10   - .macro LOCK_PREFIX
11   - .endm
12   -#endif
include/asm-x86/alternative-asm_64.i
1   -#ifdef CONFIG_SMP
2   - .macro LOCK_PREFIX
3   -1: lock
4   - .section .smp_locks,"a"
5   - .align 8
6   - .quad 1b
7   - .previous
8   - .endm
9   -#else
10   - .macro LOCK_PREFIX
11   - .endm
12   -#endif
include/asm-x86/frame.h
  1 +#ifdef __ASSEMBLY__
  2 +
  3 +#include <asm/dwarf2.h>
  4 +
  5 +/* The annotation hides the frame from the unwinder and makes it look
  6 + like a ordinary ebp save/restore. This avoids some special cases for
  7 + frame pointer later */
  8 +#ifdef CONFIG_FRAME_POINTER
  9 + .macro FRAME
  10 + pushl %ebp
  11 + CFI_ADJUST_CFA_OFFSET 4
  12 + CFI_REL_OFFSET ebp,0
  13 + movl %esp,%ebp
  14 + .endm
  15 + .macro ENDFRAME
  16 + popl %ebp
  17 + CFI_ADJUST_CFA_OFFSET -4
  18 + CFI_RESTORE ebp
  19 + .endm
  20 +#else
  21 + .macro FRAME
  22 + .endm
  23 + .macro ENDFRAME
  24 + .endm
  25 +#endif
  26 +
  27 +#endif /* __ASSEMBLY__ */
include/asm-x86/frame.i
1   -#include <asm/dwarf2.h>
2   -
3   -/* The annotation hides the frame from the unwinder and makes it look
4   - like a ordinary ebp save/restore. This avoids some special cases for
5   - frame pointer later */
6   -#ifdef CONFIG_FRAME_POINTER
7   - .macro FRAME
8   - pushl %ebp
9   - CFI_ADJUST_CFA_OFFSET 4
10   - CFI_REL_OFFSET ebp,0
11   - movl %esp,%ebp
12   - .endm
13   - .macro ENDFRAME
14   - popl %ebp
15   - CFI_ADJUST_CFA_OFFSET -4
16   - CFI_RESTORE ebp
17   - .endm
18   -#else
19   - .macro FRAME
20   - .endm
21   - .macro ENDFRAME
22   - .endm
23   -#endif