From: "H. Peter Anvin" <hpa@zytor.com>
To: Huang Ying <ying.huang@intel.com>
Cc: Ingo Molnar <mingo@elte.hu>,
Herbert Xu <herbert@gondor.apana.org.au>,
Thomas Gleixner <tglx@linutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>
Subject: Re: [RFC 6/7] x86: Move kernel_fpu_using to asm/i387.h
Date: Wed, 17 Jun 2009 20:52:16 -0700 [thread overview]
Message-ID: <4A39B9F0.8020200@zytor.com> (raw)
In-Reply-To: <1245290268.11965.190.camel@yhuang-dev.sh.intel.com>
Huang Ying wrote:
>
> After some thinking, I think something as follow may be more
> appropriate:
>
> /* This may be useful for someone else */
> static inline bool fpu_using(void)
> {
> return !(read_cr0() & X86_CR0_TS);
> }
>
> static inline bool irq_fpu_using(void)
> {
> return in_interrupt() && fpu_using();
> }
>
Yes, looks good. I'll pull in the patch as soon as I get it.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
prev parent reply other threads:[~2009-06-18 3:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-11 7:10 [RFC 6/7] x86: Move kernel_fpu_using to asm/i387.h Huang Ying
2009-06-17 16:46 ` Ingo Molnar
2009-06-17 17:06 ` H. Peter Anvin
2009-06-18 1:48 ` Herbert Xu
2009-06-18 3:51 ` H. Peter Anvin
2009-06-18 1:57 ` Huang Ying
2009-06-18 3:52 ` H. Peter Anvin [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=4A39B9F0.8020200@zytor.com \
--to=hpa@zytor.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=ying.huang@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox