[patch 12/17] init: Invoke arch_cpu_finalize_init() earlier
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: LKML <linux-kernel@xxxxxxxxxxxxxxx>
- Subject: [patch 12/17] init: Invoke arch_cpu_finalize_init() earlier
- From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
- Date: Wed, 14 Jun 2023 01:39:39 +0200 (CEST)
- Cc: x86@xxxxxxxxxx, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Nikolay Borisov <nik.borisov@xxxxxxxx>, "Ahmed S. Darwish" <darwi@xxxxxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, Huacai Chen <chenhuacai@xxxxxxxxxx>, WANG Xuerui <kernel@xxxxxxxxxx>, loongarch@xxxxxxxxxxxxxxx, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>, linux-m68k@xxxxxxxxxxxxxxx, Thomas Bogendoerfer <tsbogend@xxxxxxxxxxxxxxxx>, linux-mips@xxxxxxxxxxxxxxx, Yoshinori Sato <ysato@xxxxxxxxxxxxx>, Rich Felker <dalias@xxxxxxxx>, John Paul Adrian Glaubitz <glaubitz@xxxxxxxxxxxxxxxxxxx>, linux-sh@xxxxxxxxxxxxxxx, "David S. Miller" <davem@xxxxxxxxxxxxx>, sparclinux@xxxxxxxxxxxxxxx, Richard Weinberger <richard@xxxxxx>, Anton Ivanov <anton.ivanov@xxxxxxxxxxxxxxxxxx>, Johannes Berg <johannes@xxxxxxxxxxxxxxxx>, linux-um@xxxxxxxxxxxxxxxxxxx, Richard Henderson <richard.henderson@xxxxxxxxxx>, "James E.J. Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>, Michael Ellerman <mpe@xxxxxxxxxxxxxx>, Chris Zankel <chris@xxxxxxxxxx>, Tom Lendacky <thomas.lendacky@xxxxxxx>
- References: <20230613223827.532680283@linutronix.de>
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@xxxxxxxxxxxxx>
---
init/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/init/main.c
+++ b/init/main.c
@@ -1041,6 +1041,8 @@ asmlinkage __visible void __init __no_sa
sched_clock_init();
calibrate_delay();
+ arch_cpu_finalize_init();
+
/*
* This needs to be called before any devices perform DMA
* operations that might use the SWIOTLB bounce buffers. It will
@@ -1077,8 +1079,6 @@ asmlinkage __visible void __init __no_sa
taskstats_init_early();
delayacct_init();
- arch_cpu_finalize_init();
-
acpi_subsystem_init();
arch_post_acpi_subsys_init();
kcsan_init();
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]