From: Ian Campbell Subject: Re: [PATCH 6/8] device tree, arm: supply a flat device tree to dom0 Date: Wed, 14 Mar 2012 13:00:28 +0000 Message-ID: <1331730028.23971.416.camel@zakaz.uk.xensource.com> References: <1330448064-32267-1-git-send-email-david.vrabel@citrix.com> <1330448064-32267-7-git-send-email-david.vrabel@citrix.com> <1331721861.23971.390.camel@zakaz.uk.xensource.com> <4F607E37.3090100@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4F607E37.3090100@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Wed, 2012-03-14 at 11:17 +0000, David Vrabel wrote: > On 14/03/12 10:44, Ian Campbell wrote: > > On Tue, 2012-02-28 at 16:54 +0000, David Vrabel wrote: > >> From: David Vrabel > >> > >> Build a flat device tree for dom0 based on the one supplied to Xen. > >> The following changes are made: > >> > >> * In the /chosen node, the xen,dom0-bootargs parameter is renamed to > >> bootargs. > >> > >> * In all memory nodes, the reg parameters are adjusted to reflect > >> the amount of memory dom0 can use. The p2m is updated using this > >> info. > > > > Do you also do > > * Hide the xen console UART from dom0 > > > > ? (it seems not) > > No. I don't know which UART Xen uses yet as it isn't discovered via the > device tree. Fair enough. > > > >> Support for passing ATAGS to dom0 is removed. > > > >> > >> Signed-off-by: David Vrabel > >> --- > >> xen/arch/arm/Makefile | 2 + > >> xen/arch/arm/domain_build.c | 238 ++++++++++++++++++++++++++++++++++------- > >> xen/arch/arm/kernel.c | 4 +- > >> xen/arch/arm/kernel.h | 8 +- > >> xen/common/device_tree.c | 44 +++++--- > >> xen/include/xen/device_tree.h | 8 ++ > >> 6 files changed, 246 insertions(+), 58 deletions(-) > >> > >> diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile > >> index da5096a..4c9517c 100644 > >> --- a/xen/arch/arm/Makefile > >> +++ b/xen/arch/arm/Makefile > >> @@ -25,6 +25,8 @@ obj-y += vtimer.o > >> > >> #obj-bin-y += ....o > >> > >> +CFLAGS += -I../../common/libfdt > > > > This suggests that something ought to be moved to xen/include/xen. > > libfdt was imported using the original directory structure. Would you > prefer header files to be moved about and #include's in > common/libfdt/*.c fixed up? Hrm. I see these (multiple times each): #include #include "libfdt_env.h" #include #include "libfdt_internal.h" Presumably only fdt.h and libfdt.h would need to move? Or is the "libfdt_env.h" actually an error since it is included in libfdt.h? That would still need fixing up to add the xen/ prefix, or we could put them in include/libfdt/....h and add that to the CFLAGS. Neither of which seems any better than the change you made. Anyone else have any ideas/opinions? I'm inclined to stick with the CFLAGS change, although I think you should use $(BASEDIR) rather than ../.. (snipped rest, all seemed reasonable)