From: Eduardo Habkost <ehabkost@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org, Andrea Arcangeli <aarcange@redhat.com>,
Eduardo Habkost <ehabkost@redhat.com>
Subject: [PATCH 3/3] compat code fixes for RHEL5 kernels
Date: Fri, 23 Jan 2009 16:41:35 -0200 [thread overview]
Message-ID: <1232736095-26244-4-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1232736095-26244-1-git-send-email-ehabkost@redhat.com>
From: Andrea Arcangeli <aarcange@redhat.com>
Compat code for some RHEL5 kernel versions.
This patch also applies to the maint/2.6.29 branch.
[ehabkost: changed pagefault_* to check for RHEL < 5.2 instead of RHEL <= 5.2]
[ehabkost: changed __aligned to check for RHEL <= 5.2 && !defined(__aligned)]
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
kernel/external-module-compat-comm.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/kernel/external-module-compat-comm.h b/kernel/external-module-compat-comm.h
index 981dc96..7f4d591 100644
--- a/kernel/external-module-compat-comm.h
+++ b/kernel/external-module-compat-comm.h
@@ -250,6 +250,7 @@ static inline void blahblah(void)
/* pagefault_enable(), page_fault_disable() - 2.6.20 */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
+#if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(5,2)
static inline void pagefault_disable(void)
{
@@ -276,6 +277,9 @@ static inline void pagefault_enable(void)
preempt_check_resched();
}
+#else
+#include <linux/uaccess.h>
+#endif
#endif
/* vm ops ->fault() was introduced in 2.6.23. */
@@ -405,8 +409,10 @@ static inline ktime_t ktime_get(void)
/* __aligned arrived in 2.6.21 */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,21)
+#if !defined(RHEL_RELEASE_CODE) || (RHEL_RELEASE_CODE <= RHEL_RELEASE_VERSION(5,2) && !defined(__aligned))
#define __aligned(x) __attribute__((__aligned__(x)))
#endif
+#endif
#include <linux/mm.h>
--
1.6.1
prev parent reply other threads:[~2009-01-23 18:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-23 18:41 [PATCH 0/3] kvm-userspace build and compat fixes Eduardo Habkost
2009-01-23 18:41 ` [PATCH 1/3] kvm: qemu: don't fail building when pc-bios dir is empty Eduardo Habkost
2009-01-26 14:46 ` Marcelo Tosatti
2009-01-26 15:57 ` Eduardo Habkost
2009-01-26 16:12 ` Marcelo Tosatti
2009-01-23 18:41 ` [PATCH 2/3] Use native anon_inodes on RHEL5 if available Eduardo Habkost
2009-01-23 18:41 ` Eduardo Habkost [this message]
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=1232736095-26244-4-git-send-email-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=aarcange@redhat.com \
--cc=avi@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox