Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1012842ybi; Sat, 27 Jul 2019 00:54:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqwFks1CKX7K5jiXjrQj25DZgyHCggrkBws56q8WsK1T3t//rQvlRk2MxGPbgkPJqNzdohCJ X-Received: by 2002:a63:2cc7:: with SMTP id s190mr82707726pgs.236.1564214063978; Sat, 27 Jul 2019 00:54:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564214063; cv=none; d=google.com; s=arc-20160816; b=WWdpXwt5OAEP0S22GahWcrllR5fdGgvPenOv2K3xYCbTTBBlA11VCs7J830t+hQGRT 4cZAw+jV54Y/xKyZ1eskE4EdFf4UZeEzedtPF2pOrabYdNAEQl22kkCzSoggmenWJhqA nU3hQzz8fkS1GwusOlA7YPaHsvrc9AiSrrMtjjX+9xkcF0n+YU9M9X3dT1eX1NzAnM3Y zGUHGPbCLF8z9bBra6AAlf2B9EI/mE81J7eTZxZ/oS2BB4slCQ7c2dMnJ7g9X77ECVbD N+U6YrlrBvalQs0iVQUM4A5aeaSEzZs6J8lHSHSLcbcGLQTp0Vo0sXV69SaY+0Fw+KLW n3gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=xLd5dKN/1Vn4JBfs1gVZiFPuMvq838eaVl4bcxKPEMM=; b=Pg5LEFjXY8vlIovdNutQ+vrzlryp8C0112JQAbNAPf3mim1aaDanxaby75kY4jXi9O /t1whNZhQbrQ1/J5RGAMgVeewL/26BP9ZqZwSY7lms+TCnlDhlbnvT0L6AOfBq2Mybyi +DBrvH2iV6MSYUC4BrN1bwfGBcRBXkvr15kFFtwAtjkzJKu3Nbo9snzmMDEpSD77D0vQ hSzi8RVmoFXVKSXWORHkdvXNsULUeTI/kDhLQCSQ38OeepTAuKsSpiMlalqHmuqK6NfT ot48R3lzhnNt4bMtoRmCnTyw0mObl9S02j75aQ++DV2HnxLSS+fkdiWMY9EcolFcopis E2pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=hWpTrlNe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p17si24312161plq.138.2019.07.27.00.54.08; Sat, 27 Jul 2019 00:54:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=hWpTrlNe; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728383AbfG0HxC (ORCPT + 99 others); Sat, 27 Jul 2019 03:53:02 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:43042 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726197AbfG0HxC (ORCPT ); Sat, 27 Jul 2019 03:53:02 -0400 Received: by mail-io1-f66.google.com with SMTP id k20so109514763ios.10 for ; Sat, 27 Jul 2019 00:53:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=xLd5dKN/1Vn4JBfs1gVZiFPuMvq838eaVl4bcxKPEMM=; b=hWpTrlNe88UUNfwg3GUnDUeJrzMoOUSuY+SoquSWaF4JqjQXBAmy/X7Re4tWTWf1Y4 283W/2UUYE/DYYbtfvDgEgEsGSuBBHLLFy9NWCmlThgb82sUCajc4XA+gyry0jBR/c1q wsYlP2Az33kWJoZH0snuazvGY8eNKZYCpkKJUl31kLUDWc9mj8MK+nBq2jUNV/9ApL1u J4Yugd3PZ1vzPaOoKAXrGfis7dEoDq/j/fLi5aS/+OO8RTvhEJ01Vi4Ur0GulZiBV7Wq XPr9SfoDTvGbyB4S+yxTUVvGFwJRSH4UekhuvFTRnzC0wApKD7DvMWFyKcdfDxqIIQjB gH/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=xLd5dKN/1Vn4JBfs1gVZiFPuMvq838eaVl4bcxKPEMM=; b=ilouqkEuKHMqR2yDfhwkyZeJJyLp5kCa34qZvDJjDL5nU2QFxQO5mreh2fwkNPXezu KwqkPUoZYH9D/4ucc6xOsi+fL01ny1IlC5UtV3w00i3jzVhOkKMGoYOqnjXEbVOJW06N 3KMW8PsvK2g8xQxNaRwVvCCyIUw6AvMECjs4TofEaC31OlZIf6l0lcouzZnp0tqLcjjt Lu0LScSUlEpyYydeaYPy05UNVHx2snIcvRv2CDWsWA/49Ezxt27L76faG22tGKnIFxQb 6Dad2rVtAUI3l+i0ErYs5vqF4BFF3zGII+YdbkNQ0jfdxAd798//0g8TpQqki4lpf/lg yI+A== X-Gm-Message-State: APjAAAWp9nFC89O5Lu4FB7/1DrdHXx63onvX2+KZbk4gvo1J21rKFxkg NiUAwhc/3NEiJQOaQ5XEf0x2gw== X-Received: by 2002:a02:a595:: with SMTP id b21mr7904643jam.28.1564213981562; Sat, 27 Jul 2019 00:53:01 -0700 (PDT) Received: from localhost ([65.152.59.42]) by smtp.gmail.com with ESMTPSA id z26sm54391272ioi.85.2019.07.27.00.53.00 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 27 Jul 2019 00:53:00 -0700 (PDT) Date: Sat, 27 Jul 2019 00:52:59 -0700 (PDT) From: Paul Walmsley X-X-Sender: paulw@viisi.sifive.com To: Anup Patel cc: Atish Patra , "linux-kernel@vger.kernel.org" , Alan Kao , Albert Ou , Allison Randal , Daniel Lezcano , Greg Kroah-Hartman , Johan Hovold , "linux-riscv@lists.infradead.org" , Palmer Dabbelt , Thomas Gleixner Subject: RE: [PATCH 3/4] RISC-V: Support case insensitive ISA string parsing. In-Reply-To: Message-ID: References: <20190726194638.8068-1-atish.patra@wdc.com> <20190726194638.8068-3-atish.patra@wdc.com> User-Agent: Alpine 2.21.9999 (DEB 301 2018-08-15) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 27 Jul 2019, Anup Patel wrote: > > -----Original Message----- > > From: Paul Walmsley > > Sent: Saturday, July 27, 2019 5:00 AM > > > > On Fri, 26 Jul 2019, Atish Patra wrote: > > > > > On 7/26/19 1:47 PM, Paul Walmsley wrote: > > > > On Fri, 26 Jul 2019, Atish Patra wrote: > > > > > > > > > As per riscv specification, ISA naming strings are case > > > > > insensitive. However, currently only lower case strings are parsed > > > > > during cpu procfs. > > > > > > > > > > Support parsing of upper case letters as well. > > > > > > > > > > Signed-off-by: Atish Patra > > > > > > > > Is there a use case that's driving this, or > > > > > > Currently, we use all lower case isa string in kvmtool. But somebody > > > can have uppercase letters in future as spec allows it. > > > > > > > > > can we just say, "use > > > > lowercase letters" and leave it at that? > > > > > > > > > > In that case, it will not comply with RISC-V spec. Is that okay ? > > > > I think that section of the specification is mostly concerned with someone > > trying to define "f" as a different extension than "F", or something like that. > > I'm not sure that it imposes any constraint that software must accept both > > upper and lower case ISA strings. > > > > What gives me pause here is that this winds up impacting DT schema > > validation: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Docu > > mentation/devicetree/bindings/riscv/cpus.yaml#n41 > > If 'f' and 'F' mean same extension as-per RISC-V spec then software should also > interpret it that way hence this patch. The list of valid RISC-V ISA strings is already constrained by the DT schema to be all lowercase. Anything else would violate the schema. I'd take a patch that would pr_warn() or a BUG() if any uppercase letters were found in the riscv,isa DT property, though, in case the developer skipped the DT schema validator. - Paul