* * Produce fixed IRQ mappings for all MIPS IRQs. * * Non-FDT/OFW MIPS targets do not provide an equivalent to OFW_BUS_MAP_INTR(); * it is instead necessary to reserve INTRNG IRQ# 0-7 for use by MIPS device * drivers that assume INTRNG IRQs 0-7 are directly mapped to MIPS IRQs 0-7. * * XXX: There is no support in INTRNG for reserving a fixed IRQ range. However, * we should be called prio
| 522 | * regular unix error code will be returned. |
| 523 | */ |
| 524 | int |
| 525 | mips_pic_map_fixed_intrs(void) |
| 526 | { |
| 527 | int error; |
| 528 | |
| 529 | for (u_int i = 0; i < nitems(mips_pic_intrs); i++) { |
| 530 | struct mips_pic_intr *intr; |
| 531 | |
| 532 | if ((error = mips_pic_map_fixed_intr(i, &intr))) |
| 533 | return (error); |
| 534 | |
| 535 | /* INTRNG IRQs 0-7 must be directly mapped to MIPS IRQs 0-7 */ |
| 536 | if (intr->intr_irq != intr->mips_irq) { |
| 537 | panic("invalid IRQ mapping: %u->%u", intr->intr_irq, |
| 538 | intr->mips_irq); |
| 539 | } |
| 540 | } |
| 541 | |
| 542 | return (0); |
| 543 | } |
| 544 | |
| 545 | /** |
| 546 | * If @p r references a MIPS interrupt mapped by the MIPS32 interrupt |
no test coverage detected