Gilles,
No noticeable difference using 2.4.5 w/ 2.6.26.3. I was testing using the
app we first noticed the behavior on. I will run the simple test program
tomorrow, but fully expect to see the erroneous behavior. I also had the
chance to test the patch on a GX1 board, and noticed the error as well. We
have a version of the app, that I was testing today, running on 2.6.23.12 w/
Xenomai svn of around February 2008 (I don't have the revision number in
front of me at the moment) that works properly.
Thanks,
Mark
On Thu, Nov 13, 2008 at 3:11 AM, Gilles Chanteperdrix <
[EMAIL PROTECTED]> wrote:
> 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