From: Chris Wright Subject: [PATCH kvm-kmod] build fix for !#defined IOMMU_CACHE Date: Wed, 20 May 2009 23:18:05 -0700 Message-ID: <20090521061805.GQ20823@sequoia.sous-sol.org> References: <20090520174858.GA16793@nightfall.luchs.at> <20090520203022.GA6154@nik-comp.linuxbox.cz> <20090520204512.GB6154@nik-comp.linuxbox.cz> <20090521053324.GP20823@sequoia.sous-sol.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Chris Wright , =?iso-8859-1?Q?Ren=E9?= Pfeiffer , KVM list , nikola.ciprich@linuxbox.cz, Avi Kivity To: Nikola Ciprich Return-path: Received: from sous-sol.org ([216.99.217.87]:37108 "EHLO sequoia.sous-sol.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750725AbZEUGSq (ORCPT ); Thu, 21 May 2009 02:18:46 -0400 Content-Disposition: inline In-Reply-To: <20090521053324.GP20823@sequoia.sous-sol.org> Sender: kvm-owner@vger.kernel.org List-ID: 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 --- external-module-compat-comm.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 +#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