Commit 1a6a4ffe authored by Kumar Gala's avatar Kumar Gala

powerpc: merge machine_check_exception between ppc32 & ppc64

Make machine_check_exception handling code path the same on ppc32 & ppc64.
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent 15e812ad
...@@ -228,7 +228,7 @@ void system_reset_exception(struct pt_regs *regs) ...@@ -228,7 +228,7 @@ void system_reset_exception(struct pt_regs *regs)
*/ */
static inline int check_io_access(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; unsigned long msr = regs->msr;
const struct exception_table_entry *entry; const struct exception_table_entry *entry;
unsigned int *nip = (unsigned int *)regs->nip; unsigned int *nip = (unsigned int *)regs->nip;
...@@ -261,7 +261,7 @@ static inline int check_io_access(struct pt_regs *regs) ...@@ -261,7 +261,7 @@ static inline int check_io_access(struct pt_regs *regs)
return 1; return 1;
} }
} }
#endif /* CONFIG_PPC_PMAC */ #endif /* CONFIG_PPC_PMAC && CONFIG_PPC32 */
return 0; return 0;
} }
...@@ -308,8 +308,8 @@ platform_machine_check(struct pt_regs *regs) ...@@ -308,8 +308,8 @@ platform_machine_check(struct pt_regs *regs)
void machine_check_exception(struct pt_regs *regs) void machine_check_exception(struct pt_regs *regs)
{ {
#ifdef CONFIG_PPC64
int recover = 0; int recover = 0;
unsigned long reason = get_mc_reason(regs);
/* See if any machine dependent calls */ /* See if any machine dependent calls */
if (ppc_md.machine_check_exception) if (ppc_md.machine_check_exception)
...@@ -317,8 +317,6 @@ void machine_check_exception(struct pt_regs *regs) ...@@ -317,8 +317,6 @@ void machine_check_exception(struct pt_regs *regs)
if (recover) if (recover)
return; return;
#else
unsigned long reason = get_mc_reason(regs);
if (user_mode(regs)) { if (user_mode(regs)) {
regs->msr |= MSR_RI; regs->msr |= MSR_RI;
...@@ -462,7 +460,6 @@ void machine_check_exception(struct pt_regs *regs) ...@@ -462,7 +460,6 @@ void machine_check_exception(struct pt_regs *regs)
* additional info, e.g. bus error registers. * additional info, e.g. bus error registers.
*/ */
platform_machine_check(regs); platform_machine_check(regs);
#endif /* CONFIG_PPC64 */
if (debugger_fault_handler(regs)) if (debugger_fault_handler(regs))
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment