From: Don Zickus <dzickus@redhat.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org,
andi@firstfloor.org, torvalds@linux-foundation.org,
peterz@infradead.org, robert.richter@amd.com, tglx@linutronix.de,
mingo@elte.hu, linux-tip-commits@vger.kernel.org
Subject: Re: [tip:x86/debug] x86, reboot: Use NMI instead of REBOOT_VECTOR to stop cpus
Date: Thu, 5 Jan 2012 13:17:53 -0500 [thread overview]
Message-ID: <20120105181753.GH5650@redhat.com> (raw)
In-Reply-To: <CAE9FiQUW5tf5-Fbn0a_8s58P+7rXbG6iWPaDeHOuhxw4TZE+hQ@mail.gmail.com>
On Wed, Dec 21, 2011 at 10:24:53AM -0800, Yinghai Lu wrote:
> On Wed, Dec 21, 2011 at 6:59 AM, Don Zickus <dzickus@redhat.com> wrote:
> > On Tue, Dec 20, 2011 at 02:38:39PM -0800, Yinghai Lu wrote:
> >> > @@ -230,7 +285,7 @@ struct smp_ops smp_ops = {
> >> > .smp_prepare_cpus = native_smp_prepare_cpus,
> >> > .smp_cpus_done = native_smp_cpus_done,
> >> >
> >> > - .stop_other_cpus = native_stop_other_cpus,
> >> > + .stop_other_cpus = native_nmi_stop_other_cpus,
> >> > .smp_send_reschedule = native_smp_send_reschedule,
> >> >
> >> > .cpu_up = native_cpu_up,
> >>
> >> this broke kexec on our intel nehalem, westmere and sandbridge platforms.
> >> system get reset while try to kexec second kernel.
> >
> >
> > Hmm. Ok. Does the reboot path work correctly?
>
> Yes.
>
> > Vivek showed me that the
> > kexec and reboot paths do the same shutdowns. Perhaps the second kernel
> > has trouble dealing with cpus spinning in an NMI context and can't
> > properly reset them.
>
> not sure.
> when use nonmi_ipi in first kernel, it will work well.
Hi Yinghai,
Sorry for the delay. I figured out the problem, one of those brown paper
bag moments. :-(
I think this patch should fix your issue (it did on my system).
--->8----
From: Don Zickus <dzickus@redhat.com>
Date: Thu, 5 Jan 2012 13:06:58 -0500
Subject: [PATCH] x86, reboot: typo in nmi reboot path
It was brought to my attention that my x86 change to use NMI in the
reboot path broke Intel Nehalem and Westmere boxes when using kexec.
I realized I had mistyped the if statement in commit
3603a2512f9e69dc87914ba922eb4a0812b21cd6 and stuck the ')' in
the wrong spot. Putting it in the right spot fixes kexec again.
Doh.
Reported-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Don Zickus <dzickus@redhat.com>
---
arch/x86/kernel/smp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
index e72b175..3f3d3f0 100644
--- a/arch/x86/kernel/smp.c
+++ b/arch/x86/kernel/smp.c
@@ -176,7 +176,7 @@ static void native_nmi_stop_other_cpus(int wait)
*/
if (num_online_cpus() > 1) {
/* did someone beat us here? */
- if (atomic_cmpxchg(&stopping_cpu, -1, safe_smp_processor_id() != -1))
+ if (atomic_cmpxchg(&stopping_cpu, -1, safe_smp_processor_id()) != -1)
return;
if (register_nmi_handler(NMI_LOCAL, smp_stop_nmi_callback,
--
1.7.7.4
next prev parent reply other threads:[~2012-01-05 18:18 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-13 19:14 [v2 PATCH 0/3] Use NMI to stop cpus Don Zickus
2011-10-13 19:14 ` [v2 PATCH 1/3] x86, reboot: Use NMI instead of REBOOT_VECTOR " Don Zickus
2011-12-05 13:21 ` [tip:x86/debug] " tip-bot for Don Zickus
2011-12-20 22:38 ` Yinghai Lu
2011-12-21 14:59 ` Don Zickus
2011-12-21 18:24 ` Yinghai Lu
2011-12-22 20:16 ` Don Zickus
2012-01-05 18:17 ` Don Zickus [this message]
2012-01-05 21:44 ` Yinghai Lu
2011-10-13 19:14 ` [v2 PATCH 2/3] x86, NMI: Add NMI IPI selftest Don Zickus
2011-12-05 13:22 ` [tip:x86/debug] " tip-bot for Don Zickus
2011-12-06 9:06 ` Ingo Molnar
2011-12-06 18:08 ` Don Zickus
2011-12-06 20:01 ` Ingo Molnar
2011-12-06 20:25 ` [tip:x86/debug] x86, NMI: NMI-selftest should handle the UP case properly tip-bot for Don Zickus
2011-12-07 11:06 ` [patch] x86, NMI: add to_cpumask() to silence compile warning Dan Carpenter
2011-12-07 14:59 ` Don Zickus
2011-12-07 21:12 ` Don Zickus
2011-10-13 19:14 ` [v2 PATCH 3/3] x86, NMI: knob to disable using NMI IPIs to stop cpus Don Zickus
2011-12-05 13:23 ` [tip:x86/debug] x86, NMI: Add " tip-bot for Don Zickus
2011-11-08 19:25 ` [v2 PATCH 0/3] Use NMI " Don Zickus
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=20120105181753.GH5650@redhat.com \
--to=dzickus@redhat.com \
--cc=andi@firstfloor.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=robert.richter@amd.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=yinghai@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.