Skip to content

Commit fe6de81

Browse files
sathvika-vmpe
authored andcommitted
powerpc/kvm: Fix unannotated intra-function call warning
objtool throws the following warning: arch/powerpc/kvm/booke.o: warning: objtool: kvmppc_fill_pt_regs+0x30: unannotated intra-function call Fix the warning by setting the value of 'nip' using the _THIS_IP_ macro, without using an assembly bl/mflr sequence to save the instruction pointer. Reported-by: kernel test robot <[email protected]> Suggested-by: Michael Ellerman <[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 8afffce commit fe6de81

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

arch/powerpc/kvm/booke.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -912,16 +912,15 @@ static int kvmppc_handle_debug(struct kvm_vcpu *vcpu)
912912

913913
static void kvmppc_fill_pt_regs(struct pt_regs *regs)
914914
{
915-
ulong r1, ip, msr, lr;
915+
ulong r1, msr, lr;
916916

917917
asm("mr %0, 1" : "=r"(r1));
918918
asm("mflr %0" : "=r"(lr));
919919
asm("mfmsr %0" : "=r"(msr));
920-
asm("bl 1f; 1: mflr %0" : "=r"(ip));
921920

922921
memset(regs, 0, sizeof(*regs));
923922
regs->gpr[1] = r1;
924-
regs->nip = ip;
923+
regs->nip = _THIS_IP_;
925924
regs->msr = msr;
926925
regs->link = lr;
927926
}

0 commit comments

Comments
 (0)