From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [patch] ARM: smpboot: Enable interrupts after marking CPU online/active
Date: Tue, 13 Sep 2011 14:32:58 +0100 [thread overview]
Message-ID: <20110913133258.GA6267@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <CADGdYn6V_eQJZ4=irMbSS7XJj4MJVeALxcrWdD7o2bGs1sEJZQ@mail.gmail.com>
On Tue, Sep 13, 2011 at 07:00:53PM +0530, amit kachhap wrote:
> Hi Thomas,
>
> This movement of set_cpu_online before percpu_timer_setup is usefull
> for samsung exyno4 platforms where the external gic timer
> initialisation needs the secondary cpu to be online.
> In addition to your modifications the following changes fixes the race
> condition crash happening when sched_mc configuration flags
> (CONFIG_ARM_CPU_TOPOLOGY, CONFIG_SCHED_MC ,CONFIG_SCHED_SMT) are
> enabled. Sched_mc patches are recently submitted by Vincent and
> accepted by Russell.(https://lkml.org/lkml/2011/7/5/209). I have not
> attached the crash log here. If needed i can do so.
>
> ---
> arch/arm/kernel/smp.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
> index 8cb94c8..04a8630 100644
> --- a/arch/arm/kernel/smp.c
> +++ b/arch/arm/kernel/smp.c
> @@ -316,6 +316,7 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
> * interrupts otherwise a wakeup of a kernel thread affine to
> * this CPU might break the affinity and let hell break lose.
> */
> + smp_store_cpu_info(cpu);
> set_cpu_online(cpu, true);
> while (!cpu_active(cpu))
> cpu_relax();
> @@ -330,7 +331,6 @@ asmlinkage void __cpuinit secondary_start_kernel(void)
>
> calibrate_delay();
>
> - smp_store_cpu_info(cpu);
This is totally wrong - the order of things here is quite specific.
You can't store the CPU info until after you've calibrated the delay
loop.
Please continue playing cat-and-mouse with this.
next prev parent reply other threads:[~2011-09-13 13:32 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-08 21:57 [patch] ARM: smpboot: Enable interrupts after marking CPU online/active Thomas Gleixner
2011-09-09 4:17 ` Santosh
2011-09-13 13:30 ` amit kachhap
2011-09-13 13:32 ` Russell King - ARM Linux [this message]
2011-09-13 17:22 ` Vincent Guittot
2011-09-13 17:53 ` Russell King - ARM Linux
2011-09-13 20:48 ` Thomas Gleixner
2011-09-13 22:37 ` Russell King - ARM Linux
2011-09-14 1:10 ` Frank Rowand
2011-09-14 6:55 ` Vincent Guittot
2011-09-23 8:40 ` Russell King - ARM Linux
2011-09-26 7:26 ` Amit Kachhap
2011-09-29 7:40 ` Kukjin Kim
2011-09-29 20:12 ` Thomas Gleixner
2011-09-30 6:42 ` Kukjin Kim
2011-10-07 9:49 ` Kukjin Kim
2011-10-07 12:17 ` Thomas Gleixner
2011-10-07 14:09 ` Amit Kachhap
2011-10-10 4:28 ` Kukjin Kim
2011-10-19 21:16 ` Dima Zavin
2011-10-20 0:32 ` Dima Zavin
2011-11-15 21:54 ` Stepan Moskovchenko
2011-11-15 22:00 ` Thomas Gleixner
2011-12-14 0:13 ` Dima Zavin
2011-12-14 0:26 ` Thomas Gleixner
2011-12-15 16:09 ` Peter Zijlstra
2011-11-15 23:27 ` Dima Zavin
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=20110913133258.GA6267@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/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).