arch: Introduce CONFIG_FUNCTION_ALIGNMENT
Generic function-alignment infrastructure. Architectures can select FUNCTION_ALIGNMENT_xxB symbols; the FUNCTION_ALIGNMENT symbol is then set to the largest such selected size, 0 otherwise. From this the -falign-functions compiler argument and __ALIGN macro are set. This incorporates the DEBUG_FORCE_FUNCTION_ALIGN_64B knob and future alignment requirements for x86_64 (later in this series) into a single place. NOTE: also removes the 0x90 filler byte from the generic __ALIGN primitive, that value makes no sense outside of x86. NOTE: .balign 0 reverts to a no-op. Requested-by:Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by:
Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lore.kernel.org/r/20220915111143.719248727@infradead.org
Showing
- Makefile 2 additions, 2 deletionsMakefile
- arch/Kconfig 24 additions, 0 deletionsarch/Kconfig
- arch/ia64/Kconfig 1 addition, 0 deletionsarch/ia64/Kconfig
- arch/ia64/Makefile 1 addition, 1 deletionarch/ia64/Makefile
- arch/x86/Kconfig 2 additions, 0 deletionsarch/x86/Kconfig
- arch/x86/boot/compressed/head_64.S 8 additions, 0 deletionsarch/x86/boot/compressed/head_64.S
- arch/x86/include/asm/linkage.h 1 addition, 3 deletionsarch/x86/include/asm/linkage.h
- include/asm-generic/vmlinux.lds.h 2 additions, 2 deletionsinclude/asm-generic/vmlinux.lds.h
- include/linux/linkage.h 2 additions, 2 deletionsinclude/linux/linkage.h
- lib/Kconfig.debug 1 addition, 0 deletionslib/Kconfig.debug
Please register or sign in to comment