Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1918089rwd; Tue, 13 Jun 2023 16:48:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6s8Q2X0PVeKnhEXUqxhAilVGotRKAPQSc8fZav9WJfUDzUwfP8W+NlECQr4TAFo++nDzcs X-Received: by 2002:a17:907:78c:b0:966:dd1:bae2 with SMTP id xd12-20020a170907078c00b009660dd1bae2mr11751789ejb.73.1686700104630; Tue, 13 Jun 2023 16:48:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686700104; cv=none; d=google.com; s=arc-20160816; b=v3LPX8Wmw99if414h7mc0WDK4nPBVBTcVyoWW5eM8oOLVWdTSTyRqwDG/dImDHGk8k 0SkjVKxkBZzBbjt3GZZYKFVRs9pjtnH8Egs7e+Dl9v9mFgJu7vex0zuK1H5kh5DktCsw 57AuLCDLyatDTMVJOf/4QqbqDzYntOC1S9PfSGEZyfxyd7/dt3HOWou718vFy4ALiuPS 22YNh42o/e03xkS1b1sg4DGHsl2QSQqcfx+vfTMrB9mF9qzHANjU0fiI0iMGEciaiW5v R21l9oM2nK4F+w/KNDavwq6HQr/4T0u52Um1LKtRLrfX9HOUPLQksrBrPLpPiKw6JODM wzIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:mime-version:references:subject:cc:to:from :dkim-signature:dkim-signature:message-id; bh=0VnFCDlFg0Z65xUPcTSUW8cd097ZM3tj8m6sSpK3s64=; b=0041ivSKDRjtyTHu0/63gXHGD7FQsh76ONPb9BlF90kCe7v7KKj3yNTwRaZ43aahVD RxiYuGVmmdqLm5+ltlAsAcftc5RgJMT/Ck8nEgUm9VeqJ8edxSdhaXoN7Z7shX+eBU0k YyimQXjd8V0ERYl4pFEGql/rMFRxFZXFx9QPmb5ktDejfxgGZH1dDXcL57fxiEUgW7FZ jbQGY9pHf60rKnGo04zEm3RFnsBo07zWjzVrDrQjTjQWvNbVdAWsYqlkhH0ARbmIEDUn omj9HBvOAzt8u7yeCBryaVAAdwylEcp3MQqL98M4I0XG7yO5RdTbLoI8NT4j/Yfl7GQ1 WFFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=2vIwQPIU; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=Xu1aR4gK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hh9-20020a170906a94900b0097885fd66f4si7544981ejb.162.2023.06.13.16.47.59; Tue, 13 Jun 2023 16:48:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=2vIwQPIU; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=Xu1aR4gK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233438AbjFMXlC (ORCPT + 99 others); Tue, 13 Jun 2023 19:41:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241534AbjFMXkE (ORCPT ); Tue, 13 Jun 2023 19:40:04 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F9F51FFB; Tue, 13 Jun 2023 16:39:41 -0700 (PDT) Message-ID: <20230613224545.612182854@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686699580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=0VnFCDlFg0Z65xUPcTSUW8cd097ZM3tj8m6sSpK3s64=; b=2vIwQPIUp/HJUmCG4BQezI45Q367xKHJYYqLK7G4wdrDSn+cOBFzLkdHYUwzUXc6gDifT9 rXY1lpsCnLehM7zAXb6roxx5XLRXYnCJR+grAmVc2dHif25zyPdBFAdRB8oZi5F8oDEYjX LfRMBrXHCi+WgVWwvhW/rD4N9Ur83iWtMYD/8dwxcO3p39WY5cZNs0IUmsHtiYOfpH2mPn zfJVRybOawF0SSzGOD7ZbR8K3/Wde2+WMR35K0mYj4U05gliICM7VVvC+XUr8nRG+osE42 Jt6Rw45sBhht2PYfVT0AcDzOMXI7pmmP+pQ2CC66euAz7R6Cd8BF8y04Prxn9g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686699580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=0VnFCDlFg0Z65xUPcTSUW8cd097ZM3tj8m6sSpK3s64=; b=Xu1aR4gK/TE/PO7y3dM5tqNyYP8UwrzsrU8JCSaOdKEVqSuAOvhIQ2kubFuP8M//eeln2X Z4Xwxgc0BSAFJ1Bg== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Linus Torvalds , Nikolay Borisov , "Ahmed S. Darwish" , Arnd Bergmann , Russell King , linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, Huacai Chen , WANG Xuerui , loongarch@lists.linux.dev, Geert Uytterhoeven , linux-m68k@lists.linux-m68k.org, Thomas Bogendoerfer , linux-mips@vger.kernel.org, Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , linux-sh@vger.kernel.org, "David S. Miller" , sparclinux@vger.kernel.org, Richard Weinberger , Anton Ivanov , Johannes Berg , linux-um@lists.infradead.org, Richard Henderson , "James E.J. Bottomley" , Michael Ellerman , Chris Zankel , Tom Lendacky Subject: [patch 12/17] init: Invoke arch_cpu_finalize_init() earlier References: <20230613223827.532680283@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Wed, 14 Jun 2023 01:39:39 +0200 (CEST) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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();