projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d966a0
)
x86/i387.c: Initialize thread xstate only on CPU0 only once
author
Fenghua Yu
<fenghua.yu@intel.com>
Tue, 13 Nov 2012 19:32:50 +0000
(11:32 -0800)
committer
H. Peter Anvin
<hpa@linux.intel.com>
Wed, 14 Nov 2012 23:28:11 +0000
(15:28 -0800)
init_thread_xstate() is only called once to avoid overriding xstate_size during
boot time or during CPU hotplug.
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Link:
http://lkml.kernel.org/r/1352835171-3958-14-git-send-email-fenghua.yu@intel.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/kernel/i387.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/i387.c
b/arch/x86/kernel/i387.c
index 675a05012449d32ccaaa4abf0a0fb4abd095ed84..245a71db401af0e50be0deeba56d680c278ca2fc 100644
(file)
--- a/
arch/x86/kernel/i387.c
+++ b/
arch/x86/kernel/i387.c
@@
-175,7
+175,11
@@
void __cpuinit fpu_init(void)
cr0 |= X86_CR0_EM;
write_cr0(cr0);
- if (!smp_processor_id())
+ /*
+ * init_thread_xstate is only called once to avoid overriding
+ * xstate_size during boot time or during CPU hotplug.
+ */
+ if (xstate_size == 0)
init_thread_xstate();
mxcsr_feature_mask_init();