2010-06-30 20:56:31

by Timur Tabi

[permalink] [raw]
Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port

On Mon, Mar 8, 2010 at 2:10 PM, Alexandre Bounine <[email protected]> wrote:
>
> From: Alexandre Bounine <[email protected]>
>
> Add Machine Check exception handling into RapidIO port driver
> for Freescale SoCs (MPC85xx).
>
> Signed-off-by: Alexandre Bounine <[email protected]>
> Tested-by: Thomas Moll <[email protected]>
...

> +static int fsl_rio_mcheck_exception(struct pt_regs *regs)
> +{
> + ? ? ? const struct exception_table_entry *entry = NULL;
> + ? ? ? unsigned long reason = (mfspr(SPRN_MCSR) & MCSR_MASK);

MCSR_MASK is not defined anywhere, so when I compile this code, I get this:

CC arch/powerpc/sysdev/fsl_rio.o
arch/powerpc/sysdev/fsl_rio.c: In function 'fsl_rio_mcheck_exception':
arch/powerpc/sysdev/fsl_rio.c:248: error: 'MCSR_MASK' undeclared
(first use in this function)
arch/powerpc/sysdev/fsl_rio.c:248: error: (Each undeclared identifier
is reported only once
arch/powerpc/sysdev/fsl_rio.c:248: error: for each function it appears in.)

--
Timur Tabi
Linux kernel developer at Freescale


2010-06-30 21:01:28

by Timur Tabi

[permalink] [raw]
Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port

On Wed, Jun 30, 2010 at 3:55 PM, Timur Tabi <[email protected]> wrote:

> MCSR_MASK is not defined anywhere, so when I compile this code, I get this:

Never mind. I see that it's been fixed already, and that the patch
that removed MCSR_MASK was posted around the same time that this patch
was posted.


--
Timur Tabi
Linux kernel developer at Freescale

2010-08-03 06:06:35

by Michael Neuling

[permalink] [raw]
Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port

> > MCSR_MASK is not defined anywhere, so when I compile this code, I get this:
>
> Never mind. I see that it's been fixed already, and that the patch
> that removed MCSR_MASK was posted around the same time that this patch
> was posted.

I don't know what happened here but 2.6.35 is broken because of this
problem:

arch/powerpc/sysdev/fsl_rio.c:248: error: 'MCSR_MASK' undeclared (first use in this function)
arch/powerpc/sysdev/fsl_rio.c:248: error: (Each undeclared identifier is reported only once
arch/powerpc/sysdev/fsl_rio.c:248: error: for each function it appears in.)
arch/powerpc/sysdev/fsl_rio.c:250: error: 'MCSR_BUS_RBERR' undeclared (first use in this function)

Mikey

2010-08-03 12:26:53

by Bounine, Alexandre

[permalink] [raw]
Subject: RE: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port

This happened after change to book-e definitions.
There are patches that address this issue.

> -----Original Message-----
> From: Michael Neuling [mailto:[email protected]]
> Sent: Tuesday, August 03, 2010 2:07 AM
> To: Timur Tabi
> Cc: Alexandre Bounine; [email protected];
[email protected];
> [email protected]
> Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO
port
>
> > > MCSR_MASK is not defined anywhere, so when I compile this code, I
get this:
> >
> > Never mind. I see that it's been fixed already, and that the patch
> > that removed MCSR_MASK was posted around the same time that this
patch
> > was posted.
>
> I don't know what happened here but 2.6.35 is broken because of this
> problem:
>
> arch/powerpc/sysdev/fsl_rio.c:248: error: 'MCSR_MASK' undeclared
(first use in this function)
> arch/powerpc/sysdev/fsl_rio.c:248: error: (Each undeclared identifier
is reported only once
> arch/powerpc/sysdev/fsl_rio.c:248: error: for each function it appears
in.)
> arch/powerpc/sysdev/fsl_rio.c:250: error: 'MCSR_BUS_RBERR' undeclared
(first use in this function)
>
> Mikey

2010-08-03 13:02:24

by Timur Tabi

[permalink] [raw]
Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port

On Tue, Aug 3, 2010 at 7:17 AM, Bounine, Alexandre
<[email protected]> wrote:
> This happened after change to book-e definitions.
> There are patches that address this issue.

And those patches should have been applied before 2.6.35 was released.
Someone dropped the ball. 2.6.35 is broken for a number of PowerPC
boards:

$ make mpc85xx_defconfig
...
$ make
...
CC arch/powerpc/sysdev/fsl_rio.o
arch/powerpc/sysdev/fsl_rio.c: In function 'fsl_rio_mcheck_exception':
arch/powerpc/sysdev/fsl_rio.c:248: error: 'MCSR_MASK' undeclared
(first use in this function)
arch/powerpc/sysdev/fsl_rio.c:248: error: (Each undeclared identifier
is reported only once
arch/powerpc/sysdev/fsl_rio.c:248: error: for each function it appears in.)
make[1]: *** [arch/powerpc/sysdev/fsl_rio.o] Error 1

--
Timur Tabi
Linux kernel developer at Freescale

2010-08-03 13:25:09

by Bounine, Alexandre

[permalink] [raw]
Subject: RE: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port

Yang Li pointed to these patches in his post from July 23, 2010.
It would be nice to have these patches in mainline code.

> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of
Timur Tabi
> Sent: Tuesday, August 03, 2010 9:02 AM
> To: Bounine, Alexandre
> Cc: Michael Neuling; Alexandre Bounine; [email protected];
[email protected];
> [email protected]; Kumar Gala
> Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO
port
>
> On Tue, Aug 3, 2010 at 7:17 AM, Bounine, Alexandre
> <[email protected]> wrote:
> > This happened after change to book-e definitions.
> > There are patches that address this issue.
>
> And those patches should have been applied before 2.6.35 was released.
> Someone dropped the ball. 2.6.35 is broken for a number of PowerPC
> boards:
>
> $ make mpc85xx_defconfig
> ....
> $ make
> ....
> CC arch/powerpc/sysdev/fsl_rio.o
> arch/powerpc/sysdev/fsl_rio.c: In function 'fsl_rio_mcheck_exception':
> arch/powerpc/sysdev/fsl_rio.c:248: error: 'MCSR_MASK' undeclared
> (first use in this function)
> arch/powerpc/sysdev/fsl_rio.c:248: error: (Each undeclared identifier
> is reported only once
> arch/powerpc/sysdev/fsl_rio.c:248: error: for each function it appears
in.)
> make[1]: *** [arch/powerpc/sysdev/fsl_rio.o] Error 1
>
> --
> Timur Tabi
> Linux kernel developer at Freescale

2010-08-05 03:34:23

by Michael Neuling

[permalink] [raw]
Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port



In message <0CE8B6BE3C4AD74AB97D9D29BD24E552011430BC@CORPEXCH1.na.ads.idt.com> you wrote:
> Yang Li pointed to these patches in his post from July 23, 2010.
> It would be nice to have these patches in mainline code.=20

This is still broken in Kumar's latest tree. Do you guys wanna repost
them so Kumar can pick them up easily?

Mikey

>
> > -----Original Message-----
> > From: [email protected] [mailto:[email protected]] On Behalf Of
> Timur Tabi
> > Sent: Tuesday, August 03, 2010 9:02 AM
> > To: Bounine, Alexandre
> > Cc: Michael Neuling; Alexandre Bounine; [email protected];
> [email protected];
> > [email protected]; Kumar Gala
> > Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO
> port
> >=20
> > On Tue, Aug 3, 2010 at 7:17 AM, Bounine, Alexandre
> > <[email protected]> wrote:
> > > This happened after change to book-e definitions.
> > > There are patches that address this issue.
> >=20
> > And those patches should have been applied before 2.6.35 was released.
> > Someone dropped the ball. 2.6.35 is broken for a number of PowerPC
> > boards:
> >=20
> > $ make mpc85xx_defconfig
> > ....
> > $ make
> > ....
> > CC arch/powerpc/sysdev/fsl_rio.o
> > arch/powerpc/sysdev/fsl_rio.c: In function 'fsl_rio_mcheck_exception':
> > arch/powerpc/sysdev/fsl_rio.c:248: error: 'MCSR_MASK' undeclared
> > (first use in this function)
> > arch/powerpc/sysdev/fsl_rio.c:248: error: (Each undeclared identifier
> > is reported only once
> > arch/powerpc/sysdev/fsl_rio.c:248: error: for each function it appears
> in.)
> > make[1]: *** [arch/powerpc/sysdev/fsl_rio.o] Error 1
> >=20
> > --
> > Timur Tabi
> > Linux kernel developer at Freescale
>

2010-08-05 17:25:42

by Bounine, Alexandre

[permalink] [raw]
Subject: RE: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port

Below is a copy of Leo's message with pointers to the patches.

Alex.

>Subject: [PATCH] RapidIO,powerpc/85xx: remove MCSR_MASK in fsl_rio
>
>Fixes compile problem caused by MCSR_MASK removal from book-E
definitions.

Hi Alex,

Only with your patch, there will still be problem on SRIO platforms
other than MPC85xx.

I have posted a patch series to fix this together with several
compatibility issues a month before.

http://patchwork.ozlabs.org/patch/56135/
http://patchwork.ozlabs.org/patch/56136/
http://patchwork.ozlabs.org/patch/56138/
http://patchwork.ozlabs.org/patch/56137/


Can anyone pick the patch series quickly as currently there is a compile
error when SRIO is enabled.

- Leo


> -----Original Message-----
> From: Michael Neuling [mailto:[email protected]]
> Sent: Wednesday, August 04, 2010 11:34 PM
> To: Bounine, Alexandre
> Cc: Timur Tabi; Alexandre Bounine; [email protected];
[email protected];
> [email protected]; Kumar Gala
> Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO
port
>
>
>
> In message
<0CE8B6BE3C4AD74AB97D9D29BD24E552011430BC@CORPEXCH1.na.ads.idt.com> you
wrote:
> > Yang Li pointed to these patches in his post from July 23, 2010.
> > It would be nice to have these patches in mainline code.=20
>
> This is still broken in Kumar's latest tree. Do you guys wanna repost
> them so Kumar can pick them up easily?
>
> Mikey
>
> >
> > > -----Original Message-----
> > > From: [email protected] [mailto:[email protected]] On Behalf
Of
> > Timur Tabi
> > > Sent: Tuesday, August 03, 2010 9:02 AM
> > > To: Bounine, Alexandre
> > > Cc: Michael Neuling; Alexandre Bounine;
[email protected];
> > [email protected];
> > > [email protected]; Kumar Gala
> > > Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for
SRIO
> > port
> > >=20
> > > On Tue, Aug 3, 2010 at 7:17 AM, Bounine, Alexandre
> > > <[email protected]> wrote:
> > > > This happened after change to book-e definitions.
> > > > There are patches that address this issue.
> > >=20
> > > And those patches should have been applied before 2.6.35 was
released.
> > > Someone dropped the ball. 2.6.35 is broken for a number of
PowerPC
> > > boards:
> > >=20
> > > $ make mpc85xx_defconfig
> > > ....
> > > $ make
> > > ....
> > > CC arch/powerpc/sysdev/fsl_rio.o
> > > arch/powerpc/sysdev/fsl_rio.c: In function
'fsl_rio_mcheck_exception':
> > > arch/powerpc/sysdev/fsl_rio.c:248: error: 'MCSR_MASK' undeclared
> > > (first use in this function)
> > > arch/powerpc/sysdev/fsl_rio.c:248: error: (Each undeclared
identifier
> > > is reported only once
> > > arch/powerpc/sysdev/fsl_rio.c:248: error: for each function it
appears
> > in.)
> > > make[1]: *** [arch/powerpc/sysdev/fsl_rio.o] Error 1
> > >=20
> > > --
> > > Timur Tabi
> > > Linux kernel developer at Freescale
> >

2010-08-05 17:53:53

by Kumar Gala

[permalink] [raw]
Subject: Re: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port


On Aug 5, 2010, at 12:25 PM, Bounine, Alexandre wrote:

> Below is a copy of Leo's message with pointers to the patches.
>
> Alex.
>
>> Subject: [PATCH] RapidIO,powerpc/85xx: remove MCSR_MASK in fsl_rio
>>
>> Fixes compile problem caused by MCSR_MASK removal from book-E
> definitions.
>
> Hi Alex,
>
> Only with your patch, there will still be problem on SRIO platforms
> other than MPC85xx.
>
> I have posted a patch series to fix this together with several
> compatibility issues a month before.
>
> http://patchwork.ozlabs.org/patch/56135/
> http://patchwork.ozlabs.org/patch/56136/
> http://patchwork.ozlabs.org/patch/56138/
> http://patchwork.ozlabs.org/patch/56137/
>
>
> Can anyone pick the patch series quickly as currently there is a compile
> error when SRIO is enabled.
>
> - Leo

I'm looking at this now and wondering what we added the mcheck handler for in the first place and what its trying to accomplish.

- k

2010-08-05 18:18:20

by Bounine, Alexandre

[permalink] [raw]
Subject: RE: [PATCH v2 5/7] powerpc/85xx: Add MChk handler for SRIO port

> I'm looking at this now and wondering what we added the mcheck handler
for in the first place and what
> its trying to accomplish.
>
> - k

This protects system from hanging if RIO link fails or enters error
state. In some situations following maintenance read may initiate link
recovery from error state.

As it is now, MCheck mostly prevents system from hanging, but it also
adds sense to return status of maintenance read routine. I am using
return status in my new set of patches to check if RIO link is valid
during error recovery.

Alex.