summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-09-11 19:31:52 +0000
committerjhb <jhb@FreeBSD.org>2006-09-11 19:31:52 +0000
commit896ceebabd15f831c9a9fc3a9add565292e97c26 (patch)
tree924a10cc713a49f2251c9f22d5f399a237b3b893 /sys/i386
parent8047e0393472f520549ee8d558373c73793d14bf (diff)
downloadFreeBSD-src-896ceebabd15f831c9a9fc3a9add565292e97c26.zip
FreeBSD-src-896ceebabd15f831c9a9fc3a9add565292e97c26.tar.gz
- Fix rman_manage_region() to be a lot more intelligent. It now checks
for overlaps, but more importantly, it collapses adjacent free regions. This is needed to cope with BIOSen that split up ports for system devices (like IPMI controllers) across multiple system resource entries. - Now that rman_manage_region() is not so dumb, remove extra logic in the x86 nexus drivers to populate the IRQ rman that manually coalesced the regions. MFC after: 1 week
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/nexus.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/sys/i386/i386/nexus.c b/sys/i386/i386/nexus.c
index 9def53d..6e1e281 100644
--- a/sys/i386/i386/nexus.c
+++ b/sys/i386/i386/nexus.c
@@ -144,7 +144,7 @@ DRIVER_MODULE(nexus, root, nexus_driver, nexus_devclass, 0, 0);
static int
nexus_probe(device_t dev)
{
- int irq, last;
+ int irq;
device_quiet(dev); /* suppress attach message for neatness */
@@ -177,18 +177,10 @@ nexus_probe(device_t dev)
* We search for regions of existing IRQs and add those to the IRQ
* resource manager.
*/
- last = -1;
for (irq = 0; irq < NUM_IO_INTS; irq++)
- if (intr_lookup_source(irq) != NULL) {
- if (last == -1)
- last = irq;
- } else if (last != -1) {
- if (rman_manage_region(&irq_rman, last, irq - 1) != 0)
+ if (intr_lookup_source(irq) != NULL)
+ if (rman_manage_region(&irq_rman, irq, irq) != 0)
panic("nexus_probe irq_rman add");
- last = -1;
- }
- if (last != -1 && rman_manage_region(&irq_rman, last, irq - 1) != 0)
- panic("nexus_probe irq_rman add");
/*
* ISA DMA on PCI systems is implemented in the ISA part of each
OpenPOWER on IntegriCloud