diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-04-26 16:56:05 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-05-19 15:47:48 +0200 |
commit | 952f07ecbd4d9bac77c003ba136f8ee8ce631591 (patch) | |
tree | 83d3abaa36140b5f9765796b9a6bc1b34066bbac /arch/x86/include/asm/fpu/api.h | |
parent | d63e79b114c0208bc2b7712c879568e180909d60 (diff) | |
download | kernel_replicant_linux-952f07ecbd4d9bac77c003ba136f8ee8ce631591.tar.gz kernel_replicant_linux-952f07ecbd4d9bac77c003ba136f8ee8ce631591.tar.bz2 kernel_replicant_linux-952f07ecbd4d9bac77c003ba136f8ee8ce631591.zip |
x86/fpu: Move various internal function prototypes to fpu/internal.h
There are a number of FPU internal function prototypes and an inline function
in fpu/api.h, mostly placed so historically as the code grew over the years.
Move them over into fpu/internal.h where they belong. (Add sched.h include
to stackprotector.h which incorrectly relied on getting it from fpu/api.h.)
fpu/api.h is now a pure file that only contains FPU APIs intended for driver
use.
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/api.h')
-rw-r--r-- | arch/x86/include/asm/fpu/api.h | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/arch/x86/include/asm/fpu/api.h b/arch/x86/include/asm/fpu/api.h index d4ab9e3af234..0c713455fc63 100644 --- a/arch/x86/include/asm/fpu/api.h +++ b/arch/x86/include/asm/fpu/api.h @@ -10,23 +10,8 @@ #ifndef _ASM_X86_FPU_API_H #define _ASM_X86_FPU_API_H -#include <linux/sched.h> #include <linux/hardirq.h> -struct pt_regs; -struct user_i387_struct; - -extern int fpstate_alloc_init(struct fpu *fpu); -extern void fpstate_init(struct fpu *fpu); -extern void fpu__clear(struct task_struct *tsk); - -extern int dump_fpu(struct pt_regs *, struct user_i387_struct *); -extern void fpu__restore(void); -extern void fpu__init_check_bugs(void); -extern void fpu__resume_cpu(void); - -extern bool irq_fpu_usable(void); - /* * Careful: __kernel_fpu_begin/end() must be called with preempt disabled * and they don't touch the preempt state on their own. @@ -41,6 +26,7 @@ extern void __kernel_fpu_begin(void); extern void __kernel_fpu_end(void); extern void kernel_fpu_begin(void); extern void kernel_fpu_end(void); +extern bool irq_fpu_usable(void); /* * Some instructions like VIA's padlock instructions generate a spurious @@ -73,19 +59,4 @@ static inline void irq_ts_restore(int TS_state) stts(); } -/* - * The question "does this thread have fpu access?" - * is slightly racy, since preemption could come in - * and revoke it immediately after the test. - * - * However, even in that very unlikely scenario, - * we can just assume we have FPU access - typically - * to save the FP state - we'll just take a #NM - * fault and get the FPU access back. - */ -static inline int user_has_fpu(void) -{ - return current->thread.fpu.fpregs_active; -} - #endif /* _ASM_X86_FPU_API_H */ |