Commit fbbcc3bb authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman

powerpc/8xx: Remove SoftwareEmulation()

Since commit aa42c69c ("[POWERPC] Add support for FP emulation
for the e300c2 core"), program_check_exception() can be called for
math emulation. In that case, 'reason' is 0.

On the 8xx, there is a Software Emulation interrupt which is
called for all unimplemented and illegal instructions. This
interrupt calls SoftwareEmulation() which does almost the
same as program_check_exception() called with reason = 0.

The Software Emulation interrupt sets all reason bits to 0,
it is therefore possible to call program_check_exception()
directly from the interrupt handler.
Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent f70b1e8d
...@@ -300,7 +300,7 @@ SystemCall: ...@@ -300,7 +300,7 @@ SystemCall:
/* On the MPC8xx, this is a software emulation interrupt. It occurs /* On the MPC8xx, this is a software emulation interrupt. It occurs
* for all unimplemented and illegal instructions. * for all unimplemented and illegal instructions.
*/ */
EXCEPTION(0x1000, SoftEmu, SoftwareEmulation, EXC_XFER_STD) EXCEPTION(0x1000, SoftEmu, program_check_exception, EXC_XFER_STD)
. = 0x1100 . = 0x1100
/* /*
......
...@@ -1522,24 +1522,6 @@ void performance_monitor_exception(struct pt_regs *regs) ...@@ -1522,24 +1522,6 @@ void performance_monitor_exception(struct pt_regs *regs)
perf_irq(regs); perf_irq(regs);
} }
#ifdef CONFIG_8xx
void SoftwareEmulation(struct pt_regs *regs)
{
CHECK_FULL_REGS(regs);
if (!user_mode(regs)) {
debugger(regs);
die("Kernel Mode Unimplemented Instruction or SW FPU Emulation",
regs, SIGFPE);
}
if (!emulate_math(regs))
return;
_exception(SIGILL, regs, ILL_ILLOPC, regs->nip);
}
#endif /* CONFIG_8xx */
#ifdef CONFIG_PPC_ADV_DEBUG_REGS #ifdef CONFIG_PPC_ADV_DEBUG_REGS
static void handle_debug(struct pt_regs *regs, unsigned long debug_status) static void handle_debug(struct pt_regs *regs, unsigned long debug_status)
{ {
......
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