Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp355004pxb; Wed, 13 Apr 2022 02:39:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLMDXvhbR90MFkOYUg13nHiSIw8u4oLCIzCyQJKhdNlbf1XmCfbFeeG2taQ3af+fB6+axR X-Received: by 2002:a17:907:968d:b0:6e8:4581:e333 with SMTP id hd13-20020a170907968d00b006e84581e333mr24535743ejc.603.1649842797779; Wed, 13 Apr 2022 02:39:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649842797; cv=none; d=google.com; s=arc-20160816; b=i7v1/0QIuxVXp+jK8k76qBqHKkmP+ZCEQxkPGe8qvLEZ3jILuiDBnuMbh/LzpGtVp1 RdOJDsF+/97Ky5HsZeexEQl9OiUOvnDqIXVGCbXcYgC4n6P8CUljZye7bYPDQNvAm2cv fiyvgZpGrbwId3rvHVKoLo4x4j1dWH9y4Ipq99eE+sng14F1ddudWhybH2YVXIhIMB4+ JdLGmfAE+j8Idb93iAhdda8hxhRAG5EX1Ri4U0O0DbgWQM9kJA2KFwMr7JItYhuTqTvJ 9cnrjvoN4xuAEGwafY4E7GN1/ZP1c/g3+dMSh2o/i4cCV0G1iog4np+vSLZST23gQwgl oAVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=aEnATDs0MXitPz9rEP7CIMeZXaECkrHfeZJikEFQP3A=; b=NTLRPaGY31+GLNuZoDj4wnteF0Qj/i7DlvGriUhL/C7qpk+yaJmT6kcpJsPpPxZhoK q5+ciVffWfzxZN7Y8lYVfh65tR/6sW4LRiALDH5xXYfXcsNGtD7+4s+1bD7L01f1VpN+ gtH8z07iDYzECNzHbLej8qn3YugX3iQt3LCvpZ5hVE1ZBNhkJ+inxc0woFyKF29/jsSq dvxMd73bfGNQHsacP4RcBgO8m5zlluanXfvdh45nt000a/YLgXJodfYTgJSc+d82gks9 wHBAmJXXJN7ZAdmaN8rNUIS/0p6Cdm3EngfH/mOnP67PaIYG+jaukfX76AuILBboLqrq 23Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eIUg5nGi; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k21-20020a17090666d500b006df76385c34si10072513ejp.212.2022.04.13.02.39.32; Wed, 13 Apr 2022 02:39:57 -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=@kernel.org header.s=k20201202 header.b=eIUg5nGi; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231437AbiDMFt0 (ORCPT + 99 others); Wed, 13 Apr 2022 01:49:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231324AbiDMFtX (ORCPT ); Wed, 13 Apr 2022 01:49:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FF7950051 for ; Tue, 12 Apr 2022 22:47:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E9D37B82101 for ; Wed, 13 Apr 2022 05:47:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FB90C385AA for ; Wed, 13 Apr 2022 05:47:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649828820; bh=HDKik8QF3OtnxnBSdiMFywaH7pAjKSH73aE+xYfjwA0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=eIUg5nGiYGotfBgo8RxQz4+LyghtaVqFkBnLdhVPxYY7akTr4OCQ0qdvly8M0D79S v0+MxRjCkViWbtPsqyIun9qISL4E8ike+U4MWhUsrMoXSnztORxCK/sMHIILwHuprB xv7Vv+LTN5dRjvGWGTzVWNQv4WHqpGe515bYOOAcZlc2yDmlZU1u+EC9ivd64p0Wri efCASxI23Mu6zRMcTrQshhN8gXWAbhbbAieaROJAMlrqqM0dGaxWTMePr04AJbKtYB t944UHn10ij7ms1lOuAtD7We5taCXFnDQj4TYNyzofhux53DrU+MDhyLxc8sQbi0m2 Fboo/kG9QkrGg== Received: by mail-vk1-f177.google.com with SMTP id w67so371587vkw.6 for ; Tue, 12 Apr 2022 22:47:00 -0700 (PDT) X-Gm-Message-State: AOAM531hVInFa9msaZBetKPEDOnS7Cv+Q+tw5M1ru3waBmQOnNPBWfca 4tMFAiNpKSJByo4ZNBLsfw2X/4pZesaUGU16Znw= X-Received: by 2002:a05:6122:16a2:b0:345:62c8:2321 with SMTP id 34-20020a05612216a200b0034562c82321mr5788236vkl.8.1649828819427; Tue, 12 Apr 2022 22:46:59 -0700 (PDT) MIME-Version: 1.0 References: <20220413030307.133807-1-heiko@sntech.de> <20220413030307.133807-8-heiko@sntech.de> In-Reply-To: <20220413030307.133807-8-heiko@sntech.de> From: Guo Ren Date: Wed, 13 Apr 2022 13:46:48 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v9 07/12] riscv: move boot alternatives to after fill_hwcap To: Heiko Stuebner Cc: Palmer Dabbelt , Paul Walmsley , Albert Ou , linux-riscv , Linux Kernel Mailing List , Wei Fu , liush , Atish Patra , Anup Patel , Drew Fustini , Christoph Hellwig , Arnd Bergmann , Chen-Yu Tsai , Maxime Ripard , Greg Favor , Andrea Mondelli , Jonathan Behrens , "Xinhaoqu (Freddie)" , Nick Kossifidis , Allen Baum , Josh Scheid , Richard Trauben , Samuel Holland , Christoph Muellner , Philipp Tomsich Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Reviewed-by: Guo Ren On Wed, Apr 13, 2022 at 11:03 AM Heiko Stuebner wrote: > > Move the application of boot alternatives to after the hw-capabilities > are populated. This allows to check for available extensions when > determining which alternatives to apply and also makes it actually > work if CONFIG_SMP is disabled for whatever reason. > > Signed-off-by: Heiko Stuebner > Reviewed-by: Christoph Hellwig > --- > arch/riscv/kernel/setup.c | 2 ++ > arch/riscv/kernel/smpboot.c | 2 -- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c > index f4f4a64bc3a0..9162e9a824d2 100644 > --- a/arch/riscv/kernel/setup.c > +++ b/arch/riscv/kernel/setup.c > @@ -21,6 +21,7 @@ > #include > #include > > +#include > #include > #include > #include > @@ -295,6 +296,7 @@ void __init setup_arch(char **cmdline_p) > #endif > > riscv_fill_hwcap(); > + apply_boot_alternatives(); > } > > static int __init topology_init(void) > diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c > index a6d13dca1403..f1e4948a4b52 100644 > --- a/arch/riscv/kernel/smpboot.c > +++ b/arch/riscv/kernel/smpboot.c > @@ -32,7 +32,6 @@ > #include > #include > #include > -#include > > #include "head.h" > > @@ -41,7 +40,6 @@ static DECLARE_COMPLETION(cpu_running); > void __init smp_prepare_boot_cpu(void) > { > init_cpu_topology(); > - apply_boot_alternatives(); > } > > void __init smp_prepare_cpus(unsigned int max_cpus) > -- > 2.35.1 > -- Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/