• I
    x86/fpu: Split fpu__ctx_switch_init() into _cpu() and _system() portions · 011545b5
    Ingo Molnar 提交于
    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: NBorislav 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: NIngo Molnar <mingo@kernel.org>
    011545b5
init.c 5.6 KB