diff options
Diffstat (limited to 'arch/blackfin/mach-common/interrupt.S')
| -rw-r--r-- | arch/blackfin/mach-common/interrupt.S | 48 |
1 files changed, 34 insertions, 14 deletions
diff --git a/arch/blackfin/mach-common/interrupt.S b/arch/blackfin/mach-common/interrupt.S index 4de376418a18..7f752c87fe46 100644 --- a/arch/blackfin/mach-common/interrupt.S +++ b/arch/blackfin/mach-common/interrupt.S | |||
| @@ -34,9 +34,13 @@ | |||
| 34 | #include <asm/entry.h> | 34 | #include <asm/entry.h> |
| 35 | #include <asm/asm-offsets.h> | 35 | #include <asm/asm-offsets.h> |
| 36 | #include <asm/trace.h> | 36 | #include <asm/trace.h> |
| 37 | #include <asm/traps.h> | ||
| 38 | #include <asm/thread_info.h> | ||
| 37 | 39 | ||
| 38 | #include <asm/mach-common/context.S> | 40 | #include <asm/mach-common/context.S> |
| 39 | 41 | ||
| 42 | .extern _ret_from_exception | ||
| 43 | |||
| 40 | #ifdef CONFIG_I_ENTRY_L1 | 44 | #ifdef CONFIG_I_ENTRY_L1 |
| 41 | .section .l1.text | 45 | .section .l1.text |
| 42 | #else | 46 | #else |
| @@ -117,8 +121,8 @@ __common_int_entry: | |||
| 117 | 121 | ||
| 118 | #if ANOMALY_05000283 || ANOMALY_05000315 | 122 | #if ANOMALY_05000283 || ANOMALY_05000315 |
| 119 | cc = r7 == r7; | 123 | cc = r7 == r7; |
| 120 | p5.h = 0xffc0; | 124 | p5.h = HI(CHIPID); |
| 121 | p5.l = 0x0014; | 125 | p5.l = LO(CHIPID); |
| 122 | if cc jump 1f; | 126 | if cc jump 1f; |
| 123 | r7.l = W[p5]; | 127 | r7.l = W[p5]; |
| 124 | 1: | 128 | 1: |
| @@ -134,26 +138,22 @@ __common_int_entry: | |||
| 134 | 138 | ||
| 135 | /* interrupt routine for ivhw - 5 */ | 139 | /* interrupt routine for ivhw - 5 */ |
| 136 | ENTRY(_evt_ivhw) | 140 | ENTRY(_evt_ivhw) |
| 137 | SAVE_CONTEXT | 141 | SAVE_ALL_SYS |
| 138 | #ifdef CONFIG_FRAME_POINTER | 142 | #ifdef CONFIG_FRAME_POINTER |
| 139 | fp = 0; | 143 | fp = 0; |
| 140 | #endif | 144 | #endif |
| 145 | |||
| 141 | #if ANOMALY_05000283 | 146 | #if ANOMALY_05000283 |
| 142 | cc = r7 == r7; | 147 | cc = r7 == r7; |
| 143 | p5.h = 0xffc0; | 148 | p5.h = HI(CHIPID); |
| 144 | p5.l = 0x0014; | 149 | p5.l = LO(CHIPID); |
| 145 | if cc jump 1f; | 150 | if cc jump 1f; |
| 146 | r7.l = W[p5]; | 151 | r7.l = W[p5]; |
| 147 | 1: | 152 | 1: |
| 148 | #endif | 153 | #endif |
| 149 | 154 | ||
| 150 | trace_buffer_stop(p0, r0); | ||
| 151 | |||
| 152 | r0 = IRQ_HWERR; | ||
| 153 | r1 = sp; | ||
| 154 | |||
| 155 | #ifdef CONFIG_HARDWARE_PM | 155 | #ifdef CONFIG_HARDWARE_PM |
| 156 | r7 = SEQSTAT; | 156 | r7 = [sp + PT_SEQSTAT]; |
| 157 | r7 = r7 >>> 0xe; | 157 | r7 = r7 >>> 0xe; |
| 158 | r6 = 0x1F; | 158 | r6 = 0x1F; |
| 159 | r7 = r7 & r6; | 159 | r7 = r7 & r6; |
| @@ -161,11 +161,29 @@ ENTRY(_evt_ivhw) | |||
| 161 | cc = r7 == r5; | 161 | cc = r7 == r5; |
| 162 | if cc jump .Lcall_do_ovf; /* deal with performance counter overflow */ | 162 | if cc jump .Lcall_do_ovf; /* deal with performance counter overflow */ |
| 163 | #endif | 163 | #endif |
| 164 | 164 | # We are going to dump something out, so make sure we print IPEND properly | |
| 165 | p2.l = lo(IPEND); | ||
| 166 | p2.h = hi(IPEND); | ||
| 167 | r0 = [p2]; | ||
| 168 | [sp + PT_IPEND] = r0; | ||
| 169 | |||
| 170 | /* set the EXCAUSE to HWERR for trap_c */ | ||
| 171 | r0 = [sp + PT_SEQSTAT]; | ||
| 172 | R1.L = LO(VEC_HWERR); | ||
| 173 | R1.H = HI(VEC_HWERR); | ||
| 174 | R0 = R0 | R1; | ||
| 175 | [sp + PT_SEQSTAT] = R0; | ||
| 176 | |||
| 177 | r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */ | ||
| 165 | SP += -12; | 178 | SP += -12; |
| 166 | call _irq_panic; | 179 | call _trap_c; |
| 167 | SP += 12; | 180 | SP += 12; |
| 181 | |||
| 182 | call _ret_from_exception; | ||
| 183 | .Lcommon_restore_all_sys: | ||
| 184 | RESTORE_ALL_SYS | ||
| 168 | rti; | 185 | rti; |
| 186 | |||
| 169 | #ifdef CONFIG_HARDWARE_PM | 187 | #ifdef CONFIG_HARDWARE_PM |
| 170 | .Lcall_do_ovf: | 188 | .Lcall_do_ovf: |
| 171 | 189 | ||
| @@ -173,9 +191,11 @@ ENTRY(_evt_ivhw) | |||
| 173 | call _pm_overflow; | 191 | call _pm_overflow; |
| 174 | SP += 12; | 192 | SP += 12; |
| 175 | 193 | ||
| 176 | jump .Lcommon_restore_context; | 194 | jump .Lcommon_restore_all_sys; |
| 177 | #endif | 195 | #endif |
| 178 | 196 | ||
| 197 | ENDPROC(_evt_ivhw) | ||
| 198 | |||
| 179 | /* Interrupt routine for evt2 (NMI). | 199 | /* Interrupt routine for evt2 (NMI). |
| 180 | * We don't actually use this, so just return. | 200 | * We don't actually use this, so just return. |
| 181 | * For inner circle type details, please see: | 201 | * For inner circle type details, please see: |
