On Mon, 5 Oct 1998, MOLNAR Ingo wrote:
> 
> sigh, darn. Ok, i dont think it makes sense to fight this kind of thing,
> as by my reading it's not specifically forbidden by the MP spec. (nothing
> says that two IO-APIC pins cannot point to the same source IRQ ... it's
> just uncommon to have sub-16 pins mapped in such a way.) 

I'd really just prefer to get rid of the 1:1 mapping completely, and use a
linked list approach everywhere instead. 

So you'd just build up something like irq_to_pin[] that's a singly linked
list

        irq             pin

        0               0 -> 2
        1               1
        2
        3               3
        4               4
        ..
        9               11 -> 12 -> 13
        10              10
        
and to make sure it's fast in the single-irq case you do the above by just
expanding the irq_2_pin[] array to have two entries instead of just one,
where the second one is the link ptr.. The only extra overhead for the
common case is one single load (cached, because you already loaded the
irq) and a test, and the code is about 100 times cleaner than your current
patch (sorry, I don't think you were too proud of it either ;) 

                Linus

Reply via email to