From: Philippe De Muyter <hidden> Date: 2008-02-22 10:08:48
Dear list,
I have just compiled linux-2.6.24 for a MPC8540 target using a MPC8540
specific gcc.
I then got tan infinity of "SPE used in kernel" messages. Looking at the
sources I ifdeffed out the printk call in KernelSPE, and I now have a
silent kernel, that seems to work fine.
Is there something wrong in my setting and should I look further to
debug this problem or is this perfectly normal ?
I wonder why a kernel configured for E500 and compiled by a E500-specific gcc
triggers this message. Is it invalid to use SPE instructions in the kernel
or do I misunderstand the message ?
Philippe
From: Johannes Berg <johannes@sipsolutions.net> Date: 2008-02-22 15:29:33
I wonder why a kernel configured for E500 and compiled by a E500-specific gcc
triggers this message. Is it invalid to use SPE instructions in the kernel
or do I misunderstand the message ?
I think it's like floating point/altivec, we don't always save the FP
registers on kernel/userspace transitions and so have to explicitly save
them to use them in the kernel, otherwise we'd clobber the userspace
register state.
I guess there's something like kernel_enter_spe()?
johannes
From: Andy Fleming <hidden> Date: 2008-02-22 18:33:37
On Feb 22, 2008, at 03:50, Philippe De Muyter wrote:
Dear list,
I have just compiled linux-2.6.24 for a MPC8540 target using a MPC8540
specific gcc.
I then got tan infinity of "SPE used in kernel" messages. Looking
at the
sources I ifdeffed out the printk call in KernelSPE, and I now have a
silent kernel, that seems to work fine.
Is there something wrong in my setting and should I look further to
debug this problem or is this perfectly normal ?
I wonder why a kernel configured for E500 and compiled by a E500-
specific gcc
triggers this message. Is it invalid to use SPE instructions in
the kernel
or do I misunderstand the message ?
We don't currently support using SPE in the kernel. Are you using
SPE in the kernel for some reason? Do you think that the compiler is
automatically generating SPE code in the kernel? I've never seen
that before.
Andy
From: Philippe De Muyter <hidden> Date: 2008-02-23 09:25:01
On Fri, Feb 22, 2008 at 12:33:19PM -0600, Andy Fleming wrote:
On Feb 22, 2008, at 03:50, Philippe De Muyter wrote:
quoted
Dear list,
I have just compiled linux-2.6.24 for a MPC8540 target using a MPC8540
specific gcc.
I then got tan infinity of "SPE used in kernel" messages. Looking at the
sources I ifdeffed out the printk call in KernelSPE, and I now have a
silent kernel, that seems to work fine.
Is there something wrong in my setting and should I look further to
debug this problem or is this perfectly normal ?
I wonder why a kernel configured for E500 and compiled by a E500-specific
gcc
triggers this message. Is it invalid to use SPE instructions in the
kernel
or do I misunderstand the message ?
We don't currently support using SPE in the kernel. Are you using SPE in
the kernel for some reason? Do you think that the compiler is
automatically generating SPE code in the kernel? I've never seen that
before.
Andy
I have bought a modified CLFS installation targetting by default a MPC8540.
By default my powerpc compiler thus generates also SPE instructions.
And I built linux using that compiler.
My first trial used ARCH=ppc and caused this infinity of "SPE used in kernel"
messages, but I then recompiled linux with ARCH=powerpc. With the message
not ifdef'ed out, this second kernel does not emit "SPE used in kernel"
messages, but I noticed problems with processes dying unexpectedly
(like in the first one, but after my first mail to the list).
Do you by chance know which MPC8540 registers are not saved by the kernel ?
Philippe
From: Johannes Berg <johannes@sipsolutions.net> Date: 2008-02-23 09:51:20
My first trial used ARCH=ppc and caused this infinity of "SPE used in kernel"
messages, but I then recompiled linux with ARCH=powerpc. With the message
not ifdef'ed out, this second kernel does not emit "SPE used in kernel"
messages,
If I were to venture a guess I'd point to the fact that the arch/powerpc
Makefile contains
# No SPE instruction when building kernel
KBUILD_CFLAGS += $(call cc-option,-mno-spe)
while the arch/ppc one doesn't.
johannes
From: Philippe De Muyter <hidden> Date: 2008-02-23 10:17:08
Hi Johanness,
On Sat, Feb 23, 2008 at 10:51:08AM +0100, Johannes Berg wrote:
quoted
My first trial used ARCH=ppc and caused this infinity of "SPE used in kernel"
messages, but I then recompiled linux with ARCH=powerpc. With the message
not ifdef'ed out, this second kernel does not emit "SPE used in kernel"
messages,
If I were to venture a guess I'd point to the fact that the arch/powerpc
Makefile contains
# No SPE instruction when building kernel
KBUILD_CFLAGS += $(call cc-option,-mno-spe)
OK, that's a good point.
But as I said in the same mail, processes still dies unexpectedly.
From: Johannes Berg <johannes@sipsolutions.net> Date: 2008-02-23 10:25:15
But as I said in the same mail, processes still dies unexpectedly.
Yeah, no idea though. I guess you could try putting that into the
arch/ppc Makefile, but arch/ppc will be removed this year so you don't
want to rely on it.
johannes
From: Philippe De Muyter <hidden> Date: 2008-02-25 14:47:25
Dear ppclinux gurus,
I have just compiled linux-2.6.24 for a MPC8540 target using a MPC8540
specific gcc.
After my first attempt using ARCH=ppc, leading to an infinity of messages :
"SPE used in kernel", I recompiled the whole kernel sources using
the default ARCH (ARCH=powerpc). I now have a kernel that does not complain
about "SPE used in kernel", but user processes still crash ramdomly.
Searching around, I learned that the E500 GPR registers are 64-bits wide,
and gcc targetted for powerpc-linuxspe uses them sometimes. In the other
PPC32 targets, those registers are 32-bits wide.
The specific E500 64-bit move instructions are `evstdd' and `evldd'.
I searched in the linux kernel sources (2.6.24) but did not find where
those GPR registers could be saved in 64-bit mode for context-switch.
Is there a patch pending somewhere to preserve the E500 GPR's in 64-bit mode
for context-switch ?
Philippe
From: Scott Wood <hidden> Date: 2008-02-25 18:06:21
On Mon, Feb 25, 2008 at 03:47:22PM +0100, Philippe De Muyter wrote:
Searching around, I learned that the E500 GPR registers are 64-bits wide,
and gcc targetted for powerpc-linuxspe uses them sometimes. In the other
PPC32 targets, those registers are 32-bits wide.
The specific E500 64-bit move instructions are `evstdd' and `evldd'.
I searched in the linux kernel sources (2.6.24) but did not find where
those GPR registers could be saved in 64-bit mode for context-switch.
From: Kumar Gala <hidden> Date: 2008-02-26 07:39:32
On Feb 23, 2008, at 4:25 AM, Johannes Berg wrote:
quoted
But as I said in the same mail, processes still dies unexpectedly.
Yeah, no idea though. I guess you could try putting that into the
arch/ppc Makefile, but arch/ppc will be removed this year so you don't
want to rely on it.
Its been removed (or will be for 2.6.25).
What compiler version are you using?
- k
From: Philippe De Muyter <hidden> Date: 2008-02-26 10:34:30
Hi Kumar,
On Tue, Feb 26, 2008 at 01:39:20AM -0600, Kumar Gala wrote:
On Feb 23, 2008, at 4:25 AM, Johannes Berg wrote:
quoted
quoted
But as I said in the same mail, processes still dies unexpectedly.
Yeah, no idea though. I guess you could try putting that into the
arch/ppc Makefile, but arch/ppc will be removed this year so you don't
want to rely on it.
Its been removed (or will be for 2.6.25).
What compiler version are you using?
a gcc-4.2.1 derivative from codesourcery (4.2-50) that I needed to compile
eglibc for e500 and that I tweaked to use it with CLFS and that I compiled
with --host=powerpc-linuxspe. I now noticed that it still generates
spe insn's even when given '-mno-spe'.
I am now busy to retest with a vanilla powerpc-linuxspe-gcc-4.2.2 and
that seems to work fine. I don't think, though, that it is able to compile
eglibc for e500.
Thanks for the attention, and sorry for the noise.
Philippe