Init hook:
trap_init:
set_except_vector(0, rollback ? rollback_handle_int : handle_int);
1)handle_level hook
arch_init_irq->init_nlm_common_irqs:
irq_set_chip_and_handler(i, &xlp_pic, handle_level_irq);
irq_set_chip_and_handler->irq_set_chip_and_handler_name->__irq_set_handler
__irq_set_handler:
desc->handle_irq = handle;
2)chip hook
irq_set_chip_and_handler(i, &xlp_pic, handle_level_irq);
3)special hook
request_irq->request_threaded_irq->__setup_irq(irq, desc, action);
__setup_irq:
/* add new interrupt at end of irq queue */
do {
/*
* Or all existing action->thread_mask bits,
* so we can find the next zero bit for this
* new action.
*/
thread_mask |= old->thread_mask;
old_ptr = &old->next;
old = *old_ptr;
} while (old);
new->irq = irq;
*old_ptr = new;
Call tree:
(genex.s)handle_int->plat_irq_dispatch->do_IRQ->generic_handle_irq->(desc->handle_irq)
1) irqchip handle: handle_level_irq->mask_ack_irq->(desc->irq_data.chip->irq_ack)
2) special irq handle :handle_level_irq->handle_irq_event->handle_irq_event_percpu->(action->handler)
阅读(1177) | 评论(0) | 转发(0) |