public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
From: Conor Dooley <conor.dooley@microchip.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Conor Dooley <conor@kernel.org>, <soc@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>, Olof Johansson <olof@lixom.net>,
	Palmer Dabbelt <palmer@dabbelt.com>, <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>
Subject: Re: [PATCH v1] Documentation/process: add soc maintainer handbook
Date: Tue, 16 May 2023 09:57:29 +0100	[thread overview]
Message-ID: <20230516-grader-dejected-df65cdc584b3@wendy> (raw)
In-Reply-To: <cf1c6b8c-8a3f-eca1-948f-e41946d4c34c@linaro.org>


[-- Attachment #1.1: Type: text/plain, Size: 4476 bytes --]

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 <conor.dooley@microchip.com>
> > 
> > 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 <arnd@arndb.de>
> > Signed-off-by: Conor Dooley <conor.dooley@microchip.com>

> > +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!
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.

> > +Branches and Pull Requests
> > +~~~~~~~~~~~~~~~~~~~~~~~~~~

> > +The subject line of a pull request should begin with "[GIT PULL]" and made using
> > +a tag, rather than a branch.  This tag should contain a short description
> 
> a signed tag

I initially had that explicit wording, but I dropped it when I added the
ref to the pull requests doc since that talks about signing. It's
probably better to be explicit & re-adding it is trivial.

Thanks,
Conor.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 161 bytes --]

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2023-05-16  8:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-15 19:20 [PATCH v1] Documentation/process: add soc maintainer handbook Conor Dooley
2023-05-16  8:31 ` Krzysztof Kozlowski
2023-05-16  8:57   ` Conor Dooley [this message]
2023-05-16  9:06     ` Krzysztof Kozlowski
2023-05-16  9:15       ` Conor Dooley
2023-05-16  9:16     ` Arnd Bergmann
2023-05-16 10:08       ` Krzysztof Kozlowski
2023-05-22 21:34   ` Conor Dooley
2023-05-23  0:32     ` Jessica Clarke
2023-05-23  5:19       ` Conor Dooley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230516-grader-dejected-df65cdc584b3@wendy \
    --to=conor.dooley@microchip.com \
    --cc=arnd@arndb.de \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=olof@lixom.net \
    --cc=palmer@dabbelt.com \
    --cc=robh+dt@kernel.org \
    --cc=soc@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox