public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: tomasz.figa@gmail.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: Defining schemas for Device Tree
Date: Thu, 01 Aug 2013 01:04:05 +0200	[thread overview]
Message-ID: <1940278.JgeAG48RRV@flatron> (raw)
In-Reply-To: <51F977D0.7050200@wwwdotorg.org>

On Wednesday 31 of July 2013 14:47:12 Stephen Warren wrote:
> On 07/30/2013 05:23 PM, jonsmirl at gmail.com wrote:
> > On Tue, Jul 30, 2013 at 7:03 PM, Mark Brown <broonie@kernel.org> 
wrote:
> >> On Tue, Jul 30, 2013 at 06:19:08PM -0400, jonsmirl at gmail.com wrote:
> >>> FDT is versioned and PowerPC docs say that multiple versions have
> >>> been
> >>> released.  If we find enough flaws we could do a new release then
> >>> use
> >>> the quirks scheme to read the older versions.
> >> 
> >> That does involve updating everything that wants to understand FDTs
> >> in
> >> the new FDT format version though.  I'm not sure that's going to be
> >> greeted with universal enthusiasm.
> > 
> > Shipped hardware containing FDTs would keep the version they shipped
> > with. That's the point of making this  a stable ABI. The Linux quirk
> > code would convert the older format to the new format at boot time.
> > 
> > So to change this you need to:
> > 1) change dtc to produce the new version
> > 2) adjust the kernel code to understand the new version
> > 3) adjust the quirk code to convert the known set of older firmware
> > based FDTs into the new format. For the simple string case the strings
> > would be turned into indirect pointers instead of being in-line.
> 
> There's one issue issue with the quirk/conversion layer in the kernel.
> 
> Various combinations are supposed to work:
> 
> 1) The "current" kernel with the "current" DTB. I think everyone agrees
> on that much:-)
> 
> 2) Using an old DTB with a new kernel. This could be handled by having
> stable DT bindings, and/or by having a quirk/conversion layer in the
> kernel to convert old DTBs into whatever format the new kernel expects.
> 
> 3) Using a new DTB with a old kernel. Rob Herring raised the point that
> a firmware update (which might include updating the DTB the firmware
> passes to the kernel) should not make the kernel you have installed in
> the filesystem fail to boot.
>
> I'm assuming that if the quirk/conversion layer you're championing were
> the solution chosen for (2), then at least some of the time, people
> would start using the new DT binding when writing new DTs, or modifying
> existing DTs. That would break point (3) above, since the new DT would
> no longer work with the old kernel.
> 
> I think the only way to satisfy all three points above is to have truly
> stable backwards-compatible bindings, without relying on any in-kernel
> conversion layer.

IMHO stable bindings is the way to go. We already managed to keep lot of 
existing bindings stable, see most of the generic bindings. Those got much 
more thought at design stage, much more review and ended up being 
something that could be stabilized.

If we define the process of bindings introduction correctly, we should be 
able to filter out those that won't work as stable thing and stabilize 
those that will. This is why we may need a staging tree for bindings and a 
way to develop such bindings to make them stable at some point of time.

I'm not really sure how Greg's staging tree works, but we might be able to 
get some hints for creating our staging process from him (now on Cc).

Best regards,
Tomasz

  reply	other threads:[~2013-07-31 23:04 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-29  0:21 Defining schemas for Device Tree Tomasz Figa
2013-07-29  1:30 ` jonsmirl at gmail.com
2013-07-29  8:27   ` David Woodhouse
2013-07-29  8:40   ` Tomasz Figa
2013-07-29 15:01 ` Jason Cooper
2013-07-29 16:49   ` Dave Martin
2013-07-29 17:11     ` Jason Gunthorpe
2013-07-29 17:23     ` [Ksummit-2013-discuss] " Jason Cooper
2013-07-29 17:29       ` Jason Gunthorpe
2013-07-29 19:48       ` Mark Brown
2013-07-29 22:29       ` David Gibson
2013-07-29 22:48         ` Jason Cooper
2013-07-29 23:45           ` David Gibson
2013-07-30 12:12             ` Jason Cooper
2013-07-30  0:41       ` David Lang
2013-07-30  0:49         ` jonsmirl at gmail.com
2013-07-30  1:50       ` David Gibson
2013-07-30 12:17         ` Jason Cooper
2013-07-29 18:15 ` Jason Gunthorpe
2013-07-29 22:26   ` Tomasz Figa
2013-07-29 21:47 ` Stephen Warren
2013-07-29 22:20   ` Tomasz Figa
2013-07-30  0:02     ` Stephen Warren
2013-07-29 22:23   ` jonsmirl at gmail.com
2013-07-29 22:45     ` Tomasz Figa
2013-07-30  0:30       ` jonsmirl at gmail.com
2013-07-30 10:25         ` Mark Brown
2013-07-30 13:14           ` jonsmirl at gmail.com
2013-07-30 17:19             ` Stephen Warren
2013-07-30 17:29               ` jonsmirl at gmail.com
2013-07-30 17:34                 ` Stephen Warren
2013-07-30 17:45                   ` jonsmirl at gmail.com
2013-07-30 17:49                     ` Stephen Warren
2013-07-30 18:03                       ` jonsmirl at gmail.com
2013-07-30 18:04                         ` jonsmirl at gmail.com
2013-07-30 18:25                           ` Stephen Warren
2013-07-30 18:28                             ` jonsmirl at gmail.com
2013-07-31  7:01                               ` Tony Lindgren
2013-08-01 20:04                               ` Matt Sealey
2013-07-30 18:26                           ` jonsmirl at gmail.com
2013-07-30 20:57                 ` Mark Brown
2013-07-30 22:19                   ` jonsmirl at gmail.com
2013-07-30 23:03                     ` Mark Brown
2013-07-30 23:23                       ` jonsmirl at gmail.com
2013-07-31 11:34                         ` Mark Brown
2013-07-31 12:01                           ` jonsmirl at gmail.com
2013-07-31 12:21                             ` Tomasz Figa
2013-07-31 16:29                               ` [Ksummit-2013-discuss] " Thomas Petazzoni
2013-07-31 16:41                               ` Sascha Hauer
2013-07-31 16:59                           ` Dave Martin
2013-07-31 18:59                             ` Mark Brown
2013-08-01 14:29                               ` Dave Martin
2013-07-31 19:57                         ` Stephen Warren
2013-07-31 20:47                         ` Stephen Warren
2013-07-31 23:04                           ` Tomasz Figa [this message]
2013-07-30 22:16 ` Tomasz Figa
2013-07-30 22:26   ` Stephen Warren
2013-07-30 22:27   ` jonsmirl at gmail.com

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=1940278.JgeAG48RRV@flatron \
    --to=tomasz.figa@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox