]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
x86/fpu: Split fpu__cpu_init() into early-boot and cpu-boot parts
authorIngo Molnar <mingo@kernel.org>
Sat, 25 Apr 2015 02:34:48 +0000 (04:34 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 19 May 2015 13:47:39 +0000 (15:47 +0200)
commite35f6f14148c09ad534d122ed32722dd431ac184
tree2ce934904e3584a7e16116d27258c2a8054b80ce
parent3e5e1267740f47b1616aff5187b668cadd950047
x86/fpu: Split fpu__cpu_init() into early-boot and cpu-boot parts

There are two kinds of FPU initialization sequences necessary to bring FPU
functionality up: once per system bootup activities, such as detection,
feature initialization, etc. of attributes that are shared by all CPUs
in the system - and per cpu initialization sequences run when a CPU is
brought online (either during bootup or during CPU hotplug onlining),
such as CR0/CR4 register setting, etc.

The FPU code is mixing these roles together, with no clear distinction.

Start sorting this out by splitting the main FPU detection routine
(fpu__cpu_init()) into two parts: fpu__init_system() for
one per system init activities, and fpu__init_cpu() for the
per CPU onlining init activities.

Note that xstate_init() is called from both variants for the time being,
because it has a dual nature as well. We'll fix that in upcoming patches.

Just do the split and call it as we used to before, don't introduce any
change in initialization behavior yet, beyond duplicate (and harmless)
fpu__init_cpu() and xstate_init() calls - which we'll fix in later
patches.

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/kernel/fpu/init.c