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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41F89C04A68 for ; Wed, 27 Jul 2022 07:13:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230108AbiG0HNw (ORCPT ); Wed, 27 Jul 2022 03:13:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229875AbiG0HNu (ORCPT ); Wed, 27 Jul 2022 03:13:50 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8862F1BEB1 for ; Wed, 27 Jul 2022 00:13:49 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id p11so21004925lfu.5 for ; Wed, 27 Jul 2022 00:13:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=Ssg4tRasr4DBZJdl6J73astDPl5I4c2/6pZV2Ko1zDg=; b=p7y2YstySuGWCWGMOCXucGNBqC60lFvOVhWKJj4kFmbSertbFPzRAen3ld28vGIP/V cVqz0GdshAIp19Q85UxA3WWuPVbhMvIQDf1MsRsn1wc++jPYBV2he98aQaANdhUSbsMz bAQkNv0J7JIFzft9JYLrUjhavcW9aaw967EZQE8Qq3mDl+chdRUNerZj4Sp3l6FGHZjd t20+lQbIowTX0GJWhelQZFJueC4uDd7BuVgXuy1oV4GMXaOKmITg4q58+qBhnUy1x5u0 yviK4Nz/cEvWTiLB8CcyqUXQFUVV5Vy/ofoqZXOH1EyhRzSIcMdZ9keZPHAEPKu/2L6X I/nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=Ssg4tRasr4DBZJdl6J73astDPl5I4c2/6pZV2Ko1zDg=; b=2eJR/nii2cjUQ7nGKuLQehOzjRHnssrCPcUFWHfT4Z0KMYvEdV7+O9Fn/hhy8uWKM5 QB2d4FSqIUfXvCaZIqv9bKE/3mk5C6QLd360SbJVYQMNmIapvqnQ31b+QllotXeSqpOm dldKtF0WHu36XIf/s51QG5Qh21lDNFdhodipgs5SwnwpJpFrCSrmqsla6sGLNpx8ti09 COGYotm8P1dXGtOR1V3VI52GD9aGcvL2BiJcnLowRhcH23/mmxALO7B1jxiJ2SbSXab+ m6q8A41J2c85ncL5BRjGrCiphblzo12ZrGBkTYynzpgGGQJMONgJW5W51RIgFt3J1So6 2loA== X-Gm-Message-State: AJIora9IO9sb2cyFQWHv/A5doPxV3l6xYg9g3sknVspiVlCuxjihzH/7 zMGAK6nAkL1K0QfgnBizCWDAoA== X-Google-Smtp-Source: AGRyM1tnPRmGL8sIq6AcjbGyICwHFDjJ/A/xNKBKL5VlEN4NDa4zhRLe4k8vMTsts1cvocOPufsErg== X-Received: by 2002:a05:6512:3041:b0:48a:9c71:8ee2 with SMTP id b1-20020a056512304100b0048a9c718ee2mr3208891lfb.369.1658906027938; Wed, 27 Jul 2022 00:13:47 -0700 (PDT) Received: from [192.168.3.197] (78-26-46-173.network.trollfjord.no. [78.26.46.173]) by smtp.gmail.com with ESMTPSA id u11-20020ac258cb000000b0048a884bdb84sm1756297lfo.52.2022.07.27.00.13.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Jul 2022 00:13:47 -0700 (PDT) Message-ID: Date: Wed, 27 Jul 2022 09:13:46 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH v3 1/2] dt-bindings: sifive: add cache-set value of 2048 Content-Language: en-US To: Conor.Dooley@microchip.com, linus.walleij@linaro.org, brgl@bgdev.pl, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, palmer@dabbelt.com, paul.walmsley@sifive.com, aou@eecs.berkeley.edu, atulkhare@rivosinc.com, sagar.kadam@sifive.com Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org References: <20220726170725.3245278-1-mail@conchuod.ie> <20220726170725.3245278-2-mail@conchuod.ie> <246f132a-a23d-7c53-38a7-2bcec50d65e5@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 26/07/2022 19:39, Conor.Dooley@microchip.com wrote: > > > On 26/07/2022 18:35, Krzysztof Kozlowski wrote: >> On 26/07/2022 19:07, Conor Dooley wrote: >>> From: Atul Khare >>> >>> Fixes Running device tree schema validation error messages like >>> '... cache-sets:0:0: 1024 was expected'. >>> >>> The existing bindings had a single enumerated value of 1024, which >>> trips up the dt-schema checks. The ISA permits any arbitrary power >>> of two for the cache-sets value, but we decided to add the single >>> additional value of 2048 because we couldn't spot an obvious way >>> to express the constraint in the schema. >> >> There is no way to express "power of two" but enum for multiple values >> would work. Is there a reason to limit only to 2048? > > Copy pasting from the cover: >> I don't think that there's value in speculatively adding values to this >> enum especially as (I think at least) the scala for this cache IP has >> been released publicly: >> https://github.com/sifive/block-inclusivecache-sifive/blob/master/design/craft/inclusivecache/src/Parameters.scala#L32 >> >> The two compatibles in the file match only against two specific cache >> implemenations: the fu540's & the fu740's. I would seem to me that, it >> would be better to lock this to a single value per compatible since the >> 1024 applies to the fu540 & the new value of 2048 applies only to the >> fu740. >> >> I have not made that change, I simply wanted to repackage this series >> in a way that could be more easily applied & restart the discussion. > > TL;DR: I would limit it to 1024 & 2048 to match the only implementations > although not in the way this patch did it. The explanation in cover letter is good, but it would be good to have one sentence like this in the commit msg. Otherwise your commit is actually confusing - you mention that you want power of two and then set only 1k + 2k. Best regards, Krzysztof