[PATCH 1/2] arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope

Kautuk Consul kconsul at linux.vnet.ibm.com
Mon Feb 20 18:28:56 AEDT 2023


Hi Sathvika,

(Sorry didn't include list in earlier email.)

On Mon, Feb 20, 2023 at 12:35:09PM +0530, Sathvika Vasireddy wrote:
> Hi Kautuk,
> 
> On 20/02/23 10:53, Kautuk Consul wrote:
> > kvmppc_hv_entry isn't called from anywhere other than
> > book3s_hv_rmhandlers.S itself. Removing .global scope for
> > this function.
> > 
> > Signed-off-by: Kautuk Consul <kconsul at linux.vnet.ibm.com>
> > ---
> >   arch/powerpc/kvm/book3s_hv_rmhandlers.S | 1 -
> >   1 file changed, 1 deletion(-)
> > 
> > diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> > index acf80915f406..7e063fde7adc 100644
> > --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> > +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> > @@ -502,7 +502,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
> >    *                                                                            *
> >    *****************************************************************************/
> > -.global kvmppc_hv_entry
> >   kvmppc_hv_entry:
> >   	/* Required state:
> I see the following objtool warning with this patch applied.
> arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0x48:
> unannotated intra-function call
> 
> Annotating kvmppc_hv_entry symbol with SYM_FUNC_START_LOCAL and SYM_FUNC_END
> macros should help fix this warning.

Not sure where to put the SYM_FUNC_END annotation.
Will the following do:
<snip>
    ld  r0, VCPU_GPR(R0)(r4)
    ld  r2, VCPU_GPR(R2)(r4)
    ld  r3, VCPU_GPR(R3)(r4)
    ld  r4, VCPU_GPR(R4)(r4)
    HRFI_TO_GUEST
    b   .

SYM_FUNC_END(kvmppc_hv_entry)

secondary_too_late:
    li  r12, 0

?

Thanks.

> 
> Thanks,
> Sathvika
> 
> 


More information about the Linuxppc-dev mailing list