aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/acpi/boot.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/kernel/acpi/boot.c')
-rw-r--r--arch/i386/kernel/acpi/boot.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c
index 2111529dea77..79577f0ace98 100644
--- a/arch/i386/kernel/acpi/boot.c
+++ b/arch/i386/kernel/acpi/boot.c
@@ -248,10 +248,17 @@ acpi_parse_lapic(acpi_table_entry_header * header, const unsigned long end)
248 248
249 acpi_table_print_madt_entry(header); 249 acpi_table_print_madt_entry(header);
250 250
251 /* Register even disabled CPUs for cpu hotplug */ 251 /* Record local apic id only when enabled */
252 252 if (processor->flags.enabled)
253 x86_acpiid_to_apicid[processor->acpi_id] = processor->id; 253 x86_acpiid_to_apicid[processor->acpi_id] = processor->id;
254 254
255 /*
256 * We need to register disabled CPU as well to permit
257 * counting disabled CPUs. This allows us to size
258 * cpus_possible_map more accurately, to permit
259 * to not preallocating memory for all NR_CPUS
260 * when we use CPU hotplug.
261 */
255 mp_register_lapic(processor->id, /* APIC ID */ 262 mp_register_lapic(processor->id, /* APIC ID */
256 processor->flags.enabled); /* Enabled? */ 263 processor->flags.enabled); /* Enabled? */
257 264
@@ -464,7 +471,7 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
464 * success: return IRQ number (>=0) 471 * success: return IRQ number (>=0)
465 * failure: return < 0 472 * failure: return < 0
466 */ 473 */
467int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) 474int acpi_register_gsi(u32 gsi, int triggering, int polarity)
468{ 475{
469 unsigned int irq; 476 unsigned int irq;
470 unsigned int plat_gsi = gsi; 477 unsigned int plat_gsi = gsi;
@@ -476,14 +483,14 @@ int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low)
476 if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) { 483 if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) {
477 extern void eisa_set_level_irq(unsigned int irq); 484 extern void eisa_set_level_irq(unsigned int irq);
478 485
479 if (edge_level == ACPI_LEVEL_SENSITIVE) 486 if (triggering == ACPI_LEVEL_SENSITIVE)
480 eisa_set_level_irq(gsi); 487 eisa_set_level_irq(gsi);
481 } 488 }
482#endif 489#endif
483 490
484#ifdef CONFIG_X86_IO_APIC 491#ifdef CONFIG_X86_IO_APIC
485 if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC) { 492 if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC) {
486 plat_gsi = mp_register_gsi(gsi, edge_level, active_high_low); 493 plat_gsi = mp_register_gsi(gsi, triggering, polarity);
487 } 494 }
488#endif 495#endif
489 acpi_gsi_to_irq(plat_gsi, &irq); 496 acpi_gsi_to_irq(plat_gsi, &irq);