diff options
author | Hyok S. Choi <hyok.choi@samsung.com> | 2006-01-13 16:04:17 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-01-13 16:04:17 -0500 |
commit | e72b04756f16e40dfd6dab3da81e03fe6dfe16e6 (patch) | |
tree | 1fcdeb3d50aee061ca28bcf848fe9707a2d7a1d9 /include/asm-arm/processor.h | |
parent | 946d4935fc61e1479f8c057d58c64110bb43d3b0 (diff) |
[ARM] start_thread fixup for nommu mode
This patch supports start_thread in nommu mode which requires the
base index register.
Signed-off-by: Hyok S. Choi <hyok.choi@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/processor.h')
-rw-r--r-- | include/asm-arm/processor.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-arm/processor.h b/include/asm-arm/processor.h index 31290694648b..04f4d34c6317 100644 --- a/include/asm-arm/processor.h +++ b/include/asm-arm/processor.h | |||
@@ -49,6 +49,12 @@ struct thread_struct { | |||
49 | 49 | ||
50 | #define INIT_THREAD { } | 50 | #define INIT_THREAD { } |
51 | 51 | ||
52 | #ifdef CONFIG_MMU | ||
53 | #define nommu_start_thread(regs) do { } while (0) | ||
54 | #else | ||
55 | #define nommu_start_thread(regs) regs->ARM_r10 = current->mm->start_data | ||
56 | #endif | ||
57 | |||
52 | #define start_thread(regs,pc,sp) \ | 58 | #define start_thread(regs,pc,sp) \ |
53 | ({ \ | 59 | ({ \ |
54 | unsigned long *stack = (unsigned long *)sp; \ | 60 | unsigned long *stack = (unsigned long *)sp; \ |
@@ -65,6 +71,7 @@ struct thread_struct { | |||
65 | regs->ARM_r2 = stack[2]; /* r2 (envp) */ \ | 71 | regs->ARM_r2 = stack[2]; /* r2 (envp) */ \ |
66 | regs->ARM_r1 = stack[1]; /* r1 (argv) */ \ | 72 | regs->ARM_r1 = stack[1]; /* r1 (argv) */ \ |
67 | regs->ARM_r0 = stack[0]; /* r0 (argc) */ \ | 73 | regs->ARM_r0 = stack[0]; /* r0 (argc) */ \ |
74 | nommu_start_thread(regs); \ | ||
68 | }) | 75 | }) |
69 | 76 | ||
70 | /* Forward declaration, a strange C thing */ | 77 | /* Forward declaration, a strange C thing */ |