diff options
Diffstat (limited to 'arch/ia64/kernel/mca_asm.S')
-rw-r--r-- | arch/ia64/kernel/mca_asm.S | 88 |
1 files changed, 53 insertions, 35 deletions
diff --git a/arch/ia64/kernel/mca_asm.S b/arch/ia64/kernel/mca_asm.S index cf3f8014f9ad..ef3fd7265b67 100644 --- a/arch/ia64/kernel/mca_asm.S +++ b/arch/ia64/kernel/mca_asm.S | |||
@@ -110,46 +110,19 @@ | |||
110 | .global ia64_os_mca_dispatch_end | 110 | .global ia64_os_mca_dispatch_end |
111 | .global ia64_sal_to_os_handoff_state | 111 | .global ia64_sal_to_os_handoff_state |
112 | .global ia64_os_to_sal_handoff_state | 112 | .global ia64_os_to_sal_handoff_state |
113 | .global ia64_do_tlb_purge | ||
113 | 114 | ||
114 | .text | 115 | .text |
115 | .align 16 | 116 | .align 16 |
116 | 117 | ||
117 | ia64_os_mca_dispatch: | 118 | /* |
118 | 119 | * Just the TLB purge part is moved to a separate function | |
119 | // Serialize all MCA processing | 120 | * so we can re-use the code for cpu hotplug code as well |
120 | mov r3=1;; | 121 | * Caller should now setup b1, so we can branch once the |
121 | LOAD_PHYSICAL(p0,r2,ia64_mca_serialize);; | 122 | * tlb flush is complete. |
122 | ia64_os_mca_spin: | 123 | */ |
123 | xchg8 r4=[r2],r3;; | ||
124 | cmp.ne p6,p0=r4,r0 | ||
125 | (p6) br ia64_os_mca_spin | ||
126 | |||
127 | // Save the SAL to OS MCA handoff state as defined | ||
128 | // by SAL SPEC 3.0 | ||
129 | // NOTE : The order in which the state gets saved | ||
130 | // is dependent on the way the C-structure | ||
131 | // for ia64_mca_sal_to_os_state_t has been | ||
132 | // defined in include/asm/mca.h | ||
133 | SAL_TO_OS_MCA_HANDOFF_STATE_SAVE(r2) | ||
134 | ;; | ||
135 | |||
136 | // LOG PROCESSOR STATE INFO FROM HERE ON.. | ||
137 | begin_os_mca_dump: | ||
138 | br ia64_os_mca_proc_state_dump;; | ||
139 | |||
140 | ia64_os_mca_done_dump: | ||
141 | |||
142 | LOAD_PHYSICAL(p0,r16,ia64_sal_to_os_handoff_state+56) | ||
143 | ;; | ||
144 | ld8 r18=[r16] // Get processor state parameter on existing PALE_CHECK. | ||
145 | ;; | ||
146 | tbit.nz p6,p7=r18,60 | ||
147 | (p7) br.spnt done_tlb_purge_and_reload | ||
148 | |||
149 | // The following code purges TC and TR entries. Then reload all TC entries. | ||
150 | // Purge percpu data TC entries. | ||
151 | begin_tlb_purge_and_reload: | ||
152 | 124 | ||
125 | ia64_do_tlb_purge: | ||
153 | #define O(member) IA64_CPUINFO_##member##_OFFSET | 126 | #define O(member) IA64_CPUINFO_##member##_OFFSET |
154 | 127 | ||
155 | GET_THIS_PADDR(r2, cpu_info) // load phys addr of cpu_info into r2 | 128 | GET_THIS_PADDR(r2, cpu_info) // load phys addr of cpu_info into r2 |
@@ -230,6 +203,51 @@ begin_tlb_purge_and_reload: | |||
230 | ;; | 203 | ;; |
231 | srlz.i | 204 | srlz.i |
232 | ;; | 205 | ;; |
206 | // Now branch away to caller. | ||
207 | br.sptk.many b1 | ||
208 | ;; | ||
209 | |||
210 | ia64_os_mca_dispatch: | ||
211 | |||
212 | // Serialize all MCA processing | ||
213 | mov r3=1;; | ||
214 | LOAD_PHYSICAL(p0,r2,ia64_mca_serialize);; | ||
215 | ia64_os_mca_spin: | ||
216 | xchg8 r4=[r2],r3;; | ||
217 | cmp.ne p6,p0=r4,r0 | ||
218 | (p6) br ia64_os_mca_spin | ||
219 | |||
220 | // Save the SAL to OS MCA handoff state as defined | ||
221 | // by SAL SPEC 3.0 | ||
222 | // NOTE : The order in which the state gets saved | ||
223 | // is dependent on the way the C-structure | ||
224 | // for ia64_mca_sal_to_os_state_t has been | ||
225 | // defined in include/asm/mca.h | ||
226 | SAL_TO_OS_MCA_HANDOFF_STATE_SAVE(r2) | ||
227 | ;; | ||
228 | |||
229 | // LOG PROCESSOR STATE INFO FROM HERE ON.. | ||
230 | begin_os_mca_dump: | ||
231 | br ia64_os_mca_proc_state_dump;; | ||
232 | |||
233 | ia64_os_mca_done_dump: | ||
234 | |||
235 | LOAD_PHYSICAL(p0,r16,ia64_sal_to_os_handoff_state+56) | ||
236 | ;; | ||
237 | ld8 r18=[r16] // Get processor state parameter on existing PALE_CHECK. | ||
238 | ;; | ||
239 | tbit.nz p6,p7=r18,60 | ||
240 | (p7) br.spnt done_tlb_purge_and_reload | ||
241 | |||
242 | // The following code purges TC and TR entries. Then reload all TC entries. | ||
243 | // Purge percpu data TC entries. | ||
244 | begin_tlb_purge_and_reload: | ||
245 | movl r18=ia64_reload_tr;; | ||
246 | LOAD_PHYSICAL(p0,r18,ia64_reload_tr);; | ||
247 | mov b1=r18;; | ||
248 | br.sptk.many ia64_do_tlb_purge;; | ||
249 | |||
250 | ia64_reload_tr: | ||
233 | // Finally reload the TR registers. | 251 | // Finally reload the TR registers. |
234 | // 1. Reload DTR/ITR registers for kernel. | 252 | // 1. Reload DTR/ITR registers for kernel. |
235 | mov r18=KERNEL_TR_PAGE_SHIFT<<2 | 253 | mov r18=KERNEL_TR_PAGE_SHIFT<<2 |