summaryrefslogtreecommitdiff
path: root/arch/powerpc/kvm/book3s_xics.h
diff options
context:
space:
mode:
authorSuresh Warrier <warrier@linux.vnet.ibm.com>2015-03-20 12:39:46 +0300
committerAlexander Graf <agraf@suse.de>2015-04-21 16:21:30 +0300
commit34cb7954c0aa7c8ad1591cb6cceae36432f55bb5 (patch)
treec38fc5056a03bf57922236cc6ecf446564937ce8 /arch/powerpc/kvm/book3s_xics.h
parent878610fe9884a34a282cd4431237343864324d23 (diff)
downloadlinux-34cb7954c0aa7c8ad1591cb6cceae36432f55bb5.tar.xz
KVM: PPC: Book3S HV: Convert ICS mutex lock to spin lock
Replaces the ICS mutex lock with a spin lock since we will be porting these routines to real mode. Note that we need to disable interrupts before we take the lock in anticipation of the fact that on the guest side, we are running in the context of a hard irq and interrupts are disabled (EE bit off) when the lock is acquired. Again, because we will be acquiring the lock in hypervisor real mode, we need to use an arch_spinlock_t instead of a normal spinlock here as we want to avoid running any lockdep code (which may not be safe to execute in real mode). Signed-off-by: Suresh Warrier <warrier@linux.vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/book3s_xics.h')
-rw-r--r--arch/powerpc/kvm/book3s_xics.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_xics.h b/arch/powerpc/kvm/book3s_xics.h
index de970eca2167..055424c43249 100644
--- a/arch/powerpc/kvm/book3s_xics.h
+++ b/arch/powerpc/kvm/book3s_xics.h
@@ -90,7 +90,7 @@ struct kvmppc_icp {
};
struct kvmppc_ics {
- struct mutex lock;
+ arch_spinlock_t lock;
u16 icsid;
struct ics_irq_state irq_state[KVMPPC_XICS_IRQ_PER_ICS];
};