[PATCH] KVM: IA64: Fix vmm_spin_{un}lock for !CONFIG_SMP.

From: Xiantao Zhang
Date: Sat Nov 08 2008 - 02:46:59 EST


In the case of !CONFIG_SMP, raw_spinlock_t has no any member
so vmm_spin_lock should also defines the version for !CONFIG_SMP.

Signed-off-by: Xiantao Zhang <xiantao.zhang@xxxxxxxxx>
---
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 341e3fe..e9b2a4e 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)
=20
+#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 =3D (__u32 *) (x); \
@@ -403,6 +407,7 @@ static inline u64 __gpfn_is_io(u64 gpfn)
do { barrier(); \
((spinlock_t *)x)->raw_lock.lock =3D 0; } \
while (0)
+#endif
=20
void vmm_spin_lock(spinlock_t *lock);
void vmm_spin_unlock(spinlock_t *lock);
--=20
1.6.0

--_002_706158FABBBA044BAD4FE898A02E4BC21983F9EBpdsmsx503ccrcor_
Content-Type: application/octet-stream;
name="0001-KVM-IA64-Fix-vmm_spin_-un-lock-for-CONFIG_SMP.patch"
Content-Description: 0001-KVM-IA64-Fix-vmm_spin_-un-lock-for-CONFIG_SMP.patch
Content-Disposition: attachment;
filename="0001-KVM-IA64-Fix-vmm_spin_-un-lock-for-CONFIG_SMP.patch";
size=1237; creation-date="Sat, 08 Nov 2008 15:53:35 GMT";
modification-date="Sat, 08 Nov 2008 15:53:35 GMT"
Content-Transfer-Encoding: base64

RnJvbSBmYWU1NzgyYjM2OWY0Y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3Jhd19zcGluX2xvY2soeCkJIGRvIHt9d2hpbGUoMCkKKyNkZWZpbmUgX3ZtbV9y
YXdfc3Bpbl91bmxvY2soeCkgZG8ge313aGlsZSgwKQorI2Vsc2UKICNkZWZpbmUgX3ZtbV9yYXdf
c3Bpbl9sb2NrKHgpCQkJCQkJXAogCWRvIHsJCQkJCQkJCVwKIAkJX191MzIgKmlhNjRfc3Bpbmxv
Y2tfcHRyID0gKF9fdTMyICopICh4KTsJCVwKQEAgLTQwMyw2ICs0MDcsNyBAQCBzdGF0aWMgaW5s
aW5lIHU2NCBfX2dwZm5faXNfaW8odTY0IGdwZm4pCiAJZG8geyBiYXJyaWVyKCk7CQkJCVwKIAkJ
KChzcGlubG9ja190ICopeCktPnJhd19sb2NrLmxvY2sgPSAwOyB9IFwKIHdoaWxlICgwKQorI2Vu
ZGlmCiAKIHZvaWQgdm1tX3NwaW5fbG9jayhzcGlubG9ja190ICpsb2NrKTsKIHZvaWQgdm1tX3Nw
aW5fdW5sb2NrKHNwaW5sb2NrX3QgKmxvY2spOwotLSAKMS42LjAKCg==

--_002_706158FABBBA044BAD4FE898A02E4BC21983F9EBpdsmsx503ccrcor_--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/