Skip to content

Commit

Permalink
s390/linkage: increase asm symbols alignment to 16
Browse files Browse the repository at this point in the history
Both clang and gcc (for -march=z13 and later) align functions to 16
bytes at -O2 to benefit branch prediction.

Make asm symbols alignment consistent with that.

This also benefits potential ftrace code patching, which is currently
able to patch 8 aligned bytes at once.

With defconfig this currently increases .text size by 4104 bytes.

Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
  • Loading branch information
Vasily Gorbik committed Jul 8, 2021
1 parent b55e692 commit 4ee471f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/include/asm/linkage.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <asm/asm-const.h>
#include <linux/stringify.h>

#define __ALIGN .align 4, 0x07
#define __ALIGN .align 16, 0x07
#define __ALIGN_STR __stringify(__ALIGN)

/*
Expand Down

0 comments on commit 4ee471f

Please sign in to comment.