I completely agree that irq number 99.9% of the time should be a completelySure, although one nice reason for doing the abstraction first is that
abstract token.
it stops people imposing fragile numbering schemes on irq ...
On a lot of embedded devices IRQ numbers are not abstract and not
fragile. I'm all for abstracting out interrupts nicely but it isn't just
the legacy PC cases to consider - a lot of embedded is at least as
defined, rigid and meaningfully numbered as ISA.
Sure, but you have 16 (or whatever) legacy interrupts. You still call
them 1-16 (or ISA-1 through ISA-16). By the time we reach this stage,
we're essentially doing string table lookups for the interrupts, so
there's no need to pre-allocate them (except as a possible arch
implementation detail).