Message ID | 20190806214925.7534-4-sstabellini@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v4,1/7] xen/arm: extend device_tree_for_each_node | expand |
Hi Stefano, On 06/08/2019 22:49, Stefano Stabellini wrote: > Improve early_print_info to also print the banks saved in > bootinfo.reserved_mem. Print them right after RESVD, increasing the same > index. > > Signed-off-by: Stefano Stabellini <stefanos@xilinx.com> > --- > Changes in v4: > - new patch > --- > xen/arch/arm/bootfdt.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c > index 3e6fd63b16..b8f2e53122 100644 > --- a/xen/arch/arm/bootfdt.c > +++ b/xen/arch/arm/bootfdt.c > @@ -351,9 +351,10 @@ static int __init early_scan_node(const void *fdt, > static void __init early_print_info(void) > { > struct meminfo *mi = &bootinfo.mem; > + struct meminfo *mem_resv = &bootinfo.reserved_mem; > struct bootmodules *mods = &bootinfo.modules; > struct bootcmdlines *cmds = &bootinfo.cmdlines; > - int i, nr_rsvd; > + int i, j, nr_rsvd; May I ask you to switch them to unsigned int? > > for ( i = 0; i < mi->nr_banks; i++ ) > printk("RAM: %"PRIpaddr" - %"PRIpaddr"\n", > @@ -378,6 +379,12 @@ static void __init early_print_info(void) > printk(" RESVD[%d]: %"PRIpaddr" - %"PRIpaddr"\n", > i, s, e); > } > + for ( j = 0; j < mem_resv->nr_banks; j++, i++ ) > + { > + printk(" RESVD[%d]: %"PRIpaddr" - %"PRIpaddr"\n", i, With that the request above: s/%d/%u/ > + mem_resv->bank[j].start, > + mem_resv->bank[j].start + mem_resv->bank[j].size - 1); > + } > printk("\n"); > for ( i = 0 ; i < cmds->nr_mods; i++ ) > printk("CMDLINE[%"PRIpaddr"]:%s %s\n", cmds->cmdline[i].start, > Cheers,
On Wed, 7 Aug 2019, Julien Grall wrote: > Hi Stefano, > > On 06/08/2019 22:49, Stefano Stabellini wrote: > > Improve early_print_info to also print the banks saved in > > bootinfo.reserved_mem. Print them right after RESVD, increasing the same > > index. > > > > Signed-off-by: Stefano Stabellini <stefanos@xilinx.com> > > --- > > Changes in v4: > > - new patch > > --- > > xen/arch/arm/bootfdt.c | 9 ++++++++- > > 1 file changed, 8 insertions(+), 1 deletion(-) > > > > diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c > > index 3e6fd63b16..b8f2e53122 100644 > > --- a/xen/arch/arm/bootfdt.c > > +++ b/xen/arch/arm/bootfdt.c > > @@ -351,9 +351,10 @@ static int __init early_scan_node(const void *fdt, > > static void __init early_print_info(void) > > { > > struct meminfo *mi = &bootinfo.mem; > > + struct meminfo *mem_resv = &bootinfo.reserved_mem; > > struct bootmodules *mods = &bootinfo.modules; > > struct bootcmdlines *cmds = &bootinfo.cmdlines; > > - int i, nr_rsvd; > > + int i, j, nr_rsvd; > > May I ask you to switch them to unsigned int? > > > for ( i = 0; i < mi->nr_banks; i++ ) > > printk("RAM: %"PRIpaddr" - %"PRIpaddr"\n", > > @@ -378,6 +379,12 @@ static void __init early_print_info(void) > > printk(" RESVD[%d]: %"PRIpaddr" - %"PRIpaddr"\n", > > i, s, e); > > } > > + for ( j = 0; j < mem_resv->nr_banks; j++, i++ ) > > + { > > + printk(" RESVD[%d]: %"PRIpaddr" - %"PRIpaddr"\n", i, > > With that the request above: s/%d/%u/ Good idea. I'll take the opportunity to also switch the RESVD[%d] to RESVD[%u] just above > > + mem_resv->bank[j].start, > > + mem_resv->bank[j].start + mem_resv->bank[j].size - 1); > > + } > > printk("\n"); > > for ( i = 0 ; i < cmds->nr_mods; i++ ) > > printk("CMDLINE[%"PRIpaddr"]:%s %s\n", cmds->cmdline[i].start, > >
diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c index 3e6fd63b16..b8f2e53122 100644 --- a/xen/arch/arm/bootfdt.c +++ b/xen/arch/arm/bootfdt.c @@ -351,9 +351,10 @@ static int __init early_scan_node(const void *fdt, static void __init early_print_info(void) { struct meminfo *mi = &bootinfo.mem; + struct meminfo *mem_resv = &bootinfo.reserved_mem; struct bootmodules *mods = &bootinfo.modules; struct bootcmdlines *cmds = &bootinfo.cmdlines; - int i, nr_rsvd; + int i, j, nr_rsvd; for ( i = 0; i < mi->nr_banks; i++ ) printk("RAM: %"PRIpaddr" - %"PRIpaddr"\n", @@ -378,6 +379,12 @@ static void __init early_print_info(void) printk(" RESVD[%d]: %"PRIpaddr" - %"PRIpaddr"\n", i, s, e); } + for ( j = 0; j < mem_resv->nr_banks; j++, i++ ) + { + printk(" RESVD[%d]: %"PRIpaddr" - %"PRIpaddr"\n", i, + mem_resv->bank[j].start, + mem_resv->bank[j].start + mem_resv->bank[j].size - 1); + } printk("\n"); for ( i = 0 ; i < cmds->nr_mods; i++ ) printk("CMDLINE[%"PRIpaddr"]:%s %s\n", cmds->cmdline[i].start,
Improve early_print_info to also print the banks saved in bootinfo.reserved_mem. Print them right after RESVD, increasing the same index. Signed-off-by: Stefano Stabellini <stefanos@xilinx.com> --- Changes in v4: - new patch --- xen/arch/arm/bootfdt.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)