diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2006-03-30 22:11:15 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2006-03-30 22:11:15 -0500 |
commit | 1a6a4ffef6a405f60b51856725074532c9696ac2 (patch) | |
tree | be1b843c8a193ced5bf68cba1ca32d4a98b8a580 /arch/powerpc/kernel/traps.c | |
parent | 15e812ad849e142e3dfc984d33c4d8042389f148 (diff) |
powerpc: merge machine_check_exception between ppc32 & ppc64
Make machine_check_exception handling code path the same on ppc32 & ppc64.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/traps.c')
-rw-r--r-- | arch/powerpc/kernel/traps.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c index 4cbde211eb69..064a52564692 100644 --- a/arch/powerpc/kernel/traps.c +++ b/arch/powerpc/kernel/traps.c | |||
@@ -228,7 +228,7 @@ void system_reset_exception(struct pt_regs *regs) | |||
228 | */ | 228 | */ |
229 | static inline int check_io_access(struct pt_regs *regs) | 229 | static inline int check_io_access(struct pt_regs *regs) |
230 | { | 230 | { |
231 | #ifdef CONFIG_PPC_PMAC | 231 | #if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32) |
232 | unsigned long msr = regs->msr; | 232 | unsigned long msr = regs->msr; |
233 | const struct exception_table_entry *entry; | 233 | const struct exception_table_entry *entry; |
234 | unsigned int *nip = (unsigned int *)regs->nip; | 234 | unsigned int *nip = (unsigned int *)regs->nip; |
@@ -261,7 +261,7 @@ static inline int check_io_access(struct pt_regs *regs) | |||
261 | return 1; | 261 | return 1; |
262 | } | 262 | } |
263 | } | 263 | } |
264 | #endif /* CONFIG_PPC_PMAC */ | 264 | #endif /* CONFIG_PPC_PMAC && CONFIG_PPC32 */ |
265 | return 0; | 265 | return 0; |
266 | } | 266 | } |
267 | 267 | ||
@@ -308,8 +308,8 @@ platform_machine_check(struct pt_regs *regs) | |||
308 | 308 | ||
309 | void machine_check_exception(struct pt_regs *regs) | 309 | void machine_check_exception(struct pt_regs *regs) |
310 | { | 310 | { |
311 | #ifdef CONFIG_PPC64 | ||
312 | int recover = 0; | 311 | int recover = 0; |
312 | unsigned long reason = get_mc_reason(regs); | ||
313 | 313 | ||
314 | /* See if any machine dependent calls */ | 314 | /* See if any machine dependent calls */ |
315 | if (ppc_md.machine_check_exception) | 315 | if (ppc_md.machine_check_exception) |
@@ -317,8 +317,6 @@ void machine_check_exception(struct pt_regs *regs) | |||
317 | 317 | ||
318 | if (recover) | 318 | if (recover) |
319 | return; | 319 | return; |
320 | #else | ||
321 | unsigned long reason = get_mc_reason(regs); | ||
322 | 320 | ||
323 | if (user_mode(regs)) { | 321 | if (user_mode(regs)) { |
324 | regs->msr |= MSR_RI; | 322 | regs->msr |= MSR_RI; |
@@ -462,7 +460,6 @@ void machine_check_exception(struct pt_regs *regs) | |||
462 | * additional info, e.g. bus error registers. | 460 | * additional info, e.g. bus error registers. |
463 | */ | 461 | */ |
464 | platform_machine_check(regs); | 462 | platform_machine_check(regs); |
465 | #endif /* CONFIG_PPC64 */ | ||
466 | 463 | ||
467 | if (debugger_fault_handler(regs)) | 464 | if (debugger_fault_handler(regs)) |
468 | return; | 465 | return; |