bootfdt: Unify early printing of memory ranges endpoints
PATCH 1/1 bootfdt: Unify early printing of memory ranges endpoints
At the moment, when printing memory ranges during early boot, endpoints of some ranges are printed as inclusive (RAM, RESVD, SHMEM) and some as exclusive (Initrd, MODULE). Make the behavior consistent and print all the endpoints as inclusive.
--- xen/common/device-tree/bootfdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
xen/common/device-tree/bootfdt.c +2 -2
@@ -439,7 +439,7 @@ static int __init process_chosen_node(const void *fdt, int node,return -EINVAL ; } -printk ("Initrd %" PRIpaddr"-%" PRIpaddr"\n" , start, end); +printk ("Initrd %" PRIpaddr"-%" PRIpaddr"\n" , start, end -1 );add_boot_module (BOOTMOD_RAMDISK , start, end-start, false);
@@ -524,7 +524,7 @@ static void __init early_print_info(void)printk ("MODULE[%d]: %" PRIpaddr" - %" PRIpaddr" %-12s\n" , i, mods->module[i].start, - mods->module[i].start + mods->module[i].size, + mods->module[i].start + mods->module[i].size -1 ,boot_module_kind_as_string (mods->module[i].kind));for ( i =0 ; i < mem_resv->nr_banks; i++ )
Signature · 1 line
2.25.1
Hi Michal,
Quoted 9 lines · Michal Orzel
At the moment, when printing memory ranges during early boot, endpoints of some ranges are printed as inclusive (RAM, RESVD, SHMEM) and some as exclusive (Initrd, MODULE). Make the behavior consistent and print all the endpoints as inclusive.
Signed-off-by Michal Orzel <[email protected]>---
Looks good to me!
Outside early boot there are other places where we print exclusive ranges, do you know if there is any general style we should apply or does it depend on case by case?
Cheers,
Luca
Quoted 14 lines · Luca Fancellu
Hi Michal,
Quoted 9 lines · Michal Orzel
At the moment, when printing memory ranges during early boot, endpoints of some ranges are printed as inclusive (RAM, RESVD, SHMEM) and some as exclusive (Initrd, MODULE). Make the behavior consistent and print all the endpoints as inclusive.
Signed-off-by Michal Orzel <[email protected]>---
Quoted 7 lines
Looks good to me!
Reviewed-by Luca Fancellu <[email protected]>Outside early boot there are other places where we print exclusive ranges, do you know if there is any general style we should apply or does it depend on case by case?
Yes, there are other places where we print ranges with endpoints exclusive or inclusive but at least they are grouped together. Here it was quite confusing to find lines next to each other with different styles. I don't think there is any specific style we should adhere to.
~Michal
Stefano Stabellini
Acked-byQuoted 9 lines · Luca Fancellu
Hi Michal,
Quoted 7 lines · Michal Orzel
At the moment, when printing memory ranges during early boot, endpoints of some ranges are printed as inclusive (RAM, RESVD, SHMEM) and some as exclusive (Initrd, MODULE). Make the behavior consistent and print all the endpoints as inclusive.
Quoted 6 lines
Quoted 2 lines
Signed-off-by Michal Orzel <[email protected]>---
Looks good to me!
Reviewed-by Luca Fancellu <[email protected]>