diff options
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r-- | arch/x86/kernel/smpboot.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 468c2f9d47ae..9d58134e0231 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> |
@@ -530,7 +531,7 @@ static void impress_friends(void) | |||
530 | pr_debug("Before bogocount - setting activated=1.\n"); | 531 | pr_debug("Before bogocount - setting activated=1.\n"); |
531 | } | 532 | } |
532 | 533 | ||
533 | static inline void __inquire_remote_apic(int apicid) | 534 | void __inquire_remote_apic(int apicid) |
534 | { | 535 | { |
535 | unsigned i, regs[] = { APIC_ID >> 4, APIC_LVR >> 4, APIC_SPIV >> 4 }; | 536 | unsigned i, regs[] = { APIC_ID >> 4, APIC_LVR >> 4, APIC_SPIV >> 4 }; |
536 | char *names[] = { "ID", "VERSION", "SPIV" }; | 537 | char *names[] = { "ID", "VERSION", "SPIV" }; |
@@ -569,14 +570,13 @@ static inline void __inquire_remote_apic(int apicid) | |||
569 | } | 570 | } |
570 | } | 571 | } |
571 | 572 | ||
572 | #ifdef WAKE_SECONDARY_VIA_NMI | ||
573 | /* | 573 | /* |
574 | * Poke the other CPU in the eye via NMI to wake it up. Remember that the normal | 574 | * Poke the other CPU in the eye via NMI to wake it up. Remember that the normal |
575 | * INIT, INIT, STARTUP sequence will reset the chip hard for us, and this | 575 | * INIT, INIT, STARTUP sequence will reset the chip hard for us, and this |
576 | * won't ... remember to clear down the APIC, etc later. | 576 | * won't ... remember to clear down the APIC, etc later. |
577 | */ | 577 | */ |
578 | static int __devinit | 578 | int __devinit |
579 | wakeup_secondary_cpu(int logical_apicid, unsigned long start_eip) | 579 | wakeup_secondary_cpu_via_nmi(int logical_apicid, unsigned long start_eip) |
580 | { | 580 | { |
581 | unsigned long send_status, accept_status = 0; | 581 | unsigned long send_status, accept_status = 0; |
582 | int maxlvt; | 582 | int maxlvt; |
@@ -593,7 +593,7 @@ wakeup_secondary_cpu(int logical_apicid, unsigned long start_eip) | |||
593 | * Give the other CPU some time to accept the IPI. | 593 | * Give the other CPU some time to accept the IPI. |
594 | */ | 594 | */ |
595 | udelay(200); | 595 | udelay(200); |
596 | if (APIC_INTEGRATED(apic_version[phys_apicid])) { | 596 | if (APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) { |
597 | maxlvt = lapic_get_maxlvt(); | 597 | maxlvt = lapic_get_maxlvt(); |
598 | if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */ | 598 | if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */ |
599 | apic_write(APIC_ESR, 0); | 599 | apic_write(APIC_ESR, 0); |
@@ -608,11 +608,9 @@ wakeup_secondary_cpu(int logical_apicid, unsigned long start_eip) | |||
608 | 608 | ||
609 | return (send_status | accept_status); | 609 | return (send_status | accept_status); |
610 | } | 610 | } |
611 | #endif /* WAKE_SECONDARY_VIA_NMI */ | ||
612 | 611 | ||
613 | #ifdef WAKE_SECONDARY_VIA_INIT | 612 | int __devinit |
614 | static int __devinit | 613 | wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip) |
615 | wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip) | ||
616 | { | 614 | { |
617 | unsigned long send_status, accept_status = 0; | 615 | unsigned long send_status, accept_status = 0; |
618 | int maxlvt, num_starts, j; | 616 | int maxlvt, num_starts, j; |
@@ -731,7 +729,6 @@ wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip) | |||
731 | 729 | ||
732 | return (send_status | accept_status); | 730 | return (send_status | accept_status); |
733 | } | 731 | } |
734 | #endif /* WAKE_SECONDARY_VIA_INIT */ | ||
735 | 732 | ||
736 | struct create_idle { | 733 | struct create_idle { |
737 | struct work_struct work; | 734 | struct work_struct work; |