diff options
Diffstat (limited to 'arch/powerpc/kernel/exceptions-64s.S')
-rw-r--r-- | arch/powerpc/kernel/exceptions-64s.S | 95 |
1 files changed, 7 insertions, 88 deletions
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index 15c5a4f6de01..fea8a69df4b2 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S | |||
@@ -19,7 +19,7 @@ | |||
19 | * We layout physical memory as follows: | 19 | * We layout physical memory as follows: |
20 | * 0x0000 - 0x00ff : Secondary processor spin code | 20 | * 0x0000 - 0x00ff : Secondary processor spin code |
21 | * 0x0100 - 0x2fff : pSeries Interrupt prologs | 21 | * 0x0100 - 0x2fff : pSeries Interrupt prologs |
22 | * 0x3000 - 0x5fff : interrupt support, iSeries and common interrupt prologs | 22 | * 0x3000 - 0x5fff : interrupt support common interrupt prologs |
23 | * 0x6000 - 0x6fff : Initial (CPU0) segment table | 23 | * 0x6000 - 0x6fff : Initial (CPU0) segment table |
24 | * 0x7000 - 0x7fff : FWNMI data area | 24 | * 0x7000 - 0x7fff : FWNMI data area |
25 | * 0x8000 - : Early init and support code | 25 | * 0x8000 - : Early init and support code |
@@ -458,6 +458,7 @@ machine_check_common: | |||
458 | bl .machine_check_exception | 458 | bl .machine_check_exception |
459 | b .ret_from_except | 459 | b .ret_from_except |
460 | 460 | ||
461 | STD_EXCEPTION_COMMON_LITE(0x500, hardware_interrupt, do_IRQ) | ||
461 | STD_EXCEPTION_COMMON_LITE(0x900, decrementer, .timer_interrupt) | 462 | STD_EXCEPTION_COMMON_LITE(0x900, decrementer, .timer_interrupt) |
462 | STD_EXCEPTION_COMMON(0xa00, trap_0a, .unknown_exception) | 463 | STD_EXCEPTION_COMMON(0xa00, trap_0a, .unknown_exception) |
463 | STD_EXCEPTION_COMMON(0xb00, trap_0b, .unknown_exception) | 464 | STD_EXCEPTION_COMMON(0xb00, trap_0b, .unknown_exception) |
@@ -672,12 +673,6 @@ _GLOBAL(slb_miss_realmode) | |||
672 | ld r10,PACA_EXSLB+EX_LR(r13) | 673 | ld r10,PACA_EXSLB+EX_LR(r13) |
673 | ld r3,PACA_EXSLB+EX_R3(r13) | 674 | ld r3,PACA_EXSLB+EX_R3(r13) |
674 | lwz r9,PACA_EXSLB+EX_CCR(r13) /* get saved CR */ | 675 | lwz r9,PACA_EXSLB+EX_CCR(r13) /* get saved CR */ |
675 | #ifdef CONFIG_PPC_ISERIES | ||
676 | BEGIN_FW_FTR_SECTION | ||
677 | ld r11,PACALPPACAPTR(r13) | ||
678 | ld r11,LPPACASRR0(r11) /* get SRR0 value */ | ||
679 | END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) | ||
680 | #endif /* CONFIG_PPC_ISERIES */ | ||
681 | 676 | ||
682 | mtlr r10 | 677 | mtlr r10 |
683 | 678 | ||
@@ -690,12 +685,6 @@ END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) | |||
690 | mtcrf 0x01,r9 /* slb_allocate uses cr0 and cr7 */ | 685 | mtcrf 0x01,r9 /* slb_allocate uses cr0 and cr7 */ |
691 | .machine pop | 686 | .machine pop |
692 | 687 | ||
693 | #ifdef CONFIG_PPC_ISERIES | ||
694 | BEGIN_FW_FTR_SECTION | ||
695 | mtspr SPRN_SRR0,r11 | ||
696 | mtspr SPRN_SRR1,r12 | ||
697 | END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) | ||
698 | #endif /* CONFIG_PPC_ISERIES */ | ||
699 | ld r9,PACA_EXSLB+EX_R9(r13) | 688 | ld r9,PACA_EXSLB+EX_R9(r13) |
700 | ld r10,PACA_EXSLB+EX_R10(r13) | 689 | ld r10,PACA_EXSLB+EX_R10(r13) |
701 | ld r11,PACA_EXSLB+EX_R11(r13) | 690 | ld r11,PACA_EXSLB+EX_R11(r13) |
@@ -704,13 +693,7 @@ END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) | |||
704 | rfid | 693 | rfid |
705 | b . /* prevent speculative execution */ | 694 | b . /* prevent speculative execution */ |
706 | 695 | ||
707 | 2: | 696 | 2: mfspr r11,SPRN_SRR0 |
708 | #ifdef CONFIG_PPC_ISERIES | ||
709 | BEGIN_FW_FTR_SECTION | ||
710 | b unrecov_slb | ||
711 | END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) | ||
712 | #endif /* CONFIG_PPC_ISERIES */ | ||
713 | mfspr r11,SPRN_SRR0 | ||
714 | ld r10,PACAKBASE(r13) | 697 | ld r10,PACAKBASE(r13) |
715 | LOAD_HANDLER(r10,unrecov_slb) | 698 | LOAD_HANDLER(r10,unrecov_slb) |
716 | mtspr SPRN_SRR0,r10 | 699 | mtspr SPRN_SRR0,r10 |
@@ -727,20 +710,6 @@ unrecov_slb: | |||
727 | bl .unrecoverable_exception | 710 | bl .unrecoverable_exception |
728 | b 1b | 711 | b 1b |
729 | 712 | ||
730 | .align 7 | ||
731 | .globl hardware_interrupt_common | ||
732 | .globl hardware_interrupt_entry | ||
733 | hardware_interrupt_common: | ||
734 | EXCEPTION_PROLOG_COMMON(0x500, PACA_EXGEN) | ||
735 | FINISH_NAP | ||
736 | hardware_interrupt_entry: | ||
737 | DISABLE_INTS | ||
738 | BEGIN_FTR_SECTION | ||
739 | bl .ppc64_runlatch_on | ||
740 | END_FTR_SECTION_IFSET(CPU_FTR_CTRL) | ||
741 | addi r3,r1,STACK_FRAME_OVERHEAD | ||
742 | bl .do_IRQ | ||
743 | b .ret_from_except_lite | ||
744 | 713 | ||
745 | #ifdef CONFIG_PPC_970_NAP | 714 | #ifdef CONFIG_PPC_970_NAP |
746 | power4_fixup_nap: | 715 | power4_fixup_nap: |
@@ -913,11 +882,7 @@ END_MMU_FTR_SECTION_IFCLR(MMU_FTR_SLB) | |||
913 | andis. r0,r0,NMI_MASK@h /* (i.e. an irq when soft-disabled) */ | 882 | andis. r0,r0,NMI_MASK@h /* (i.e. an irq when soft-disabled) */ |
914 | bne 77f /* then don't call hash_page now */ | 883 | bne 77f /* then don't call hash_page now */ |
915 | 884 | ||
916 | /* | 885 | /* We run with interrupts both soft and hard disabled */ |
917 | * On iSeries, we soft-disable interrupts here, then | ||
918 | * hard-enable interrupts so that the hash_page code can spin on | ||
919 | * the hash_table_lock without problems on a shared processor. | ||
920 | */ | ||
921 | DISABLE_INTS | 886 | DISABLE_INTS |
922 | 887 | ||
923 | /* | 888 | /* |
@@ -956,25 +921,11 @@ END_MMU_FTR_SECTION_IFCLR(MMU_FTR_SLB) | |||
956 | bl .hash_page /* build HPTE if possible */ | 921 | bl .hash_page /* build HPTE if possible */ |
957 | cmpdi r3,0 /* see if hash_page succeeded */ | 922 | cmpdi r3,0 /* see if hash_page succeeded */ |
958 | 923 | ||
959 | BEGIN_FW_FTR_SECTION | ||
960 | /* | ||
961 | * If we had interrupts soft-enabled at the point where the | ||
962 | * DSI/ISI occurred, and an interrupt came in during hash_page, | ||
963 | * handle it now. | ||
964 | * We jump to ret_from_except_lite rather than fast_exception_return | ||
965 | * because ret_from_except_lite will check for and handle pending | ||
966 | * interrupts if necessary. | ||
967 | */ | ||
968 | beq 13f | ||
969 | END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES) | ||
970 | |||
971 | BEGIN_FW_FTR_SECTION | ||
972 | /* | 924 | /* |
973 | * Here we have interrupts hard-disabled, so it is sufficient | 925 | * Here we have interrupts hard-disabled, so it is sufficient |
974 | * to restore paca->{soft,hard}_enable and get out. | 926 | * to restore paca->{soft,hard}_enable and get out. |
975 | */ | 927 | */ |
976 | beq fast_exc_return_irq /* Return from exception on success */ | 928 | beq fast_exc_return_irq /* Return from exception on success */ |
977 | END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISERIES) | ||
978 | 929 | ||
979 | /* For a hash failure, we don't bother re-enabling interrupts */ | 930 | /* For a hash failure, we don't bother re-enabling interrupts */ |
980 | ble- 12f | 931 | ble- 12f |
@@ -1141,51 +1092,19 @@ _GLOBAL(do_stab_bolted) | |||
1141 | .= 0x7000 | 1092 | .= 0x7000 |
1142 | .globl fwnmi_data_area | 1093 | .globl fwnmi_data_area |
1143 | fwnmi_data_area: | 1094 | fwnmi_data_area: |
1144 | #endif /* defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) */ | ||
1145 | |||
1146 | /* iSeries does not use the FWNMI stuff, so it is safe to put | ||
1147 | * this here, even if we later allow kernels that will boot on | ||
1148 | * both pSeries and iSeries */ | ||
1149 | #ifdef CONFIG_PPC_ISERIES | ||
1150 | . = LPARMAP_PHYS | ||
1151 | .globl xLparMap | ||
1152 | xLparMap: | ||
1153 | .quad HvEsidsToMap /* xNumberEsids */ | ||
1154 | .quad HvRangesToMap /* xNumberRanges */ | ||
1155 | .quad STAB0_PAGE /* xSegmentTableOffs */ | ||
1156 | .zero 40 /* xRsvd */ | ||
1157 | /* xEsids (HvEsidsToMap entries of 2 quads) */ | ||
1158 | .quad PAGE_OFFSET_ESID /* xKernelEsid */ | ||
1159 | .quad PAGE_OFFSET_VSID /* xKernelVsid */ | ||
1160 | .quad VMALLOC_START_ESID /* xKernelEsid */ | ||
1161 | .quad VMALLOC_START_VSID /* xKernelVsid */ | ||
1162 | /* xRanges (HvRangesToMap entries of 3 quads) */ | ||
1163 | .quad HvPagesToMap /* xPages */ | ||
1164 | .quad 0 /* xOffset */ | ||
1165 | .quad PAGE_OFFSET_VSID << (SID_SHIFT - HW_PAGE_SHIFT) /* xVPN */ | ||
1166 | |||
1167 | #endif /* CONFIG_PPC_ISERIES */ | ||
1168 | 1095 | ||
1169 | #if defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) | ||
1170 | /* pseries and powernv need to keep the whole page from | 1096 | /* pseries and powernv need to keep the whole page from |
1171 | * 0x7000 to 0x8000 free for use by the firmware | 1097 | * 0x7000 to 0x8000 free for use by the firmware |
1172 | */ | 1098 | */ |
1173 | . = 0x8000 | 1099 | . = 0x8000 |
1174 | #endif /* defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) */ | 1100 | #endif /* defined(CONFIG_PPC_PSERIES) || defined(CONFIG_PPC_POWERNV) */ |
1175 | 1101 | ||
1176 | /* | 1102 | /* Space for CPU0's segment table */ |
1177 | * Space for CPU0's segment table. | 1103 | .balign 4096 |
1178 | * | ||
1179 | * On iSeries, the hypervisor must fill in at least one entry before | ||
1180 | * we get control (with relocate on). The address is given to the hv | ||
1181 | * as a page number (see xLparMap above), so this must be at a | ||
1182 | * fixed address (the linker can't compute (u64)&initial_stab >> | ||
1183 | * PAGE_SHIFT). | ||
1184 | */ | ||
1185 | . = STAB0_OFFSET /* 0x8000 */ | ||
1186 | .globl initial_stab | 1104 | .globl initial_stab |
1187 | initial_stab: | 1105 | initial_stab: |
1188 | .space 4096 | 1106 | .space 4096 |
1107 | |||
1189 | #ifdef CONFIG_PPC_POWERNV | 1108 | #ifdef CONFIG_PPC_POWERNV |
1190 | _GLOBAL(opal_mc_secondary_handler) | 1109 | _GLOBAL(opal_mc_secondary_handler) |
1191 | HMT_MEDIUM | 1110 | HMT_MEDIUM |