mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Huang Ying <ying.huang@intel.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@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 18:46:22 +0200	[thread overview]
Message-ID: <20090617164622.GB25357@elte.hu> (raw)
In-Reply-To: <1244704236.5320.129.camel@yhuang-dev.sh.intel.com>


* Huang Ying <ying.huang@intel.com> wrote:

> This is used by AES-NI accelerated AES implementation and PCLMULQDQ
> accelerated GHASH implementation.
> 
> Signed-off-by: Huang Ying <ying.huang@intel.com>
> 
> ---
>  arch/x86/crypto/aesni-intel_glue.c |    7 -------
>  arch/x86/include/asm/i387.h        |    7 +++++++
>  2 files changed, 7 insertions(+), 7 deletions(-)
> 
> --- a/arch/x86/crypto/aesni-intel_glue.c
> +++ b/arch/x86/crypto/aesni-intel_glue.c
> @@ -59,13 +59,6 @@ asmlinkage void aesni_cbc_enc(struct cry
>  asmlinkage void aesni_cbc_dec(struct crypto_aes_ctx *ctx, u8 *out,
>  			      const u8 *in, unsigned int len, u8 *iv);
>  
> -static inline int kernel_fpu_using(void)
> -{
> -	if (in_interrupt() && !(read_cr0() & X86_CR0_TS))
> -		return 1;
> -	return 0;
> -}
> -
>  static inline struct crypto_aes_ctx *aes_ctx(void *raw_ctx)
>  {
>  	unsigned long addr = (unsigned long)raw_ctx;
> --- a/arch/x86/include/asm/i387.h
> +++ b/arch/x86/include/asm/i387.h
> @@ -302,6 +302,13 @@ static inline void kernel_fpu_end(void)
>  	preempt_enable();
>  }
>  
> +static inline int kernel_fpu_using(void)
> +{
> +	if (in_interrupt() && !(read_cr0() & X86_CR0_TS))
> +		return 1;
> +	return 0;
> +}
> +

Looks sane to me. Herbert, do you ack it?

	Ingo

  reply	other threads:[~2009-06-17 16:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-11  7:10 Huang Ying
2009-06-17 16:46 ` Ingo Molnar [this message]
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

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=20090617164622.GB25357@elte.hu \
    --to=mingo@elte.hu \
    --cc=herbert@gondor.apana.org.au \
    --cc=hpa@zytor.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®