1
2 #ifndef _ASM_POWERPC_TASK_SIZE_64_H
3 #define _ASM_POWERPC_TASK_SIZE_64_H
4
5
6
7
8
9 #define TASK_SIZE_64TB (0x0000400000000000UL)
10 #define TASK_SIZE_128TB (0x0000800000000000UL)
11 #define TASK_SIZE_512TB (0x0002000000000000UL)
12 #define TASK_SIZE_1PB (0x0004000000000000UL)
13 #define TASK_SIZE_2PB (0x0008000000000000UL)
14
15
16
17
18 #define TASK_SIZE_4PB (0x0010000000000000UL)
19
20
21
22
23 #ifdef CONFIG_PPC_64K_PAGES
24
25
26
27 #define TASK_SIZE_USER64 TASK_SIZE_4PB
28 #define DEFAULT_MAP_WINDOW_USER64 TASK_SIZE_128TB
29 #define TASK_CONTEXT_SIZE TASK_SIZE_512TB
30 #else
31 #define TASK_SIZE_USER64 TASK_SIZE_64TB
32 #define DEFAULT_MAP_WINDOW_USER64 TASK_SIZE_64TB
33
34
35
36
37
38 #define TASK_CONTEXT_SIZE TASK_SIZE_64TB
39 #endif
40
41
42
43
44
45 #define TASK_SIZE_USER32 (0x0000000100000000UL - (1 * PAGE_SIZE))
46
47 #define TASK_SIZE_OF(tsk) \
48 (test_tsk_thread_flag(tsk, TIF_32BIT) ? TASK_SIZE_USER32 : \
49 TASK_SIZE_USER64)
50
51 #define TASK_SIZE TASK_SIZE_OF(current)
52
53 #define TASK_UNMAPPED_BASE_USER32 (PAGE_ALIGN(TASK_SIZE_USER32 / 4))
54 #define TASK_UNMAPPED_BASE_USER64 (PAGE_ALIGN(DEFAULT_MAP_WINDOW_USER64 / 4))
55
56
57
58
59
60 #define TASK_UNMAPPED_BASE \
61 ((is_32bit_task()) ? TASK_UNMAPPED_BASE_USER32 : TASK_UNMAPPED_BASE_USER64)
62
63
64
65
66
67 #ifdef CONFIG_PPC_BOOK3S_64
68 #define DEFAULT_MAP_WINDOW \
69 ((is_32bit_task()) ? TASK_SIZE_USER32 : DEFAULT_MAP_WINDOW_USER64)
70 #else
71 #define DEFAULT_MAP_WINDOW TASK_SIZE
72 #endif
73
74 #define STACK_TOP_USER64 DEFAULT_MAP_WINDOW_USER64
75 #define STACK_TOP_USER32 TASK_SIZE_USER32
76 #define STACK_TOP_MAX TASK_SIZE_USER64
77 #define STACK_TOP (is_32bit_task() ? STACK_TOP_USER32 : STACK_TOP_USER64)
78
79 #endif