All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Anshuman Khandual <khandual@linux.vnet.ibm.com>,
	Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com>
Cc: linuxppc-dev <linuxppc-dev@ozlabs.org>,
	Paul Mackerras <paulus@samba.org>,
	Anton Blanchard <anton@samba.org>
Subject: Re: [PATCH] powerpc: Fix the corrupt r3 error during MCE handling.
Date: Mon, 15 Jul 2013 11:36:16 +0530	[thread overview]
Message-ID: <87k3ksjr1j.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <51DE4887.6050206@linux.vnet.ibm.com>

Anshuman Khandual <khandual@linux.vnet.ibm.com> writes:

> On 07/10/2013 06:32 PM, Mahesh J Salgaonkar wrote:
>> From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
>> 
>> During Machine Check interrupt on pseries platform, R3 generally points to
>> memory region inside RTAS (FWNMI) area. We see r3 corruption because when RTAS
>> delivers the machine check exception it passes the address inside FWNMI area
>> with the top most bit set. This patch fixes this issue by masking top two bit
>> in machine check exception handler.
>> 
>> Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
>> ---
>>  arch/powerpc/platforms/pseries/ras.c |    3 +++
>>  1 file changed, 3 insertions(+)
>> 
>> diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c
>> index 7b3cbde..721c058 100644
>> --- a/arch/powerpc/platforms/pseries/ras.c
>> +++ b/arch/powerpc/platforms/pseries/ras.c
>> @@ -287,6 +287,9 @@ static struct rtas_error_log *fwnmi_get_errinfo(struct pt_regs *regs)
>>  	unsigned long *savep;
>>  	struct rtas_error_log *h, *errhdr = NULL;
>> 
>> +	/* Mask top two bits */
>> +	regs->gpr[3] &= ~(0x3UL << 62);
>
> We need to replace this "62" with a shift macro specifying the significance
> of these top two address bits in the real mode.

huh??

(gdb) p/t 0x3ull << 62
$4 = 1100000000000000000000000000000000000000000000000000000000000000

Why you need an extra comment to explain 62. But yes, we can possibly
write that this is an RTAS bug

-aneesh

  reply	other threads:[~2013-07-15  6:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10 13:02 [PATCH] powerpc: Fix the corrupt r3 error during MCE handling Mahesh J Salgaonkar
2013-07-10 14:11 ` Aneesh Kumar K.V
2013-07-11  4:34   ` Mahesh Jagannath Salgaonkar
2013-07-11  4:42     ` Benjamin Herrenschmidt
2013-07-11  5:54 ` Anshuman Khandual
2013-07-15  6:06   ` Aneesh Kumar K.V [this message]
2013-07-15  6:18     ` Anshuman Khandual

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=87k3ksjr1j.fsf@linux.vnet.ibm.com \
    --to=aneesh.kumar@linux.vnet.ibm.com \
    --cc=anton@samba.org \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mahesh@linux.vnet.ibm.com \
    --cc=paulus@samba.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.