lkml.org 
[lkml]   [2005]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: math_state_restore() question
    From
    Hi,

    Just take a look at __switch_to(), where __unlazy_fpu() is called.

    > Hi,
    >
    > I have a quick question.
    >
    > The math_state_restore() restores the FPU/MMX/XMM states.
    > However where do we save the previous task's states if it is necessary?
    >
    > asmlinkage void math_state_restore(struct pt_regs regs)
    > {
    > struct thread_info *thread = current_thread_info();
    > struct task_struct *tsk = thread->task;
    >
    > clts(); /* Allow maths ops (or we recurse) */
    > if (!tsk_used_math(tsk))
    > init_fpu(tsk);
    > restore_fpu(tsk);
    > thread->status |= TS_USEDFPU; /* So we fnsave on switch_to() */
    > }
    >
    > Thanks in advance,
    > Hiro
    > --
    > Hiro Yoshioka
    > mailto:hyoshiok at miraclelinux.com
    > -


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-08-17 10:15    [W:0.021 / U:90.344 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site