Skip to contentSkip to conversation

x86: shrink __ALIGN and __ALIGN_STR definitions

PATCH In review Cyrill Gorcunov 1 participant 2 messages Mar 9, 2009 – Mar 11, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: shrink __ALIGN and __ALIGN_STR definitions

Impact: cleanup

1) .p2align 4 and .align 16 are the same meaning (until a.out format for i386 is used which is not our case for CONFIG_X86_ALIGNMENT_16 anyway)
2) having 15 as max allowed bytes to be skipped does not make sense on modulo 16

---

Check it please

 arch/x86/include/asm/linkage.h |   11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
arch/x86/include/asm/linkage.h +3 -8
Index: linux-2.6.git/arch/x86/include/asm/linkage.h
===================================================================
@@ -53,14 +53,9 @@
 	.globl name;	\
 	name:
 
-#ifdef CONFIG_X86_64
-#define __ALIGN .p2align 4,,15
-#define __ALIGN_STR ".p2align 4,,15"
-#endif
-
-#ifdef CONFIG_X86_ALIGNMENT_16
-#define __ALIGN .align 16,0x90
-#define __ALIGN_STR ".align 16,0x90"
+#if defined(CONFIG_X86_64) || defined(CONFIG_X86_ALIGNMENT_16)
+#define __ALIGN .p2align 4,0x90
+#define __ALIGN_STR ".p2align 4,0x90"
 #endif
 
 #endif /* __ASSEMBLY__ */
#1 lore raw
Commit-ID:  bb7f5f6c26d0a304fb3af92591a1dddd39b6ac61
Gitweb:     http://git.kernel.org/tip/bb7f5f6c26d0a304fb3af92591a1dddd39b6ac61
Author:     "Cyrill Gorcunov" <[email protected]>
AuthorDate: Mon, 9 Mar 2009 20:19:51 +0300
Commit:     Ingo Molnar <[email protected]>
CommitDate: Wed, 11 Mar 2009 12:39:28 +0100

x86: shrink __ALIGN and __ALIGN_STR definitions

Impact: cleanup

1) .p2align 4 and .align 16 are the same meaning (until a.out format for i386 is used which is not our case for CONFIG_X86_ALIGNMENT_16 anyway)

2) having 15 as max allowed bytes to be skipped
does not make sense on modulo 16

LKML-Reference: <20090309171951.GE9945@localhost>

[ small cleanup, use __stringify(), etc. ]
---
 arch/x86/include/asm/linkage.h |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)
arch/x86/include/asm/linkage.h +5 -8
index a0d70b4..12d55e7 100644
@@ -1,6 +1,8 @@
 #ifndef _ASM_X86_LINKAGE_H
 #define _ASM_X86_LINKAGE_H
 
+#include <linux/stringify.h>
+
 #undef notrace
 #define notrace __attribute__((no_instrument_function))
 
@@ -53,14 +55,9 @@
 	.globl name;	\
 	name:
 
-#ifdef CONFIG_X86_64
-#define __ALIGN .p2align 4,,15
-#define __ALIGN_STR ".p2align 4,,15"
-#endif
-
-#ifdef CONFIG_X86_ALIGNMENT_16
-#define __ALIGN .align 16,0x90
-#define __ALIGN_STR ".align 16,0x90"
+#if defined(CONFIG_X86_64) || defined(CONFIG_X86_ALIGNMENT_16)
+#define __ALIGN		.p2align 4, 0x90
+#define __ALIGN_STR	__stringify(__ALIGN)
 #endif
 
 #endif /* __ASSEMBLY__ */