From: "David S. Miller" <davem@davemloft.net>
To: sparclinux@vger.kernel.org
Subject: Re: FPU context and fork
Date: Wed, 19 Jan 2005 20:43:59 +0000 [thread overview]
Message-ID: <20050119124359.15acae9d.davem@davemloft.net> (raw)
In-Reply-To: <41EEB995.8070402@wp.pl>
On Wed, 19 Jan 2005 21:46:40 +0100
Krzysztof Helt <krzysztof.h1@wp.pl> wrote:
> >#ifndef CONFIG_SMP
> > if(last_task_used_math = current) {
> >#else
> > if(current_thread_info()->flags & _TIF_USEDFPU) {
> >#endif
> > put_psr(get_psr() | PSR_EF);
> > fpsave(&p->thread.float_regs[0], &p->thread.fsr,
> > &p->thread.fpqueue[0], &p->thread.fpqdepth);
> >#ifdef CONFIG_SMP
> > current_thread_info()->flags &= ~_TIF_USEDFPU;
> >#endif
> > }
> >
> It is not enough or I do not understand something. The new thread will
> have a _TIF_USEDFPU flag disabled (if not cleared here, it is cleared in
> copy_flags() in the do_fork()). So, a FP disabled trap handler will
> initialize FPU state from default values, not from the ones saved here.
> BTW, the new thread is p or current in the copy_thread function? I
> suppose it is current.
No, we are saving the "current" fpu state to the save area of "p" which
is the child thread.
next prev parent reply other threads:[~2005-01-19 20:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-19 19:48 FPU context and fork Krzysztof Helt
2005-01-19 20:25 ` David S. Miller
2005-01-19 20:43 ` David S. Miller [this message]
2005-01-19 20:46 ` Krzysztof Helt
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=20050119124359.15acae9d.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=sparclinux@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.