From 6636989452d1b220d746a56b2bca06c9de7056df Mon Sep 17 00:00:00 2001 From: Jan Kiszka <jan.kiszka@siemens.com> Date: Thu, 21 May 2009 17:09:02 -0700 Subject: [PATCH 24/25] Adjust kvm_smp_send_reschedule availability Also x86_64 before 2.6.26 requires kvm_smp_send_reschedule. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com> (cherry picked from commit kvm-kmod: 3d5f90d84d95fb8bbf3b95679bdede589009c1b1) Signed-off-by: Chris Wright <chrisw@redhat.com> Bugzilla: 498085 Message-Id: <1242950943-30180-25-git-send-email-chrisw@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> RH-Upstream-status: applied Acked-by: Juan Quintela <quintela@redhat.com> Acked-by: Marcelo Tosatti <mtosatti@redhat.com> Acked-by: Don Dutile <ddutile@redhat.com> --- kernel/external-module-compat-comm.h | 6 ++++-- kernel/external-module-compat.c | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/kernel/external-module-compat-comm.h b/kernel/external-module-compat-comm.h index 29934e5..2ad7832 100644 --- a/kernel/external-module-compat-comm.h +++ b/kernel/external-module-compat-comm.h @@ -214,10 +214,12 @@ typedef _Bool bool; #endif /* - * smp_call_function_mask() is not defined/exported below 2.6.24 + * smp_call_function_mask() is not defined/exported below 2.6.24 on all + * targets and below 2.6.26 on x86-64 */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) || \ + (defined CONFIG_X86_64 && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)) int kvm_smp_call_function_mask(cpumask_t mask, void (*func) (void *info), void *info, int wait); diff --git a/kernel/external-module-compat.c b/kernel/external-module-compat.c index 390a140..cdcce48 100644 --- a/kernel/external-module-compat.c +++ b/kernel/external-module-compat.c @@ -125,10 +125,12 @@ uint64_t div64_u64(uint64_t dividend, uint64_t divisor) #endif /* - * smp_call_function_mask() is not defined/exported below 2.6.24 + * smp_call_function_mask() is not defined/exported below 2.6.24 on all + * targets and below 2.6.26 on x86-64 */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24) || \ + (defined CONFIG_X86_64 && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)) #include <linux/smp.h> -- 1.6.3.rc4.29.g8146