On 06/12/2018 07:17 PM, Michael Ellerman wrote: > Mahesh J Salgaonkar <mah...@linux.vnet.ibm.com> writes: >> diff --git a/arch/powerpc/platforms/pseries/ras.c >> b/arch/powerpc/platforms/pseries/ras.c >> index 2edc673be137..e56759d92356 100644 >> --- a/arch/powerpc/platforms/pseries/ras.c >> +++ b/arch/powerpc/platforms/pseries/ras.c >> @@ -422,6 +422,31 @@ int pSeries_system_reset_exception(struct pt_regs *regs) >> return 0; /* need to perform reset */ >> } >> >> +static int mce_handle_error(struct rtas_error_log *errp) >> +{ >> + struct pseries_errorlog *pseries_log; >> + struct pseries_mc_errorlog *mce_log; >> + int disposition = rtas_error_disposition(errp); >> + uint8_t error_type; >> + >> + pseries_log = get_pseries_errorlog(errp, PSERIES_ELOG_SECT_ID_MCE); >> + if (pseries_log == NULL) >> + goto out; >> + >> + mce_log = (struct pseries_mc_errorlog *)pseries_log->data; >> + error_type = rtas_mc_error_type(mce_log); >> + >> + if ((disposition == RTAS_DISP_NOT_RECOVERED) && >> + (error_type == PSERIES_MC_ERROR_TYPE_SLB)) { >> + slb_dump_contents(); >> + slb_flush_and_rebolt(); > > Aren't we back in virtual mode here? > > Don't we need to do the flush in real mode before turning the MMU back > on. Otherwise we'll just take another multi-hit?
Yeah for duplicate entries for kernel segment "0xc00", we will end up with another multi-hit. For other segments we won't. I think I need to move the fetching of rtas error log and handling part into real mode to avoid a loop, and do only printing part in virtual mode. > > cheers >