summaryrefslogtreecommitdiff
path: root/arch/ia64/kvm/vcpu.h
diff options
context:
space:
mode:
authorLuck, Tony <tony.luck@intel.com>2009-12-18 01:05:03 (GMT)
committerMarcelo Tosatti <mtosatti@redhat.com>2009-12-27 15:36:33 (GMT)
commita662b8135a1f9fee7d3f9129498cb03f3d6ce772 (patch)
tree3766ea07d781115847692632f34ff86371b1bc1b /arch/ia64/kvm/vcpu.h
parentdab4b911a5327859bb8f969249c6978c26cd4853 (diff)
downloadlinux-fsl-qoriq-a662b8135a1f9fee7d3f9129498cb03f3d6ce772.tar.xz
KVM: ia64: fix build breakage due to host spinlock change
Len Brown pointed out that allmodconfig is broken for ia64 because of: arch/ia64/kvm/vmm.c: In function 'vmm_spin_unlock': arch/ia64/kvm/vmm.c:70: error: 'spinlock_t' has no member named 'raw_lock' KVM has it's own spinlock routines. It should not depend on the base kernel spinlock_t type (which changed when ia64 switched to ticket locks). Define its own vmm_spinlock_t type. Signed-off-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/ia64/kvm/vcpu.h')
-rw-r--r--arch/ia64/kvm/vcpu.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/ia64/kvm/vcpu.h b/arch/ia64/kvm/vcpu.h
index 360724d..988911b 100644
--- a/arch/ia64/kvm/vcpu.h
+++ b/arch/ia64/kvm/vcpu.h
@@ -388,6 +388,9 @@ static inline u64 __gpfn_is_io(u64 gpfn)
#define _vmm_raw_spin_lock(x) do {}while(0)
#define _vmm_raw_spin_unlock(x) do {}while(0)
#else
+typedef struct {
+ volatile unsigned int lock;
+} vmm_spinlock_t;
#define _vmm_raw_spin_lock(x) \
do { \
__u32 *ia64_spinlock_ptr = (__u32 *) (x); \
@@ -405,12 +408,12 @@ static inline u64 __gpfn_is_io(u64 gpfn)
#define _vmm_raw_spin_unlock(x) \
do { barrier(); \
- ((spinlock_t *)x)->raw_lock.lock = 0; } \
+ ((vmm_spinlock_t *)x)->lock = 0; } \
while (0)
#endif
-void vmm_spin_lock(spinlock_t *lock);
-void vmm_spin_unlock(spinlock_t *lock);
+void vmm_spin_lock(vmm_spinlock_t *lock);
+void vmm_spin_unlock(vmm_spinlock_t *lock);
enum {
I_TLB = 1,
D_TLB = 2