Mark Saiia wrote:
> I applied the patch to Xenomai-2.4.5 with kernel 2.6.26.3 and observed the
> erroneous behavior. I did the same with linux-2.6.27.5 and Xenomai r4372
> and noticed the same behavior. Please let me know if I can run additional
> tests, if you need any more information, or how to potentially fix this
> issue.
>
> Thank you,
Could you try the following patch ?
--
Gilles.
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c
index f422387..f9f213a 100644
--- a/arch/x86/kernel/traps_32.c
+++ b/arch/x86/kernel/traps_32.c
@@ -1159,6 +1159,8 @@ asmlinkage void math_state_restore(void)
struct task_struct *tsk = thread->task;
unsigned long flags;
+ local_irq_save_hw_cond(flags);
+#ifndef CONFIG_IPIPE
if (!tsk_used_math(tsk)) {
local_irq_enable();
/*
@@ -1173,8 +1175,11 @@ asmlinkage void math_state_restore(void)
}
local_irq_disable();
}
-
- local_irq_save_hw_cond(flags);
+#else /* CONFIG_IPIPE */
+ if (!tsk_used_math(tsk))
+ /* No alloc, can not fail. */
+ init_fpu(tsk)
+#endif /* CONFIG_IPIPE */
clts(); /* Allow maths ops (or we recurse) */
restore_fpu(tsk);
thread->status |= TS_USEDFPU; /* So we fnsave on switch_to() */
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help