diff options
Diffstat (limited to 'arch/x86/kernel/apic.c')
-rw-r--r-- | arch/x86/kernel/apic.c | 143 |
1 files changed, 59 insertions, 84 deletions
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c index b2cef49f3085..6107b41da9a5 100644 --- a/arch/x86/kernel/apic.c +++ b/arch/x86/kernel/apic.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/dmi.h> | 31 | #include <linux/dmi.h> |
32 | #include <linux/dmar.h> | 32 | #include <linux/dmar.h> |
33 | #include <linux/ftrace.h> | ||
33 | 34 | ||
34 | #include <asm/atomic.h> | 35 | #include <asm/atomic.h> |
35 | #include <asm/smp.h> | 36 | #include <asm/smp.h> |
@@ -441,6 +442,7 @@ static void lapic_timer_setup(enum clock_event_mode mode, | |||
441 | v = apic_read(APIC_LVTT); | 442 | v = apic_read(APIC_LVTT); |
442 | v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR); | 443 | v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR); |
443 | apic_write(APIC_LVTT, v); | 444 | apic_write(APIC_LVTT, v); |
445 | apic_write(APIC_TMICT, 0xffffffff); | ||
444 | break; | 446 | break; |
445 | case CLOCK_EVT_MODE_RESUME: | 447 | case CLOCK_EVT_MODE_RESUME: |
446 | /* Nothing to do here */ | 448 | /* Nothing to do here */ |
@@ -559,13 +561,13 @@ static int __init calibrate_by_pmtimer(long deltapm, long *delta) | |||
559 | } else { | 561 | } else { |
560 | res = (((u64)deltapm) * mult) >> 22; | 562 | res = (((u64)deltapm) * mult) >> 22; |
561 | do_div(res, 1000000); | 563 | do_div(res, 1000000); |
562 | printk(KERN_WARNING "APIC calibration not consistent " | 564 | pr_warning("APIC calibration not consistent " |
563 | "with PM Timer: %ldms instead of 100ms\n", | 565 | "with PM Timer: %ldms instead of 100ms\n", |
564 | (long)res); | 566 | (long)res); |
565 | /* Correct the lapic counter value */ | 567 | /* Correct the lapic counter value */ |
566 | res = (((u64)(*delta)) * pm_100ms); | 568 | res = (((u64)(*delta)) * pm_100ms); |
567 | do_div(res, deltapm); | 569 | do_div(res, deltapm); |
568 | printk(KERN_INFO "APIC delta adjusted to PM-Timer: " | 570 | pr_info("APIC delta adjusted to PM-Timer: " |
569 | "%lu (%ld)\n", (unsigned long)res, *delta); | 571 | "%lu (%ld)\n", (unsigned long)res, *delta); |
570 | *delta = (long)res; | 572 | *delta = (long)res; |
571 | } | 573 | } |
@@ -645,8 +647,7 @@ static int __init calibrate_APIC_clock(void) | |||
645 | */ | 647 | */ |
646 | if (calibration_result < (1000000 / HZ)) { | 648 | if (calibration_result < (1000000 / HZ)) { |
647 | local_irq_enable(); | 649 | local_irq_enable(); |
648 | printk(KERN_WARNING | 650 | pr_warning("APIC frequency too slow, disabling apic timer\n"); |
649 | "APIC frequency too slow, disabling apic timer\n"); | ||
650 | return -1; | 651 | return -1; |
651 | } | 652 | } |
652 | 653 | ||
@@ -672,13 +673,9 @@ static int __init calibrate_APIC_clock(void) | |||
672 | while (lapic_cal_loops <= LAPIC_CAL_LOOPS) | 673 | while (lapic_cal_loops <= LAPIC_CAL_LOOPS) |
673 | cpu_relax(); | 674 | cpu_relax(); |
674 | 675 | ||
675 | local_irq_disable(); | ||
676 | |||
677 | /* Stop the lapic timer */ | 676 | /* Stop the lapic timer */ |
678 | lapic_timer_setup(CLOCK_EVT_MODE_SHUTDOWN, levt); | 677 | lapic_timer_setup(CLOCK_EVT_MODE_SHUTDOWN, levt); |
679 | 678 | ||
680 | local_irq_enable(); | ||
681 | |||
682 | /* Jiffies delta */ | 679 | /* Jiffies delta */ |
683 | deltaj = lapic_cal_j2 - lapic_cal_j1; | 680 | deltaj = lapic_cal_j2 - lapic_cal_j1; |
684 | apic_printk(APIC_VERBOSE, "... jiffies delta = %lu\n", deltaj); | 681 | apic_printk(APIC_VERBOSE, "... jiffies delta = %lu\n", deltaj); |
@@ -692,8 +689,7 @@ static int __init calibrate_APIC_clock(void) | |||
692 | local_irq_enable(); | 689 | local_irq_enable(); |
693 | 690 | ||
694 | if (levt->features & CLOCK_EVT_FEAT_DUMMY) { | 691 | if (levt->features & CLOCK_EVT_FEAT_DUMMY) { |
695 | printk(KERN_WARNING | 692 | pr_warning("APIC timer disabled due to verification failure.\n"); |
696 | "APIC timer disabled due to verification failure.\n"); | ||
697 | return -1; | 693 | return -1; |
698 | } | 694 | } |
699 | 695 | ||
@@ -714,7 +710,7 @@ void __init setup_boot_APIC_clock(void) | |||
714 | * broadcast mechanism is used. On UP systems simply ignore it. | 710 | * broadcast mechanism is used. On UP systems simply ignore it. |
715 | */ | 711 | */ |
716 | if (disable_apic_timer) { | 712 | if (disable_apic_timer) { |
717 | printk(KERN_INFO "Disabling APIC timer\n"); | 713 | pr_info("Disabling APIC timer\n"); |
718 | /* No broadcast on UP ! */ | 714 | /* No broadcast on UP ! */ |
719 | if (num_possible_cpus() > 1) { | 715 | if (num_possible_cpus() > 1) { |
720 | lapic_clockevent.mult = 1; | 716 | lapic_clockevent.mult = 1; |
@@ -741,7 +737,7 @@ void __init setup_boot_APIC_clock(void) | |||
741 | if (nmi_watchdog != NMI_IO_APIC) | 737 | if (nmi_watchdog != NMI_IO_APIC) |
742 | lapic_clockevent.features &= ~CLOCK_EVT_FEAT_DUMMY; | 738 | lapic_clockevent.features &= ~CLOCK_EVT_FEAT_DUMMY; |
743 | else | 739 | else |
744 | printk(KERN_WARNING "APIC timer registered as dummy," | 740 | pr_warning("APIC timer registered as dummy," |
745 | " due to nmi_watchdog=%d!\n", nmi_watchdog); | 741 | " due to nmi_watchdog=%d!\n", nmi_watchdog); |
746 | 742 | ||
747 | /* Setup the lapic or request the broadcast */ | 743 | /* Setup the lapic or request the broadcast */ |
@@ -773,8 +769,7 @@ static void local_apic_timer_interrupt(void) | |||
773 | * spurious. | 769 | * spurious. |
774 | */ | 770 | */ |
775 | if (!evt->event_handler) { | 771 | if (!evt->event_handler) { |
776 | printk(KERN_WARNING | 772 | pr_warning("Spurious LAPIC timer interrupt on cpu %d\n", cpu); |
777 | "Spurious LAPIC timer interrupt on cpu %d\n", cpu); | ||
778 | /* Switch it off */ | 773 | /* Switch it off */ |
779 | lapic_timer_setup(CLOCK_EVT_MODE_SHUTDOWN, evt); | 774 | lapic_timer_setup(CLOCK_EVT_MODE_SHUTDOWN, evt); |
780 | return; | 775 | return; |
@@ -783,11 +778,7 @@ static void local_apic_timer_interrupt(void) | |||
783 | /* | 778 | /* |
784 | * the NMI deadlock-detector uses this. | 779 | * the NMI deadlock-detector uses this. |
785 | */ | 780 | */ |
786 | #ifdef CONFIG_X86_64 | 781 | inc_irq_stat(apic_timer_irqs); |
787 | add_pda(apic_timer_irqs, 1); | ||
788 | #else | ||
789 | per_cpu(irq_stat, cpu).apic_timer_irqs++; | ||
790 | #endif | ||
791 | 782 | ||
792 | evt->event_handler(evt); | 783 | evt->event_handler(evt); |
793 | } | 784 | } |
@@ -800,7 +791,7 @@ static void local_apic_timer_interrupt(void) | |||
800 | * [ if a single-CPU system runs an SMP kernel then we call the local | 791 | * [ if a single-CPU system runs an SMP kernel then we call the local |
801 | * interrupt as well. Thus we cannot inline the local irq ... ] | 792 | * interrupt as well. Thus we cannot inline the local irq ... ] |
802 | */ | 793 | */ |
803 | void smp_apic_timer_interrupt(struct pt_regs *regs) | 794 | void __irq_entry smp_apic_timer_interrupt(struct pt_regs *regs) |
804 | { | 795 | { |
805 | struct pt_regs *old_regs = set_irq_regs(regs); | 796 | struct pt_regs *old_regs = set_irq_regs(regs); |
806 | 797 | ||
@@ -814,9 +805,7 @@ void smp_apic_timer_interrupt(struct pt_regs *regs) | |||
814 | * Besides, if we don't timer interrupts ignore the global | 805 | * Besides, if we don't timer interrupts ignore the global |
815 | * interrupt lock, which is the WrongThing (tm) to do. | 806 | * interrupt lock, which is the WrongThing (tm) to do. |
816 | */ | 807 | */ |
817 | #ifdef CONFIG_X86_64 | ||
818 | exit_idle(); | 808 | exit_idle(); |
819 | #endif | ||
820 | irq_enter(); | 809 | irq_enter(); |
821 | local_apic_timer_interrupt(); | 810 | local_apic_timer_interrupt(); |
822 | irq_exit(); | 811 | irq_exit(); |
@@ -1093,7 +1082,7 @@ static void __cpuinit lapic_setup_esr(void) | |||
1093 | unsigned int oldvalue, value, maxlvt; | 1082 | unsigned int oldvalue, value, maxlvt; |
1094 | 1083 | ||
1095 | if (!lapic_is_integrated()) { | 1084 | if (!lapic_is_integrated()) { |
1096 | printk(KERN_INFO "No ESR for 82489DX.\n"); | 1085 | pr_info("No ESR for 82489DX.\n"); |
1097 | return; | 1086 | return; |
1098 | } | 1087 | } |
1099 | 1088 | ||
@@ -1104,7 +1093,7 @@ static void __cpuinit lapic_setup_esr(void) | |||
1104 | * ESR disabled - we can't do anything useful with the | 1093 | * ESR disabled - we can't do anything useful with the |
1105 | * errors anyway - mbligh | 1094 | * errors anyway - mbligh |
1106 | */ | 1095 | */ |
1107 | printk(KERN_INFO "Leaving ESR disabled.\n"); | 1096 | pr_info("Leaving ESR disabled.\n"); |
1108 | return; | 1097 | return; |
1109 | } | 1098 | } |
1110 | 1099 | ||
@@ -1298,7 +1287,7 @@ void check_x2apic(void) | |||
1298 | rdmsr(MSR_IA32_APICBASE, msr, msr2); | 1287 | rdmsr(MSR_IA32_APICBASE, msr, msr2); |
1299 | 1288 | ||
1300 | if (msr & X2APIC_ENABLE) { | 1289 | if (msr & X2APIC_ENABLE) { |
1301 | printk("x2apic enabled by BIOS, switching to x2apic ops\n"); | 1290 | pr_info("x2apic enabled by BIOS, switching to x2apic ops\n"); |
1302 | x2apic_preenabled = x2apic = 1; | 1291 | x2apic_preenabled = x2apic = 1; |
1303 | apic_ops = &x2apic_ops; | 1292 | apic_ops = &x2apic_ops; |
1304 | } | 1293 | } |
@@ -1310,7 +1299,7 @@ void enable_x2apic(void) | |||
1310 | 1299 | ||
1311 | rdmsr(MSR_IA32_APICBASE, msr, msr2); | 1300 | rdmsr(MSR_IA32_APICBASE, msr, msr2); |
1312 | if (!(msr & X2APIC_ENABLE)) { | 1301 | if (!(msr & X2APIC_ENABLE)) { |
1313 | printk("Enabling x2apic\n"); | 1302 | pr_info("Enabling x2apic\n"); |
1314 | wrmsr(MSR_IA32_APICBASE, msr | X2APIC_ENABLE, 0); | 1303 | wrmsr(MSR_IA32_APICBASE, msr | X2APIC_ENABLE, 0); |
1315 | } | 1304 | } |
1316 | } | 1305 | } |
@@ -1325,9 +1314,8 @@ void __init enable_IR_x2apic(void) | |||
1325 | return; | 1314 | return; |
1326 | 1315 | ||
1327 | if (!x2apic_preenabled && disable_x2apic) { | 1316 | if (!x2apic_preenabled && disable_x2apic) { |
1328 | printk(KERN_INFO | 1317 | pr_info("Skipped enabling x2apic and Interrupt-remapping " |
1329 | "Skipped enabling x2apic and Interrupt-remapping " | 1318 | "because of nox2apic\n"); |
1330 | "because of nox2apic\n"); | ||
1331 | return; | 1319 | return; |
1332 | } | 1320 | } |
1333 | 1321 | ||
@@ -1335,22 +1323,19 @@ void __init enable_IR_x2apic(void) | |||
1335 | panic("Bios already enabled x2apic, can't enforce nox2apic"); | 1323 | panic("Bios already enabled x2apic, can't enforce nox2apic"); |
1336 | 1324 | ||
1337 | if (!x2apic_preenabled && skip_ioapic_setup) { | 1325 | if (!x2apic_preenabled && skip_ioapic_setup) { |
1338 | printk(KERN_INFO | 1326 | pr_info("Skipped enabling x2apic and Interrupt-remapping " |
1339 | "Skipped enabling x2apic and Interrupt-remapping " | 1327 | "because of skipping io-apic setup\n"); |
1340 | "because of skipping io-apic setup\n"); | ||
1341 | return; | 1328 | return; |
1342 | } | 1329 | } |
1343 | 1330 | ||
1344 | ret = dmar_table_init(); | 1331 | ret = dmar_table_init(); |
1345 | if (ret) { | 1332 | if (ret) { |
1346 | printk(KERN_INFO | 1333 | pr_info("dmar_table_init() failed with %d:\n", ret); |
1347 | "dmar_table_init() failed with %d:\n", ret); | ||
1348 | 1334 | ||
1349 | if (x2apic_preenabled) | 1335 | if (x2apic_preenabled) |
1350 | panic("x2apic enabled by bios. But IR enabling failed"); | 1336 | panic("x2apic enabled by bios. But IR enabling failed"); |
1351 | else | 1337 | else |
1352 | printk(KERN_INFO | 1338 | pr_info("Not enabling x2apic,Intr-remapping\n"); |
1353 | "Not enabling x2apic,Intr-remapping\n"); | ||
1354 | return; | 1339 | return; |
1355 | } | 1340 | } |
1356 | 1341 | ||
@@ -1359,7 +1344,7 @@ void __init enable_IR_x2apic(void) | |||
1359 | 1344 | ||
1360 | ret = save_mask_IO_APIC_setup(); | 1345 | ret = save_mask_IO_APIC_setup(); |
1361 | if (ret) { | 1346 | if (ret) { |
1362 | printk(KERN_INFO "Saving IO-APIC state failed: %d\n", ret); | 1347 | pr_info("Saving IO-APIC state failed: %d\n", ret); |
1363 | goto end; | 1348 | goto end; |
1364 | } | 1349 | } |
1365 | 1350 | ||
@@ -1394,14 +1379,11 @@ end: | |||
1394 | 1379 | ||
1395 | if (!ret) { | 1380 | if (!ret) { |
1396 | if (!x2apic_preenabled) | 1381 | if (!x2apic_preenabled) |
1397 | printk(KERN_INFO | 1382 | pr_info("Enabled x2apic and interrupt-remapping\n"); |
1398 | "Enabled x2apic and interrupt-remapping\n"); | ||
1399 | else | 1383 | else |
1400 | printk(KERN_INFO | 1384 | pr_info("Enabled Interrupt-remapping\n"); |
1401 | "Enabled Interrupt-remapping\n"); | ||
1402 | } else | 1385 | } else |
1403 | printk(KERN_ERR | 1386 | pr_err("Failed to enable Interrupt-remapping and x2apic\n"); |
1404 | "Failed to enable Interrupt-remapping and x2apic\n"); | ||
1405 | #else | 1387 | #else |
1406 | if (!cpu_has_x2apic) | 1388 | if (!cpu_has_x2apic) |
1407 | return; | 1389 | return; |
@@ -1410,8 +1392,8 @@ end: | |||
1410 | panic("x2apic enabled prior OS handover," | 1392 | panic("x2apic enabled prior OS handover," |
1411 | " enable CONFIG_INTR_REMAP"); | 1393 | " enable CONFIG_INTR_REMAP"); |
1412 | 1394 | ||
1413 | printk(KERN_INFO "Enable CONFIG_INTR_REMAP for enabling intr-remapping " | 1395 | pr_info("Enable CONFIG_INTR_REMAP for enabling intr-remapping " |
1414 | " and x2apic\n"); | 1396 | " and x2apic\n"); |
1415 | #endif | 1397 | #endif |
1416 | 1398 | ||
1417 | return; | 1399 | return; |
@@ -1428,7 +1410,7 @@ end: | |||
1428 | static int __init detect_init_APIC(void) | 1410 | static int __init detect_init_APIC(void) |
1429 | { | 1411 | { |
1430 | if (!cpu_has_apic) { | 1412 | if (!cpu_has_apic) { |
1431 | printk(KERN_INFO "No local APIC present\n"); | 1413 | pr_info("No local APIC present\n"); |
1432 | return -1; | 1414 | return -1; |
1433 | } | 1415 | } |
1434 | 1416 | ||
@@ -1469,8 +1451,8 @@ static int __init detect_init_APIC(void) | |||
1469 | * "lapic" specified. | 1451 | * "lapic" specified. |
1470 | */ | 1452 | */ |
1471 | if (!force_enable_local_apic) { | 1453 | if (!force_enable_local_apic) { |
1472 | printk(KERN_INFO "Local APIC disabled by BIOS -- " | 1454 | pr_info("Local APIC disabled by BIOS -- " |
1473 | "you can enable it with \"lapic\"\n"); | 1455 | "you can enable it with \"lapic\"\n"); |
1474 | return -1; | 1456 | return -1; |
1475 | } | 1457 | } |
1476 | /* | 1458 | /* |
@@ -1480,8 +1462,7 @@ static int __init detect_init_APIC(void) | |||
1480 | */ | 1462 | */ |
1481 | rdmsr(MSR_IA32_APICBASE, l, h); | 1463 | rdmsr(MSR_IA32_APICBASE, l, h); |
1482 | if (!(l & MSR_IA32_APICBASE_ENABLE)) { | 1464 | if (!(l & MSR_IA32_APICBASE_ENABLE)) { |
1483 | printk(KERN_INFO | 1465 | pr_info("Local APIC disabled by BIOS -- reenabling.\n"); |
1484 | "Local APIC disabled by BIOS -- reenabling.\n"); | ||
1485 | l &= ~MSR_IA32_APICBASE_BASE; | 1466 | l &= ~MSR_IA32_APICBASE_BASE; |
1486 | l |= MSR_IA32_APICBASE_ENABLE | APIC_DEFAULT_PHYS_BASE; | 1467 | l |= MSR_IA32_APICBASE_ENABLE | APIC_DEFAULT_PHYS_BASE; |
1487 | wrmsr(MSR_IA32_APICBASE, l, h); | 1468 | wrmsr(MSR_IA32_APICBASE, l, h); |
@@ -1494,7 +1475,7 @@ static int __init detect_init_APIC(void) | |||
1494 | */ | 1475 | */ |
1495 | features = cpuid_edx(1); | 1476 | features = cpuid_edx(1); |
1496 | if (!(features & (1 << X86_FEATURE_APIC))) { | 1477 | if (!(features & (1 << X86_FEATURE_APIC))) { |
1497 | printk(KERN_WARNING "Could not enable APIC!\n"); | 1478 | pr_warning("Could not enable APIC!\n"); |
1498 | return -1; | 1479 | return -1; |
1499 | } | 1480 | } |
1500 | set_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); | 1481 | set_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); |
@@ -1505,14 +1486,14 @@ static int __init detect_init_APIC(void) | |||
1505 | if (l & MSR_IA32_APICBASE_ENABLE) | 1486 | if (l & MSR_IA32_APICBASE_ENABLE) |
1506 | mp_lapic_addr = l & MSR_IA32_APICBASE_BASE; | 1487 | mp_lapic_addr = l & MSR_IA32_APICBASE_BASE; |
1507 | 1488 | ||
1508 | printk(KERN_INFO "Found and enabled local APIC!\n"); | 1489 | pr_info("Found and enabled local APIC!\n"); |
1509 | 1490 | ||
1510 | apic_pm_activate(); | 1491 | apic_pm_activate(); |
1511 | 1492 | ||
1512 | return 0; | 1493 | return 0; |
1513 | 1494 | ||
1514 | no_apic: | 1495 | no_apic: |
1515 | printk(KERN_INFO "No local APIC present or hardware disabled\n"); | 1496 | pr_info("No local APIC present or hardware disabled\n"); |
1516 | return -1; | 1497 | return -1; |
1517 | } | 1498 | } |
1518 | #endif | 1499 | #endif |
@@ -1588,12 +1569,12 @@ int __init APIC_init_uniprocessor(void) | |||
1588 | { | 1569 | { |
1589 | #ifdef CONFIG_X86_64 | 1570 | #ifdef CONFIG_X86_64 |
1590 | if (disable_apic) { | 1571 | if (disable_apic) { |
1591 | printk(KERN_INFO "Apic disabled\n"); | 1572 | pr_info("Apic disabled\n"); |
1592 | return -1; | 1573 | return -1; |
1593 | } | 1574 | } |
1594 | if (!cpu_has_apic) { | 1575 | if (!cpu_has_apic) { |
1595 | disable_apic = 1; | 1576 | disable_apic = 1; |
1596 | printk(KERN_INFO "Apic disabled by BIOS\n"); | 1577 | pr_info("Apic disabled by BIOS\n"); |
1597 | return -1; | 1578 | return -1; |
1598 | } | 1579 | } |
1599 | #else | 1580 | #else |
@@ -1605,8 +1586,8 @@ int __init APIC_init_uniprocessor(void) | |||
1605 | */ | 1586 | */ |
1606 | if (!cpu_has_apic && | 1587 | if (!cpu_has_apic && |
1607 | APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) { | 1588 | APIC_INTEGRATED(apic_version[boot_cpu_physical_apicid])) { |
1608 | printk(KERN_ERR "BIOS bug, local APIC 0x%x not detected!...\n", | 1589 | pr_err("BIOS bug, local APIC 0x%x not detected!...\n", |
1609 | boot_cpu_physical_apicid); | 1590 | boot_cpu_physical_apicid); |
1610 | clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); | 1591 | clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); |
1611 | return -1; | 1592 | return -1; |
1612 | } | 1593 | } |
@@ -1682,9 +1663,7 @@ void smp_spurious_interrupt(struct pt_regs *regs) | |||
1682 | { | 1663 | { |
1683 | u32 v; | 1664 | u32 v; |
1684 | 1665 | ||
1685 | #ifdef CONFIG_X86_64 | ||
1686 | exit_idle(); | 1666 | exit_idle(); |
1687 | #endif | ||
1688 | irq_enter(); | 1667 | irq_enter(); |
1689 | /* | 1668 | /* |
1690 | * Check if this really is a spurious interrupt and ACK it | 1669 | * Check if this really is a spurious interrupt and ACK it |
@@ -1695,14 +1674,11 @@ void smp_spurious_interrupt(struct pt_regs *regs) | |||
1695 | if (v & (1 << (SPURIOUS_APIC_VECTOR & 0x1f))) | 1674 | if (v & (1 << (SPURIOUS_APIC_VECTOR & 0x1f))) |
1696 | ack_APIC_irq(); | 1675 | ack_APIC_irq(); |
1697 | 1676 | ||
1698 | #ifdef CONFIG_X86_64 | 1677 | inc_irq_stat(irq_spurious_count); |
1699 | add_pda(irq_spurious_count, 1); | 1678 | |
1700 | #else | ||
1701 | /* see sw-dev-man vol 3, chapter 7.4.13.5 */ | 1679 | /* see sw-dev-man vol 3, chapter 7.4.13.5 */ |
1702 | printk(KERN_INFO "spurious APIC interrupt on CPU#%d, " | 1680 | pr_info("spurious APIC interrupt on CPU#%d, " |
1703 | "should never happen.\n", smp_processor_id()); | 1681 | "should never happen.\n", smp_processor_id()); |
1704 | __get_cpu_var(irq_stat).irq_spurious_count++; | ||
1705 | #endif | ||
1706 | irq_exit(); | 1682 | irq_exit(); |
1707 | } | 1683 | } |
1708 | 1684 | ||
@@ -1713,9 +1689,7 @@ void smp_error_interrupt(struct pt_regs *regs) | |||
1713 | { | 1689 | { |
1714 | u32 v, v1; | 1690 | u32 v, v1; |
1715 | 1691 | ||
1716 | #ifdef CONFIG_X86_64 | ||
1717 | exit_idle(); | 1692 | exit_idle(); |
1718 | #endif | ||
1719 | irq_enter(); | 1693 | irq_enter(); |
1720 | /* First tickle the hardware, only then report what went on. -- REW */ | 1694 | /* First tickle the hardware, only then report what went on. -- REW */ |
1721 | v = apic_read(APIC_ESR); | 1695 | v = apic_read(APIC_ESR); |
@@ -1724,17 +1698,18 @@ void smp_error_interrupt(struct pt_regs *regs) | |||
1724 | ack_APIC_irq(); | 1698 | ack_APIC_irq(); |
1725 | atomic_inc(&irq_err_count); | 1699 | atomic_inc(&irq_err_count); |
1726 | 1700 | ||
1727 | /* Here is what the APIC error bits mean: | 1701 | /* |
1728 | 0: Send CS error | 1702 | * Here is what the APIC error bits mean: |
1729 | 1: Receive CS error | 1703 | * 0: Send CS error |
1730 | 2: Send accept error | 1704 | * 1: Receive CS error |
1731 | 3: Receive accept error | 1705 | * 2: Send accept error |
1732 | 4: Reserved | 1706 | * 3: Receive accept error |
1733 | 5: Send illegal vector | 1707 | * 4: Reserved |
1734 | 6: Received illegal vector | 1708 | * 5: Send illegal vector |
1735 | 7: Illegal register address | 1709 | * 6: Received illegal vector |
1736 | */ | 1710 | * 7: Illegal register address |
1737 | printk(KERN_DEBUG "APIC error on CPU%d: %02x(%02x)\n", | 1711 | */ |
1712 | pr_debug("APIC error on CPU%d: %02x(%02x)\n", | ||
1738 | smp_processor_id(), v , v1); | 1713 | smp_processor_id(), v , v1); |
1739 | irq_exit(); | 1714 | irq_exit(); |
1740 | } | 1715 | } |
@@ -1838,15 +1813,15 @@ void __cpuinit generic_processor_info(int apicid, int version) | |||
1838 | * Validate version | 1813 | * Validate version |
1839 | */ | 1814 | */ |
1840 | if (version == 0x0) { | 1815 | if (version == 0x0) { |
1841 | printk(KERN_WARNING "BIOS bug, APIC version is 0 for CPU#%d! " | 1816 | pr_warning("BIOS bug, APIC version is 0 for CPU#%d! " |
1842 | "fixing up to 0x10. (tell your hw vendor)\n", | 1817 | "fixing up to 0x10. (tell your hw vendor)\n", |
1843 | version); | 1818 | version); |
1844 | version = 0x10; | 1819 | version = 0x10; |
1845 | } | 1820 | } |
1846 | apic_version[apicid] = version; | 1821 | apic_version[apicid] = version; |
1847 | 1822 | ||
1848 | if (num_processors >= NR_CPUS) { | 1823 | if (num_processors >= NR_CPUS) { |
1849 | printk(KERN_WARNING "WARNING: NR_CPUS limit of %i reached." | 1824 | pr_warning("WARNING: NR_CPUS limit of %i reached." |
1850 | " Processor ignored.\n", NR_CPUS); | 1825 | " Processor ignored.\n", NR_CPUS); |
1851 | return; | 1826 | return; |
1852 | } | 1827 | } |
@@ -2209,7 +2184,7 @@ static int __init apic_set_verbosity(char *arg) | |||
2209 | else if (strcmp("verbose", arg) == 0) | 2184 | else if (strcmp("verbose", arg) == 0) |
2210 | apic_verbosity = APIC_VERBOSE; | 2185 | apic_verbosity = APIC_VERBOSE; |
2211 | else { | 2186 | else { |
2212 | printk(KERN_WARNING "APIC Verbosity level %s not recognised" | 2187 | pr_warning("APIC Verbosity level %s not recognised" |
2213 | " use apic=verbose or apic=debug\n", arg); | 2188 | " use apic=verbose or apic=debug\n", arg); |
2214 | return -EINVAL; | 2189 | return -EINVAL; |
2215 | } | 2190 | } |