linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: James Hogan <james.hogan@imgtec.com>
Cc: linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Kirill Tkhai <tkhai@yandex.ru>
Subject: Re: [PATCH 2/5] metag: smp: enable irqs after set_cpu_online
Date: Tue, 02 Jul 2013 11:27:59 +0530	[thread overview]
Message-ID: <51D26BE7.3050702@linux.vnet.ibm.com> (raw)
In-Reply-To: <1372694659-30176-3-git-send-email-james.hogan@imgtec.com>

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@yandex.ru>
> Signed-off-by: James Hogan <james.hogan@imgtec.com>
> Cc: Kirill Tkhai <tkhai@yandex.ru>
> Cc: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> ---

Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.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);
> 


  parent reply	other threads:[~2013-07-02  6:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-01 16:04 [PATCH 0/5] metag: smp/hotplug fixes James Hogan
2013-07-01 16:04 ` [PATCH 1/5] metag: use clear_tasks_mm_cpumask() James Hogan
2013-07-01 16:04 ` [PATCH 2/5] metag: smp: enable irqs after set_cpu_online James Hogan
2013-07-01 21:42   ` Thomas Gleixner
2013-07-02  5:57   ` Srivatsa S. Bhat [this message]
2013-07-01 16:04 ` [PATCH 3/5] metag: smp: don't spin waiting for CPU to start James Hogan
2013-07-01 21:46   ` Thomas Gleixner
2013-07-01 22:02     ` James Hogan
2013-07-02  6:12   ` Srivatsa S. Bhat
2013-07-01 16:04 ` [PATCH 4/5] metag: kick: prevent nested kick handlers James Hogan
2013-07-01 21:51   ` Thomas Gleixner
2013-07-01 22:17     ` James Hogan
2013-07-01 22:56       ` Thomas Gleixner
2013-07-02  0:00         ` James Hogan
2013-07-01 16:04 ` [PATCH 5/5] metag: cpu hotplug: route_irq: preserve irq mask James Hogan
2013-07-01 21:51   ` Thomas Gleixner
2013-07-02  6:16   ` Srivatsa S. Bhat
2013-07-02  9:59     ` James Hogan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51D26BE7.3050702@linux.vnet.ibm.com \
    --to=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=james.hogan@imgtec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tkhai@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).