diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2008-07-29 13:29:21 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-30 13:49:25 -0400 |
commit | 3c1c7f101426cb2ecc79d817a8a65928965fc860 (patch) | |
tree | 55a2b7c5ccb28ea38bf82f7d799447980e2126c7 /arch/x86/kernel/i387.c | |
parent | b359e8a434cc3d09847010fc4aeccf48d69740e4 (diff) |
x86, xsave: dynamically allocate sigframes fpstate instead of static allocation
dynamically allocate fpstate on the stack, instead of static allocation
in the current sigframe layout on the user stack. This will allow the
fpstate structure to grow in the future, which includes extended state
information supporting xsave/xrstor.
signal handlers will be able to access the fpstate pointer from the
sigcontext structure asusual, with no change. For the non RT sigframe's
(which are supported only for 32bit apps), current static fpstate layout
in the sigframe will be unused(so that we don't change the extramask[]
offset in the sigframe and thus prevent breaking app's which modify
extramask[]).
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/i387.c')
-rw-r--r-- | arch/x86/kernel/i387.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c index b778e17e4b01..51fb288a2c97 100644 --- a/arch/x86/kernel/i387.c +++ b/arch/x86/kernel/i387.c | |||
@@ -24,6 +24,7 @@ | |||
24 | # define save_i387_ia32 save_i387 | 24 | # define save_i387_ia32 save_i387 |
25 | # define restore_i387_ia32 restore_i387 | 25 | # define restore_i387_ia32 restore_i387 |
26 | # define _fpstate_ia32 _fpstate | 26 | # define _fpstate_ia32 _fpstate |
27 | # define sig_xstate_ia32_size sig_xstate_size | ||
27 | # define user_i387_ia32_struct user_i387_struct | 28 | # define user_i387_ia32_struct user_i387_struct |
28 | # define user32_fxsr_struct user_fxsr_struct | 29 | # define user32_fxsr_struct user_fxsr_struct |
29 | #endif | 30 | #endif |
@@ -36,6 +37,7 @@ | |||
36 | 37 | ||
37 | static unsigned int mxcsr_feature_mask __read_mostly = 0xffffffffu; | 38 | static unsigned int mxcsr_feature_mask __read_mostly = 0xffffffffu; |
38 | unsigned int xstate_size; | 39 | unsigned int xstate_size; |
40 | unsigned int sig_xstate_ia32_size = sizeof(struct _fpstate_ia32); | ||
39 | static struct i387_fxsave_struct fx_scratch __cpuinitdata; | 41 | static struct i387_fxsave_struct fx_scratch __cpuinitdata; |
40 | 42 | ||
41 | void __cpuinit mxcsr_feature_mask_init(void) | 43 | void __cpuinit mxcsr_feature_mask_init(void) |