diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-06-18 20:29:31 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 04:39:07 -0400 |
commit | fcfa146e412023dd55f8855f240b2c2082dc1baa (patch) | |
tree | 76cc7c6a9b9cd1f303f2cc4f4360d9f3ce2123a5 /arch/x86/kernel/mpparse.c | |
parent | 95a71a45c250177854f7c530810c88a8a19a443b (diff) |
x86: update mptable fix with no ioapic v2
if the system doesn't have ioapic, we don't need to store entries for mptable
update
also let mp_config_acpi_gsi not call func in mpparse
so later could decouple mpparse with acpi more easily
Reported-by: Daniel Exner <dex@dragonslave.de>
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Daniel Exner <dex@dragonslave.de>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/mpparse.c')
-rw-r--r-- | arch/x86/kernel/mpparse.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index 014ac5d90f80..8b6b1e05c306 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c | |||
@@ -34,8 +34,6 @@ | |||
34 | #include <mach_mpparse.h> | 34 | #include <mach_mpparse.h> |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | int enable_update_mptable; | ||
38 | |||
39 | /* | 37 | /* |
40 | * Checksum an MP configuration block. | 38 | * Checksum an MP configuration block. |
41 | */ | 39 | */ |
@@ -246,7 +244,7 @@ static void __init print_mp_irq_info(struct mp_config_intsrc *mp_irq) | |||
246 | mp_irq->mp_srcbusirq, mp_irq->mp_dstapic, mp_irq->mp_dstirq); | 244 | mp_irq->mp_srcbusirq, mp_irq->mp_dstapic, mp_irq->mp_dstirq); |
247 | } | 245 | } |
248 | 246 | ||
249 | static void assign_to_mp_irq(struct mpc_config_intsrc *m, | 247 | static void __init assign_to_mp_irq(struct mpc_config_intsrc *m, |
250 | struct mp_config_intsrc *mp_irq) | 248 | struct mp_config_intsrc *mp_irq) |
251 | { | 249 | { |
252 | mp_irq->mp_dstapic = m->mpc_dstapic; | 250 | mp_irq->mp_dstapic = m->mpc_dstapic; |
@@ -270,7 +268,7 @@ static void __init assign_to_mpc_intsrc(struct mp_config_intsrc *mp_irq, | |||
270 | m->mpc_dstirq = mp_irq->mp_dstirq; | 268 | m->mpc_dstirq = mp_irq->mp_dstirq; |
271 | } | 269 | } |
272 | 270 | ||
273 | static int mp_irq_mpc_intsrc_cmp(struct mp_config_intsrc *mp_irq, | 271 | static int __init mp_irq_mpc_intsrc_cmp(struct mp_config_intsrc *mp_irq, |
274 | struct mpc_config_intsrc *m) | 272 | struct mpc_config_intsrc *m) |
275 | { | 273 | { |
276 | if (mp_irq->mp_dstapic != m->mpc_dstapic) | 274 | if (mp_irq->mp_dstapic != m->mpc_dstapic) |
@@ -291,17 +289,16 @@ static int mp_irq_mpc_intsrc_cmp(struct mp_config_intsrc *mp_irq, | |||
291 | return 0; | 289 | return 0; |
292 | } | 290 | } |
293 | 291 | ||
294 | void MP_intsrc_info(struct mpc_config_intsrc *m) | 292 | static void __init MP_intsrc_info(struct mpc_config_intsrc *m) |
295 | { | 293 | { |
296 | int i; | 294 | int i; |
297 | 295 | ||
298 | print_MP_intsrc_info(m); | 296 | print_MP_intsrc_info(m); |
299 | 297 | ||
300 | if (enable_update_mptable) | 298 | for (i = 0; i < mp_irq_entries; i++) { |
301 | for (i = 0; i < mp_irq_entries; i++) { | 299 | if (!mp_irq_mpc_intsrc_cmp(&mp_irqs[i], m)) |
302 | if (!mp_irq_mpc_intsrc_cmp(&mp_irqs[i], m)) | 300 | return; |
303 | return; | 301 | } |
304 | } | ||
305 | 302 | ||
306 | assign_to_mp_irq(m, &mp_irqs[mp_irq_entries]); | 303 | assign_to_mp_irq(m, &mp_irqs[mp_irq_entries]); |
307 | if (++mp_irq_entries == MAX_IRQ_SOURCES) | 304 | if (++mp_irq_entries == MAX_IRQ_SOURCES) |
@@ -1113,6 +1110,8 @@ out: | |||
1113 | return 0; | 1110 | return 0; |
1114 | } | 1111 | } |
1115 | 1112 | ||
1113 | static int __initdata enable_update_mptable; | ||
1114 | |||
1116 | static int __init update_mptable_setup(char *str) | 1115 | static int __init update_mptable_setup(char *str) |
1117 | { | 1116 | { |
1118 | enable_update_mptable = 1; | 1117 | enable_update_mptable = 1; |