From: Ian Campbell Subject: Re: [PATCH v3 08/10] xen: arm: support bootmodule type detection by ordering Date: Mon, 21 Jul 2014 11:18:11 +0100 Message-ID: <1405937891.24409.1.camel@kazak.uk.xensource.com> References: <1405688876.491.10.camel@kazak.uk.xensource.com> <1405688900-11769-8-git-send-email-ian.campbell@citrix.com> <53C98B69.4090903@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53C98B69.4090903@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@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, 2014-07-18 at 22:02 +0100, Julien Grall wrote: > Hi Ian, > > On 18/07/14 14:08, Ian Campbell wrote: > > @@ -281,10 +293,11 @@ static void __init early_print_info(void) > > mi->bank[i].start + mi->bank[i].size - 1); > > printk("\n"); > > for ( i = 0 ; i < mods->nr_mods; i++ ) > > - printk("MODULE[%d]: %"PRIpaddr" - %"PRIpaddr" %s\n", > > + printk("MODULE[%d]: %"PRIpaddr" - %"PRIpaddr" %-12s %s\n", > > i, > > mods->module[i].start, > > mods->module[i].start + mods->module[i].size, > > + boot_module_kind_as_string(mods->module[i].kind), > > mods->module[i].cmdline); > > nr_rsvd = fdt_num_mem_rsv(device_tree_flattened); > > for ( i = 0; i < nr_rsvd; i++ ) > > diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c > > index 0cbe552..e53e491 100644 > > --- a/xen/arch/arm/setup.c > > +++ b/xen/arch/arm/setup.c > > @@ -223,6 +223,20 @@ struct bootmodule * __init boot_module_find_by_kind(bootmodule_kind kind) > > return NULL; > > } > > > > +const char * __init boot_module_kind_as_string(bootmodule_kind kind) > > +{ > > + switch ( kind ) > > + { > > + case BOOTMOD_XEN: return "Xen"; > > + case BOOTMOD_FDT: return "Device Tree"; > > + case BOOTMOD_KERNEL: return "Kernel"; > > + case BOOTMOD_RAMDISK: return "Ramdisk"; > > + case BOOTMOD_XSM: return "XSM"; > > + case BOOTMOD_UNKNOWN: return "Unknown"; > > + default: BUG(); > > + } > > +} > > + > > A bit strange to introduce boot_module_kind_as_string here rather than > in the earlier patch. This is the first time it seemed necessary, since you can no longer infer it from the module number. > Likewise for changing the string format a bit above. That's just adding "%-12s" to print the type. > > Anyway: > > Acked-by: Julien Grall Thanks > > Regards, > > >