diff options
Diffstat (limited to 'arch/powerpc/kernel/exceptions-64s.S')
-rw-r--r-- | arch/powerpc/kernel/exceptions-64s.S | 206 |
1 files changed, 103 insertions, 103 deletions
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index 3afd3915921a..20f11eb4dff7 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S | |||
@@ -132,12 +132,12 @@ BEGIN_FTR_SECTION | |||
132 | #endif | 132 | #endif |
133 | 133 | ||
134 | beq cr1,2f | 134 | beq cr1,2f |
135 | b .power7_wakeup_noloss | 135 | b power7_wakeup_noloss |
136 | 2: b .power7_wakeup_loss | 136 | 2: b power7_wakeup_loss |
137 | 137 | ||
138 | /* Fast Sleep wakeup on PowerNV */ | 138 | /* Fast Sleep wakeup on PowerNV */ |
139 | 8: GET_PACA(r13) | 139 | 8: GET_PACA(r13) |
140 | b .power7_wakeup_tb_loss | 140 | b power7_wakeup_tb_loss |
141 | 141 | ||
142 | 9: | 142 | 9: |
143 | END_FTR_SECTION_IFSET(CPU_FTR_HVMODE | CPU_FTR_ARCH_206) | 143 | END_FTR_SECTION_IFSET(CPU_FTR_HVMODE | CPU_FTR_ARCH_206) |
@@ -211,16 +211,16 @@ data_access_slb_pSeries: | |||
211 | #endif /* __DISABLED__ */ | 211 | #endif /* __DISABLED__ */ |
212 | mfspr r12,SPRN_SRR1 | 212 | mfspr r12,SPRN_SRR1 |
213 | #ifndef CONFIG_RELOCATABLE | 213 | #ifndef CONFIG_RELOCATABLE |
214 | b .slb_miss_realmode | 214 | b slb_miss_realmode |
215 | #else | 215 | #else |
216 | /* | 216 | /* |
217 | * We can't just use a direct branch to .slb_miss_realmode | 217 | * We can't just use a direct branch to slb_miss_realmode |
218 | * because the distance from here to there depends on where | 218 | * because the distance from here to there depends on where |
219 | * the kernel ends up being put. | 219 | * the kernel ends up being put. |
220 | */ | 220 | */ |
221 | mfctr r11 | 221 | mfctr r11 |
222 | ld r10,PACAKBASE(r13) | 222 | ld r10,PACAKBASE(r13) |
223 | LOAD_HANDLER(r10, .slb_miss_realmode) | 223 | LOAD_HANDLER(r10, slb_miss_realmode) |
224 | mtctr r10 | 224 | mtctr r10 |
225 | bctr | 225 | bctr |
226 | #endif | 226 | #endif |
@@ -243,11 +243,11 @@ instruction_access_slb_pSeries: | |||
243 | #endif /* __DISABLED__ */ | 243 | #endif /* __DISABLED__ */ |
244 | mfspr r12,SPRN_SRR1 | 244 | mfspr r12,SPRN_SRR1 |
245 | #ifndef CONFIG_RELOCATABLE | 245 | #ifndef CONFIG_RELOCATABLE |
246 | b .slb_miss_realmode | 246 | b slb_miss_realmode |
247 | #else | 247 | #else |
248 | mfctr r11 | 248 | mfctr r11 |
249 | ld r10,PACAKBASE(r13) | 249 | ld r10,PACAKBASE(r13) |
250 | LOAD_HANDLER(r10, .slb_miss_realmode) | 250 | LOAD_HANDLER(r10, slb_miss_realmode) |
251 | mtctr r10 | 251 | mtctr r10 |
252 | bctr | 252 | bctr |
253 | #endif | 253 | #endif |
@@ -524,7 +524,7 @@ do_stab_bolted_pSeries: | |||
524 | std r12,PACA_EXSLB+EX_R12(r13) | 524 | std r12,PACA_EXSLB+EX_R12(r13) |
525 | GET_SCRATCH0(r10) | 525 | GET_SCRATCH0(r10) |
526 | std r10,PACA_EXSLB+EX_R13(r13) | 526 | std r10,PACA_EXSLB+EX_R13(r13) |
527 | EXCEPTION_PROLOG_PSERIES_1(.do_stab_bolted, EXC_STD) | 527 | EXCEPTION_PROLOG_PSERIES_1(do_stab_bolted, EXC_STD) |
528 | 528 | ||
529 | KVM_HANDLER_SKIP(PACA_EXGEN, EXC_STD, 0x300) | 529 | KVM_HANDLER_SKIP(PACA_EXGEN, EXC_STD, 0x300) |
530 | KVM_HANDLER_SKIP(PACA_EXSLB, EXC_STD, 0x380) | 530 | KVM_HANDLER_SKIP(PACA_EXSLB, EXC_STD, 0x380) |
@@ -769,38 +769,38 @@ kvmppc_skip_Hinterrupt: | |||
769 | 769 | ||
770 | /*** Common interrupt handlers ***/ | 770 | /*** Common interrupt handlers ***/ |
771 | 771 | ||
772 | STD_EXCEPTION_COMMON(0x100, system_reset, .system_reset_exception) | 772 | STD_EXCEPTION_COMMON(0x100, system_reset, system_reset_exception) |
773 | 773 | ||
774 | STD_EXCEPTION_COMMON_ASYNC(0x500, hardware_interrupt, do_IRQ) | 774 | STD_EXCEPTION_COMMON_ASYNC(0x500, hardware_interrupt, do_IRQ) |
775 | STD_EXCEPTION_COMMON_ASYNC(0x900, decrementer, .timer_interrupt) | 775 | STD_EXCEPTION_COMMON_ASYNC(0x900, decrementer, timer_interrupt) |
776 | STD_EXCEPTION_COMMON(0x980, hdecrementer, .hdec_interrupt) | 776 | STD_EXCEPTION_COMMON(0x980, hdecrementer, hdec_interrupt) |
777 | #ifdef CONFIG_PPC_DOORBELL | 777 | #ifdef CONFIG_PPC_DOORBELL |
778 | STD_EXCEPTION_COMMON_ASYNC(0xa00, doorbell_super, .doorbell_exception) | 778 | STD_EXCEPTION_COMMON_ASYNC(0xa00, doorbell_super, doorbell_exception) |
779 | #else | 779 | #else |
780 | STD_EXCEPTION_COMMON_ASYNC(0xa00, doorbell_super, .unknown_exception) | 780 | STD_EXCEPTION_COMMON_ASYNC(0xa00, doorbell_super, unknown_exception) |
781 | #endif | 781 | #endif |
782 | STD_EXCEPTION_COMMON(0xb00, trap_0b, .unknown_exception) | 782 | STD_EXCEPTION_COMMON(0xb00, trap_0b, unknown_exception) |
783 | STD_EXCEPTION_COMMON(0xd00, single_step, .single_step_exception) | 783 | STD_EXCEPTION_COMMON(0xd00, single_step, single_step_exception) |
784 | STD_EXCEPTION_COMMON(0xe00, trap_0e, .unknown_exception) | 784 | STD_EXCEPTION_COMMON(0xe00, trap_0e, unknown_exception) |
785 | STD_EXCEPTION_COMMON(0xe40, emulation_assist, .emulation_assist_interrupt) | 785 | STD_EXCEPTION_COMMON(0xe40, emulation_assist, emulation_assist_interrupt) |
786 | STD_EXCEPTION_COMMON(0xe60, hmi_exception, .unknown_exception) | 786 | STD_EXCEPTION_COMMON(0xe60, hmi_exception, unknown_exception) |
787 | #ifdef CONFIG_PPC_DOORBELL | 787 | #ifdef CONFIG_PPC_DOORBELL |
788 | STD_EXCEPTION_COMMON_ASYNC(0xe80, h_doorbell, .doorbell_exception) | 788 | STD_EXCEPTION_COMMON_ASYNC(0xe80, h_doorbell, doorbell_exception) |
789 | #else | 789 | #else |
790 | STD_EXCEPTION_COMMON_ASYNC(0xe80, h_doorbell, .unknown_exception) | 790 | STD_EXCEPTION_COMMON_ASYNC(0xe80, h_doorbell, unknown_exception) |
791 | #endif | 791 | #endif |
792 | STD_EXCEPTION_COMMON_ASYNC(0xf00, performance_monitor, .performance_monitor_exception) | 792 | STD_EXCEPTION_COMMON_ASYNC(0xf00, performance_monitor, performance_monitor_exception) |
793 | STD_EXCEPTION_COMMON(0x1300, instruction_breakpoint, .instruction_breakpoint_exception) | 793 | STD_EXCEPTION_COMMON(0x1300, instruction_breakpoint, instruction_breakpoint_exception) |
794 | STD_EXCEPTION_COMMON(0x1502, denorm, .unknown_exception) | 794 | STD_EXCEPTION_COMMON(0x1502, denorm, unknown_exception) |
795 | #ifdef CONFIG_ALTIVEC | 795 | #ifdef CONFIG_ALTIVEC |
796 | STD_EXCEPTION_COMMON(0x1700, altivec_assist, .altivec_assist_exception) | 796 | STD_EXCEPTION_COMMON(0x1700, altivec_assist, altivec_assist_exception) |
797 | #else | 797 | #else |
798 | STD_EXCEPTION_COMMON(0x1700, altivec_assist, .unknown_exception) | 798 | STD_EXCEPTION_COMMON(0x1700, altivec_assist, unknown_exception) |
799 | #endif | 799 | #endif |
800 | #ifdef CONFIG_CBE_RAS | 800 | #ifdef CONFIG_CBE_RAS |
801 | STD_EXCEPTION_COMMON(0x1200, cbe_system_error, .cbe_system_error_exception) | 801 | STD_EXCEPTION_COMMON(0x1200, cbe_system_error, cbe_system_error_exception) |
802 | STD_EXCEPTION_COMMON(0x1600, cbe_maintenance, .cbe_maintenance_exception) | 802 | STD_EXCEPTION_COMMON(0x1600, cbe_maintenance, cbe_maintenance_exception) |
803 | STD_EXCEPTION_COMMON(0x1800, cbe_thermal, .cbe_thermal_exception) | 803 | STD_EXCEPTION_COMMON(0x1800, cbe_thermal, cbe_thermal_exception) |
804 | #endif /* CONFIG_CBE_RAS */ | 804 | #endif /* CONFIG_CBE_RAS */ |
805 | 805 | ||
806 | /* | 806 | /* |
@@ -829,16 +829,16 @@ data_access_slb_relon_pSeries: | |||
829 | mfspr r3,SPRN_DAR | 829 | mfspr r3,SPRN_DAR |
830 | mfspr r12,SPRN_SRR1 | 830 | mfspr r12,SPRN_SRR1 |
831 | #ifndef CONFIG_RELOCATABLE | 831 | #ifndef CONFIG_RELOCATABLE |
832 | b .slb_miss_realmode | 832 | b slb_miss_realmode |
833 | #else | 833 | #else |
834 | /* | 834 | /* |
835 | * We can't just use a direct branch to .slb_miss_realmode | 835 | * We can't just use a direct branch to slb_miss_realmode |
836 | * because the distance from here to there depends on where | 836 | * because the distance from here to there depends on where |
837 | * the kernel ends up being put. | 837 | * the kernel ends up being put. |
838 | */ | 838 | */ |
839 | mfctr r11 | 839 | mfctr r11 |
840 | ld r10,PACAKBASE(r13) | 840 | ld r10,PACAKBASE(r13) |
841 | LOAD_HANDLER(r10, .slb_miss_realmode) | 841 | LOAD_HANDLER(r10, slb_miss_realmode) |
842 | mtctr r10 | 842 | mtctr r10 |
843 | bctr | 843 | bctr |
844 | #endif | 844 | #endif |
@@ -854,11 +854,11 @@ instruction_access_slb_relon_pSeries: | |||
854 | mfspr r3,SPRN_SRR0 /* SRR0 is faulting address */ | 854 | mfspr r3,SPRN_SRR0 /* SRR0 is faulting address */ |
855 | mfspr r12,SPRN_SRR1 | 855 | mfspr r12,SPRN_SRR1 |
856 | #ifndef CONFIG_RELOCATABLE | 856 | #ifndef CONFIG_RELOCATABLE |
857 | b .slb_miss_realmode | 857 | b slb_miss_realmode |
858 | #else | 858 | #else |
859 | mfctr r11 | 859 | mfctr r11 |
860 | ld r10,PACAKBASE(r13) | 860 | ld r10,PACAKBASE(r13) |
861 | LOAD_HANDLER(r10, .slb_miss_realmode) | 861 | LOAD_HANDLER(r10, slb_miss_realmode) |
862 | mtctr r10 | 862 | mtctr r10 |
863 | bctr | 863 | bctr |
864 | #endif | 864 | #endif |
@@ -966,7 +966,7 @@ system_call_entry: | |||
966 | b system_call_common | 966 | b system_call_common |
967 | 967 | ||
968 | ppc64_runlatch_on_trampoline: | 968 | ppc64_runlatch_on_trampoline: |
969 | b .__ppc64_runlatch_on | 969 | b __ppc64_runlatch_on |
970 | 970 | ||
971 | /* | 971 | /* |
972 | * Here we have detected that the kernel stack pointer is bad. | 972 | * Here we have detected that the kernel stack pointer is bad. |
@@ -1025,7 +1025,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_CFAR) | |||
1025 | std r12,RESULT(r1) | 1025 | std r12,RESULT(r1) |
1026 | std r11,STACK_FRAME_OVERHEAD-16(r1) | 1026 | std r11,STACK_FRAME_OVERHEAD-16(r1) |
1027 | 1: addi r3,r1,STACK_FRAME_OVERHEAD | 1027 | 1: addi r3,r1,STACK_FRAME_OVERHEAD |
1028 | bl .kernel_bad_stack | 1028 | bl kernel_bad_stack |
1029 | b 1b | 1029 | b 1b |
1030 | 1030 | ||
1031 | /* | 1031 | /* |
@@ -1046,7 +1046,7 @@ data_access_common: | |||
1046 | ld r3,PACA_EXGEN+EX_DAR(r13) | 1046 | ld r3,PACA_EXGEN+EX_DAR(r13) |
1047 | lwz r4,PACA_EXGEN+EX_DSISR(r13) | 1047 | lwz r4,PACA_EXGEN+EX_DSISR(r13) |
1048 | li r5,0x300 | 1048 | li r5,0x300 |
1049 | b .do_hash_page /* Try to handle as hpte fault */ | 1049 | b do_hash_page /* Try to handle as hpte fault */ |
1050 | 1050 | ||
1051 | .align 7 | 1051 | .align 7 |
1052 | .globl h_data_storage_common | 1052 | .globl h_data_storage_common |
@@ -1056,11 +1056,11 @@ h_data_storage_common: | |||
1056 | mfspr r10,SPRN_HDSISR | 1056 | mfspr r10,SPRN_HDSISR |
1057 | stw r10,PACA_EXGEN+EX_DSISR(r13) | 1057 | stw r10,PACA_EXGEN+EX_DSISR(r13) |
1058 | EXCEPTION_PROLOG_COMMON(0xe00, PACA_EXGEN) | 1058 | EXCEPTION_PROLOG_COMMON(0xe00, PACA_EXGEN) |
1059 | bl .save_nvgprs | 1059 | bl save_nvgprs |
1060 | DISABLE_INTS | 1060 | DISABLE_INTS |
1061 | addi r3,r1,STACK_FRAME_OVERHEAD | 1061 | addi r3,r1,STACK_FRAME_OVERHEAD |
1062 | bl .unknown_exception | 1062 | bl unknown_exception |
1063 | b .ret_from_except | 1063 | b ret_from_except |
1064 | 1064 | ||
1065 | .align 7 | 1065 | .align 7 |
1066 | .globl instruction_access_common | 1066 | .globl instruction_access_common |
@@ -1071,9 +1071,9 @@ instruction_access_common: | |||
1071 | ld r3,_NIP(r1) | 1071 | ld r3,_NIP(r1) |
1072 | andis. r4,r12,0x5820 | 1072 | andis. r4,r12,0x5820 |
1073 | li r5,0x400 | 1073 | li r5,0x400 |
1074 | b .do_hash_page /* Try to handle as hpte fault */ | 1074 | b do_hash_page /* Try to handle as hpte fault */ |
1075 | 1075 | ||
1076 | STD_EXCEPTION_COMMON(0xe20, h_instr_storage, .unknown_exception) | 1076 | STD_EXCEPTION_COMMON(0xe20, h_instr_storage, unknown_exception) |
1077 | 1077 | ||
1078 | /* | 1078 | /* |
1079 | * Here is the common SLB miss user that is used when going to virtual | 1079 | * Here is the common SLB miss user that is used when going to virtual |
@@ -1088,7 +1088,7 @@ slb_miss_user_common: | |||
1088 | stw r9,PACA_EXGEN+EX_CCR(r13) | 1088 | stw r9,PACA_EXGEN+EX_CCR(r13) |
1089 | std r10,PACA_EXGEN+EX_LR(r13) | 1089 | std r10,PACA_EXGEN+EX_LR(r13) |
1090 | std r11,PACA_EXGEN+EX_SRR0(r13) | 1090 | std r11,PACA_EXGEN+EX_SRR0(r13) |
1091 | bl .slb_allocate_user | 1091 | bl slb_allocate_user |
1092 | 1092 | ||
1093 | ld r10,PACA_EXGEN+EX_LR(r13) | 1093 | ld r10,PACA_EXGEN+EX_LR(r13) |
1094 | ld r3,PACA_EXGEN+EX_R3(r13) | 1094 | ld r3,PACA_EXGEN+EX_R3(r13) |
@@ -1131,9 +1131,9 @@ slb_miss_fault: | |||
1131 | unrecov_user_slb: | 1131 | unrecov_user_slb: |
1132 | EXCEPTION_PROLOG_COMMON(0x4200, PACA_EXGEN) | 1132 | EXCEPTION_PROLOG_COMMON(0x4200, PACA_EXGEN) |
1133 | DISABLE_INTS | 1133 | DISABLE_INTS |
1134 | bl .save_nvgprs | 1134 | bl save_nvgprs |
1135 | 1: addi r3,r1,STACK_FRAME_OVERHEAD | 1135 | 1: addi r3,r1,STACK_FRAME_OVERHEAD |
1136 | bl .unrecoverable_exception | 1136 | bl unrecoverable_exception |
1137 | b 1b | 1137 | b 1b |
1138 | 1138 | ||
1139 | #endif /* __DISABLED__ */ | 1139 | #endif /* __DISABLED__ */ |
@@ -1158,10 +1158,10 @@ machine_check_common: | |||
1158 | lwz r4,PACA_EXGEN+EX_DSISR(r13) | 1158 | lwz r4,PACA_EXGEN+EX_DSISR(r13) |
1159 | std r3,_DAR(r1) | 1159 | std r3,_DAR(r1) |
1160 | std r4,_DSISR(r1) | 1160 | std r4,_DSISR(r1) |
1161 | bl .save_nvgprs | 1161 | bl save_nvgprs |
1162 | addi r3,r1,STACK_FRAME_OVERHEAD | 1162 | addi r3,r1,STACK_FRAME_OVERHEAD |
1163 | bl .machine_check_exception | 1163 | bl machine_check_exception |
1164 | b .ret_from_except | 1164 | b ret_from_except |
1165 | 1165 | ||
1166 | .align 7 | 1166 | .align 7 |
1167 | .globl alignment_common | 1167 | .globl alignment_common |
@@ -1175,31 +1175,31 @@ alignment_common: | |||
1175 | lwz r4,PACA_EXGEN+EX_DSISR(r13) | 1175 | lwz r4,PACA_EXGEN+EX_DSISR(r13) |
1176 | std r3,_DAR(r1) | 1176 | std r3,_DAR(r1) |
1177 | std r4,_DSISR(r1) | 1177 | std r4,_DSISR(r1) |
1178 | bl .save_nvgprs | 1178 | bl save_nvgprs |
1179 | DISABLE_INTS | 1179 | DISABLE_INTS |
1180 | addi r3,r1,STACK_FRAME_OVERHEAD | 1180 | addi r3,r1,STACK_FRAME_OVERHEAD |
1181 | bl .alignment_exception | 1181 | bl alignment_exception |
1182 | b .ret_from_except | 1182 | b ret_from_except |
1183 | 1183 | ||
1184 | .align 7 | 1184 | .align 7 |
1185 | .globl program_check_common | 1185 | .globl program_check_common |
1186 | program_check_common: | 1186 | program_check_common: |
1187 | EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN) | 1187 | EXCEPTION_PROLOG_COMMON(0x700, PACA_EXGEN) |
1188 | bl .save_nvgprs | 1188 | bl save_nvgprs |
1189 | DISABLE_INTS | 1189 | DISABLE_INTS |
1190 | addi r3,r1,STACK_FRAME_OVERHEAD | 1190 | addi r3,r1,STACK_FRAME_OVERHEAD |
1191 | bl .program_check_exception | 1191 | bl program_check_exception |
1192 | b .ret_from_except | 1192 | b ret_from_except |
1193 | 1193 | ||
1194 | .align 7 | 1194 | .align 7 |
1195 | .globl fp_unavailable_common | 1195 | .globl fp_unavailable_common |
1196 | fp_unavailable_common: | 1196 | fp_unavailable_common: |
1197 | EXCEPTION_PROLOG_COMMON(0x800, PACA_EXGEN) | 1197 | EXCEPTION_PROLOG_COMMON(0x800, PACA_EXGEN) |
1198 | bne 1f /* if from user, just load it up */ | 1198 | bne 1f /* if from user, just load it up */ |
1199 | bl .save_nvgprs | 1199 | bl save_nvgprs |
1200 | DISABLE_INTS | 1200 | DISABLE_INTS |
1201 | addi r3,r1,STACK_FRAME_OVERHEAD | 1201 | addi r3,r1,STACK_FRAME_OVERHEAD |
1202 | bl .kernel_fp_unavailable_exception | 1202 | bl kernel_fp_unavailable_exception |
1203 | BUG_OPCODE | 1203 | BUG_OPCODE |
1204 | 1: | 1204 | 1: |
1205 | #ifdef CONFIG_PPC_TRANSACTIONAL_MEM | 1205 | #ifdef CONFIG_PPC_TRANSACTIONAL_MEM |
@@ -1211,15 +1211,15 @@ BEGIN_FTR_SECTION | |||
1211 | bne- 2f | 1211 | bne- 2f |
1212 | END_FTR_SECTION_IFSET(CPU_FTR_TM) | 1212 | END_FTR_SECTION_IFSET(CPU_FTR_TM) |
1213 | #endif | 1213 | #endif |
1214 | bl .load_up_fpu | 1214 | bl load_up_fpu |
1215 | b fast_exception_return | 1215 | b fast_exception_return |
1216 | #ifdef CONFIG_PPC_TRANSACTIONAL_MEM | 1216 | #ifdef CONFIG_PPC_TRANSACTIONAL_MEM |
1217 | 2: /* User process was in a transaction */ | 1217 | 2: /* User process was in a transaction */ |
1218 | bl .save_nvgprs | 1218 | bl save_nvgprs |
1219 | DISABLE_INTS | 1219 | DISABLE_INTS |
1220 | addi r3,r1,STACK_FRAME_OVERHEAD | 1220 | addi r3,r1,STACK_FRAME_OVERHEAD |
1221 | bl .fp_unavailable_tm | 1221 | bl fp_unavailable_tm |
1222 | b .ret_from_except | 1222 | b ret_from_except |
1223 | #endif | 1223 | #endif |
1224 | .align 7 | 1224 | .align 7 |
1225 | .globl altivec_unavailable_common | 1225 | .globl altivec_unavailable_common |
@@ -1237,24 +1237,24 @@ BEGIN_FTR_SECTION | |||
1237 | bne- 2f | 1237 | bne- 2f |
1238 | END_FTR_SECTION_NESTED(CPU_FTR_TM, CPU_FTR_TM, 69) | 1238 | END_FTR_SECTION_NESTED(CPU_FTR_TM, CPU_FTR_TM, 69) |
1239 | #endif | 1239 | #endif |
1240 | bl .load_up_altivec | 1240 | bl load_up_altivec |
1241 | b fast_exception_return | 1241 | b fast_exception_return |
1242 | #ifdef CONFIG_PPC_TRANSACTIONAL_MEM | 1242 | #ifdef CONFIG_PPC_TRANSACTIONAL_MEM |
1243 | 2: /* User process was in a transaction */ | 1243 | 2: /* User process was in a transaction */ |
1244 | bl .save_nvgprs | 1244 | bl save_nvgprs |
1245 | DISABLE_INTS | 1245 | DISABLE_INTS |
1246 | addi r3,r1,STACK_FRAME_OVERHEAD | 1246 | addi r3,r1,STACK_FRAME_OVERHEAD |
1247 | bl .altivec_unavailable_tm | 1247 | bl altivec_unavailable_tm |
1248 | b .ret_from_except | 1248 | b ret_from_except |
1249 | #endif | 1249 | #endif |
1250 | 1: | 1250 | 1: |
1251 | END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | 1251 | END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) |
1252 | #endif | 1252 | #endif |
1253 | bl .save_nvgprs | 1253 | bl save_nvgprs |
1254 | DISABLE_INTS | 1254 | DISABLE_INTS |
1255 | addi r3,r1,STACK_FRAME_OVERHEAD | 1255 | addi r3,r1,STACK_FRAME_OVERHEAD |
1256 | bl .altivec_unavailable_exception | 1256 | bl altivec_unavailable_exception |
1257 | b .ret_from_except | 1257 | b ret_from_except |
1258 | 1258 | ||
1259 | .align 7 | 1259 | .align 7 |
1260 | .globl vsx_unavailable_common | 1260 | .globl vsx_unavailable_common |
@@ -1272,26 +1272,26 @@ BEGIN_FTR_SECTION | |||
1272 | bne- 2f | 1272 | bne- 2f |
1273 | END_FTR_SECTION_NESTED(CPU_FTR_TM, CPU_FTR_TM, 69) | 1273 | END_FTR_SECTION_NESTED(CPU_FTR_TM, CPU_FTR_TM, 69) |
1274 | #endif | 1274 | #endif |
1275 | b .load_up_vsx | 1275 | b load_up_vsx |
1276 | #ifdef CONFIG_PPC_TRANSACTIONAL_MEM | 1276 | #ifdef CONFIG_PPC_TRANSACTIONAL_MEM |
1277 | 2: /* User process was in a transaction */ | 1277 | 2: /* User process was in a transaction */ |
1278 | bl .save_nvgprs | 1278 | bl save_nvgprs |
1279 | DISABLE_INTS | 1279 | DISABLE_INTS |
1280 | addi r3,r1,STACK_FRAME_OVERHEAD | 1280 | addi r3,r1,STACK_FRAME_OVERHEAD |
1281 | bl .vsx_unavailable_tm | 1281 | bl vsx_unavailable_tm |
1282 | b .ret_from_except | 1282 | b ret_from_except |
1283 | #endif | 1283 | #endif |
1284 | 1: | 1284 | 1: |
1285 | END_FTR_SECTION_IFSET(CPU_FTR_VSX) | 1285 | END_FTR_SECTION_IFSET(CPU_FTR_VSX) |
1286 | #endif | 1286 | #endif |
1287 | bl .save_nvgprs | 1287 | bl save_nvgprs |
1288 | DISABLE_INTS | 1288 | DISABLE_INTS |
1289 | addi r3,r1,STACK_FRAME_OVERHEAD | 1289 | addi r3,r1,STACK_FRAME_OVERHEAD |
1290 | bl .vsx_unavailable_exception | 1290 | bl vsx_unavailable_exception |
1291 | b .ret_from_except | 1291 | b ret_from_except |
1292 | 1292 | ||
1293 | STD_EXCEPTION_COMMON(0xf60, facility_unavailable, .facility_unavailable_exception) | 1293 | STD_EXCEPTION_COMMON(0xf60, facility_unavailable, facility_unavailable_exception) |
1294 | STD_EXCEPTION_COMMON(0xf80, hv_facility_unavailable, .facility_unavailable_exception) | 1294 | STD_EXCEPTION_COMMON(0xf80, hv_facility_unavailable, facility_unavailable_exception) |
1295 | 1295 | ||
1296 | .align 7 | 1296 | .align 7 |
1297 | .globl __end_handlers | 1297 | .globl __end_handlers |
@@ -1386,9 +1386,9 @@ _GLOBAL(opal_mc_secondary_handler) | |||
1386 | machine_check_handle_early: | 1386 | machine_check_handle_early: |
1387 | std r0,GPR0(r1) /* Save r0 */ | 1387 | std r0,GPR0(r1) /* Save r0 */ |
1388 | EXCEPTION_PROLOG_COMMON_3(0x200) | 1388 | EXCEPTION_PROLOG_COMMON_3(0x200) |
1389 | bl .save_nvgprs | 1389 | bl save_nvgprs |
1390 | addi r3,r1,STACK_FRAME_OVERHEAD | 1390 | addi r3,r1,STACK_FRAME_OVERHEAD |
1391 | bl .machine_check_early | 1391 | bl machine_check_early |
1392 | ld r12,_MSR(r1) | 1392 | ld r12,_MSR(r1) |
1393 | #ifdef CONFIG_PPC_P7_NAP | 1393 | #ifdef CONFIG_PPC_P7_NAP |
1394 | /* | 1394 | /* |
@@ -1408,11 +1408,11 @@ machine_check_handle_early: | |||
1408 | /* Supervisor state loss */ | 1408 | /* Supervisor state loss */ |
1409 | li r0,1 | 1409 | li r0,1 |
1410 | stb r0,PACA_NAPSTATELOST(r13) | 1410 | stb r0,PACA_NAPSTATELOST(r13) |
1411 | 3: bl .machine_check_queue_event | 1411 | 3: bl machine_check_queue_event |
1412 | MACHINE_CHECK_HANDLER_WINDUP | 1412 | MACHINE_CHECK_HANDLER_WINDUP |
1413 | GET_PACA(r13) | 1413 | GET_PACA(r13) |
1414 | ld r1,PACAR1(r13) | 1414 | ld r1,PACAR1(r13) |
1415 | b .power7_enter_nap_mode | 1415 | b power7_enter_nap_mode |
1416 | 4: | 1416 | 4: |
1417 | #endif | 1417 | #endif |
1418 | /* | 1418 | /* |
@@ -1444,7 +1444,7 @@ machine_check_handle_early: | |||
1444 | andi. r11,r12,MSR_RI | 1444 | andi. r11,r12,MSR_RI |
1445 | bne 2f | 1445 | bne 2f |
1446 | 1: addi r3,r1,STACK_FRAME_OVERHEAD | 1446 | 1: addi r3,r1,STACK_FRAME_OVERHEAD |
1447 | bl .unrecoverable_exception | 1447 | bl unrecoverable_exception |
1448 | b 1b | 1448 | b 1b |
1449 | 2: | 1449 | 2: |
1450 | /* | 1450 | /* |
@@ -1452,7 +1452,7 @@ machine_check_handle_early: | |||
1452 | * Queue up the MCE event so that we can log it later, while | 1452 | * Queue up the MCE event so that we can log it later, while |
1453 | * returning from kernel or opal call. | 1453 | * returning from kernel or opal call. |
1454 | */ | 1454 | */ |
1455 | bl .machine_check_queue_event | 1455 | bl machine_check_queue_event |
1456 | MACHINE_CHECK_HANDLER_WINDUP | 1456 | MACHINE_CHECK_HANDLER_WINDUP |
1457 | rfid | 1457 | rfid |
1458 | 9: | 1458 | 9: |
@@ -1468,7 +1468,7 @@ machine_check_handle_early: | |||
1468 | * r3 is saved in paca->slb_r3 | 1468 | * r3 is saved in paca->slb_r3 |
1469 | * We assume we aren't going to take any exceptions during this procedure. | 1469 | * We assume we aren't going to take any exceptions during this procedure. |
1470 | */ | 1470 | */ |
1471 | _GLOBAL(slb_miss_realmode) | 1471 | slb_miss_realmode: |
1472 | mflr r10 | 1472 | mflr r10 |
1473 | #ifdef CONFIG_RELOCATABLE | 1473 | #ifdef CONFIG_RELOCATABLE |
1474 | mtctr r11 | 1474 | mtctr r11 |
@@ -1477,7 +1477,7 @@ _GLOBAL(slb_miss_realmode) | |||
1477 | stw r9,PACA_EXSLB+EX_CCR(r13) /* save CR in exc. frame */ | 1477 | stw r9,PACA_EXSLB+EX_CCR(r13) /* save CR in exc. frame */ |
1478 | std r10,PACA_EXSLB+EX_LR(r13) /* save LR */ | 1478 | std r10,PACA_EXSLB+EX_LR(r13) /* save LR */ |
1479 | 1479 | ||
1480 | bl .slb_allocate_realmode | 1480 | bl slb_allocate_realmode |
1481 | 1481 | ||
1482 | /* All done -- return from exception. */ | 1482 | /* All done -- return from exception. */ |
1483 | 1483 | ||
@@ -1517,9 +1517,9 @@ _GLOBAL(slb_miss_realmode) | |||
1517 | unrecov_slb: | 1517 | unrecov_slb: |
1518 | EXCEPTION_PROLOG_COMMON(0x4100, PACA_EXSLB) | 1518 | EXCEPTION_PROLOG_COMMON(0x4100, PACA_EXSLB) |
1519 | DISABLE_INTS | 1519 | DISABLE_INTS |
1520 | bl .save_nvgprs | 1520 | bl save_nvgprs |
1521 | 1: addi r3,r1,STACK_FRAME_OVERHEAD | 1521 | 1: addi r3,r1,STACK_FRAME_OVERHEAD |
1522 | bl .unrecoverable_exception | 1522 | bl unrecoverable_exception |
1523 | b 1b | 1523 | b 1b |
1524 | 1524 | ||
1525 | 1525 | ||
@@ -1536,7 +1536,7 @@ power4_fixup_nap: | |||
1536 | * Hash table stuff | 1536 | * Hash table stuff |
1537 | */ | 1537 | */ |
1538 | .align 7 | 1538 | .align 7 |
1539 | _STATIC(do_hash_page) | 1539 | do_hash_page: |
1540 | std r3,_DAR(r1) | 1540 | std r3,_DAR(r1) |
1541 | std r4,_DSISR(r1) | 1541 | std r4,_DSISR(r1) |
1542 | 1542 | ||
@@ -1573,7 +1573,7 @@ END_MMU_FTR_SECTION_IFCLR(MMU_FTR_SLB) | |||
1573 | * | 1573 | * |
1574 | * at return r3 = 0 for success, 1 for page fault, negative for error | 1574 | * at return r3 = 0 for success, 1 for page fault, negative for error |
1575 | */ | 1575 | */ |
1576 | bl .hash_page /* build HPTE if possible */ | 1576 | bl hash_page /* build HPTE if possible */ |
1577 | cmpdi r3,0 /* see if hash_page succeeded */ | 1577 | cmpdi r3,0 /* see if hash_page succeeded */ |
1578 | 1578 | ||
1579 | /* Success */ | 1579 | /* Success */ |
@@ -1587,35 +1587,35 @@ handle_page_fault: | |||
1587 | 11: ld r4,_DAR(r1) | 1587 | 11: ld r4,_DAR(r1) |
1588 | ld r5,_DSISR(r1) | 1588 | ld r5,_DSISR(r1) |
1589 | addi r3,r1,STACK_FRAME_OVERHEAD | 1589 | addi r3,r1,STACK_FRAME_OVERHEAD |
1590 | bl .do_page_fault | 1590 | bl do_page_fault |
1591 | cmpdi r3,0 | 1591 | cmpdi r3,0 |
1592 | beq+ 12f | 1592 | beq+ 12f |
1593 | bl .save_nvgprs | 1593 | bl save_nvgprs |
1594 | mr r5,r3 | 1594 | mr r5,r3 |
1595 | addi r3,r1,STACK_FRAME_OVERHEAD | 1595 | addi r3,r1,STACK_FRAME_OVERHEAD |
1596 | lwz r4,_DAR(r1) | 1596 | lwz r4,_DAR(r1) |
1597 | bl .bad_page_fault | 1597 | bl bad_page_fault |
1598 | b .ret_from_except | 1598 | b ret_from_except |
1599 | 1599 | ||
1600 | /* We have a data breakpoint exception - handle it */ | 1600 | /* We have a data breakpoint exception - handle it */ |
1601 | handle_dabr_fault: | 1601 | handle_dabr_fault: |
1602 | bl .save_nvgprs | 1602 | bl save_nvgprs |
1603 | ld r4,_DAR(r1) | 1603 | ld r4,_DAR(r1) |
1604 | ld r5,_DSISR(r1) | 1604 | ld r5,_DSISR(r1) |
1605 | addi r3,r1,STACK_FRAME_OVERHEAD | 1605 | addi r3,r1,STACK_FRAME_OVERHEAD |
1606 | bl .do_break | 1606 | bl do_break |
1607 | 12: b .ret_from_except_lite | 1607 | 12: b ret_from_except_lite |
1608 | 1608 | ||
1609 | 1609 | ||
1610 | /* We have a page fault that hash_page could handle but HV refused | 1610 | /* We have a page fault that hash_page could handle but HV refused |
1611 | * the PTE insertion | 1611 | * the PTE insertion |
1612 | */ | 1612 | */ |
1613 | 13: bl .save_nvgprs | 1613 | 13: bl save_nvgprs |
1614 | mr r5,r3 | 1614 | mr r5,r3 |
1615 | addi r3,r1,STACK_FRAME_OVERHEAD | 1615 | addi r3,r1,STACK_FRAME_OVERHEAD |
1616 | ld r4,_DAR(r1) | 1616 | ld r4,_DAR(r1) |
1617 | bl .low_hash_fault | 1617 | bl low_hash_fault |
1618 | b .ret_from_except | 1618 | b ret_from_except |
1619 | 1619 | ||
1620 | /* | 1620 | /* |
1621 | * We come here as a result of a DSI at a point where we don't want | 1621 | * We come here as a result of a DSI at a point where we don't want |
@@ -1624,16 +1624,16 @@ handle_dabr_fault: | |||
1624 | * were soft-disabled. We want to invoke the exception handler for | 1624 | * were soft-disabled. We want to invoke the exception handler for |
1625 | * the access, or panic if there isn't a handler. | 1625 | * the access, or panic if there isn't a handler. |
1626 | */ | 1626 | */ |
1627 | 77: bl .save_nvgprs | 1627 | 77: bl save_nvgprs |
1628 | mr r4,r3 | 1628 | mr r4,r3 |
1629 | addi r3,r1,STACK_FRAME_OVERHEAD | 1629 | addi r3,r1,STACK_FRAME_OVERHEAD |
1630 | li r5,SIGSEGV | 1630 | li r5,SIGSEGV |
1631 | bl .bad_page_fault | 1631 | bl bad_page_fault |
1632 | b .ret_from_except | 1632 | b ret_from_except |
1633 | 1633 | ||
1634 | /* here we have a segment miss */ | 1634 | /* here we have a segment miss */ |
1635 | do_ste_alloc: | 1635 | do_ste_alloc: |
1636 | bl .ste_allocate /* try to insert stab entry */ | 1636 | bl ste_allocate /* try to insert stab entry */ |
1637 | cmpdi r3,0 | 1637 | cmpdi r3,0 |
1638 | bne- handle_page_fault | 1638 | bne- handle_page_fault |
1639 | b fast_exception_return | 1639 | b fast_exception_return |
@@ -1646,7 +1646,7 @@ do_ste_alloc: | |||
1646 | * We assume (DAR >> 60) == 0xc. | 1646 | * We assume (DAR >> 60) == 0xc. |
1647 | */ | 1647 | */ |
1648 | .align 7 | 1648 | .align 7 |
1649 | _GLOBAL(do_stab_bolted) | 1649 | do_stab_bolted: |
1650 | stw r9,PACA_EXSLB+EX_CCR(r13) /* save CR in exc. frame */ | 1650 | stw r9,PACA_EXSLB+EX_CCR(r13) /* save CR in exc. frame */ |
1651 | std r11,PACA_EXSLB+EX_SRR0(r13) /* save SRR0 in exc. frame */ | 1651 | std r11,PACA_EXSLB+EX_SRR0(r13) /* save SRR0 in exc. frame */ |
1652 | mfspr r11,SPRN_DAR /* ea */ | 1652 | mfspr r11,SPRN_DAR /* ea */ |