diff options
-rw-r--r-- | kvm/kernel/external-module-compat.h | 11 | ||||
-rw-r--r-- | kvm/kernel/hack-module.awk | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/kvm/kernel/external-module-compat.h b/kvm/kernel/external-module-compat.h index 4ba4bac9d..dfd90cf9d 100644 --- a/kvm/kernel/external-module-compat.h +++ b/kvm/kernel/external-module-compat.h @@ -53,6 +53,17 @@ int kvm_smp_call_function_single(int cpu, void (*func)(void *info), #endif +/* on_each_cpu() lost an argument in 2.6.27. */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) + +#define kvm_on_each_cpu(func, info, wait) on_each_cpu(func, info, 0, wait) + +#else + +#define kvm_on_each_cpu(func, info, wait) on_each_cpu(func, info, wait) + +#endif + /* * The cpu hotplug stubs are broken if !CONFIG_CPU_HOTPLUG */ diff --git a/kvm/kernel/hack-module.awk b/kvm/kernel/hack-module.awk index fd23ec3ce..4a9379c8c 100644 --- a/kvm/kernel/hack-module.awk +++ b/kvm/kernel/hack-module.awk @@ -58,6 +58,8 @@ { sub(/\<desc_ptr\>/, "kvm_desc_ptr") } { sub(/\<__user\>/, " ") } +{ sub(/\<on_each_cpu\>/, "kvm_on_each_cpu") } + /^\t\.name = "kvm"/ { $0 = "\tset_kset_name(\"kvm\")," } /#include <linux\/compiler.h>/ { $0 = "" } |