x86: Move kernel_fpu_using to irq_fpu_usable in asm/i387.h
authorHuang Ying <ying.huang@intel.com>
Mon, 31 Aug 2009 05:11:54 +0000 (13:11 +0800)
committerH. Peter Anvin <hpa@zytor.com>
Wed, 2 Sep 2009 04:39:15 +0000 (21:39 -0700)
commitae4b688db2432baad379f73fdcac13ec24f603d5
treee367ad761a6835fffeb25694f3308e9315d7ef3c
parentf6909f394c2d4a0a71320797df72d54c49c5927e
x86: Move kernel_fpu_using to irq_fpu_usable in asm/i387.h

This function measures whether the FPU/SSE state can be touched in
interrupt context. If the interrupted code is in user space or has no
valid FPU/SSE context (CR0.TS == 1), FPU/SSE state can be used in IRQ
or soft_irq context too.

This is used by AES-NI accelerated AES implementation and PCLMULQDQ
accelerated GHASH implementation.

v3:
 - Renamed to irq_fpu_usable to reflect the purpose of the function.

v2:
 - Renamed to irq_is_fpu_using to reflect the real situation.

Signed-off-by: Huang Ying <ying.huang@intel.com>
CC: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/x86/crypto/aesni-intel_glue.c
arch/x86/include/asm/i387.h