x86/fpu: Get rid of PF_USED_MATH usage, convert it to fpu->fpstate_active
authorIngo Molnar <mingo@kernel.org>
Thu, 23 Apr 2015 10:49:20 +0000 (12:49 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 19 May 2015 13:47:25 +0000 (15:47 +0200)
commitc5bedc6847c3be6efe0e671a6155c9a25fd468bf
treef1eb66ea2807447c95e915f281d6815578b7e627
parentaf7f8721f1f1252473b154c38dd7583abfe3206b
x86/fpu: Get rid of PF_USED_MATH usage, convert it to fpu->fpstate_active

Introduce a simple fpu->fpstate_active flag in the fpu context data structure
and use that instead of PF_USED_MATH in task->flags.

Testing for this flag byte should be slightly more efficient than
testing a bit in a bitmask, but the main advantage is that most
FPU functions can now be performed on a 'struct fpu' alone, they
don't need access to 'struct task_struct' anymore.

There's a slight linecount increase, mostly due to the 'fpu' local
variables and due to extra comments. The local variables will go away
once we move most of the FPU methods to pure 'struct fpu' parameters.

Reviewed-by: Borislav Petkov <bp@alien8.de>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/ia32/ia32_signal.c
arch/x86/include/asm/fpu-internal.h
arch/x86/include/asm/fpu/types.h
arch/x86/include/asm/processor.h
arch/x86/kernel/fpu/core.c
arch/x86/kernel/fpu/xsave.c
arch/x86/kernel/signal.c
arch/x86/kvm/x86.c
arch/x86/math-emu/fpu_entry.c