1
votes

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:

  1. arrowed line on the left-hand side of PIC1 connects to interrupt pin on the CPU
  2. 0~7 on the right-hand side of PIC1 refers to interrupt controller pins
  3. each interrupt controller pin connect to a hardware device on a PCI slot

Questions:

  1. '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)(), ...)

  2. if so, then the interrupt handler function '(*handler)()' will have to be a 'combined ISR function' that handles interrupt sources 0~7 altogether, right?

  3. if not, then what is 'irq', is it 'interrupt controller pins' instead?

  4. 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,

1

1 Answers

0
votes
  1. 'interrupt pin on CPU', is the same as 'interrupt line' but it is not exactly same as the irq parameter in the function.
  2. irq is the number assigned to each interrupt pin. This information can be read from the Interrupt Vector table defined in the processor hardware manual.