From: Christophe Leroy Date: Thu, 17 Jan 2019 12:26:56 +0000 (+1100) Subject: powerpc/64: Use task_stack_page() to initialise paca->kstack X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=678c668a7732f3a11c25ae86d5737a019667e3c5;p=openwrt%2Fstaging%2Fblogic.git powerpc/64: Use task_stack_page() to initialise paca->kstack Rather than using the thread info use task_stack_page() to initialise paca->kstack, that way it will work with THREAD_INFO_IN_TASK. Signed-off-by: Christophe Leroy Reviewed-by: Nicholas Piggin [mpe: Split out of larger patch] Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 5366d9e7bed4..829ef5411b50 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -984,7 +985,8 @@ static void cpu_idle_thread_init(unsigned int cpu, struct task_struct *idle) #ifdef CONFIG_PPC64 paca_ptrs[cpu]->__current = idle; - paca_ptrs[cpu]->kstack = (unsigned long)ti + THREAD_SIZE - STACK_FRAME_OVERHEAD; + paca_ptrs[cpu]->kstack = (unsigned long)task_stack_page(idle) + + THREAD_SIZE - STACK_FRAME_OVERHEAD; #endif ti->cpu = cpu; secondary_ti = current_set[cpu] = ti;