From d867e5310bd3c560093d39669ef52ff7f1b5711a Mon Sep 17 00:00:00 2001 From: Yinghai Lu Date: Sat, 14 Jun 2008 01:26:41 -0700 Subject: x86: keep MP_intsrc_info untouched if we do not update mptable Daniel Exner reported IO-APIC enumeration breakage in linux-next. Alexey Starikovskiy found out that it might be related to commit 2944e16b25 "x86: update mptable". use enable_update_mptable to decide if need check before add mp_irqs array. Reported-by: Daniel Exner Signed-off-by: Yinghai Lu Signed-off-by: Ingo Molnar --- arch/x86/kernel/acpi/boot.c | 3 +++ arch/x86/kernel/mpparse.c | 13 +++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'arch') diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index caf4ed7ca06..4d370b1c5ae 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -1172,6 +1172,9 @@ int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, struct mpc_config_intsrc intsrc; int ioapic; + if (!enable_update_mptable) + return 0; + /* print the entry should happen on mptable identically */ intsrc.mpc_type = MP_INTSRC; intsrc.mpc_irqtype = mp_INT; diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index b62ac6ba141..014ac5d90f8 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c @@ -34,6 +34,8 @@ #include #endif +int enable_update_mptable; + /* * Checksum an MP configuration block. */ @@ -295,10 +297,11 @@ void MP_intsrc_info(struct mpc_config_intsrc *m) print_MP_intsrc_info(m); - for (i = 0; i < mp_irq_entries; i++) { - if (!mp_irq_mpc_intsrc_cmp(&mp_irqs[i], m)) - return; - } + if (enable_update_mptable) + for (i = 0; i < mp_irq_entries; i++) { + if (!mp_irq_mpc_intsrc_cmp(&mp_irqs[i], m)) + return; + } assign_to_mp_irq(m, &mp_irqs[mp_irq_entries]); if (++mp_irq_entries == MAX_IRQ_SOURCES) @@ -1110,8 +1113,6 @@ out: return 0; } -int __initdata enable_update_mptable; - static int __init update_mptable_setup(char *str) { enable_update_mptable = 1; -- cgit v1.2.3-70-g09d2