diff options
Diffstat (limited to 'arch/ppc/kernel')
-rw-r--r-- | arch/ppc/kernel/Makefile | 2 | ||||
-rw-r--r-- | arch/ppc/kernel/fpu.S | 133 | ||||
-rw-r--r-- | arch/ppc/kernel/head.S | 84 | ||||
-rw-r--r-- | arch/ppc/kernel/head_44x.S | 14 | ||||
-rw-r--r-- | arch/ppc/kernel/head_4xx.S | 52 | ||||
-rw-r--r-- | arch/ppc/kernel/head_8xx.S | 42 | ||||
-rw-r--r-- | arch/ppc/kernel/head_booke.h | 4 | ||||
-rw-r--r-- | arch/ppc/kernel/head_fsl_booke.S | 24 | ||||
-rw-r--r-- | arch/ppc/kernel/ppc_ksyms.c | 16 | ||||
-rw-r--r-- | arch/ppc/kernel/traps.c | 20 | ||||
-rw-r--r-- | arch/ppc/kernel/vector.S | 217 |
11 files changed, 130 insertions, 478 deletions
diff --git a/arch/ppc/kernel/Makefile b/arch/ppc/kernel/Makefile index 467f96480355..da2dc08c4c1b 100644 --- a/arch/ppc/kernel/Makefile +++ b/arch/ppc/kernel/Makefile | |||
@@ -38,6 +38,8 @@ endif | |||
38 | 38 | ||
39 | # These are here while we do the architecture merge | 39 | # These are here while we do the architecture merge |
40 | vecemu-y += ../../powerpc/kernel/vecemu.o | 40 | vecemu-y += ../../powerpc/kernel/vecemu.o |
41 | vector-y += ../../powerpc/kernel/vector.o | ||
42 | fpu-y += ../../powerpc/kernel/fpu.o | ||
41 | 43 | ||
42 | else | 44 | else |
43 | obj-y := entry.o irq.o idle.o time.o misc.o \ | 45 | obj-y := entry.o irq.o idle.o time.o misc.o \ |
diff --git a/arch/ppc/kernel/fpu.S b/arch/ppc/kernel/fpu.S deleted file mode 100644 index 665d7d34304c..000000000000 --- a/arch/ppc/kernel/fpu.S +++ /dev/null | |||
@@ -1,133 +0,0 @@ | |||
1 | /* | ||
2 | * FPU support code, moved here from head.S so that it can be used | ||
3 | * by chips which use other head-whatever.S files. | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * as published by the Free Software Foundation; either version | ||
8 | * 2 of the License, or (at your option) any later version. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #include <linux/config.h> | ||
13 | #include <asm/processor.h> | ||
14 | #include <asm/page.h> | ||
15 | #include <asm/mmu.h> | ||
16 | #include <asm/pgtable.h> | ||
17 | #include <asm/cputable.h> | ||
18 | #include <asm/cache.h> | ||
19 | #include <asm/thread_info.h> | ||
20 | #include <asm/ppc_asm.h> | ||
21 | #include <asm/asm-offsets.h> | ||
22 | |||
23 | /* | ||
24 | * This task wants to use the FPU now. | ||
25 | * On UP, disable FP for the task which had the FPU previously, | ||
26 | * and save its floating-point registers in its thread_struct. | ||
27 | * Load up this task's FP registers from its thread_struct, | ||
28 | * enable the FPU for the current task and return to the task. | ||
29 | */ | ||
30 | .globl load_up_fpu | ||
31 | load_up_fpu: | ||
32 | mfmsr r5 | ||
33 | ori r5,r5,MSR_FP | ||
34 | #ifdef CONFIG_PPC64BRIDGE | ||
35 | clrldi r5,r5,1 /* turn off 64-bit mode */ | ||
36 | #endif /* CONFIG_PPC64BRIDGE */ | ||
37 | SYNC | ||
38 | MTMSRD(r5) /* enable use of fpu now */ | ||
39 | isync | ||
40 | /* | ||
41 | * For SMP, we don't do lazy FPU switching because it just gets too | ||
42 | * horrendously complex, especially when a task switches from one CPU | ||
43 | * to another. Instead we call giveup_fpu in switch_to. | ||
44 | */ | ||
45 | #ifndef CONFIG_SMP | ||
46 | tophys(r6,0) /* get __pa constant */ | ||
47 | addis r3,r6,last_task_used_math@ha | ||
48 | lwz r4,last_task_used_math@l(r3) | ||
49 | cmpwi 0,r4,0 | ||
50 | beq 1f | ||
51 | add r4,r4,r6 | ||
52 | addi r4,r4,THREAD /* want last_task_used_math->thread */ | ||
53 | SAVE_32FPRS(0, r4) | ||
54 | mffs fr0 | ||
55 | stfd fr0,THREAD_FPSCR-4(r4) | ||
56 | lwz r5,PT_REGS(r4) | ||
57 | add r5,r5,r6 | ||
58 | lwz r4,_MSR-STACK_FRAME_OVERHEAD(r5) | ||
59 | li r10,MSR_FP|MSR_FE0|MSR_FE1 | ||
60 | andc r4,r4,r10 /* disable FP for previous task */ | ||
61 | stw r4,_MSR-STACK_FRAME_OVERHEAD(r5) | ||
62 | 1: | ||
63 | #endif /* CONFIG_SMP */ | ||
64 | /* enable use of FP after return */ | ||
65 | mfspr r5,SPRN_SPRG3 /* current task's THREAD (phys) */ | ||
66 | lwz r4,THREAD_FPEXC_MODE(r5) | ||
67 | ori r9,r9,MSR_FP /* enable FP for current */ | ||
68 | or r9,r9,r4 | ||
69 | lfd fr0,THREAD_FPSCR-4(r5) | ||
70 | mtfsf 0xff,fr0 | ||
71 | REST_32FPRS(0, r5) | ||
72 | #ifndef CONFIG_SMP | ||
73 | subi r4,r5,THREAD | ||
74 | sub r4,r4,r6 | ||
75 | stw r4,last_task_used_math@l(r3) | ||
76 | #endif /* CONFIG_SMP */ | ||
77 | /* restore registers and return */ | ||
78 | /* we haven't used ctr or xer or lr */ | ||
79 | b fast_exception_return | ||
80 | |||
81 | /* | ||
82 | * FP unavailable trap from kernel - print a message, but let | ||
83 | * the task use FP in the kernel until it returns to user mode. | ||
84 | */ | ||
85 | .globl KernelFP | ||
86 | KernelFP: | ||
87 | lwz r3,_MSR(r1) | ||
88 | ori r3,r3,MSR_FP | ||
89 | stw r3,_MSR(r1) /* enable use of FP after return */ | ||
90 | lis r3,86f@h | ||
91 | ori r3,r3,86f@l | ||
92 | mr r4,r2 /* current */ | ||
93 | lwz r5,_NIP(r1) | ||
94 | bl printk | ||
95 | b ret_from_except | ||
96 | 86: .string "floating point used in kernel (task=%p, pc=%x)\n" | ||
97 | .align 4,0 | ||
98 | |||
99 | /* | ||
100 | * giveup_fpu(tsk) | ||
101 | * Disable FP for the task given as the argument, | ||
102 | * and save the floating-point registers in its thread_struct. | ||
103 | * Enables the FPU for use in the kernel on return. | ||
104 | */ | ||
105 | .globl giveup_fpu | ||
106 | giveup_fpu: | ||
107 | mfmsr r5 | ||
108 | ori r5,r5,MSR_FP | ||
109 | SYNC_601 | ||
110 | ISYNC_601 | ||
111 | MTMSRD(r5) /* enable use of fpu now */ | ||
112 | SYNC_601 | ||
113 | isync | ||
114 | cmpwi 0,r3,0 | ||
115 | beqlr- /* if no previous owner, done */ | ||
116 | addi r3,r3,THREAD /* want THREAD of task */ | ||
117 | lwz r5,PT_REGS(r3) | ||
118 | cmpwi 0,r5,0 | ||
119 | SAVE_32FPRS(0, r3) | ||
120 | mffs fr0 | ||
121 | stfd fr0,THREAD_FPSCR-4(r3) | ||
122 | beq 1f | ||
123 | lwz r4,_MSR-STACK_FRAME_OVERHEAD(r5) | ||
124 | li r3,MSR_FP|MSR_FE0|MSR_FE1 | ||
125 | andc r4,r4,r3 /* disable FP for previous task */ | ||
126 | stw r4,_MSR-STACK_FRAME_OVERHEAD(r5) | ||
127 | 1: | ||
128 | #ifndef CONFIG_SMP | ||
129 | li r5,0 | ||
130 | lis r4,last_task_used_math@ha | ||
131 | stw r5,last_task_used_math@l(r4) | ||
132 | #endif /* CONFIG_SMP */ | ||
133 | blr | ||
diff --git a/arch/ppc/kernel/head.S b/arch/ppc/kernel/head.S index 8cdac7385e7f..2c3a1d34e3c7 100644 --- a/arch/ppc/kernel/head.S +++ b/arch/ppc/kernel/head.S | |||
@@ -349,12 +349,12 @@ i##n: \ | |||
349 | 349 | ||
350 | /* System reset */ | 350 | /* System reset */ |
351 | /* core99 pmac starts the seconary here by changing the vector, and | 351 | /* core99 pmac starts the seconary here by changing the vector, and |
352 | putting it back to what it was (UnknownException) when done. */ | 352 | putting it back to what it was (unknown_exception) when done. */ |
353 | #if defined(CONFIG_GEMINI) && defined(CONFIG_SMP) | 353 | #if defined(CONFIG_GEMINI) && defined(CONFIG_SMP) |
354 | . = 0x100 | 354 | . = 0x100 |
355 | b __secondary_start_gemini | 355 | b __secondary_start_gemini |
356 | #else | 356 | #else |
357 | EXCEPTION(0x100, Reset, UnknownException, EXC_XFER_STD) | 357 | EXCEPTION(0x100, Reset, unknown_exception, EXC_XFER_STD) |
358 | #endif | 358 | #endif |
359 | 359 | ||
360 | /* Machine check */ | 360 | /* Machine check */ |
@@ -389,7 +389,7 @@ i##n: \ | |||
389 | cmpwi cr1,r4,0 | 389 | cmpwi cr1,r4,0 |
390 | bne cr1,1f | 390 | bne cr1,1f |
391 | #endif | 391 | #endif |
392 | EXC_XFER_STD(0x200, MachineCheckException) | 392 | EXC_XFER_STD(0x200, machine_check_exception) |
393 | #ifdef CONFIG_PPC_CHRP | 393 | #ifdef CONFIG_PPC_CHRP |
394 | 1: b machine_check_in_rtas | 394 | 1: b machine_check_in_rtas |
395 | #endif | 395 | #endif |
@@ -456,10 +456,10 @@ Alignment: | |||
456 | mfspr r5,SPRN_DSISR | 456 | mfspr r5,SPRN_DSISR |
457 | stw r5,_DSISR(r11) | 457 | stw r5,_DSISR(r11) |
458 | addi r3,r1,STACK_FRAME_OVERHEAD | 458 | addi r3,r1,STACK_FRAME_OVERHEAD |
459 | EXC_XFER_EE(0x600, AlignmentException) | 459 | EXC_XFER_EE(0x600, alignment_exception) |
460 | 460 | ||
461 | /* Program check exception */ | 461 | /* Program check exception */ |
462 | EXCEPTION(0x700, ProgramCheck, ProgramCheckException, EXC_XFER_STD) | 462 | EXCEPTION(0x700, ProgramCheck, program_check_exception, EXC_XFER_STD) |
463 | 463 | ||
464 | /* Floating-point unavailable */ | 464 | /* Floating-point unavailable */ |
465 | . = 0x800 | 465 | . = 0x800 |
@@ -472,8 +472,8 @@ FPUnavailable: | |||
472 | /* Decrementer */ | 472 | /* Decrementer */ |
473 | EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE) | 473 | EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE) |
474 | 474 | ||
475 | EXCEPTION(0xa00, Trap_0a, UnknownException, EXC_XFER_EE) | 475 | EXCEPTION(0xa00, Trap_0a, unknown_exception, EXC_XFER_EE) |
476 | EXCEPTION(0xb00, Trap_0b, UnknownException, EXC_XFER_EE) | 476 | EXCEPTION(0xb00, Trap_0b, unknown_exception, EXC_XFER_EE) |
477 | 477 | ||
478 | /* System call */ | 478 | /* System call */ |
479 | . = 0xc00 | 479 | . = 0xc00 |
@@ -482,8 +482,8 @@ SystemCall: | |||
482 | EXC_XFER_EE_LITE(0xc00, DoSyscall) | 482 | EXC_XFER_EE_LITE(0xc00, DoSyscall) |
483 | 483 | ||
484 | /* Single step - not used on 601 */ | 484 | /* Single step - not used on 601 */ |
485 | EXCEPTION(0xd00, SingleStep, SingleStepException, EXC_XFER_STD) | 485 | EXCEPTION(0xd00, SingleStep, single_step_exception, EXC_XFER_STD) |
486 | EXCEPTION(0xe00, Trap_0e, UnknownException, EXC_XFER_EE) | 486 | EXCEPTION(0xe00, Trap_0e, unknown_exception, EXC_XFER_EE) |
487 | 487 | ||
488 | /* | 488 | /* |
489 | * The Altivec unavailable trap is at 0x0f20. Foo. | 489 | * The Altivec unavailable trap is at 0x0f20. Foo. |
@@ -502,7 +502,7 @@ SystemCall: | |||
502 | Trap_0f: | 502 | Trap_0f: |
503 | EXCEPTION_PROLOG | 503 | EXCEPTION_PROLOG |
504 | addi r3,r1,STACK_FRAME_OVERHEAD | 504 | addi r3,r1,STACK_FRAME_OVERHEAD |
505 | EXC_XFER_EE(0xf00, UnknownException) | 505 | EXC_XFER_EE(0xf00, unknown_exception) |
506 | 506 | ||
507 | /* | 507 | /* |
508 | * Handle TLB miss for instruction on 603/603e. | 508 | * Handle TLB miss for instruction on 603/603e. |
@@ -702,44 +702,44 @@ DataStoreTLBMiss: | |||
702 | rfi | 702 | rfi |
703 | 703 | ||
704 | #ifndef CONFIG_ALTIVEC | 704 | #ifndef CONFIG_ALTIVEC |
705 | #define AltivecAssistException UnknownException | 705 | #define altivec_assist_exception unknown_exception |
706 | #endif | 706 | #endif |
707 | 707 | ||
708 | EXCEPTION(0x1300, Trap_13, InstructionBreakpoint, EXC_XFER_EE) | 708 | EXCEPTION(0x1300, Trap_13, instruction_breakpoint_exception, EXC_XFER_EE) |
709 | EXCEPTION(0x1400, SMI, SMIException, EXC_XFER_EE) | 709 | EXCEPTION(0x1400, SMI, SMIException, EXC_XFER_EE) |
710 | EXCEPTION(0x1500, Trap_15, UnknownException, EXC_XFER_EE) | 710 | EXCEPTION(0x1500, Trap_15, unknown_exception, EXC_XFER_EE) |
711 | #ifdef CONFIG_POWER4 | 711 | #ifdef CONFIG_POWER4 |
712 | EXCEPTION(0x1600, Trap_16, UnknownException, EXC_XFER_EE) | 712 | EXCEPTION(0x1600, Trap_16, unknown_exception, EXC_XFER_EE) |
713 | EXCEPTION(0x1700, Trap_17, AltivecAssistException, EXC_XFER_EE) | 713 | EXCEPTION(0x1700, Trap_17, altivec_assist_exception, EXC_XFER_EE) |
714 | EXCEPTION(0x1800, Trap_18, TAUException, EXC_XFER_STD) | 714 | EXCEPTION(0x1800, Trap_18, TAUException, EXC_XFER_STD) |
715 | #else /* !CONFIG_POWER4 */ | 715 | #else /* !CONFIG_POWER4 */ |
716 | EXCEPTION(0x1600, Trap_16, AltivecAssistException, EXC_XFER_EE) | 716 | EXCEPTION(0x1600, Trap_16, altivec_assist_exception, EXC_XFER_EE) |
717 | EXCEPTION(0x1700, Trap_17, TAUException, EXC_XFER_STD) | 717 | EXCEPTION(0x1700, Trap_17, TAUException, EXC_XFER_STD) |
718 | EXCEPTION(0x1800, Trap_18, UnknownException, EXC_XFER_EE) | 718 | EXCEPTION(0x1800, Trap_18, unknown_exception, EXC_XFER_EE) |
719 | #endif /* CONFIG_POWER4 */ | 719 | #endif /* CONFIG_POWER4 */ |
720 | EXCEPTION(0x1900, Trap_19, UnknownException, EXC_XFER_EE) | 720 | EXCEPTION(0x1900, Trap_19, unknown_exception, EXC_XFER_EE) |
721 | EXCEPTION(0x1a00, Trap_1a, UnknownException, EXC_XFER_EE) | 721 | EXCEPTION(0x1a00, Trap_1a, unknown_exception, EXC_XFER_EE) |
722 | EXCEPTION(0x1b00, Trap_1b, UnknownException, EXC_XFER_EE) | 722 | EXCEPTION(0x1b00, Trap_1b, unknown_exception, EXC_XFER_EE) |
723 | EXCEPTION(0x1c00, Trap_1c, UnknownException, EXC_XFER_EE) | 723 | EXCEPTION(0x1c00, Trap_1c, unknown_exception, EXC_XFER_EE) |
724 | EXCEPTION(0x1d00, Trap_1d, UnknownException, EXC_XFER_EE) | 724 | EXCEPTION(0x1d00, Trap_1d, unknown_exception, EXC_XFER_EE) |
725 | EXCEPTION(0x1e00, Trap_1e, UnknownException, EXC_XFER_EE) | 725 | EXCEPTION(0x1e00, Trap_1e, unknown_exception, EXC_XFER_EE) |
726 | EXCEPTION(0x1f00, Trap_1f, UnknownException, EXC_XFER_EE) | 726 | EXCEPTION(0x1f00, Trap_1f, unknown_exception, EXC_XFER_EE) |
727 | EXCEPTION(0x2000, RunMode, RunModeException, EXC_XFER_EE) | 727 | EXCEPTION(0x2000, RunMode, RunModeException, EXC_XFER_EE) |
728 | EXCEPTION(0x2100, Trap_21, UnknownException, EXC_XFER_EE) | 728 | EXCEPTION(0x2100, Trap_21, unknown_exception, EXC_XFER_EE) |
729 | EXCEPTION(0x2200, Trap_22, UnknownException, EXC_XFER_EE) | 729 | EXCEPTION(0x2200, Trap_22, unknown_exception, EXC_XFER_EE) |
730 | EXCEPTION(0x2300, Trap_23, UnknownException, EXC_XFER_EE) | 730 | EXCEPTION(0x2300, Trap_23, unknown_exception, EXC_XFER_EE) |
731 | EXCEPTION(0x2400, Trap_24, UnknownException, EXC_XFER_EE) | 731 | EXCEPTION(0x2400, Trap_24, unknown_exception, EXC_XFER_EE) |
732 | EXCEPTION(0x2500, Trap_25, UnknownException, EXC_XFER_EE) | 732 | EXCEPTION(0x2500, Trap_25, unknown_exception, EXC_XFER_EE) |
733 | EXCEPTION(0x2600, Trap_26, UnknownException, EXC_XFER_EE) | 733 | EXCEPTION(0x2600, Trap_26, unknown_exception, EXC_XFER_EE) |
734 | EXCEPTION(0x2700, Trap_27, UnknownException, EXC_XFER_EE) | 734 | EXCEPTION(0x2700, Trap_27, unknown_exception, EXC_XFER_EE) |
735 | EXCEPTION(0x2800, Trap_28, UnknownException, EXC_XFER_EE) | 735 | EXCEPTION(0x2800, Trap_28, unknown_exception, EXC_XFER_EE) |
736 | EXCEPTION(0x2900, Trap_29, UnknownException, EXC_XFER_EE) | 736 | EXCEPTION(0x2900, Trap_29, unknown_exception, EXC_XFER_EE) |
737 | EXCEPTION(0x2a00, Trap_2a, UnknownException, EXC_XFER_EE) | 737 | EXCEPTION(0x2a00, Trap_2a, unknown_exception, EXC_XFER_EE) |
738 | EXCEPTION(0x2b00, Trap_2b, UnknownException, EXC_XFER_EE) | 738 | EXCEPTION(0x2b00, Trap_2b, unknown_exception, EXC_XFER_EE) |
739 | EXCEPTION(0x2c00, Trap_2c, UnknownException, EXC_XFER_EE) | 739 | EXCEPTION(0x2c00, Trap_2c, unknown_exception, EXC_XFER_EE) |
740 | EXCEPTION(0x2d00, Trap_2d, UnknownException, EXC_XFER_EE) | 740 | EXCEPTION(0x2d00, Trap_2d, unknown_exception, EXC_XFER_EE) |
741 | EXCEPTION(0x2e00, Trap_2e, UnknownException, EXC_XFER_EE) | 741 | EXCEPTION(0x2e00, Trap_2e, unknown_exception, EXC_XFER_EE) |
742 | EXCEPTION(0x2f00, MOLTrampoline, UnknownException, EXC_XFER_EE_LITE) | 742 | EXCEPTION(0x2f00, MOLTrampoline, unknown_exception, EXC_XFER_EE_LITE) |
743 | 743 | ||
744 | .globl mol_trampoline | 744 | .globl mol_trampoline |
745 | .set mol_trampoline, i0x2f00 | 745 | .set mol_trampoline, i0x2f00 |
@@ -751,7 +751,7 @@ AltiVecUnavailable: | |||
751 | #ifdef CONFIG_ALTIVEC | 751 | #ifdef CONFIG_ALTIVEC |
752 | bne load_up_altivec /* if from user, just load it up */ | 752 | bne load_up_altivec /* if from user, just load it up */ |
753 | #endif /* CONFIG_ALTIVEC */ | 753 | #endif /* CONFIG_ALTIVEC */ |
754 | EXC_XFER_EE_LITE(0xf20, AltivecUnavailException) | 754 | EXC_XFER_EE_LITE(0xf20, altivec_unavailable_exception) |
755 | 755 | ||
756 | #ifdef CONFIG_PPC64BRIDGE | 756 | #ifdef CONFIG_PPC64BRIDGE |
757 | DataAccess: | 757 | DataAccess: |
@@ -767,12 +767,12 @@ DataSegment: | |||
767 | addi r3,r1,STACK_FRAME_OVERHEAD | 767 | addi r3,r1,STACK_FRAME_OVERHEAD |
768 | mfspr r4,SPRN_DAR | 768 | mfspr r4,SPRN_DAR |
769 | stw r4,_DAR(r11) | 769 | stw r4,_DAR(r11) |
770 | EXC_XFER_STD(0x380, UnknownException) | 770 | EXC_XFER_STD(0x380, unknown_exception) |
771 | 771 | ||
772 | InstructionSegment: | 772 | InstructionSegment: |
773 | EXCEPTION_PROLOG | 773 | EXCEPTION_PROLOG |
774 | addi r3,r1,STACK_FRAME_OVERHEAD | 774 | addi r3,r1,STACK_FRAME_OVERHEAD |
775 | EXC_XFER_STD(0x480, UnknownException) | 775 | EXC_XFER_STD(0x480, unknown_exception) |
776 | #endif /* CONFIG_PPC64BRIDGE */ | 776 | #endif /* CONFIG_PPC64BRIDGE */ |
777 | 777 | ||
778 | #ifdef CONFIG_ALTIVEC | 778 | #ifdef CONFIG_ALTIVEC |
diff --git a/arch/ppc/kernel/head_44x.S b/arch/ppc/kernel/head_44x.S index 599245b0407e..b1b9dc08abca 100644 --- a/arch/ppc/kernel/head_44x.S +++ b/arch/ppc/kernel/head_44x.S | |||
@@ -309,13 +309,13 @@ skpinv: addi r4,r4,1 /* Increment */ | |||
309 | 309 | ||
310 | interrupt_base: | 310 | interrupt_base: |
311 | /* Critical Input Interrupt */ | 311 | /* Critical Input Interrupt */ |
312 | CRITICAL_EXCEPTION(0x0100, CriticalInput, UnknownException) | 312 | CRITICAL_EXCEPTION(0x0100, CriticalInput, unknown_exception) |
313 | 313 | ||
314 | /* Machine Check Interrupt */ | 314 | /* Machine Check Interrupt */ |
315 | #ifdef CONFIG_440A | 315 | #ifdef CONFIG_440A |
316 | MCHECK_EXCEPTION(0x0200, MachineCheck, MachineCheckException) | 316 | MCHECK_EXCEPTION(0x0200, MachineCheck, machine_check_exception) |
317 | #else | 317 | #else |
318 | CRITICAL_EXCEPTION(0x0200, MachineCheck, MachineCheckException) | 318 | CRITICAL_EXCEPTION(0x0200, MachineCheck, machine_check_exception) |
319 | #endif | 319 | #endif |
320 | 320 | ||
321 | /* Data Storage Interrupt */ | 321 | /* Data Storage Interrupt */ |
@@ -442,7 +442,7 @@ interrupt_base: | |||
442 | #ifdef CONFIG_PPC_FPU | 442 | #ifdef CONFIG_PPC_FPU |
443 | FP_UNAVAILABLE_EXCEPTION | 443 | FP_UNAVAILABLE_EXCEPTION |
444 | #else | 444 | #else |
445 | EXCEPTION(0x2010, FloatingPointUnavailable, UnknownException, EXC_XFER_EE) | 445 | EXCEPTION(0x2010, FloatingPointUnavailable, unknown_exception, EXC_XFER_EE) |
446 | #endif | 446 | #endif |
447 | 447 | ||
448 | /* System Call Interrupt */ | 448 | /* System Call Interrupt */ |
@@ -451,21 +451,21 @@ interrupt_base: | |||
451 | EXC_XFER_EE_LITE(0x0c00, DoSyscall) | 451 | EXC_XFER_EE_LITE(0x0c00, DoSyscall) |
452 | 452 | ||
453 | /* Auxillary Processor Unavailable Interrupt */ | 453 | /* Auxillary Processor Unavailable Interrupt */ |
454 | EXCEPTION(0x2020, AuxillaryProcessorUnavailable, UnknownException, EXC_XFER_EE) | 454 | EXCEPTION(0x2020, AuxillaryProcessorUnavailable, unknown_exception, EXC_XFER_EE) |
455 | 455 | ||
456 | /* Decrementer Interrupt */ | 456 | /* Decrementer Interrupt */ |
457 | DECREMENTER_EXCEPTION | 457 | DECREMENTER_EXCEPTION |
458 | 458 | ||
459 | /* Fixed Internal Timer Interrupt */ | 459 | /* Fixed Internal Timer Interrupt */ |
460 | /* TODO: Add FIT support */ | 460 | /* TODO: Add FIT support */ |
461 | EXCEPTION(0x1010, FixedIntervalTimer, UnknownException, EXC_XFER_EE) | 461 | EXCEPTION(0x1010, FixedIntervalTimer, unknown_exception, EXC_XFER_EE) |
462 | 462 | ||
463 | /* Watchdog Timer Interrupt */ | 463 | /* Watchdog Timer Interrupt */ |
464 | /* TODO: Add watchdog support */ | 464 | /* TODO: Add watchdog support */ |
465 | #ifdef CONFIG_BOOKE_WDT | 465 | #ifdef CONFIG_BOOKE_WDT |
466 | CRITICAL_EXCEPTION(0x1020, WatchdogTimer, WatchdogException) | 466 | CRITICAL_EXCEPTION(0x1020, WatchdogTimer, WatchdogException) |
467 | #else | 467 | #else |
468 | CRITICAL_EXCEPTION(0x1020, WatchdogTimer, UnknownException) | 468 | CRITICAL_EXCEPTION(0x1020, WatchdogTimer, unknown_exception) |
469 | #endif | 469 | #endif |
470 | 470 | ||
471 | /* Data TLB Error Interrupt */ | 471 | /* Data TLB Error Interrupt */ |
diff --git a/arch/ppc/kernel/head_4xx.S b/arch/ppc/kernel/head_4xx.S index 8562b807b37c..5772ce97e24e 100644 --- a/arch/ppc/kernel/head_4xx.S +++ b/arch/ppc/kernel/head_4xx.S | |||
@@ -245,12 +245,12 @@ label: | |||
245 | /* | 245 | /* |
246 | * 0x0100 - Critical Interrupt Exception | 246 | * 0x0100 - Critical Interrupt Exception |
247 | */ | 247 | */ |
248 | CRITICAL_EXCEPTION(0x0100, CriticalInterrupt, UnknownException) | 248 | CRITICAL_EXCEPTION(0x0100, CriticalInterrupt, unknown_exception) |
249 | 249 | ||
250 | /* | 250 | /* |
251 | * 0x0200 - Machine Check Exception | 251 | * 0x0200 - Machine Check Exception |
252 | */ | 252 | */ |
253 | CRITICAL_EXCEPTION(0x0200, MachineCheck, MachineCheckException) | 253 | CRITICAL_EXCEPTION(0x0200, MachineCheck, machine_check_exception) |
254 | 254 | ||
255 | /* | 255 | /* |
256 | * 0x0300 - Data Storage Exception | 256 | * 0x0300 - Data Storage Exception |
@@ -405,7 +405,7 @@ label: | |||
405 | mfspr r4,SPRN_DEAR /* Grab the DEAR and save it */ | 405 | mfspr r4,SPRN_DEAR /* Grab the DEAR and save it */ |
406 | stw r4,_DEAR(r11) | 406 | stw r4,_DEAR(r11) |
407 | addi r3,r1,STACK_FRAME_OVERHEAD | 407 | addi r3,r1,STACK_FRAME_OVERHEAD |
408 | EXC_XFER_EE(0x600, AlignmentException) | 408 | EXC_XFER_EE(0x600, alignment_exception) |
409 | 409 | ||
410 | /* 0x0700 - Program Exception */ | 410 | /* 0x0700 - Program Exception */ |
411 | START_EXCEPTION(0x0700, ProgramCheck) | 411 | START_EXCEPTION(0x0700, ProgramCheck) |
@@ -413,21 +413,21 @@ label: | |||
413 | mfspr r4,SPRN_ESR /* Grab the ESR and save it */ | 413 | mfspr r4,SPRN_ESR /* Grab the ESR and save it */ |
414 | stw r4,_ESR(r11) | 414 | stw r4,_ESR(r11) |
415 | addi r3,r1,STACK_FRAME_OVERHEAD | 415 | addi r3,r1,STACK_FRAME_OVERHEAD |
416 | EXC_XFER_STD(0x700, ProgramCheckException) | 416 | EXC_XFER_STD(0x700, program_check_exception) |
417 | 417 | ||
418 | EXCEPTION(0x0800, Trap_08, UnknownException, EXC_XFER_EE) | 418 | EXCEPTION(0x0800, Trap_08, unknown_exception, EXC_XFER_EE) |
419 | EXCEPTION(0x0900, Trap_09, UnknownException, EXC_XFER_EE) | 419 | EXCEPTION(0x0900, Trap_09, unknown_exception, EXC_XFER_EE) |
420 | EXCEPTION(0x0A00, Trap_0A, UnknownException, EXC_XFER_EE) | 420 | EXCEPTION(0x0A00, Trap_0A, unknown_exception, EXC_XFER_EE) |
421 | EXCEPTION(0x0B00, Trap_0B, UnknownException, EXC_XFER_EE) | 421 | EXCEPTION(0x0B00, Trap_0B, unknown_exception, EXC_XFER_EE) |
422 | 422 | ||
423 | /* 0x0C00 - System Call Exception */ | 423 | /* 0x0C00 - System Call Exception */ |
424 | START_EXCEPTION(0x0C00, SystemCall) | 424 | START_EXCEPTION(0x0C00, SystemCall) |
425 | NORMAL_EXCEPTION_PROLOG | 425 | NORMAL_EXCEPTION_PROLOG |
426 | EXC_XFER_EE_LITE(0xc00, DoSyscall) | 426 | EXC_XFER_EE_LITE(0xc00, DoSyscall) |
427 | 427 | ||
428 | EXCEPTION(0x0D00, Trap_0D, UnknownException, EXC_XFER_EE) | 428 | EXCEPTION(0x0D00, Trap_0D, unknown_exception, EXC_XFER_EE) |
429 | EXCEPTION(0x0E00, Trap_0E, UnknownException, EXC_XFER_EE) | 429 | EXCEPTION(0x0E00, Trap_0E, unknown_exception, EXC_XFER_EE) |
430 | EXCEPTION(0x0F00, Trap_0F, UnknownException, EXC_XFER_EE) | 430 | EXCEPTION(0x0F00, Trap_0F, unknown_exception, EXC_XFER_EE) |
431 | 431 | ||
432 | /* 0x1000 - Programmable Interval Timer (PIT) Exception */ | 432 | /* 0x1000 - Programmable Interval Timer (PIT) Exception */ |
433 | START_EXCEPTION(0x1000, Decrementer) | 433 | START_EXCEPTION(0x1000, Decrementer) |
@@ -444,14 +444,14 @@ label: | |||
444 | 444 | ||
445 | /* 0x1010 - Fixed Interval Timer (FIT) Exception | 445 | /* 0x1010 - Fixed Interval Timer (FIT) Exception |
446 | */ | 446 | */ |
447 | STND_EXCEPTION(0x1010, FITException, UnknownException) | 447 | STND_EXCEPTION(0x1010, FITException, unknown_exception) |
448 | 448 | ||
449 | /* 0x1020 - Watchdog Timer (WDT) Exception | 449 | /* 0x1020 - Watchdog Timer (WDT) Exception |
450 | */ | 450 | */ |
451 | #ifdef CONFIG_BOOKE_WDT | 451 | #ifdef CONFIG_BOOKE_WDT |
452 | CRITICAL_EXCEPTION(0x1020, WDTException, WatchdogException) | 452 | CRITICAL_EXCEPTION(0x1020, WDTException, WatchdogException) |
453 | #else | 453 | #else |
454 | CRITICAL_EXCEPTION(0x1020, WDTException, UnknownException) | 454 | CRITICAL_EXCEPTION(0x1020, WDTException, unknown_exception) |
455 | #endif | 455 | #endif |
456 | #endif | 456 | #endif |
457 | 457 | ||
@@ -656,25 +656,25 @@ label: | |||
656 | mfspr r10, SPRN_SPRG0 | 656 | mfspr r10, SPRN_SPRG0 |
657 | b InstructionAccess | 657 | b InstructionAccess |
658 | 658 | ||
659 | EXCEPTION(0x1300, Trap_13, UnknownException, EXC_XFER_EE) | 659 | EXCEPTION(0x1300, Trap_13, unknown_exception, EXC_XFER_EE) |
660 | EXCEPTION(0x1400, Trap_14, UnknownException, EXC_XFER_EE) | 660 | EXCEPTION(0x1400, Trap_14, unknown_exception, EXC_XFER_EE) |
661 | EXCEPTION(0x1500, Trap_15, UnknownException, EXC_XFER_EE) | 661 | EXCEPTION(0x1500, Trap_15, unknown_exception, EXC_XFER_EE) |
662 | EXCEPTION(0x1600, Trap_16, UnknownException, EXC_XFER_EE) | 662 | EXCEPTION(0x1600, Trap_16, unknown_exception, EXC_XFER_EE) |
663 | #ifdef CONFIG_IBM405_ERR51 | 663 | #ifdef CONFIG_IBM405_ERR51 |
664 | /* 405GP errata 51 */ | 664 | /* 405GP errata 51 */ |
665 | START_EXCEPTION(0x1700, Trap_17) | 665 | START_EXCEPTION(0x1700, Trap_17) |
666 | b DTLBMiss | 666 | b DTLBMiss |
667 | #else | 667 | #else |
668 | EXCEPTION(0x1700, Trap_17, UnknownException, EXC_XFER_EE) | 668 | EXCEPTION(0x1700, Trap_17, unknown_exception, EXC_XFER_EE) |
669 | #endif | 669 | #endif |
670 | EXCEPTION(0x1800, Trap_18, UnknownException, EXC_XFER_EE) | 670 | EXCEPTION(0x1800, Trap_18, unknown_exception, EXC_XFER_EE) |
671 | EXCEPTION(0x1900, Trap_19, UnknownException, EXC_XFER_EE) | 671 | EXCEPTION(0x1900, Trap_19, unknown_exception, EXC_XFER_EE) |
672 | EXCEPTION(0x1A00, Trap_1A, UnknownException, EXC_XFER_EE) | 672 | EXCEPTION(0x1A00, Trap_1A, unknown_exception, EXC_XFER_EE) |
673 | EXCEPTION(0x1B00, Trap_1B, UnknownException, EXC_XFER_EE) | 673 | EXCEPTION(0x1B00, Trap_1B, unknown_exception, EXC_XFER_EE) |
674 | EXCEPTION(0x1C00, Trap_1C, UnknownException, EXC_XFER_EE) | 674 | EXCEPTION(0x1C00, Trap_1C, unknown_exception, EXC_XFER_EE) |
675 | EXCEPTION(0x1D00, Trap_1D, UnknownException, EXC_XFER_EE) | 675 | EXCEPTION(0x1D00, Trap_1D, unknown_exception, EXC_XFER_EE) |
676 | EXCEPTION(0x1E00, Trap_1E, UnknownException, EXC_XFER_EE) | 676 | EXCEPTION(0x1E00, Trap_1E, unknown_exception, EXC_XFER_EE) |
677 | EXCEPTION(0x1F00, Trap_1F, UnknownException, EXC_XFER_EE) | 677 | EXCEPTION(0x1F00, Trap_1F, unknown_exception, EXC_XFER_EE) |
678 | 678 | ||
679 | /* Check for a single step debug exception while in an exception | 679 | /* Check for a single step debug exception while in an exception |
680 | * handler before state has been saved. This is to catch the case | 680 | * handler before state has been saved. This is to catch the case |
diff --git a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S index cb1a3a54a026..de0978742221 100644 --- a/arch/ppc/kernel/head_8xx.S +++ b/arch/ppc/kernel/head_8xx.S | |||
@@ -203,7 +203,7 @@ i##n: \ | |||
203 | ret_from_except) | 203 | ret_from_except) |
204 | 204 | ||
205 | /* System reset */ | 205 | /* System reset */ |
206 | EXCEPTION(0x100, Reset, UnknownException, EXC_XFER_STD) | 206 | EXCEPTION(0x100, Reset, unknown_exception, EXC_XFER_STD) |
207 | 207 | ||
208 | /* Machine check */ | 208 | /* Machine check */ |
209 | . = 0x200 | 209 | . = 0x200 |
@@ -214,7 +214,7 @@ MachineCheck: | |||
214 | mfspr r5,SPRN_DSISR | 214 | mfspr r5,SPRN_DSISR |
215 | stw r5,_DSISR(r11) | 215 | stw r5,_DSISR(r11) |
216 | addi r3,r1,STACK_FRAME_OVERHEAD | 216 | addi r3,r1,STACK_FRAME_OVERHEAD |
217 | EXC_XFER_STD(0x200, MachineCheckException) | 217 | EXC_XFER_STD(0x200, machine_check_exception) |
218 | 218 | ||
219 | /* Data access exception. | 219 | /* Data access exception. |
220 | * This is "never generated" by the MPC8xx. We jump to it for other | 220 | * This is "never generated" by the MPC8xx. We jump to it for other |
@@ -252,20 +252,20 @@ Alignment: | |||
252 | mfspr r5,SPRN_DSISR | 252 | mfspr r5,SPRN_DSISR |
253 | stw r5,_DSISR(r11) | 253 | stw r5,_DSISR(r11) |
254 | addi r3,r1,STACK_FRAME_OVERHEAD | 254 | addi r3,r1,STACK_FRAME_OVERHEAD |
255 | EXC_XFER_EE(0x600, AlignmentException) | 255 | EXC_XFER_EE(0x600, alignment_exception) |
256 | 256 | ||
257 | /* Program check exception */ | 257 | /* Program check exception */ |
258 | EXCEPTION(0x700, ProgramCheck, ProgramCheckException, EXC_XFER_STD) | 258 | EXCEPTION(0x700, ProgramCheck, program_check_exception, EXC_XFER_STD) |
259 | 259 | ||
260 | /* No FPU on MPC8xx. This exception is not supposed to happen. | 260 | /* No FPU on MPC8xx. This exception is not supposed to happen. |
261 | */ | 261 | */ |
262 | EXCEPTION(0x800, FPUnavailable, UnknownException, EXC_XFER_STD) | 262 | EXCEPTION(0x800, FPUnavailable, unknown_exception, EXC_XFER_STD) |
263 | 263 | ||
264 | /* Decrementer */ | 264 | /* Decrementer */ |
265 | EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE) | 265 | EXCEPTION(0x900, Decrementer, timer_interrupt, EXC_XFER_LITE) |
266 | 266 | ||
267 | EXCEPTION(0xa00, Trap_0a, UnknownException, EXC_XFER_EE) | 267 | EXCEPTION(0xa00, Trap_0a, unknown_exception, EXC_XFER_EE) |
268 | EXCEPTION(0xb00, Trap_0b, UnknownException, EXC_XFER_EE) | 268 | EXCEPTION(0xb00, Trap_0b, unknown_exception, EXC_XFER_EE) |
269 | 269 | ||
270 | /* System call */ | 270 | /* System call */ |
271 | . = 0xc00 | 271 | . = 0xc00 |
@@ -274,9 +274,9 @@ SystemCall: | |||
274 | EXC_XFER_EE_LITE(0xc00, DoSyscall) | 274 | EXC_XFER_EE_LITE(0xc00, DoSyscall) |
275 | 275 | ||
276 | /* Single step - not used on 601 */ | 276 | /* Single step - not used on 601 */ |
277 | EXCEPTION(0xd00, SingleStep, SingleStepException, EXC_XFER_STD) | 277 | EXCEPTION(0xd00, SingleStep, single_step_exception, EXC_XFER_STD) |
278 | EXCEPTION(0xe00, Trap_0e, UnknownException, EXC_XFER_EE) | 278 | EXCEPTION(0xe00, Trap_0e, unknown_exception, EXC_XFER_EE) |
279 | EXCEPTION(0xf00, Trap_0f, UnknownException, EXC_XFER_EE) | 279 | EXCEPTION(0xf00, Trap_0f, unknown_exception, EXC_XFER_EE) |
280 | 280 | ||
281 | /* On the MPC8xx, this is a software emulation interrupt. It occurs | 281 | /* On the MPC8xx, this is a software emulation interrupt. It occurs |
282 | * for all unimplemented and illegal instructions. | 282 | * for all unimplemented and illegal instructions. |
@@ -540,22 +540,22 @@ DataTLBError: | |||
540 | #endif | 540 | #endif |
541 | b DataAccess | 541 | b DataAccess |
542 | 542 | ||
543 | EXCEPTION(0x1500, Trap_15, UnknownException, EXC_XFER_EE) | 543 | EXCEPTION(0x1500, Trap_15, unknown_exception, EXC_XFER_EE) |
544 | EXCEPTION(0x1600, Trap_16, UnknownException, EXC_XFER_EE) | 544 | EXCEPTION(0x1600, Trap_16, unknown_exception, EXC_XFER_EE) |
545 | EXCEPTION(0x1700, Trap_17, UnknownException, EXC_XFER_EE) | 545 | EXCEPTION(0x1700, Trap_17, unknown_exception, EXC_XFER_EE) |
546 | EXCEPTION(0x1800, Trap_18, UnknownException, EXC_XFER_EE) | 546 | EXCEPTION(0x1800, Trap_18, unknown_exception, EXC_XFER_EE) |
547 | EXCEPTION(0x1900, Trap_19, UnknownException, EXC_XFER_EE) | 547 | EXCEPTION(0x1900, Trap_19, unknown_exception, EXC_XFER_EE) |
548 | EXCEPTION(0x1a00, Trap_1a, UnknownException, EXC_XFER_EE) | 548 | EXCEPTION(0x1a00, Trap_1a, unknown_exception, EXC_XFER_EE) |
549 | EXCEPTION(0x1b00, Trap_1b, UnknownException, EXC_XFER_EE) | 549 | EXCEPTION(0x1b00, Trap_1b, unknown_exception, EXC_XFER_EE) |
550 | 550 | ||
551 | /* On the MPC8xx, these next four traps are used for development | 551 | /* On the MPC8xx, these next four traps are used for development |
552 | * support of breakpoints and such. Someday I will get around to | 552 | * support of breakpoints and such. Someday I will get around to |
553 | * using them. | 553 | * using them. |
554 | */ | 554 | */ |
555 | EXCEPTION(0x1c00, Trap_1c, UnknownException, EXC_XFER_EE) | 555 | EXCEPTION(0x1c00, Trap_1c, unknown_exception, EXC_XFER_EE) |
556 | EXCEPTION(0x1d00, Trap_1d, UnknownException, EXC_XFER_EE) | 556 | EXCEPTION(0x1d00, Trap_1d, unknown_exception, EXC_XFER_EE) |
557 | EXCEPTION(0x1e00, Trap_1e, UnknownException, EXC_XFER_EE) | 557 | EXCEPTION(0x1e00, Trap_1e, unknown_exception, EXC_XFER_EE) |
558 | EXCEPTION(0x1f00, Trap_1f, UnknownException, EXC_XFER_EE) | 558 | EXCEPTION(0x1f00, Trap_1f, unknown_exception, EXC_XFER_EE) |
559 | 559 | ||
560 | . = 0x2000 | 560 | . = 0x2000 |
561 | 561 | ||
diff --git a/arch/ppc/kernel/head_booke.h b/arch/ppc/kernel/head_booke.h index 9342acf12e72..aeb349b47af3 100644 --- a/arch/ppc/kernel/head_booke.h +++ b/arch/ppc/kernel/head_booke.h | |||
@@ -335,7 +335,7 @@ label: | |||
335 | mfspr r4,SPRN_DEAR; /* Grab the DEAR and save it */ \ | 335 | mfspr r4,SPRN_DEAR; /* Grab the DEAR and save it */ \ |
336 | stw r4,_DEAR(r11); \ | 336 | stw r4,_DEAR(r11); \ |
337 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | 337 | addi r3,r1,STACK_FRAME_OVERHEAD; \ |
338 | EXC_XFER_EE(0x0600, AlignmentException) | 338 | EXC_XFER_EE(0x0600, alignment_exception) |
339 | 339 | ||
340 | #define PROGRAM_EXCEPTION \ | 340 | #define PROGRAM_EXCEPTION \ |
341 | START_EXCEPTION(Program) \ | 341 | START_EXCEPTION(Program) \ |
@@ -343,7 +343,7 @@ label: | |||
343 | mfspr r4,SPRN_ESR; /* Grab the ESR and save it */ \ | 343 | mfspr r4,SPRN_ESR; /* Grab the ESR and save it */ \ |
344 | stw r4,_ESR(r11); \ | 344 | stw r4,_ESR(r11); \ |
345 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | 345 | addi r3,r1,STACK_FRAME_OVERHEAD; \ |
346 | EXC_XFER_STD(0x0700, ProgramCheckException) | 346 | EXC_XFER_STD(0x0700, program_check_exception) |
347 | 347 | ||
348 | #define DECREMENTER_EXCEPTION \ | 348 | #define DECREMENTER_EXCEPTION \ |
349 | START_EXCEPTION(Decrementer) \ | 349 | START_EXCEPTION(Decrementer) \ |
diff --git a/arch/ppc/kernel/head_fsl_booke.S b/arch/ppc/kernel/head_fsl_booke.S index eba5a5f8ff08..53949811efda 100644 --- a/arch/ppc/kernel/head_fsl_booke.S +++ b/arch/ppc/kernel/head_fsl_booke.S | |||
@@ -426,14 +426,14 @@ skpinv: addi r6,r6,1 /* Increment */ | |||
426 | 426 | ||
427 | interrupt_base: | 427 | interrupt_base: |
428 | /* Critical Input Interrupt */ | 428 | /* Critical Input Interrupt */ |
429 | CRITICAL_EXCEPTION(0x0100, CriticalInput, UnknownException) | 429 | CRITICAL_EXCEPTION(0x0100, CriticalInput, unknown_exception) |
430 | 430 | ||
431 | /* Machine Check Interrupt */ | 431 | /* Machine Check Interrupt */ |
432 | #ifdef CONFIG_E200 | 432 | #ifdef CONFIG_E200 |
433 | /* no RFMCI, MCSRRs on E200 */ | 433 | /* no RFMCI, MCSRRs on E200 */ |
434 | CRITICAL_EXCEPTION(0x0200, MachineCheck, MachineCheckException) | 434 | CRITICAL_EXCEPTION(0x0200, MachineCheck, machine_check_exception) |
435 | #else | 435 | #else |
436 | MCHECK_EXCEPTION(0x0200, MachineCheck, MachineCheckException) | 436 | MCHECK_EXCEPTION(0x0200, MachineCheck, machine_check_exception) |
437 | #endif | 437 | #endif |
438 | 438 | ||
439 | /* Data Storage Interrupt */ | 439 | /* Data Storage Interrupt */ |
@@ -542,9 +542,9 @@ interrupt_base: | |||
542 | #else | 542 | #else |
543 | #ifdef CONFIG_E200 | 543 | #ifdef CONFIG_E200 |
544 | /* E200 treats 'normal' floating point instructions as FP Unavail exception */ | 544 | /* E200 treats 'normal' floating point instructions as FP Unavail exception */ |
545 | EXCEPTION(0x0800, FloatingPointUnavailable, ProgramCheckException, EXC_XFER_EE) | 545 | EXCEPTION(0x0800, FloatingPointUnavailable, program_check_exception, EXC_XFER_EE) |
546 | #else | 546 | #else |
547 | EXCEPTION(0x0800, FloatingPointUnavailable, UnknownException, EXC_XFER_EE) | 547 | EXCEPTION(0x0800, FloatingPointUnavailable, unknown_exception, EXC_XFER_EE) |
548 | #endif | 548 | #endif |
549 | #endif | 549 | #endif |
550 | 550 | ||
@@ -554,20 +554,20 @@ interrupt_base: | |||
554 | EXC_XFER_EE_LITE(0x0c00, DoSyscall) | 554 | EXC_XFER_EE_LITE(0x0c00, DoSyscall) |
555 | 555 | ||
556 | /* Auxillary Processor Unavailable Interrupt */ | 556 | /* Auxillary Processor Unavailable Interrupt */ |
557 | EXCEPTION(0x2900, AuxillaryProcessorUnavailable, UnknownException, EXC_XFER_EE) | 557 | EXCEPTION(0x2900, AuxillaryProcessorUnavailable, unknown_exception, EXC_XFER_EE) |
558 | 558 | ||
559 | /* Decrementer Interrupt */ | 559 | /* Decrementer Interrupt */ |
560 | DECREMENTER_EXCEPTION | 560 | DECREMENTER_EXCEPTION |
561 | 561 | ||
562 | /* Fixed Internal Timer Interrupt */ | 562 | /* Fixed Internal Timer Interrupt */ |
563 | /* TODO: Add FIT support */ | 563 | /* TODO: Add FIT support */ |
564 | EXCEPTION(0x3100, FixedIntervalTimer, UnknownException, EXC_XFER_EE) | 564 | EXCEPTION(0x3100, FixedIntervalTimer, unknown_exception, EXC_XFER_EE) |
565 | 565 | ||
566 | /* Watchdog Timer Interrupt */ | 566 | /* Watchdog Timer Interrupt */ |
567 | #ifdef CONFIG_BOOKE_WDT | 567 | #ifdef CONFIG_BOOKE_WDT |
568 | CRITICAL_EXCEPTION(0x3200, WatchdogTimer, WatchdogException) | 568 | CRITICAL_EXCEPTION(0x3200, WatchdogTimer, WatchdogException) |
569 | #else | 569 | #else |
570 | CRITICAL_EXCEPTION(0x3200, WatchdogTimer, UnknownException) | 570 | CRITICAL_EXCEPTION(0x3200, WatchdogTimer, unknown_exception) |
571 | #endif | 571 | #endif |
572 | 572 | ||
573 | /* Data TLB Error Interrupt */ | 573 | /* Data TLB Error Interrupt */ |
@@ -696,21 +696,21 @@ interrupt_base: | |||
696 | addi r3,r1,STACK_FRAME_OVERHEAD | 696 | addi r3,r1,STACK_FRAME_OVERHEAD |
697 | EXC_XFER_EE_LITE(0x2010, KernelSPE) | 697 | EXC_XFER_EE_LITE(0x2010, KernelSPE) |
698 | #else | 698 | #else |
699 | EXCEPTION(0x2020, SPEUnavailable, UnknownException, EXC_XFER_EE) | 699 | EXCEPTION(0x2020, SPEUnavailable, unknown_exception, EXC_XFER_EE) |
700 | #endif /* CONFIG_SPE */ | 700 | #endif /* CONFIG_SPE */ |
701 | 701 | ||
702 | /* SPE Floating Point Data */ | 702 | /* SPE Floating Point Data */ |
703 | #ifdef CONFIG_SPE | 703 | #ifdef CONFIG_SPE |
704 | EXCEPTION(0x2030, SPEFloatingPointData, SPEFloatingPointException, EXC_XFER_EE); | 704 | EXCEPTION(0x2030, SPEFloatingPointData, SPEFloatingPointException, EXC_XFER_EE); |
705 | #else | 705 | #else |
706 | EXCEPTION(0x2040, SPEFloatingPointData, UnknownException, EXC_XFER_EE) | 706 | EXCEPTION(0x2040, SPEFloatingPointData, unknown_exception, EXC_XFER_EE) |
707 | #endif /* CONFIG_SPE */ | 707 | #endif /* CONFIG_SPE */ |
708 | 708 | ||
709 | /* SPE Floating Point Round */ | 709 | /* SPE Floating Point Round */ |
710 | EXCEPTION(0x2050, SPEFloatingPointRound, UnknownException, EXC_XFER_EE) | 710 | EXCEPTION(0x2050, SPEFloatingPointRound, unknown_exception, EXC_XFER_EE) |
711 | 711 | ||
712 | /* Performance Monitor */ | 712 | /* Performance Monitor */ |
713 | EXCEPTION(0x2060, PerformanceMonitor, PerformanceMonitorException, EXC_XFER_STD) | 713 | EXCEPTION(0x2060, PerformanceMonitor, performance_monitor_exception, EXC_XFER_STD) |
714 | 714 | ||
715 | 715 | ||
716 | /* Debug Interrupt */ | 716 | /* Debug Interrupt */ |
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c index 1545621d44d2..7872c6c45732 100644 --- a/arch/ppc/kernel/ppc_ksyms.c +++ b/arch/ppc/kernel/ppc_ksyms.c | |||
@@ -53,10 +53,10 @@ | |||
53 | 53 | ||
54 | extern void transfer_to_handler(void); | 54 | extern void transfer_to_handler(void); |
55 | extern void do_IRQ(struct pt_regs *regs); | 55 | extern void do_IRQ(struct pt_regs *regs); |
56 | extern void MachineCheckException(struct pt_regs *regs); | 56 | extern void machine_check_exception(struct pt_regs *regs); |
57 | extern void AlignmentException(struct pt_regs *regs); | 57 | extern void alignment_exception(struct pt_regs *regs); |
58 | extern void ProgramCheckException(struct pt_regs *regs); | 58 | extern void program_check_exception(struct pt_regs *regs); |
59 | extern void SingleStepException(struct pt_regs *regs); | 59 | extern void single_step_exception(struct pt_regs *regs); |
60 | extern int do_signal(sigset_t *, struct pt_regs *); | 60 | extern int do_signal(sigset_t *, struct pt_regs *); |
61 | extern int pmac_newworld; | 61 | extern int pmac_newworld; |
62 | extern int sys_sigreturn(struct pt_regs *regs); | 62 | extern int sys_sigreturn(struct pt_regs *regs); |
@@ -72,10 +72,10 @@ EXPORT_SYMBOL(clear_user_page); | |||
72 | EXPORT_SYMBOL(do_signal); | 72 | EXPORT_SYMBOL(do_signal); |
73 | EXPORT_SYMBOL(transfer_to_handler); | 73 | EXPORT_SYMBOL(transfer_to_handler); |
74 | EXPORT_SYMBOL(do_IRQ); | 74 | EXPORT_SYMBOL(do_IRQ); |
75 | EXPORT_SYMBOL(MachineCheckException); | 75 | EXPORT_SYMBOL(machine_check_exception); |
76 | EXPORT_SYMBOL(AlignmentException); | 76 | EXPORT_SYMBOL(alignment_exception); |
77 | EXPORT_SYMBOL(ProgramCheckException); | 77 | EXPORT_SYMBOL(program_check_exception); |
78 | EXPORT_SYMBOL(SingleStepException); | 78 | EXPORT_SYMBOL(single_step_exception); |
79 | EXPORT_SYMBOL(sys_sigreturn); | 79 | EXPORT_SYMBOL(sys_sigreturn); |
80 | EXPORT_SYMBOL(ppc_n_lost_interrupts); | 80 | EXPORT_SYMBOL(ppc_n_lost_interrupts); |
81 | EXPORT_SYMBOL(ppc_lost_interrupts); | 81 | EXPORT_SYMBOL(ppc_lost_interrupts); |
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index 82e4d70e6dbb..26606aa33de6 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -74,7 +74,7 @@ void (*debugger_fault_handler)(struct pt_regs *regs); | |||
74 | 74 | ||
75 | DEFINE_SPINLOCK(die_lock); | 75 | DEFINE_SPINLOCK(die_lock); |
76 | 76 | ||
77 | void die(const char * str, struct pt_regs * fp, long err) | 77 | int die(const char * str, struct pt_regs * fp, long err) |
78 | { | 78 | { |
79 | static int die_counter; | 79 | static int die_counter; |
80 | int nl = 0; | 80 | int nl = 0; |
@@ -232,7 +232,7 @@ platform_machine_check(struct pt_regs *regs) | |||
232 | { | 232 | { |
233 | } | 233 | } |
234 | 234 | ||
235 | void MachineCheckException(struct pt_regs *regs) | 235 | void machine_check_exception(struct pt_regs *regs) |
236 | { | 236 | { |
237 | unsigned long reason = get_mc_reason(regs); | 237 | unsigned long reason = get_mc_reason(regs); |
238 | 238 | ||
@@ -393,14 +393,14 @@ void SMIException(struct pt_regs *regs) | |||
393 | #endif | 393 | #endif |
394 | } | 394 | } |
395 | 395 | ||
396 | void UnknownException(struct pt_regs *regs) | 396 | void unknown_exception(struct pt_regs *regs) |
397 | { | 397 | { |
398 | printk("Bad trap at PC: %lx, MSR: %lx, vector=%lx %s\n", | 398 | printk("Bad trap at PC: %lx, MSR: %lx, vector=%lx %s\n", |
399 | regs->nip, regs->msr, regs->trap, print_tainted()); | 399 | regs->nip, regs->msr, regs->trap, print_tainted()); |
400 | _exception(SIGTRAP, regs, 0, 0); | 400 | _exception(SIGTRAP, regs, 0, 0); |
401 | } | 401 | } |
402 | 402 | ||
403 | void InstructionBreakpoint(struct pt_regs *regs) | 403 | void instruction_breakpoint_exception(struct pt_regs *regs) |
404 | { | 404 | { |
405 | if (debugger_iabr_match(regs)) | 405 | if (debugger_iabr_match(regs)) |
406 | return; | 406 | return; |
@@ -622,7 +622,7 @@ int check_bug_trap(struct pt_regs *regs) | |||
622 | return 0; | 622 | return 0; |
623 | } | 623 | } |
624 | 624 | ||
625 | void ProgramCheckException(struct pt_regs *regs) | 625 | void program_check_exception(struct pt_regs *regs) |
626 | { | 626 | { |
627 | unsigned int reason = get_reason(regs); | 627 | unsigned int reason = get_reason(regs); |
628 | extern int do_mathemu(struct pt_regs *regs); | 628 | extern int do_mathemu(struct pt_regs *regs); |
@@ -701,7 +701,7 @@ void ProgramCheckException(struct pt_regs *regs) | |||
701 | _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); | 701 | _exception(SIGILL, regs, ILL_ILLOPC, regs->nip); |
702 | } | 702 | } |
703 | 703 | ||
704 | void SingleStepException(struct pt_regs *regs) | 704 | void single_step_exception(struct pt_regs *regs) |
705 | { | 705 | { |
706 | regs->msr &= ~(MSR_SE | MSR_BE); /* Turn off 'trace' bits */ | 706 | regs->msr &= ~(MSR_SE | MSR_BE); /* Turn off 'trace' bits */ |
707 | if (debugger_sstep(regs)) | 707 | if (debugger_sstep(regs)) |
@@ -709,7 +709,7 @@ void SingleStepException(struct pt_regs *regs) | |||
709 | _exception(SIGTRAP, regs, TRAP_TRACE, 0); | 709 | _exception(SIGTRAP, regs, TRAP_TRACE, 0); |
710 | } | 710 | } |
711 | 711 | ||
712 | void AlignmentException(struct pt_regs *regs) | 712 | void alignment_exception(struct pt_regs *regs) |
713 | { | 713 | { |
714 | int fixed; | 714 | int fixed; |
715 | 715 | ||
@@ -814,7 +814,7 @@ void TAUException(struct pt_regs *regs) | |||
814 | } | 814 | } |
815 | #endif /* CONFIG_INT_TAU */ | 815 | #endif /* CONFIG_INT_TAU */ |
816 | 816 | ||
817 | void AltivecUnavailException(struct pt_regs *regs) | 817 | void altivec_unavailable_exception(struct pt_regs *regs) |
818 | { | 818 | { |
819 | static int kernel_altivec_count; | 819 | static int kernel_altivec_count; |
820 | 820 | ||
@@ -835,7 +835,7 @@ void AltivecUnavailException(struct pt_regs *regs) | |||
835 | } | 835 | } |
836 | 836 | ||
837 | #ifdef CONFIG_ALTIVEC | 837 | #ifdef CONFIG_ALTIVEC |
838 | void AltivecAssistException(struct pt_regs *regs) | 838 | void altivec_assist_exception(struct pt_regs *regs) |
839 | { | 839 | { |
840 | int err; | 840 | int err; |
841 | 841 | ||
@@ -872,7 +872,7 @@ void AltivecAssistException(struct pt_regs *regs) | |||
872 | #endif /* CONFIG_ALTIVEC */ | 872 | #endif /* CONFIG_ALTIVEC */ |
873 | 873 | ||
874 | #ifdef CONFIG_E500 | 874 | #ifdef CONFIG_E500 |
875 | void PerformanceMonitorException(struct pt_regs *regs) | 875 | void performance_monitor_exception(struct pt_regs *regs) |
876 | { | 876 | { |
877 | perf_irq(regs); | 877 | perf_irq(regs); |
878 | } | 878 | } |
diff --git a/arch/ppc/kernel/vector.S b/arch/ppc/kernel/vector.S deleted file mode 100644 index 82a21346bf80..000000000000 --- a/arch/ppc/kernel/vector.S +++ /dev/null | |||
@@ -1,217 +0,0 @@ | |||
1 | #include <asm/ppc_asm.h> | ||
2 | #include <asm/processor.h> | ||
3 | |||
4 | /* | ||
5 | * The routines below are in assembler so we can closely control the | ||
6 | * usage of floating-point registers. These routines must be called | ||
7 | * with preempt disabled. | ||
8 | */ | ||
9 | .data | ||
10 | fpzero: | ||
11 | .long 0 | ||
12 | fpone: | ||
13 | .long 0x3f800000 /* 1.0 in single-precision FP */ | ||
14 | fphalf: | ||
15 | .long 0x3f000000 /* 0.5 in single-precision FP */ | ||
16 | |||
17 | .text | ||
18 | /* | ||
19 | * Internal routine to enable floating point and set FPSCR to 0. | ||
20 | * Don't call it from C; it doesn't use the normal calling convention. | ||
21 | */ | ||
22 | fpenable: | ||
23 | mfmsr r10 | ||
24 | ori r11,r10,MSR_FP | ||
25 | mtmsr r11 | ||
26 | isync | ||
27 | stfd fr0,24(r1) | ||
28 | stfd fr1,16(r1) | ||
29 | stfd fr31,8(r1) | ||
30 | lis r11,fpzero@ha | ||
31 | mffs fr31 | ||
32 | lfs fr1,fpzero@l(r11) | ||
33 | mtfsf 0xff,fr1 | ||
34 | blr | ||
35 | |||
36 | fpdisable: | ||
37 | mtfsf 0xff,fr31 | ||
38 | lfd fr31,8(r1) | ||
39 | lfd fr1,16(r1) | ||
40 | lfd fr0,24(r1) | ||
41 | mtmsr r10 | ||
42 | isync | ||
43 | blr | ||
44 | |||
45 | /* | ||
46 | * Vector add, floating point. | ||
47 | */ | ||
48 | .globl vaddfp | ||
49 | vaddfp: | ||
50 | stwu r1,-32(r1) | ||
51 | mflr r0 | ||
52 | stw r0,36(r1) | ||
53 | bl fpenable | ||
54 | li r0,4 | ||
55 | mtctr r0 | ||
56 | li r6,0 | ||
57 | 1: lfsx fr0,r4,r6 | ||
58 | lfsx fr1,r5,r6 | ||
59 | fadds fr0,fr0,fr1 | ||
60 | stfsx fr0,r3,r6 | ||
61 | addi r6,r6,4 | ||
62 | bdnz 1b | ||
63 | bl fpdisable | ||
64 | lwz r0,36(r1) | ||
65 | mtlr r0 | ||
66 | addi r1,r1,32 | ||
67 | blr | ||
68 | |||
69 | /* | ||
70 | * Vector subtract, floating point. | ||
71 | */ | ||
72 | .globl vsubfp | ||
73 | vsubfp: | ||
74 | stwu r1,-32(r1) | ||
75 | mflr r0 | ||
76 | stw r0,36(r1) | ||
77 | bl fpenable | ||
78 | li r0,4 | ||
79 | mtctr r0 | ||
80 | li r6,0 | ||
81 | 1: lfsx fr0,r4,r6 | ||
82 | lfsx fr1,r5,r6 | ||
83 | fsubs fr0,fr0,fr1 | ||
84 | stfsx fr0,r3,r6 | ||
85 | addi r6,r6,4 | ||
86 | bdnz 1b | ||
87 | bl fpdisable | ||
88 | lwz r0,36(r1) | ||
89 | mtlr r0 | ||
90 | addi r1,r1,32 | ||
91 | blr | ||
92 | |||
93 | /* | ||
94 | * Vector multiply and add, floating point. | ||
95 | */ | ||
96 | .globl vmaddfp | ||
97 | vmaddfp: | ||
98 | stwu r1,-48(r1) | ||
99 | mflr r0 | ||
100 | stw r0,52(r1) | ||
101 | bl fpenable | ||
102 | stfd fr2,32(r1) | ||
103 | li r0,4 | ||
104 | mtctr r0 | ||
105 | li r7,0 | ||
106 | 1: lfsx fr0,r4,r7 | ||
107 | lfsx fr1,r5,r7 | ||
108 | lfsx fr2,r6,r7 | ||
109 | fmadds fr0,fr0,fr2,fr1 | ||
110 | stfsx fr0,r3,r7 | ||
111 | addi r7,r7,4 | ||
112 | bdnz 1b | ||
113 | lfd fr2,32(r1) | ||
114 | bl fpdisable | ||
115 | lwz r0,52(r1) | ||
116 | mtlr r0 | ||
117 | addi r1,r1,48 | ||
118 | blr | ||
119 | |||
120 | /* | ||
121 | * Vector negative multiply and subtract, floating point. | ||
122 | */ | ||
123 | .globl vnmsubfp | ||
124 | vnmsubfp: | ||
125 | stwu r1,-48(r1) | ||
126 | mflr r0 | ||
127 | stw r0,52(r1) | ||
128 | bl fpenable | ||
129 | stfd fr2,32(r1) | ||
130 | li r0,4 | ||
131 | mtctr r0 | ||
132 | li r7,0 | ||
133 | 1: lfsx fr0,r4,r7 | ||
134 | lfsx fr1,r5,r7 | ||
135 | lfsx fr2,r6,r7 | ||
136 | fnmsubs fr0,fr0,fr2,fr1 | ||
137 | stfsx fr0,r3,r7 | ||
138 | addi r7,r7,4 | ||
139 | bdnz 1b | ||
140 | lfd fr2,32(r1) | ||
141 | bl fpdisable | ||
142 | lwz r0,52(r1) | ||
143 | mtlr r0 | ||
144 | addi r1,r1,48 | ||
145 | blr | ||
146 | |||
147 | /* | ||
148 | * Vector reciprocal estimate. We just compute 1.0/x. | ||
149 | * r3 -> destination, r4 -> source. | ||
150 | */ | ||
151 | .globl vrefp | ||
152 | vrefp: | ||
153 | stwu r1,-32(r1) | ||
154 | mflr r0 | ||
155 | stw r0,36(r1) | ||
156 | bl fpenable | ||
157 | lis r9,fpone@ha | ||
158 | li r0,4 | ||
159 | lfs fr1,fpone@l(r9) | ||
160 | mtctr r0 | ||
161 | li r6,0 | ||
162 | 1: lfsx fr0,r4,r6 | ||
163 | fdivs fr0,fr1,fr0 | ||
164 | stfsx fr0,r3,r6 | ||
165 | addi r6,r6,4 | ||
166 | bdnz 1b | ||
167 | bl fpdisable | ||
168 | lwz r0,36(r1) | ||
169 | mtlr r0 | ||
170 | addi r1,r1,32 | ||
171 | blr | ||
172 | |||
173 | /* | ||
174 | * Vector reciprocal square-root estimate, floating point. | ||
175 | * We use the frsqrte instruction for the initial estimate followed | ||
176 | * by 2 iterations of Newton-Raphson to get sufficient accuracy. | ||
177 | * r3 -> destination, r4 -> source. | ||
178 | */ | ||
179 | .globl vrsqrtefp | ||
180 | vrsqrtefp: | ||
181 | stwu r1,-48(r1) | ||
182 | mflr r0 | ||
183 | stw r0,52(r1) | ||
184 | bl fpenable | ||
185 | stfd fr2,32(r1) | ||
186 | stfd fr3,40(r1) | ||
187 | stfd fr4,48(r1) | ||
188 | stfd fr5,56(r1) | ||
189 | lis r9,fpone@ha | ||
190 | lis r8,fphalf@ha | ||
191 | li r0,4 | ||
192 | lfs fr4,fpone@l(r9) | ||
193 | lfs fr5,fphalf@l(r8) | ||
194 | mtctr r0 | ||
195 | li r6,0 | ||
196 | 1: lfsx fr0,r4,r6 | ||
197 | frsqrte fr1,fr0 /* r = frsqrte(s) */ | ||
198 | fmuls fr3,fr1,fr0 /* r * s */ | ||
199 | fmuls fr2,fr1,fr5 /* r * 0.5 */ | ||
200 | fnmsubs fr3,fr1,fr3,fr4 /* 1 - s * r * r */ | ||
201 | fmadds fr1,fr2,fr3,fr1 /* r = r + 0.5 * r * (1 - s * r * r) */ | ||
202 | fmuls fr3,fr1,fr0 /* r * s */ | ||
203 | fmuls fr2,fr1,fr5 /* r * 0.5 */ | ||
204 | fnmsubs fr3,fr1,fr3,fr4 /* 1 - s * r * r */ | ||
205 | fmadds fr1,fr2,fr3,fr1 /* r = r + 0.5 * r * (1 - s * r * r) */ | ||
206 | stfsx fr1,r3,r6 | ||
207 | addi r6,r6,4 | ||
208 | bdnz 1b | ||
209 | lfd fr5,56(r1) | ||
210 | lfd fr4,48(r1) | ||
211 | lfd fr3,40(r1) | ||
212 | lfd fr2,32(r1) | ||
213 | bl fpdisable | ||
214 | lwz r0,36(r1) | ||
215 | mtlr r0 | ||
216 | addi r1,r1,32 | ||
217 | blr | ||