From: Yinghai Lu <yinghai@kernel.org>
To: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] x86: only set warm_reset_vector for NMI
Date: Thu, 26 Feb 2009 18:41:22 -0800 [thread overview]
Message-ID: <49A752D2.50404@kernel.org> (raw)
Impact: cleanup
don't need to set that for INIT etc
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
arch/x86/kernel/smpboot.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
Index: linux-2.6/arch/x86/kernel/smpboot.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/smpboot.c
+++ linux-2.6/arch/x86/kernel/smpboot.c
@@ -609,7 +609,7 @@ wakeup_secondary_cpu_via_nmi(int logical
return (send_status | accept_status);
}
-int __devinit
+static int __devinit
wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
{
unsigned long send_status, accept_status = 0;
@@ -816,11 +816,14 @@ do_rest:
atomic_set(&init_deasserted, 0);
- if (get_uv_system_type() != UV_NON_UNIQUE_APIC) {
+ if (apic->wakeup_secondary_cpu == wakeup_secondary_cpu_via_nmi) {
pr_debug("Setting warm reset code and vector.\n");
smpboot_setup_warm_reset_vector(start_ip);
+ }
+
+ if (get_uv_system_type() != UV_NON_UNIQUE_APIC) {
/*
* Be paranoid about clearing APIC errors.
*/
@@ -893,10 +896,12 @@ do_rest:
/* mark "stuck" area as not stuck */
*((volatile unsigned long *)trampoline_base) = 0;
- /*
- * Cleanup possible dangling ends...
- */
- smpboot_restore_warm_reset_vector();
+ if (apic->wakeup_secondary_cpu == wakeup_secondary_cpu_via_nmi) {
+ /*
+ * Cleanup possible dangling ends...
+ */
+ smpboot_restore_warm_reset_vector();
+ }
return boot_error;
}
next reply other threads:[~2009-02-27 2:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-27 2:41 Yinghai Lu [this message]
2009-02-27 3:36 ` [PATCH] x86: only set warm_reset_vector for NMI Yinghai Lu
2009-02-27 3:37 ` Yinghai Lu
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=49A752D2.50404@kernel.org \
--to=yinghai@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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.