qemu/hw/core/platform-bus.c
/*
 * Returns the PlatformBus IRQ number for a SysBusDevice irq number or -1 if
 * the IRQ is not mapped on this Platform bus.
 */
Returns the PlatformBus IRQ number for a SysBusDevice irq number or -1 if
the IRQ is not mapped on this Platform bus.
Returns the PlatformBus IRQ number for a SysBusDevice irq number or - 1 if the IRQ is not mapped on this Platform bus .
int platform_bus_get_irqn(PlatformBusDevice *pbus, SysBusDevice *sbdev,
                          int n)
{
    qemu_irq sbirq = sysbus_get_connected_irq(sbdev, n);
    int i;
    for (i = 0; i < pbus->num_irqs; i++) {
        if (pbus->irqs[i] == sbirq) {
            return i;
        }
    }
    return -1;
}
int platform_bus_get_irqn ( PlatformBusDevice * pbus , SysBusDevice * sbdev , int n ) { qemu_irq sbirq = sysbus_get_connected_irq ( sbdev , n ) ; int i ; for ( i = 0 ; i < pbus -> num_irqs ; i ++ ) { if ( pbus -> irqs [ i ] == sbirq ) { return i ; } } return -1 ; }
Returns the PlatformBus IRQ number for a SysBusDevice irq number or -1 if
 the IRQ is not mapped on this Platform bus.
Returns the PlatformBus IRQ number for a SysBusDevice irq number or - 1 if the IRQ is not mapped on this Platform bus .
/* IRQ not mapped on platform bus */