Skip to contentSkip to conversation

arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope

PATCH In review Kautuk Consul 2 participants 3 messages Mar 27, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 arch/powerpc/kvm: kvmppc_hv_entry: remove .global scope

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.

---
 arch/powerpc/kvm/book3s_hv_rmhandlers.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/kvm/book3s_hv_rmhandlers.S +2 -2
index acf80915f406..0a9781192b86 100644
@@ -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
Signature · 1 line
2.39.2
reviewer Reviewed-by on v4 1/1
#1 lore raw
Quoted 4 lines · 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.

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

Thanks,
Nick

Quoted 30 lines
---
 arch/powerpc/kvm/book3s_hv_rmhandlers.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/kvm/book3s_hv_rmhandlers.S +2 -2
index acf80915f406..0a9781192b86 100644
@@ -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
Signature · 1 line
2.39.2
#2 lore raw
Quoted 9 lines · Nicholas Piggin
Quoted 4 lines · 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.

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.

Quoted 4 lines

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 ?

Quoted 4 lines

Otherwise seems okay

Thank you!

Quoted 35 lines

Thanks,
Nick

Quoted 30 lines
---
 arch/powerpc/kvm/book3s_hv_rmhandlers.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/kvm/book3s_hv_rmhandlers.S +2 -2
index acf80915f406..0a9781192b86 100644
@@ -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
Signature · 1 line
2.39.2