]> git.hungrycats.org Git - linux/commitdiff
ACPI irq->gsi naming (Bjorn Helgaas)
authorLen Brown <len.brown@intel.com>
Sat, 24 Apr 2004 19:20:27 +0000 (15:20 -0400)
committerLen Brown <lenb@dhcppc3.>
Sat, 24 Apr 2004 19:20:27 +0000 (15:20 -0400)
drivers/acpi/osl.c
include/acpi/acpiosxf.h
include/linux/acpi.h

index 0fc89375bd429fd53f6208360071b50aa3054133..77e1c629aa6b1e08497931045e2b3db331b31b4e 100644 (file)
@@ -63,7 +63,7 @@ int acpi_in_debugger;
 extern char line_buf[80];
 #endif /*ENABLE_DEBUGGER*/
 
-static int acpi_irq_irq;
+static unsigned int acpi_irq_irq;
 static OSD_HANDLER acpi_irq_handler;
 static void *acpi_irq_context;
 
@@ -241,23 +241,22 @@ acpi_irq(int irq, void *dev_id, struct pt_regs *regs)
 }
 
 acpi_status
-acpi_os_install_interrupt_handler(u32 irq, OSD_HANDLER handler, void *context)
+acpi_os_install_interrupt_handler(u32 gsi, OSD_HANDLER handler, void *context)
 {
+       unsigned int irq;
+
        /*
-        * Ignore the irq from the core, and use the value in our copy of the
+        * Ignore the GSI from the core, and use the value in our copy of the
         * FADT. It may not be the same if an interrupt source override exists
         * for the SCI.
         */
-       irq = acpi_fadt.sci_int;
-
-#if defined(CONFIG_IA64) || defined(CONFIG_PCI_USE_VECTOR)
-       irq = acpi_irq_to_vector(irq);
-       if (irq < 0) {
-               printk(KERN_ERR PREFIX "SCI (ACPI interrupt %d) not registered\n",
-                      acpi_fadt.sci_int);
+       gsi = acpi_fadt.sci_int;
+       if (acpi_gsi_to_irq(gsi, &irq) < 0) {
+               printk(KERN_ERR PREFIX "SCI (ACPI GSI %d) not registered\n",
+                      gsi);
                return AE_OK;
        }
-#endif
+
        acpi_irq_handler = handler;
        acpi_irq_context = context;
        if (request_irq(irq, acpi_irq, SA_SHIRQ, "acpi", acpi_irq)) {
@@ -273,9 +272,6 @@ acpi_status
 acpi_os_remove_interrupt_handler(u32 irq, OSD_HANDLER handler)
 {
        if (irq) {
-#if defined(CONFIG_IA64) || defined(CONFIG_PCI_USE_VECTOR)
-               irq = acpi_irq_to_vector(irq);
-#endif
                free_irq(irq, acpi_irq);
                acpi_irq_handler = NULL;
                acpi_irq_irq = 0;
index 6f485231ac5911d4debf4005ed545935f82d5e1e..ab4415132dfb3725384a3cf2eb2b1cf56d12842f 100644 (file)
@@ -188,14 +188,14 @@ acpi_os_get_physical_address (
 
 acpi_status
 acpi_os_install_interrupt_handler (
-       u32                             interrupt_number,
-       OSD_HANDLER             service_routine,
+       u32                             gsi,
+       OSD_HANDLER                     service_routine,
        void                            *context);
 
 acpi_status
 acpi_os_remove_interrupt_handler (
        u32                             interrupt_number,
-       OSD_HANDLER             service_routine);
+       OSD_HANDLER                     service_routine);
 
 
 /*
index 4f6f6eb941e32654f01fe6871ac5af848308c19b..36a2f3eb91d82ec3943922de34607a94c6dbeb9e 100644 (file)
@@ -438,6 +438,7 @@ struct pci_dev;
 
 int acpi_pci_irq_enable (struct pci_dev *dev);
 int acpi_pci_irq_init (void);
+int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
 
 struct acpi_pci_driver {
        struct acpi_pci_driver *next;