Subject: Re: ioapic and interrupt lines
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Frank van der Linden <fvdl@netbsd.org>
List: port-i386
Date: 09/09/2005 20:57:09
Manuel Bouyer wrote:

>
>The context is a problem reported with a Xen user. In NetBSD/Xen the
>number of physical interrupts is set to 32 (this is used to size 
>static arrays), but on this system there are PCI devices with interrupts
>in the 40-50 range. A i386 GENERIC kernel on the same hardware use interrupts
>in the 1-15 range, so I guess the Xen kernel is rerouting interrupts,
>but I wonder from where such high numbers come from. I also wonder to which
>size I should set these statical arrays, and how NetBSD/i386 can deal with
>this, as i386/vector.S only defines interrupts from 0 to 31.
>
>  
>
The 32 limit in the x86 interrupt code is the number of unique interrupt 
sources (i.e. not shared), per CPU. I've not seen situations where that 
isn't enough in practice.

The interrupt numbers themselves can be higher, that's no problem (see 
e.g. the is_pin value in the intr_source structure). I don't know 
exactly what the NetBSD/xen interrupt code does, glancing at it, it 
looks like a modified version of the x86 code.

- Frank