linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Ganesh <ganeshgr@linux.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@lists.ozlabs.org
Cc: mikey@neuling.org, mahesh@linux.ibm.com, npiggin@gmail.com
Subject: Re: [PATCH v2 1/3] powerpc/pseries: Parse control memory access error
Date: Wed, 25 Aug 2021 16:33:40 +0530	[thread overview]
Message-ID: <9734b599-eb00-a1d6-cd3c-ed6d0441f240@linux.ibm.com> (raw)
In-Reply-To: <87eeajcpmq.fsf@mpe.ellerman.id.au>

[-- Attachment #1: Type: text/plain, Size: 2659 bytes --]


On 8/24/21 12:09 PM, Michael Ellerman wrote:

> Hi Ganesh,
>
> Some comments below ...
>
> Ganesh Goudar <ganeshgr@linux.ibm.com> writes:
>> Add support to parse and log control memory access
>> error for pseries.
>>
>> Signed-off-by: Ganesh Goudar <ganeshgr@linux.ibm.com>
>> ---
>> v2: No changes in this patch.
>> ---
>>   arch/powerpc/platforms/pseries/ras.c | 21 +++++++++++++++++++++
>>   1 file changed, 21 insertions(+)
>>
>> diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c
>> index 167f2e1b8d39..608c35cad0c3 100644
>> --- a/arch/powerpc/platforms/pseries/ras.c
>> +++ b/arch/powerpc/platforms/pseries/ras.c
>> @@ -80,6 +80,7 @@ struct pseries_mc_errorlog {
>>   #define MC_ERROR_TYPE_TLB		0x04
>>   #define MC_ERROR_TYPE_D_CACHE		0x05
>>   #define MC_ERROR_TYPE_I_CACHE		0x07
>> +#define MC_ERROR_TYPE_CTRL_MEM_ACCESS	0x08
> ...
>>   
>> +#define MC_ERROR_CTRL_MEM_ACCESS_PTABLE_WALK	0
>> +#define MC_ERROR_CTRL_MEM_ACCESS_OP_ACCESS	1
>
> Where do the above values come from?

It is from latest PAPR that added support for control memory error.

>> +
>>   static inline u8 rtas_mc_error_sub_type(const struct pseries_mc_errorlog *mlog)
>>   {
>>   	switch (mlog->error_type) {
>> @@ -112,6 +116,8 @@ static inline u8 rtas_mc_error_sub_type(const struct pseries_mc_errorlog *mlog)
>>   	case	MC_ERROR_TYPE_ERAT:
>>   	case	MC_ERROR_TYPE_TLB:
>>   		return (mlog->sub_err_type & 0x03);
>> +	case	MC_ERROR_TYPE_CTRL_MEM_ACCESS:
>> +		return (mlog->sub_err_type & 0x70) >> 4;
> Can you add to the comment above sub_err_type explaining what these bits are.

Sure, for other errors it is explained in pseries_mc_errorlog definition, ill add it there.

>>   	default:
>>   		return 0;
>>   	}
>> @@ -699,6 +705,21 @@ static int mce_handle_err_virtmode(struct pt_regs *regs,
>>   	case MC_ERROR_TYPE_I_CACHE:
>>   		mce_err.error_type = MCE_ERROR_TYPE_ICACHE;
>>   		break;
>> +	case MC_ERROR_TYPE_CTRL_MEM_ACCESS:
>> +		mce_err.error_type = MCE_ERROR_TYPE_RA;
>> +		if (mce_log->sub_err_type & 0x80)
> This appears many times in the file.
>
> Can we add eg. MC_EFFECTIVE_ADDR_PROVIDED?

ok, thanks.

>> +			eaddr = be64_to_cpu(mce_log->effective_address);
>> +		switch (err_sub_type) {
>> +		case MC_ERROR_CTRL_MEM_ACCESS_PTABLE_WALK:
>> +			mce_err.u.ra_error_type =
>> +				MCE_RA_ERROR_PAGE_TABLE_WALK_LOAD_STORE_FOREIGN;
> That name is ridiculously long, but I guess that's not your fault :)
> We can fix it up in a later patch.
>
>> +			break;
>> +		case MC_ERROR_CTRL_MEM_ACCESS_OP_ACCESS:
>> +			mce_err.u.ra_error_type =
>> +				MCE_RA_ERROR_LOAD_STORE_FOREIGN;
>> +			break;
>> +		}
>> +		break;
> cheers

[-- Attachment #2: Type: text/html, Size: 4268 bytes --]

  parent reply	other threads:[~2021-08-25 12:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-05  9:20 [PATCH v2 1/3] powerpc/pseries: Parse control memory access error Ganesh Goudar
2021-08-05  9:20 ` [PATCH v2 2/3] selftests/powerpc: Add test for real address error handling Ganesh Goudar
2021-08-24 12:48   ` Michael Ellerman
2021-08-25 11:31     ` Ganesh
2021-08-26  3:27       ` Michael Ellerman
2021-08-26 12:57         ` Ganesh
2021-08-05  9:20 ` [PATCH v2 3/3] powerpc/mce: Modify the real address error logging messages Ganesh Goudar
2021-08-23 18:53 ` [PATCH v2 1/3] powerpc/pseries: Parse control memory access error Ganesh
2021-08-24  6:39 ` Michael Ellerman
2021-08-24 21:24   ` Segher Boessenkool
2021-08-25 11:36     ` Ganesh
2021-08-25 14:47       ` Segher Boessenkool
2021-08-25 11:03   ` Ganesh [this message]
2021-08-26  2:36     ` Michael Ellerman

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=9734b599-eb00-a1d6-cd3c-ed6d0441f240@linux.ibm.com \
    --to=ganeshgr@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mahesh@linux.ibm.com \
    --cc=mikey@neuling.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).