From: Xiantao Zhang Date: Sat, 8 Nov 2008 07:46:59 +0000 (+0800) Subject: KVM: ia64: fix vmm_spin_{un}lock for !CONFIG_SMP X-Git-Tag: v2.6.28-rc5~75^2~1 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c60ff51eb26dfcfb0bdc807b09a096aeadd01325;p=linux-2.6-omap-h63xx.git KVM: ia64: fix vmm_spin_{un}lock for !CONFIG_SMP In the case of !CONFIG_SMP, raw_spinlock_t is empty and the spinlock functions don't build. Fix by defining spinlock functions for the uniprocessor case. Signed-off-by: Xiantao Zhang Signed-off-by: Avi Kivity --- diff --git a/arch/ia64/kvm/vcpu.h b/arch/ia64/kvm/vcpu.h index 341e3fee280..e9b2a4e121c 100644 --- a/arch/ia64/kvm/vcpu.h +++ b/arch/ia64/kvm/vcpu.h @@ -384,6 +384,10 @@ static inline u64 __gpfn_is_io(u64 gpfn) #define MODE_IND(psr) \ (((psr).it << 2) + ((psr).dt << 1) + (psr).rt) +#ifndef CONFIG_SMP +#define _vmm_raw_spin_lock(x) do {}while(0) +#define _vmm_raw_spin_unlock(x) do {}while(0) +#else #define _vmm_raw_spin_lock(x) \ do { \ __u32 *ia64_spinlock_ptr = (__u32 *) (x); \ @@ -403,6 +407,7 @@ static inline u64 __gpfn_is_io(u64 gpfn) do { barrier(); \ ((spinlock_t *)x)->raw_lock.lock = 0; } \ while (0) +#endif void vmm_spin_lock(spinlock_t *lock); void vmm_spin_unlock(spinlock_t *lock);