diff options
author | Sathvika Vasireddy <sv@linux.ibm.com> | 2023-01-28 18:11:58 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2023-01-30 16:01:04 +1100 |
commit | fe6de81b610e5d0b9d2231acff2de74a35482e7d (patch) | |
tree | 62ce812876a77c8c3e0cb93d8b8d596cd86b5263 | |
parent | 8afffce6aa3bddc940ac1909627ff1e772b6cbf1 (diff) | |
download | linux-stable-fe6de81b610e5d0b9d2231acff2de74a35482e7d.tar.gz linux-stable-fe6de81b610e5d0b9d2231acff2de74a35482e7d.tar.bz2 linux-stable-fe6de81b610e5d0b9d2231acff2de74a35482e7d.zip |
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 <lkp@intel.com>
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sathvika Vasireddy <sv@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20230128124158.1066251-1-sv@linux.ibm.com
-rw-r--r-- | arch/powerpc/kvm/booke.c | 5 |
1 files 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; } |