From df1722d342c9ef9e9c07571d66904ef50a2e0f77 Mon Sep 17 00:00:00 2001 From: Fenghua Yu Date: Tue, 13 Nov 2012 11:32:50 -0800 Subject: [PATCH] --- yaml --- r: 339133 b: refs/heads/master c: 6f5298c2139b06925037490367906f3d73955b86 h: refs/heads/master i: 339131: 2ac2b1ba08966d148ccec2f06196c1cb2d87429b v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/i387.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 60a26f224963..69452b29ef3c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8d966a04107e56993a051cd41ead0b4f23ba2414 +refs/heads/master: 6f5298c2139b06925037490367906f3d73955b86 diff --git a/trunk/arch/x86/kernel/i387.c b/trunk/arch/x86/kernel/i387.c index 675a05012449..245a71db401a 100644 --- a/trunk/arch/x86/kernel/i387.c +++ b/trunk/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();