diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-04-23 12:46:20 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-05-19 15:47:24 +0200 |
commit | 4c1384100ebf51651d02430a7f70661ef1ef06ac (patch) | |
tree | a1c942ae45d43be4f34cf463fb33c54c781d7e3d /arch/x86/include/asm/fpu-internal.h | |
parent | 4540d3faa7c3fca6a6125448861de0e2e485658b (diff) | |
download | lwn-4c1384100ebf51651d02430a7f70661ef1ef06ac.tar.gz lwn-4c1384100ebf51651d02430a7f70661ef1ef06ac.zip |
x86/fpu: Open code PF_USED_MATH usages
PF_USED_MATH is used directly, but also in a handful of helper inlines.
To ease the elimination of PF_USED_MATH, convert all inline helpers
to open-coded PF_USED_MATH usage.
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>
Diffstat (limited to 'arch/x86/include/asm/fpu-internal.h')
-rw-r--r-- | arch/x86/include/asm/fpu-internal.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h index 44516ad6c890..2cac49e3b4bd 100644 --- a/arch/x86/include/asm/fpu-internal.h +++ b/arch/x86/include/asm/fpu-internal.h @@ -375,7 +375,8 @@ static inline void drop_fpu(struct task_struct *tsk) __thread_fpu_end(fpu); } - clear_stopped_child_used_math(tsk); + tsk->flags &= ~PF_USED_MATH; + preempt_enable(); } @@ -423,7 +424,7 @@ static inline fpu_switch_t switch_fpu_prepare(struct task_struct *old, struct ta * If the task has used the math, pre-load the FPU on xsave processors * or if the past 5 consecutive context-switches used math. */ - fpu.preload = tsk_used_math(new) && + fpu.preload = (new->flags & PF_USED_MATH) && (use_eager_fpu() || new->thread.fpu.counter > 5); if (old_fpu->has_fpu) { |