diff options
| -rw-r--r-- | arch/arc/kernel/entry-arcv2.S | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/arch/arc/kernel/entry-arcv2.S b/arch/arc/kernel/entry-arcv2.S index 7a1c124ff021..0b6388a5f0b8 100644 --- a/arch/arc/kernel/entry-arcv2.S +++ b/arch/arc/kernel/entry-arcv2.S | |||
| @@ -67,12 +67,23 @@ ENTRY(handle_interrupt) | |||
| 67 | 67 | ||
| 68 | INTERRUPT_PROLOGUE irq | 68 | INTERRUPT_PROLOGUE irq |
| 69 | 69 | ||
| 70 | clri ; To make status32.IE agree with CPU internal state | 70 | # irq control APIs local_irq_save/restore/disable/enable fiddle with |
| 71 | 71 | # global interrupt enable bits in STATUS32 (.IE for 1 prio, .E[] for 2 prio) | |
| 72 | #ifdef CONFIG_TRACE_IRQFLAGS | 72 | # However a taken interrupt doesn't clear these bits. Thus irqs_disabled() |
| 73 | TRACE_ASM_IRQ_DISABLE | 73 | # query in hard ISR path would return false (since .IE is set) which would |
| 74 | #endif | 74 | # trips genirq interrupt handling asserts. |
| 75 | 75 | # | |
| 76 | # So do a "soft" disable of interrutps here. | ||
| 77 | # | ||
| 78 | # Note this disable is only for consistent book-keeping as further interrupts | ||
| 79 | # will be disabled anyways even w/o this. Hardware tracks active interrupts | ||
| 80 | # seperately in AUX_IRQ_ACTIVE.active and will not take new interrupts | ||
| 81 | # unless this one returns (or higher prio becomes pending in 2-prio scheme) | ||
| 82 | |||
| 83 | IRQ_DISABLE | ||
| 84 | |||
| 85 | ; icause is banked: one per priority level | ||
| 86 | ; so a higher prio interrupt taken here won't clobber prev prio icause | ||
| 76 | lr r0, [ICAUSE] | 87 | lr r0, [ICAUSE] |
| 77 | mov blink, ret_from_exception | 88 | mov blink, ret_from_exception |
| 78 | 89 | ||
| @@ -171,6 +182,7 @@ END(EV_TLBProtV) | |||
| 171 | ; All 2 entry points to here already disable interrupts | 182 | ; All 2 entry points to here already disable interrupts |
| 172 | 183 | ||
| 173 | .Lrestore_regs: | 184 | .Lrestore_regs: |
| 185 | restore_regs: | ||
| 174 | 186 | ||
| 175 | # Interrpts are actually disabled from this point on, but will get | 187 | # Interrpts are actually disabled from this point on, but will get |
| 176 | # reenabled after we return from interrupt/exception. | 188 | # reenabled after we return from interrupt/exception. |
