Skip to contentSkip to conversation

FPU problems in Xenomai 2.4.x

Xenomai Matteo Facchinetti 2 participants 5 messages Jan 30, 2013 – Feb 1, 2013

lore
Share & tools
lore
#0 lore raw

Hi,

in a PPC mpc5125 system we're using xenomai 2.4.x (from git repository) with kernel 2.6.29 and have applied ksrc_arch_powerpc_patches_adeos-ipipe-2.6.29.4-powerpc-DENX-2.6-02.patch

We have encountered a problem in a userspace application that makes heavy use of the FPU. In specific, our application consists about two concurrent processes:
- the first use FPU in a xenomai_task
- the second use FPU in a normal linux thread

After a random time of test, Kernel crash with the following oops:

Unrecoverable FP Unavailable Exception 801 at c0003888

Oops: Unrecoverable FP Unavailable Exception, sig: 6 [#1]
PREEMPT MPC5125 ADS
Modules linked in: xeno_can_mscan xeno_can mchpar1xxx ipv6
NIP: c0003888 LR: c0006c14 CTR: 1008879c
REGS: ced71e40 TRAP: 0801   Not tainted  (2.6.29.1)
MSR: 00009032 <EE,ME,IR,DR>  CR: 84000444  XER: 00000000

TASK = cec164e0[4069] 'gui_powerpc.elf' THREAD: ced70000
GPR00: c0006c04 ced71ef0 cec164e0 ced71efc ced71ef8 cec166e8 102b24fe 000000cc
GPR08: 102b2500 c0520000 00000000 00000000 0ec166e8
NIP [c0003888] cvt_fd+0x0/0x1c
LR [c0006c14] fix_alignment+0x6cc/0x84c

Call Trace:
[ced71ef0] [c0006c04] fix_alignment+0x6bc/0x84c (unreliable)
[ced71f30] [c0010cec] alignment_exception+0x8c/0x128
[ced71f40] [c0013820] ret_from_except_full+0x0/0x4c
--- Exception: 600 at 0x100887ac
    LR = 0x100887a4
Instruction dump:
dbe30110 fc00048e d8030118 41820014 80850084 38602900 7c841878 90850084
38a00000 3c80c052 90a46044 4e800020 <c8050118> fdfe058e c0030000 d8040000
---[ end trace 0cdaae6afca79e76 ]---

note: gui_powerpc.elf[4069] exited with preempt_count 1

In relation about mail:
http://www.xenomai.org/pipermail/xenomai-core/2010-10/msg00007.html
We commented out local_irq_save_hw_cond(flags).
Kernel doesn't crash but application die with fpu register corrupted.

Does anyone know if xenomai 2.4.x with 2.6.29 kernel series have problems with heavy FPU usage?

Matteo Facchinetti
Sirius Electronic Systems s.r.l.

#1 lore raw
Quoted 3 lines · Matteo Facchinetti

Hi,

in a PPC mpc5125 system we're using xenomai 2.4.x (from git repository)

2.4.x is no more supported since ages. Besides, we don't support mpc512x over this release for sure.

Quoted 37 lines

with kernel 2.6.29
and have applied ksrc_arch_powerpc_patches_adeos-ipipe-2.6.29.4-powerpc-DENX-2.6-02.patch

We have encountered a problem in a userspace application that makes heavy use of the FPU.
In specific, our application consists about two concurrent processes:
- the first use FPU in a xenomai_task
- the second use FPU in a normal linux thread

After a random time of test, Kernel crash with the following oops:

Unrecoverable FP Unavailable Exception 801 at c0003888

Oops: Unrecoverable FP Unavailable Exception, sig: 6 [#1]
PREEMPT MPC5125 ADS
Modules linked in: xeno_can_mscan xeno_can mchpar1xxx ipv6
NIP: c0003888 LR: c0006c14 CTR: 1008879c
REGS: ced71e40 TRAP: 0801   Not tainted  (2.6.29.1)
MSR: 00009032 <EE,ME,IR,DR>  CR: 84000444  XER: 00000000

TASK = cec164e0[4069] 'gui_powerpc.elf' THREAD: ced70000
GPR00: c0006c04 ced71ef0 cec164e0 ced71efc ced71ef8 cec166e8 102b24fe 000000cc
GPR08: 102b2500 c0520000 00000000 00000000 0ec166e8
NIP [c0003888] cvt_fd+0x0/0x1c
LR [c0006c14] fix_alignment+0x6cc/0x84c

Call Trace:
[ced71ef0] [c0006c04] fix_alignment+0x6bc/0x84c (unreliable)
[ced71f30] [c0010cec] alignment_exception+0x8c/0x128
[ced71f40] [c0013820] ret_from_except_full+0x0/0x4c
--- Exception: 600 at 0x100887ac
     LR = 0x100887a4
Instruction dump:
dbe30110 fc00048e d8030118 41820014 80850084 38602900 7c841878 90850084
38a00000 3c80c052 90a46044 4e800020 <c8050118> fdfe058e c0030000 d8040000
---[ end trace 0cdaae6afca79e76 ]---

note: gui_powerpc.elf[4069] exited with preempt_count 1

Quoted 7 lines

In relation about mail:
http://www.xenomai.org/pipermail/xenomai-core/2010-10/msg00007.html
We commented out local_irq_save_hw_cond(flags).
Kernel doesn't crash but application die with fpu register corrupted.

Does anyone know if xenomai 2.4.x with 2.6.29 kernel series have problems with heavy FPU usage?

A number of FPU related bugs have been fixed in the last _years_, requiring both I-pipe fixes and Xenomai core fixes.

Signature · 1 line
Philippe.
#2 lore raw
Quoted 8 lines · Philippe Gerum
Quoted 3 lines · Matteo Facchinetti

Hi,

in a PPC mpc5125 system we're using xenomai 2.4.x (from git repository)

2.4.x is no more supported since ages. Besides, we don't support mpc512x over this release for sure.

Well, yes actually we did support this one in 2.4.x. I did a port to the 5121_ADS close to the end of the 2.4.x maintenance cycle late in 2008. Time flies...

Assuming you really have to stick with linux 2.6.29, I would strongly suggest to move to Xenomai 2.6.2.1, backporting all FPU related fixes you may find in our repo for the interrupt pipeline to this release. Upgrading your kernel to 2.6.36 at least would be your best technical option though.

To sum up:

- linux 2.6.29 + fpu management fixes + Xenomai 2.6.2.1 or,
- linux >= 2.6.36[.4] + Xenomai 2.6.2.1

But you really don't want to fiddle with 2.4.x anymore.

Signature · 1 line
Philippe.
#3 lore raw
Quoted 5 lines · Philippe Gerum

To sum up:

- linux 2.6.29 + fpu management fixes + Xenomai 2.6.2.1 or,

Unfortunately, for the moment I must use this kernel release.

I try to backport adeos-ipipe-2.6.36.4-powerpc-2.12-05.patch to 2.6.29.

Does, this patch, contains all "fpu management fixes" or is possible there are other commits to looking for?

Matteo Facchinetti
Sirius Electronic Systems

#4 lore raw
Quoted 4 lines · Matteo Facchinetti
Quoted 3 lines · Philippe Gerum

To sum up:

Quoted 8 lines
Quoted 2 lines

- linux 2.6.29 + fpu management fixes + Xenomai 2.6.2.1 or,

Unfortunately, for the moment I must use this kernel release.

I try to backport adeos-ipipe-2.6.36.4-powerpc-2.12-05.patch to 2.6.29.

Does, this patch, contains all "fpu management fixes" or is possible

It does.

Quoted 2 lines

there are other commits to looking for?

Signature · 1 line
Philippe.