diff options
Diffstat (limited to 'arch/powerpc/sysdev/fsl_rio.c')
| -rw-r--r-- | arch/powerpc/sysdev/fsl_rio.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c index 5b206a2fe17c..b3fd081d56f5 100644 --- a/arch/powerpc/sysdev/fsl_rio.c +++ b/arch/powerpc/sysdev/fsl_rio.c | |||
| @@ -283,23 +283,24 @@ static void __iomem *rio_regs_win; | |||
| 283 | #ifdef CONFIG_E500 | 283 | #ifdef CONFIG_E500 |
| 284 | int fsl_rio_mcheck_exception(struct pt_regs *regs) | 284 | int fsl_rio_mcheck_exception(struct pt_regs *regs) |
| 285 | { | 285 | { |
| 286 | const struct exception_table_entry *entry = NULL; | 286 | const struct exception_table_entry *entry; |
| 287 | unsigned long reason = mfspr(SPRN_MCSR); | 287 | unsigned long reason; |
| 288 | 288 | ||
| 289 | if (reason & MCSR_BUS_RBERR) { | 289 | if (!rio_regs_win) |
| 290 | reason = in_be32((u32 *)(rio_regs_win + RIO_LTLEDCSR)); | 290 | return 0; |
| 291 | if (reason & (RIO_LTLEDCSR_IER | RIO_LTLEDCSR_PRT)) { | 291 | |
| 292 | /* Check if we are prepared to handle this fault */ | 292 | reason = in_be32((u32 *)(rio_regs_win + RIO_LTLEDCSR)); |
| 293 | entry = search_exception_tables(regs->nip); | 293 | if (reason & (RIO_LTLEDCSR_IER | RIO_LTLEDCSR_PRT)) { |
| 294 | if (entry) { | 294 | /* Check if we are prepared to handle this fault */ |
| 295 | pr_debug("RIO: %s - MC Exception handled\n", | 295 | entry = search_exception_tables(regs->nip); |
| 296 | __func__); | 296 | if (entry) { |
| 297 | out_be32((u32 *)(rio_regs_win + RIO_LTLEDCSR), | 297 | pr_debug("RIO: %s - MC Exception handled\n", |
| 298 | 0); | 298 | __func__); |
| 299 | regs->msr |= MSR_RI; | 299 | out_be32((u32 *)(rio_regs_win + RIO_LTLEDCSR), |
| 300 | regs->nip = entry->fixup; | 300 | 0); |
| 301 | return 1; | 301 | regs->msr |= MSR_RI; |
| 302 | } | 302 | regs->nip = entry->fixup; |
| 303 | return 1; | ||
| 303 | } | 304 | } |
| 304 | } | 305 | } |
| 305 | 306 | ||
