Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

powerpc: Override __ALIGN and __ALIGN_STR macros

In a subsequent patch, we would want to annotate powerpc assembly functions
with SYM_FUNC_START_LOCAL macro. This macro depends on __ALIGN macro.

The default expansion of __ALIGN macro is:
#define __ALIGN .align 4,0x90

So, override __ALIGN and __ALIGN_STR macros to use the same alignment as
that of the existing _GLOBAL macro. Also, do not pad with 0x90, because
repeated 0x90s are not a nop or trap on powerpc.

Tested-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Reviewed-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221114175754.1131267-3-sv@linux.ibm.com

authored by

Sathvika Vasireddy and committed by
Michael Ellerman
01f2cf0b 93e3f45a

+3
+3
arch/powerpc/include/asm/linkage.h
··· 4 4 5 5 #include <asm/types.h> 6 6 7 + #define __ALIGN .align 2 8 + #define __ALIGN_STR ".align 2" 9 + 7 10 #ifdef CONFIG_PPC64_ELF_ABI_V1 8 11 #define cond_syscall(x) \ 9 12 asm ("\t.weak " #x "\n\t.set " #x ", sys_ni_syscall\n" \