From: Hyok S. Choi Date: Fri, 13 Jan 2006 21:04:17 +0000 (+0000) Subject: [ARM] start_thread fixup for nommu mode X-Git-Tag: upstream/snapshot3+hdmi~43531^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e72b04756f16e40dfd6dab3da81e03fe6dfe16e6;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git [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 Signed-off-by: Russell King --- diff --git a/include/asm-arm/processor.h b/include/asm-arm/processor.h index 3129069..04f4d34 100644 --- a/include/asm-arm/processor.h +++ b/include/asm-arm/processor.h @@ -49,6 +49,12 @@ struct thread_struct { #define INIT_THREAD { } +#ifdef CONFIG_MMU +#define nommu_start_thread(regs) do { } while (0) +#else +#define nommu_start_thread(regs) regs->ARM_r10 = current->mm->start_data +#endif + #define start_thread(regs,pc,sp) \ ({ \ unsigned long *stack = (unsigned long *)sp; \ @@ -65,6 +71,7 @@ struct thread_struct { regs->ARM_r2 = stack[2]; /* r2 (envp) */ \ regs->ARM_r1 = stack[1]; /* r1 (argv) */ \ regs->ARM_r0 = stack[0]; /* r0 (argc) */ \ + nommu_start_thread(regs); \ }) /* Forward declaration, a strange C thing */