From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12457C7618B for ; Sat, 27 Jul 2019 08:05:59 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D8F3320840 for ; Sat, 27 Jul 2019 08:05:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YUUvONzW"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=brainfault-org.20150623.gappssmtp.com header.i=@brainfault-org.20150623.gappssmtp.com header.b="DSK7CFgz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D8F3320840 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=brainfault.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yLxgNR3nrB+pE0Qu7o5yP8gf1PuFuPo0drgbB5YVkjA=; b=YUUvONzWWNJx2C JcwhzMaOmxuncMoKAgkYL7gxAA42gQ1fSHWNxFdODKXS+ICwRAKw1TzbuuHsvSVniFheODlIdYUne 9s8Wx6hXZtwHTNzHd5VsaTrVFD1+b9nP80ZhY9g+AEI04fUlVXMMabTOb8Wu1tXIC/IABkx0B9LtH LhpAaNRk8aY0myhRk+sOeGcrEMcglLh8eVIXTr2rvcNbDyO5cwttUL8FnA3bIrbg+P5RJSN3q4NsP gWnmzegGmE9EgTpUIDkEBsKq/ePtztZcKDpI6zj5dhDMQ9Ayw4JNt8AtPD1Cg/2Cv8EIEvjMO32V4 f+Ic9BP+tYwCy1Pf4YpA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hrHiD-0003E2-Sn; Sat, 27 Jul 2019 08:05:53 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hrHiA-0003Da-Sl for linux-riscv@lists.infradead.org; Sat, 27 Jul 2019 08:05:52 +0000 Received: by mail-wm1-x344.google.com with SMTP id a15so49727159wmj.5 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=JdG0L0uXOjwL9gB7Jb84YuagaQFMFip5C2kYPOg9PJalNO2gSe8P6nyCYTR7cSXdjx /uBi4gByVhaU46jIR8SAlzLt/mq0VBkeikgw5wZp9wq6ed4pd79cp9bHZ1V5y60gP8Cd V/C9M4ppxRojI6FcAw3/qJSFuxdKp0jHUYxS0n1AJfJRc0QiBjQM6RrtljsYW9O43Diq Atl5N0ulST/B5EWoQQBFbMoGXOdgEr6WEjWNBLF7cREiZGa05cqV0wxauBwqDjDbktQQ IK5kt3nU1Ez39AeVUSe4h5Z8UW8RCgj1ann+EG+vELhov883q5E/o/k9WMSYQ7/t5lu8 xFWA== X-Gm-Message-State: APjAAAX78e5mn3jt/VTaTMdsKL7UiXkb/7g33o0vm4/g4eLJU3f+Fmhj HPjsGwLNGbp6bDogqrPWe4NGYJryKHN0dS5E/Wo= X-Google-Smtp-Source: APXvYqwFGmFBAMUBtp+cB38MuVPO658FcLjausGtYUU+oVPF1Cz3+bTQ6+Bni7xO7RehJMYRYh4azEMgE93IzowsBh4= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190727_010551_070816_D249E429 X-CRM114-Status: GOOD ( 18.06 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anup Patel , Alan Kao , Greg Kroah-Hartman , Daniel Lezcano , "linux-kernel@vger.kernel.org" , Johan Hovold , Atish Patra , Albert Ou , Palmer Dabbelt , "linux-riscv@lists.infradead.org" , Thomas Gleixner , Allison Randal Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv