Just as we saw with I/O memory and I/O ports, the IRQ line(s) is considered a resource that the kernel is in charge of. The request_irq() kernel API can be thought of as the traditional means by which driver authors register their interest in an IRQ and allocate this resource to themselves, thus allowing the kernel to invoke their handler when the interrupt asynchronously arrives.
It might strike you that this discussion seems very analogous to user space signal handling. There, we call the sigaction(2) system call to register interest in a signal. When the signal (asynchronously) arrives, the kernel invokes the registered signal handler (user mode) routine!
There are some key differences here. First, a user space signal handler is not an interrupt; second, the user space signal handler runs purely in non-privileged user mode; in contrast, the kernel space interrupt handler of...