2

I am studying IRQ handling on Linux. I have a question, why we need to handle IPI at the end of each ISR[for SMP]. Is there something special with IPI? why not we process in do_asm_IRQ with other interrupts.

Any suggestion would be appreciated.

  6         .macro  arch_irq_handler_default
  7         get_irqnr_preamble r6, lr
  8 1:      get_irqnr_and_base r0, r2, r6, lr
  9         movne   r1, sp
 10         @
 11         @ routine called with r0 = irq number, r1 = struct pt_regs *
 12         @
 13         adrne   lr, BSYM(1b)
 14         bne     asm_do_IRQ
 15 
 16 #ifdef CONFIG_SMP
 17         /*
 18          * XXX
 19          *
 20          * this macro assumes that irqstat (r2) and base (r6) are
 21          * preserved from get_irqnr_and_base above
 22          */
 23         ALT_SMP(test_for_ipi r0, r2, r6, lr)
 24         ALT_UP_B(9997f)
 25         movne   r1, sp
 26         adrne   lr, BSYM(1b)
 27         bne     do_IPI
 28 #endif

http://lxr.oss.org.cn/source/arch/arm/include/asm/entry-macro-multi.S?v=3.5.2;a=arm

Dongguo
  • 379
  • 2
  • 4
  • 14

0 Answers0