POWERPC : What's "SPE used in kernel" ?
Dear list,
I have just compiled linux-2.6.24 for a MPC8540 target using a MPC8540 specific gcc.
I then got thousands 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 using a E500-specific gcc triggers this message. Is it invalid to use SPE instructions in the kernel ?
Philippe
MPC8540 : What's "SPE used in kernel" ?
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
Re: MPC8540 : What's "SPE used in kernel" ?
Quoted 4 lines
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
Re: MPC8540 : What's "SPE used in kernel" ?
In reply to Philippe De MuyterQuoted 9 lines · Philippe De Muyter
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.
Quoted 6 lines
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
Re: MPC8540 : What's "SPE used in kernel" ?
Quoted 22 lines · Andy Fleming
Quoted 9 lines · Philippe De Muyter
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.
Quoted 8 lines
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 ?
Quoted 6 lines
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
Re: MPC8540 : What's "SPE used in kernel" ?
Quoted 5 lines
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 kernelKBUILD_CFLAGS += $(call cc-option,-mno-spe)
while the arch/ppc one doesn't.
johannes
Re: MPC8540 : What's "SPE used in kernel" ?
Hi Johanness,
Quoted 11 lines · Johannes Berg
Quoted 5 lines
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/powerpcMakefilecontains# 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.
Quoted 4 lines
while the
arch/ppcone doesn't.johannes
Philippe
Re: MPC8540 : What's "SPE used in kernel" ?
Quoted 2 lines
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
E500 linux : are the 64-bit GPRs context-switched ?
In reply to Philippe De MuyterDear 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
Re: E500 linux : are the 64-bit GPRs context-switched ?
Quoted 7 lines · Philippe De Muyter
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' andevldd'. 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.
giveup_spe and load_up_spe.
-Scott
Re: MPC8540 : What's "SPE used in kernel" ?
In reply to Johannes BergQuoted 6 lines · Johannes Berg
Quoted 2 lines
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/ppcMakefile, butarch/ppcwill 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
Re: MPC8540 : What's "SPE used in kernel" ?
Hi Kumar,
Quoted 6 lines · Kumar Gala
Quoted 3 lines · Johannes Berg
Quoted 2 lines
But as I said in the same mail, processes still dies unexpectedly.
Quoted 7 lines
Quoted 3 lines
Yeah, no idea though. I guess you could try putting that into the
arch/ppcMakefile, butarch/ppcwill 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