diff mbox

[kvm-kmod] build fix for !#defined IOMMU_CACHE

Message ID 20090521061805.GQ20823@sequoia.sous-sol.org (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wright May 21, 2009, 6:18 a.m. UTC
This should fix the build for kernels that don't have IOMMU_CACHE,
IOMMU_CAP_CACHE_COHERENCY or iommu_domain_has_cap defined.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
---
 external-module-compat-comm.h |   13 +++++++++++++
 1 file changed, 13 insertions(+)

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Avi Kivity May 21, 2009, 7:46 a.m. UTC | #1
Chris Wright wrote:
> This should fix the build for kernels that don't have IOMMU_CACHE,
> IOMMU_CAP_CACHE_COHERENCY or iommu_domain_has_cap defined.
>
>   

Applied, thanks.
diff mbox

Patch

diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h
index f6975e0..adf45c5 100644
--- a/external-module-compat-comm.h
+++ b/external-module-compat-comm.h
@@ -791,3 +793,16 @@  static inline struct page *compound_head(struct page *page)
 }
 
 #endif
+
+#include <linux/iommu.h>
+#ifndef IOMMU_CACHE
+
+#define IOMMU_CACHE	(4)
+#define IOMMU_CAP_CACHE_COHERENCY	0x1
+static inline int iommu_domain_has_cap(struct iommu_domain *domain,
+				       unsigned long cap)
+{
+	return 0;
+}
+
+#endif