Commit cc1822a7 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Aichun Shi
Browse files

x86/fpu: Remove cpuinfo argument from init functions

stable inclusion
from stable-v5.10.189
commit 7a2f42bce9ab23fb9e59fe6de45bfedb5d611eee
category: bugfix
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I8LVBS
CVE: N/A
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7a2f42bce9ab23fb9e59fe6de45bfedb5d611eee



-------------------------------------

Intel-SIG: commit 7a2f42bce9ab ("x86/fpu: Remove cpuinfo argument from init functions")
Backport x86 related patches from 5.10.189 upstream

-------------------------------------

commit 1f34bb2a upstream

Nothing in the call chain requires it

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20230613224545.783704297@linutronix.de


Signed-off-by: default avatarDaniel Sneddon <daniel.sneddon@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarAichun Shi <aichun.shi@intel.com>
parent f548b2ae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ extern void fpu_reset_from_exception_fixup(void);

/* Boot, hotplug and resume */
extern void fpu__init_cpu(void);
extern void fpu__init_system(struct cpuinfo_x86 *c);
extern void fpu__init_system(void);
extern void fpu__init_check_bugs(void);
extern void fpu__resume_cpu(void);

+1 −1
Original line number Diff line number Diff line
@@ -1452,7 +1452,7 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)

	sld_setup(c);

	fpu__init_system(c);
	fpu__init_system();

	init_sigframe_size();

+3 −3
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ static bool fpu__probe_without_cpuid(void)
	return fsw == 0 && (fcw & 0x103f) == 0x003f;
}

static void fpu__init_system_early_generic(struct cpuinfo_x86 *c)
static void fpu__init_system_early_generic(void)
{
	if (!boot_cpu_has(X86_FEATURE_CPUID) &&
	    !test_bit(X86_FEATURE_FPU, (unsigned long *)cpu_caps_cleared)) {
@@ -211,10 +211,10 @@ static void __init fpu__init_system_xstate_size_legacy(void)
 * Called on the boot CPU once per system bootup, to set up the initial
 * FPU state that is later cloned into all processes:
 */
void __init fpu__init_system(struct cpuinfo_x86 *c)
void __init fpu__init_system(void)
{
	fpstate_reset(&current->thread.fpu);
	fpu__init_system_early_generic(c);
	fpu__init_system_early_generic();

	/*
	 * The FPU has to be operational for some of the