diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-06-14 04:26:41 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 04:36:40 -0400 |
commit | d867e5310bd3c560093d39669ef52ff7f1b5711a (patch) | |
tree | 3be9c3a370de73eef951be4d6bd530064aa9fd3b | |
parent | 9a27f5c51629c3d3b7718dd4be3d2722b472fafe (diff) |
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 <webmaster@dragonslave.de>
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 3 | ||||
-rw-r--r-- | arch/x86/kernel/mpparse.c | 13 | ||||
-rw-r--r-- | include/asm-x86/mpspec.h | 1 |
3 files changed, 11 insertions, 6 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index caf4ed7ca069..4d370b1c5ae8 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, | |||
1172 | struct mpc_config_intsrc intsrc; | 1172 | struct mpc_config_intsrc intsrc; |
1173 | int ioapic; | 1173 | int ioapic; |
1174 | 1174 | ||
1175 | if (!enable_update_mptable) | ||
1176 | return 0; | ||
1177 | |||
1175 | /* print the entry should happen on mptable identically */ | 1178 | /* print the entry should happen on mptable identically */ |
1176 | intsrc.mpc_type = MP_INTSRC; | 1179 | intsrc.mpc_type = MP_INTSRC; |
1177 | intsrc.mpc_irqtype = mp_INT; | 1180 | intsrc.mpc_irqtype = mp_INT; |
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index b62ac6ba1410..014ac5d90f80 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c | |||
@@ -34,6 +34,8 @@ | |||
34 | #include <mach_mpparse.h> | 34 | #include <mach_mpparse.h> |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | int enable_update_mptable; | ||
38 | |||
37 | /* | 39 | /* |
38 | * Checksum an MP configuration block. | 40 | * Checksum an MP configuration block. |
39 | */ | 41 | */ |
@@ -295,10 +297,11 @@ void MP_intsrc_info(struct mpc_config_intsrc *m) | |||
295 | 297 | ||
296 | print_MP_intsrc_info(m); | 298 | print_MP_intsrc_info(m); |
297 | 299 | ||
298 | for (i = 0; i < mp_irq_entries; i++) { | 300 | if (enable_update_mptable) |
299 | if (!mp_irq_mpc_intsrc_cmp(&mp_irqs[i], m)) | 301 | for (i = 0; i < mp_irq_entries; i++) { |
300 | return; | 302 | if (!mp_irq_mpc_intsrc_cmp(&mp_irqs[i], m)) |
301 | } | 303 | return; |
304 | } | ||
302 | 305 | ||
303 | assign_to_mp_irq(m, &mp_irqs[mp_irq_entries]); | 306 | assign_to_mp_irq(m, &mp_irqs[mp_irq_entries]); |
304 | if (++mp_irq_entries == MAX_IRQ_SOURCES) | 307 | if (++mp_irq_entries == MAX_IRQ_SOURCES) |
@@ -1110,8 +1113,6 @@ out: | |||
1110 | return 0; | 1113 | return 0; |
1111 | } | 1114 | } |
1112 | 1115 | ||
1113 | int __initdata enable_update_mptable; | ||
1114 | |||
1115 | static int __init update_mptable_setup(char *str) | 1116 | static int __init update_mptable_setup(char *str) |
1116 | { | 1117 | { |
1117 | enable_update_mptable = 1; | 1118 | enable_update_mptable = 1; |
diff --git a/include/asm-x86/mpspec.h b/include/asm-x86/mpspec.h index b8ba37496e2d..f48dbca740e4 100644 --- a/include/asm-x86/mpspec.h +++ b/include/asm-x86/mpspec.h | |||
@@ -61,6 +61,7 @@ extern void mp_config_acpi_legacy_irqs(void); | |||
61 | extern int mp_register_gsi(u32 gsi, int edge_level, int active_high_low); | 61 | extern int mp_register_gsi(u32 gsi, int edge_level, int active_high_low); |
62 | extern void MP_intsrc_info(struct mpc_config_intsrc *m); | 62 | extern void MP_intsrc_info(struct mpc_config_intsrc *m); |
63 | #ifdef CONFIG_X86_IO_APIC | 63 | #ifdef CONFIG_X86_IO_APIC |
64 | extern int enable_update_mptable; | ||
64 | extern int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, | 65 | extern int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, |
65 | u32 gsi, int triggering, int polarity); | 66 | u32 gsi, int triggering, int polarity); |
66 | #else | 67 | #else |