Hi, I'm studying the interrupt handling of the OpenBSD 4.0 GENERIC.MP kernel.
1.) There is the softintr() method that registers a software interrupt in the ipending variable, which is handled in Xdoreti on return from an interrupt. machdep.c: 4463 void 4464 softintr(int sir, int vec) 4465 { 4466 __asm __volatile("orl %1, %0" : "=m" (ipending) : "ir" (sir)); 4467 #ifdef MULTIPROCESSOR 4468 i82489_writereg(LAPIC_ICRLO, 4469 vec | LAPIC_DLMODE_FIXED | LAPIC_LVL_ASSERT | APIC_DEST_SELF); 4470 #endif 4471 } In the MP case softintr() will also generate in line 4468 an interrupt through the IPI mechanism. Why doesn't softintr() just use the IPI mechanism in the MP case? 2.) Software interrupts registered through ipending get handled in Xdoreti (and on splx()). For an pending interrupt in ipending at position i the execution goes on at Xresume[i]. In the MP case only the soft interrupts Xsoftty, Xsoftnet, Xsoftclock got a chance to be called from Xresume since the other once are leftovers from the old PIC? Therefore Xresume_legacy1, ... Greetings, Robert