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>
This commit is contained in:
parent
928d4bf747
commit
c60ff51eb2
1 changed files with 5 additions and 0 deletions
|
@ -384,6 +384,10 @@ static inline u64 __gpfn_is_io(u64 gpfn)
|
||||||
#define MODE_IND(psr) \
|
#define MODE_IND(psr) \
|
||||||
(((psr).it << 2) + ((psr).dt << 1) + (psr).rt)
|
(((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) \
|
#define _vmm_raw_spin_lock(x) \
|
||||||
do { \
|
do { \
|
||||||
__u32 *ia64_spinlock_ptr = (__u32 *) (x); \
|
__u32 *ia64_spinlock_ptr = (__u32 *) (x); \
|
||||||
|
@ -403,6 +407,7 @@ static inline u64 __gpfn_is_io(u64 gpfn)
|
||||||
do { barrier(); \
|
do { barrier(); \
|
||||||
((spinlock_t *)x)->raw_lock.lock = 0; } \
|
((spinlock_t *)x)->raw_lock.lock = 0; } \
|
||||||
while (0)
|
while (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
void vmm_spin_lock(spinlock_t *lock);
|
void vmm_spin_lock(spinlock_t *lock);
|
||||||
void vmm_spin_unlock(spinlock_t *lock);
|
void vmm_spin_unlock(spinlock_t *lock);
|
||||||
|
|
Loading…
Reference in a new issue