diff options
Diffstat (limited to 'arch/x86/kernel/apic/apic.c')
-rw-r--r-- | arch/x86/kernel/apic/apic.c | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index c0f6426cd337..ce65d449b750 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <linux/cpu.h> | 32 | #include <linux/cpu.h> |
33 | #include <linux/dmi.h> | 33 | #include <linux/dmi.h> |
34 | #include <linux/nmi.h> | ||
35 | #include <linux/smp.h> | 34 | #include <linux/smp.h> |
36 | #include <linux/mm.h> | 35 | #include <linux/mm.h> |
37 | 36 | ||
@@ -432,17 +431,18 @@ int setup_APIC_eilvt(u8 offset, u8 vector, u8 msg_type, u8 mask) | |||
432 | reserved = reserve_eilvt_offset(offset, new); | 431 | reserved = reserve_eilvt_offset(offset, new); |
433 | 432 | ||
434 | if (reserved != new) { | 433 | if (reserved != new) { |
435 | pr_err(FW_BUG "cpu %d, try to setup vector 0x%x, but " | 434 | pr_err(FW_BUG "cpu %d, try to use APIC%lX (LVT offset %d) for " |
436 | "vector 0x%x was already reserved by another core, " | 435 | "vector 0x%x, but the register is already in use for " |
437 | "APIC%lX=0x%x\n", | 436 | "vector 0x%x on another cpu\n", |
438 | smp_processor_id(), new, reserved, reg, old); | 437 | smp_processor_id(), reg, offset, new, reserved); |
439 | return -EINVAL; | 438 | return -EINVAL; |
440 | } | 439 | } |
441 | 440 | ||
442 | if (!eilvt_entry_is_changeable(old, new)) { | 441 | if (!eilvt_entry_is_changeable(old, new)) { |
443 | pr_err(FW_BUG "cpu %d, try to setup vector 0x%x but " | 442 | pr_err(FW_BUG "cpu %d, try to use APIC%lX (LVT offset %d) for " |
444 | "register already in use, APIC%lX=0x%x\n", | 443 | "vector 0x%x, but the register is already in use for " |
445 | smp_processor_id(), new, reg, old); | 444 | "vector 0x%x on this cpu\n", |
445 | smp_processor_id(), reg, offset, new, old); | ||
446 | return -EBUSY; | 446 | return -EBUSY; |
447 | } | 447 | } |
448 | 448 | ||
@@ -799,11 +799,7 @@ void __init setup_boot_APIC_clock(void) | |||
799 | * PIT/HPET going. Otherwise register lapic as a dummy | 799 | * PIT/HPET going. Otherwise register lapic as a dummy |
800 | * device. | 800 | * device. |
801 | */ | 801 | */ |
802 | if (nmi_watchdog != NMI_IO_APIC) | 802 | lapic_clockevent.features &= ~CLOCK_EVT_FEAT_DUMMY; |
803 | lapic_clockevent.features &= ~CLOCK_EVT_FEAT_DUMMY; | ||
804 | else | ||
805 | pr_warning("APIC timer registered as dummy," | ||
806 | " due to nmi_watchdog=%d!\n", nmi_watchdog); | ||
807 | 803 | ||
808 | /* Setup the lapic or request the broadcast */ | 804 | /* Setup the lapic or request the broadcast */ |
809 | setup_APIC_timer(); | 805 | setup_APIC_timer(); |
@@ -1384,8 +1380,15 @@ void __cpuinit end_local_APIC_setup(void) | |||
1384 | } | 1380 | } |
1385 | #endif | 1381 | #endif |
1386 | 1382 | ||
1387 | setup_apic_nmi_watchdog(NULL); | ||
1388 | apic_pm_activate(); | 1383 | apic_pm_activate(); |
1384 | |||
1385 | /* | ||
1386 | * Now that local APIC setup is completed for BP, configure the fault | ||
1387 | * handling for interrupt remapping. | ||
1388 | */ | ||
1389 | if (!smp_processor_id() && intr_remapping_enabled) | ||
1390 | enable_drhd_fault_handling(); | ||
1391 | |||
1389 | } | 1392 | } |
1390 | 1393 | ||
1391 | #ifdef CONFIG_X86_X2APIC | 1394 | #ifdef CONFIG_X86_X2APIC |
@@ -1694,7 +1697,7 @@ void __init register_lapic_address(unsigned long address) | |||
1694 | * This initializes the IO-APIC and APIC hardware if this is | 1697 | * This initializes the IO-APIC and APIC hardware if this is |
1695 | * a UP kernel. | 1698 | * a UP kernel. |
1696 | */ | 1699 | */ |
1697 | int apic_version[MAX_APICS]; | 1700 | int apic_version[MAX_LOCAL_APIC]; |
1698 | 1701 | ||
1699 | int __init APIC_init_uniprocessor(void) | 1702 | int __init APIC_init_uniprocessor(void) |
1700 | { | 1703 | { |
@@ -1759,17 +1762,10 @@ int __init APIC_init_uniprocessor(void) | |||
1759 | setup_IO_APIC(); | 1762 | setup_IO_APIC(); |
1760 | else { | 1763 | else { |
1761 | nr_ioapics = 0; | 1764 | nr_ioapics = 0; |
1762 | localise_nmi_watchdog(); | ||
1763 | } | 1765 | } |
1764 | #else | ||
1765 | localise_nmi_watchdog(); | ||
1766 | #endif | 1766 | #endif |
1767 | 1767 | ||
1768 | x86_init.timers.setup_percpu_clockev(); | 1768 | x86_init.timers.setup_percpu_clockev(); |
1769 | #ifdef CONFIG_X86_64 | ||
1770 | check_nmi_watchdog(); | ||
1771 | #endif | ||
1772 | |||
1773 | return 0; | 1769 | return 0; |
1774 | } | 1770 | } |
1775 | 1771 | ||