From: Laurent Dufour <ldufour@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
paulus@samba.org
Subject: Re: [PATCH] pseries/le: Fix endiannes issue in RTAS call from xmon
Date: Thu, 15 Jan 2015 15:17:02 +0100 [thread overview]
Message-ID: <54B7CBDE.9040207@linux.vnet.ibm.com> (raw)
In-Reply-To: <1421295950.11409.3.camel@ellerman.id.au>
On 15/01/2015 05:25, Michael Ellerman wrote:
> On Mon, 2014-11-24 at 15:07 +0100, Laurent Dufour wrote:
>> On pseries system (LPAR) xmon failed to enter when running in LE mode, system
>> is hunging. Inititating xmon will lead to such an output on the console:
>>
>> SysRq : Entering xmon
>> cpu 0x15: Vector: 0 at [c0000003f39ffb10]
>> pc: c00000000007ed7c: sysrq_handle_xmon+0x5c/0x70
>> lr: c00000000007ed7c: sysrq_handle_xmon+0x5c/0x70
>> sp: c0000003f39ffc70
>> msr: 8000000000009033
>> current = 0xc0000003fafa7180
>> paca = 0xc000000007d75e80 softe: 0 irq_happened: 0x01
>> pid = 14617, comm = bash
>> Bad kernel stack pointer fafb4b0 at eca7cc4
>> cpu 0x15: Vector: 300 (Data Access) at [c000000007f07d40]
>> pc: 000000000eca7cc4
>> lr: 000000000eca7c44
>> sp: fafb4b0
>> msr: 8000000000001000
>> dar: 10000000
>> dsisr: 42000000
>> current = 0xc0000003fafa7180
>> paca = 0xc000000007d75e80 softe: 0 irq_happened: 0x01
>> pid = 14617, comm = bash
>> cpu 0x15: Exception 300 (Data Access) in xmon, returning to main loop
>> xmon: WARNING: bad recursive fault on cpu 0x15
>>
>> The root cause is that xmon is calling RTAS to turn off the surveillance
>> when entering xmon, and RTAS is requiring big endian parameters.
>>
>> This patch is byte swapping the RTAS arguments when running in LE mode.
>>
>> Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
>> ---
>> arch/powerpc/xmon/xmon.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
>> index b988b5addf86..c8efbb37d6e0 100644
>> --- a/arch/powerpc/xmon/xmon.c
>> +++ b/arch/powerpc/xmon/xmon.c
>> @@ -293,10 +293,10 @@ static inline void disable_surveillance(void)
>> args.token = rtas_token("set-indicator");
>> if (args.token == RTAS_UNKNOWN_SERVICE)
>> return;
>
> I just noticed we're not handling the token correctly here. It is be32 also.
Ouch, my mistake :(
I will drop a new patch to complete this one.
Cheers.
> cheers
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Laurent Dufour <ldufour@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
benh@kernel.crashing.org, paulus@samba.org
Subject: Re: [PATCH] pseries/le: Fix endiannes issue in RTAS call from xmon
Date: Thu, 15 Jan 2015 15:17:02 +0100 [thread overview]
Message-ID: <54B7CBDE.9040207@linux.vnet.ibm.com> (raw)
In-Reply-To: <1421295950.11409.3.camel@ellerman.id.au>
On 15/01/2015 05:25, Michael Ellerman wrote:
> On Mon, 2014-11-24 at 15:07 +0100, Laurent Dufour wrote:
>> On pseries system (LPAR) xmon failed to enter when running in LE mode, system
>> is hunging. Inititating xmon will lead to such an output on the console:
>>
>> SysRq : Entering xmon
>> cpu 0x15: Vector: 0 at [c0000003f39ffb10]
>> pc: c00000000007ed7c: sysrq_handle_xmon+0x5c/0x70
>> lr: c00000000007ed7c: sysrq_handle_xmon+0x5c/0x70
>> sp: c0000003f39ffc70
>> msr: 8000000000009033
>> current = 0xc0000003fafa7180
>> paca = 0xc000000007d75e80 softe: 0 irq_happened: 0x01
>> pid = 14617, comm = bash
>> Bad kernel stack pointer fafb4b0 at eca7cc4
>> cpu 0x15: Vector: 300 (Data Access) at [c000000007f07d40]
>> pc: 000000000eca7cc4
>> lr: 000000000eca7c44
>> sp: fafb4b0
>> msr: 8000000000001000
>> dar: 10000000
>> dsisr: 42000000
>> current = 0xc0000003fafa7180
>> paca = 0xc000000007d75e80 softe: 0 irq_happened: 0x01
>> pid = 14617, comm = bash
>> cpu 0x15: Exception 300 (Data Access) in xmon, returning to main loop
>> xmon: WARNING: bad recursive fault on cpu 0x15
>>
>> The root cause is that xmon is calling RTAS to turn off the surveillance
>> when entering xmon, and RTAS is requiring big endian parameters.
>>
>> This patch is byte swapping the RTAS arguments when running in LE mode.
>>
>> Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
>> ---
>> arch/powerpc/xmon/xmon.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
>> index b988b5addf86..c8efbb37d6e0 100644
>> --- a/arch/powerpc/xmon/xmon.c
>> +++ b/arch/powerpc/xmon/xmon.c
>> @@ -293,10 +293,10 @@ static inline void disable_surveillance(void)
>> args.token = rtas_token("set-indicator");
>> if (args.token == RTAS_UNKNOWN_SERVICE)
>> return;
>
> I just noticed we're not handling the token correctly here. It is be32 also.
Ouch, my mistake :(
I will drop a new patch to complete this one.
Cheers.
> cheers
>
>
next prev parent reply other threads:[~2015-01-15 14:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-24 14:07 [PATCH] pseries/le: Fix endiannes issue in RTAS call from xmon Laurent Dufour
2014-11-24 14:07 ` Laurent Dufour
2014-11-26 3:31 ` Michael Ellerman
2014-11-26 8:19 ` Laurent Dufour
2015-01-15 4:25 ` [PATCH] " Michael Ellerman
2015-01-15 4:25 ` Michael Ellerman
2015-01-15 14:17 ` Laurent Dufour [this message]
2015-01-15 14:17 ` Laurent Dufour
2015-01-15 17:23 ` [PATCH] pseries/le: Fix another " Laurent Dufour
2015-01-15 17:23 ` Laurent Dufour
2015-01-15 19:44 ` Tyrel Datwyler
2015-01-15 19:44 ` Tyrel Datwyler
2015-01-15 22:19 ` Michael Ellerman
2015-01-15 22:19 ` Michael Ellerman
2015-01-15 23:41 ` Tyrel Datwyler
2015-01-15 23:41 ` Tyrel Datwyler
2015-01-16 3:02 ` Michael Ellerman
2015-01-16 3:02 ` Michael Ellerman
2015-01-16 10:19 ` Laurent Dufour
2015-01-16 10:19 ` Laurent Dufour
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=54B7CBDE.9040207@linux.vnet.ibm.com \
--to=ldufour@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--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.