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

x86/fpu: Move FPU initialization into arch_cpu_finalize_init()

stable inclusion
from stable-v5.10.189
commit 4ae1cbb730bd574d57d3996d4c20974972d47009
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=4ae1cbb730bd574d57d3996d4c20974972d47009



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

Intel-SIG: commit 4ae1cbb730bd ("x86/fpu: Move FPU initialization into arch_cpu_finalize_init()")
Backport x86 related patches from 5.10.189 upstream

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

commit b81fac90 upstream

Initializing the FPU during the early boot process is a pointless
exercise. Early boot is convoluted and fragile enough.

Nothing requires that the FPU is set up early. It has to be initialized
before fork_init() because the task_struct size depends on the FPU register
buffer size.

Move the initialization to arch_cpu_finalize_init() which is the perfect
place to do so.

No functional change.

This allows to remove quite some of the custom early command line parsing,
but that's subject to the next installment.

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20230613224545.902376621@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 38d43f61
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment