diff options
Diffstat (limited to 'arch/um/kernel/um_arch.c')
-rw-r--r-- | arch/um/kernel/um_arch.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 56deed623446..9db85b2ce698 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c | |||
@@ -150,7 +150,7 @@ __uml_setup("root=", uml_root_setup, | |||
150 | static int __init no_skas_debug_setup(char *line, int *add) | 150 | static int __init no_skas_debug_setup(char *line, int *add) |
151 | { | 151 | { |
152 | printf("'debug' is not necessary to gdb UML in skas mode - run \n"); | 152 | printf("'debug' is not necessary to gdb UML in skas mode - run \n"); |
153 | printf("'gdb linux'"); | 153 | printf("'gdb linux'\n"); |
154 | 154 | ||
155 | return 0; | 155 | return 0; |
156 | } | 156 | } |
@@ -258,6 +258,7 @@ int __init linux_main(int argc, char **argv) | |||
258 | { | 258 | { |
259 | unsigned long avail, diff; | 259 | unsigned long avail, diff; |
260 | unsigned long virtmem_size, max_physmem; | 260 | unsigned long virtmem_size, max_physmem; |
261 | unsigned long stack; | ||
261 | unsigned int i; | 262 | unsigned int i; |
262 | int add; | 263 | int add; |
263 | char * mode; | 264 | char * mode; |
@@ -348,7 +349,9 @@ int __init linux_main(int argc, char **argv) | |||
348 | } | 349 | } |
349 | 350 | ||
350 | virtmem_size = physmem_size; | 351 | virtmem_size = physmem_size; |
351 | avail = TASK_SIZE - start_vm; | 352 | stack = (unsigned long) argv; |
353 | stack &= ~(1024 * 1024 - 1); | ||
354 | avail = stack - start_vm; | ||
352 | if (physmem_size > avail) | 355 | if (physmem_size > avail) |
353 | virtmem_size = avail; | 356 | virtmem_size = avail; |
354 | end_vm = start_vm + virtmem_size; | 357 | end_vm = start_vm + virtmem_size; |