linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Mahesh Jagannath Salgaonkar <mahesh@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>,
	linuxppc-dev <linuxppc-dev@ozlabs.org>
Cc: Laurent Dufour <ldufour@linux.vnet.ibm.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
	Nicholas Piggin <npiggin@gmail.com>
Subject: Re: [v3 PATCH 4/5] powerpc/pseries: Dump and flush SLB contents on SLB MCE errors.
Date: Wed, 13 Jun 2018 09:15:30 +0530	[thread overview]
Message-ID: <0e1134c4-6727-2240-ffc6-d4ed4b4ecf04@linux.vnet.ibm.com> (raw)
In-Reply-To: <87lgbkt8ts.fsf@concordia.ellerman.id.au>

On 06/12/2018 07:17 PM, Michael Ellerman wrote:
> Mahesh J Salgaonkar <mahesh@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
> 

  parent reply	other threads:[~2018-06-13  3:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-07 17:27 [v3 PATCH 0/5] powerpc/pseries: Machien check handler improvements Mahesh J Salgaonkar
2018-06-07 17:28 ` [v3 PATCH 1/5] powerpc/pseries: convert rtas_log_buf to linear allocation Mahesh J Salgaonkar
2018-06-08  1:31   ` Nicholas Piggin
2018-06-08  6:16     ` Mahesh Jagannath Salgaonkar
2018-06-07 17:28 ` [v3 PATCH 2/5] powerpc/pseries: Fix endainness while restoring of r3 in MCE handler Mahesh J Salgaonkar
2018-06-08  1:33   ` Nicholas Piggin
2018-06-08  6:50   ` Michael Ellerman
2018-06-08 10:31     ` Mahesh Jagannath Salgaonkar
2018-06-07 17:28 ` [v3 PATCH 3/5] powerpc/pseries: Define MCE error event section Mahesh J Salgaonkar
2018-06-07 17:28 ` [v3 PATCH 4/5] powerpc/pseries: Dump and flush SLB contents on SLB MCE errors Mahesh J Salgaonkar
2018-06-08  1:48   ` Nicholas Piggin
2018-06-08  6:19     ` Mahesh Jagannath Salgaonkar
2018-06-12 13:47   ` Michael Ellerman
2018-06-13  2:38     ` Aneesh Kumar K.V
2018-06-13  4:06       ` Michael Ellerman
2018-06-13  4:06         ` Aneesh Kumar K.V
2018-06-13  3:45     ` Mahesh Jagannath Salgaonkar [this message]
2018-06-07 17:29 ` [v3 PATCH 5/5] powerpc/pseries: Display machine check error details Mahesh J Salgaonkar
2018-06-08  1:51   ` Nicholas Piggin
2018-06-08  6:28     ` Mahesh Jagannath Salgaonkar
2018-07-02 18:01     ` Michal Suchánek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0e1134c4-6727-2240-ffc6-d4ed4b4ecf04@linux.vnet.ibm.com \
    --to=mahesh@linux.vnet.ibm.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=ldufour@linux.vnet.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).