lkml.org 
[lkml]   [2023]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH V3] LoongArch: Provide kernel fpu functions
    From
    Date
    On Mon, 2023-03-06 at 20:49 +0800, Huacai Chen wrote:
    > > > +     if (!is_fpu_owner())
    > > > +             enable_fpu();
    > > > +     else
    > > > +             _save_fp(&current->thread.fpu);
    > > Do we need initialize fcsr rather than using random fcsr value
    > > of other processes? There may be fpu exception enabled by
    > > other tasks.
    > Emm, I think initialize fcsr to 0 is better here.

    I guess it's necessary: if we use a "dirty" FSCR0 with some exceptions
    enabled (esp. inaccurate exception which is expected as disabled by most
    developers), we may end up oops with a kernel FPE...
    --
    Xi Ruoyao <xry111@xry111.site>
    School of Aerospace Science and Technology, Xidian University

    \
     
     \ /
      Last update: 2023-03-27 00:45    [W:2.627 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site