diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-04-26 15:32:34 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-05-19 16:47:44 +0300 |
commit | b11316ed9ed9e453562d9f89a39d344331a3ec1d (patch) | |
tree | 4eac66340e83fe3ae60cfc46a004d77da4709002 | |
parent | 21c4cd108a1b144ad645355bfee1f8be937f03a2 (diff) | |
download | linux-b11316ed9ed9e453562d9f89a39d344331a3ec1d.tar.xz |
x86/fpu: Factor out fpu__init_cpu_generic()
Factor out the generic bits from fpu__init_cpu(), to create
a flat sequence of per CPU initialization function calls:
fpu__init_cpu_generic();
fpu__init_cpu_xstate();
fpu__init_cpu_ctx_switch();
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>
-rw-r--r-- | arch/x86/kernel/fpu/init.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/x86/kernel/fpu/init.c b/arch/x86/kernel/fpu/init.c index cf27bbed1ba1..37e8b139dc31 100644 --- a/arch/x86/kernel/fpu/init.c +++ b/arch/x86/kernel/fpu/init.c @@ -136,9 +136,9 @@ static void fpu__init_cpu_ctx_switch(void) } /* - * Enable all supported FPU features. Called when a CPU is brought online. + * Initialize the registers found in all CPUs, CR0 and CR4: */ -void fpu__init_cpu(void) +static void fpu__init_cpu_generic(void) { unsigned long cr0; unsigned long cr4_mask = 0; @@ -163,7 +163,14 @@ void fpu__init_cpu(void) if (!cpu_has_fpu) cr0 |= X86_CR0_EM; write_cr0(cr0); +} +/* + * Enable all supported FPU features. Called when a CPU is brought online. + */ +void fpu__init_cpu(void) +{ + fpu__init_cpu_generic(); fpu__init_cpu_xstate(); fpu__init_cpu_ctx_switch(); } |