linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: benh@kernel.crashing.org, paulus@samba.org, agraf@suse.de,
	clg@fr.ibm.com
Cc: linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org,
	kvm-ppc@vger.kernel.org
Subject: [PATCH 1/4] KVM: PPC: Book3S PR: Fix ABIv2 issues
Date: Thu, 12 Jun 2014 18:14:20 +1000	[thread overview]
Message-ID: <20140612181420.65b05675@kryten> (raw)

binutils knows that a branch to a function descriptor is actually
a branch to the function text. By removing the explicit branch to
dot symbols, we maintain both ABIv1 and ABIv2 compatibility.

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

Index: b/arch/powerpc/kvm/book3s_interrupts.S
===================================================================
--- a/arch/powerpc/kvm/book3s_interrupts.S
+++ b/arch/powerpc/kvm/book3s_interrupts.S
@@ -25,11 +25,9 @@
 #include <asm/exception-64s.h>
 
 #if defined(CONFIG_PPC_BOOK3S_64)
-#define FUNC(name) 		GLUE(.,name)
 #define GET_SHADOW_VCPU(reg)    addi	reg, r13, PACA_SVCPU
 
 #elif defined(CONFIG_PPC_BOOK3S_32)
-#define FUNC(name)		name
 #define GET_SHADOW_VCPU(reg)	lwz     reg, (THREAD + THREAD_KVM_SVCPU)(r2)
 
 #endif /* CONFIG_PPC_BOOK3S_XX */
@@ -93,7 +91,7 @@ kvm_start_entry:
 kvm_start_lightweight:
 	/* Copy registers into shadow vcpu so we can access them in real mode */
 	GET_SHADOW_VCPU(r3)
-	bl	FUNC(kvmppc_copy_to_svcpu)
+	bl	kvmppc_copy_to_svcpu
 	nop
 	REST_GPR(4, r1)
 
@@ -131,7 +129,7 @@ after_sprg3_load:
 	PPC_LL	r4, VCPU_SHADOW_MSR(r4)	/* get shadow_msr */
 
 	/* Jump to segment patching handler and into our guest */
-	bl	FUNC(kvmppc_entry_trampoline)
+	bl	kvmppc_entry_trampoline
 	nop
 
 /*
@@ -164,7 +162,7 @@ after_sprg3_load:
 	/* On 64-bit, interrupts are still off at this point */
 
 	GET_SHADOW_VCPU(r4)
-	bl	FUNC(kvmppc_copy_from_svcpu)
+	bl	kvmppc_copy_from_svcpu
 	nop
 
 #ifdef CONFIG_PPC_BOOK3S_64
@@ -203,7 +201,7 @@ after_sprg3_load:
 
 	/* Restore r3 (kvm_run) and r4 (vcpu) */
 	REST_2GPRS(3, r1)
-	bl	FUNC(kvmppc_handle_exit_pr)
+	bl	kvmppc_handle_exit_pr
 
 	/* If RESUME_GUEST, get back in the loop */
 	cmpwi	r3, RESUME_GUEST
Index: b/arch/powerpc/kvm/book3s_rmhandlers.S
===================================================================
--- a/arch/powerpc/kvm/book3s_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_rmhandlers.S
@@ -34,13 +34,7 @@
  *                                                                           *
  ****************************************************************************/
 
-#if defined(CONFIG_PPC_BOOK3S_64)
-
-#define FUNC(name) 		GLUE(.,name)
-
-#elif defined(CONFIG_PPC_BOOK3S_32)
-
-#define FUNC(name)		name
+#ifdef CONFIG_PPC_BOOK3S_32
 
 .macro INTERRUPT_TRAMPOLINE intno
 

             reply	other threads:[~2014-06-12  8:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-12  8:14 Anton Blanchard [this message]
2014-06-12  8:15 ` [PATCH 2/4] KVM: PPC: Book3S HV: Fix ABIv2 issues Anton Blanchard
2014-06-12  8:16 ` [PATCH 3/4] KVM: PPC: Book3S HV: Fix ABIv2 indirect branch issue Anton Blanchard
2014-06-17 16:05   ` Alexander Graf
2014-06-12  8:16 ` [PATCH 4/4] KVM: PPC: Assembly functions exported to modules need _GLOBAL_TOC() Anton Blanchard
2014-06-17 16:06   ` Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140612181420.65b05675@kryten \
    --to=anton@samba.org \
    --cc=agraf@suse.de \
    --cc=benh@kernel.crashing.org \
    --cc=clg@fr.ibm.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).