[PATCH] ARM: make cpu_init() notrace

Nicolas Pitre nicolas.pitre at linaro.org
Fri Apr 19 17:37:00 EDT 2013


On Thu, 18 Apr 2013, Jon Medhurst (Tixy) wrote:

> On resume from CPU power down any trace hooks enabled in cpu_init()
> will get called before that function has done set_my_cpu_offset(),
> so any use of per-cpu variables by trace hook code will cause bad
> things to happen. Prevent this by marking the function notrace.
> 
> This fixes lockups/crashes seen when enabling function tracer on TC2
> with the not yet mainlined cpuidle driver.

This has potential to fix things on other platforms too.

> 
> Signed-off-by: Jon Medhurst <tixy at linaro.org>

Acked-by: Nicolas Pitre <nico at linaro.org>

I think you may send it to RMK's patch system.


> ---
>  arch/arm/kernel/setup.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> index d343a6c..943cbf0 100644
> --- a/arch/arm/kernel/setup.c
> +++ b/arch/arm/kernel/setup.c
> @@ -390,7 +390,7 @@ static void __init feat_v6_fixup(void)
>   *
>   * cpu_init sets up the per-CPU stacks.
>   */
> -void cpu_init(void)
> +void notrace cpu_init(void)
>  {
>  	unsigned int cpu = smp_processor_id();
>  	struct stack *stk = &stacks[cpu];
> -- 
> 1.7.10.4
> 
> 



More information about the linux-arm-kernel mailing list