0

When an Interrupt occurs most drivers creates a critical section using spin_lock_irqsave or spin_lock_irq which disables the interrupt.

In this case the Interrupts are disabled by the IRQ handler. My question is whether Linux kernel disables any interrupts just when the IRQ handler executes or it just wait for the IRQ handler programmer to disable the IRQ in whatever way?

My understanding is that Russel King has implemented IRQ_DISABLED, If this flag is set then only the IRQ that has occurred is disabled lately however enabled automatically by Kernel after IRQ handler finishes. Is that correct?

pdssn
  • 225
  • 4
  • 17
  • Answerd also [here](http://stackoverflow.com/questions/11403915/can-an-interrupt-handler-be-preempted-by-the-same-interrupt-handler) and [here](http://stackoverflow.com/questions/5934402/can-an-interrupt-handler-be-preempted). – Sam Protsenko Feb 24 '16 at 17:36
  • The `IRQF_DISABLED` flag was removed in 4.1.0, and has been a no-op since 2.6.36. As I understand it interrupt handlers now always run with interrupts disabled, i.e. they always behave as if `IRQF_DISABLED` is set. Your interrupt handler still needs to use spin-locks to synchronize with other parts of your driver for SMP reasons. – Ian Abbott Feb 24 '16 at 17:55
  • Correction to above comment: `IRQF_DISABLED` has been a no-op since 2.6.35, not 2.6.36. – Ian Abbott Feb 24 '16 at 18:11

0 Answers0