All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4] arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope
@ 2023-03-27 10:04 Kautuk Consul
  2023-03-27 10:30   ` Nicholas Piggin
  0 siblings, 1 reply; 5+ messages in thread
From: Kautuk Consul @ 2023-03-27 10:04 UTC (permalink / raw)
  To: Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Naveen N. Rao, Sathvika Vasireddy, Alexey Kardashevskiy,
	Fabiano Rosas
  Cc: linuxppc-dev, linux-kernel, Kautuk Consul

kvmppc_hv_entry isn't called from anywhere other than
book3s_hv_rmhandlers.S itself. Removing .global scope for
this function and annotating it with SYM_CODE_START_LOCAL
and SYM_CODE_END.

Signed-off-by: Kautuk Consul <kconsul@linux.vnet.ibm.com>
---
 arch/powerpc/kvm/book3s_hv_rmhandlers.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
index acf80915f406..0a9781192b86 100644
--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
@@ -502,8 +502,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
  *                                                                            *
  *****************************************************************************/
 
-.global kvmppc_hv_entry
-kvmppc_hv_entry:
+SYM_CODE_START_LOCAL(kvmppc_hv_entry)
 
 	/* Required state:
 	 *
@@ -940,6 +939,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
 	ld	r4, VCPU_GPR(R4)(r4)
 	HRFI_TO_GUEST
 	b	.
+SYM_CODE_END(kvmppc_hv_entry)
 
 secondary_too_late:
 	li	r12, 0
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v4] arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope
  2023-03-27 10:04 [PATCH v4] arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope Kautuk Consul
@ 2023-03-27 10:30   ` Nicholas Piggin
  0 siblings, 0 replies; 5+ messages in thread
From: Nicholas Piggin @ 2023-03-27 10:30 UTC (permalink / raw)
  To: Kautuk Consul, Michael Ellerman, Christophe Leroy, Naveen N. Rao,
	Sathvika Vasireddy, Alexey Kardashevskiy, Fabiano Rosas
  Cc: linuxppc-dev, linux-kernel

On Mon Mar 27, 2023 at 8:04 PM AEST, Kautuk Consul wrote:
> kvmppc_hv_entry isn't called from anywhere other than
> book3s_hv_rmhandlers.S itself. Removing .global scope for
> this function and annotating it with SYM_CODE_START_LOCAL
> and SYM_CODE_END.

Does removing .global introduce the objtool warning, or was it already
present? Just trying to understand if this is two changes or one (not
that it really matters, maybe just for the purpose of the changelog).

Since the patch only touches KVM, subject should follow arch/powerpc/kvm
convention, which is not the same as the rest of arch/powerpc. KVM: PPC:
Book3S HV:

Otherwise seems okay

Reviewed-by: Nicholas Piggin <npiggin@gmail.com>

Thanks,
Nick

>
> Signed-off-by: Kautuk Consul <kconsul@linux.vnet.ibm.com>
> ---
>  arch/powerpc/kvm/book3s_hv_rmhandlers.S | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> index acf80915f406..0a9781192b86 100644
> --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> @@ -502,8 +502,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
>   *                                                                            *
>   *****************************************************************************/
>  
> -.global kvmppc_hv_entry
> -kvmppc_hv_entry:
> +SYM_CODE_START_LOCAL(kvmppc_hv_entry)
>  
>  	/* Required state:
>  	 *
> @@ -940,6 +939,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
>  	ld	r4, VCPU_GPR(R4)(r4)
>  	HRFI_TO_GUEST
>  	b	.
> +SYM_CODE_END(kvmppc_hv_entry)
>  
>  secondary_too_late:
>  	li	r12, 0
> -- 
> 2.39.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v4] arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope
@ 2023-03-27 10:30   ` Nicholas Piggin
  0 siblings, 0 replies; 5+ messages in thread
From: Nicholas Piggin @ 2023-03-27 10:30 UTC (permalink / raw)
  To: Kautuk Consul, Michael Ellerman, Christophe Leroy, Naveen N. Rao,
	Sathvika Vasireddy, Alexey Kardashevskiy, Fabiano Rosas
  Cc: linuxppc-dev, linux-kernel

On Mon Mar 27, 2023 at 8:04 PM AEST, Kautuk Consul wrote:
> kvmppc_hv_entry isn't called from anywhere other than
> book3s_hv_rmhandlers.S itself. Removing .global scope for
> this function and annotating it with SYM_CODE_START_LOCAL
> and SYM_CODE_END.

Does removing .global introduce the objtool warning, or was it already
present? Just trying to understand if this is two changes or one (not
that it really matters, maybe just for the purpose of the changelog).

Since the patch only touches KVM, subject should follow arch/powerpc/kvm
convention, which is not the same as the rest of arch/powerpc. KVM: PPC:
Book3S HV:

Otherwise seems okay

Reviewed-by: Nicholas Piggin <npiggin@gmail.com>

Thanks,
Nick

>
> Signed-off-by: Kautuk Consul <kconsul@linux.vnet.ibm.com>
> ---
>  arch/powerpc/kvm/book3s_hv_rmhandlers.S | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> index acf80915f406..0a9781192b86 100644
> --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> @@ -502,8 +502,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
>   *                                                                            *
>   *****************************************************************************/
>  
> -.global kvmppc_hv_entry
> -kvmppc_hv_entry:
> +SYM_CODE_START_LOCAL(kvmppc_hv_entry)
>  
>  	/* Required state:
>  	 *
> @@ -940,6 +939,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
>  	ld	r4, VCPU_GPR(R4)(r4)
>  	HRFI_TO_GUEST
>  	b	.
> +SYM_CODE_END(kvmppc_hv_entry)
>  
>  secondary_too_late:
>  	li	r12, 0
> -- 
> 2.39.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v4] arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope
  2023-03-27 10:30   ` Nicholas Piggin
@ 2023-03-27 10:51     ` Kautuk Consul
  -1 siblings, 0 replies; 5+ messages in thread
From: Kautuk Consul @ 2023-03-27 10:51 UTC (permalink / raw)
  To: Nicholas Piggin
  Cc: Michael Ellerman, Christophe Leroy, Naveen N. Rao,
	Sathvika Vasireddy, Alexey Kardashevskiy, Fabiano Rosas,
	linuxppc-dev, linux-kernel

On 2023-03-27 20:30:02, Nicholas Piggin wrote:
> On Mon Mar 27, 2023 at 8:04 PM AEST, Kautuk Consul wrote:
> > kvmppc_hv_entry isn't called from anywhere other than
> > book3s_hv_rmhandlers.S itself. Removing .global scope for
> > this function and annotating it with SYM_CODE_START_LOCAL
> > and SYM_CODE_END.
> 
> Does removing .global introduce the objtool warning, or was it already
> present? Just trying to understand if this is two changes or one (not
> that it really matters, maybe just for the purpose of the changelog).
Yes. Just removing .global introduces the objtool warning.
> 
> Since the patch only touches KVM, subject should follow arch/powerpc/kvm
> convention, which is not the same as the rest of arch/powerpc. KVM: PPC:
> Book3S HV:
Okay. Do you need me to send another patch in "KVM: PPC: Book3S HV:"
format ?
> 
> Otherwise seems okay
> 
> Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Thank you!
> 
> Thanks,
> Nick
> 
> >
> > Signed-off-by: Kautuk Consul <kconsul@linux.vnet.ibm.com>
> > ---
> >  arch/powerpc/kvm/book3s_hv_rmhandlers.S | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> > index acf80915f406..0a9781192b86 100644
> > --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> > +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> > @@ -502,8 +502,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
> >   *                                                                            *
> >   *****************************************************************************/
> >  
> > -.global kvmppc_hv_entry
> > -kvmppc_hv_entry:
> > +SYM_CODE_START_LOCAL(kvmppc_hv_entry)
> >  
> >  	/* Required state:
> >  	 *
> > @@ -940,6 +939,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
> >  	ld	r4, VCPU_GPR(R4)(r4)
> >  	HRFI_TO_GUEST
> >  	b	.
> > +SYM_CODE_END(kvmppc_hv_entry)
> >  
> >  secondary_too_late:
> >  	li	r12, 0
> > -- 
> > 2.39.2
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v4] arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope
@ 2023-03-27 10:51     ` Kautuk Consul
  0 siblings, 0 replies; 5+ messages in thread
From: Kautuk Consul @ 2023-03-27 10:51 UTC (permalink / raw)
  To: Nicholas Piggin
  Cc: Fabiano Rosas, Alexey Kardashevskiy, linux-kernel,
	Sathvika Vasireddy, Naveen N. Rao, linuxppc-dev

On 2023-03-27 20:30:02, Nicholas Piggin wrote:
> On Mon Mar 27, 2023 at 8:04 PM AEST, Kautuk Consul wrote:
> > kvmppc_hv_entry isn't called from anywhere other than
> > book3s_hv_rmhandlers.S itself. Removing .global scope for
> > this function and annotating it with SYM_CODE_START_LOCAL
> > and SYM_CODE_END.
> 
> Does removing .global introduce the objtool warning, or was it already
> present? Just trying to understand if this is two changes or one (not
> that it really matters, maybe just for the purpose of the changelog).
Yes. Just removing .global introduces the objtool warning.
> 
> Since the patch only touches KVM, subject should follow arch/powerpc/kvm
> convention, which is not the same as the rest of arch/powerpc. KVM: PPC:
> Book3S HV:
Okay. Do you need me to send another patch in "KVM: PPC: Book3S HV:"
format ?
> 
> Otherwise seems okay
> 
> Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Thank you!
> 
> Thanks,
> Nick
> 
> >
> > Signed-off-by: Kautuk Consul <kconsul@linux.vnet.ibm.com>
> > ---
> >  arch/powerpc/kvm/book3s_hv_rmhandlers.S | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> > index acf80915f406..0a9781192b86 100644
> > --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> > +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
> > @@ -502,8 +502,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_207S)
> >   *                                                                            *
> >   *****************************************************************************/
> >  
> > -.global kvmppc_hv_entry
> > -kvmppc_hv_entry:
> > +SYM_CODE_START_LOCAL(kvmppc_hv_entry)
> >  
> >  	/* Required state:
> >  	 *
> > @@ -940,6 +939,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
> >  	ld	r4, VCPU_GPR(R4)(r4)
> >  	HRFI_TO_GUEST
> >  	b	.
> > +SYM_CODE_END(kvmppc_hv_entry)
> >  
> >  secondary_too_late:
> >  	li	r12, 0
> > -- 
> > 2.39.2
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-03-27 10:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-27 10:04 [PATCH v4] arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope Kautuk Consul
2023-03-27 10:30 ` Nicholas Piggin
2023-03-27 10:30   ` Nicholas Piggin
2023-03-27 10:51   ` Kautuk Consul
2023-03-27 10:51     ` Kautuk Consul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.