aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2008-01-30 07:31:50 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:31:50 -0500
commit4421011120b2304e5c248ae4165a2704588aedf1 (patch)
treeb715f9bd5fbe3493a2c6a14d0c30832c42832e62 /include
parentb7b71725fb9584454bfe5f231223bd63421798fb (diff)
x86: x86 i387 user_regset
This revamps the i387 code to be shared across 32-bit, 64-bit, and 32-on-64. It does so by consolidating the code in one place based on the user_regset accessor interfaces. This switches 32-bit to using the i387_64.h header and 64-bit to using the i387.c that was previously i387_32.c, but that's what took the least cleanup in each file. Here i387.h is stubbed to always include i387_64.h rather than renaming the file, to keep this diff smaller and easier to read. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86/fpu32.h10
-rw-r--r--include/asm-x86/i387.h6
-rw-r--r--include/asm-x86/i387_64.h11
3 files changed, 12 insertions, 15 deletions
diff --git a/include/asm-x86/fpu32.h b/include/asm-x86/fpu32.h
deleted file mode 100644
index 4153db5c0c31..000000000000
--- a/include/asm-x86/fpu32.h
+++ /dev/null
@@ -1,10 +0,0 @@
1#ifndef _FPU32_H
2#define _FPU32_H 1
3
4struct _fpstate_ia32;
5
6int restore_i387_ia32(struct task_struct *tsk, struct _fpstate_ia32 __user *buf, int fsave);
7int save_i387_ia32(struct task_struct *tsk, struct _fpstate_ia32 __user *buf,
8 struct pt_regs *regs, int fsave);
9
10#endif
diff --git a/include/asm-x86/i387.h b/include/asm-x86/i387.h
index a8bbed349664..b2bc0050ce99 100644
--- a/include/asm-x86/i387.h
+++ b/include/asm-x86/i387.h
@@ -1,5 +1 @@
1#ifdef CONFIG_X86_32 #include "i387_64.h"
2# include "i387_32.h"
3#else
4# include "i387_64.h"
5#endif
diff --git a/include/asm-x86/i387_64.h b/include/asm-x86/i387_64.h
index 4cea7373ac78..de435b9114df 100644
--- a/include/asm-x86/i387_64.h
+++ b/include/asm-x86/i387_64.h
@@ -12,6 +12,7 @@
12 12
13#include <linux/sched.h> 13#include <linux/sched.h>
14#include <linux/kernel_stat.h> 14#include <linux/kernel_stat.h>
15#include <linux/regset.h>
15#include <asm/processor.h> 16#include <asm/processor.h>
16#include <asm/sigcontext.h> 17#include <asm/sigcontext.h>
17#include <asm/user.h> 18#include <asm/user.h>
@@ -23,6 +24,16 @@ extern void mxcsr_feature_mask_init(void);
23extern void init_fpu(struct task_struct *child); 24extern void init_fpu(struct task_struct *child);
24extern asmlinkage void math_state_restore(void); 25extern asmlinkage void math_state_restore(void);
25 26
27extern user_regset_active_fn fpregs_active, xfpregs_active;
28extern user_regset_get_fn fpregs_get, xfpregs_get, fpregs_soft_get;
29extern user_regset_set_fn fpregs_set, xfpregs_set, fpregs_soft_set;
30
31#ifdef CONFIG_IA32_EMULATION
32struct _fpstate_ia32;
33extern int save_i387_ia32(struct _fpstate_ia32 __user *buf);
34extern int restore_i387_ia32(struct _fpstate_ia32 __user *buf);
35#endif
36
26#ifdef CONFIG_X86_64 37#ifdef CONFIG_X86_64
27 38
28/* Ignore delayed exceptions from user space */ 39/* Ignore delayed exceptions from user space */