Thread context switch causes lost interrupt
Greetings All,
I'm debugging an embedded system we use for developing software for chips we produce. The system uses a PPC440 PMC card plugged into the system. Communcation is via the PCI bus to a PCI-Bridge device (PLX9056). There is various other HW on the board to support our testing needs.
We ran into a problem recently, and through debugging with a Logic Analyzer, we found what we believe to be the root cause.
We are receiving an interrupt from our device (chip) at a point where the Linux Kernel is doing a "context switch" from the ISR thread back to the main thread (we are using POSIX Thread library on a 2.4.21 kernel). From the trace, we see that the kernel part of the IRQ handler seems to run, as it does the specified reads/writes to acknowledge the interrupt. However, the User level processing does not receive this indication.
The driver was written some time ago (not by me) and uses a tasklet to then provide the User indication. The User level is "hanging" on a queue in an IOCTL call. So somewhere in the kernel, it seems that the tasklet is not being run, due to the fact that the kernel is in the middle of this thread context switch.
Has anyone run into this before? Is this a known bug in the kernel? Any insights/pointers would be greatly appreciated.
TIA,
Steve
|