summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2023-06-14 01:39:39 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-08 19:49:18 +0200
commit82f4acbce852b4795c32d38be2b164af27d1d125 (patch)
tree0a5c5ae31f9b590cb8aaacac8ef2a5a9141528d0 /init
parentecc68c37bba469401a2cdc1a73661c31ef014742 (diff)
downloadlinux-stable-82f4acbce852b4795c32d38be2b164af27d1d125.tar.gz
linux-stable-82f4acbce852b4795c32d38be2b164af27d1d125.tar.bz2
linux-stable-82f4acbce852b4795c32d38be2b164af27d1d125.zip
init: Invoke arch_cpu_finalize_init() earlier
commit 9df9d2f0471b4c4702670380b8d8a45b40b23a7d upstream X86 is reworking the boot process so that initializations which are not required during early boot can be moved into the late boot process and out of the fragile and restricted initial boot phase. arch_cpu_finalize_init() is the obvious place to do such initializations, but arch_cpu_finalize_init() is invoked too late in start_kernel() e.g. for initializing the FPU completely. fork_init() requires that the FPU is initialized as the size of task_struct on X86 depends on the size of the required FPU register buffer. Fortunately none of the init calls between calibrate_delay() and arch_cpu_finalize_init() is relevant for the functionality of arch_cpu_finalize_init(). Invoke it right after calibrate_delay() where everything which is relevant for arch_cpu_finalize_init() has been set up already. No functional change intended. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Link: https://lore.kernel.org/r/20230613224545.612182854@linutronix.de Signed-off-by: Daniel Sneddon <daniel.sneddon@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'init')
-rw-r--r--init/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/init/main.c b/init/main.c
index 61861b7aee88..2d5629787ea1 100644
--- a/init/main.c
+++ b/init/main.c
@@ -699,6 +699,9 @@ asmlinkage __visible void __init start_kernel(void)
late_time_init();
sched_clock_init();
calibrate_delay();
+
+ arch_cpu_finalize_init();
+
pid_idr_init();
anon_vma_init();
#ifdef CONFIG_X86
@@ -726,8 +729,6 @@ asmlinkage __visible void __init start_kernel(void)
delayacct_init();
- arch_cpu_finalize_init();
-
acpi_subsystem_init();
arch_post_acpi_subsys_init();
sfi_init_late();