ia64/xen-unstable

view unmodified_drivers/linux-2.6/compat-include/xen/platform-compat.h @ 12327:eea9247ad5a0

[XENOPROF] Oprofile user level samples for passive domains are being lost.
The number of of lost samples is most significant when dom0 is idle.

From: joserenato.santos@hp.com
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Nov 09 11:47:42 2006 +0000 (2006-11-09)
parents 2f34c6bcfe45
children c242b6d6a64a
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_ERR_H) && !defined(IS_ERR_VALUE)
29 #define IS_ERR_VALUE(x) unlikely((x) > (unsigned long)-1000L)
30 #endif
32 #if defined(_ASM_IA64_PGTABLE_H) && !defined(_PGTABLE_NOPUD_H)
33 #include <asm-generic/pgtable-nopud.h>
34 #endif
36 /* Some kernels have this typedef backported so we cannot reliably
37 * detect based on version number, hence we forcibly #define it.
38 */
39 #if defined(__LINUX_TYPES_H) || defined(__LINUX_GFP_H)
40 #define gfp_t unsigned
41 #endif
43 #if defined(_LINUX_FS_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9)
44 #define nonseekable_open(inode, filp) /* Nothing to do */
45 #endif
47 #if defined(_LINUX_MM_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
48 unsigned long vmalloc_to_pfn(void *addr);
49 #endif
51 #if defined(__LINUX_COMPLETION_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11)
52 unsigned long wait_for_completion_timeout(struct completion *x, unsigned long timeout);
53 #endif
55 #if defined(_LINUX_SCHED_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
56 signed long schedule_timeout_interruptible(signed long timeout);
57 #endif
59 #if defined(_LINUX_SLAB_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
60 void *kzalloc(size_t size, int flags);
61 #endif
63 #if defined(_LINUX_BLKDEV_H) && LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
64 #define end_that_request_last(req, uptodate) end_that_request_last(req)
65 #endif
67 #endif