Skip to content

Commit

Permalink
powerpc: merge machine_check_exception between ppc32 & ppc64
Browse files Browse the repository at this point in the history
Make machine_check_exception handling code path the same on ppc32 & ppc64.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
  • Loading branch information
Kumar Gala committed Mar 31, 2006
1 parent 15e812a commit 1a6a4ff
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions arch/powerpc/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ void system_reset_exception(struct pt_regs *regs)
*/
static inline int check_io_access(struct pt_regs *regs)
{
#ifdef CONFIG_PPC_PMAC
#if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32)
unsigned long msr = regs->msr;
const struct exception_table_entry *entry;
unsigned int *nip = (unsigned int *)regs->nip;
Expand Down Expand Up @@ -261,7 +261,7 @@ static inline int check_io_access(struct pt_regs *regs)
return 1;
}
}
#endif /* CONFIG_PPC_PMAC */
#endif /* CONFIG_PPC_PMAC && CONFIG_PPC32 */
return 0;
}

Expand Down Expand Up @@ -308,17 +308,15 @@ platform_machine_check(struct pt_regs *regs)

void machine_check_exception(struct pt_regs *regs)
{
#ifdef CONFIG_PPC64
int recover = 0;
unsigned long reason = get_mc_reason(regs);

/* See if any machine dependent calls */
if (ppc_md.machine_check_exception)
recover = ppc_md.machine_check_exception(regs);

if (recover)
return;
#else
unsigned long reason = get_mc_reason(regs);

if (user_mode(regs)) {
regs->msr |= MSR_RI;
Expand Down Expand Up @@ -462,7 +460,6 @@ void machine_check_exception(struct pt_regs *regs)
* additional info, e.g. bus error registers.
*/
platform_machine_check(regs);
#endif /* CONFIG_PPC64 */

if (debugger_fault_handler(regs))
return;
Expand Down

0 comments on commit 1a6a4ff

Please sign in to comment.