powerpc/85xx: enable the math emulation for the corenet64_smp_defconfig
PATCH 1/1 powerpc/85xx: enable the math emulation for the corenet64_smp_defconfig
I got the following error on my t4240qds board.
ntpd[2713]: unhandled signal 4 at 0fd5b448 nip 0fd5b448 lr 0fd5b424 code 30001
The root cause is that the float point instruction 'fsqrt' is used. But this instruction is not implemented on e6500 core. Even this does seem a gcc bug, I would like to enable the math emulation in the kernel to workaround this kind of issue.
--- arch/powerpc/configs/corenet64_smp_defconfig | 1 + 1 file changed, 1 insertion(+)
arch/powerpc/configs/corenet64_smp_defconfig +1 -0
@@ -27,6 +27,7 @@ CONFIG_P5040_DS=y CONFIG_T4240_QDS=y # CONFIG_PPC_OF_BOOT_TRAMPOLINE is not set CONFIG_BINFMT_MISC=m +CONFIG_MATH_EMULATION=y CONFIG_FSL_IFC=y CONFIG_PCIEPORTBUS=y CONFIG_PCI_MSI=y
Signature · 1 line
1.8.1.4
Quoted 8 lines · Kevin Hao
I got the following error on my t4240qds board.
ntpd[2713]: unhandled signal 4 at0fd5b448nip0fd5b448lr0fd5b424=20
code 30001
=20
The root cause is that the float point instruction 'fsqrt' is used. But this instruction is not implemented on e6500 core. Even this does seem a gcc bug, I would like to enable the math emulation in the kernel to workaround this kind of issue.
I'll apply this, but we should add PPC_WARN_EMULATED to math-emu so =20 that people know when their toolchain is emitting things that require =20 emulation.
It'd also be nice if we had an option to only include the portions of =20 math-emu that are known to be missing in some CPUs (excluding CPUs that =20 are missing the entire FPU, of course). Besides its effect on kernel =20 image size, in my experience math-emu adds a non-trivial amount of time =20 to a kernel build.
-Scott=
Quoted 5 lines · Scott Wood
Quoted 4 lines · Kevin Hao
I got the following error on my t4240qds board.
ntpd[2713]: unhandled signal 4 at0fd5b448nip0fd5b448lr0fd5b424code 30001
Quoted 8 lines
Quoted 4 lines
The root cause is that the float point instruction 'fsqrt' is used. But this instruction is not implemented on e6500 core. Even this does seem a gcc bug, I would like to enable the math emulation in the kernel to workaround this kind of issue.
I'll apply this, but we should add
PPC_WARN_EMULATEDto math-emu so that people know when their toolchain is emitting things that require emulation.
Sure.
Quoted 6 lines
It'd also be nice if we had an option to only include the portions of math-emu that are known to be missing in some CPUs (excluding CPUs that are missing the entire FPU, of course). Besides its effect on kernel image size, in my experience math-emu adds a non-trivial amount of time to a kernel build.
Sounds reasonable. I will give it a try.
Thanks,
Kevin
Quoted 2 lines
-Scott
Quoted 7 lines
Quoted 5 lines
It'd also be nice if we had an option to only include the portions of math-emu that are known to be missing in some CPUs (excluding CPUs that are missing the entire FPU, of course). Besides its effect on kernel image size, in my experience math-emu adds a non-trivial amount of time to a kernel build.
=20
Sounds reasonable. I will give it a try.
It also ought to be possible to use the FPU when emulating the missing instructions - rather than using the full 'soft' FPU.
David
Quoted 10 lines · David Laight
Quoted 7 lines
Quoted 5 lines
It'd also be nice if we had an option to only include the portions of math-emu that are known to be missing in some CPUs (excluding CPUs that are missing the entire FPU, of course). Besides its effect on kernel image size, in my experience math-emu adds a non-trivial amount of time to a kernel build.
Sounds reasonable. I will give it a try.
It also ought to be possible to use the FPU when emulating the missing instructions - rather than using the full 'soft' FPU.
Yes, it is another option. But it may seem a bit risky to do these floating point arithmetic in kernel space. Do we really want do that?
Thanks,
Kevin
Quoted 5 lines
David