Skip to content

Commit

Permalink
KVM: ia64: fix vmm_spin_{un}lock for !CONFIG_SMP
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Xiantao Zhang authored and Avi Kivity committed Nov 11, 2008
1 parent 928d4bf commit c60ff51
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/ia64/kvm/vcpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); \
Expand All @@ -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);
Expand Down

0 comments on commit c60ff51

Please sign in to comment.