Skip to contentSkip to conversation

x86, reboot: typo in nmi reboot path

PATCH In review Don Zickus 1 participant 2 messages Jan 6, 2012 – Jan 8, 2012 x86

lore
Share & tools
lore

Don Zickus

author
#0 lore raw

PATCH 1/1 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.

---
 arch/x86/kernel/smp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/smp.c +1 -1
index e72b175..3f3d3f0 100644
@@ -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,
Signature · 1 line
1.7.7.4
#1 lore raw

[tip:x86/debug] x86, reboot: Fix typo in nmi reboot path

Commit-ID:  e58d429209105e698e9d0357481d62b37fe9a7dd
Gitweb:     http://git.kernel.org/tip/e58d429209105e698e9d0357481d62b37fe9a7dd
Author:     Don Zickus <[email protected]>
AuthorDate: Fri, 6 Jan 2012 11:17:51 -0500
Committer:  Ingo Molnar <[email protected]>
CommitDate: Sat, 7 Jan 2012 12:19:37 +0100

x86, reboot: Fix 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.

---
 arch/x86/kernel/smp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/smp.c +1 -1
index 113acda..66c74f4 100644
@@ -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,