mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-14 06:35:12 +00:00
x86/fpu/xstate: Clean up setup_xstate_comp() call
So call setup_xstate_comp() from the xstate init code, not from the generic fpu__init_system() code. This allows us to remove the protytype from xstate.h as well. 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: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
489e9c0188
commit
5fd402dfa7
3 changed files with 2 additions and 6 deletions
|
@ -227,6 +227,5 @@ static inline int copy_user_to_xregs(struct xregs_state __user *buf, u64 mask)
|
||||||
}
|
}
|
||||||
|
|
||||||
void *get_xsave_addr(struct xregs_state *xsave, int xstate);
|
void *get_xsave_addr(struct xregs_state *xsave, int xstate);
|
||||||
void setup_xstate_comp(void);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -262,7 +262,6 @@ void fpu__init_system(struct cpuinfo_x86 *c)
|
||||||
fpu__init_system_generic();
|
fpu__init_system_generic();
|
||||||
fpu__init_system_xstate_size_legacy();
|
fpu__init_system_xstate_size_legacy();
|
||||||
fpu__init_system_xstate();
|
fpu__init_system_xstate();
|
||||||
setup_xstate_comp();
|
|
||||||
|
|
||||||
fpu__init_system_ctx_switch();
|
fpu__init_system_ctx_switch();
|
||||||
}
|
}
|
||||||
|
|
|
@ -218,11 +218,8 @@ static void print_xstate_features(void)
|
||||||
* This function sets up offsets and sizes of all extended states in
|
* This function sets up offsets and sizes of all extended states in
|
||||||
* xsave area. This supports both standard format and compacted format
|
* xsave area. This supports both standard format and compacted format
|
||||||
* of the xsave aread.
|
* of the xsave aread.
|
||||||
*
|
|
||||||
* Input: void
|
|
||||||
* Output: void
|
|
||||||
*/
|
*/
|
||||||
void setup_xstate_comp(void)
|
static void setup_xstate_comp(void)
|
||||||
{
|
{
|
||||||
unsigned int xstate_comp_sizes[sizeof(xfeatures_mask)*8];
|
unsigned int xstate_comp_sizes[sizeof(xfeatures_mask)*8];
|
||||||
int i;
|
int i;
|
||||||
|
@ -355,6 +352,7 @@ void fpu__init_system_xstate(void)
|
||||||
update_regset_xstate_info(xstate_size, xfeatures_mask);
|
update_regset_xstate_info(xstate_size, xfeatures_mask);
|
||||||
fpu__init_prepare_fx_sw_frame();
|
fpu__init_prepare_fx_sw_frame();
|
||||||
setup_init_fpu_buf();
|
setup_init_fpu_buf();
|
||||||
|
setup_xstate_comp();
|
||||||
|
|
||||||
pr_info("x86/fpu: Enabled xstate features 0x%llx, context size is 0x%x bytes, using '%s' format.\n",
|
pr_info("x86/fpu: Enabled xstate features 0x%llx, context size is 0x%x bytes, using '%s' format.\n",
|
||||||
xfeatures_mask,
|
xfeatures_mask,
|
||||||
|
|
Loading…
Reference in a new issue