From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id A5DA08EE for ; Wed, 18 Oct 2017 14:14:15 +0000 (UTC) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 9AD0F12A for ; Wed, 18 Oct 2017 14:14:14 +0000 (UTC) Received: from mail-qt0-f174.google.com (mail-qt0-f174.google.com [209.85.216.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3ED502191C for ; Wed, 18 Oct 2017 14:14:14 +0000 (UTC) Received: by mail-qt0-f174.google.com with SMTP id 31so10373512qtz.9 for ; Wed, 18 Oct 2017 07:14:14 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20171017114823.58476908@bbrezillon> <1508257276.74236.38.camel@freebsd.org> <2D4E6B6D-8F07-46D0-BB36-D97916802893@linaro.org> From: Rob Herring Date: Wed, 18 Oct 2017 09:13:52 -0500 Message-ID: To: Pantelis Antoniou Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Cc: "devicetree@vger.kernel.org" , Kumar Gala , "ksummit-discuss@lists.linuxfoundation.org" , Ian Lepore , "devicetree-spec@vger.kernel.org" , "Bird, Timothy" Subject: Re: [Ksummit-discuss] Devicetree Workshop at Kernel Summit Prague (26 Oct 2017) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Wed, Oct 18, 2017 at 7:59 AM, Pantelis Antoniou wrote: > Hi Grant, > >> On Oct 18, 2017, at 15:14 , Grant Likely wro= te: >> >> On Tue, Oct 17, 2017 at 8:03 PM, Bird, Timothy wrote= : >>>> -----Original Message----- >>>> From Geert Uytterhoeven on Tuesday, October 17, 2017 10:24 AM >>>> On Tue, Oct 17, 2017 at 7:02 PM, Kumar Gala wr= ote: >>>>> I think this also gets to having bindings described in a structured w= ay so >>>> they can be utilized for validation of dts files. We are doing a litt= le of this in >>>> Zephyr since we are using a structured binding spec to generate code f= rom >>>> .dts (since we don=E2=80=99t utilize a runtime dtb). >>>> >>>> So you are basically generating board files from .dts? >>>> (closing the loop ;-) Briefly, what Zephyr is doing is controlling configuration (what drivers are built) and generating register base addresses and maybe interrupts. That's not really board.dts -> board.c. >>> >>> I think we ought to do this on Linux, as a size optimization. >>> -- Tim >>> >>> P.S. I think I'll leave it ambiguous whether this was meant as a joke = or not. :-) >> > > As crazy that sounds it is possible using the YAML bindings, i.e. C struc= ture definitions > and fill-up from DT automatically. Whether this is a good idea it=E2=80= =99s another question :) Yeah, yeah. YAML solves *all* the problems. >> Talk to Nicolas Pitre and Rob Herring about this. They've already made >> a bunch of progress on reducing memory footprint. Or just look at linux-next. :) The focus is purely on runtime RAM usage with all code being XIP. Basically, I've reduced the size of the unflattened tree by skipping unflattening of disabled nodes and shrinking the unflattened tree structs. For example removing the kobject for !SYSFS. This reduced RAM usage from 120K to 11K on an stm32 board. The next thing in the heat map of RAM usage is struct device size. There's some things like DMA related elements that could be moved to separate structures, but that will be quite invasive. Another idea is to run the kernel unflattening code on the tree at build time and embed that as const data into the kernel. The unflattening code is pretty self contained and XIP images are platform specific anyway. It would also allow running all dtb files thru unflattening at build time for some validation. Though I'm not sure there's anything unflattening would fail on that dtc can't check. Rob