]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
ARM: SMP: ensure frame pointer is reinitialized for soft-CPU hotplug
authorRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 20 Dec 2010 16:58:19 +0000 (16:58 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 20 Dec 2010 16:58:19 +0000 (16:58 +0000)
When we soft-CPU hotplug a CPU, we reset the stack pointer and
jump back to start_secondary().  This allows us to restart as if
the CPU was actually reset.

However, we weren't resetting the frame pointer, which could cause
problems with backtracing.  Reset the frame pointer to zero (which
means no parent frame) just like the early assembly code also does.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/smp.c

index 6d0c66bc434d43bb082f313de90c0021b5a3f771..5341b0b1970148351832805785ab213e5c514d7f 100644 (file)
@@ -286,6 +286,7 @@ void __ref cpu_die(void)
         * to be repeated to undo the effects of taking the CPU offline.
         */
        __asm__("mov    sp, %0\n"
+       "       mov     fp, #0\n"
        "       b       secondary_start_kernel"
                :
                : "r" (task_stack_page(current) + THREAD_SIZE - 8));