Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fsl_rio: fix compile errors

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>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>

authored by

Li Yang and committed by
Kumar Gala
ff33f182 dc1c41f4

+5 -1
+5 -1
arch/powerpc/sysdev/fsl_rio.c
··· 240 240 241 241 static void __iomem *rio_regs_win; 242 242 243 + #ifdef CONFIG_E500 243 244 static int (*saved_mcheck_exception)(struct pt_regs *regs); 244 245 245 246 static int fsl_rio_mcheck_exception(struct pt_regs *regs) 246 247 { 247 248 const struct exception_table_entry *entry = NULL; 248 - unsigned long reason = (mfspr(SPRN_MCSR) & MCSR_MASK); 249 + unsigned long reason = mfspr(SPRN_MCSR); 249 250 250 251 if (reason & MCSR_BUS_RBERR) { 251 252 reason = in_be32((u32 *)(rio_regs_win + RIO_LTLEDCSR)); ··· 270 269 else 271 270 return cur_cpu_spec->machine_check(regs); 272 271 } 272 + #endif 273 273 274 274 /** 275 275 * fsl_rio_doorbell_send - Send a MPC85xx doorbell message ··· 1519 1517 fsl_rio_doorbell_init(port); 1520 1518 fsl_rio_port_write_init(port); 1521 1519 1520 + #ifdef CONFIG_E500 1522 1521 saved_mcheck_exception = ppc_md.machine_check_exception; 1523 1522 ppc_md.machine_check_exception = fsl_rio_mcheck_exception; 1523 + #endif 1524 1524 /* Ensure that RFXE is set */ 1525 1525 mtspr(SPRN_HID1, (mfspr(SPRN_HID1) | 0x20000)); 1526 1526