ia64/xen-unstable

view unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h @ 11995:9f0b88aaf170

PV-on-HVM: Include compatibility kzalloc implementation for kernels
before 2.6.14.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Signed-off-by: K. Y. Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
author Ian Campbell <ian.campbell@xensource.com>
date Wed Oct 25 13:58:30 2006 +0100 (2006-10-25)
parents db0d3f22e149
children fc68e3ef9139
line source
1 #ifndef COMPAT_INCLUDE_XEN_PLATFORM_COMPAT_H
2 #define COMPAT_INCLUDE_XEN_PLATFORM_COMPAT_H
4 #include <linux/version.h>
6 #include <linux/spinlock.h>
8 #if defined(__LINUX_COMPILER_H) && !defined(__always_inline)
9 #define __always_inline inline
10 #endif
12 #if defined(__LINUX_SPINLOCK_H) && !defined(DEFINE_SPINLOCK)
13 #define DEFINE_SPINLOCK(x) spinlock_t x = SPIN_LOCK_UNLOCKED
14 #endif
16 #if defined(_LINUX_INIT_H) && !defined(__init)
17 #define __init
18 #endif
20 #if defined(__LINUX_CACHE_H) && !defined(__read_mostly)
21 #define __read_mostly
22 #endif
24 #if defined(_LINUX_SKBUFF_H) && !defined(NET_IP_ALIGN)
25 #define NET_IP_ALIGN 0
26 #endif
28 #if defined(_LINUX_FS_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9)
29 #define nonseekable_open(inode, filp) /* Nothing to do */
30 #endif
32 #if defined(_LINUX_MM_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
33 unsigned long vmalloc_to_pfn(void *addr);
34 #endif
36 #if defined(__LINUX_COMPLETION_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11)
37 unsigned long wait_for_completion_timeout(struct completion *x, unsigned long timeout);
38 #endif
40 #if defined(_LINUX_SCHED_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
41 signed long schedule_timeout_interruptible(signed long timeout);
42 #endif
44 #if defined(_LINUX_SLAB_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
45 void *kzalloc(size_t size, int flags);
46 #endif
48 #endif