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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 66586C77B7A for ; Tue, 16 May 2023 09:07:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mI4D5fihrD4lGLPrWZ4Vj5F9bfLFb7prOP16SCCYvjk=; b=iJaKAo092dXliL NyDywRVzSxNVGg601Dl+Y9IxhUX3yxowX8GG/J2fvypHt55KH/k55d3hkMseeaB7Lh38YF7HXO2mf /E5hWwoj9+hEVrBc8xMWPTsFMR8VXk9UMhqg7tGtIPW9Kut/CZ3dr4U+s1M+RQmDPwRls1dC1idEW JUqs4VWmSyeaaN3UL1fKJNA6/WL60wpsn67IV1nON56BYUvfjDxDIJfNxTslFL7HiRQc67/W61OrO 2v9o6W+D5yysZzc6/C4Zx2tuM/QuxaQWj7fj25IEJZ+KzxWaVqs5YXWgIjMpt0Cj2O9STLJ/9KUSC C07PrsYZr7pmreKSLKuQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pyqdt-004z5Y-1Q; Tue, 16 May 2023 09:06:49 +0000 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pyqdp-004z3v-2h for linux-arm-kernel@lists.infradead.org; Tue, 16 May 2023 09:06:47 +0000 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-9659443fb56so2173412766b.2 for ; Tue, 16 May 2023 02:06:44 -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=IwKTvL6R/wJq6yVeyrf0o/Z2z+y1eDj511VL3e+4z+0LeFeOtRhrMJxcdMjznUQ4nq pwdL4VFrbVdKGunnJhkGQql5r0Ai54Tn9u4j0r0J6iveTmhcfQ8TZeHUGGvJyzt/x21Y OPlQ1GWM5+UnIhiIAeA92qiAUo/ST+J4x4PFqh7eBnVUaDgmnzLZ7pnwcMluruTtovii XTE00z7eAKYvBOXYW+3q/7X0ELWeVqeZHwiStiPN8EESrjYMneOTaomQAituWcVCaYKc zKITQAEWReURE2tkS/Yf47f+7VMskZxf3mTn+djnOJhr5kX668AEX6wGqoT6FmKbiwqQ a3QA== X-Gm-Message-State: AC+VfDyNVVeUjesZmDWoCJcql3O9dHnWHqP+V3F2vVX7wRhKcR+jW1yc c8RhjWCE1a5FSUgbDS2bWllEdA== X-Google-Smtp-Source: ACHHUZ7QHeXISFZJrF36Tge1qRT3h5Ie2KasB8KSTNRVYPo6emVX2nmGRkC2/597xXYyRrgbjxN4wQ== 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230516_020646_009278_73658AE0 X-CRM114-Status: GOOD ( 31.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel