mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Nicholas Piggin <npiggin@gmail.com>,
	Naveen N Rao <naveen@kernel.org>,
	Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc: Fix 'intra_function_call not a direct call' warning
Date: Wed, 5 Mar 2025 09:34:17 +0530	[thread overview]
Message-ID: <934be33f-ba7d-4363-a1c8-e9e7c381646a@linux.ibm.com> (raw)
In-Reply-To: <88876fb4e412203452e57d1037a1341cf15ccc7b.1741128981.git.christophe.leroy@csgroup.eu>

Hello Christophe,

On 05/03/25 4:30 am, Christophe Leroy wrote:
> 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 bb7f054f4de2 ("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: bb7f054f4de2 ("objtool/powerpc: Add support for decoding all types of uncond branches")
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> ---
>   arch/powerpc/kernel/switch.S            | 1 -
>   arch/powerpc/kvm/book3s_hv_rmhandlers.S | 2 --
>   2 files changed, 3 deletions(-)
>
> diff --git a/arch/powerpc/kernel/switch.S b/arch/powerpc/kernel/switch.S
> index 608c0ce7cec6..59e3ee99db0e 100644
> --- a/arch/powerpc/kernel/switch.S
> +++ b/arch/powerpc/kernel/switch.S
> @@ -39,7 +39,6 @@ flush_branch_caches:
>   
>   	// Flush the link stack
>   	.rept 64
> -	ANNOTATE_INTRA_FUNCTION_CALL
>   	bl	.+4
>   	.endr
>   	b	1f
> diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> index ea7ad200b330..83f7504349d2 100644
> --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> @@ -1524,14 +1524,12 @@ kvm_flush_link_stack:
>   
>   	/* Flush the link stack. On Power8 it's up to 32 entries in size. */
>   	.rept 32
> -	ANNOTATE_INTRA_FUNCTION_CALL
>   	bl	.+4
>   	.endr
>   
>   	/* And on Power9 it's up to 64. */
>   BEGIN_FTR_SECTION
>   	.rept 32
> -	ANNOTATE_INTRA_FUNCTION_CALL
>   	bl	.+4
>   	.endr
>   END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)


Applied this patch on top of linux-next 20250303, and it fixes the below 
reported warning.

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



Please add below tag:

Tested-By: Venkat Rao Bagalkote <venkat88@linux.ibm.com>

Regards,
Venkat.


  reply	other threads:[~2025-03-05  4:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-04 23:00 Christophe Leroy
2025-03-05  4:04 ` Venkat Rao Bagalkote [this message]
2025-03-14  3:46 ` Madhavan Srinivasan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=934be33f-ba7d-4363-a1c8-e9e7c381646a@linux.ibm.com \
    --to=venkat88@linux.ibm.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpe@ellerman.id.au \
    --cc=naveen@kernel.org \
    --cc=npiggin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®