Просмотр исходного кода

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>
Adrian Bunk 17 лет назад
Родитель
Сommit
7e02cb941d

+ 1 - 1
arch/x86/lib/rwlock_64.S

@@ -2,7 +2,7 @@
 
 #include <linux/linkage.h>
 #include <asm/rwlock.h>
-#include <asm/alternative-asm.i>
+#include <asm/alternative-asm.h>
 #include <asm/dwarf2.h>
 
 /* rdi:	pointer to rwlock_t */

+ 2 - 2
arch/x86/lib/semaphore_32.S

@@ -15,8 +15,8 @@
 
 #include <linux/linkage.h>
 #include <asm/rwlock.h>
-#include <asm/alternative-asm.i>
-#include <asm/frame.i>
+#include <asm/alternative-asm.h>
+#include <asm/frame.h>
 #include <asm/dwarf2.h>
 
 /*

+ 1 - 1
include/asm-um/alternative-asm.i → include/asm-um/alternative-asm.h

@@ -1,6 +1,6 @@
 #ifndef __UM_ALTERNATIVE_ASM_I
 #define __UM_ALTERNATIVE_ASM_I
 
-#include "asm/arch/alternative-asm.i"
+#include "asm/arch/alternative-asm.h"
 
 #endif

+ 1 - 1
include/asm-um/frame.i → include/asm-um/frame.h

@@ -1,6 +1,6 @@
 #ifndef __UM_FRAME_I
 #define __UM_FRAME_I
 
-#include "asm/arch/frame.i"
+#include "asm/arch/frame.h"
 
 #endif

+ 22 - 0
include/asm-x86/alternative-asm.h

@@ -0,0 +1,22 @@
+#ifdef __ASSEMBLY__
+
+#ifdef CONFIG_X86_32
+# define X86_ALIGN .long
+#else
+# define X86_ALIGN .quad
+#endif
+
+#ifdef CONFIG_SMP
+	.macro LOCK_PREFIX
+1:	lock
+	.section .smp_locks,"a"
+	.align 4
+	X86_ALIGN 1b
+	.previous
+	.endm
+#else
+	.macro LOCK_PREFIX
+	.endm
+#endif
+
+#endif  /*  __ASSEMBLY__  */

+ 0 - 5
include/asm-x86/alternative-asm.i

@@ -1,5 +0,0 @@
-#ifdef CONFIG_X86_32
-# include "alternative-asm_32.i"
-#else
-# include "alternative-asm_64.i"
-#endif

+ 0 - 12
include/asm-x86/alternative-asm_32.i

@@ -1,12 +0,0 @@
-#ifdef CONFIG_SMP
-	.macro LOCK_PREFIX
-1:	lock
-	.section .smp_locks,"a"
-	.align 4
-	.long 1b
-	.previous
-	.endm
-#else
-	.macro LOCK_PREFIX
-	.endm
-#endif

+ 0 - 12
include/asm-x86/alternative-asm_64.i

@@ -1,12 +0,0 @@
-#ifdef CONFIG_SMP
-	.macro LOCK_PREFIX
-1:	lock
-	.section .smp_locks,"a"
-	.align 8
-	.quad 1b
-	.previous
-	.endm
-#else
-	.macro LOCK_PREFIX
-	.endm
-#endif

+ 4 - 0
include/asm-x86/frame.i → include/asm-x86/frame.h

@@ -1,3 +1,5 @@
+#ifdef __ASSEMBLY__
+
 #include <asm/dwarf2.h>
 
 /* The annotation hides the frame from the unwinder and makes it look
@@ -21,3 +23,5 @@
 	.macro ENDFRAME
 	.endm
 #endif
+
+#endif  /*  __ASSEMBLY__  */