I am new to linux and recently looking at some linux driver code related to interrupt. I am starting from this tutorial http://www.redhat.com/mirrors/LDP/LDP/tlk/dd/interrupts.html, but not sure if i understand it correct.
Here are the facts that i think i get from Fig.7.1:
- arrowed line on the left-hand side of PIC1 connects to interrupt pin on the CPU
- 0~7 on the right-hand side of PIC1 refers to interrupt controller pins
- each interrupt controller pin connect to a hardware device on a PCI slot
Questions:
'interrupt pin on CPU', is it the same as 'interrupt line'? i.e. the 'irq' parameter in function:
int request_irq(unsigned int irq, (*handler)(), ...)
if so, then the interrupt handler function '(*handler)()' will have to be a 'combined ISR function' that handles interrupt sources 0~7 altogether, right?
if not, then what is 'irq', is it 'interrupt controller pins' instead?
physically how a device connected to interrupt controller pin 0~7 generate interrupt? by raise voltage on the pin, write to PIC register? how does interrupt status register in PIC knows which pin is the current interrupt?
Sorry if some questions are naive.
Thanks,