From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 49679B6EFF for ; Fri, 6 Aug 2010 03:39:56 +1000 (EST) Subject: Re: [PATCH v2 1/4] fsl_rio: fix compile errors Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Kumar Gala In-Reply-To: <1276842263-4186-1-git-send-email-leoli@freescale.com> Date: Thu, 5 Aug 2010 12:39:48 -0500 Message-Id: References: <1276842263-4186-1-git-send-email-leoli@freescale.com> To: Li Yang Cc: linuxppc-dev@lists.ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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) >=20 > Also fixes the compile problem on non-E500 platforms. >=20 > Signed-off-by: Li Yang > --- > 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. >=20 > 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 { >=20 > static void __iomem *rio_regs_win; >=20 > +#ifdef CONFIG_E500 > static int (*saved_mcheck_exception)(struct pt_regs *regs); >=20 > static int fsl_rio_mcheck_exception(struct pt_regs *regs) > { > const struct exception_table_entry *entry =3D NULL; > - unsigned long reason =3D (mfspr(SPRN_MCSR) & MCSR_MASK); > + unsigned long reason =3D mfspr(SPRN_MCSR); >=20 > if (reason & MCSR_BUS_RBERR) { > reason =3D 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 >=20 > /** > * 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); >=20 > +#ifdef CONFIG_E500 > saved_mcheck_exception =3D ppc_md.machine_check_exception; > ppc_md.machine_check_exception =3D fsl_rio_mcheck_exception; > +#endif > /* Ensure that RFXE is set */ > mtspr(SPRN_HID1, (mfspr(SPRN_HID1) | 0x20000)); >=20 > --=20 > 1.6.4