This is a note to let you know that I've just added the patch titled init: Invoke arch_cpu_finalize_init() earlier to the 6.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: init-invoke-arch_cpu_finalize_init-earlier.patch and it can be found in the queue-6.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 4fdd6f04b4ca81df1d5dcd14cbc6d81032d8cbcc Mon Sep 17 00:00:00 2001 From: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Date: Tue, 1 Aug 2023 16:07:11 +0200 Subject: init: Invoke arch_cpu_finalize_init() earlier From: Thomas Gleixner <tglx@xxxxxxxxxxxxx> 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@xxxxxxxxxxxxx> Reviewed-by: Rick Edgecombe <rick.p.edgecombe@xxxxxxxxx> Link: https://lore.kernel.org/r/20230613224545.612182854@xxxxxxxxxxxxx Signed-off-by: Daniel Sneddon <daniel.sneddon@xxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- init/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/init/main.c +++ b/init/main.c @@ -1042,6 +1042,8 @@ void start_kernel(void) 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 @@ -1078,8 +1080,6 @@ void start_kernel(void) taskstats_init_early(); delayacct_init(); - arch_cpu_finalize_init(); - acpi_subsystem_init(); arch_post_acpi_subsys_init(); kcsan_init(); Patches currently in stable-queue which might be from tglx@xxxxxxxxxxxxx are queue-6.4/x86-cpu-switch-to-arch_cpu_finalize_init.patch queue-6.4/arm-cpu-switch-to-arch_cpu_finalize_init.patch queue-6.4/um-cpu-switch-to-arch_cpu_finalize_init.patch queue-6.4/mips-cpu-switch-to-arch_cpu_finalize_init.patch queue-6.4/x86-mem_encrypt-unbreak-the-amd_mem_encrypt-n-build.patch queue-6.4/init-x86-move-mem_encrypt_init-into-arch_cpu_finalize_init.patch queue-6.4/sh-cpu-switch-to-arch_cpu_finalize_init.patch queue-6.4/init-invoke-arch_cpu_finalize_init-earlier.patch queue-6.4/x86-xen-fix-secondary-processors-fpu-initialization.patch queue-6.4/x86-fpu-move-fpu-initialization-into-arch_cpu_finalize_init.patch queue-6.4/loongarch-cpu-switch-to-arch_cpu_finalize_init.patch queue-6.4/init-remove-check_bugs-leftovers.patch queue-6.4/init-provide-arch_cpu_finalize_init.patch queue-6.4/m68k-cpu-switch-to-arch_cpu_finalize_init.patch queue-6.4/x86-init-initialize-signal-frame-size-late.patch queue-6.4/sparc-cpu-switch-to-arch_cpu_finalize_init.patch queue-6.4/x86-fpu-mark-init-functions-__init.patch queue-6.4/ia64-cpu-switch-to-arch_cpu_finalize_init.patch queue-6.4/x86-fpu-remove-cpuinfo-argument-from-init-functions.patch