[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8d32fdf4-578d-c762-9aa5-42d0e2a3d51a@csgroup.eu>
Date: Tue, 30 Aug 2022 06:26:00 +0000
From: Christophe Leroy <christophe.leroy@...roup.eu>
To: Sathvika Vasireddy <sv@...ux.ibm.com>,
"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>
CC: "jpoimboe@...hat.com" <jpoimboe@...hat.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"aik@...abs.ru" <aik@...abs.ru>,
"mpe@...erman.id.au" <mpe@...erman.id.au>,
"mingo@...hat.com" <mingo@...hat.com>,
"rostedt@...dmis.org" <rostedt@...dmis.org>,
"mbenes@...e.cz" <mbenes@...e.cz>,
"npiggin@...il.com" <npiggin@...il.com>,
"chenzhongjin@...wei.com" <chenzhongjin@...wei.com>,
"naveen.n.rao@...ux.vnet.ibm.com" <naveen.n.rao@...ux.vnet.ibm.com>
Subject: Re: [PATCH v2 04/16] powerpc: Curb objtool unannotated intra-function
warnings
Le 29/08/2022 à 07:52, Sathvika Vasireddy a écrit :
> 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
> call, using ANNOTATE_INTRA_FUNCTION_CALL macro,
> to indicate that the branch targets are valid.
>
> Signed-off-by: Sathvika Vasireddy <sv@...ux.ibm.com>
Reviewed-by: Christophe Leroy <christophe.leroy@...roup.eu>
> ---
> arch/powerpc/kernel/entry_64.S | 2 ++
> arch/powerpc/kvm/book3s_hv_rmhandlers.S | 3 +++
> 2 files changed, 5 insertions(+)
>
> diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
> index 01ace4c56104..fb444bc64f3f 100644
> --- a/arch/powerpc/kernel/entry_64.S
> +++ b/arch/powerpc/kernel/entry_64.S
> @@ -14,6 +14,7 @@
> * code, and exception/interrupt return code for PowerPC.
> */
>
> +#include <linux/objtool.h>
> #include <linux/errno.h>
> #include <linux/err.h>
> #include <asm/cache.h>
> @@ -73,6 +74,7 @@ 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 de91118df0c5..ea39a0cf591a 100644
> --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> @@ -30,6 +30,7 @@
> #include <asm/feature-fixups.h>
> #include <asm/cpuidle.h>
> #include <linux/linkage.h>
> +#include <linux/objtool.h>
>
> /* Values in HSTATE_NAPPING(r13) */
> #define NAPPING_CEDE 1
> @@ -1523,12 +1524,14 @@ 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)
Powered by blists - more mailing lists