lkml.org 
[lkml]   [2009]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 6/7] x86: Move kernel_fpu_using to asm/i387.h

* 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


\
 
 \ /
  Last update: 2009-06-17 18:49    [W:0.142 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site