]> git.karo-electronics.de Git - karo-tx-linux.git/commit
x86/fpu: Split fpu__ctx_switch_init() into _cpu() and _system() portions
authorIngo Molnar <mingo@kernel.org>
Sun, 26 Apr 2015 06:28:31 +0000 (08:28 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 19 May 2015 13:47:42 +0000 (15:47 +0200)
commit011545b570be22191047d07299515c1d711eeb38
tree8222cd5ea845e914965a50bf31993edb48901f9a
parent064e51e3c8aee6cfb03ab75e9f9551db3924eb07
x86/fpu: Split fpu__ctx_switch_init() into _cpu() and _system() portions

So fpu__ctx_switch_init() has two aspects: a once per bootup functionality
that sets up a capability flag, and a per CPU functionality that sets CR0::TS.

Split the function.

Note that at this stage we still have duplicate calls into these methods, as
both the _system() and the _cpu() methods are run on all CPUs, with lower
level on_boot_cpu flags filtering out the duplicates where needed. So add
TS flag clearing as well, to handle the aftermath of early CPU init sequences
that might call in without having eager-fpu set - don't assume the TS flag
is cleared.

Calling each from its respective init level will happen later on.

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