Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp875995rwb; Thu, 12 Jan 2023 13:36:32 -0800 (PST) X-Google-Smtp-Source: AMrXdXvS1yGXpKg+cl6I7GV8NRYVNKjIW9qO23q/J5hjMMfuEdykGSmvj3Ya+Ng2muc37hpyRuJ4 X-Received: by 2002:a05:6402:50e:b0:49b:4711:f4b4 with SMTP id m14-20020a056402050e00b0049b4711f4b4mr4835916edv.0.1673559391816; Thu, 12 Jan 2023 13:36:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673559391; cv=none; d=google.com; s=arc-20160816; b=JBzK/pH14UBaU+FjavQJYl+pvpi7BuWUSdZ7XKxYYE1rzHLn+AzslnDCr0ea1llavz 9JkFlqeHXeQ8YKQd88Hnu+esME+pFgO+IxrJ4+gEAzWNlUvs64wz5dQJ9zNATvWJJa7w PFlVvqpw2zeHdhU4M/ME1oDRdsluPnDkMrF7XWOrm9kgH0DsXYB2Xd6w1WaOCtyHZsjS RJPtPQzeoJPp6jLrasoMETQ+qxi3Ild0Fh/TgkIKxkS4kcy35T8QI6eqC2HK/fgu8sel b/Akmui1qn58uga/zbRb0ut0Nf6kTjGJalNWUnuQY6qG+p4hV/rwJ+iRPr/10dStmkbe C21g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=cnNE93L33xO1oQJRv+oZYTyO0oh6y5HGnk2TYEtXb4c=; b=PyWnSMDuymFNbQYTYOSZzQFDJdDOga6FT2Zri359/ff9Ygt0o4fP/yaLgvizh+1xFq ff6R4qnoQDL428l2DKKVVbdj0lnyetHFCk9Ay2NfHKpmUDkhgmpEqI4koUi21tDXN/Po Wz0ij6yAUW+rY+nxr9XyHkY1K+XIuPpB21wkXfZpz8LPW3q2QqPv4WwP4TH22Cmq7UBj ty/fljbpNvP4V8gNOv6fPQo8O3cSr+G0KGKUoqmgCFI976ZJuqj+/pnLN4J+JWUlpEKt SOvA3/MYj6KisivHeaWiz5njRsy8sROGyZUzJV4awCvk9hjr7xlCfkA2X1hqrBwVXcwT PY9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=W73etmzP; 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 y90-20020a50bb63000000b00482b7282bdfsi16485008ede.89.2023.01.12.13.36.19; Thu, 12 Jan 2023 13:36:31 -0800 (PST) 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=W73etmzP; 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 S240543AbjALVbN (ORCPT + 50 others); Thu, 12 Jan 2023 16:31:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240618AbjALVaN (ORCPT ); Thu, 12 Jan 2023 16:30:13 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 828AA5D419; Thu, 12 Jan 2023 13:11:29 -0800 (PST) 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 3DDE4B82028; Thu, 12 Jan 2023 21:11:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8CE5CC433F0; Thu, 12 Jan 2023 21:11:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673557886; bh=1lv/KvuGHQRZDolHVavCfpp7julHCynpA3AX6pvaaYA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=W73etmzP/d6CGmvUkDbdoac85hc30hUPm02Kv4pn0xFu4zYtLpZjEWE93CUBNxd6i 2nu133GHYGhFhQDdUOQL9B4okHCebgBjKSmBvbIWXrNDpQ5gnur9ig105lzUkf5Fxw k4nH+XqvNA/uPVc9r+2x6RT0P/mnPg5ZwR9xkkPvqF7nuQQrTet00VDk2+qEjKc2lt aULGfARm5St002zse5h/cpBDOXNCJ9vMOyMgq1PQjiJgFJHxCZLmpALsAMzY0k6bTC 9qvVz0cXHBmLWRo00/ZEjHxVfDiyQTO4OI4w+g6zlj9w6ONR0vjO+4WoTdW31GGmHJ s8iXAduhRnVUw== Date: Thu, 12 Jan 2023 21:11:22 +0000 From: Conor Dooley To: Jisheng Zhang Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Anup Patel , Atish Patra , Heiko Stuebner , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, Andrew Jones Subject: Re: [PATCH v3 03/13] riscv: cpufeature: detect RISCV_ALTERNATIVES_EARLY_BOOT earlier Message-ID: References: <20230111171027.2392-1-jszhang@kernel.org> <20230111171027.2392-4-jszhang@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="LovTwAzFAus9XXMr" Content-Disposition: inline In-Reply-To: <20230111171027.2392-4-jszhang@kernel.org> 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 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 --LovTwAzFAus9XXMr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 12, 2023 at 01:10:17AM +0800, Jisheng Zhang wrote: > Currently riscv_cpufeature_patch_func() does nothing at the > RISCV_ALTERNATIVES_EARLY_BOOT stage. Add a check to detect whether we > are in this stage and exit early. This will allow us to use > riscv_cpufeature_patch_func() for scanning of all ISA extensions. >=20 > Signed-off-by: Jisheng Zhang > Reviewed-by: Andrew Jones > Reviewed-by: Heiko Stuebner Probably overkill at this stage, but: Reviewed-by: Conor Dooley BTW, would you mind CCing me on all patches in a series if I have previously reviewed the series? Makes life easier :) > --- > arch/riscv/kernel/cpufeature.c | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeatur= e.c > index 421b3d9578cc..37e8c5e69754 100644 > --- a/arch/riscv/kernel/cpufeature.c > +++ b/arch/riscv/kernel/cpufeature.c > @@ -328,6 +328,9 @@ void __init_or_module riscv_cpufeature_patch_func(str= uct alt_entry *begin, > struct alt_entry *alt; > u32 tmp; > =20 > + if (stage =3D=3D RISCV_ALTERNATIVES_EARLY_BOOT) > + return; > + > for (alt =3D begin; alt < end; alt++) { > if (alt->vendor_id !=3D 0) > continue; > --=20 > 2.38.1 >=20 >=20 > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv --LovTwAzFAus9XXMr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCY8B3eQAKCRB4tDGHoIJi 0l9WAQDjvV5jMZGRfroca+fqF0wW1R9hBcmFQzlJLcSWlBTmtgD7ByB9qSa0diKz FIYUuKDPYTNZQkruAhzCCdeHLGitswk= =MlP/ -----END PGP SIGNATURE----- --LovTwAzFAus9XXMr--