diff options
author | Scott Wood <scottwood@freescale.com> | 2011-12-20 10:34:40 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-04-08 05:51:17 -0400 |
commit | cfac57847a67c4903f34a77e971521531bbc7c77 (patch) | |
tree | 1803ecce9ff975e7602b3c47ae53f8111cfb1184 | |
parent | ab9fc4056af338248640ddb18497be386360363d (diff) |
powerpc/booke: Provide exception macros with interrupt name
DO_KVM will need to identify the particular exception type.
There is an existing set of arbitrary numbers that Linux passes,
but it's an undocumented mess that sort of corresponds to server/classic
exception vectors but not really.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r-- | arch/powerpc/kernel/head_44x.S | 23 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_booke.h | 41 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_fsl_booke.S | 52 |
3 files changed, 68 insertions, 48 deletions
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index 7dd2981bcc50..d1192c577ed3 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S | |||
@@ -248,10 +248,11 @@ _ENTRY(_start); | |||
248 | 248 | ||
249 | interrupt_base: | 249 | interrupt_base: |
250 | /* Critical Input Interrupt */ | 250 | /* Critical Input Interrupt */ |
251 | CRITICAL_EXCEPTION(0x0100, CriticalInput, unknown_exception) | 251 | CRITICAL_EXCEPTION(0x0100, CRITICAL, CriticalInput, unknown_exception) |
252 | 252 | ||
253 | /* Machine Check Interrupt */ | 253 | /* Machine Check Interrupt */ |
254 | CRITICAL_EXCEPTION(0x0200, MachineCheck, machine_check_exception) | 254 | CRITICAL_EXCEPTION(0x0200, MACHINE_CHECK, MachineCheck, \ |
255 | machine_check_exception) | ||
255 | MCHECK_EXCEPTION(0x0210, MachineCheckA, machine_check_exception) | 256 | MCHECK_EXCEPTION(0x0210, MachineCheckA, machine_check_exception) |
256 | 257 | ||
257 | /* Data Storage Interrupt */ | 258 | /* Data Storage Interrupt */ |
@@ -261,7 +262,8 @@ interrupt_base: | |||
261 | INSTRUCTION_STORAGE_EXCEPTION | 262 | INSTRUCTION_STORAGE_EXCEPTION |
262 | 263 | ||
263 | /* External Input Interrupt */ | 264 | /* External Input Interrupt */ |
264 | EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE) | 265 | EXCEPTION(0x0500, BOOKE_INTERRUPT_EXTERNAL, ExternalInput, \ |
266 | do_IRQ, EXC_XFER_LITE) | ||
265 | 267 | ||
266 | /* Alignment Interrupt */ | 268 | /* Alignment Interrupt */ |
267 | ALIGNMENT_EXCEPTION | 269 | ALIGNMENT_EXCEPTION |
@@ -273,29 +275,32 @@ interrupt_base: | |||
273 | #ifdef CONFIG_PPC_FPU | 275 | #ifdef CONFIG_PPC_FPU |
274 | FP_UNAVAILABLE_EXCEPTION | 276 | FP_UNAVAILABLE_EXCEPTION |
275 | #else | 277 | #else |
276 | EXCEPTION(0x2010, FloatingPointUnavailable, unknown_exception, EXC_XFER_EE) | 278 | EXCEPTION(0x2010, BOOKE_INTERRUPT_FP_UNAVAIL, \ |
279 | FloatingPointUnavailable, unknown_exception, EXC_XFER_EE) | ||
277 | #endif | 280 | #endif |
278 | /* System Call Interrupt */ | 281 | /* System Call Interrupt */ |
279 | START_EXCEPTION(SystemCall) | 282 | START_EXCEPTION(SystemCall) |
280 | NORMAL_EXCEPTION_PROLOG | 283 | NORMAL_EXCEPTION_PROLOG(BOOKE_INTERRUPT_SYSCALL) |
281 | EXC_XFER_EE_LITE(0x0c00, DoSyscall) | 284 | EXC_XFER_EE_LITE(0x0c00, DoSyscall) |
282 | 285 | ||
283 | /* Auxiliary Processor Unavailable Interrupt */ | 286 | /* Auxiliary Processor Unavailable Interrupt */ |
284 | EXCEPTION(0x2020, AuxillaryProcessorUnavailable, unknown_exception, EXC_XFER_EE) | 287 | EXCEPTION(0x2020, BOOKE_INTERRUPT_AP_UNAVAIL, \ |
288 | AuxillaryProcessorUnavailable, unknown_exception, EXC_XFER_EE) | ||
285 | 289 | ||
286 | /* Decrementer Interrupt */ | 290 | /* Decrementer Interrupt */ |
287 | DECREMENTER_EXCEPTION | 291 | DECREMENTER_EXCEPTION |
288 | 292 | ||
289 | /* Fixed Internal Timer Interrupt */ | 293 | /* Fixed Internal Timer Interrupt */ |
290 | /* TODO: Add FIT support */ | 294 | /* TODO: Add FIT support */ |
291 | EXCEPTION(0x1010, FixedIntervalTimer, unknown_exception, EXC_XFER_EE) | 295 | EXCEPTION(0x1010, BOOKE_INTERRUPT_FIT, FixedIntervalTimer, \ |
296 | unknown_exception, EXC_XFER_EE) | ||
292 | 297 | ||
293 | /* Watchdog Timer Interrupt */ | 298 | /* Watchdog Timer Interrupt */ |
294 | /* TODO: Add watchdog support */ | 299 | /* TODO: Add watchdog support */ |
295 | #ifdef CONFIG_BOOKE_WDT | 300 | #ifdef CONFIG_BOOKE_WDT |
296 | CRITICAL_EXCEPTION(0x1020, WatchdogTimer, WatchdogException) | 301 | CRITICAL_EXCEPTION(0x1020, WATCHDOG, WatchdogTimer, WatchdogException) |
297 | #else | 302 | #else |
298 | CRITICAL_EXCEPTION(0x1020, WatchdogTimer, unknown_exception) | 303 | CRITICAL_EXCEPTION(0x1020, WATCHDOG, WatchdogTimer, unknown_exception) |
299 | #endif | 304 | #endif |
300 | 305 | ||
301 | /* Data TLB Error Interrupt */ | 306 | /* Data TLB Error Interrupt */ |
diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h index 0e4175388f47..51fd0724e095 100644 --- a/arch/powerpc/kernel/head_booke.h +++ b/arch/powerpc/kernel/head_booke.h | |||
@@ -2,6 +2,8 @@ | |||
2 | #define __HEAD_BOOKE_H__ | 2 | #define __HEAD_BOOKE_H__ |
3 | 3 | ||
4 | #include <asm/ptrace.h> /* for STACK_FRAME_REGS_MARKER */ | 4 | #include <asm/ptrace.h> /* for STACK_FRAME_REGS_MARKER */ |
5 | #include <asm/kvm_asm.h> | ||
6 | |||
5 | /* | 7 | /* |
6 | * Macros used for common Book-e exception handling | 8 | * Macros used for common Book-e exception handling |
7 | */ | 9 | */ |
@@ -28,7 +30,7 @@ | |||
28 | */ | 30 | */ |
29 | #define THREAD_NORMSAVE(offset) (THREAD_NORMSAVES + (offset * 4)) | 31 | #define THREAD_NORMSAVE(offset) (THREAD_NORMSAVES + (offset * 4)) |
30 | 32 | ||
31 | #define NORMAL_EXCEPTION_PROLOG \ | 33 | #define NORMAL_EXCEPTION_PROLOG(intno) \ |
32 | mtspr SPRN_SPRG_WSCRATCH0, r10; /* save one register */ \ | 34 | mtspr SPRN_SPRG_WSCRATCH0, r10; /* save one register */ \ |
33 | mfspr r10, SPRN_SPRG_THREAD; \ | 35 | mfspr r10, SPRN_SPRG_THREAD; \ |
34 | stw r11, THREAD_NORMSAVE(0)(r10); \ | 36 | stw r11, THREAD_NORMSAVE(0)(r10); \ |
@@ -113,7 +115,7 @@ | |||
113 | * registers as the normal prolog above. Instead we use a portion of the | 115 | * registers as the normal prolog above. Instead we use a portion of the |
114 | * critical/machine check exception stack at low physical addresses. | 116 | * critical/machine check exception stack at low physical addresses. |
115 | */ | 117 | */ |
116 | #define EXC_LEVEL_EXCEPTION_PROLOG(exc_level, exc_level_srr0, exc_level_srr1) \ | 118 | #define EXC_LEVEL_EXCEPTION_PROLOG(exc_level, intno, exc_level_srr0, exc_level_srr1) \ |
117 | mtspr SPRN_SPRG_WSCRATCH_##exc_level,r8; \ | 119 | mtspr SPRN_SPRG_WSCRATCH_##exc_level,r8; \ |
118 | BOOKE_LOAD_EXC_LEVEL_STACK(exc_level);/* r8 points to the exc_level stack*/ \ | 120 | BOOKE_LOAD_EXC_LEVEL_STACK(exc_level);/* r8 points to the exc_level stack*/ \ |
119 | stw r9,GPR9(r8); /* save various registers */\ | 121 | stw r9,GPR9(r8); /* save various registers */\ |
@@ -162,12 +164,13 @@ | |||
162 | SAVE_4GPRS(3, r11); \ | 164 | SAVE_4GPRS(3, r11); \ |
163 | SAVE_2GPRS(7, r11) | 165 | SAVE_2GPRS(7, r11) |
164 | 166 | ||
165 | #define CRITICAL_EXCEPTION_PROLOG \ | 167 | #define CRITICAL_EXCEPTION_PROLOG(intno) \ |
166 | EXC_LEVEL_EXCEPTION_PROLOG(CRIT, SPRN_CSRR0, SPRN_CSRR1) | 168 | EXC_LEVEL_EXCEPTION_PROLOG(CRIT, intno, SPRN_CSRR0, SPRN_CSRR1) |
167 | #define DEBUG_EXCEPTION_PROLOG \ | 169 | #define DEBUG_EXCEPTION_PROLOG \ |
168 | EXC_LEVEL_EXCEPTION_PROLOG(DBG, SPRN_DSRR0, SPRN_DSRR1) | 170 | EXC_LEVEL_EXCEPTION_PROLOG(DBG, DEBUG, SPRN_DSRR0, SPRN_DSRR1) |
169 | #define MCHECK_EXCEPTION_PROLOG \ | 171 | #define MCHECK_EXCEPTION_PROLOG \ |
170 | EXC_LEVEL_EXCEPTION_PROLOG(MC, SPRN_MCSRR0, SPRN_MCSRR1) | 172 | EXC_LEVEL_EXCEPTION_PROLOG(MC, MACHINE_CHECK, \ |
173 | SPRN_MCSRR0, SPRN_MCSRR1) | ||
171 | 174 | ||
172 | /* | 175 | /* |
173 | * Exception vectors. | 176 | * Exception vectors. |
@@ -181,16 +184,16 @@ label: | |||
181 | .long func; \ | 184 | .long func; \ |
182 | .long ret_from_except_full | 185 | .long ret_from_except_full |
183 | 186 | ||
184 | #define EXCEPTION(n, label, hdlr, xfer) \ | 187 | #define EXCEPTION(n, intno, label, hdlr, xfer) \ |
185 | START_EXCEPTION(label); \ | 188 | START_EXCEPTION(label); \ |
186 | NORMAL_EXCEPTION_PROLOG; \ | 189 | NORMAL_EXCEPTION_PROLOG(intno); \ |
187 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | 190 | addi r3,r1,STACK_FRAME_OVERHEAD; \ |
188 | xfer(n, hdlr) | 191 | xfer(n, hdlr) |
189 | 192 | ||
190 | #define CRITICAL_EXCEPTION(n, label, hdlr) \ | 193 | #define CRITICAL_EXCEPTION(n, intno, label, hdlr) \ |
191 | START_EXCEPTION(label); \ | 194 | START_EXCEPTION(label); \ |
192 | CRITICAL_EXCEPTION_PROLOG; \ | 195 | CRITICAL_EXCEPTION_PROLOG(intno); \ |
193 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | 196 | addi r3,r1,STACK_FRAME_OVERHEAD; \ |
194 | EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ | 197 | EXC_XFER_TEMPLATE(hdlr, n+2, (MSR_KERNEL & ~(MSR_ME|MSR_DE|MSR_CE)), \ |
195 | NOCOPY, crit_transfer_to_handler, \ | 198 | NOCOPY, crit_transfer_to_handler, \ |
196 | ret_from_crit_exc) | 199 | ret_from_crit_exc) |
@@ -302,7 +305,7 @@ label: | |||
302 | 305 | ||
303 | #define DEBUG_CRIT_EXCEPTION \ | 306 | #define DEBUG_CRIT_EXCEPTION \ |
304 | START_EXCEPTION(DebugCrit); \ | 307 | START_EXCEPTION(DebugCrit); \ |
305 | CRITICAL_EXCEPTION_PROLOG; \ | 308 | CRITICAL_EXCEPTION_PROLOG(DEBUG); \ |
306 | \ | 309 | \ |
307 | /* \ | 310 | /* \ |
308 | * If there is a single step or branch-taken exception in an \ | 311 | * If there is a single step or branch-taken exception in an \ |
@@ -355,7 +358,7 @@ label: | |||
355 | 358 | ||
356 | #define DATA_STORAGE_EXCEPTION \ | 359 | #define DATA_STORAGE_EXCEPTION \ |
357 | START_EXCEPTION(DataStorage) \ | 360 | START_EXCEPTION(DataStorage) \ |
358 | NORMAL_EXCEPTION_PROLOG; \ | 361 | NORMAL_EXCEPTION_PROLOG(DATA_STORAGE); \ |
359 | mfspr r5,SPRN_ESR; /* Grab the ESR and save it */ \ | 362 | mfspr r5,SPRN_ESR; /* Grab the ESR and save it */ \ |
360 | stw r5,_ESR(r11); \ | 363 | stw r5,_ESR(r11); \ |
361 | mfspr r4,SPRN_DEAR; /* Grab the DEAR */ \ | 364 | mfspr r4,SPRN_DEAR; /* Grab the DEAR */ \ |
@@ -363,7 +366,7 @@ label: | |||
363 | 366 | ||
364 | #define INSTRUCTION_STORAGE_EXCEPTION \ | 367 | #define INSTRUCTION_STORAGE_EXCEPTION \ |
365 | START_EXCEPTION(InstructionStorage) \ | 368 | START_EXCEPTION(InstructionStorage) \ |
366 | NORMAL_EXCEPTION_PROLOG; \ | 369 | NORMAL_EXCEPTION_PROLOG(INST_STORAGE); \ |
367 | mfspr r5,SPRN_ESR; /* Grab the ESR and save it */ \ | 370 | mfspr r5,SPRN_ESR; /* Grab the ESR and save it */ \ |
368 | stw r5,_ESR(r11); \ | 371 | stw r5,_ESR(r11); \ |
369 | mr r4,r12; /* Pass SRR0 as arg2 */ \ | 372 | mr r4,r12; /* Pass SRR0 as arg2 */ \ |
@@ -372,7 +375,7 @@ label: | |||
372 | 375 | ||
373 | #define ALIGNMENT_EXCEPTION \ | 376 | #define ALIGNMENT_EXCEPTION \ |
374 | START_EXCEPTION(Alignment) \ | 377 | START_EXCEPTION(Alignment) \ |
375 | NORMAL_EXCEPTION_PROLOG; \ | 378 | NORMAL_EXCEPTION_PROLOG(ALIGNMENT); \ |
376 | mfspr r4,SPRN_DEAR; /* Grab the DEAR and save it */ \ | 379 | mfspr r4,SPRN_DEAR; /* Grab the DEAR and save it */ \ |
377 | stw r4,_DEAR(r11); \ | 380 | stw r4,_DEAR(r11); \ |
378 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | 381 | addi r3,r1,STACK_FRAME_OVERHEAD; \ |
@@ -380,7 +383,7 @@ label: | |||
380 | 383 | ||
381 | #define PROGRAM_EXCEPTION \ | 384 | #define PROGRAM_EXCEPTION \ |
382 | START_EXCEPTION(Program) \ | 385 | START_EXCEPTION(Program) \ |
383 | NORMAL_EXCEPTION_PROLOG; \ | 386 | NORMAL_EXCEPTION_PROLOG(PROGRAM); \ |
384 | mfspr r4,SPRN_ESR; /* Grab the ESR and save it */ \ | 387 | mfspr r4,SPRN_ESR; /* Grab the ESR and save it */ \ |
385 | stw r4,_ESR(r11); \ | 388 | stw r4,_ESR(r11); \ |
386 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | 389 | addi r3,r1,STACK_FRAME_OVERHEAD; \ |
@@ -388,7 +391,7 @@ label: | |||
388 | 391 | ||
389 | #define DECREMENTER_EXCEPTION \ | 392 | #define DECREMENTER_EXCEPTION \ |
390 | START_EXCEPTION(Decrementer) \ | 393 | START_EXCEPTION(Decrementer) \ |
391 | NORMAL_EXCEPTION_PROLOG; \ | 394 | NORMAL_EXCEPTION_PROLOG(DECREMENTER); \ |
392 | lis r0,TSR_DIS@h; /* Setup the DEC interrupt mask */ \ | 395 | lis r0,TSR_DIS@h; /* Setup the DEC interrupt mask */ \ |
393 | mtspr SPRN_TSR,r0; /* Clear the DEC interrupt */ \ | 396 | mtspr SPRN_TSR,r0; /* Clear the DEC interrupt */ \ |
394 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | 397 | addi r3,r1,STACK_FRAME_OVERHEAD; \ |
@@ -396,7 +399,7 @@ label: | |||
396 | 399 | ||
397 | #define FP_UNAVAILABLE_EXCEPTION \ | 400 | #define FP_UNAVAILABLE_EXCEPTION \ |
398 | START_EXCEPTION(FloatingPointUnavailable) \ | 401 | START_EXCEPTION(FloatingPointUnavailable) \ |
399 | NORMAL_EXCEPTION_PROLOG; \ | 402 | NORMAL_EXCEPTION_PROLOG(FP_UNAVAIL); \ |
400 | beq 1f; \ | 403 | beq 1f; \ |
401 | bl load_up_fpu; /* if from user, just load it up */ \ | 404 | bl load_up_fpu; /* if from user, just load it up */ \ |
402 | b fast_exception_return; \ | 405 | b fast_exception_return; \ |
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index 28e62598d0e8..7c406dd9fea6 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S | |||
@@ -301,19 +301,20 @@ _ENTRY(__early_start) | |||
301 | 301 | ||
302 | interrupt_base: | 302 | interrupt_base: |
303 | /* Critical Input Interrupt */ | 303 | /* Critical Input Interrupt */ |
304 | CRITICAL_EXCEPTION(0x0100, CriticalInput, unknown_exception) | 304 | CRITICAL_EXCEPTION(0x0100, CRITICAL, CriticalInput, unknown_exception) |
305 | 305 | ||
306 | /* Machine Check Interrupt */ | 306 | /* Machine Check Interrupt */ |
307 | #ifdef CONFIG_E200 | 307 | #ifdef CONFIG_E200 |
308 | /* no RFMCI, MCSRRs on E200 */ | 308 | /* no RFMCI, MCSRRs on E200 */ |
309 | CRITICAL_EXCEPTION(0x0200, MachineCheck, machine_check_exception) | 309 | CRITICAL_EXCEPTION(0x0200, MACHINE_CHECK, MachineCheck, \ |
310 | machine_check_exception) | ||
310 | #else | 311 | #else |
311 | MCHECK_EXCEPTION(0x0200, MachineCheck, machine_check_exception) | 312 | MCHECK_EXCEPTION(0x0200, MachineCheck, machine_check_exception) |
312 | #endif | 313 | #endif |
313 | 314 | ||
314 | /* Data Storage Interrupt */ | 315 | /* Data Storage Interrupt */ |
315 | START_EXCEPTION(DataStorage) | 316 | START_EXCEPTION(DataStorage) |
316 | NORMAL_EXCEPTION_PROLOG | 317 | NORMAL_EXCEPTION_PROLOG(DATA_STORAGE) |
317 | mfspr r5,SPRN_ESR /* Grab the ESR, save it, pass arg3 */ | 318 | mfspr r5,SPRN_ESR /* Grab the ESR, save it, pass arg3 */ |
318 | stw r5,_ESR(r11) | 319 | stw r5,_ESR(r11) |
319 | mfspr r4,SPRN_DEAR /* Grab the DEAR, save it, pass arg2 */ | 320 | mfspr r4,SPRN_DEAR /* Grab the DEAR, save it, pass arg2 */ |
@@ -328,7 +329,7 @@ interrupt_base: | |||
328 | INSTRUCTION_STORAGE_EXCEPTION | 329 | INSTRUCTION_STORAGE_EXCEPTION |
329 | 330 | ||
330 | /* External Input Interrupt */ | 331 | /* External Input Interrupt */ |
331 | EXCEPTION(0x0500, ExternalInput, do_IRQ, EXC_XFER_LITE) | 332 | EXCEPTION(0x0500, EXTERNAL, ExternalInput, do_IRQ, EXC_XFER_LITE) |
332 | 333 | ||
333 | /* Alignment Interrupt */ | 334 | /* Alignment Interrupt */ |
334 | ALIGNMENT_EXCEPTION | 335 | ALIGNMENT_EXCEPTION |
@@ -342,32 +343,36 @@ interrupt_base: | |||
342 | #else | 343 | #else |
343 | #ifdef CONFIG_E200 | 344 | #ifdef CONFIG_E200 |
344 | /* E200 treats 'normal' floating point instructions as FP Unavail exception */ | 345 | /* E200 treats 'normal' floating point instructions as FP Unavail exception */ |
345 | EXCEPTION(0x0800, FloatingPointUnavailable, program_check_exception, EXC_XFER_EE) | 346 | EXCEPTION(0x0800, FP_UNAVAIL, FloatingPointUnavailable, \ |
347 | program_check_exception, EXC_XFER_EE) | ||
346 | #else | 348 | #else |
347 | EXCEPTION(0x0800, FloatingPointUnavailable, unknown_exception, EXC_XFER_EE) | 349 | EXCEPTION(0x0800, FP_UNAVAIL, FloatingPointUnavailable, \ |
350 | unknown_exception, EXC_XFER_EE) | ||
348 | #endif | 351 | #endif |
349 | #endif | 352 | #endif |
350 | 353 | ||
351 | /* System Call Interrupt */ | 354 | /* System Call Interrupt */ |
352 | START_EXCEPTION(SystemCall) | 355 | START_EXCEPTION(SystemCall) |
353 | NORMAL_EXCEPTION_PROLOG | 356 | NORMAL_EXCEPTION_PROLOG(SYSCALL) |
354 | EXC_XFER_EE_LITE(0x0c00, DoSyscall) | 357 | EXC_XFER_EE_LITE(0x0c00, DoSyscall) |
355 | 358 | ||
356 | /* Auxiliary Processor Unavailable Interrupt */ | 359 | /* Auxiliary Processor Unavailable Interrupt */ |
357 | EXCEPTION(0x2900, AuxillaryProcessorUnavailable, unknown_exception, EXC_XFER_EE) | 360 | EXCEPTION(0x2900, AP_UNAVAIL, AuxillaryProcessorUnavailable, \ |
361 | unknown_exception, EXC_XFER_EE) | ||
358 | 362 | ||
359 | /* Decrementer Interrupt */ | 363 | /* Decrementer Interrupt */ |
360 | DECREMENTER_EXCEPTION | 364 | DECREMENTER_EXCEPTION |
361 | 365 | ||
362 | /* Fixed Internal Timer Interrupt */ | 366 | /* Fixed Internal Timer Interrupt */ |
363 | /* TODO: Add FIT support */ | 367 | /* TODO: Add FIT support */ |
364 | EXCEPTION(0x3100, FixedIntervalTimer, unknown_exception, EXC_XFER_EE) | 368 | EXCEPTION(0x3100, FIT, FixedIntervalTimer, \ |
369 | unknown_exception, EXC_XFER_EE) | ||
365 | 370 | ||
366 | /* Watchdog Timer Interrupt */ | 371 | /* Watchdog Timer Interrupt */ |
367 | #ifdef CONFIG_BOOKE_WDT | 372 | #ifdef CONFIG_BOOKE_WDT |
368 | CRITICAL_EXCEPTION(0x3200, WatchdogTimer, WatchdogException) | 373 | CRITICAL_EXCEPTION(0x3200, WATCHDOG, WatchdogTimer, WatchdogException) |
369 | #else | 374 | #else |
370 | CRITICAL_EXCEPTION(0x3200, WatchdogTimer, unknown_exception) | 375 | CRITICAL_EXCEPTION(0x3200, WATCHDOG, WatchdogTimer, unknown_exception) |
371 | #endif | 376 | #endif |
372 | 377 | ||
373 | /* Data TLB Error Interrupt */ | 378 | /* Data TLB Error Interrupt */ |
@@ -538,31 +543,38 @@ interrupt_base: | |||
538 | #ifdef CONFIG_SPE | 543 | #ifdef CONFIG_SPE |
539 | /* SPE Unavailable */ | 544 | /* SPE Unavailable */ |
540 | START_EXCEPTION(SPEUnavailable) | 545 | START_EXCEPTION(SPEUnavailable) |
541 | NORMAL_EXCEPTION_PROLOG | 546 | NORMAL_EXCEPTION_PROLOG(SPE_UNAVAIL) |
542 | bne load_up_spe | 547 | bne load_up_spe |
543 | addi r3,r1,STACK_FRAME_OVERHEAD | 548 | addi r3,r1,STACK_FRAME_OVERHEAD |
544 | EXC_XFER_EE_LITE(0x2010, KernelSPE) | 549 | EXC_XFER_EE_LITE(0x2010, KernelSPE) |
545 | #else | 550 | #else |
546 | EXCEPTION(0x2020, SPEUnavailable, unknown_exception, EXC_XFER_EE) | 551 | EXCEPTION(0x2020, SPE_UNAVAIL, SPEUnavailable, \ |
552 | unknown_exception, EXC_XFER_EE) | ||
547 | #endif /* CONFIG_SPE */ | 553 | #endif /* CONFIG_SPE */ |
548 | 554 | ||
549 | /* SPE Floating Point Data */ | 555 | /* SPE Floating Point Data */ |
550 | #ifdef CONFIG_SPE | 556 | #ifdef CONFIG_SPE |
551 | EXCEPTION(0x2030, SPEFloatingPointData, SPEFloatingPointException, EXC_XFER_EE); | 557 | EXCEPTION(0x2030, SPE_FP_DATA, SPEFloatingPointData, \ |
558 | SPEFloatingPointException, EXC_XFER_EE); | ||
552 | 559 | ||
553 | /* SPE Floating Point Round */ | 560 | /* SPE Floating Point Round */ |
554 | EXCEPTION(0x2050, SPEFloatingPointRound, SPEFloatingPointRoundException, EXC_XFER_EE) | 561 | EXCEPTION(0x2050, SPE_FP_ROUND, SPEFloatingPointRound, \ |
562 | SPEFloatingPointRoundException, EXC_XFER_EE) | ||
555 | #else | 563 | #else |
556 | EXCEPTION(0x2040, SPEFloatingPointData, unknown_exception, EXC_XFER_EE) | 564 | EXCEPTION(0x2040, SPE_FP_DATA, SPEFloatingPointData, \ |
557 | EXCEPTION(0x2050, SPEFloatingPointRound, unknown_exception, EXC_XFER_EE) | 565 | unknown_exception, EXC_XFER_EE) |
566 | EXCEPTION(0x2050, SPE_FP_ROUND, SPEFloatingPointRound, \ | ||
567 | unknown_exception, EXC_XFER_EE) | ||
558 | #endif /* CONFIG_SPE */ | 568 | #endif /* CONFIG_SPE */ |
559 | 569 | ||
560 | /* Performance Monitor */ | 570 | /* Performance Monitor */ |
561 | EXCEPTION(0x2060, PerformanceMonitor, performance_monitor_exception, EXC_XFER_STD) | 571 | EXCEPTION(0x2060, PERFORMANCE_MONITOR, PerformanceMonitor, \ |
572 | performance_monitor_exception, EXC_XFER_STD) | ||
562 | 573 | ||
563 | EXCEPTION(0x2070, Doorbell, doorbell_exception, EXC_XFER_STD) | 574 | EXCEPTION(0x2070, DOORBELL, Doorbell, doorbell_exception, EXC_XFER_STD) |
564 | 575 | ||
565 | CRITICAL_EXCEPTION(0x2080, CriticalDoorbell, unknown_exception) | 576 | CRITICAL_EXCEPTION(0x2080, DOORBELL_CRITICAL, \ |
577 | CriticalDoorbell, unknown_exception) | ||
566 | 578 | ||
567 | /* Debug Interrupt */ | 579 | /* Debug Interrupt */ |
568 | DEBUG_DEBUG_EXCEPTION | 580 | DEBUG_DEBUG_EXCEPTION |