kvm: external module: backward compatibility for PAGE_KERNEL_UC on ia64
[qemu-kvm/fedora.git] / kvm / kernel / ia64 / external-module-compat.h
blobbc78c3d5bf3ac31d853d3e312ec8af8ca6821ae3
1 /*
2 * Compatibility header for building as an external module.
3 */
5 #ifndef __ASSEMBLY__
6 #include <linux/version.h>
8 #include "../external-module-compat-comm.h"
10 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)
11 #error "KVM/IA-64 Can't be compiled if kernel version < 2.6.26"
12 #endif
14 #ifndef CONFIG_PREEMPT_NOTIFIERS
15 /*Now, Just print an error message if no preempt notifiers configured!!
16 TODO: Implement it later! */
17 #error "KVM/IA-64 depends on preempt notifiers in kernel."
18 #endif
20 /* smp_call_function() lost an argument in 2.6.27. */
21 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
23 #define kvm_smp_call_function(func, info, wait) smp_call_function(func, info, 0, wait)
25 #else
27 #define kvm_smp_call_function(func, info, wait) smp_call_function(func, info, wait)
29 #endif
31 /*There is no struct fdesc definition <2.6.27*/
32 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
33 struct fdesc {
34 uint64_t ip;
35 uint64_t gp;
37 #endif
39 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
41 typedef u64 phys_addr_t;
43 #endif
45 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
47 #define PAGE_KERNEL_UC __pgprot(__DIRTY_BITS | _PAGE_PL_0 | _PAGE_AR_RWX | \
48 _PAGE_MA_UC)
49 #endif
51 #endif
53 #ifndef CONFIG_HAVE_KVM_IRQCHIP
54 #define CONFIG_HAVE_KVM_IRQCHIP 1
55 #endif