* [PATCH] powerpc/kvm: Fix objtool warning for unannotated intra-function call in booke.o
@ 2023-01-28 12:41 Sathvika Vasireddy
2023-02-05 9:41 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Sathvika Vasireddy @ 2023-01-28 12:41 UTC (permalink / raw)
To: linuxppc-dev; +Cc: lkp, npiggin, sv, naveen.n.rao
Objtool throws the following warning:
arch/powerpc/kvm/booke.o: warning: objtool: kvmppc_fill_pt_regs+0x30: unannotated intra-function call
Fix this warning by allowing the function to set the value of 'nip' field
using _THIS_IP_ macro, without having to use an additional assembly
instruction to save the instruction pointer.
Reported-by: kernel test robot <lkp@intel.com>
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
---
arch/powerpc/kvm/booke.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index 0dce93ccaadf..e89281d3ba28 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -912,16 +912,15 @@ static int kvmppc_handle_debug(struct kvm_vcpu *vcpu)
static void kvmppc_fill_pt_regs(struct pt_regs *regs)
{
- ulong r1, ip, msr, lr;
+ ulong r1, msr, lr;
asm("mr %0, 1" : "=r"(r1));
asm("mflr %0" : "=r"(lr));
asm("mfmsr %0" : "=r"(msr));
- asm("bl 1f; 1: mflr %0" : "=r"(ip));
memset(regs, 0, sizeof(*regs));
regs->gpr[1] = r1;
- regs->nip = ip;
+ regs->nip = _THIS_IP_;
regs->msr = msr;
regs->link = lr;
}
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/kvm: Fix objtool warning for unannotated intra-function call in booke.o
2023-01-28 12:41 [PATCH] powerpc/kvm: Fix objtool warning for unannotated intra-function call in booke.o Sathvika Vasireddy
@ 2023-02-05 9:41 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2023-02-05 9:41 UTC (permalink / raw)
To: Sathvika Vasireddy, linuxppc-dev; +Cc: naveen.n.rao, lkp, npiggin
On Sat, 28 Jan 2023 18:11:58 +0530, Sathvika Vasireddy wrote:
> Objtool throws the following warning:
> arch/powerpc/kvm/booke.o: warning: objtool: kvmppc_fill_pt_regs+0x30: unannotated intra-function call
>
> Fix this warning by allowing the function to set the value of 'nip' field
> using _THIS_IP_ macro, without having to use an additional assembly
> instruction to save the instruction pointer.
>
> [...]
Applied to powerpc/fixes.
[1/1] powerpc/kvm: Fix objtool warning for unannotated intra-function call in booke.o
https://git.kernel.org/powerpc/c/fe6de81b610e5d0b9d2231acff2de74a35482e7d
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-05 9:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-28 12:41 [PATCH] powerpc/kvm: Fix objtool warning for unannotated intra-function call in booke.o Sathvika Vasireddy
2023-02-05 9:41 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).