|
@@ -360,7 +360,7 @@ unsigned int sig_xstate_size = sizeof(struct _fpstate);
|
|
|
/*
|
|
|
* Enable the extended processor state save/restore feature
|
|
|
*/
|
|
|
-void __cpuinit xsave_init(void)
|
|
|
+static void __cpuinit __xsave_init(void)
|
|
|
{
|
|
|
if (!cpu_has_xsave)
|
|
|
return;
|
|
@@ -446,7 +446,7 @@ void __ref xsave_cntxt_init(void)
|
|
|
* Support only the state known to OS.
|
|
|
*/
|
|
|
pcntxt_mask = pcntxt_mask & XCNTXT_MASK;
|
|
|
- xsave_init();
|
|
|
+ __xsave_init();
|
|
|
|
|
|
/*
|
|
|
* Recompute the context size for enabled features
|
|
@@ -463,3 +463,13 @@ void __ref xsave_cntxt_init(void)
|
|
|
"cntxt size 0x%x\n",
|
|
|
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();
|
|
|
+}
|