FW: level interrupt handling in the Kernel

From: Julie Zhu
Date: Thu Mar 12 2009 - 16:47:40 EST


Hello,

We found that level interrupts are handled in the following way in the
Linux
kernel:
1. mask irq, disable it
2. ack irq, clear it in interrupt controller.
3. move irq, handle it in handler for the source.
4. unmask irq, reenable it.

This sequnce results in bogus interrupts in the system. The reason is
that, after step 2 but before step 3, interrupt controller sees that the
interrupt source is high, and will re-assert the interrupt after step 4.
This will be a bogus interrupt, because the interrupt handler for the
source has cleared the interrupt.

We solve this issue by changing the interrupt controller to do nothing
in step 2, ack irq, if it is a level interrupt. In step 4, unmask irq,
we ack the interrupt controller, and then re-enable the interrupt. Since
interrupt
is level, and source interrupt handler only clears interrupts once in
the
handler, nothing will be missed.

I am not sure whether we are doing the right thing, and why the Linux
kernel
chooses to handle level interrupt in that sequence.

Thanks,
Julie.

Thanks,
--
View this message in context:
http://www.nabble.com/level-interrupt-handling-in-the-Kernel-tp22481320p
22481320.html
Sent from the linux-newbie mailing list archive at Nabble.com.

--
To unsubscribe from this list: send the line "unsubscribe linux-newbie"
in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/