From: Ian Campbell Subject: Re: [PATCH V2 07/33] xen/arm: Create a hierarchical device tree Date: Wed, 8 May 2013 14:41:08 +0100 Message-ID: <1368020468.17285.2.camel@zakaz.uk.xensource.com> References: <1368018689.26321.286.camel@zakaz.uk.xensource.com> <518A5470.40500@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <518A5470.40500@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: Stefano Stabellini , "patches@linaro.org" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Wed, 2013-05-08 at 14:34 +0100, Julien Grall wrote: > > Which only leaves ones which are both? How many are these? I'm inclined > > towards suggesting that if they are debug prints which are disabled by > > default and require a recompile to enable then the person doing the > > debugging can select whether they care about early or late messages by > > #define-ing DEBUG or EARLY_DEBUG or both as required. > > We can't choose at compile time. Early printk function is in init code > section. So at the end of boot the function will disappear. Oh, right. Perhaps something could be conditional on system_state = SYS_STATE_active, this happens not long before we discard the initial sections. > Device tree function could be called after the end of the boot. For the > moment it's not the case. > > The best solution would be: early_printk is directly handled in console > as linux does. That does sound best. > >> +/** > >> + * Host device tree > >> + * DO NOT modify it! > > > > Can it be const? > > No :/. I choose to runtime information in the device tree. It's usefull > to know if a device is used by Xen or someone else. > > I have just notice that dt_host is only used in domain_build.c to browse > all the nodes. I can either provide a helper which return the host DT or > add a function to call a function and recurse on each node. I think it is OK, I was only wondering if it could be const. Ian.