From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752606AbdJLHSq (ORCPT ); Thu, 12 Oct 2017 03:18:46 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:34184 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750716AbdJLHSp (ORCPT ); Thu, 12 Oct 2017 03:18:45 -0400 X-Google-Smtp-Source: AOwi7QA+nQRbHkolNFTTrGJT9Vwi9GLXbwOFCi03STSsejE65g04rE4JzQmD61+Ad3ATwz9UZaVOSw== Date: Thu, 12 Oct 2017 09:18:41 +0200 From: Ingo Molnar To: Andi Kleen Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen , Thomas Gleixner Subject: Re: [PATCH v9 1/5] x86/xsave: Move xsave initialization to after parsing early parameters Message-ID: <20171012071841.qq5du2l465icuiln@gmail.com> References: <20171007000328.12843-1-andi@firstfloor.org> <20171007000328.12843-2-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171007000328.12843-2-andi@firstfloor.org> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Andi Kleen wrote: > From: Andi Kleen > > Move the XSAVE initialization code to be after parsing early parameters. > I don't see any reason why the FPU code needs to be initialized that > early, nothing else in the initialization phase uses XSAVE. > This is useful to be able to handle command line parameters in the > XSAVE initialization code. But that's not what the patch does: > --- > arch/x86/kernel/cpu/common.c | 2 -- > arch/x86/kernel/setup.c | 3 +++ > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c > index c9176bae7fd8..fd47692e5ce9 100644 > --- a/arch/x86/kernel/cpu/common.c > +++ b/arch/x86/kernel/cpu/common.c > @@ -903,8 +903,6 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c) > } > > setup_force_cpu_cap(X86_FEATURE_ALWAYS); > - fpu__init_system(c); This moves the early _FPU_ initialization code, which is more than just xstate related... Also, this is fundamentally a CPU initialization sequence, and this change detaches it from the early CPU initialization code. If you want to parse early parameters you can add it to fpu__init_parse_early_param() which is there for that exact reason. Also, please fix the titles of your patches as well, you routinely get the prefixes wrong, 'git log' should give you an idea about what the current title pattern is for FPU code modifications. Thanks, Ingo