Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1025872ybi; Sat, 27 Jul 2019 01:10:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqweizg9ovfkfoO8ZdS7MDjRVDewadvAqYTX/Ow9kfth2r7e9J5L3YwWmMtp3rhgcpAP4Lwz X-Received: by 2002:a63:b46:: with SMTP id a6mr85895890pgl.235.1564215010882; Sat, 27 Jul 2019 01:10:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564215010; cv=none; d=google.com; s=arc-20160816; b=HG/azteuC5olQc8JHNltHkuXiyJJKR4q9goTeNYJ9eW0Gk4hE5gR5lDth36sHa2LUg MQgwkXR0L6WEQuOt0kI5ra6t0CebwfvdNcaGvYmO4PXCe0q3ZuguzqMMcJlTx9TPwTR7 bu66k2UuolTmpJTTGw1T7NgWlD8+kdyPLxOt/hH645oijTh4k3uqzZPTmtCymBtwfTxg qZfyCImxzX9MOW90XW9KCQBvXk/esh5QIlDHXdSWvd8V+alZvVaP59vpBfhxT1Nhz53k dcZjb+lLlebpFI7mUx0HdxRitcX7G2eNZUe7f8aRcwSSQ/1WUgPgAa0mkny7N1k1/OOe nJzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=TUuh5ETZIUfuMg+mI65VPB6v8GyKBFkoAPNDHAvE7TY=; b=NP44/GF4UHf5P/hn3THnsAHKmq5btwKWLt4KhPK+CIOD8/Wp1cbQ0hiFyLsi6MYiTY BbpMf3PIU0n4B5yRuwd/Ivg1nzne3ta0F9ma6WwLGx7A4zU600ZBkpJ12etcBUA4ctjk lSb2d5cEKA2B6mkW281/mhPiX7chCETVW/pSlUuODksOKoVKjEEejU+VZZxcF8zC+XE+ G54YcGMPHXed3wWdOY2OJUf/W++lVvIOsm2B0oUCk/a/EnVvp/UWzLf04mgCgt7hFYb6 UDdYoW5+YMLCNHzcKoj2itmQsRSon24uTxMSF0Kf38wrTtjQGQ4OdZF2the/5CRIOkoM XI2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=DSK7CFgz; 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 i21si11438658pgj.37.2019.07.27.01.09.55; Sat, 27 Jul 2019 01:10:10 -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=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=DSK7CFgz; 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 S1728495AbfG0IFu (ORCPT + 99 others); Sat, 27 Jul 2019 04:05:50 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:52914 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726806AbfG0IFu (ORCPT ); Sat, 27 Jul 2019 04:05:50 -0400 Received: by mail-wm1-f65.google.com with SMTP id s3so49717711wms.2 for ; Sat, 27 Jul 2019 01:05:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TUuh5ETZIUfuMg+mI65VPB6v8GyKBFkoAPNDHAvE7TY=; b=DSK7CFgzqlGC9xuu5pNy0qetVetRijrSTSdqyMwkEpr4ELdVjD31wyMLuH3u6Pt/3O Zg0v/ZxrPbvESPn4/hhxy+RS40BgQ/zL3v3smv9CrHdHWgdY1WjjMiWy5ajW0sQBHlBt 9Z833G8aSMPU5q+rx8YrgBOJocy/QVhM/4kimK06gO1bnJkTVTYN+Wy9BZO0YMa88PYs KsRZ7L6oCmP/tW8VLnbIT5b2IP5FVhouHrU+VX7bWlK1AJ/rMuIpwq3FmIPeyPFQgYp6 bGooNcsD8QfOgokBFpMSpTB+S415pJsdhxG+tjzOf5yeeNYseex604fnB2KPMgR+Xd9w TBEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TUuh5ETZIUfuMg+mI65VPB6v8GyKBFkoAPNDHAvE7TY=; b=oOR5XdmhKXCf+wjdXeVdDcGiqCwlP6vUx9LFzr8sEHOFfXvQ9yUykhSeKcPUrAzaz3 3DoMNqHsUBonpl1/GNW/fS26rCgkPF+lHAGoK0QoVSBsyZdMITIEauA1QpD/rtMXyxSU p6skzz6GeHJ3KmJhplA2LBxKU0D0hyaBnExU7Dh4VG07Z+XdZPARgx0WRjzbRyG6No2v CWJW0ZIigbvEGc9G3c4ErID1Sms5FTbSCxosCP6nlskjiIYwX5LrinN2bMyYZiExctNW 8wnPIZFnqrLUahopR1kcGl8TcqvmsBGxOCTdeRHTuNq7a/AwkqM8FZbn03R8+JwDG3B+ S27A== X-Gm-Message-State: APjAAAWmz5fpw4Ee0gYaNQglfaT7JbTR8KSKOw/PGXp1Ip2rcOIaQcjT eAF+H0hf778ZLNcKaHoNo0YemYi0mcdCyUv57q8= X-Received: by 2002:a1c:cfc5:: with SMTP id f188mr81569607wmg.24.1564214748146; Sat, 27 Jul 2019 01:05:48 -0700 (PDT) MIME-Version: 1.0 References: <20190726194638.8068-1-atish.patra@wdc.com> <20190726194638.8068-3-atish.patra@wdc.com> In-Reply-To: From: Anup Patel Date: Sat, 27 Jul 2019 13:35:36 +0530 Message-ID: Subject: Re: [PATCH 3/4] RISC-V: Support case insensitive ISA string parsing. To: Paul Walmsley Cc: Anup Patel , Albert Ou , Alan Kao , Greg Kroah-Hartman , Daniel Lezcano , "linux-kernel@vger.kernel.org" , Johan Hovold , Atish Patra , Palmer Dabbelt , "linux-riscv@lists.infradead.org" , Thomas Gleixner , Allison Randal Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 27, 2019 at 1:23 PM Paul Walmsley wrote: > > 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. If your only objection is uppercase letter not agreeing with YMAL schema then why not fix the YMAL schema to have regex for RISC-V ISA string? The YMAL schema should not enforce any artificial restriction which is theoretically allowed in the RISC-V spec. Regards, Anup