From patchwork Thu May 21 06:18:05 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wright X-Patchwork-Id: 25182 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4L6IpjH009820 for ; Thu, 21 May 2009 06:18:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751130AbZEUGSr (ORCPT ); Thu, 21 May 2009 02:18:47 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750924AbZEUGSr (ORCPT ); Thu, 21 May 2009 02:18:47 -0400 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 Received: from sequoia.sous-sol.org (sequoia.sous-sol.org [127.0.0.1]) by sequoia.sous-sol.org (8.14.2/8.14.2) with ESMTP id n4L6I5FC026117; Wed, 20 May 2009 23:18:05 -0700 Received: (from chrisw@localhost) by sequoia.sous-sol.org (8.14.2/8.14.2/Submit) id n4L6I5lb026116; Wed, 20 May 2009 23:18:05 -0700 Date: Wed, 20 May 2009 23:18:05 -0700 From: Chris Wright To: Nikola Ciprich Cc: Chris Wright , =?iso-8859-1?Q?Ren=E9?= Pfeiffer , KVM list , nikola.ciprich@linuxbox.cz, Avi Kivity Subject: [PATCH kvm-kmod] build fix for !#defined IOMMU_CACHE 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-Disposition: inline In-Reply-To: <20090521053324.GP20823@sequoia.sous-sol.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on sequoia.sous-sol.org X-Virus-Status: Clean Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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(+) -- 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 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