x86/fpu: Remove xsave_init()
authorIngo Molnar <mingo@kernel.org>
Sat, 25 Apr 2015 04:52:53 +0000 (06:52 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 19 May 2015 13:47:40 +0000 (15:47 +0200)
Expand fpu__init_system_xstate() and fpu__init_cpu_xstate() calls
into xsave_init() calls.

(This will allow us to call the proper versions in higher level FPU init code
later on.)

No change in functionality.

Reviewed-by: Borislav Petkov <bp@alien8.de>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/fpu/xsave.h
arch/x86/kernel/fpu/init.c
arch/x86/kernel/fpu/xsave.c

index 5c3ab4e17aea972d323f7e52601346ab4d2e7cb0..a10e66582c1b8e3dd66e715526c7763fe7afdf9b 100644 (file)
@@ -52,7 +52,6 @@ extern u64 xfeatures_mask;
 extern u64 xstate_fx_sw_bytes[USER_XSTATE_FX_SW_WORDS];
 extern struct xsave_struct init_xstate_ctx;
 
-extern void xsave_init(void);
 extern void update_regset_xstate_info(unsigned int size, u64 xstate_mask);
 
 /* These macros all use (%edi)/(%rdi) as the single memory argument. */
index d6234adc8ba0da671b96a064def6519865562f48..77599fe8af568f35a530bed8401509f4f5c56fc4 100644 (file)
@@ -98,7 +98,7 @@ static void fpstate_xstate_init_size(void)
 {
        /*
         * Note that xstate_size might be overwriten later during
-        * xsave_init().
+        * fpu__init_system_xstate().
         */
 
        if (!cpu_has_fpu) {
@@ -146,7 +146,8 @@ void fpu__init_cpu(void)
                cr0 |= X86_CR0_EM;
        write_cr0(cr0);
 
-       xsave_init();
+       fpu__init_system_xstate();
+       fpu__init_cpu_xstate();
 }
 
 /*
@@ -159,7 +160,8 @@ void fpu__init_system(void)
        fpu__init_cpu();
 
        mxcsr_feature_mask_init();
-       xsave_init();
+       fpu__init_system_xstate();
+       fpu__init_cpu_xstate();
        eager_fpu_init();
 }
 
index 9d5ff90916b177a5a8de33e94de7fdbd4d9e6f0c..fa9b954eb23a36449a2643af6be09ad0f35e871a 100644 (file)
@@ -646,8 +646,7 @@ static void __init init_xstate_size(void)
  * Enable and initialize the xsave feature.
  * Called once per system bootup.
  *
- * ( Not marked __init because of false positive section warnings
- *   generated by xsave_init(). )
+ * ( Not marked __init because of false positive section warnings. )
  */
 void fpu__init_system_xstate(void)
 {
@@ -713,16 +712,6 @@ void fpu__init_system_xstate(void)
                cpu_has_xsaves ? "compacted" : "standard");
 }
 
-/*
- * For the very first instance, this calls fpu__init_system_xstate();
- * for all subsequent instances, this calls fpu__init_cpu_xstate().
- */
-void xsave_init(void)
-{
-       fpu__init_system_xstate();
-       fpu__init_cpu_xstate();
-}
-
 /*
  * setup_init_fpu_buf() is __init and it is OK to call it here because
  * init_xstate_ctx will be unset only once during boot.
This page took 0.027458 seconds and 5 git commands to generate.