Commit 82d4150c authored by Robert Richter's avatar Robert Richter Committed by H. Peter Anvin

x86, xsave: Move boot cpu initialization to xsave_init()

This patch moves boot cpu initialization to xsave_init(). Now all cpus
are initialized in one single function.
Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
LKML-Reference: <1279651857-24639-5-git-send-email-robert.richter@amd.com>
Acked-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent db10db48
...@@ -1270,12 +1270,6 @@ void __cpuinit cpu_init(void) ...@@ -1270,12 +1270,6 @@ void __cpuinit cpu_init(void)
clear_used_math(); clear_used_math();
mxcsr_feature_mask_init(); mxcsr_feature_mask_init();
/*
* Boot processor to setup the FP and extended state context info.
*/
if (!smp_processor_id())
init_thread_xstate();
xsave_init(); xsave_init();
} }
#endif #endif
...@@ -93,11 +93,6 @@ void __cpuinit fpu_init(void) ...@@ -93,11 +93,6 @@ void __cpuinit fpu_init(void)
write_cr0(oldcr0 & ~(X86_CR0_TS|X86_CR0_EM)); /* clear TS and EM */ write_cr0(oldcr0 & ~(X86_CR0_TS|X86_CR0_EM)); /* clear TS and EM */
/*
* Boot processor to setup the FP and extended state context info.
*/
if (!smp_processor_id())
init_thread_xstate();
xsave_init(); xsave_init();
mxcsr_feature_mask_init(); mxcsr_feature_mask_init();
......
...@@ -360,7 +360,7 @@ unsigned int sig_xstate_size = sizeof(struct _fpstate); ...@@ -360,7 +360,7 @@ unsigned int sig_xstate_size = sizeof(struct _fpstate);
/* /*
* Enable the extended processor state save/restore feature * Enable the extended processor state save/restore feature
*/ */
void __cpuinit xsave_init(void) static void __cpuinit __xsave_init(void)
{ {
if (!cpu_has_xsave) if (!cpu_has_xsave)
return; return;
...@@ -446,7 +446,7 @@ void __ref xsave_cntxt_init(void) ...@@ -446,7 +446,7 @@ void __ref xsave_cntxt_init(void)
* Support only the state known to OS. * Support only the state known to OS.
*/ */
pcntxt_mask = pcntxt_mask & XCNTXT_MASK; pcntxt_mask = pcntxt_mask & XCNTXT_MASK;
xsave_init(); __xsave_init();
/* /*
* Recompute the context size for enabled features * Recompute the context size for enabled features
...@@ -463,3 +463,13 @@ void __ref xsave_cntxt_init(void) ...@@ -463,3 +463,13 @@ void __ref xsave_cntxt_init(void)
"cntxt size 0x%x\n", "cntxt size 0x%x\n",
pcntxt_mask, xstate_size); pcntxt_mask, xstate_size);
} }
void __cpuinit xsave_init(void)
{
/*
* Boot processor to setup the FP and extended state context info.
*/
if (!smp_processor_id())
init_thread_xstate();
__xsave_init();
}
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