Message ID | 1276842263-4186-1-git-send-email-leoli@freescale.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Kumar Gala |
Headers | show |
On Jun 18, 2010, at 1:24 AM, Li Yang wrote: > Fixes the following compile problem on E500 platforms: > 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) > > Also fixes the compile problem on non-E500 platforms. > > Signed-off-by: Li Yang <leoli@freescale.com> > --- > arch/powerpc/sysdev/fsl_rio.c | 6 +++++- > 1 files changed, 5 insertions(+), 1 deletions(-) I'm confused is this handler not relevant for e500MC? The 2nd patch makes me thing it is. > > diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c > index 30e1626..f908ba6 100644 > --- a/arch/powerpc/sysdev/fsl_rio.c > +++ b/arch/powerpc/sysdev/fsl_rio.c > @@ -240,12 +240,13 @@ struct rio_priv { > > static void __iomem *rio_regs_win; > > +#ifdef CONFIG_E500 > static int (*saved_mcheck_exception)(struct pt_regs *regs); > > 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); > + unsigned long reason = mfspr(SPRN_MCSR); > > if (reason & MCSR_BUS_RBERR) { > reason = in_be32((u32 *)(rio_regs_win + RIO_LTLEDCSR)); > @@ -269,6 +270,7 @@ static int fsl_rio_mcheck_exception(struct pt_regs *regs) > else > return cur_cpu_spec->machine_check(regs); > } > +#endif > > /** > * fsl_rio_doorbell_send - Send a MPC85xx doorbell message > @@ -1517,8 +1519,10 @@ int fsl_rio_setup(struct of_device *dev) > fsl_rio_doorbell_init(port); > fsl_rio_port_write_init(port); > > +#ifdef CONFIG_E500 > saved_mcheck_exception = ppc_md.machine_check_exception; > ppc_md.machine_check_exception = fsl_rio_mcheck_exception; > +#endif > /* Ensure that RFXE is set */ > mtspr(SPRN_HID1, (mfspr(SPRN_HID1) | 0x20000)); > > -- > 1.6.4
On Thu, 5 Aug 2010 12:39:48 -0500 Kumar Gala <galak@kernel.crashing.org> wrote: > > On Jun 18, 2010, at 1:24 AM, Li Yang wrote: > > > Fixes the following compile problem on E500 platforms: > > 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) > > > > Also fixes the compile problem on non-E500 platforms. > > > > Signed-off-by: Li Yang <leoli@freescale.com> > > --- > > arch/powerpc/sysdev/fsl_rio.c | 6 +++++- > > 1 files changed, 5 insertions(+), 1 deletions(-) > > I'm confused is this handler not relevant for e500MC? The 2nd patch makes me thing it is. It is, though it needs to use a different MCSR bit on e500mc. Are you referring to the #ifdef CONFIG_E500? CONFIG_PPC_E500MC depends on CONFIG_E500... -Scott
On Aug 5, 2010, at 12:54 PM, Scott Wood wrote: > On Thu, 5 Aug 2010 12:39:48 -0500 > Kumar Gala <galak@kernel.crashing.org> wrote: > >> >> On Jun 18, 2010, at 1:24 AM, Li Yang wrote: >> >>> Fixes the following compile problem on E500 platforms: >>> 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) >>> >>> Also fixes the compile problem on non-E500 platforms. >>> >>> Signed-off-by: Li Yang <leoli@freescale.com> >>> --- >>> arch/powerpc/sysdev/fsl_rio.c | 6 +++++- >>> 1 files changed, 5 insertions(+), 1 deletions(-) >> >> I'm confused is this handler not relevant for e500MC? The 2nd patch makes me thing it is. > > It is, though it needs to use a different MCSR bit on e500mc. > > Are you referring to the #ifdef CONFIG_E500? CONFIG_PPC_E500MC depends > on CONFIG_E500... Ah, that makes a bit more sense now. - k
On Jun 18, 2010, at 1:24 AM, Li Yang wrote: > Fixes the following compile problem on E500 platforms: > 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) > > Also fixes the compile problem on non-E500 platforms. > > Signed-off-by: Li Yang <leoli@freescale.com> > --- > arch/powerpc/sysdev/fsl_rio.c | 6 +++++- > 1 files changed, 5 insertions(+), 1 deletions(-) applied to merge - k
On Wed, Sep 1, 2010 at 5:39 AM, Kumar Gala <galak@kernel.crashing.org> wrote: > > On Jun 18, 2010, at 1:24 AM, Li Yang wrote: > >> Fixes the following compile problem on E500 platforms: >> 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) >> >> Also fixes the compile problem on non-E500 platforms. >> >> Signed-off-by: Li Yang <leoli@freescale.com> >> --- >> arch/powerpc/sysdev/fsl_rio.c | 6 +++++- >> 1 files changed, 5 insertions(+), 1 deletions(-) > > applied to merge Thanks, Kumar. How about the other ones in the series? - Leo
On Aug 31, 2010, at 10:40 PM, Li Yang wrote: > On Wed, Sep 1, 2010 at 5:39 AM, Kumar Gala <galak@kernel.crashing.org> wrote: >> >> On Jun 18, 2010, at 1:24 AM, Li Yang wrote: >> >>> Fixes the following compile problem on E500 platforms: >>> 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) >>> >>> Also fixes the compile problem on non-E500 platforms. >>> >>> Signed-off-by: Li Yang <leoli@freescale.com> >>> --- >>> arch/powerpc/sysdev/fsl_rio.c | 6 +++++- >>> 1 files changed, 5 insertions(+), 1 deletions(-) >> >> applied to merge > > Thanks, Kumar. > > How about the other ones in the series? I want to rework how the whole RIO mcheck works and will do so for 2.6.37. Part of the problem I have is that we are ignoring the fact that this code isn't right for 8641 support of SRIO. - k
>Subject: Re: [PATCH v2 1/4] fsl_rio: fix compile errors > > >On Aug 31, 2010, at 10:40 PM, Li Yang wrote: > >> On Wed, Sep 1, 2010 at 5:39 AM, Kumar Gala <galak@kernel.crashing.org> >wrote: >>> >>> On Jun 18, 2010, at 1:24 AM, Li Yang wrote: >>> >>>> Fixes the following compile problem on E500 platforms: >>>> 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) >>>> >>>> Also fixes the compile problem on non-E500 platforms. >>>> >>>> Signed-off-by: Li Yang <leoli@freescale.com> >>>> --- >>>> arch/powerpc/sysdev/fsl_rio.c | 6 +++++- >>>> 1 files changed, 5 insertions(+), 1 deletions(-) >>> >>> applied to merge >> >> Thanks, Kumar. >> >> How about the other ones in the series? > >I want to rework how the whole RIO mcheck works and will do so for 2.6.37. >Part of the problem I have is that we are ignoring the fact that this code >isn't right for 8641 support of SRIO. Right. So I protected the code with #ifdef CONFIG_E500. The following patches in series enable it to be used by e500mc. Having it to support all platforms is surely the best, but before that we can make it better. And I believe they wouldn't get in the way of further MPC8641 support. - Leo
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index 30e1626..f908ba6 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c @@ -240,12 +240,13 @@ struct rio_priv { static void __iomem *rio_regs_win; +#ifdef CONFIG_E500 static int (*saved_mcheck_exception)(struct pt_regs *regs); 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); + unsigned long reason = mfspr(SPRN_MCSR); if (reason & MCSR_BUS_RBERR) { reason = in_be32((u32 *)(rio_regs_win + RIO_LTLEDCSR)); @@ -269,6 +270,7 @@ static int fsl_rio_mcheck_exception(struct pt_regs *regs) else return cur_cpu_spec->machine_check(regs); } +#endif /** * fsl_rio_doorbell_send - Send a MPC85xx doorbell message @@ -1517,8 +1519,10 @@ int fsl_rio_setup(struct of_device *dev) fsl_rio_doorbell_init(port); fsl_rio_port_write_init(port); +#ifdef CONFIG_E500 saved_mcheck_exception = ppc_md.machine_check_exception; ppc_md.machine_check_exception = fsl_rio_mcheck_exception; +#endif /* Ensure that RFXE is set */ mtspr(SPRN_HID1, (mfspr(SPRN_HID1) | 0x20000));
Fixes the following compile problem on E500 platforms: 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) Also fixes the compile problem on non-E500 platforms. Signed-off-by: Li Yang <leoli@freescale.com> --- arch/powerpc/sysdev/fsl_rio.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)