From 17a49ad58f3207eb37b2046830554b11c7f0b830 Mon Sep 17 00:00:00 2001 From: Alexander Polakov Date: Fri, 16 Oct 2009 20:06:30 +0400 Subject: [PATCH] Make everything compile with the latest BUS_CONFIG_INTR change. --- sys/bus/pci/amd64/pci_pir.c | 2 +- sys/bus/pci/i386/pci_pir.c | 2 +- sys/dev/acpica5/acpi_pcib.c | 2 +- sys/dev/acpica5/acpi_resource.c | 2 +- sys/platform/pc32/acpica5/acpi_machdep.c | 2 +- sys/platform/pc32/i386/nexus.c | 12 ++++++++++++ sys/platform/pc64/acpica5/acpi_machdep.c | 2 +- 7 files changed, 18 insertions(+), 6 deletions(-) diff --git a/sys/bus/pci/amd64/pci_pir.c b/sys/bus/pci/amd64/pci_pir.c index b4b1c22252..e54e77aa75 100644 --- a/sys/bus/pci/amd64/pci_pir.c +++ b/sys/bus/pci/amd64/pci_pir.c @@ -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) diff --git a/sys/bus/pci/i386/pci_pir.c b/sys/bus/pci/i386/pci_pir.c index b4b1c22252..e54e77aa75 100644 --- a/sys/bus/pci/i386/pci_pir.c +++ b/sys/bus/pci/i386/pci_pir.c @@ -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) diff --git a/sys/dev/acpica5/acpi_pcib.c b/sys/dev/acpica5/acpi_pcib.c index acab302186..b25fdfe72f 100644 --- a/sys/dev/acpica5/acpi_pcib.c +++ b/sys/dev/acpica5/acpi_pcib.c @@ -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"); diff --git a/sys/dev/acpica5/acpi_resource.c b/sys/dev/acpica5/acpi_resource.c index aacc8057d5..a4d9096623 100644 --- a/sys/dev/acpica5/acpi_resource.c +++ b/sys/dev/acpica5/acpi_resource.c @@ -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); } diff --git a/sys/platform/pc32/acpica5/acpi_machdep.c b/sys/platform/pc32/acpica5/acpi_machdep.c index bce46bc522..d17b8ac798 100644 --- a/sys/platform/pc32/acpica5/acpi_machdep.c +++ b/sys/platform/pc32/acpica5/acpi_machdep.c @@ -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); diff --git a/sys/platform/pc32/i386/nexus.c b/sys/platform/pc32/i386/nexus.c index b5c2426e56..32f65aaa67 100644 --- a/sys/platform/pc32/i386/nexus.c +++ b/sys/platform/pc32/i386/nexus.c @@ -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 diff --git a/sys/platform/pc64/acpica5/acpi_machdep.c b/sys/platform/pc64/acpica5/acpi_machdep.c index 8a7223c83f..49152f7f38 100644 --- a/sys/platform/pc64/acpica5/acpi_machdep.c +++ b/sys/platform/pc64/acpica5/acpi_machdep.c @@ -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); -- 2.41.0