diff options
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r-- | include/linux/kernel.h | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index a8868a32098c..34a5036debd3 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | 5 | ||
6 | #include <stdarg.h> | 6 | #include <stdarg.h> |
7 | #include <linux/limits.h> | ||
7 | #include <linux/linkage.h> | 8 | #include <linux/linkage.h> |
8 | #include <linux/stddef.h> | 9 | #include <linux/stddef.h> |
9 | #include <linux/types.h> | 10 | #include <linux/types.h> |
@@ -14,36 +15,9 @@ | |||
14 | #include <linux/printk.h> | 15 | #include <linux/printk.h> |
15 | #include <linux/build_bug.h> | 16 | #include <linux/build_bug.h> |
16 | #include <asm/byteorder.h> | 17 | #include <asm/byteorder.h> |
18 | #include <asm/div64.h> | ||
17 | #include <uapi/linux/kernel.h> | 19 | #include <uapi/linux/kernel.h> |
18 | 20 | ||
19 | #define USHRT_MAX ((u16)(~0U)) | ||
20 | #define SHRT_MAX ((s16)(USHRT_MAX>>1)) | ||
21 | #define SHRT_MIN ((s16)(-SHRT_MAX - 1)) | ||
22 | #define INT_MAX ((int)(~0U>>1)) | ||
23 | #define INT_MIN (-INT_MAX - 1) | ||
24 | #define UINT_MAX (~0U) | ||
25 | #define LONG_MAX ((long)(~0UL>>1)) | ||
26 | #define LONG_MIN (-LONG_MAX - 1) | ||
27 | #define ULONG_MAX (~0UL) | ||
28 | #define LLONG_MAX ((long long)(~0ULL>>1)) | ||
29 | #define LLONG_MIN (-LLONG_MAX - 1) | ||
30 | #define ULLONG_MAX (~0ULL) | ||
31 | #define SIZE_MAX (~(size_t)0) | ||
32 | #define PHYS_ADDR_MAX (~(phys_addr_t)0) | ||
33 | |||
34 | #define U8_MAX ((u8)~0U) | ||
35 | #define S8_MAX ((s8)(U8_MAX>>1)) | ||
36 | #define S8_MIN ((s8)(-S8_MAX - 1)) | ||
37 | #define U16_MAX ((u16)~0U) | ||
38 | #define S16_MAX ((s16)(U16_MAX>>1)) | ||
39 | #define S16_MIN ((s16)(-S16_MAX - 1)) | ||
40 | #define U32_MAX ((u32)~0U) | ||
41 | #define S32_MAX ((s32)(U32_MAX>>1)) | ||
42 | #define S32_MIN ((s32)(-S32_MAX - 1)) | ||
43 | #define U64_MAX ((u64)~0ULL) | ||
44 | #define S64_MAX ((s64)(U64_MAX>>1)) | ||
45 | #define S64_MIN ((s64)(-S64_MAX - 1)) | ||
46 | |||
47 | #define STACK_MAGIC 0xdeadbeef | 21 | #define STACK_MAGIC 0xdeadbeef |
48 | 22 | ||
49 | /** | 23 | /** |
@@ -133,12 +107,10 @@ | |||
133 | * | 107 | * |
134 | * Rounds @x up to next multiple of @y. If @y will always be a power | 108 | * Rounds @x up to next multiple of @y. If @y will always be a power |
135 | * of 2, consider using the faster round_up(). | 109 | * of 2, consider using the faster round_up(). |
136 | * | ||
137 | * The `const' here prevents gcc-3.3 from calling __divdi3 | ||
138 | */ | 110 | */ |
139 | #define roundup(x, y) ( \ | 111 | #define roundup(x, y) ( \ |
140 | { \ | 112 | { \ |
141 | const typeof(y) __y = y; \ | 113 | typeof(y) __y = y; \ |
142 | (((x) + (__y - 1)) / __y) * __y; \ | 114 | (((x) + (__y - 1)) / __y) * __y; \ |
143 | } \ | 115 | } \ |
144 | ) | 116 | ) |
@@ -204,7 +176,6 @@ | |||
204 | #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) | 176 | #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) |
205 | 177 | ||
206 | #ifdef CONFIG_LBDAF | 178 | #ifdef CONFIG_LBDAF |
207 | # include <asm/div64.h> | ||
208 | # define sector_div(a, b) do_div(a, b) | 179 | # define sector_div(a, b) do_div(a, b) |
209 | #else | 180 | #else |
210 | # define sector_div(n, b)( \ | 181 | # define sector_div(n, b)( \ |