aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/smpboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r--arch/x86/kernel/smpboot.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index f71f96fc9e62..7a430c4d1551 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -62,6 +62,7 @@
62#include <asm/mtrr.h> 62#include <asm/mtrr.h>
63#include <asm/vmi.h> 63#include <asm/vmi.h>
64#include <asm/genapic.h> 64#include <asm/genapic.h>
65#include <asm/setup.h>
65#include <linux/mc146818rtc.h> 66#include <linux/mc146818rtc.h>
66 67
67#include <mach_apic.h> 68#include <mach_apic.h>
@@ -534,7 +535,7 @@ static void impress_friends(void)
534 pr_debug("Before bogocount - setting activated=1.\n"); 535 pr_debug("Before bogocount - setting activated=1.\n");
535} 536}
536 537
537static inline void __inquire_remote_apic(int apicid) 538void __inquire_remote_apic(int apicid)
538{ 539{
539 unsigned i, regs[] = { APIC_ID >> 4, APIC_LVR >> 4, APIC_SPIV >> 4 }; 540 unsigned i, regs[] = { APIC_ID >> 4, APIC_LVR >> 4, APIC_SPIV >> 4 };
540 char *names[] = { "ID", "VERSION", "SPIV" }; 541 char *names[] = { "ID", "VERSION", "SPIV" };
@@ -573,14 +574,13 @@ static inline void __inquire_remote_apic(int apicid)
573 } 574 }
574} 575}
575 576
576#ifdef WAKE_SECONDARY_VIA_NMI
577/* 577/*
578 * Poke the other CPU in the eye via NMI to wake it up. Remember that the normal 578 * Poke the other CPU in the eye via NMI to wake it up. Remember that the normal
579 * INIT, INIT, STARTUP sequence will reset the chip hard for us, and this 579 * INIT, INIT, STARTUP sequence will reset the chip hard for us, and this
580 * won't ... remember to clear down the APIC, etc later. 580 * won't ... remember to clear down the APIC, etc later.
581 */ 581 */
582static int __devinit 582int __devinit
583wakeup_secondary_cpu(int logical_apicid, unsigned long start_eip) 583wakeup_secondary_cpu_via_nmi(int logical_apicid, unsigned long start_eip)
584{ 584{
585 unsigned long send_status, accept_status = 0; 585 unsigned long send_status, accept_status = 0;
586 int maxlvt; 586 int maxlvt;
@@ -597,7 +597,7 @@ wakeup_secondary_cpu(int logical_apicid, unsigned long start_eip)
597 * Give the other CPU some time to accept the IPI. 597 * Give the other CPU some time to accept the IPI.
598 */ 598 */
599 udelay(200); 599 udelay(200);
600 if (APIC_INTEGRATED(apic_version[phys_apicid])) { 600 if (APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) {
601 maxlvt = lapic_get_maxlvt(); 601 maxlvt = lapic_get_maxlvt();
602 if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */ 602 if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */
603 apic_write(APIC_ESR, 0); 603 apic_write(APIC_ESR, 0);
@@ -612,11 +612,9 @@ wakeup_secondary_cpu(int logical_apicid, unsigned long start_eip)
612 612
613 return (send_status | accept_status); 613 return (send_status | accept_status);
614} 614}
615#endif /* WAKE_SECONDARY_VIA_NMI */
616 615
617#ifdef WAKE_SECONDARY_VIA_INIT 616int __devinit
618static int __devinit 617wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
619wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip)
620{ 618{
621 unsigned long send_status, accept_status = 0; 619 unsigned long send_status, accept_status = 0;
622 int maxlvt, num_starts, j; 620 int maxlvt, num_starts, j;
@@ -735,7 +733,6 @@ wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip)
735 733
736 return (send_status | accept_status); 734 return (send_status | accept_status);
737} 735}
738#endif /* WAKE_SECONDARY_VIA_INIT */
739 736
740struct create_idle { 737struct create_idle {
741 struct work_struct work; 738 struct work_struct work;
@@ -1084,8 +1081,10 @@ static int __init smp_sanity_check(unsigned max_cpus)
1084#endif 1081#endif
1085 1082
1086 if (!physid_isset(hard_smp_processor_id(), phys_cpu_present_map)) { 1083 if (!physid_isset(hard_smp_processor_id(), phys_cpu_present_map)) {
1087 printk(KERN_WARNING "weird, boot CPU (#%d) not listed" 1084 printk(KERN_WARNING
1088 "by the BIOS.\n", hard_smp_processor_id()); 1085 "weird, boot CPU (#%d) not listed by the BIOS.\n",
1086 hard_smp_processor_id());
1087
1089 physid_set(hard_smp_processor_id(), phys_cpu_present_map); 1088 physid_set(hard_smp_processor_id(), phys_cpu_present_map);
1090 } 1089 }
1091 1090