CONFIG_IRQTACKS决定中断栈是独立的还是依附于内核栈。
irq_desc {
irq_flow_handler_t handle_irq;;中断处理函数,会调用ISR
irq_chip;//中断控制器对象,抽象不同种类的PIC,例如8259控制器
irqaction *action;//共享中断链表,中断例程ISR
}
关系可以通过中断处理程序看出来
desc->handle_irq = handle_level_irq;//Mpc8xx_pic.c (c:\linux\linux-2.6.23\arch\powerpc\sysdev):
=>desc->chip->ack(irq);/* Start handling the irq */
=>desc->status |= IRQ_INPROGRESS;/* Mark the IRQ currently in progress.*/
=>do//可能好几个中断都上报
desc->status &= ~IRQ_PENDING;
action_ret = handle_IRQ_event(irq, action);
=>do//依次查看是否共享中断
ret = action->handler(irq, action->dev_id);
retval |= ret;
action = action->next;
=>while (action);
=>while ((desc->status & (IRQ_PENDING | IRQ_DISABLED)) == IRQ_PENDING);