So I have an older hardware platform, which has a hard-coded NR_IRQS defined in the kernel to specify the number of available IRQ descriptors. This limit corresponds to the total number of hardware interrupts, plus the number of available GPIO on this device.
While trying to use a new peripheral recently that uses IIO triggering, I realized that all the available IRQ descriptors defined for this platform are allocated on startup. There's no room left in the irq_desc array for IIO to register new software interrupts. But if I just increase NR_IRQS arbitrarily, then everything seems to work just fine.
I find it strange that my platform allocates descriptors for all the available hardware interrupts and GPIO, but doesn't allow for other arbitrary software interrupts. So my question is: what determines the limit for how many IRQ descriptors can be defined for any given platform, assuming the interrupts are software based?