Magnus Damm | 2bc58a6 | 2011-06-13 06:46:44 +0100 | [diff] [blame] | 1 | #include <asm/assembler.h> |
| 2 | |
Magnus Damm | cd544ce | 2010-12-22 13:20:08 +0100 | [diff] [blame] | 3 | /* |
| 4 | * Interrupt handling. Preserves r7, r8, r9 |
| 5 | */ |
| 6 | .macro arch_irq_handler_default |
Russell King | d9600c9 | 2011-06-26 10:34:02 +0100 | [diff] [blame] | 7 | get_irqnr_preamble r6, lr |
| 8 | 1: get_irqnr_and_base r0, r2, r6, lr |
Magnus Damm | cd544ce | 2010-12-22 13:20:08 +0100 | [diff] [blame] | 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 | * |
Russell King | d9600c9 | 2011-06-26 10:34:02 +0100 | [diff] [blame] | 20 | * this macro assumes that irqstat (r2) and base (r6) are |
Magnus Damm | cd544ce | 2010-12-22 13:20:08 +0100 | [diff] [blame] | 21 | * preserved from get_irqnr_and_base above |
| 22 | */ |
Russell King | d9600c9 | 2011-06-26 10:34:02 +0100 | [diff] [blame] | 23 | ALT_SMP(test_for_ipi r0, r2, r6, lr) |
Magnus Damm | cd544ce | 2010-12-22 13:20:08 +0100 | [diff] [blame] | 24 | ALT_UP_B(9997f) |
Russell King | 4ec3eb1 | 2011-01-06 22:31:35 +0000 | [diff] [blame] | 25 | movne r1, sp |
Magnus Damm | cd544ce | 2010-12-22 13:20:08 +0100 | [diff] [blame] | 26 | adrne lr, BSYM(1b) |
| 27 | bne do_IPI |
Magnus Damm | cd544ce | 2010-12-22 13:20:08 +0100 | [diff] [blame] | 28 | #endif |
| 29 | 9997: |
| 30 | .endm |
| 31 | |
| 32 | .macro arch_irq_handler, symbol_name |
| 33 | .align 5 |
| 34 | .global \symbol_name |
| 35 | \symbol_name: |
Russell King | d9600c9 | 2011-06-26 10:34:02 +0100 | [diff] [blame] | 36 | mov r8, lr |
Magnus Damm | cd544ce | 2010-12-22 13:20:08 +0100 | [diff] [blame] | 37 | arch_irq_handler_default |
Russell King | d9600c9 | 2011-06-26 10:34:02 +0100 | [diff] [blame] | 38 | mov pc, r8 |
Magnus Damm | cd544ce | 2010-12-22 13:20:08 +0100 | [diff] [blame] | 39 | .endm |