diff options
Diffstat (limited to 'arch/um/os-Linux/skas/mem.c')
-rw-r--r-- | arch/um/os-Linux/skas/mem.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/um/os-Linux/skas/mem.c b/arch/um/os-Linux/skas/mem.c index 5c8946320799..0f7df4eb903f 100644 --- a/arch/um/os-Linux/skas/mem.c +++ b/arch/um/os-Linux/skas/mem.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include "sysdep/ptrace.h" | 25 | #include "sysdep/ptrace.h" |
26 | #include "sysdep/stub.h" | 26 | #include "sysdep/stub.h" |
27 | #include "init.h" | 27 | #include "init.h" |
28 | #include "kern_constants.h" | ||
28 | 29 | ||
29 | extern unsigned long batch_syscall_stub, __syscall_stub_start; | 30 | extern unsigned long batch_syscall_stub, __syscall_stub_start; |
30 | 31 | ||
@@ -149,8 +150,8 @@ long run_syscall_stub(struct mm_id * mm_idp, int syscall, | |||
149 | *stack = 0; | 150 | *stack = 0; |
150 | multi_op_count++; | 151 | multi_op_count++; |
151 | 152 | ||
152 | if(!done && ((((unsigned long) stack) & ~PAGE_MASK) < | 153 | if(!done && ((((unsigned long) stack) & ~UM_KERN_PAGE_MASK) < |
153 | PAGE_SIZE - 10 * sizeof(long))){ | 154 | UM_KERN_PAGE_SIZE - 10 * sizeof(long))){ |
154 | *addr = stack; | 155 | *addr = stack; |
155 | return 0; | 156 | return 0; |
156 | } | 157 | } |
@@ -168,8 +169,8 @@ long syscall_stub_data(struct mm_id * mm_idp, | |||
168 | /* If *addr still is uninitialized, it *must* contain NULL. | 169 | /* If *addr still is uninitialized, it *must* contain NULL. |
169 | * Thus in this case do_syscall_stub correctly won't be called. | 170 | * Thus in this case do_syscall_stub correctly won't be called. |
170 | */ | 171 | */ |
171 | if((((unsigned long) *addr) & ~PAGE_MASK) >= | 172 | if((((unsigned long) *addr) & ~UM_KERN_PAGE_MASK) >= |
172 | PAGE_SIZE - (10 + data_count) * sizeof(long)) { | 173 | UM_KERN_PAGE_SIZE - (10 + data_count) * sizeof(long)) { |
173 | ret = do_syscall_stub(mm_idp, addr); | 174 | ret = do_syscall_stub(mm_idp, addr); |
174 | /* in case of error, don't overwrite data on stack */ | 175 | /* in case of error, don't overwrite data on stack */ |
175 | if(ret) | 176 | if(ret) |
@@ -183,8 +184,8 @@ long syscall_stub_data(struct mm_id * mm_idp, | |||
183 | 184 | ||
184 | memcpy(stack + 1, data, data_count * sizeof(long)); | 185 | memcpy(stack + 1, data, data_count * sizeof(long)); |
185 | 186 | ||
186 | *stub_addr = (void *)(((unsigned long)(stack + 1) & ~PAGE_MASK) + | 187 | *stub_addr = (void *)(((unsigned long)(stack + 1) & |
187 | UML_CONFIG_STUB_DATA); | 188 | ~UM_KERN_PAGE_MASK) + UML_CONFIG_STUB_DATA); |
188 | 189 | ||
189 | return 0; | 190 | return 0; |
190 | } | 191 | } |