]> git.neil.brown.name Git - history.git/commitdiff
[ACPI] simplify ES7000 IRQ re-naming scheme
authorLen Brown <len.brown@intel.com>
Tue, 19 Oct 2004 21:42:31 +0000 (17:42 -0400)
committerLen Brown <lenb@dhcppc3.>
Tue, 19 Oct 2004 21:42:31 +0000 (17:42 -0400)
so that it works for all PCI interrupts.

Signed-off-by: Natalie Protasevich <Natalie.Protasevich@UNISYS.com>
Signed-off-by: Len Brown <Len.Brown@intel.com>
arch/i386/kernel/mpparse.c
arch/i386/mach-es7000/es7000plat.c

index 41cb82604f7f835c648ac13fbccce1a7c6ec130e..633e82b72c1d316b1daa520c23295d33ba6201b1 100644 (file)
@@ -996,6 +996,12 @@ void __init mp_config_acpi_legacy_irqs (void)
        mp_bus_id_to_type[MP_ISA_BUS] = MP_BUS_ISA;
        Dprintk("Bus #%d is ISA\n", MP_ISA_BUS);
 
+       /*
+        * ES7000 has no legacy identity mappings
+        */
+       if (es7000_plat)
+               return;
+
        /* 
         * Locate the IOAPIC that manages the ISA IRQs (0-15). 
         */
index 784576c53c05142ef1a8b808db61aa26d4c040c3..2f52759b4b8991e6a97ffde77bf65185d3b87f1b 100644 (file)
@@ -51,28 +51,30 @@ struct mip_reg              *host_reg;
 int                    mip_port;
 unsigned long          mip_addr, host_addr;
 
-static int __init
+#if defined(CONFIG_X86_IO_APIC) && (defined(CONFIG_ACPI_INTERPRETER) || defined(CONFIG_ACPI_BOOT))
+
+/*
+ * GSI override for ES7000 platforms.
+ */
+
+static unsigned int base;
+
+static int
 es7000_rename_gsi(int ioapic, int gsi)
 {
-       if (ioapic)
-               return gsi;
-       else {
-               if (gsi == 0)
-                       return 13;
-               if (gsi == 1)
-                       return 16;
-               if (gsi == 4)
-                       return 17;
-               if (gsi == 6)
-                       return 18;
-               if (gsi == 7)
-                       return 19;
-               if (gsi == 8)
-                       return 20;
-               return gsi;
-        }
+       if (!base) {
+               int i;
+               for (i = 0; i < nr_ioapics; i++)
+                       base += nr_ioapic_registers[i];
+       }
+
+       if (!ioapic && (gsi < 16)) 
+               gsi += base;
+       return gsi;
 }
 
+#endif // (CONFIG_X86_IO_APIC) && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT)
+
 /*
  * Parse the OEM Table
  */