Skip to content

Commit

Permalink
x86: shrink __ALIGN and __ALIGN_STR definitions
Browse files Browse the repository at this point in the history
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

Signed-off-by: Cyrill Gorcunov <[email protected]>
LKML-Reference: <20090309171951.GE9945@localhost>
[ small cleanup, use __stringify(), etc. ]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
cyrillos authored and Ingo Molnar committed Mar 11, 2009
1 parent 78b020d commit bb7f5f6
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions arch/x86/include/asm/linkage.h
Original file line number Diff line number Diff line change
@@ -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))

Expand Down Expand Up @@ -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__ */
Expand Down

0 comments on commit bb7f5f6

Please sign in to comment.