aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/xsave.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c
index ada8df7b89c0..87a815b85f3e 100644
--- a/arch/x86/kernel/xsave.c
+++ b/arch/x86/kernel/xsave.c
@@ -678,16 +678,12 @@ void xsave_init(void)
678 this_func(); 678 this_func();
679} 679}
680 680
681static inline void __init eager_fpu_init_bp(void) 681/*
682{ 682 * setup_init_fpu_buf() is __init and it is OK to call it here because
683 if (!init_xstate_buf) 683 * init_xstate_buf will be unset only once during boot.
684 setup_init_fpu_buf(); 684 */
685} 685void __init_refok eager_fpu_init(void)
686
687void eager_fpu_init(void)
688{ 686{
689 static __refdata void (*boot_func)(void) = eager_fpu_init_bp;
690
691 WARN_ON(used_math()); 687 WARN_ON(used_math());
692 current_thread_info()->status = 0; 688 current_thread_info()->status = 0;
693 689
@@ -699,10 +695,8 @@ void eager_fpu_init(void)
699 return; 695 return;
700 } 696 }
701 697
702 if (boot_func) { 698 if (!init_xstate_buf)
703 boot_func(); 699 setup_init_fpu_buf();
704 boot_func = NULL;
705 }
706} 700}
707 701
708/* 702/*