aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/smpboot.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-18 17:00:05 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-18 17:00:05 -0400
commit453c1404c5273a30d715e5a83372a78cff70b6d9 (patch)
tree94a5a3abd85137c4def416a84a45989751260f20 /arch/x86/kernel/smpboot.c
parenta208f37a465e222218974ab20a31b42b7b4893b2 (diff)
parent35b680557f95564f70f21a8d3f5c72e101fab260 (diff)
Merge branch 'x86/apic' into x86/x2apic
Conflicts: arch/x86/kernel/paravirt.c arch/x86/kernel/smpboot.c arch/x86/kernel/vmi_32.c arch/x86/lguest/boot.c arch/x86/xen/enlighten.c include/asm-x86/apic.h include/asm-x86/paravirt.h Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r--arch/x86/kernel/smpboot.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 23c3b3d1f4cc..a4f2d8f06e48 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -590,14 +590,9 @@ wakeup_secondary_cpu(int logical_apicid, unsigned long start_eip)
590 * Give the other CPU some time to accept the IPI. 590 * Give the other CPU some time to accept the IPI.
591 */ 591 */
592 udelay(200); 592 udelay(200);
593 /*
594 * Due to the Pentium erratum 3AP.
595 */
596 maxlvt = lapic_get_maxlvt(); 593 maxlvt = lapic_get_maxlvt();
597 if (maxlvt > 3) { 594 if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */
598 apic_read_around(APIC_SPIV);
599 apic_write(APIC_ESR, 0); 595 apic_write(APIC_ESR, 0);
600 }
601 accept_status = (apic_read(APIC_ESR) & 0xEF); 596 accept_status = (apic_read(APIC_ESR) & 0xEF);
602 Dprintk("NMI sent.\n"); 597 Dprintk("NMI sent.\n");
603 598
@@ -623,12 +618,14 @@ wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip)
623 return send_status; 618 return send_status;
624 } 619 }
625 620
621 maxlvt = lapic_get_maxlvt();
622
626 /* 623 /*
627 * Be paranoid about clearing APIC errors. 624 * Be paranoid about clearing APIC errors.
628 */ 625 */
629 if (APIC_INTEGRATED(apic_version[phys_apicid])) { 626 if (APIC_INTEGRATED(apic_version[phys_apicid])) {
630 apic_read_around(APIC_SPIV); 627 if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */
631 apic_write(APIC_ESR, 0); 628 apic_write(APIC_ESR, 0);
632 apic_read(APIC_ESR); 629 apic_read(APIC_ESR);
633 } 630 }
634 631
@@ -683,12 +680,10 @@ wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip)
683 */ 680 */
684 Dprintk("#startup loops: %d.\n", num_starts); 681 Dprintk("#startup loops: %d.\n", num_starts);
685 682
686 maxlvt = lapic_get_maxlvt();
687
688 for (j = 1; j <= num_starts; j++) { 683 for (j = 1; j <= num_starts; j++) {
689 Dprintk("Sending STARTUP #%d.\n", j); 684 Dprintk("Sending STARTUP #%d.\n", j);
690 apic_read_around(APIC_SPIV); 685 if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */
691 apic_write(APIC_ESR, 0); 686 apic_write(APIC_ESR, 0);
692 apic_read(APIC_ESR); 687 apic_read(APIC_ESR);
693 Dprintk("After apic_write.\n"); 688 Dprintk("After apic_write.\n");
694 689
@@ -716,13 +711,8 @@ wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip)
716 * Give the other CPU some time to accept the IPI. 711 * Give the other CPU some time to accept the IPI.
717 */ 712 */
718 udelay(200); 713 udelay(200);
719 /* 714 if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */
720 * Due to the Pentium erratum 3AP.
721 */
722 if (maxlvt > 3) {
723 apic_read_around(APIC_SPIV);
724 apic_write(APIC_ESR, 0); 715 apic_write(APIC_ESR, 0);
725 }
726 accept_status = (apic_read(APIC_ESR) & 0xEF); 716 accept_status = (apic_read(APIC_ESR) & 0xEF);
727 if (send_status || accept_status) 717 if (send_status || accept_status)
728 break; 718 break;