From: Rob Herring <rob.herring@calxeda.com>
To: Jon Loeliger <jdl@jdl.com>, Stephen Warren <swarren@wwwdotorg.org>
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
khilman@linaro.org, Stephen Warren <swarren@nvidia.com>,
s.nawrocki@samsung.com, pawel.moll@arm.com, a.hajda@samsung.com,
Tomasz Figa <t.figa@samsung.com>,
Grant Likely <grant.likely@secretlab.ca>,
fparent@baylibre.com, Benoit Cousson <bcousson@baylibre.com>,
galak@codeaurora.org, olof@lixom.net, Alison_Chaiken@mentor.com,
linux-arm-kernel@lists.infradead.org,
david@gibson.dropbear.id.au
Subject: Re: [RFC PATCH dtc] C-based DT schema checker integrated into dtc
Date: Fri, 25 Oct 2013 12:38:15 -0500 [thread overview]
Message-ID: <526AAC87.5070400@calxeda.com> (raw)
In-Reply-To: <E1VZjCU-0005RE-Vt@jdl.com>
On 10/25/2013 10:21 AM, Jon Loeliger wrote:
>> On 10/25/2013 12:43 AM, Grant Likely wrote:
>>> On Thu, 24 Oct 2013 22:51:28 +0100, Stephen Warren <swarren@wwwdotorg.org>
>> wrote:
>>>> From: Stephen Warren <swarren@nvidia.com>
>>>>
>>>> This is a very quick proof-of-concept re: how a DT schema checker might
>>>> look if written in C, and integrated into dtc.
>>>
>>> Thanks for looking at this.
>>>
>>> Very interesting. Certainly an expedient way to start checking schemas,
>>> and for certain bindings it may be the best approach. The downside is it
>>> forces a recompilation of DTC to bring in new bindings and it isn't a
>>> great meduim for mixing schema with documentation in the bindings.
>>
>> This approach would certainly require recompiling something. I threw the
>> code into dtc simply because it was the easiest container for the
>> demonstration. It could be a separate DT validation utility if we
>> wanted, although we'd need to split the DT parser from dtc into a
>> library to avoid code duplication. The resultant utility could be part
>> of the repo containing the DTs, so it didn't end up as a separate
>> package to manage.
>>
>> I think the additional documentation could be added as comments in the
>> validation functions, just like IIRC it was to be represented as
>> comments even in the .dts-based schema proposals.
>
> DTers,
>
> I think the additional benefit of starting with a direct C
> implementation is that it causes us to begin to actually
> codify the schema requirements. Sure, it may not be ideal
> at first, but over time it may reveal consistent patterns
> that can be extracted. And it may reveal what a real schema
> might look like and how it might be expressed better. Which
> is to say that perhaps we are letting "perfect" get in the
> way of "good enough to start"?
>
> In the meantime, someone has shown us the code and we can
> get started. It's a Small Matter of Refactoring later. :-)
I have not really looked at whether this would make sense or be low
effort, but what if Grant's run-time checker was converted to run at
kernel compile time. That would fall into the get something working
sooner rather than later, but doesn't solve the documentation problem
either.
Rob
next prev parent reply other threads:[~2013-10-25 17:38 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-24 21:51 [RFC PATCH dtc] C-based DT schema checker integrated into dtc Stephen Warren
[not found] ` <1382651488-9696-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-10-24 23:43 ` Grant Likely
[not found] ` <20131024234340.ADF70C403B6-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2013-10-25 4:00 ` Kumar Gala
2013-10-25 14:44 ` Stephen Warren
[not found] ` <526A83B9.30800-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-10-25 15:21 ` Jon Loeliger
2013-10-25 17:38 ` Rob Herring [this message]
[not found] ` <E1VZjCU-0005RE-Vt-CYoMK+44s/E@public.gmane.org>
2013-10-25 23:11 ` David Gibson
[not found] ` <20131025231106.GC17659-1s0os16eZneny3qCrzbmXA@public.gmane.org>
2013-11-03 23:15 ` Tomasz Figa
2013-11-03 23:26 ` Tomasz Figa
2013-11-04 9:28 ` Arnd Bergmann
2013-11-04 12:31 ` Tomasz Figa
2013-11-04 16:37 ` Stephen Warren
[not found] ` <5277CD33.6030003-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-11-04 18:57 ` Olof Johansson
2013-11-04 20:43 ` Arnd Bergmann
2013-11-04 21:29 ` Jason Gunthorpe
[not found] ` <20131104212930.GB9638-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2013-11-04 21:43 ` Stephen Warren
[not found] ` <527814E4.9050204-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-11-04 22:21 ` Jason Gunthorpe
2013-11-05 12:14 ` Arnd Bergmann
2013-11-05 8:39 ` Arnd Bergmann
[not found] ` <201311050939.21071.arnd-r2nGTMty4D4@public.gmane.org>
2013-11-05 18:03 ` Jason Gunthorpe
2013-11-05 18:48 ` Arnd Bergmann
[not found] ` <201311051948.11992.arnd-r2nGTMty4D4@public.gmane.org>
2013-11-05 19:12 ` Jason Gunthorpe
2013-11-05 19:34 ` Arnd Bergmann
[not found] ` <201311052034.01114.arnd-r2nGTMty4D4@public.gmane.org>
2013-11-05 19:58 ` Jason Gunthorpe
[not found] ` <20131105195820.GB20600-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2013-11-05 20:17 ` Arnd Bergmann
[not found] ` <201311052117.33443.arnd-r2nGTMty4D4@public.gmane.org>
2013-11-05 20:36 ` Jason Gunthorpe
2013-11-04 21:50 ` Stephen Warren
[not found] ` <527816AE.1080508-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-11-05 8:22 ` Arnd Bergmann
2013-11-06 12:17 ` Thierry Reding
2013-11-04 14:28 ` David Gibson
2013-11-04 16:42 ` Stephen Warren
2013-10-28 10:17 ` David Gibson
[not found] ` <20131028101737.GC15114-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2013-10-31 21:13 ` Stephen Warren
[not found] ` <5272C80A.7070204-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-11-01 13:24 ` David Gibson
2013-10-25 23:29 ` David Gibson
[not found] ` <20131025232951.GD17659-1s0os16eZneny3qCrzbmXA@public.gmane.org>
2013-10-31 21:11 ` Stephen Warren
[not found] ` <5272C773.2030901-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-11-10 11:00 ` David Gibson
[not found] ` <20131110110043.GB21328-RXTfZT5YzpxwFLYp8hBm2A@public.gmane.org>
2013-11-12 22:06 ` Stephen Warren
[not found] ` <5282A64B.3020706-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-11-13 0:33 ` David Gibson
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=526AAC87.5070400@calxeda.com \
--to=rob.herring@calxeda.com \
--cc=Alison_Chaiken@mentor.com \
--cc=a.hajda@samsung.com \
--cc=bcousson@baylibre.com \
--cc=david@gibson.dropbear.id.au \
--cc=devicetree@vger.kernel.org \
--cc=fparent@baylibre.com \
--cc=galak@codeaurora.org \
--cc=grant.likely@secretlab.ca \
--cc=jdl@jdl.com \
--cc=khilman@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=olof@lixom.net \
--cc=pawel.moll@arm.com \
--cc=s.nawrocki@samsung.com \
--cc=swarren@nvidia.com \
--cc=swarren@wwwdotorg.org \
--cc=t.figa@samsung.com \
/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;
as well as URLs for NNTP newsgroup(s).