From: Andi Kleen <andi@firstfloor.org>
To: mingo@elte.hu
Cc: linux-kernel@vger.kernel.org, lnxninja@linux.vnet.ibm.com,
Andi Kleen <ak@linux.intel.com>
Subject: [PATCH] Move wakeup_secondary_via_nmi into numaq_32.c
Date: Fri, 30 Jan 2009 11:17:07 +0100 [thread overview]
Message-ID: <1233310639-27916-2-git-send-email-andi@firstfloor.org> (raw)
In-Reply-To: <1233310639-27916-1-git-send-email-andi@firstfloor.org>
From: Andi Kleen <ak@linux.intel.com>
It's only used there.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
arch/x86/include/asm/setup.h | 1 -
arch/x86/kernel/numaq_32.c | 39 +++++++++++++++++++++++++++++++++++++++
arch/x86/kernel/smpboot.c | 39 ---------------------------------------
3 files changed, 39 insertions(+), 40 deletions(-)
diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h
index 45b4027..8c8289c 100644
--- a/arch/x86/include/asm/setup.h
+++ b/arch/x86/include/asm/setup.h
@@ -20,7 +20,6 @@ static inline void visws_early_detect(void) { }
static inline int is_visws_box(void) { return 0; }
#endif
-extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip);
extern int wakeup_secondary_cpu_via_init(int apicid, unsigned long start_eip);
/*
* Any setup quirks to be performed?
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c
index 83bb055..295c82e 100644
--- a/arch/x86/kernel/numaq_32.c
+++ b/arch/x86/kernel/numaq_32.c
@@ -234,6 +234,45 @@ static int __init numaq_setup_ioapic_ids(void)
return 1;
}
+/*
+ * Poke the other CPU in the eye via NMI to wake it up. Remember that the normal
+ * INIT, INIT, STARTUP sequence will reset the chip hard for us, and this
+ * won't ... remember to clear down the APIC, etc later.
+ */
+static int __devinit
+wakeup_secondary_cpu_via_nmi(int logical_apicid, unsigned long start_eip)
+{
+ unsigned long send_status, accept_status = 0;
+ int maxlvt;
+
+ /* Target chip */
+ /* Boot on the stack */
+ /* Kick the second */
+ apic_icr_write(APIC_DM_NMI | apic->dest_logical, logical_apicid);
+
+ pr_debug("Waiting for send to finish...\n");
+ send_status = safe_apic_wait_icr_idle();
+
+ /*
+ * Give the other CPU some time to accept the IPI.
+ */
+ udelay(200);
+ if (APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) {
+ maxlvt = lapic_get_maxlvt();
+ if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */
+ apic_write(APIC_ESR, 0);
+ accept_status = (apic_read(APIC_ESR) & 0xEF);
+ }
+ pr_debug("NMI sent.\n");
+
+ if (send_status)
+ printk(KERN_ERR "APIC never delivered???\n");
+ if (accept_status)
+ printk(KERN_ERR "APIC delivery error (%lx).\n", accept_status);
+
+ return (send_status | accept_status);
+}
+
static int __init numaq_update_genapic(void)
{
apic->wakeup_cpu = wakeup_secondary_cpu_via_nmi;
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 2912fa3..709b65d 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -570,45 +570,6 @@ void __inquire_remote_apic(int apicid)
}
}
-/*
- * Poke the other CPU in the eye via NMI to wake it up. Remember that the normal
- * INIT, INIT, STARTUP sequence will reset the chip hard for us, and this
- * won't ... remember to clear down the APIC, etc later.
- */
-int __devinit
-wakeup_secondary_cpu_via_nmi(int logical_apicid, unsigned long start_eip)
-{
- unsigned long send_status, accept_status = 0;
- int maxlvt;
-
- /* Target chip */
- /* Boot on the stack */
- /* Kick the second */
- apic_icr_write(APIC_DM_NMI | apic->dest_logical, logical_apicid);
-
- pr_debug("Waiting for send to finish...\n");
- send_status = safe_apic_wait_icr_idle();
-
- /*
- * Give the other CPU some time to accept the IPI.
- */
- udelay(200);
- if (APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) {
- maxlvt = lapic_get_maxlvt();
- if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */
- apic_write(APIC_ESR, 0);
- accept_status = (apic_read(APIC_ESR) & 0xEF);
- }
- pr_debug("NMI sent.\n");
-
- if (send_status)
- printk(KERN_ERR "APIC never delivered???\n");
- if (accept_status)
- printk(KERN_ERR "APIC delivery error (%lx).\n", accept_status);
-
- return (send_status | accept_status);
-}
-
int __devinit
wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
{
--
1.5.6.5
next prev parent reply other threads:[~2009-01-30 10:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-30 10:17 Genapic cleanup & NUMAQ/es7000 removal Andi Kleen
2009-01-30 10:17 ` Andi Kleen [this message]
2009-01-30 10:17 ` [PATCH] Remove empty setup_portio_remap inlines in bigsmp/summit Andi Kleen
2009-01-30 10:17 ` [PATCH] Mark NUMAQ broken Andi Kleen
2009-01-30 10:17 ` [PATCH] Mark ES7000 subarch broken Andi Kleen
2009-01-30 10:17 ` [PATCH] Remove store_NMI_vector in genapic Andi Kleen
2009-01-30 10:17 ` [PATCH] Remove smp_callin_clear_local_apic hook Andi Kleen
2009-01-30 10:17 ` [PATCH] Remove multi_timer_check Andi Kleen
2009-01-30 10:17 ` [PATCH] Remove setup_portio_remap Andi Kleen
2009-01-30 10:17 ` [PATCH] Remove wakeup_cpu genapic vector Andi Kleen
2009-01-30 10:17 ` [PATCH] Remove now unused default_update_genapic Andi Kleen
2009-01-30 10:17 ` [PATCH] Remove trampoline_phys_low/high genapic fields Andi Kleen
2009-01-30 10:17 ` [PATCH] Remove enable_apic_mode genapic hook Andi Kleen
2009-01-30 10:17 ` [PATCH] Remove setup_ioapic_ids x86_quirks hook Andi Kleen
2009-02-05 16:15 ` Genapic cleanup & NUMAQ/es7000 removal Tim Pepper
2009-02-05 17:29 ` Ingo Molnar
2009-02-05 20:27 ` Andi Kleen
2009-02-05 21:25 ` Ingo Molnar
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=1233310639-27916-2-git-send-email-andi@firstfloor.org \
--to=andi@firstfloor.org \
--cc=ak@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lnxninja@linux.vnet.ibm.com \
--cc=mingo@elte.hu \
/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
all inboxes | Powered by JetHome®