From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Likely Subject: Re: [PATCH V8] kbuild: create a rule to run the pre-processor on *.dts files Date: Fri, 08 Feb 2013 14:45:26 +0000 Message-ID: <20130208144527.0D8DD3E2C01@localhost> References: <1360091188-24063-1-git-send-email-swarren@wwwdotorg.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1360091188-24063-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: Stephen Warren , Michal Marek , Grant Likely , Rob Herring Cc: Stephen Warren , Srinivas KANDAGATLA , devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Mark Brown , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Scott Wood , Sam Ravnborg List-Id: devicetree@vger.kernel.org On Tue, 5 Feb 2013 12:06:28 -0700, Stephen Warren wrote: > From: Stephen Warren > > 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 > Acked-by: Jean-Christophe PLAGNIOL-VILLARD > Acked-by: Michal Marek > Acked-by: Srinivas Kandagatla > Signed-off-by: Stephen Warren 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? g.