Skip to content

Commit

Permalink
KVM: PPC: bookehv: Remove GET_VCPU macro from exception handler
Browse files Browse the repository at this point in the history
GET_VCPU define will not be implemented for 64-bit for performance reasons
so get rid of it also on 32-bit.

Signed-off-by: Mihai Caraman <mihai.caraman@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
  • Loading branch information
Mihai Caraman authored and Alexander Graf committed Dec 6, 2012
1 parent b50df19 commit ff59474
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions arch/powerpc/kvm/bookehv_interrupts.S
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@

#include "../kernel/head_booke.h" /* for THREAD_NORMSAVE() */

#define GET_VCPU(vcpu, thread) \
PPC_LL vcpu, THREAD_KVM_VCPU(thread)

#define LONGBYTES (BITS_PER_LONG / 8)

#define VCPU_GUEST_SPRG(n) (VCPU_GUEST_SPRGS + (n * LONGBYTES))
Expand Down Expand Up @@ -206,7 +203,7 @@
*/
.macro kvm_handler intno srr0, srr1, flags
_GLOBAL(kvmppc_handler_\intno\()_\srr1)
GET_VCPU(r11, r10)
PPC_LL r11, THREAD_KVM_VCPU(r10)
PPC_STL r3, VCPU_GPR(R3)(r11)
mfspr r3, SPRN_SPRG_RSCRATCH0
PPC_STL r4, VCPU_GPR(R4)(r11)
Expand All @@ -233,7 +230,7 @@ _GLOBAL(kvmppc_handler_\intno\()_\srr1)
.macro kvm_lvl_handler intno scratch srr0, srr1, flags
_GLOBAL(kvmppc_handler_\intno\()_\srr1)
mfspr r10, SPRN_SPRG_THREAD
GET_VCPU(r11, r10)
PPC_LL r11, THREAD_KVM_VCPU(r10)
PPC_STL r3, VCPU_GPR(R3)(r11)
mfspr r3, \scratch
PPC_STL r4, VCPU_GPR(R4)(r11)
Expand Down

0 comments on commit ff59474

Please sign in to comment.