-->

Trigger Kernel Interrupt Handler: How?

2020-06-03 09:20发布

问题:

I am trying to understand Asynchronous Interrupt handling in kernel, ofcourse through the legendary Understanding the Linux Kernel.

In this process how and who will trigger Kernel Interrupt Handler?

I would like some one to help me correcting this and to clarify my question on 1)How and Who trigger Kernel Interrupt Handler? 2)How to define new or change existing hardware interrupt handlers?

Thank you in Advance!

回答1:

This picture from Robert Love's "Linux Kernel Development" pretty well describes path of interrupt. Processor interrupts the kernel in the predefined enty point do_IRQ(). If there is corresponding interrupt handler, it will get executed.

To handle interrupt, you should register your interrupt handler with request_irq().