Skip to content

Commit 8d0c21b

Browse files
sathvika-vmpe
authored andcommitted
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 <[email protected]> Reviewed-by: Naveen N. Rao <[email protected]> Reviewed-by: Christophe Leroy <[email protected]> Acked-by: Josh Poimboeuf <[email protected]> Signed-off-by: Sathvika Vasireddy <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 29a011f commit 8d0c21b

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

arch/powerpc/kernel/entry_64.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* code, and exception/interrupt return code for PowerPC.
1515
*/
1616

17+
#include <linux/objtool.h>
1718
#include <linux/errno.h>
1819
#include <linux/err.h>
1920
#include <asm/cache.h>
@@ -73,6 +74,7 @@ flush_branch_caches:
7374

7475
// Flush the link stack
7576
.rept 64
77+
ANNOTATE_INTRA_FUNCTION_CALL
7678
bl .+4
7779
.endr
7880
b 1f

arch/powerpc/kvm/book3s_hv_rmhandlers.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212

1313
#include <linux/linkage.h>
14+
#include <linux/objtool.h>
1415
#include <asm/ppc_asm.h>
1516
#include <asm/code-patching-asm.h>
1617
#include <asm/kvm_asm.h>
@@ -1523,12 +1524,14 @@ kvm_flush_link_stack:
15231524

15241525
/* Flush the link stack. On Power8 it's up to 32 entries in size. */
15251526
.rept 32
1527+
ANNOTATE_INTRA_FUNCTION_CALL
15261528
bl .+4
15271529
.endr
15281530

15291531
/* And on Power9 it's up to 64. */
15301532
BEGIN_FTR_SECTION
15311533
.rept 32
1534+
ANNOTATE_INTRA_FUNCTION_CALL
15321535
bl .+4
15331536
.endr
15341537
END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)

0 commit comments

Comments
 (0)