4 #define get_cpu_var(p) (p)
5 #define __get_cpu_var(p) (p)
6 #define BITS_PER_LONG 64
7 #define __GFP_BITS_SHIFT 20
8 #define __GFP_BITS_MASK ((int)((1 << __GFP_BITS_SHIFT) - 1))
12 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
14 #define ULONG_MAX (~0UL)
17 #define __force __attribute__((force))
18 #define __bitwise__ __attribute__((bitwise))
24 typedef unsigned int u32;
26 typedef unsigned long long u64;
27 typedef unsigned char u8;
28 typedef unsigned short u16;
30 typedef unsigned long pgoff_t;
36 struct vma_shared { int prio_tree_node; };
37 struct vm_area_struct {
38 unsigned long vm_pgoff;
39 unsigned long vm_start;
41 struct vma_shared shared;
48 static inline void preempt_enable(void) { do {; } while(0);}
49 static inline void preempt_disable(void) { do {; } while(0);}
51 static inline void __set_bit(int bit, unsigned long *map) {
52 unsigned long *p = map + bit / BITS_PER_LONG;
53 bit = bit & (BITS_PER_LONG -1);
57 static inline int test_bit(int bit, unsigned long *map) {
58 unsigned long *p = map + bit / BITS_PER_LONG;
59 bit = bit & (BITS_PER_LONG -1);
60 return *p & (1UL << bit) ? 1 : 0;
63 static inline void __clear_bit(int bit, unsigned long *map) {
64 unsigned long *p = map + bit / BITS_PER_LONG;
65 bit = bit & (BITS_PER_LONG -1);
68 #define BUG_ON(c) do { if (c) abort(); } while (0)
70 #define container_of(ptr, type, member) ({ \
71 const typeof( ((type *)0)->member ) *__mptr = (ptr); \
72 (type *)( (char *)__mptr - __builtin_offsetof(type,member) );})
77 #define __CHECK_ENDIAN__
78 #ifdef __CHECK_ENDIAN__
79 #define __bitwise __bitwise__
84 typedef u16 __bitwise __le16;
85 typedef u16 __bitwise __be16;
86 typedef u32 __bitwise __le32;
87 typedef u32 __bitwise __be32;
88 typedef u64 __bitwise __le64;
89 typedef u64 __bitwise __be64;
91 #define cpu_to_le64(x) ((__force __le64)(u64)(x))
92 #define le64_to_cpu(x) ((__force u64)(__le64)(x))
93 #define cpu_to_le32(x) ((__force __le32)(u32)(x))
94 #define le32_to_cpu(x) ((__force u32)(__le32)(x))
95 #define cpu_to_le16(x) ((__force __le16)(u16)(x))
96 #define le16_to_cpu(x) ((__force u16)(__le16)(x))