Kaynağa Gözat

x86/fpu: Do system-wide setup from fpu__detect()

fpu__cpu_init() is called on every CPU, so it is the wrong place
to call fpu__init_system() from. Call it from fpu__detect():
this is early CPU init code, but we already have CPU features detected,
so we can call the system-wide FPU init code from here.

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>
Ingo Molnar 10 yıl önce
ebeveyn
işleme
067051ccd2
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      arch/x86/kernel/fpu/init.c

+ 1 - 1
arch/x86/kernel/fpu/init.c

@@ -245,7 +245,6 @@ void fpu__init_system(void)
 void fpu__cpu_init(void)
 {
 	fpu__init_cpu();
-	fpu__init_system();
 }
 
 static int __init no_387(char *s)
@@ -279,5 +278,6 @@ void fpu__detect(struct cpuinfo_x86 *c)
 	else
 		clear_cpu_cap(c, X86_FEATURE_FPU);
 
+	fpu__init_system();
 	/* The final cr0 value is set later, in fpu_init() */
 }