summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/xsave.c
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2010-07-20 20:50:51 +0200
committerH. Peter Anvin <hpa@linux.intel.com>2010-07-20 16:21:44 -0700
commit82d4150cec83b9775f84810b39a1c0b91585d429 (patch)
treef4e92af289f3d09c0a9fbc62e91e103f3625073e /arch/x86/kernel/xsave.c
parentdb10db48b2c530def21bfd76d576702c7df7f620 (diff)
downloadop-kernel-dev-82d4150cec83b9775f84810b39a1c0b91585d429.zip
op-kernel-dev-82d4150cec83b9775f84810b39a1c0b91585d429.tar.gz
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: Robert Richter <robert.richter@amd.com> LKML-Reference: <1279651857-24639-5-git-send-email-robert.richter@amd.com> Acked-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/kernel/xsave.c')
-rw-r--r--arch/x86/kernel/xsave.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c
index 368047c..ab9ad48 100644
--- a/arch/x86/kernel/xsave.c
+++ b/arch/x86/kernel/xsave.c
@@ -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();
+}
OpenPOWER on IntegriCloud