Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 9df9d2f

Browse files
committed
init: Invoke arch_cpu_finalize_init() earlier
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 <[email protected]> Reviewed-by: Rick Edgecombe <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 61235b2 commit 9df9d2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

init/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,6 +1041,8 @@ asmlinkage __visible void __init __no_sanitize_address __noreturn start_kernel(v
10411041
sched_clock_init();
10421042
calibrate_delay();
10431043

1044+
arch_cpu_finalize_init();
1045+
10441046
/*
10451047
* This needs to be called before any devices perform DMA
10461048
* operations that might use the SWIOTLB bounce buffers. It will
@@ -1077,8 +1079,6 @@ asmlinkage __visible void __init __no_sanitize_address __noreturn start_kernel(v
10771079
taskstats_init_early();
10781080
delayacct_init();
10791081

1080-
arch_cpu_finalize_init();
1081-
10821082
acpi_subsystem_init();
10831083
arch_post_acpi_subsys_init();
10841084
kcsan_init();

0 commit comments

Comments
 (0)