All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hiro Yoshioka <lkml.hyoshiok@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: math_state_restore() question
Date: Wed, 17 Aug 2005 16:58:13 +0900	[thread overview]
Message-ID: <98df96d305081700581ebdd5ed@mail.gmail.com> (raw)

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

             reply	other threads:[~2005-08-17  7:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-17  7:58 Hiro Yoshioka [this message]
2005-08-17  8:07 ` math_state_restore() question Hirokazu Takahashi
2005-08-17  8:42   ` Hiro Yoshioka
2005-08-17 15:18     ` Akira Tsukamoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=98df96d305081700581ebdd5ed@mail.gmail.com \
    --to=lkml.hyoshiok@gmail.com \
    --cc=hyoshiok@miraclelinux.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.