From: Avi Kivity <a...@redhat.com> Some 2.6.27 kernels (F10) have backported htrimer patches which interfere with the external module hrtimer backports. Rework the backports to allow them to coexist.
Signed-off-by: Avi Kivity <a...@redhat.com> diff --git a/kernel/external-module-compat-comm.h b/kernel/external-module-compat-comm.h index 27fea15..f2343f6 100644 --- a/kernel/external-module-compat-comm.h +++ b/kernel/external-module-compat-comm.h @@ -584,26 +584,33 @@ static inline int get_user_pages_fast(unsigned long start, int nr_pages, #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) -static inline void hrtimer_add_expires_ns(struct hrtimer *timer, u64 delta) +static inline void kvm_hrtimer_add_expires_ns(struct hrtimer *timer, u64 delta) { timer->expires = ktime_add_ns(timer->expires, delta); } -static inline ktime_t hrtimer_get_expires(struct hrtimer *timer) +static inline ktime_t kvm_hrtimer_get_expires(struct hrtimer *timer) { return timer->expires; } -static inline u64 hrtimer_get_expires_ns(struct hrtimer *timer) +static inline u64 kvm_hrtimer_get_expires_ns(struct hrtimer *timer) { return ktime_to_ns(timer->expires); } -static inline void hrtimer_start_expires(struct hrtimer *timer, int mode) +static inline void kvm_hrtimer_start_expires(struct hrtimer *timer, int mode) { hrtimer_start_p(timer, timer->expires, mode); } +#else + +#define kvm_hrtimer_add_expires_ns hrtimer_add_expires_ns +#define kvm_hrtimer_get_expires hrtimer_get_expires +#define kvm_hrtimer_get_expires_ns hrtimer_get_expires_ns +#define kvm_hrtimer_start_expires hrtimer_start_expires + #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28) diff --git a/kernel/ia64/hack-module.awk b/kernel/ia64/hack-module.awk index 3dd2260..a26d567 100644 --- a/kernel/ia64/hack-module.awk +++ b/kernel/ia64/hack-module.awk @@ -1,4 +1,6 @@ BEGIN { split("INIT_WORK on_each_cpu smp_call_function " \ + "hrtimer_add_expires_ns hrtimer_get_expires " \ + "hrtimer_get_expires_ns hrtimer_start_expires " \ "request_irq", compat_apis); } /MODULE_AUTHOR/ { diff --git a/kernel/x86/hack-module.awk b/kernel/x86/hack-module.awk index f40c972..1c80543 100644 --- a/kernel/x86/hack-module.awk +++ b/kernel/x86/hack-module.awk @@ -1,4 +1,6 @@ BEGIN { split("INIT_WORK tsc_khz desc_struct ldttss_desc64 desc_ptr " \ + "hrtimer_add_expires_ns hrtimer_get_expires " \ + "hrtimer_get_expires_ns hrtimer_start_expires " \ "on_each_cpu relay_open request_irq" , compat_apis); } /^int kvm_init\(/ { anon_inodes = 1 } -- To unsubscribe from this list: send the line "unsubscribe kvm-commits" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html