Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1706460
| From | Christophe Leroy <christophe.leroy@c-s.fr> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 03/12] powerpc/8xx: Remove SoftwareEmulation() |
| Date | 2017-08-08 14:10 +0200 |
| Message-ID | <ucbuI-8cT-63@gated-at.bofh.it> (permalink) |
| References | <ucbkZ-7TS-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Since commit aa42c69c67f82 ("[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: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/kernel/head_8xx.S | 2 +-
arch/powerpc/kernel/traps.c | 18 ------------------
2 files changed, 1 insertion(+), 19 deletions(-)
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
index 07ddced6bab3..778a0e11d0e6 100644
--- a/arch/powerpc/kernel/head_8xx.S
+++ b/arch/powerpc/kernel/head_8xx.S
@@ -300,7 +300,7 @@ SystemCall:
/* On the MPC8xx, this is a software emulation interrupt. It occurs
* for all unimplemented and illegal instructions.
*/
- EXCEPTION(0x1000, SoftEmu, SoftwareEmulation, EXC_XFER_STD)
+ EXCEPTION(0x1000, SoftEmu, program_check_exception, EXC_XFER_STD)
. = 0x1100
/*
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index b328ca2aef9c..9d1f600bda08 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -1518,24 +1518,6 @@ void performance_monitor_exception(struct pt_regs *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
static void handle_debug(struct pt_regs *regs, unsigned long debug_status)
{
--
2.13.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/12] powerpc/8xx: Some cleanup Christophe Leroy <christophe.leroy@c-s.fr> - 2017-08-08 14:00 +0200 [PATCH 09/12] powerpc/8xx: remove CONFIG_8xx Christophe Leroy <christophe.leroy@c-s.fr> - 2017-08-08 14:00 +0200 [PATCH 12/12] powerpc/8xx: Remove cpu dependent macro instructions from head_8xx Christophe Leroy <christophe.leroy@c-s.fr> - 2017-08-08 14:00 +0200 [PATCH 11/12] powerpc/8xx: Use symbolic names for DSISR bits in DSI Christophe Leroy <christophe.leroy@c-s.fr> - 2017-08-08 14:00 +0200 [PATCH 10/12] powerpc/8xx: Use symbolic PVR value Christophe Leroy <christophe.leroy@c-s.fr> - 2017-08-08 14:10 +0200 [PATCH 06/12] powerpc/time: refactor MFTB() to limit number of ifdefs Christophe Leroy <christophe.leroy@c-s.fr> - 2017-08-08 14:10 +0200 [PATCH 03/12] powerpc/8xx: Remove SoftwareEmulation() Christophe Leroy <christophe.leroy@c-s.fr> - 2017-08-08 14:10 +0200 [PATCH 04/12] powerpc/cpm1: link to CONFIG_CPM1 instead of CONFIG_8xx Christophe Leroy <christophe.leroy@c-s.fr> - 2017-08-08 14:10 +0200 [PATCH 05/12] powerpc/8xx: Move mpc8xx_pic.c from sysdev to platform/8xx Christophe Leroy <christophe.leroy@c-s.fr> - 2017-08-08 14:10 +0200
csiph-web