diff options
author | Suresh Warrier <warrier@linux.vnet.ibm.com> | 2015-03-20 20:39:46 +1100 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2015-04-21 15:21:30 +0200 |
commit | 34cb7954c0aa7c8ad1591cb6cceae36432f55bb5 (patch) | |
tree | c38fc5056a03bf57922236cc6ecf446564937ce8 /arch/powerpc/kvm/book3s_xics.h | |
parent | 878610fe9884a34a282cd4431237343864324d23 (diff) | |
download | linux-34cb7954c0aa7c8ad1591cb6cceae36432f55bb5.tar.bz2 |
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.h | 2 |
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]; }; |