Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20796702rwd; Thu, 29 Jun 2023 07:10:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5tZ6URDbs5nkBKg1l4GVjD/aU+McHq6fm/qqPcUz5HDTiPedGPhYd27V/5nLCSk29zNT4H X-Received: by 2002:a05:6a20:8e22:b0:12c:55:b183 with SMTP id y34-20020a056a208e2200b0012c0055b183mr7023996pzj.55.1688047841241; Thu, 29 Jun 2023 07:10:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688047841; cv=none; d=google.com; s=arc-20160816; b=ohm1c7Ui2i2NH9IFmB8+Bxbt60WEwxaSnqSIwQC1/9NQkYJGr7nPiabCHcHDXC9gTv 8z9DcZCagUVktA0Zx6iRrjLVO0vrFCX/mfr9BWWtrahhLIvtlt9oGuhtT/45K6PSkcmd qQtAdGMzl1kFKYwTGBP0BwXHTTM20NBaYtvcZnHOdIbNa7Dp+qVRjIcSRbBColVxDeZE UAsvZczfqf6QZmrwyF+XGrImZ0773wPElP0XAbZ5OwShzAMoPX2oeEbuaScqrHLK8ER3 syzC+/eyv4POhXk0L39lwqOyljQArSd1QAF4wWj9UidMoNt2oHJE2q93no+qEv3W1R3y 3qJQ== 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=deXO6fUjQ/I1CcOjtw/6ftLQJ+2W+4iNuI5l6xeu1MY=; fh=vwOFrSbmnCjYdWJ6C4s+7T5OaCjNGUMCDpwTbmcgYHo=; b=XYcQuP9TjilE1C0xCa98K8d62G5RDRbOlAfwjrrDe017XJO31pJ+5F7TYX/sqFKmRB H9X+HjZvYd2xbwyMvBSHJAnzNqhSNspNd+q6f0dm2XmpEqyWbdOOph6PrBfnHPwKZQF2 iC4U6I46NWlZ/ChhoS8xQYtnjtpCus1MLW92HWLePH+fvzjDxa9V7eyTlIk/Fss1q+N7 Od+Ss74I5awmBiwrBLjm5LoztMshb1xiSrksKqdYpt2XPICruvsv/tg2+CL1zgIkv85q JN9le6HfITjDiboRhY44ZUgOiWMBQjnl2mIRCJFNFkGHQj/RkVAJJi/udaKN0/2jUMGy hD7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=R3X+tNcW; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s2-20020a6550c2000000b00553d5cc2c8bsi10683913pgp.508.2023.06.29.07.10.24; Thu, 29 Jun 2023 07:10:41 -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=@ventanamicro.com header.s=google header.b=R3X+tNcW; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230466AbjF2NxO (ORCPT + 99 others); Thu, 29 Jun 2023 09:53:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231132AbjF2NxM (ORCPT ); Thu, 29 Jun 2023 09:53:12 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B87E0358A for ; Thu, 29 Jun 2023 06:53:11 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-313f1085ac2so679338f8f.1 for ; Thu, 29 Jun 2023 06:53:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1688046790; x=1690638790; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=deXO6fUjQ/I1CcOjtw/6ftLQJ+2W+4iNuI5l6xeu1MY=; b=R3X+tNcWmh90c7FQO2IFEUfn3dY7XU/IHZ8m0K4m8FncWd17IOSWpZkcdQ/U4hooaD cgGmeTTrRr2OrRfKuTs1sHB+4cNZN5NqDhyzsmfk4Zxjjb56L51k//kPcbMmsSj01LRu D2R89DHBjJKgxDL6HCLJv3XKtZ/Twswg5Y7/iTwtbaAFODUrne1G0IHI8OdIxb5kchDd GRDkla/ZEuvPWSXTReK24119T8u8/ZPQYsYaoOtebqXT2a10XTEQ6uJ1S8wF2Oj08XDI 06o58qwmThSFm8Zs1nzZTznOXaj9hIS1yUsdD8NKey0rq7eFGm833c2UCm9yBnmFXmlU LBzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688046790; x=1690638790; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=deXO6fUjQ/I1CcOjtw/6ftLQJ+2W+4iNuI5l6xeu1MY=; b=idpvWfYBWyD9RMiKNmcQ15a5BQFIt02gzQMc85Z2PMDBvQpG5aIm//YULsmox1XOk7 9kcapxb42vtY3SRrJk48/NKKrEyRzZ4RvsLRYpPSt8XS8aCP60SIvvdmhYyAZs7kmlUV XWlUYHv8vI+Gr4ljGwJdnItOeYU7TMJKXd1XKoXfYr3fXBUBXCbjmK8szNTcjnhc3eLk P/WHRCepwE2zKEzFX1mexYYSHTHprkpwGkkraGqWJfeUHg1tDF/2H7nWMwn7TsyPL/Vb HxDA27x553zCsTjPOhqzz19WxYnlNuVALKu81EEExA6AIXADUHwxhlrCoSrMGbITdx9P qJuQ== X-Gm-Message-State: AC+VfDyTykmxBzf+AKC8hqgMatY8C3Qk7Gxe+Ttv7qE3uhXcwCIX7vkp Ol5ezIDqfr4X11Su787TeLZQLQ== X-Received: by 2002:a5d:564e:0:b0:313:f241:f198 with SMTP id j14-20020a5d564e000000b00313f241f198mr8536457wrw.8.1688046790109; Thu, 29 Jun 2023 06:53:10 -0700 (PDT) Received: from localhost (cst2-173-16.cust.vodafone.cz. [31.30.173.16]) by smtp.gmail.com with ESMTPSA id b7-20020a5d45c7000000b003141a3c4353sm1340835wrs.30.2023.06.29.06.53.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jun 2023 06:53:09 -0700 (PDT) Date: Thu, 29 Jun 2023 15:53:08 +0200 From: Andrew Jones To: Conor Dooley Cc: palmer@dabbelt.com, conor@kernel.org, Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Albert Ou , Heiko Stuebner , Evan Green , Sunil V L , linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Palmer Dabbelt Subject: Re: [PATCH v2 10/10] RISC-V: provide a Kconfig option to disable parsing "riscv,isa" Message-ID: <20230629-11c59410a48bba2c00bb2433@orel> References: <20230629-rebuttal-vagueness-a699deb7c7b3@wendy> <20230629-resilient-grievance-d782163b09d6@wendy> <20230629-a80f112e6ed4158080867694@orel> <20230629-deceit-macarena-2a744ac70148@wendy> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230629-deceit-macarena-2a744ac70148@wendy> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On Thu, Jun 29, 2023 at 12:39:51PM +0100, Conor Dooley wrote: > On Thu, Jun 29, 2023 at 11:31:33AM +0200, Andrew Jones wrote: > > On Thu, Jun 29, 2023 at 09:28:56AM +0100, Conor Dooley wrote: > > > As it says on the tin, provide a Kconfig option to disabling parsing the > > > "riscv,isa" devicetree property. Hide the option behind NONPORTABLE so > > > that only those willing to keep the pieces enable it, and make sure the > > > default kernel contains the fallback code. > > > > > > Suggested-by: Palmer Dabbelt > > > Signed-off-by: Conor Dooley > > > --- > > > arch/riscv/Kconfig | 16 ++++++++++++++++ > > > arch/riscv/kernel/cpu.c | 3 +++ > > > arch/riscv/kernel/cpufeature.c | 2 +- > > > 3 files changed, 20 insertions(+), 1 deletion(-) > > > > > > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig > > > index 1d39efe2b940..0e1909ac5947 100644 > > > --- a/arch/riscv/Kconfig > > > +++ b/arch/riscv/Kconfig > > > @@ -291,6 +291,22 @@ config NONPORTABLE > > > > > > If unsure, say N. > > > > > > +config NO_RISCV_ISA_FALLBACK > > > + bool "Permit falling back to parsing riscv,isa for extension support" > > > + depends on NONPORTABLE > > > + help > > > + Parsing the "riscv,isa" devicetree property has been deprecated and > > > + replaced by a list of explicitly defined strings. For compatibility > > > + with existing platforms, the kernel will fall back to parsing the > > > + "riscv,isa" property if the replacements are not found. > > > + > > > + Selecting Y here will result in a kernel without this fallback, and > > > + will not work on platforms where the devicetree does not contain the > > > + replacement properties of "riscv,isa-base" and > > ^ spacing issue > > Huh, weird. Given the tab followed by spaces, it must have snuck in > during reflow of the text after some rewording. > Wonder how I missed it, given that... > > > Should we also have a kernel command line option, 'isa_fallback', where > > without this config the command line option is not necessary to fallback, > > but, with this config, no fallback will be done unless 'isa_fallback' is > > provided? > > I don't know, maybe I have the wrong end of the stick but it feels a bit > premature for something that may never not be hidden behind NONPORTABLE? > Perhaps that could be left for a point in time where the default value > of the symbol changes, or the dependency on NONPORTABLE is removed? > With the command line option, we could consider dropping NONPORTABLE (but still default off this config). What I'm thinking is that if we want to encourage the adoption of the new format, then there should be a bit of pain when it's not used, but not enough pain to risk rebellion. So, * defconfig builds will silently/painlessly fallback * builds that want to encourage adoption enable this config and will fail to boot when they don't get what they want and don't have the command line option * users still working through the growing pains can manage when the boot fails, and when it doesn't, with the command line Thanks, drew