diff options
Diffstat (limited to 'include/asm-x86_64/processor.h')
-rw-r--r-- | include/asm-x86_64/processor.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index d641b19f6da5..106f666517bb 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h | |||
@@ -160,16 +160,17 @@ static inline void clear_in_cr4 (unsigned long mask) | |||
160 | /* | 160 | /* |
161 | * User space process size. 47bits minus one guard page. | 161 | * User space process size. 47bits minus one guard page. |
162 | */ | 162 | */ |
163 | #define TASK_SIZE (0x800000000000UL - 4096) | 163 | #define TASK_SIZE64 (0x800000000000UL - 4096) |
164 | 164 | ||
165 | /* This decides where the kernel will search for a free chunk of vm | 165 | /* This decides where the kernel will search for a free chunk of vm |
166 | * space during mmap's. | 166 | * space during mmap's. |
167 | */ | 167 | */ |
168 | #define IA32_PAGE_OFFSET ((current->personality & ADDR_LIMIT_3GB) ? 0xc0000000 : 0xFFFFe000) | 168 | #define IA32_PAGE_OFFSET ((current->personality & ADDR_LIMIT_3GB) ? 0xc0000000 : 0xFFFFe000) |
169 | #define TASK_UNMAPPED_32 PAGE_ALIGN(IA32_PAGE_OFFSET/3) | 169 | |
170 | #define TASK_UNMAPPED_64 PAGE_ALIGN(TASK_SIZE/3) | 170 | #define TASK_SIZE (test_thread_flag(TIF_IA32) ? IA32_PAGE_OFFSET : TASK_SIZE64) |
171 | #define TASK_UNMAPPED_BASE \ | 171 | #define TASK_SIZE_OF(child) ((test_tsk_thread_flag(child, TIF_IA32)) ? IA32_PAGE_OFFSET : TASK_SIZE64) |
172 | (test_thread_flag(TIF_IA32) ? TASK_UNMAPPED_32 : TASK_UNMAPPED_64) | 172 | |
173 | #define TASK_UNMAPPED_BASE PAGE_ALIGN(TASK_SIZE/3) | ||
173 | 174 | ||
174 | /* | 175 | /* |
175 | * Size of io_bitmap. | 176 | * Size of io_bitmap. |
@@ -279,6 +280,14 @@ struct thread_struct { | |||
279 | set_fs(USER_DS); \ | 280 | set_fs(USER_DS); \ |
280 | } while(0) | 281 | } while(0) |
281 | 282 | ||
283 | #define get_debugreg(var, register) \ | ||
284 | __asm__("movq %%db" #register ", %0" \ | ||
285 | :"=r" (var)) | ||
286 | #define set_debugreg(value, register) \ | ||
287 | __asm__("movq %0,%%db" #register \ | ||
288 | : /* no output */ \ | ||
289 | :"r" (value)) | ||
290 | |||
282 | struct task_struct; | 291 | struct task_struct; |
283 | struct mm_struct; | 292 | struct mm_struct; |
284 | 293 | ||