diff mbox

[4/4] KVM: PPC: Assembly functions exported to modules need _GLOBAL_TOC()

Message ID 20140612181653.7141a7b8@kryten (mailing list archive)
State Not Applicable
Headers show

Commit Message

Anton Blanchard June 12, 2014, 8:16 a.m. UTC
Both kvmppc_hv_entry_trampoline and kvmppc_entry_trampoline are
assembly functions that are exported to modules and also require
a valid r2.

As such we need to use _GLOBAL_TOC so we provide a global entry
point that establishes the TOC (r2).

Signed-off-by: Anton Blanchard <anton@samba.org>
---

Comments

Alexander Graf June 17, 2014, 4:06 p.m. UTC | #1
On 12.06.14 10:16, Anton Blanchard wrote:
> Both kvmppc_hv_entry_trampoline and kvmppc_entry_trampoline are
> assembly functions that are exported to modules and also require
> a valid r2.
>
> As such we need to use _GLOBAL_TOC so we provide a global entry
> point that establishes the TOC (r2).
>
> Signed-off-by: Anton Blanchard <anton@samba.org>

Thanks, applied to kvm-ppc-queue.

I've not applied patches 1 and 2 for now, as they break BE module support.


Alex
diff mbox

Patch

Index: b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
===================================================================
--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
@@ -51,7 +51,7 @@ 
  *
  * LR = return address to continue at after eventually re-enabling MMU
  */
-_GLOBAL(kvmppc_hv_entry_trampoline)
+_GLOBAL_TOC(kvmppc_hv_entry_trampoline)
 	mflr	r0
 	std	r0, PPC_LR_STKOFF(r1)
 	stdu	r1, -112(r1)
Index: b/arch/powerpc/kvm/book3s_rmhandlers.S
===================================================================
--- a/arch/powerpc/kvm/book3s_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_rmhandlers.S
@@ -140,7 +140,7 @@  kvmppc_handler_skip_ins:
  * On entry, r4 contains the guest shadow MSR
  * MSR.EE has to be 0 when calling this function
  */
-_GLOBAL(kvmppc_entry_trampoline)
+_GLOBAL_TOC(kvmppc_entry_trampoline)
 	mfmsr	r5
 	LOAD_REG_ADDR(r7, kvmppc_handler_trampoline_enter)
 	toreal(r7)