Kyle Swenson | 8d8f654 | 2021-03-15 11:02:55 -0600 | [diff] [blame^] | 1 | #include <asm/assembler.h> |
| 2 | |
| 3 | /* |
| 4 | * Interrupt handling. Preserves r7, r8, r9 |
| 5 | */ |
| 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 | badrne lr, 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 | badrne lr, 1b |
| 27 | bne do_IPI |
| 28 | #endif |
| 29 | 9997: |
| 30 | .endm |
| 31 | |
| 32 | .macro arch_irq_handler, symbol_name |
| 33 | .align 5 |
| 34 | .global \symbol_name |
| 35 | \symbol_name: |
| 36 | mov r8, lr |
| 37 | arch_irq_handler_default |
| 38 | ret r8 |
| 39 | .endm |