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: Curb objtool unannotated intra-function call warnings

objtool throws the following unannotated intra-function call warnings:
arch/powerpc/kernel/entry_64.o: warning: objtool: .text+0x4: unannotated intra-function call
arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0xe64: unannotated intra-function call
arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0xee4: unannotated intra-function call

Fix these warnings by annotating intra-function calls, using
ANNOTATE_INTRA_FUNCTION_CALL macro, to indicate that the branch targets
are valid.

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-5-sv@linux.ibm.com

authored by

Sathvika Vasireddy and committed by
Michael Ellerman
8d0c21b5 29a011fc

+5
+2
arch/powerpc/kernel/entry_64.S
··· 14 14 * code, and exception/interrupt return code for PowerPC. 15 15 */ 16 16 17 + #include <linux/objtool.h> 17 18 #include <linux/errno.h> 18 19 #include <linux/err.h> 19 20 #include <asm/cache.h> ··· 74 73 75 74 // Flush the link stack 76 75 .rept 64 76 + ANNOTATE_INTRA_FUNCTION_CALL 77 77 bl .+4 78 78 .endr 79 79 b 1f
+3
arch/powerpc/kvm/book3s_hv_rmhandlers.S
··· 11 11 */ 12 12 13 13 #include <linux/linkage.h> 14 + #include <linux/objtool.h> 14 15 #include <asm/ppc_asm.h> 15 16 #include <asm/code-patching-asm.h> 16 17 #include <asm/kvm_asm.h> ··· 1524 1523 1525 1524 /* Flush the link stack. On Power8 it's up to 32 entries in size. */ 1526 1525 .rept 32 1526 + ANNOTATE_INTRA_FUNCTION_CALL 1527 1527 bl .+4 1528 1528 .endr 1529 1529 1530 1530 /* And on Power9 it's up to 64. */ 1531 1531 BEGIN_FTR_SECTION 1532 1532 .rept 32 1533 + ANNOTATE_INTRA_FUNCTION_CALL 1533 1534 bl .+4 1534 1535 .endr 1535 1536 END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)