aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2005-12-28 02:43:51 -0500
committerLen Brown <len.brown@intel.com>2005-12-28 02:50:44 -0500
commitcb654695f6b912cef7cb3271665b6ee0d416124c (patch)
tree3aa96d52b12f81837d8a669099a4a7ac7807c8af
parent28f55ebce5bd2fceec8adc7c8860953d3e4532a8 (diff)
[ACPI] acpi_register_gsi() fix needed for ACPICA 20051021
Use the #define for ACPI_LEVEL_SENSITIVE instead of assuming non-zero, because ACPICA 20051021 changes its value to zero. Also, use uniform variable names: edge_level -> triggering active_high_low -> polarity Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--arch/i386/kernel/acpi/boot.c6
-rw-r--r--arch/i386/kernel/mpparse.c8
-rw-r--r--arch/ia64/kernel/acpi.c6
-rw-r--r--arch/x86_64/kernel/mpparse.c2
4 files changed, 11 insertions, 11 deletions
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c
index 447fa9e33ffb..1f378df14f34 100644
--- a/arch/i386/kernel/acpi/boot.c
+++ b/arch/i386/kernel/acpi/boot.c
@@ -464,7 +464,7 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
464 * success: return IRQ number (>=0) 464 * success: return IRQ number (>=0)
465 * failure: return < 0 465 * failure: return < 0
466 */ 466 */
467int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) 467int acpi_register_gsi(u32 gsi, int triggering, int polarity)
468{ 468{
469 unsigned int irq; 469 unsigned int irq;
470 unsigned int plat_gsi = gsi; 470 unsigned int plat_gsi = gsi;
@@ -476,14 +476,14 @@ int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low)
476 if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) { 476 if (acpi_irq_model == ACPI_IRQ_MODEL_PIC) {
477 extern void eisa_set_level_irq(unsigned int irq); 477 extern void eisa_set_level_irq(unsigned int irq);
478 478
479 if (edge_level == ACPI_LEVEL_SENSITIVE) 479 if (triggering == ACPI_LEVEL_SENSITIVE)
480 eisa_set_level_irq(gsi); 480 eisa_set_level_irq(gsi);
481 } 481 }
482#endif 482#endif
483 483
484#ifdef CONFIG_X86_IO_APIC 484#ifdef CONFIG_X86_IO_APIC
485 if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC) { 485 if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC) {
486 plat_gsi = mp_register_gsi(gsi, edge_level, active_high_low); 486 plat_gsi = mp_register_gsi(gsi, triggering, polarity);
487 } 487 }
488#endif 488#endif
489 acpi_gsi_to_irq(plat_gsi, &irq); 489 acpi_gsi_to_irq(plat_gsi, &irq);
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c
index 1ca5269b1e86..d7cede83ba2e 100644
--- a/arch/i386/kernel/mpparse.c
+++ b/arch/i386/kernel/mpparse.c
@@ -1070,7 +1070,7 @@ void __init mp_config_acpi_legacy_irqs (void)
1070 1070
1071#define MAX_GSI_NUM 4096 1071#define MAX_GSI_NUM 4096
1072 1072
1073int mp_register_gsi (u32 gsi, int edge_level, int active_high_low) 1073int mp_register_gsi (u32 gsi, int triggering, int polarity)
1074{ 1074{
1075 int ioapic = -1; 1075 int ioapic = -1;
1076 int ioapic_pin = 0; 1076 int ioapic_pin = 0;
@@ -1119,7 +1119,7 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low)
1119 1119
1120 mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit); 1120 mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit);
1121 1121
1122 if (edge_level) { 1122 if (triggering == ACPI_LEVEL_SENSITIVE) {
1123 /* 1123 /*
1124 * For PCI devices assign IRQs in order, avoiding gaps 1124 * For PCI devices assign IRQs in order, avoiding gaps
1125 * due to unused I/O APIC pins. 1125 * due to unused I/O APIC pins.
@@ -1141,8 +1141,8 @@ int mp_register_gsi (u32 gsi, int edge_level, int active_high_low)
1141 } 1141 }
1142 1142
1143 io_apic_set_pci_routing(ioapic, ioapic_pin, gsi, 1143 io_apic_set_pci_routing(ioapic, ioapic_pin, gsi,
1144 edge_level == ACPI_EDGE_SENSITIVE ? 0 : 1, 1144 triggering == ACPI_EDGE_SENSITIVE ? 0 : 1,
1145 active_high_low == ACPI_ACTIVE_HIGH ? 0 : 1); 1145 polarity == ACPI_ACTIVE_HIGH ? 0 : 1);
1146 return gsi; 1146 return gsi;
1147} 1147}
1148 1148
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 9ad94ddf6687..d2702c419cf8 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -567,16 +567,16 @@ void __init acpi_numa_arch_fixup(void)
567 * success: return IRQ number (>=0) 567 * success: return IRQ number (>=0)
568 * failure: return < 0 568 * failure: return < 0
569 */ 569 */
570int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) 570int acpi_register_gsi(u32 gsi, int triggering, int polarity)
571{ 571{
572 if (has_8259 && gsi < 16) 572 if (has_8259 && gsi < 16)
573 return isa_irq_to_vector(gsi); 573 return isa_irq_to_vector(gsi);
574 574
575 return iosapic_register_intr(gsi, 575 return iosapic_register_intr(gsi,
576 (active_high_low == 576 (polarity ==
577 ACPI_ACTIVE_HIGH) ? IOSAPIC_POL_HIGH : 577 ACPI_ACTIVE_HIGH) ? IOSAPIC_POL_HIGH :
578 IOSAPIC_POL_LOW, 578 IOSAPIC_POL_LOW,
579 (edge_level == 579 (triggering ==
580 ACPI_EDGE_SENSITIVE) ? IOSAPIC_EDGE : 580 ACPI_EDGE_SENSITIVE) ? IOSAPIC_EDGE :
581 IOSAPIC_LEVEL); 581 IOSAPIC_LEVEL);
582} 582}
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c
index ba817e7454b2..dc49bfb6db0a 100644
--- a/arch/x86_64/kernel/mpparse.c
+++ b/arch/x86_64/kernel/mpparse.c
@@ -964,7 +964,7 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity)
964 964
965 mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit); 965 mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit);
966 966
967 if (triggering) { 967 if (triggering == ACPI_LEVEL_SENSITIVE) {
968 /* 968 /*
969 * For PCI devices assign IRQs in order, avoiding gaps 969 * For PCI devices assign IRQs in order, avoiding gaps
970 * due to unused I/O APIC pins. 970 * due to unused I/O APIC pins.