diff options
Diffstat (limited to 'arch/xtensa/kernel/vectors.S')
-rw-r--r-- | arch/xtensa/kernel/vectors.S | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/arch/xtensa/kernel/vectors.S b/arch/xtensa/kernel/vectors.S index 70066e3582d0..4462c1e595c2 100644 --- a/arch/xtensa/kernel/vectors.S +++ b/arch/xtensa/kernel/vectors.S | |||
@@ -69,11 +69,11 @@ | |||
69 | 69 | ||
70 | ENTRY(_UserExceptionVector) | 70 | ENTRY(_UserExceptionVector) |
71 | 71 | ||
72 | xsr a3, EXCSAVE_1 # save a3 and get dispatch table | 72 | xsr a3, excsave1 # save a3 and get dispatch table |
73 | wsr a2, DEPC # save a2 | 73 | wsr a2, depc # save a2 |
74 | l32i a2, a3, EXC_TABLE_KSTK # load kernel stack to a2 | 74 | l32i a2, a3, EXC_TABLE_KSTK # load kernel stack to a2 |
75 | s32i a0, a2, PT_AREG0 # save a0 to ESF | 75 | s32i a0, a2, PT_AREG0 # save a0 to ESF |
76 | rsr a0, EXCCAUSE # retrieve exception cause | 76 | rsr a0, exccause # retrieve exception cause |
77 | s32i a0, a2, PT_DEPC # mark it as a regular exception | 77 | s32i a0, a2, PT_DEPC # mark it as a regular exception |
78 | addx4 a0, a0, a3 # find entry in table | 78 | addx4 a0, a0, a3 # find entry in table |
79 | l32i a0, a0, EXC_TABLE_FAST_USER # load handler | 79 | l32i a0, a0, EXC_TABLE_FAST_USER # load handler |
@@ -93,11 +93,11 @@ ENTRY(_UserExceptionVector) | |||
93 | 93 | ||
94 | ENTRY(_KernelExceptionVector) | 94 | ENTRY(_KernelExceptionVector) |
95 | 95 | ||
96 | xsr a3, EXCSAVE_1 # save a3, and get dispatch table | 96 | xsr a3, excsave1 # save a3, and get dispatch table |
97 | wsr a2, DEPC # save a2 | 97 | wsr a2, depc # save a2 |
98 | addi a2, a1, -16-PT_SIZE # adjust stack pointer | 98 | addi a2, a1, -16-PT_SIZE # adjust stack pointer |
99 | s32i a0, a2, PT_AREG0 # save a0 to ESF | 99 | s32i a0, a2, PT_AREG0 # save a0 to ESF |
100 | rsr a0, EXCCAUSE # retrieve exception cause | 100 | rsr a0, exccause # retrieve exception cause |
101 | s32i a0, a2, PT_DEPC # mark it as a regular exception | 101 | s32i a0, a2, PT_DEPC # mark it as a regular exception |
102 | addx4 a0, a0, a3 # find entry in table | 102 | addx4 a0, a0, a3 # find entry in table |
103 | l32i a0, a0, EXC_TABLE_FAST_KERNEL # load handler address | 103 | l32i a0, a0, EXC_TABLE_FAST_KERNEL # load handler address |
@@ -205,17 +205,17 @@ ENTRY(_DoubleExceptionVector) | |||
205 | 205 | ||
206 | /* Deliberately destroy excsave (don't assume it's value was valid). */ | 206 | /* Deliberately destroy excsave (don't assume it's value was valid). */ |
207 | 207 | ||
208 | wsr a3, EXCSAVE_1 # save a3 | 208 | wsr a3, excsave1 # save a3 |
209 | 209 | ||
210 | /* Check for kernel double exception (usually fatal). */ | 210 | /* Check for kernel double exception (usually fatal). */ |
211 | 211 | ||
212 | rsr a3, PS | 212 | rsr a3, ps |
213 | _bbci.l a3, PS_UM_BIT, .Lksp | 213 | _bbci.l a3, PS_UM_BIT, .Lksp |
214 | 214 | ||
215 | /* Check if we are currently handling a window exception. */ | 215 | /* Check if we are currently handling a window exception. */ |
216 | /* Note: We don't need to indicate that we enter a critical section. */ | 216 | /* Note: We don't need to indicate that we enter a critical section. */ |
217 | 217 | ||
218 | xsr a0, DEPC # get DEPC, save a0 | 218 | xsr a0, depc # get DEPC, save a0 |
219 | 219 | ||
220 | movi a3, XCHAL_WINDOW_VECTORS_VADDR | 220 | movi a3, XCHAL_WINDOW_VECTORS_VADDR |
221 | _bltu a0, a3, .Lfixup | 221 | _bltu a0, a3, .Lfixup |
@@ -243,21 +243,21 @@ ENTRY(_DoubleExceptionVector) | |||
243 | * Note: We can trash the current window frame (a0...a3) and depc! | 243 | * Note: We can trash the current window frame (a0...a3) and depc! |
244 | */ | 244 | */ |
245 | 245 | ||
246 | wsr a2, DEPC # save stack pointer temporarily | 246 | wsr a2, depc # save stack pointer temporarily |
247 | rsr a0, PS | 247 | rsr a0, ps |
248 | extui a0, a0, PS_OWB_SHIFT, 4 | 248 | extui a0, a0, PS_OWB_SHIFT, 4 |
249 | wsr a0, WINDOWBASE | 249 | wsr a0, windowbase |
250 | rsync | 250 | rsync |
251 | 251 | ||
252 | /* We are now in the previous window frame. Save registers again. */ | 252 | /* We are now in the previous window frame. Save registers again. */ |
253 | 253 | ||
254 | xsr a2, DEPC # save a2 and get stack pointer | 254 | xsr a2, depc # save a2 and get stack pointer |
255 | s32i a0, a2, PT_AREG0 | 255 | s32i a0, a2, PT_AREG0 |
256 | 256 | ||
257 | wsr a3, EXCSAVE_1 # save a3 | 257 | wsr a3, excsave1 # save a3 |
258 | movi a3, exc_table | 258 | movi a3, exc_table |
259 | 259 | ||
260 | rsr a0, EXCCAUSE | 260 | rsr a0, exccause |
261 | s32i a0, a2, PT_DEPC # mark it as a regular exception | 261 | s32i a0, a2, PT_DEPC # mark it as a regular exception |
262 | addx4 a0, a0, a3 | 262 | addx4 a0, a0, a3 |
263 | l32i a0, a0, EXC_TABLE_FAST_USER | 263 | l32i a0, a0, EXC_TABLE_FAST_USER |
@@ -290,14 +290,14 @@ ENTRY(_DoubleExceptionVector) | |||
290 | 290 | ||
291 | /* a0: depc, a1: a1, a2: kstk, a3: a2, depc: a0, excsave: a3 */ | 291 | /* a0: depc, a1: a1, a2: kstk, a3: a2, depc: a0, excsave: a3 */ |
292 | 292 | ||
293 | xsr a3, DEPC | 293 | xsr a3, depc |
294 | s32i a0, a2, PT_DEPC | 294 | s32i a0, a2, PT_DEPC |
295 | s32i a3, a2, PT_AREG0 | 295 | s32i a3, a2, PT_AREG0 |
296 | 296 | ||
297 | /* a0: avail, a1: a1, a2: kstk, a3: avail, depc: a2, excsave: a3 */ | 297 | /* a0: avail, a1: a1, a2: kstk, a3: avail, depc: a2, excsave: a3 */ |
298 | 298 | ||
299 | movi a3, exc_table | 299 | movi a3, exc_table |
300 | rsr a0, EXCCAUSE | 300 | rsr a0, exccause |
301 | addx4 a0, a0, a3 | 301 | addx4 a0, a0, a3 |
302 | l32i a0, a0, EXC_TABLE_FAST_USER | 302 | l32i a0, a0, EXC_TABLE_FAST_USER |
303 | jx a0 | 303 | jx a0 |
@@ -312,7 +312,7 @@ ENTRY(_DoubleExceptionVector) | |||
312 | 312 | ||
313 | .Lksp: /* a0: a0, a1: a1, a2: a2, a3: trashed, depc: depc, excsave: a3 */ | 313 | .Lksp: /* a0: a0, a1: a1, a2: a2, a3: trashed, depc: depc, excsave: a3 */ |
314 | 314 | ||
315 | rsr a3, EXCCAUSE | 315 | rsr a3, exccause |
316 | beqi a3, EXCCAUSE_ITLB_MISS, 1f | 316 | beqi a3, EXCCAUSE_ITLB_MISS, 1f |
317 | addi a3, a3, -EXCCAUSE_DTLB_MISS | 317 | addi a3, a3, -EXCCAUSE_DTLB_MISS |
318 | bnez a3, .Lunrecoverable | 318 | bnez a3, .Lunrecoverable |
@@ -328,11 +328,11 @@ ENTRY(_DoubleExceptionVector) | |||
328 | 328 | ||
329 | .Lunrecoverable_fixup: | 329 | .Lunrecoverable_fixup: |
330 | l32i a2, a3, EXC_TABLE_DOUBLE_SAVE | 330 | l32i a2, a3, EXC_TABLE_DOUBLE_SAVE |
331 | xsr a0, DEPC | 331 | xsr a0, depc |
332 | 332 | ||
333 | .Lunrecoverable: | 333 | .Lunrecoverable: |
334 | rsr a3, EXCSAVE_1 | 334 | rsr a3, excsave1 |
335 | wsr a0, EXCSAVE_1 | 335 | wsr a0, excsave1 |
336 | movi a0, unrecoverable_exception | 336 | movi a0, unrecoverable_exception |
337 | callx0 a0 | 337 | callx0 a0 |
338 | 338 | ||
@@ -349,7 +349,7 @@ ENTRY(_DoubleExceptionVector) | |||
349 | .section .DebugInterruptVector.text, "ax" | 349 | .section .DebugInterruptVector.text, "ax" |
350 | 350 | ||
351 | ENTRY(_DebugInterruptVector) | 351 | ENTRY(_DebugInterruptVector) |
352 | xsr a0, EXCSAVE + XCHAL_DEBUGLEVEL | 352 | xsr a0, SREG_EXCSAVE + XCHAL_DEBUGLEVEL |
353 | jx a0 | 353 | jx a0 |
354 | 354 | ||
355 | 355 | ||