x86/fpu: Move fpu__init_system_early_generic() out of fpu__detect()
authorIngo Molnar <mingo@kernel.org>
Sun, 26 Apr 2015 13:07:18 +0000 (15:07 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 19 May 2015 13:47:46 +0000 (15:47 +0200)
Move the fpu__init_system_early_generic() call into fpu__init_system(),
which hosts all the system init calls.

Expose fpu__init_system() to other modules - this will be our main and only
system init function.

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/internal.h
arch/x86/kernel/fpu/init.c

index 4617eeb57004bd6595132c1a08971b8e4b04d029..5a1fa5bc2c273326323627d35f373e1d183a255e 100644 (file)
@@ -41,6 +41,7 @@ extern void eager_fpu_init(void);
 
 extern void fpu__init_system_xstate(void);
 extern void fpu__init_cpu_xstate(void);
+extern void fpu__init_system(struct cpuinfo_x86 *c);
 
 DECLARE_PER_CPU(struct fpu *, fpu_fpregs_owner_ctx);
 
index 63cd1703d25c3ed522e3731604e770dcd6a1db34..1155a98d8c1efb233810aae83b345f6eb0bc7538 100644 (file)
@@ -5,7 +5,10 @@
 #include <asm/tlbflush.h>
 
 /*
- * The earliest FPU detection code:
+ * The earliest FPU detection code.
+ *
+ * Set the X86_FEATURE_FPU CPU-capability bit based on
+ * trying to execute an actual sequence of FPU instructions:
  */
 static void fpu__init_system_early_generic(struct cpuinfo_x86 *c)
 {
@@ -200,8 +203,10 @@ static void fpu__init_system_ctx_switch(void)
  * Called on the boot CPU once per system bootup, to set up the initial FPU state that
  * is later cloned into all processes.
  */
-void fpu__init_system(void)
+void fpu__init_system(struct cpuinfo_x86 *c)
 {
+       fpu__init_system_early_generic(c);
+
        /* The FPU has to be operational for some of the later FPU init activities: */
        fpu__init_cpu();
 
@@ -227,13 +232,8 @@ static int __init no_387(char *s)
 
 __setup("no387", no_387);
 
-/*
- * Set the X86_FEATURE_FPU CPU-capability bit based on
- * trying to execute an actual sequence of FPU instructions:
- */
 void fpu__detect(struct cpuinfo_x86 *c)
 {
-       fpu__init_system_early_generic(c);
-       fpu__init_system();
+       fpu__init_system(c);
        /* The final cr0 value is set later, in fpu_init() */
 }
This page took 0.026394 seconds and 5 git commands to generate.