From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] Account for Fedora kernels with backported vzalloc Date: Tue, 17 May 2011 17:27:25 +0200 Message-ID: <4DD293DD.8020005@siemens.com> References: <1305644154-22027-1-git-send-email-bernhard.kohl@nsn.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "kvm@vger.kernel.org" To: Bernhard Kohl Return-path: Received: from david.siemens.de ([192.35.17.14]:34816 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755605Ab1EQP13 (ORCPT ); Tue, 17 May 2011 11:27:29 -0400 In-Reply-To: <1305644154-22027-1-git-send-email-bernhard.kohl@nsn.com> Sender: kvm-owner@vger.kernel.org List-ID: On 2011-05-17 16:55, Bernhard Kohl wrote: > kvm-kmod-2.6.38.6 does not compile on Fedora kernels >= 2.6.35.11. > > Signed-off-by: Bernhard Kohl > --- > configure | 8 ++++++++ > external-module-compat-comm.h | 5 ++++- > 2 files changed, 12 insertions(+), 1 deletions(-) > > diff --git a/configure b/configure > index a40c39f..b91587c 100755 > --- a/configure > +++ b/configure > @@ -153,6 +153,13 @@ if [ -n "$no_uname" -a "$want_module" ]; then > depmod_version=$kernel_version > fi > > +# Check if it is a Fedora kernel, e.g. 2.6.35.13-91.fc14.x86_64 > +if echo "$kernel_version" | grep -qE '[0-9.-]+\.fc[0-9]+\..+'; then > + config_fedora_kernel="#define CONFIG_FEDORA_KERNEL 1" > +else > + config_fedora_kernel="#undef CONFIG_FEDORA_KERNEL" > +fi > + Is there no define set by fedora kernels themselves? > rm -f include/asm include-compat/asm > mkdir -p include > ln -sf asm-"$karch" include/asm > @@ -175,4 +182,5 @@ EOF > > cat < kvm-kmod-config.h > #define KERNEL_EXTRAVERSION $kernel_extraversion > +$config_fedora_kernel > EOF > diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h > index 6b6bddb..b7d9b25 100644 > --- a/external-module-compat-comm.h > +++ b/external-module-compat-comm.h > @@ -881,7 +881,10 @@ static inline u32 hash_32(u32 val, unsigned int bits) > #define __rcu > #endif > > -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) > +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) && \ > + (!defined(CONFIG_FEDORA_KERNEL) || \ > + LINUX_VERSION_CODE == KERNEL_VERSION(2,6,35) && KERNEL_EXTRAVERSION < 11 || \ > + LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35)) > #include > static inline void *vzalloc(unsigned long size) > { Is this intentionally or accidentally targeting Fedora 2.6.35.x only? Because the commit log may imply some 2.6.36-fc could carry it as well (if they exist). Thanks, Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux