aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/acpi/boot.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/acpi/boot.c')
-rw-r--r--arch/x86/kernel/acpi/boot.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index dcfbc3ab9e46..4af63dfb0f06 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -523,7 +523,7 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
523 * success: return IRQ number (>=0) 523 * success: return IRQ number (>=0)
524 * failure: return < 0 524 * failure: return < 0
525 */ 525 */
526int acpi_register_gsi(struct device *dev, u32 gsi, int triggering, int polarity) 526int acpi_register_gsi(struct device *dev, u32 gsi, int trigger, int polarity)
527{ 527{
528 unsigned int irq; 528 unsigned int irq;
529 unsigned int plat_gsi = gsi; 529 unsigned int plat_gsi = gsi;
@@ -533,14 +533,14 @@ int acpi_register_gsi(struct device *dev, u32 gsi, int triggering, int polarity)
533 * Make sure all (legacy) PCI IRQs are set as level-triggered. 533 * Make sure all (legacy) PCI IRQs are set as level-triggered.
534 */ 534 */
535 if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) { 535 if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) {
536 if (triggering == ACPI_LEVEL_SENSITIVE) 536 if (trigger == ACPI_LEVEL_SENSITIVE)
537 eisa_set_level_irq(gsi); 537 eisa_set_level_irq(gsi);
538 } 538 }
539#endif 539#endif
540 540
541#ifdef CONFIG_X86_IO_APIC 541#ifdef CONFIG_X86_IO_APIC
542 if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC) { 542 if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC) {
543 plat_gsi = mp_register_gsi(dev, gsi, triggering, polarity); 543 plat_gsi = mp_register_gsi(dev, gsi, trigger, polarity);
544 } 544 }
545#endif 545#endif
546 acpi_gsi_to_irq(plat_gsi, &irq); 546 acpi_gsi_to_irq(plat_gsi, &irq);
@@ -1156,7 +1156,7 @@ void __init mp_config_acpi_legacy_irqs(void)
1156 } 1156 }
1157} 1157}
1158 1158
1159static int mp_config_acpi_gsi(struct device *dev, u32 gsi, int triggering, 1159static int mp_config_acpi_gsi(struct device *dev, u32 gsi, int trigger,
1160 int polarity) 1160 int polarity)
1161{ 1161{
1162#ifdef CONFIG_X86_MPPARSE 1162#ifdef CONFIG_X86_MPPARSE
@@ -1181,7 +1181,7 @@ static int mp_config_acpi_gsi(struct device *dev, u32 gsi, int triggering,
1181 /* print the entry should happen on mptable identically */ 1181 /* print the entry should happen on mptable identically */
1182 mp_irq.type = MP_INTSRC; 1182 mp_irq.type = MP_INTSRC;
1183 mp_irq.irqtype = mp_INT; 1183 mp_irq.irqtype = mp_INT;
1184 mp_irq.irqflag = (triggering == ACPI_EDGE_SENSITIVE ? 4 : 0x0c) | 1184 mp_irq.irqflag = (trigger == ACPI_EDGE_SENSITIVE ? 4 : 0x0c) |
1185 (polarity == ACPI_ACTIVE_HIGH ? 1 : 3); 1185 (polarity == ACPI_ACTIVE_HIGH ? 1 : 3);
1186 mp_irq.srcbus = number; 1186 mp_irq.srcbus = number;
1187 mp_irq.srcbusirq = (((devfn >> 3) & 0x1f) << 2) | ((pin - 1) & 3); 1187 mp_irq.srcbusirq = (((devfn >> 3) & 0x1f) << 2) | ((pin - 1) & 3);
@@ -1194,10 +1194,11 @@ static int mp_config_acpi_gsi(struct device *dev, u32 gsi, int triggering,
1194 return 0; 1194 return 0;
1195} 1195}
1196 1196
1197int mp_register_gsi(struct device *dev, u32 gsi, int triggering, int polarity) 1197int mp_register_gsi(struct device *dev, u32 gsi, int trigger, int polarity)
1198{ 1198{
1199 int ioapic; 1199 int ioapic;
1200 int ioapic_pin; 1200 int ioapic_pin;
1201 struct io_apic_irq_attr irq_attr;
1201 1202
1202 if (acpi_irq_model != ACPI_IRQ_MODEL_IOAPIC) 1203 if (acpi_irq_model != ACPI_IRQ_MODEL_IOAPIC)
1203 return gsi; 1204 return gsi;
@@ -1225,11 +1226,12 @@ int mp_register_gsi(struct device *dev, u32 gsi, int triggering, int polarity)
1225 ioapic_pin); 1226 ioapic_pin);
1226 return gsi; 1227 return gsi;
1227 } 1228 }
1228 mp_config_acpi_gsi(dev, gsi, triggering, polarity); 1229 mp_config_acpi_gsi(dev, gsi, trigger, polarity);
1229 1230
1230 io_apic_set_pci_routing(dev, ioapic, ioapic_pin, gsi, 1231 set_io_apic_irq_attr(&irq_attr, ioapic, ioapic_pin,
1231 triggering == ACPI_EDGE_SENSITIVE ? 0 : 1, 1232 trigger == ACPI_EDGE_SENSITIVE ? 0 : 1,
1232 polarity == ACPI_ACTIVE_HIGH ? 0 : 1); 1233 polarity == ACPI_ACTIVE_HIGH ? 0 : 1);
1234 io_apic_set_pci_routing(dev, gsi, &irq_attr);
1233 1235
1234 return gsi; 1236 return gsi;
1235} 1237}