Skip to content

Commit 382094a

Browse files
chleroymaddy-kerneldev
authored andcommitted
powerpc: Fix 'intra_function_call not a direct call' warning
The following build warning have been reported: arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0xe84: intra_function_call not a direct call arch/powerpc/kernel/switch.o: warning: objtool: .text+0x4: intra_function_call not a direct call This happens due to commit bb7f054 ("objtool/powerpc: Add support for decoding all types of uncond branches") because that commit decodes 'bl .+4' as a normal instruction because that instruction is used by clang instead of 'bcl 20,31,+.4' for relocatable code. The solution is simply to remove the ANNOTATE_INTRA_FUNCTION_CALL annotation now that the instruction is not seen as a function call anymore. Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com> Closes: https://lore.kernel.org/all/8c4c3fc2-2bd7-4148-af68-2f504d6119e0@linux.ibm.com Fixes: bb7f054 ("objtool/powerpc: Add support for decoding all types of uncond branches") Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Tested-By: Venkat Rao Bagalkote <venkat88@linux.ibm.com> Reviewed-by: Sathvika Vasireddy <sv@linux.ibm.com> Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com> Link: https://patch.msgid.link/88876fb4e412203452e57d1037a1341cf15ccc7b.1741128981.git.christophe.leroy@csgroup.eu
1 parent ff99d5b commit 382094a

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

arch/powerpc/kernel/switch.S

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ flush_branch_caches:
3939

4040
// Flush the link stack
4141
.rept 64
42-
ANNOTATE_INTRA_FUNCTION_CALL
4342
bl .+4
4443
.endr
4544
b 1f

arch/powerpc/kvm/book3s_hv_rmhandlers.S

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,14 +1524,12 @@ kvm_flush_link_stack:
15241524

15251525
/* Flush the link stack. On Power8 it's up to 32 entries in size. */
15261526
.rept 32
1527-
ANNOTATE_INTRA_FUNCTION_CALL
15281527
bl .+4
15291528
.endr
15301529

15311530
/* And on Power9 it's up to 64. */
15321531
BEGIN_FTR_SECTION
15331532
.rept 32
1534-
ANNOTATE_INTRA_FUNCTION_CALL
15351533
bl .+4
15361534
.endr
15371535
END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)

0 commit comments

Comments
 (0)