aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/traps.c
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2007-09-18 16:29:35 -0400
committerKumar Gala <galak@kernel.crashing.org>2007-10-04 12:02:54 -0400
commit5dd57a1308a7e40e04fb6ecbff170df7a0b92cd8 (patch)
tree7766bea806c977c47624e43c1c21a2a11ff1782d /arch/powerpc/kernel/traps.c
parentc4e05bc57dd14294683cdea7fe36ce3c01f5c6ae (diff)
[POWERPC] 8xx: Move softemu8xx.c from arch/ppc
Previously, Soft_emulate_8xx was called with no implementation, resulting in build failures whenever building 8xx without math emulation. The implementation is copied from arch/ppc to resolve this issue. However, this sort of minimal emulation is not a very good idea other than for compatibility with existing userspaces, as it's less efficient than soft-float and can mislead users into believing they have soft-float. Thus, it is made a configurable option, off by default. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/traps.c')
-rw-r--r--arch/powerpc/kernel/traps.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 5a49eabd492e..2f1857c9819f 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -906,7 +906,9 @@ void SoftwareEmulation(struct pt_regs *regs)
906{ 906{
907 extern int do_mathemu(struct pt_regs *); 907 extern int do_mathemu(struct pt_regs *);
908 extern int Soft_emulate_8xx(struct pt_regs *); 908 extern int Soft_emulate_8xx(struct pt_regs *);
909#if defined(CONFIG_MATH_EMULATION) || defined(CONFIG_8XX_MINIMAL_FPEMU)
909 int errcode; 910 int errcode;
911#endif
910 912
911 CHECK_FULL_REGS(regs); 913 CHECK_FULL_REGS(regs);
912 914
@@ -936,7 +938,7 @@ void SoftwareEmulation(struct pt_regs *regs)
936 return; 938 return;
937 } 939 }
938 940
939#else 941#elif defined(CONFIG_8XX_MINIMAL_FPEMU)
940 errcode = Soft_emulate_8xx(regs); 942 errcode = Soft_emulate_8xx(regs);
941 switch (errcode) { 943 switch (errcode) {
942 case 0: 944 case 0:
@@ -949,6 +951,8 @@ void SoftwareEmulation(struct pt_regs *regs)
949 _exception(SIGSEGV, regs, SEGV_MAPERR, regs->nip); 951 _exception(SIGSEGV, regs, SEGV_MAPERR, regs->nip);
950 return; 952 return;
951 } 953 }
954#else
955 _exception(SIGILL, regs, ILL_ILLOPC, regs->nip);
952#endif 956#endif
953} 957}
954#endif /* CONFIG_8xx */ 958#endif /* CONFIG_8xx */