Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/arm/gic.c
Show First 20 Lines • Show All 1,435 Lines • ▼ Show 20 Lines | for (irq = sc->sc_spi_start; irq < sc->sc_spi_end; irq++) { | ||||
/* Assume we found a valid range until shown otherwise */ | /* Assume we found a valid range until shown otherwise */ | ||||
found = true; | found = true; | ||||
/* Check this range is valid */ | /* Check this range is valid */ | ||||
for (end_irq = irq; end_irq != irq + count; end_irq++) { | for (end_irq = irq; end_irq != irq + count; end_irq++) { | ||||
/* No free interrupts */ | /* No free interrupts */ | ||||
if (end_irq == sc->sc_spi_end) { | if (end_irq == sc->sc_spi_end) { | ||||
found = false; | found = false; | ||||
break; | break; | ||||
andrew: I think this assert will be hit when the allocation doesn't fit as `sc->sc_spi_end` isn't a… | |||||
} | } | ||||
KASSERT((psc->gic_irqs[irq].gi_flags & GI_FLAG_MSI)!= 0, | KASSERT((psc->gic_irqs[end_irq].gi_flags & GI_FLAG_MSI)!= 0, | ||||
("%s: Non-MSI interrupt found", __func__)); | ("%s: Non-MSI interrupt found", __func__)); | ||||
/* This is already used */ | /* This is already used */ | ||||
if ((psc->gic_irqs[irq].gi_flags & GI_FLAG_MSI_USED) == | if ((psc->gic_irqs[end_irq].gi_flags & GI_FLAG_MSI_USED) == | ||||
GI_FLAG_MSI_USED) { | GI_FLAG_MSI_USED) { | ||||
found = false; | found = false; | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
if (found) | if (found) | ||||
break; | break; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 131 Lines • Show Last 20 Lines |
I think this assert will be hit when the allocation doesn't fit as sc->sc_spi_end isn't a MSI/MSI-X irq.