diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-02-09 12:24:37 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2008-02-09 12:24:41 -0500 |
commit | 6252d702c5311ce916caf75ed82e5c8245171c92 (patch) | |
tree | 3490f27b5f888ff2c1ec915d4e7201000f37a771 /include/asm-s390/processor.h | |
parent | 5a216a20837c5f5fa1ca4b8ae8991ffd96b08e6f (diff) |
[S390] dynamic page tables.
Add support for different number of page table levels dependent
on the highest address used for a process. This will cause a 31 bit
process to use a two level page table instead of the four level page
table that is the default after the pud has been introduced. Likewise
a normal 64 bit process will use three levels instead of four. Only
if a process runs out of the 4 tera bytes which can be addressed with
a three level page table the fourth level is dynamically added. Then
the process can use up to 8 peta byte.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'include/asm-s390/processor.h')
-rw-r--r-- | include/asm-s390/processor.h | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/include/asm-s390/processor.h b/include/asm-s390/processor.h index 5a21f457d583..51d88912aa20 100644 --- a/include/asm-s390/processor.h +++ b/include/asm-s390/processor.h | |||
@@ -81,11 +81,12 @@ extern int get_cpu_capability(unsigned int *); | |||
81 | 81 | ||
82 | #ifndef __s390x__ | 82 | #ifndef __s390x__ |
83 | #define STACK_TOP (1UL << 31) | 83 | #define STACK_TOP (1UL << 31) |
84 | #define STACK_TOP_MAX (1UL << 31) | ||
84 | #else /* __s390x__ */ | 85 | #else /* __s390x__ */ |
85 | #define STACK_TOP (1UL << (test_thread_flag(TIF_31BIT) ? 31:53)) | 86 | #define STACK_TOP (1UL << (test_thread_flag(TIF_31BIT) ? 31:42)) |
87 | #define STACK_TOP_MAX (1UL << 42) | ||
86 | #endif /* __s390x__ */ | 88 | #endif /* __s390x__ */ |
87 | 89 | ||
88 | #define STACK_TOP_MAX STACK_TOP | ||
89 | 90 | ||
90 | #endif | 91 | #endif |
91 | 92 | ||
@@ -142,8 +143,6 @@ struct stack_frame { | |||
142 | /* | 143 | /* |
143 | * Do necessary setup to start up a new thread. | 144 | * Do necessary setup to start up a new thread. |
144 | */ | 145 | */ |
145 | #ifndef __s390x__ | ||
146 | |||
147 | #define start_thread(regs, new_psw, new_stackp) do { \ | 146 | #define start_thread(regs, new_psw, new_stackp) do { \ |
148 | set_fs(USER_DS); \ | 147 | set_fs(USER_DS); \ |
149 | regs->psw.mask = psw_user_bits; \ | 148 | regs->psw.mask = psw_user_bits; \ |
@@ -151,24 +150,6 @@ struct stack_frame { | |||
151 | regs->gprs[15] = new_stackp ; \ | 150 | regs->gprs[15] = new_stackp ; \ |
152 | } while (0) | 151 | } while (0) |
153 | 152 | ||
154 | #else /* __s390x__ */ | ||
155 | |||
156 | #define start_thread(regs, new_psw, new_stackp) do { \ | ||
157 | set_fs(USER_DS); \ | ||
158 | regs->psw.mask = psw_user_bits; \ | ||
159 | regs->psw.addr = new_psw; \ | ||
160 | regs->gprs[15] = new_stackp; \ | ||
161 | } while (0) | ||
162 | |||
163 | #define start_thread31(regs, new_psw, new_stackp) do { \ | ||
164 | set_fs(USER_DS); \ | ||
165 | regs->psw.mask = psw_user32_bits; \ | ||
166 | regs->psw.addr = new_psw; \ | ||
167 | regs->gprs[15] = new_stackp; \ | ||
168 | } while (0) | ||
169 | |||
170 | #endif /* __s390x__ */ | ||
171 | |||
172 | /* Forward declaration, a strange C thing */ | 153 | /* Forward declaration, a strange C thing */ |
173 | struct task_struct; | 154 | struct task_struct; |
174 | struct mm_struct; | 155 | struct mm_struct; |