Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp5265123ybi; Tue, 30 Jul 2019 17:23:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxeoajdGqmuYN0cTAOi2jNjgiusRjfk1RQUqhQwW4VXzckUWe9tKGXokfXSNAOky1D7sD/m X-Received: by 2002:a65:5183:: with SMTP id h3mr4618910pgq.250.1564532626888; Tue, 30 Jul 2019 17:23:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564532626; cv=none; d=google.com; s=arc-20160816; b=ON7o2ckx+z0eZ5WSHfD7N2KciNlVmykDxR5RmCfyIzCzKdP1mDROiBFnzgeAf4AFnZ LCtToFsXdCty1oD+I96pHjwFjjUvx0xODgypKVmJr1RsF7nhLaayTWci6TDA+7SAcU6A yulEdse3dJ6J9Sd/865n0N+QDs9ne6x1JKV07HKuaXQ3YShwSkrdcICGZJc26/1yRbyh u1NMHNlETjkrdDUou7SjZT9EO13UWj6TytvU/SG5jlILDvifOZosT2GvngxRGcEQSqBZ n9ah1BjXGhYO7JDYEGXtXk8cT8SRzwkwqfanB3KPRDYAyHjqu7LQqO77B4HoRAHmd3Jj iTSQ== 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=6FtxAw9Mh/kQnOEyufqBh4q3auEokVswtxFLId11t7w=; b=sFrDBaEZwCeeTjLT5xK8C1oGcIRGvNHPRinD4nO06Lht5C7nwCHzc2jjOwN/2lSaQx q+A4AWqAJ8tjdF92YGC/pIcExVmZY5sghl4C03uQzgLMKSG4k/f09iNkCBDrWjLrT6vg XSBhdpL6JfGvaWq7T3Fyq0v7qxzd3cEqWxUeIXyffBpWfIvcciV+heJC6hIwnAhcyrKR uOJJAt8jW/6i9SYYbwOwqquL9o5uEDrI/Ou9p6al+2Z21kpU0ROKL9T6tkmbBA6hUV78 mnYZWulDABoTYYiljzzh613kYxzPfPFgAqBwHuoKv1++M32nqYI8nX/xoJoMtOZemI9h fvwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=ACnXznkI; 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 p7si3607512pgk.377.2019.07.30.17.23.32; Tue, 30 Jul 2019 17:23:46 -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=ACnXznkI; 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 S1728276AbfGaAIr (ORCPT + 99 others); Tue, 30 Jul 2019 20:08:47 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:46418 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726167AbfGaAIq (ORCPT ); Tue, 30 Jul 2019 20:08:46 -0400 Received: by mail-ot1-f65.google.com with SMTP id z23so39910048ote.13 for ; Tue, 30 Jul 2019 17:08:45 -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=6FtxAw9Mh/kQnOEyufqBh4q3auEokVswtxFLId11t7w=; b=ACnXznkI8Y3/x8dnoJ2ZoM0NExdUytG7wf7/wY+QAEyUOy9nZk2Ua3sZFyLulMDBXL ckWzOHG4M3yPlH8J9nP5jRV5x/jhCJf2oFZf1Z7lWcSPV8cvE99YVvnhdqMc7woiXPeV B/nsb6wfNt0qeNRVDhELdTBOXVHsUQAR+T+azvhNsMn4okgi5ByniqCF7RqInqECYod8 DpI9rHKCEgG/hZHNwNsQkszXXw95tX+SrJnfhYRPKChd+QX82wq/ZveSW2Kfqmr5/vbN OzaX+qlAAjlPIQNvUT+CUhalTus+0fHZ4BGvNPHXCh+mYVyX/iuKa0JykG88Mobvr4j2 9Vzg== 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=6FtxAw9Mh/kQnOEyufqBh4q3auEokVswtxFLId11t7w=; b=bkXJOICZKmy5xV/ETDH7TsoZqsY57/v65CyQQFL7TJOCmPJvIO6niRLqosnQ72m1Ye f6epcPrQATWrQ0l0qfy+6P2050jjooQzWh6zfa7tyd6zOZxq3GfpJjEpJTgd9ed7MdpO uRMskxC9CJyodD9uBZR9lINraeg02HsyhU7fb/1wZDrJSHDXQmMaYacW8FkhhYgrrsxR +VS0kpD7m9m+3vtsgfbMQq0ngp50Jw8ziOZORO3O35yv03CoY3Hmqe9ZCwt07UTftWCF Oup33yy65YWrIJGs7gu+l2SUo1gmATMOyUaPP1X1O3X5UYAnVRzHV5V7KWYQR3DZGIwV fhJw== X-Gm-Message-State: APjAAAWoiS8VVXdnKtxcN++BU2yrrN2o+M8AvAJCoX3LKqFGdm7f94q1 FeF98kL7cLo+l54L4MP0E1GG7w== X-Received: by 2002:a9d:7259:: with SMTP id a25mr10777964otk.30.1564531725418; Tue, 30 Jul 2019 17:08:45 -0700 (PDT) Received: from localhost ([2600:100e:b005:6ca0:a8bb:e820:e6d3:8809]) by smtp.gmail.com with ESMTPSA id c29sm24726790otd.66.2019.07.30.17.08.43 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 30 Jul 2019 17:08:44 -0700 (PDT) Date: Tue, 30 Jul 2019 17:08:42 -0700 (PDT) From: Paul Walmsley X-X-Sender: paulw@viisi.sifive.com To: Atish Patra cc: "anup@brainfault.org" , "alankao@andestech.com" , "daniel.lezcano@linaro.org" , "gregkh@linuxfoundation.org" , "linux-riscv@lists.infradead.org" , Anup Patel , "aou@eecs.berkeley.edu" , "linux-kernel@vger.kernel.org" , "johan@kernel.org" , "tglx@linutronix.de" , "palmer@sifive.com" , "allison@lohutok.net" Subject: Re: [PATCH 3/4] RISC-V: Support case insensitive ISA string parsing. In-Reply-To: <8ed4d461ffe5ac41b475d22b38019578b29a8d09.camel@wdc.com> Message-ID: References: <20190726194638.8068-1-atish.patra@wdc.com> <20190726194638.8068-3-atish.patra@wdc.com> <8ed4d461ffe5ac41b475d22b38019578b29a8d09.camel@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 Mon, 29 Jul 2019, Atish Patra wrote: > The yaml document did not specify anything about all isa-strings has to > be lowercase unless I missed something. The two enum values are all > lowercase but the description says all ISA strings are documented in ISA > specification which describes the ISA strings to be case insensitive. > IMHO, this creates confusion resulting the patch. If it's helpful in understanding my earlier comments, I don't think that your patches were "wrong," or anything like that. And you're right that the DT YAML binding does not unequivocally state that all future additions to the riscv,isa string must be in lowercase. But to be clear, the DT YAML schema defines exactly what is currently permissible for riscv,isa strings in kernel-oriented DT data, and right now, all of the permissible values are lowercase. Good Linux kernel patches are driven by clear functional motivations. Like, "The current kernel crashes or doesn't support the hardware in situation X; thus we change the kernel to add feature or bugfix Y." And in the kernel, solutions that involve fewer lines of code are generally preferred to solutions that involve more lines of code - more bugs, more noise, etc. Where these case-insensitivity parsing patches fall short, in my opinion, is that they don't have strong functional motivations. There's been a precedent for a few years now in the mainline kernel that the RISC-V ISA string is all lowercase. I've asked you and Anup for situations where that precedent isn't sufficient to handle functionality that's described in the RISC-V specification, or to phrase it differently, "what breaks if we don't make this change?" So far no one's been able to cite anything here. There's just a repeated appeal to authority to the section of the RISC-V specification that states that "[t]he ISA naming strings are case insensitive." As you can probably sense, this doesn't seem like a strong justification for changing the existing behavior. From a functional point of view, if case doesn't matter, why care if the DT data and kernel only support lowercase strings? An all-lowercase string should be functionally equivalent to an all-uppercase or mixed-case string. Since there's no functional point to the changes, why add more code to the kernel? Later in your E-mail, it sounds like you ultimately agree with these basic conclusions. If that's so, I don't understand the amount of effort that you and Anup have put into pushing back here. There's nothing personal about these review comments. If there's some meta-problem here that's unrelated to the technical merit of the patches, please send a private E-mail. Otherwise, if you disagree with the functional conclusions in the previous paragraph, let's hash the issues out here. > I am fine with dropping this patch if yaml clearly document the case > sensititve thing. Great! If you still think so now, let's resolve this issue with a one-line patch to the DT YAML schema to note that riscv,isa DT string values should be all lowercase. Will you send a patch? - Paul