All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: "Kohl, Bernhard (NSN - DE/Munich)" <bernhard.kohl@nsn.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH] Account for Fedora kernels with backported vzalloc
Date: Tue, 17 May 2011 19:01:32 +0200	[thread overview]
Message-ID: <4DD2A9EC.8090407@siemens.com> (raw)
In-Reply-To: <81D3255A15981A4B912531E3648B1E1604978C78@DEMUEXC005.nsn-intra.net>

On 2011-05-17 17:44, Kohl, Bernhard (NSN - DE/Munich) wrote:
>> -----Original Message-----
>> From: ext Jan Kiszka [mailto:jan.kiszka@siemens.com]
>> Sent: Tuesday, May 17, 2011 5:27 PM
>> To: Kohl, Bernhard (NSN - DE/Munich)
>> Cc: kvm@vger.kernel.org
>> Subject: Re: [PATCH] Account for Fedora kernels with backported
> vzalloc
>>
>> 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 <bernhard.kohl@nsn.com>
>>> ---
>>>  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?
> 
> No, there is nothing in the include/generated/autoconf.h
> to identify a Fedora kernel. I assume this is the place
> where CONFIG_SUSE_KERNEL comes from.
> 
>>
>>>  rm -f include/asm include-compat/asm
>>>  mkdir -p include
>>>  ln -sf asm-"$karch" include/asm
>>> @@ -175,4 +182,5 @@ EOF
>>>
>>>  cat <<EOF > 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 <linux/vmalloc.h>
>>>  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).
> 
> I assume Fedora 14 will stay with kernel 2.6.35 and Fedora 15 starts
> with kernel 2.6.38 where the problem does not exist anyway.
> 

Ok, fine. I've merge it, just with a small reformatting.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

  reply	other threads:[~2011-05-17 17:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-17 14:55 [PATCH] Account for Fedora kernels with backported vzalloc Bernhard Kohl
2011-05-17 15:27 ` Jan Kiszka
2011-05-17 15:44   ` Kohl, Bernhard (NSN - DE/Munich)
2011-05-17 17:01     ` Jan Kiszka [this message]
2011-05-17 17:30 ` Avi Kivity
2011-05-18  9:11   ` Kohl, Bernhard (NSN - DE/Munich)
2011-05-18  9:20     ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DD2A9EC.8090407@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=bernhard.kohl@nsn.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.