[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51D26BE7.3050702@linux.vnet.ibm.com>
Date: Tue, 02 Jul 2013 11:27:59 +0530
From: "Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
To: James Hogan <james.hogan@...tec.com>
CC: linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Kirill Tkhai <tkhai@...dex.ru>
Subject: Re: [PATCH 2/5] metag: smp: enable irqs after set_cpu_online
On 07/01/2013 09:34 PM, James Hogan wrote:
> In secondary_start_kernel() interrupts should be enabled with
> local_irq_enable() after the cpu is marked as online with
> set_cpu_online(). Otherwise it's possible for a timer interrupt to
> trigger a softirq, which if the cpu is marked as offline may have it's
> affinity altered.
>
> Reported-by: Kirill Tkhai <tkhai@...dex.ru>
> Signed-off-by: James Hogan <james.hogan@...tec.com>
> Cc: Kirill Tkhai <tkhai@...dex.ru>
> Cc: "Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> ---
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@...ux.vnet.ibm.com>
Regards,
Srivatsa S. Bhat
> arch/metag/kernel/smp.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/arch/metag/kernel/smp.c b/arch/metag/kernel/smp.c
> index b813515..09979f2 100644
> --- a/arch/metag/kernel/smp.c
> +++ b/arch/metag/kernel/smp.c
> @@ -379,12 +379,7 @@ asmlinkage void secondary_start_kernel(void)
>
> setup_priv();
>
> - /*
> - * Enable local interrupts.
> - */
> - tbi_startup_interrupt(TBID_SIGNUM_TRT);
> notify_cpu_starting(cpu);
> - local_irq_enable();
>
> pr_info("CPU%u (thread %u): Booted secondary processor\n",
> cpu, cpu_2_hwthread_id[cpu]);
> @@ -398,6 +393,12 @@ asmlinkage void secondary_start_kernel(void)
> set_cpu_online(cpu, true);
>
> /*
> + * Enable local interrupts.
> + */
> + tbi_startup_interrupt(TBID_SIGNUM_TRT);
> + local_irq_enable();
> +
> + /*
> * OK, it's off to the idle thread for us
> */
> cpu_startup_entry(CPUHP_ONLINE);
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists