提交 d867e531 编写于 作者: Y Yinghai Lu 提交者: Ingo Molnar

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 2944e16b "x86: update mptable".

use enable_update_mptable to decide if need check before add mp_irqs array.
Reported-by: NDaniel Exner <webmaster@dragonslave.de>
Signed-off-by: NYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 9a27f5c5
...@@ -1172,6 +1172,9 @@ int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, ...@@ -1172,6 +1172,9 @@ int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin,
struct mpc_config_intsrc intsrc; struct mpc_config_intsrc intsrc;
int ioapic; int ioapic;
if (!enable_update_mptable)
return 0;
/* print the entry should happen on mptable identically */ /* print the entry should happen on mptable identically */
intsrc.mpc_type = MP_INTSRC; intsrc.mpc_type = MP_INTSRC;
intsrc.mpc_irqtype = mp_INT; intsrc.mpc_irqtype = mp_INT;
......
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
#include <mach_mpparse.h> #include <mach_mpparse.h>
#endif #endif
int enable_update_mptable;
/* /*
* Checksum an MP configuration block. * Checksum an MP configuration block.
*/ */
...@@ -295,10 +297,11 @@ void MP_intsrc_info(struct mpc_config_intsrc *m) ...@@ -295,10 +297,11 @@ void MP_intsrc_info(struct mpc_config_intsrc *m)
print_MP_intsrc_info(m); print_MP_intsrc_info(m);
for (i = 0; i < mp_irq_entries; i++) { if (enable_update_mptable)
if (!mp_irq_mpc_intsrc_cmp(&mp_irqs[i], m)) for (i = 0; i < mp_irq_entries; i++) {
return; if (!mp_irq_mpc_intsrc_cmp(&mp_irqs[i], m))
} return;
}
assign_to_mp_irq(m, &mp_irqs[mp_irq_entries]); assign_to_mp_irq(m, &mp_irqs[mp_irq_entries]);
if (++mp_irq_entries == MAX_IRQ_SOURCES) if (++mp_irq_entries == MAX_IRQ_SOURCES)
...@@ -1110,8 +1113,6 @@ static int __init replace_intsrc_all(struct mp_config_table *mpc, ...@@ -1110,8 +1113,6 @@ static int __init replace_intsrc_all(struct mp_config_table *mpc,
return 0; return 0;
} }
int __initdata enable_update_mptable;
static int __init update_mptable_setup(char *str) static int __init update_mptable_setup(char *str)
{ {
enable_update_mptable = 1; enable_update_mptable = 1;
......
...@@ -61,6 +61,7 @@ extern void mp_config_acpi_legacy_irqs(void); ...@@ -61,6 +61,7 @@ extern void mp_config_acpi_legacy_irqs(void);
extern int mp_register_gsi(u32 gsi, int edge_level, int active_high_low); extern int mp_register_gsi(u32 gsi, int edge_level, int active_high_low);
extern void MP_intsrc_info(struct mpc_config_intsrc *m); extern void MP_intsrc_info(struct mpc_config_intsrc *m);
#ifdef CONFIG_X86_IO_APIC #ifdef CONFIG_X86_IO_APIC
extern int enable_update_mptable;
extern int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, extern int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin,
u32 gsi, int triggering, int polarity); u32 gsi, int triggering, int polarity);
#else #else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册