Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4642407rwe; Tue, 30 Aug 2022 14:09:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR7GHpdZv1dQUzyE2THCDhE0myTeftdYmScYlhgSEQYKR4S4+BwgUAAnc8L++2jCGL19xUQf X-Received: by 2002:a17:907:6e86:b0:73d:7f7f:bbc9 with SMTP id sh6-20020a1709076e8600b0073d7f7fbbc9mr17933948ejc.409.1661893765182; Tue, 30 Aug 2022 14:09:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661893765; cv=none; d=google.com; s=arc-20160816; b=fwXKRhphBkW+NGRv97lH92FA4q89tZqkB8ZOqnE6/UjlgiSUzt9yIrbuQE7KnTuwHm pT81/SekShyFJ8DXV/fw85Vjdd1kdYCKhHciYd2/K9EuGUqtwlV2nkP3GKgOqW316Z/b CTdKFB7fBANkCSeN4QlJTG5ysOIqU/Z8oATE+idNKGW76FD5yNpOQEE5fRSjTDm+D8L/ J6BfITMyuBeQWpNgAoniQa6EevoKR5qfVxFIb5My3dVr/OU2yHiZ+QqThuiUIFDGhlIh TwksRZc8JBA9CsqdTx3PajunIGT9e38qan0oyK31x8Ias9S/CE3TnyDD0+/AlbUKagRt FNMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Zmfm2AAxj6CWaFt2tPI3kW+sB9q0ay0ULev8ofCrh9k=; b=TRAMGcJY5zCSGIID8G2v2NCvB39edhEP/R3OhXdyt8T3isc9Y7x6IP25br8MPTZWos 6qQm2DyUVec6jN+xAE1EcNA6dgupT3BJP5uuGDskCsofhCusHZ9LPdGJryQ25YFQmglT tuXhJ3kyqoTuLjemnmf9NLQ/t5eMYFNtwx8f/2ZvPUem7VqNNHH9+haQZdoKA/GO9keQ 0pjom0ktXTtgia+n4hqn+kNEu/xnvgm2h0Qc73tfy11vuBosTOFR51LYjcNGa7BDEnbV x8nd/uO0WMZLw9lS/mF6TamewgTOZC3YiuRSuoUhSQVZMW2o3q6MjYoI3GxJqAxMRm8j AZ7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sN4VuKXw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d8-20020a056402078800b0043e8dd308a6si4508528edy.8.2022.08.30.14.08.57; Tue, 30 Aug 2022 14:09:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sN4VuKXw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231199AbiH3U52 (ORCPT + 99 others); Tue, 30 Aug 2022 16:57:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230292AbiH3U51 (ORCPT ); Tue, 30 Aug 2022 16:57:27 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 234037C755; Tue, 30 Aug 2022 13:57:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BE145B81D9E; Tue, 30 Aug 2022 20:57:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 581C7C43142; Tue, 30 Aug 2022 20:57:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661893043; bh=iftuHYqQXTY9T/Jpg0WAmZaO4NFtXezaRWCYZ6TK3ig=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=sN4VuKXwsfijKIrdwPjxw4NxzoBbgK7Lox0+jXU7CWFZd7NuNAH8YfB9YRrON1H2e Ign2ztR7Z18cKcRwpntRAKciL/Im4Y1zybhsvCWZ2eCg0Nsl4C7ZuTyheh3jt01mLy Mlau/BTkjCJzMXT/wYvTnibXh8G+67o0svHApuryc4XyV1dPxGs50jScXBItoxOOBs MZ3rej3kOXPmbMBikQg5kcyZpUZ7c9tW9FB1aO85szVVn0bI9Vc0RQjMBKL1J6k0Zo CDsU4caak9l+0z4fo9Fsp3f92DXvvQbqUIAS0ApPTxfEiimAH2N0Tt4q/WvbaETQCl f/zRNkDfPTVlA== Received: by mail-ua1-f53.google.com with SMTP id a18so4535916uat.11; Tue, 30 Aug 2022 13:57:23 -0700 (PDT) X-Gm-Message-State: ACgBeo0T+Qozbw5WsKtB7xUwv4dW24FltCftOLV6I1tXc4UQQyft7Yff JeOHJdiAEbWbHy1l50DzOAL20U9kp3G+bg44tQ== X-Received: by 2002:a9f:23ec:0:b0:39e:c54f:ffc7 with SMTP id 99-20020a9f23ec000000b0039ec54fffc7mr5975565uao.17.1661893042185; Tue, 30 Aug 2022 13:57:22 -0700 (PDT) MIME-Version: 1.0 References: <20220825180417.1259360-1-mail@conchuod.ie> <20220825180417.1259360-2-mail@conchuod.ie> <5f00ab85-d5ac-728d-2157-e70f2a46cc90@canonical.com> In-Reply-To: <5f00ab85-d5ac-728d-2157-e70f2a46cc90@canonical.com> From: Rob Herring Date: Tue, 30 Aug 2022 15:57:10 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] dt-bindings: riscv: sifive-l2: add a PolarFire SoC compatible To: Heinrich Schuchardt Cc: Conor Dooley , Sagar Kadam , Atish Patra , Paul Walmsley , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-riscv , "linux-kernel@vger.kernel.org" , Albert Ou , Daire McNamara , Palmer Dabbelt , Conor Dooley Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 25, 2022 at 1:36 PM Heinrich Schuchardt wrote: > > On 8/25/22 20:04, Conor Dooley wrote: > > From: Conor Dooley > > > > The l2 cache on PolarFire SoC is cross between that of the fu540 and > > the fu740. It has the extra interrupt from the fu740 but the lower > > number of cache-sets. Add a specific compatible to avoid the likes > > of: > > > > mpfs-polarberry.dtb: cache-controller@2010000: interrupts: [[1], [3], [4], [2]] is too long > > Where is such a message written? I couldn't find the string in > next-20220825 (git grep -n 'is too long"'). > > Why should a different number of cache sets require an extra compatible > string. cache-size is simply a parameter going with the existing > compatible strings. > > I would assume that you only need an extra compatible string if there is > a functional difference that can not be expressed with the existing > parameters. Correct, but you have to account for unknown functional differences aka errata as well. Otherwise, we need firmware updates to enable the OS to handle errata. > > Fixes: 34fc9cc3aebe ("riscv: dts: microchip: correct L2 cache interrupts") > > Signed-off-by: Conor Dooley > > --- > > .../bindings/riscv/sifive-l2-cache.yaml | 79 ++++++++++++------- > > 1 file changed, 49 insertions(+), 30 deletions(-) > > > > diff --git a/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml b/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml > > index 69cdab18d629..ca3b9be58058 100644 > > --- a/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml > > +++ b/Documentation/devicetree/bindings/riscv/sifive-l2-cache.yaml > > @@ -17,9 +17,6 @@ description: > > acts as directory-based coherency manager. > > All the properties in ePAPR/DeviceTree specification applies for this platform. > > > > -allOf: > > - - $ref: /schemas/cache-controller.yaml# > > - > > select: > > properties: > > compatible: > > @@ -33,11 +30,16 @@ select: > > > > properties: > > compatible: > > - items: > > - - enum: > > - - sifive,fu540-c000-ccache > > - - sifive,fu740-c000-ccache > > Why can't you simply add microchip,mpfs-ccache here? > > > - - const: cache > > + oneOf: > > + - items: > > + - enum: > > + - sifive,fu540-c000-ccache > > + - sifive,fu740-c000-ccache > > + - const: cache > > + - items: > > + - const: microchip,mpfs-ccache > > + - const: sifive,fu540-c000-ccache > > Why do we need 'sifive,fu540-c000-ccache' twice? Because it is in 2 different positions. While we can express that the last N entries in a list are optional, there is no way in json-schema to express entries at the beginning or in the middle are optional. Rob