文中提到 __irq_set_handler作为中断注册的第一个层次,通过这个函数为desc->handle_irq 安排一个处理函数。
通常安排的处理函数有handle_edge_irq,handle_level_irq等
假如安排的处理函数是handle_level_irq,我们看一下处理流程 /**
* handle_level_irq - Level type irq handler
* @irq: the interrupt number
* @desc: the interrupt description structure for this irq
*
* Level type interrupts are active as long as the hardware line has
* the active level. This may require to mask the interrupt and unmask
* it after the associated handler has acknowledged the device, so the
* interrupt line is back to inactive.
*/
void
handle_level_irq(unsigned int irq, struct irq_desc *desc)
{
raw_spin_lock(&desc->lock);
mask_ack_irq(desc); /* 屏蔽掉当前中断 */
if (unlikely(irqd_irq_inprogress(&desc->irq_data))) /* 发现同一个中断isr程序正在执行,退出 */