1458 intrp = apic_io_intrp;
1459 if (intrp != NULL) {
1460 while (intrp->intr_entry == APIC_IO_INTR_ENTRY) {
1461 if (intrp->intr_irq == irqno &&
1462 intrp->intr_busid == busid &&
1463 intrp->intr_type == IO_INTR_INT)
1464 return (intrp);
1465 intrp++;
1466 }
1467 }
1468 APIC_VERBOSE_IOAPIC((CE_NOTE, "Did not find io intr for irqno:"
1469 "busid %x:%x\n", irqno, busid));
1470 return ((struct apic_io_intr *)NULL);
1471 }
1472
1473
1474 struct mps_bus_info {
1475 char *bus_name;
1476 int bus_id;
1477 } bus_info_array[] = {
1478 "ISA ", BUS_ISA,
1479 "PCI ", BUS_PCI,
1480 "EISA ", BUS_EISA,
1481 "XPRESS", BUS_XPRESS,
1482 "PCMCIA", BUS_PCMCIA,
1483 "VL ", BUS_VL,
1484 "CBUS ", BUS_CBUS,
1485 "CBUSII", BUS_CBUSII,
1486 "FUTURE", BUS_FUTURE,
1487 "INTERN", BUS_INTERN,
1488 "MBI ", BUS_MBI,
1489 "MBII ", BUS_MBII,
1490 "MPI ", BUS_MPI,
1491 "MPSA ", BUS_MPSA,
1492 "NUBUS ", BUS_NUBUS,
1493 "TC ", BUS_TC,
1494 "VME ", BUS_VME,
1495 "PCI-E ", BUS_PCIE
1496 };
1497
1498 static int
1499 apic_find_bus_type(char *bus)
1500 {
1501 int i = 0;
1502
1503 for (; i < sizeof (bus_info_array)/sizeof (struct mps_bus_info); i++)
1504 if (strncmp(bus, bus_info_array[i].bus_name,
1505 strlen(bus_info_array[i].bus_name)) == 0)
1506 return (bus_info_array[i].bus_id);
1507 APIC_VERBOSE_IOAPIC((CE_WARN, "Did not find bus type for bus %s", bus));
1508 return (0);
1509 }
1510
1511 static int
1512 apic_find_bus(int busid)
1513 {
1514 struct apic_bus *busp;
1515
|
1458 intrp = apic_io_intrp;
1459 if (intrp != NULL) {
1460 while (intrp->intr_entry == APIC_IO_INTR_ENTRY) {
1461 if (intrp->intr_irq == irqno &&
1462 intrp->intr_busid == busid &&
1463 intrp->intr_type == IO_INTR_INT)
1464 return (intrp);
1465 intrp++;
1466 }
1467 }
1468 APIC_VERBOSE_IOAPIC((CE_NOTE, "Did not find io intr for irqno:"
1469 "busid %x:%x\n", irqno, busid));
1470 return ((struct apic_io_intr *)NULL);
1471 }
1472
1473
1474 struct mps_bus_info {
1475 char *bus_name;
1476 int bus_id;
1477 } bus_info_array[] = {
1478 { "ISA ", BUS_ISA },
1479 { "PCI ", BUS_PCI },
1480 { "EISA ", BUS_EISA },
1481 { "XPRESS", BUS_XPRESS },
1482 { "PCMCIA", BUS_PCMCIA },
1483 { "VL ", BUS_VL },
1484 { "CBUS ", BUS_CBUS },
1485 { "CBUSII", BUS_CBUSII },
1486 { "FUTURE", BUS_FUTURE },
1487 { "INTERN", BUS_INTERN },
1488 { "MBI ", BUS_MBI },
1489 { "MBII ", BUS_MBII },
1490 { "MPI ", BUS_MPI },
1491 { "MPSA ", BUS_MPSA },
1492 { "NUBUS ", BUS_NUBUS },
1493 { "TC ", BUS_TC },
1494 { "VME ", BUS_VME },
1495 { "PCI-E ", BUS_PCIE }
1496 };
1497
1498 static int
1499 apic_find_bus_type(char *bus)
1500 {
1501 int i = 0;
1502
1503 for (; i < sizeof (bus_info_array)/sizeof (struct mps_bus_info); i++)
1504 if (strncmp(bus, bus_info_array[i].bus_name,
1505 strlen(bus_info_array[i].bus_name)) == 0)
1506 return (bus_info_array[i].bus_id);
1507 APIC_VERBOSE_IOAPIC((CE_WARN, "Did not find bus type for bus %s", bus));
1508 return (0);
1509 }
1510
1511 static int
1512 apic_find_bus(int busid)
1513 {
1514 struct apic_bus *busp;
1515
|