From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [ANNOUNCE] kvm-38 release Date: Wed, 12 Sep 2007 12:30:16 +0300 Message-ID: <46E7B1A8.9010206@qumranet.com> References: <46E7AA1B.2070404@qumranet.com> <46E7AC76.8000903@quicknet.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080605070001090605040606" Cc: kvm-devel To: Pelle Return-path: In-Reply-To: <46E7AC76.8000903-5JapdU7xTciEVqv0pETR8A@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org This is a multi-part message in MIME format. --------------080605070001090605040606 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Pelle wrote: > Hi, > > What kernel is required to run this version? > I get the message > kvm: unknown symbol div64_64 > when inserting this module in my ubuntu feisty 2.6.20-16-generic kernel. > A quick google led me to believe this is only recently included in the > kernel. > Please try the attached patch. -- error compiling committee.c: too many arguments to function --------------080605070001090605040606 Content-Type: text/x-patch; name="div64_64-compat.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="div64_64-compat.patch" diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h index 74bc072..a60d98b 100644 --- a/kernel/external-module-compat.h +++ b/kernel/external-module-compat.h @@ -13,6 +13,7 @@ #include #include #include +#include /* * 2.6.16 does not have GFP_NOWAIT @@ -368,3 +369,38 @@ static inline void preempt_notifier_sys_exit(void) {} #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21) #define HRTIMER_MODE_ABS HRTIMER_ABS #endif + +/* div64_64 is fairly new */ +#ifdef LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,21) + +#ifdef CONFIG_64BIT + +static inline uint64_t div64_64(uint64_t dividend, uint64_t divisor) +{ + return dividend / divisor; +} + +#else + +/* 64bit divisor, dividend and result. dynamic precision */ +static inline uint64_t div64_64(uint64_t dividend, uint64_t divisor) +{ + uint32_t high, d; + + high = divisor >> 32; + if (high) { + unsigned int shift = fls(high); + + d = divisor >> shift; + dividend >>= shift; + } else + d = divisor; + + do_div(dividend, d); + + return dividend; +} + +#endif + +#endif --------------080605070001090605040606 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ --------------080605070001090605040606 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --------------080605070001090605040606--