diff options
author | Xiantao Zhang <xiantao.zhang@intel.com> | 2008-11-08 02:46:59 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-11-11 14:01:30 -0500 |
commit | c60ff51eb26dfcfb0bdc807b09a096aeadd01325 (patch) | |
tree | f594cc6ee6cc42a4b2a13521883c44962d1b0695 | |
parent | 928d4bf747e9c290b690ff515d8f81e8ee226d97 (diff) |
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 <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r-- | arch/ia64/kvm/vcpu.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/ia64/kvm/vcpu.h b/arch/ia64/kvm/vcpu.h index 341e3fee280c..e9b2a4e121c0 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) | |||
384 | #define MODE_IND(psr) \ | 384 | #define MODE_IND(psr) \ |
385 | (((psr).it << 2) + ((psr).dt << 1) + (psr).rt) | 385 | (((psr).it << 2) + ((psr).dt << 1) + (psr).rt) |
386 | 386 | ||
387 | #ifndef CONFIG_SMP | ||
388 | #define _vmm_raw_spin_lock(x) do {}while(0) | ||
389 | #define _vmm_raw_spin_unlock(x) do {}while(0) | ||
390 | #else | ||
387 | #define _vmm_raw_spin_lock(x) \ | 391 | #define _vmm_raw_spin_lock(x) \ |
388 | do { \ | 392 | do { \ |
389 | __u32 *ia64_spinlock_ptr = (__u32 *) (x); \ | 393 | __u32 *ia64_spinlock_ptr = (__u32 *) (x); \ |
@@ -403,6 +407,7 @@ static inline u64 __gpfn_is_io(u64 gpfn) | |||
403 | do { barrier(); \ | 407 | do { barrier(); \ |
404 | ((spinlock_t *)x)->raw_lock.lock = 0; } \ | 408 | ((spinlock_t *)x)->raw_lock.lock = 0; } \ |
405 | while (0) | 409 | while (0) |
410 | #endif | ||
406 | 411 | ||
407 | void vmm_spin_lock(spinlock_t *lock); | 412 | void vmm_spin_lock(spinlock_t *lock); |
408 | void vmm_spin_unlock(spinlock_t *lock); | 413 | void vmm_spin_unlock(spinlock_t *lock); |