Commit 59a36d16 authored by Ingo Molnar's avatar Ingo Molnar

x86/fpu: Factor out fpu/regset.h from fpu/internal.h

Only a few places use the regset definitions, so factor them out.

Also fix related header dependency assumptions.

Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
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: default avatarIngo Molnar <mingo@kernel.org>
parent fcbc99c4
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#ifndef _ASM_X86_FPU_INTERNAL_H #ifndef _ASM_X86_FPU_INTERNAL_H
#define _ASM_X86_FPU_INTERNAL_H #define _ASM_X86_FPU_INTERNAL_H
#include <linux/regset.h>
#include <linux/compat.h> #include <linux/compat.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -48,18 +47,6 @@ extern void fpu__resume_cpu(void); ...@@ -48,18 +47,6 @@ extern void fpu__resume_cpu(void);
DECLARE_PER_CPU(struct fpu *, fpu_fpregs_owner_ctx); DECLARE_PER_CPU(struct fpu *, fpu_fpregs_owner_ctx);
extern user_regset_active_fn regset_fpregs_active, regset_xregset_fpregs_active;
extern user_regset_get_fn fpregs_get, xfpregs_get, fpregs_soft_get,
xstateregs_get;
extern user_regset_set_fn fpregs_set, xfpregs_set, fpregs_soft_set,
xstateregs_set;
/*
* xstateregs_active == regset_fpregs_active. Please refer to the comment
* at the definition of regset_fpregs_active.
*/
#define xstateregs_active regset_fpregs_active
#ifdef CONFIG_MATH_EMULATION #ifdef CONFIG_MATH_EMULATION
extern void finit_soft_fpu(struct i387_soft_struct *soft); extern void finit_soft_fpu(struct i387_soft_struct *soft);
#else #else
......
/*
* FPU regset handling methods:
*/
#ifndef _ASM_X86_FPU_REGSET_H
#define _ASM_X86_FPU_REGSET_H
#include <linux/regset.h>
extern user_regset_active_fn regset_fpregs_active, regset_xregset_fpregs_active;
extern user_regset_get_fn fpregs_get, xfpregs_get, fpregs_soft_get,
xstateregs_get;
extern user_regset_set_fn fpregs_set, xfpregs_set, fpregs_soft_set,
xstateregs_set;
/*
* xstateregs_active == regset_fpregs_active. Please refer to the comment
* at the definition of regset_fpregs_active.
*/
#define xstateregs_active regset_fpregs_active
#endif /* _ASM_X86_FPU_REGSET_H */
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include <linux/types.h> #include <linux/types.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <linux/uaccess.h>
/* Bit 63 of XCR0 is reserved for future expansion */ /* Bit 63 of XCR0 is reserved for future expansion */
#define XSTATE_EXTEND_MASK (~(XSTATE_FPSSE | (1ULL << 63))) #define XSTATE_EXTEND_MASK (~(XSTATE_FPSSE | (1ULL << 63)))
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
* Gareth Hughes <gareth@valinux.com>, May 2000 * Gareth Hughes <gareth@valinux.com>, May 2000
*/ */
#include <asm/fpu/internal.h> #include <asm/fpu/internal.h>
#include <asm/fpu/regset.h>
#include <asm/fpu/signal.h> #include <asm/fpu/signal.h>
#include <linux/hardirq.h> #include <linux/hardirq.h>
......
...@@ -5,9 +5,11 @@ ...@@ -5,9 +5,11 @@
*/ */
#include <linux/compat.h> #include <linux/compat.h>
#include <linux/cpu.h> #include <linux/cpu.h>
#include <asm/fpu/api.h> #include <asm/fpu/api.h>
#include <asm/fpu/internal.h> #include <asm/fpu/internal.h>
#include <asm/fpu/signal.h> #include <asm/fpu/signal.h>
#include <asm/fpu/regset.h>
#include <asm/sigframe.h> #include <asm/sigframe.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/regset.h>
#include <linux/tracehook.h> #include <linux/tracehook.h>
#include <linux/user.h> #include <linux/user.h>
#include <linux/elf.h> #include <linux/elf.h>
...@@ -30,6 +29,7 @@ ...@@ -30,6 +29,7 @@
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/fpu/internal.h> #include <asm/fpu/internal.h>
#include <asm/fpu/signal.h> #include <asm/fpu/signal.h>
#include <asm/fpu/regset.h>
#include <asm/debugreg.h> #include <asm/debugreg.h>
#include <asm/ldt.h> #include <asm/ldt.h>
#include <asm/desc.h> #include <asm/desc.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment