All of lore.kernel.org
 help / color / mirror / Atom feed
From: thierry.reding@gmail.com (Thierry Reding)
To: linux-arm-kernel@lists.infradead.org
Subject: [Ksummit-2013-discuss] [RFC] of: Allow for experimental device tree bindings
Date: Thu, 24 Oct 2013 10:04:19 +0200	[thread overview]
Message-ID: <20131024080418.GE9403@ulmo.nvidia.com> (raw)
In-Reply-To: <20131023210849.GB2912@obsidianresearch.com>

On Wed, Oct 23, 2013 at 03:08:49PM -0600, Jason Gunthorpe wrote:
> On Wed, Oct 23, 2013 at 09:58:50PM +0200, Thierry Reding wrote:
[...]
> > > Also, what happens during development? If you incompatibly change the
> > > binding you should change the name, so maybe <version>!marvell,foo is
> > > the way to go. 
> > > 
> > > v1 of the binding is 1!marvell,foo - version 2 is 2!marvell,foo, etc.
> > > 
> > > When stablized the last bang is kept and the non-bang version is
> > > added. The boot warning is supressed once stable no matter the
> > > compatible string used in the dt...
> > 
> > Why would we want to go through all that trouble if we define up front
> > that the binding is experimental in the first place? Encoding a version
> > number in it somehow entails that earlier versions are still supported
> > in some way.
> 
> No, certainly not. It just says the binding has changed and every DT
> stanza that uses the old version needs to be reviewed and updated.
> 
> > But the whole point of experimental bindings is so that we don't have to
> > worry about backwards compatibility.
> 
> The purpose is to not silently throw users/testers under the bus. A
> driver that doesn't bind is much better than a driver that blows up in
> some crazy, hard to determine way because the DT binding has been
> silently incompatibly changed.
> 
> The rule for experimental bindings should be that incompatible changes
> to the binding must bump the version number at the same time, clearly
> signalling to everyone using that binding that they need to take some
> action.

I disagree. I think that we should apply the same rule to DT bindings
(at least experimental ones) that we apply to code within the Linux
kernel. If you change an experimental binding in an incompatible way
then it should be your responsibility to update all users of it so that
they don't break.

In reality I would hope that this isn't much of a problem really. Given
the nature of a compatible value there will typically only be a single
driver implementing it. Any users of it (DTS files) should be pretty
easy to fix up at the same time.

That's the same way that platform data used to work, except it had the
advantage of the compiler actually pointing out incompatible changes.
There has been some discussion about adding validation functionality to
DTC, which should make it easy to find DTS files that require updating
as well.

The above would also indicate that because of their nature, experimental
bindings might be better kept within the Linux kernel tree. That would
make it easy to keep a good overview of what needs to be updated when a
binding changes. It would also make the promotion to stable much more
explicit by physically moving the binding document to a different
repository. Obviously that comes with its own set of problem that we'll
need to find a way to extend the board DTS files that will presumably be
kept in the external stable binding repository with experimental content
only available in the Linux kernel tree.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131024/16906a29/attachment.sig>

WARNING: multiple messages have this Message-ID (diff)
From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	ksummit-2013-discuss-cunTk1MwBs98uUxBSJOaYoYkZiVZrdSR2LY78lusg7I@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Subject: Re: [Ksummit-2013-discuss] [RFC] of: Allow for experimental device tree bindings
Date: Thu, 24 Oct 2013 10:04:19 +0200	[thread overview]
Message-ID: <20131024080418.GE9403@ulmo.nvidia.com> (raw)
In-Reply-To: <20131023210849.GB2912-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 3093 bytes --]

On Wed, Oct 23, 2013 at 03:08:49PM -0600, Jason Gunthorpe wrote:
> On Wed, Oct 23, 2013 at 09:58:50PM +0200, Thierry Reding wrote:
[...]
> > > Also, what happens during development? If you incompatibly change the
> > > binding you should change the name, so maybe <version>!marvell,foo is
> > > the way to go. 
> > > 
> > > v1 of the binding is 1!marvell,foo - version 2 is 2!marvell,foo, etc.
> > > 
> > > When stablized the last bang is kept and the non-bang version is
> > > added. The boot warning is supressed once stable no matter the
> > > compatible string used in the dt...
> > 
> > Why would we want to go through all that trouble if we define up front
> > that the binding is experimental in the first place? Encoding a version
> > number in it somehow entails that earlier versions are still supported
> > in some way.
> 
> No, certainly not. It just says the binding has changed and every DT
> stanza that uses the old version needs to be reviewed and updated.
> 
> > But the whole point of experimental bindings is so that we don't have to
> > worry about backwards compatibility.
> 
> The purpose is to not silently throw users/testers under the bus. A
> driver that doesn't bind is much better than a driver that blows up in
> some crazy, hard to determine way because the DT binding has been
> silently incompatibly changed.
> 
> The rule for experimental bindings should be that incompatible changes
> to the binding must bump the version number at the same time, clearly
> signalling to everyone using that binding that they need to take some
> action.

I disagree. I think that we should apply the same rule to DT bindings
(at least experimental ones) that we apply to code within the Linux
kernel. If you change an experimental binding in an incompatible way
then it should be your responsibility to update all users of it so that
they don't break.

In reality I would hope that this isn't much of a problem really. Given
the nature of a compatible value there will typically only be a single
driver implementing it. Any users of it (DTS files) should be pretty
easy to fix up at the same time.

That's the same way that platform data used to work, except it had the
advantage of the compiler actually pointing out incompatible changes.
There has been some discussion about adding validation functionality to
DTC, which should make it easy to find DTS files that require updating
as well.

The above would also indicate that because of their nature, experimental
bindings might be better kept within the Linux kernel tree. That would
make it easy to keep a good overview of what needs to be updated when a
binding changes. It would also make the promotion to stable much more
explicit by physically moving the binding document to a different
repository. Obviously that comes with its own set of problem that we'll
need to find a way to extend the board DTS files that will presumably be
kept in the external stable binding repository with experimental content
only available in the Linux kernel tree.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-10-24  8:04 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-23 15:06 [RFC] of: Allow for experimental device tree bindings Thierry Reding
2013-10-23 15:06 ` Thierry Reding
2013-10-23 16:05 ` [Ksummit-2013-discuss] " David Woodhouse
2013-10-23 16:05   ` David Woodhouse
2013-10-23 16:55   ` Guenter Roeck
2013-10-23 16:55     ` Guenter Roeck
2013-10-23 17:05     ` David Woodhouse
2013-10-23 17:05       ` David Woodhouse
2013-10-23 18:56       ` Thierry Reding
2013-10-23 18:56         ` Thierry Reding
2013-10-23 18:51   ` Thierry Reding
2013-10-23 18:51     ` Thierry Reding
2013-10-24 22:26     ` Stephen Warren
2013-10-24 22:26       ` Stephen Warren
2013-10-25  8:22       ` Thierry Reding
2013-10-25  8:22         ` Thierry Reding
2013-10-25  8:45         ` Stephen Warren
2013-10-25  8:45           ` Stephen Warren
2013-10-23 16:33 ` Stephen Warren
2013-10-23 16:33   ` Stephen Warren
2013-10-23 17:20   ` [Ksummit-2013-discuss] " Wolfram Sang
2013-10-23 17:20     ` Wolfram Sang
2013-10-23 18:59     ` Thierry Reding
2013-10-23 18:59       ` Thierry Reding
2013-10-23 19:34       ` Jason Gunthorpe
2013-10-23 19:34         ` Jason Gunthorpe
2013-10-23 19:58         ` Thierry Reding
2013-10-23 19:58           ` Thierry Reding
2013-10-23 21:08           ` Jason Gunthorpe
2013-10-23 21:08             ` Jason Gunthorpe
2013-10-24  8:04             ` Thierry Reding [this message]
2013-10-24  8:04               ` Thierry Reding
2013-10-24 17:32               ` Jason Gunthorpe
2013-10-24 17:32                 ` Jason Gunthorpe
2013-10-23 21:13           ` Andy Lutomirski
2013-10-23 21:13             ` Andy Lutomirski
2013-10-23 19:40       ` Wolfram Sang
2013-10-23 19:40         ` Wolfram Sang
2013-10-23 20:05         ` Thierry Reding
2013-10-23 20:05           ` Thierry Reding
2013-10-24  8:34     ` Grant Likely
2013-10-24  8:34       ` Grant Likely
2013-10-24  8:50       ` Thierry Reding
2013-10-24  8:50         ` Thierry Reding
2013-10-24 20:26       ` Matt Sealey
2013-10-24 20:26         ` Matt Sealey
2013-10-24 22:29       ` Stephen Warren
2013-10-24 22:29         ` Stephen Warren
2013-10-24 18:39 ` jonsmirl at gmail.com
2013-10-24 18:39   ` jonsmirl-Re5JQEeQqe8AvxtiuMwx3w

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=20131024080418.GE9403@ulmo.nvidia.com \
    --to=thierry.reding@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.