Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp373181rwd; Tue, 16 May 2023 02:11:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7hJC4RHH98mEivQyFCdYQ9b78HPOpg4aSl9PlRE+kTIR82Gw+baMuNYRi8ySuNMhPzLvgr X-Received: by 2002:a17:903:2405:b0:1a6:4b60:3195 with SMTP id e5-20020a170903240500b001a64b603195mr43644478plo.66.1684228280097; Tue, 16 May 2023 02:11:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684228280; cv=none; d=google.com; s=arc-20160816; b=OPZ8kQmNVlvFf0c9SM5ZE3L07C7fHwdGIO84YP1n/zAvKetBERlTWUnyTfdqVrHVZ1 esXzmeRmiBrTXOSLbU646WtQk9G7fHSvPKEZfAaeTTn4rBD1+OgizyAyiu6579d4cicB PiikEBLxlPuGJ0ZJQNt96SizSFI+5+R+mq9mjUlxPOHd3/8dDpZAqHb5yOuARyQN/ZAS 6J8XWmyA1X2yEgpHGCnVhnPwwBCl1b7l44WpyA9pitEUpym49O0vZ92c2KWDqV1Xc91A 0FIoUNXwmeUD4rxFBHcZkdXeN5lSUFxPTIs4rClkvYcM4umkzvsNrvmsYls88VFFcPvK IcSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=WfR5x7lYlGZxQEhgIr7ehFRWybZSX2Ee6e6eJ8QySGY=; b=goVFll75LEOuWjl8nLPsO++5S24mYj1WCswXeHmzkxRWYWrQYLCgKavzgtXkCH/icm 3sAGKCV/TchgGNPy/yPJ9slZQdT7BrO4IodJ71sv6MiE2DmGH5lPNwpEI4yQohXFA3j+ Le2L9Kyxw9yMZRwIIkdxajrN7i1XEUbGWS/eaGhsVAJ4Bny8AYwCZGEKtYTOpigOeTMo t4s+pIDOZ1OCHrgAN680fKyqleo4AB4lPUDT0ETu5uc55S3Qqy+2B0uExXWSlRA7gC9s /hIWa5nXw0DCf3P/+Gk2Av3i0Vh/ke+KqcM+c3ihp2+GoyFIKPoIV83S622BxNJu6VPp 2YPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="hvOWGF/F"; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l13-20020a170902f68d00b001ab18790b12si20282869plg.97.2023.05.16.02.11.04; Tue, 16 May 2023 02:11:20 -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=@linaro.org header.s=google header.b="hvOWGF/F"; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231734AbjEPJGt (ORCPT + 99 others); Tue, 16 May 2023 05:06:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229554AbjEPJGr (ORCPT ); Tue, 16 May 2023 05:06:47 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27DB8C4 for ; Tue, 16 May 2023 02:06:45 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-50bc040c7b8so20894858a12.2 for ; Tue, 16 May 2023 02:06:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684228003; x=1686820003; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=WfR5x7lYlGZxQEhgIr7ehFRWybZSX2Ee6e6eJ8QySGY=; b=hvOWGF/FhwNQBPa6krRzcpKhHdtUfi7ZJ5kDslFuENrTh00ATMGwvIrItcmF7b7+nT z8UWvCIFVVnxs6C2l/7+ULaSKddSfYBWdl+kr3+n1DXe1hExwO4CpRDRgnw3miH32How XbmP8kNjcbfK5uDg2yKOMMm9yvQUepl3otYxRJ8JBugbG3nnuupT/2LFLNbclAN4/Bn3 c+QRh8Gh19YGm+m6YMDI/GI2IuG4n5wwrOjNRRqk3IxwxaPlZjPUGbrdq3vHO9LyIfz4 SJxndrkwQ/g4hnQrJrH2aUXV2oytN7lBIA3mEhkfqUN32wEY7ys6gkUUc3va5EqwiALT rmaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684228003; x=1686820003; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=WfR5x7lYlGZxQEhgIr7ehFRWybZSX2Ee6e6eJ8QySGY=; b=DBROjSIAIADXFY0saMxb1rHy6UiKgdPo1CJLfqY+bXvVuzgyg7O/999cUkC8FE+lJC qALjetiF4ed619B4Ads6D/N2lgrV1EMxZvq/xVVJjk/IxnG6rBuDfCvyXcbfIdhNg1ha cHZkQ17AWh4gXWm99a1/anVCpj3W31qychHyoVxVp0PSEbeE8FE1bd4hmkuEzaevakhH 1DthVb+GXeRwIYixhV6dCsaSSaycT8jZAc3H0riTJYjedYasIepblAuswJtxDmDo/Uot 1WKuzWt0l9Om+wg8HMqeaTXKsesFlb2NVc0DYOc/i2w41zMN1ldpaGHGP46KQlxA+C0s Jt/A== X-Gm-Message-State: AC+VfDwuAzjmuFlUkXOPGgnsFtYYrLUaTBLywW3pKeRdzb14T9vLHeSY QlWm8tQSxskZPoMThr31S1WpWA== X-Received: by 2002:a17:907:846:b0:965:e5cf:bb35 with SMTP id ww6-20020a170907084600b00965e5cfbb35mr32739005ejb.22.1684228003549; Tue, 16 May 2023 02:06:43 -0700 (PDT) Received: from ?IPV6:2a02:810d:15c0:828:77d1:16a1:abe1:84fc? ([2a02:810d:15c0:828:77d1:16a1:abe1:84fc]) by smtp.gmail.com with ESMTPSA id my37-20020a1709065a6500b0094f44bdf7acsm10738310ejc.57.2023.05.16.02.06.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 May 2023 02:06:43 -0700 (PDT) Message-ID: Date: Tue, 16 May 2023 11:06:41 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v1] Documentation/process: add soc maintainer handbook Content-Language: en-US To: Conor Dooley Cc: Conor Dooley , soc@kernel.org, Arnd Bergmann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , Olof Johansson , Palmer Dabbelt , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org References: <20230515-geometry-olympics-b0556ff8a5f7@spud> <20230516-grader-dejected-df65cdc584b3@wendy> From: Krzysztof Kozlowski In-Reply-To: <20230516-grader-dejected-df65cdc584b3@wendy> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 16/05/2023 10:57, Conor Dooley wrote: > On Tue, May 16, 2023 at 10:31:19AM +0200, Krzysztof Kozlowski wrote: >> On 15/05/2023 21:20, Conor Dooley wrote: >>> From: Conor Dooley >>> >>> Arnd suggested that adding maintainer handbook for the SoC "subsystem" >>> would be helpful in trying to bring on board maintainers for the various >>> new platforms cropping up in RISC-V land. >>> >>> Add a document briefly describing the role of the SoC subsystem and some >>> basic advice for (new) platform maintainers. >>> >>> Suggested-by: Arnd Bergmann >>> Signed-off-by: Conor Dooley > >>> +devicetree ABI stability >>> +~~~~~~~~~~~~~~~~~~~~~~~~ >>> + >>> +Perhaps one of the most important things to highlight is that dt-bindings >>> +document the ABI between the devicetree and the kernel. Once dt-bindings have >>> +been merged (and appear in a release of the kernel) they are set in stone, and >>> +any changes made must be compatible with existing devicetrees. This means that, >>> +when changing properties, a "new" kernel must still be able to handle an old >>> +devicetree. For many systems the devicetree is provided by firmware, and >>> +upgrading to a newer kernel cannot cause regressions. Ideally, the inverse is >>> +also true, and a new devicetree will also be compatible with an old kernel, >>> +although this is often not possible. >> >> I would prefer to skip it and instead: enhance >> Documentation/devicetree/bindings/ABI.rst and then reference it here. > > Sure. > >>> +Driver branch dependencies >>> +~~~~~~~~~~~~~~~~~~~~~~~~~~ >>> + >>> +A common problem is synchronizing changes between device drivers and devicetree >>> +files, even if a change is compatible in both directions, this may require >>> +coordinating how the changes get merged through different maintainer trees. >>> + >>> +Usually the branch that includes a driver change will also include the >>> +corresponding change to the devicetree binding description, to ensure they are >>> +in fact compatible. This means that the devicetree branch can end up causing >>> +warnings in the "make dtbs_check" step. If a devicetree change depends on >>> +missing additions to a header file in include/dt-bindings/, it will fail the >>> +"make dtbs" step and not get merged. >>> + >>> +There are multiple ways to deal with this: >>> + >>> + - Avoid defining custom macros in include/dt-bindings/ for hardware constants >>> + that can be derived from a datasheet -- binding macros in header file should >>> + only be used as a last resort if there is no natural way to define a binding >>> + >>> + - Use literal values in the devicetree file in place of macros even when a >>> + header is required, and change them to the named representation in a >>> + following release >> >> I actually prefer such solution: >> >> - Duplicate defines in the devicetree file hidden by #ifndef section >> and remove them later in a following release >> >> We can keep both, but mine above leads to cleaner changes in DTS file. > > I think all of the options involved are either a bit ugly, or a bit of a > pain in the hole. > >>> + - Defer the devicetree changes to a release after the binding and driver have >>> + already been merged >>> + >>> + - Change the bindings in a shared immutable branch that is used as the base for >>> + both the driver change and the devicetree changes >> >> The policy told to me some time ago was that no merges from driver >> branch or tree are allowed towards DTS branch, even if they come only >> with binding header change. There are exceptions for this, e.g. [1], but >> that would mean we need to express here rules for cross-tree merges. > > I've got away with having an immutable branch for dt-binding headers! Of course, all is in an immutable branch, but in which tree? I talk about a case when driver tree, e.g. different clock maintainer, takes the binding. > That said, Arnd did actually have a look at this (and suggested some > changes) before I sent it & did not cry fowl about this section. IIRC, > this is actually his wording, not mine. Best regards, Krzysztof