* [PATCH] powerpc/85xx: enable the math emulation for the corenet64_smp_defconfig
@ 2013-07-10 1:49 Kevin Hao
2013-07-10 21:40 ` Scott Wood
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Hao @ 2013-07-10 1:49 UTC (permalink / raw)
To: Kumar Gala, Scott Wood; +Cc: linuxppc
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.
Signed-off-by: Kevin Hao <haokexin@gmail.com>
---
arch/powerpc/configs/corenet64_smp_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/configs/corenet64_smp_defconfig b/arch/powerpc/configs/corenet64_smp_defconfig
index 6c8b020..b5408dc 100644
--- a/arch/powerpc/configs/corenet64_smp_defconfig
+++ b/arch/powerpc/configs/corenet64_smp_defconfig
@@ -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
--
1.8.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc/85xx: enable the math emulation for the corenet64_smp_defconfig
2013-07-10 1:49 [PATCH] powerpc/85xx: enable the math emulation for the corenet64_smp_defconfig Kevin Hao
@ 2013-07-10 21:40 ` Scott Wood
2013-07-11 9:21 ` Kevin Hao
0 siblings, 1 reply; 5+ messages in thread
From: Scott Wood @ 2013-07-10 21:40 UTC (permalink / raw)
To: Kevin Hao; +Cc: linuxppc
On 07/09/2013 08:49:52 PM, Kevin Hao wrote:
> I got the following error on my t4240qds board.
> ntpd[2713]: unhandled signal 4 at 0fd5b448 nip 0fd5b448 lr 0fd5b424 =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=
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc/85xx: enable the math emulation for the corenet64_smp_defconfig
2013-07-10 21:40 ` Scott Wood
@ 2013-07-11 9:21 ` Kevin Hao
2013-07-11 10:04 ` David Laight
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Hao @ 2013-07-11 9:21 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc
[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]
On Wed, Jul 10, 2013 at 04:40:03PM -0500, Scott Wood wrote:
> On 07/09/2013 08:49:52 PM, Kevin Hao wrote:
> >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.
>
> I'll apply this, but we should add PPC_WARN_EMULATED to math-emu so
> that people know when their toolchain is emitting things that
> require emulation.
Sure.
>
> 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
>
> -Scott
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] powerpc/85xx: enable the math emulation for the corenet64_smp_defconfig
2013-07-11 9:21 ` Kevin Hao
@ 2013-07-11 10:04 ` David Laight
2013-07-11 10:14 ` Kevin Hao
0 siblings, 1 reply; 5+ messages in thread
From: David Laight @ 2013-07-11 10:04 UTC (permalink / raw)
To: Kevin Hao, Scott Wood; +Cc: linuxppc
> > 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc/85xx: enable the math emulation for the corenet64_smp_defconfig
2013-07-11 10:04 ` David Laight
@ 2013-07-11 10:14 ` Kevin Hao
0 siblings, 0 replies; 5+ messages in thread
From: Kevin Hao @ 2013-07-11 10:14 UTC (permalink / raw)
To: David Laight; +Cc: Scott Wood, linuxppc
[-- Attachment #1: Type: text/plain, Size: 775 bytes --]
On Thu, Jul 11, 2013 at 11:04:06AM +0100, David Laight wrote:
> > > 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
>
> David
>
>
>
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-07-11 10:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-10 1:49 [PATCH] powerpc/85xx: enable the math emulation for the corenet64_smp_defconfig Kevin Hao
2013-07-10 21:40 ` Scott Wood
2013-07-11 9:21 ` Kevin Hao
2013-07-11 10:04 ` David Laight
2013-07-11 10:14 ` Kevin Hao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).