mce_power.c (e22a22740c1ac23aaa10835f026b3549ee3e4e75) mce_power.c (ae744f3432d3872c51298d922728e13c24ccc068)
1/*
2 * Machine check exception handling CPU-side for power7 and power8
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *

--- 134 unchanged lines hidden (view full) ---

143 if (P7_SRR1_MC_LOADSTORE(srr1))
144 handled = mce_handle_derror_p7(regs->dsisr);
145 else
146 handled = mce_handle_ierror_p7(srr1);
147
148 /* TODO: Decode machine check reason. */
149 return handled;
150}
1/*
2 * Machine check exception handling CPU-side for power7 and power8
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *

--- 134 unchanged lines hidden (view full) ---

143 if (P7_SRR1_MC_LOADSTORE(srr1))
144 handled = mce_handle_derror_p7(regs->dsisr);
145 else
146 handled = mce_handle_ierror_p7(srr1);
147
148 /* TODO: Decode machine check reason. */
149 return handled;
150}
151
152static long mce_handle_ierror_p8(uint64_t srr1)
153{
154 long handled = 0;
155
156 handled = mce_handle_common_ierror(srr1);
157
158 if (P7_SRR1_MC_IFETCH(srr1) == P8_SRR1_MC_IFETCH_ERAT_MULTIHIT) {
159 flush_and_reload_slb();
160 handled = 1;
161 }
162 return handled;
163}
164
165static long mce_handle_derror_p8(uint64_t dsisr)
166{
167 return mce_handle_derror(dsisr, P8_DSISR_MC_SLB_ERRORS);
168}
169
170long __machine_check_early_realmode_p8(struct pt_regs *regs)
171{
172 uint64_t srr1;
173 long handled = 1;
174
175 srr1 = regs->msr;
176
177 if (P7_SRR1_MC_LOADSTORE(srr1))
178 handled = mce_handle_derror_p8(regs->dsisr);
179 else
180 handled = mce_handle_ierror_p8(srr1);
181
182 /* TODO: Decode machine check reason. */
183 return handled;
184}