From: Jun Sun <jsun@mvista.com>
To: Vivien Chappelier <vivienc@nerim.net>
Cc: Ralf Baechle <ralf@oss.sgi.com>,
linux-mips@linux-mips.org, jsun@mvista.com
Subject: Re: [PATCH 2.5] FPU
Date: Tue, 28 Jan 2003 17:26:31 -0800 [thread overview]
Message-ID: <20030128172631.E11633@mvista.com> (raw)
In-Reply-To: <20030127102929.N11633@mvista.com>; from jsun@mvista.com on Mon, Jan 27, 2003 at 10:29:29AM -0800
On Mon, Jan 27, 2003 at 10:29:29AM -0800, Jun Sun wrote:
> On Sun, Jan 26, 2003 at 02:58:09AM +0100, Vivien Chappelier wrote:
> > Hi,
> >
> > At various places in the 2.5 kernel, the fpu is accessed in
> > kernel mode with CU1 not set, causing an unexpected exception. This patch
> > makes sure FPU can be accessed by the kernel, though it may only
> > be a workaround. Any comment from someone with a better understanding of
> > the FPU access/context switching code?
> >
> > Vivien.
> >
> > --- include/asm-mips64/fpu.h 2002-12-11 20:44:20.000000000 +0100
> > +++ include/asm-mips64/fpu.h 2002-12-11 21:51:44.000000000 +0100
> > @@ -109,6 +109,7 @@
> >
> > static inline void save_fp(struct task_struct *tsk)
> > {
> > + enable_fpu();
> > if (mips_cpu.options & MIPS_CPU_FPU)
> > _save_fp(tsk);
> > }
> > --- include/asm-mips/fpu.h 2002-12-11 20:44:20.000000000 +0100
> > +++ include/asm-mips/fpu.h 2002-12-11 21:51:44.000000000 +0100
> > @@ -109,6 +109,7 @@
> >
> > static inline void save_fp(struct task_struct *tsk)
> > {
> > + enable_fpu();
> > if (mips_cpu.options & MIPS_CPU_FPU)
> > _save_fp(tsk);
> > }
>
> The above two hunks seem to be right.
>
There are two places which call save_fp(). Just verified that in
both places current process should be fpu owner and therefore
FPU *should* be enabled.
Basically whenever current process is fpu owner, the FPU should be
enabled. Apparently something in 2.5 breaks that fundamental assumption.
Will look into it later.
Jun
prev parent reply other threads:[~2003-01-29 1:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-26 1:58 [PATCH 2.5] FPU Vivien Chappelier
2003-01-26 3:35 ` Greg Lindahl
2003-01-28 10:33 ` Ralf Baechle
2003-01-27 18:29 ` Jun Sun
2003-01-29 1:26 ` Jun Sun [this message]
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=20030128172631.E11633@mvista.com \
--to=jsun@mvista.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@oss.sgi.com \
--cc=vivienc@nerim.net \
/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.