FPU warn on ipipe 4.9.146-8 i386

Mauro Salvini mauro.salvini at smigroup.net
Tue Jan 15 08:23:17 CET 2019


On Mon, 2019-01-14 at 10:39 +0100, Henning Schild wrote:
> Am Fri, 11 Jan 2019 14:47:13 +0100
> schrieb Mauro Salvini <mauro.salvini at smigroup.net>:
> 
> > On Fri, 2019-01-11 at 10:40 +0100, Henning Schild wrote:
> > > Am Fri, 11 Jan 2019 09:57:50 +0100
> > > schrieb Mauro Salvini via Xenomai <xenomai at xenomai.org>:
> > >   
> > > > Hi all,
> > > > 
> > > > I'm testing same hardware of [1], with kernel 4.9.146 from
> > > > ipipe-
> > > > 4.9.y
> > > > with [2] applied, compiled with ARCH=i386 and Xenomai 3.0.7.  
> > > 
> > > To be honest i386 is not really tested anymore, in fact in 4.14
> > > not
> > > even supported at the moment. If you can you should go for
> > > x86_64.
> > >   
> > 
> > Hi Henning,
> > 
> > Thank you. I'm trying i386 version due to legacy 32bit code that
> > uses
> > rtnet (which cannot be used with mixed ABI).
> 
> Ok, maybe something you might want to fix for the future.
> 
..snip..
> > > > 
> > > could you try this:
> > > 
> > > --- a/arch/x86/kernel/fpu/core.c
> > > +++ b/arch/x86/kernel/fpu/core.c
> > > @@ -426,6 +426,10 @@ void fpu__restore(struct fpu *fpu)
> > >         /* Avoid __kernel_fpu_begin() right after
> > > fpregs_activate()
> > > */
> > >         kernel_fpu_disable();
> > >         trace_x86_fpu_before_restore(fpu);
> > > +       if (fpregs_activate(fpu)) {  
> > 
> > This instruction does not compile due to fpregs_activate() returns
> > void, perhaps did you mean "if (fpregs_active(fpu))"?
> > Given that fpregs_active() have no args, I tried with this:
> > 
> > if (fpu->fpregs_active)
> 
> I did not test what i wrote there, and your fix is what i meant.
> 
> > and warning does not raise (even warning added with this patch).
> 
> In that case a similar patch should probably be included upstream. I
> will prepare a patch for that.
> 
> Henning

Hi Henning,

I don't know if it concerns about FPU and this discussion, but I did
some tests and also with last fixes the system freezes after a variable
time (from few seconds to few hours) since latency test start.
No logs/warns in /var/log/messages, and hard reset is needed.

I'm investigating if it freezes also with latency running alone.

Tell me if it's worth to continue testing or not (considering that i386
is going to be not supported anymore).

Thanks
Mauro

> 
> > > +               WARN_ON_FPU(fpu !=
> > > this_cpu_read_stable(fpu_fpregs_owner_ctx));
> > > +               fpregs_deactivate(fpu);
> > > +       }
> > >         fpregs_activate(fpu);
> > >         copy_kernel_to_fpregs(&fpu->state);
> > >         trace_x86_fpu_after_restore(fpu);
> > > 
> > > This would not be a proper fix, especially if you end up seeing
> > > that
> > > warning ...
> > > 
> > > Henning
> > >   
> > > > 
> > > > 
> > > >   
> > > 
> > >   
> 
> 



More information about the Xenomai mailing list