From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D9CDC001B1 for ; Wed, 14 Jun 2023 09:52:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241748AbjFNJwV (ORCPT ); Wed, 14 Jun 2023 05:52:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234134AbjFNJwS (ORCPT ); Wed, 14 Jun 2023 05:52:18 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63DC5DC; Wed, 14 Jun 2023 02:52:17 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686736334; 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: in-reply-to:in-reply-to:references:references; bh=k8/kluo4EhxJUN1w8Wkxa+89VuHL9oMdcgH3J0LyeG0=; b=Az/2Llqz+IM3XCNfPKYHopkPqaXC+pwMBOIpVA+mJJHPWxSPOIY34kEAIaen1V0Ow+QlxI NwXssu9xAGcIJuH9pLqUTwxjEj03zgvfEssBnfsHPEPQIBpsWpsym5MYe87R56oVEK6Ppg so8zxD9U3nruzhrdwW2y8dBP09ZrsaczRfdum4KYj2TOgHQWqvaDr8+oKdPXE/SpaX1Vb0 dUO9xBd0DLIueg+D6EjwtITyCleCX9eGbA0lXl1NQ8rRG3RuKc1Q695iKe085RguBbM6B1 KehZaYHQ9WpTKOCQntKCcBydTrGOqa6dvjJFZUj8dWdUzmbM7Ell8lih0F5yrw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686736334; 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: in-reply-to:in-reply-to:references:references; bh=k8/kluo4EhxJUN1w8Wkxa+89VuHL9oMdcgH3J0LyeG0=; b=FVmcyAPxnopLQkGRCsMmFInFjSnDHkimejjG/YwNIqrUEGJ3/xx0bziZNTPs5wNfY73Etv rMYxWz+Vccq4JaAQ== To: "Chang S. Bae" , 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: Re: [patch 17/17] x86/fpu: Move FPU initialization into arch_cpu_finalize_init() In-Reply-To: <23dc1c47-88ee-6b2d-1a5a-d6c812bb1761@intel.com> References: <20230613223827.532680283@linutronix.de> <20230613224545.902376621@linutronix.de> <23dc1c47-88ee-6b2d-1a5a-d6c812bb1761@intel.com> Date: Wed, 14 Jun 2023 11:52:14 +0200 Message-ID: <87o7li8j75.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 13 2023 at 22:03, Chang S. Bae wrote: > On 6/13/2023 4:39 PM, Thomas Gleixner wrote: >> >> @@ -2396,6 +2393,13 @@ void __init arch_cpu_finalize_init(void) >> '0' + (boot_cpu_data.x86 > 6 ? 6 : boot_cpu_data.x86); >> } >> >> + /* >> + * Must be before alternatives because it might set or clear >> + * feature bits. >> + */ >> + fpu__init_system(); >> + fpu__init_cpu(); > > fpu__init_cpu() appears to be duplicated here because fpu__init_system() > invoked this already: > > void __init fpu__init_system(void) > { > ... > /* > * The FPU has to be operational for some of the > * later FPU init activities: > */ > fpu__init_cpu(); Well, that's _before_ xstate initialization and I couldn't convince myself that it's good enough. All of this is such a horrible mess...