Make everything compile with the latest BUS_CONFIG_INTR change.
authorAlexander Polakov <polachok@gmail.com>
Fri, 16 Oct 2009 16:06:30 +0000 (20:06 +0400)
committerAlexander Polakov <polachok@gmail.com>
Fri, 16 Oct 2009 16:06:30 +0000 (20:06 +0400)
sys/bus/pci/amd64/pci_pir.c
sys/bus/pci/i386/pci_pir.c
sys/dev/acpica5/acpi_pcib.c
sys/dev/acpica5/acpi_resource.c
sys/platform/pc32/acpica5/acpi_machdep.c
sys/platform/pc32/i386/nexus.c
sys/platform/pc64/acpica5/acpi_machdep.c

index b4b1c22..e54e77a 100644 (file)
@@ -549,7 +549,7 @@ pci_pir_route_interrupt(int bus, int device, int func, int pin)
 
                /* Ensure the interrupt is set to level/low trigger. */
                KASSERT(pir_device != NULL, ("missing pir device"));
-               BUS_CONFIG_INTR(pir_device, pci_link->pl_irq,
+               BUS_CONFIG_INTR(pir_device, pir_device, pci_link->pl_irq,
                    INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW);
        }
        if (bootverbose)
index b4b1c22..e54e77a 100644 (file)
@@ -549,7 +549,7 @@ pci_pir_route_interrupt(int bus, int device, int func, int pin)
 
                /* Ensure the interrupt is set to level/low trigger. */
                KASSERT(pir_device != NULL, ("missing pir device"));
-               BUS_CONFIG_INTR(pir_device, pci_link->pl_irq,
+               BUS_CONFIG_INTR(pir_device, pir_device, pci_link->pl_irq,
                    INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW);
        }
        if (bootverbose)
index acab302..b25fdfe 100644 (file)
@@ -282,7 +282,7 @@ kprintf("apic: try line %d\n", line);
        interrupt = line;
 #endif
        pci_write_config(dev, PCIR_INTLINE, interrupt, 1);
-           BUS_CONFIG_INTR(dev, interrupt, INTR_TRIGGER_LEVEL,
+       BUS_CONFIG_INTR(device_get_parent(dev), dev, interrupt, INTR_TRIGGER_LEVEL,
                INTR_POLARITY_LOW);
        } else
            device_printf(pcib, "error: invalid hard-wired IRQ of 0\n");
index aacc805..a4d9096 100644 (file)
@@ -127,7 +127,7 @@ acpi_config_intr(device_t dev, ACPI_RESOURCE *res)
     default:
        panic("%s: bad resource type %u", __func__, res->Type);
     }
-    BUS_CONFIG_INTR(dev, irq, (trig == ACPI_EDGE_SENSITIVE) ?
+    BUS_CONFIG_INTR(dev, dev, irq, (trig == ACPI_EDGE_SENSITIVE) ?
        INTR_TRIGGER_EDGE : INTR_TRIGGER_LEVEL, (pol == ACPI_ACTIVE_HIGH) ?
        INTR_POLARITY_HIGH : INTR_POLARITY_LOW);
 }
index bce46bc..d17b8ac 100644 (file)
@@ -324,7 +324,7 @@ acpi_machdep_init(device_t dev)
        acpi_install_wakeup_handler(sc);
 
        if (intr_model == ACPI_INTR_PIC)
-               BUS_CONFIG_INTR(dev, AcpiGbl_FADT.SciInterrupt,
+               BUS_CONFIG_INTR(dev, dev, AcpiGbl_FADT.SciInterrupt,
                    INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW);
        else
                acpi_SetIntrModel(intr_model);
index b5c2426..32f65aa 100644 (file)
@@ -85,6 +85,8 @@ static        int nexus_deactivate_resource(device_t, device_t, int, int,
                                      struct resource *);
 static int nexus_release_resource(device_t, device_t, int, int,
                                   struct resource *);
+static int nexus_config_intr(device_t, device_t, int, enum intr_trigger,
+                               enum intr_polarity);
 static int nexus_setup_intr(device_t, device_t, struct resource *, int flags,
                             void (*)(void *), void *, 
                             void **, lwkt_serialize_t);
@@ -117,6 +119,7 @@ static device_method_t nexus_methods[] = {
        DEVMETHOD(bus_release_resource, nexus_release_resource),
        DEVMETHOD(bus_activate_resource, nexus_activate_resource),
        DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource),
+       DEVMETHOD(bus_config_intr,      nexus_config_intr),
        DEVMETHOD(bus_setup_intr,       nexus_setup_intr),
        DEVMETHOD(bus_teardown_intr,    nexus_teardown_intr),
        DEVMETHOD(bus_set_resource,     nexus_set_resource),
@@ -460,6 +463,15 @@ nexus_release_resource(device_t bus, device_t child, int type, int rid,
        return (rman_release_resource(r));
 }
 
+
+static int
+nexus_config_intr(device_t dev, device_t child, int irq, enum intr_trigger trig,
+    enum intr_polarity pol)
+{
+       kprintf("%s(%s): irq: %d, trigger: %d, polarity: %d\n", __FUNCTION__, device_get_nameunit(child), irq, trig, pol);
+       return(0);
+}
+
 /*
  * Currently this uses the really grody interface from kern/kern_intr.c
  * (which really doesn't belong in kern/anything.c).  Eventually, all of
index 8a7223c..49152f7 100644 (file)
@@ -326,7 +326,7 @@ acpi_machdep_init(device_t dev)
        acpi_install_wakeup_handler(sc);
 
        if (intr_model == ACPI_INTR_PIC)
-               BUS_CONFIG_INTR(dev, AcpiGbl_FADT.SciInterrupt,
+               BUS_CONFIG_INTR(dev, dev, AcpiGbl_FADT.SciInterrupt,
                    INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW);
        else
                acpi_SetIntrModel(intr_model);