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 smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2B7F5C77B75 for ; Tue, 16 May 2023 09:06:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) id 04EC8C433A0; Tue, 16 May 2023 09:06:47 +0000 (UTC) Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 7593BC433D2 for ; Tue, 16 May 2023 09:06:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.kernel.org 7593BC433D2 Authentication-Results: smtp.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-9659443fb56so2173412666b.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=Zwe2l84YNBtR3Sc+nYQHV+4OW4l8jgPKxsf6uI2ex0yTuFBt6jdfsNSD5kyk48G0rR llU4rUFoBZrH7HmXpKqp/5diQBX8UQauM/Uowc0k+/jmZ9aQAxw1iZiu8B/FHR2QztvR UBHCVxyx4YKdZ76t23G7XvI6c04U727YRbj29M0nrvhij+bPUdR1hAbn6WMj6HEwTLWM ocjV42umQpIthvh7rqebdC44QQZNuwGKg94MYiraUcJe/PGwn3sEhaYdiJirxrr2zGKr xMHpqXLUhYJ3wtWNPpPkQQ7Q/b3ZYbQ5awC3gnM8yPuTCCKms21ep/8I/s5fJbH06Z5i wSkg== X-Gm-Message-State: AC+VfDws4XU3OLxSGugyvDQFcLVTCZKBG9JB2S9praDC27QOIOadlQ4i 8sdzJvhLofYSSjaF1uZOnViPHQ== 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 List-Id: 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 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