linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Michal Marek <mmarek@suse.cz>,
	Rob Herring <robherring2@gmail.com>,
	Srinivas KANDAGATLA <srinivas.kandagatla@st.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Scott Wood <scottwood@freescale.com>,
	Sam Ravnborg <sam@ravnborg.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	devicetree-discuss <devicetree-discuss@lists.ozlabs.org>,
	Stephen Warren <swarren@nvidia.com>
Subject: Re: [PATCH V8] kbuild: create a rule to run the pre-processor on *.dts files
Date: Fri, 8 Feb 2013 20:50:47 +0000	[thread overview]
Message-ID: <CACxGe6t=Bi=4ZiZFyye9iSGBe4k-pa7h2c39iruGhKi3oJjzWA@mail.gmail.com> (raw)
In-Reply-To: <51153365.5010109@wwwdotorg.org>

On Fri, Feb 8, 2013 at 5:18 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 02/08/2013 07:45 AM, Grant Likely wrote:
>> On Tue,  5 Feb 2013 12:06:28 -0700, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>> From: Stephen Warren <swarren@nvidia.com>
>>>
>>> Create cmd_dtc_cpp to run the C pre-processor on *.dts file before
>>> passing them to dtc for final compilation. This allows the use of #define
>>> and #include within the .dts file.
>>>
>>> Acked-by: Simon Glass <sjg@chromium.org>
>>> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
>>> Acked-by: Michal Marek <mmarek@suse.cz>
>>> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
>>> Signed-off-by: Stephen Warren <swarren@nvidia.com>
>>
>> I've applied this and was going to push it out, but I've just thought of
>> a problem that could be a show stopper. Once a dtsp file includes a C
>> header, the contents of that header become part of the Device Tree ABI.
>> If someone changes that file (ie. to renumber a series of #defines) then
>> that will break the binding. We need a way to protect against that.
>> Someone changing a .h file may make the assumption that it is only
>> kernel internal and won't realize that it has external implications.
>>
>> I'm thinking that any dts includes need to be treated in the same way as
>> userspace headers. We could put them into include/uapi and piggy back on
>> the protection already afforded by that directory, or come up with
>> something new. Any thoughts?
>
> Yes, that's true.
>
> What protection is provided by include/uapi - something programmatic or
> simply stricter review?

I believe there are tools that parse the userspace ABI and flag
incompatibilities, but also stricter review.

> I wondered if we shouldn't put the headers into the .dts directory, then
> update the kernel to include them too. That would also make it obvious
> they were part of the DT ABI.

That would also help be good. In either case the CPP options need to
only include the ABI headers. No normal headers allowed.

g.



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

  reply	other threads:[~2013-02-08 20:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-05 19:06 [PATCH V8] kbuild: create a rule to run the pre-processor on *.dts files Stephen Warren
2013-02-08 14:45 ` Grant Likely
2013-02-08 17:18   ` Stephen Warren
2013-02-08 20:50     ` Grant Likely [this message]
2013-02-08 21:24   ` Rob Herring
2013-02-08 22:04     ` Grant Likely
2013-02-08 22:42       ` Stephen Warren
2013-02-11 19:11         ` Stephen Warren
2013-02-12 18:08           ` Grant Likely
2013-02-12 19:27             ` Stephen Warren

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='CACxGe6t=Bi=4ZiZFyye9iSGBe4k-pa7h2c39iruGhKi3oJjzWA@mail.gmail.com' \
    --to=grant.likely@secretlab.ca \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=robherring2@gmail.com \
    --cc=sam@ravnborg.org \
    --cc=scottwood@freescale.com \
    --cc=srinivas.kandagatla@st.com \
    --cc=swarren@nvidia.com \
    --cc=swarren@wwwdotorg.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;
as well as URLs for NNTP newsgroup(s).