From: Ian Campbell Date: Mon, 30 Jun 2014 15:38:20 +0000 (+0100) Subject: xen: arm: ignore zero sized memory banks X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~4700 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9559d3d04d6be3a298f763dd68bbe7452c1f317d;p=xen.git xen: arm: ignore zero sized memory banks At least one platform (xgene) has a memory node which contains 4 banks, 3 of which are all zeroes. Signed-off-by: Ian Campbell Acked-by: Stefano Stabellini Acked-by: Julien Grall --- diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c index 310635ea7d..53f779a4f3 100644 --- a/xen/common/device_tree.c +++ b/xen/common/device_tree.c @@ -322,6 +322,8 @@ static void __init process_memory_node(const void *fdt, int node, for ( i = 0; i < banks && early_info.mem.nr_banks < NR_MEM_BANKS; i++ ) { device_tree_get_reg(&cell, address_cells, size_cells, &start, &size); + if ( !size ) + continue; early_info.mem.bank[early_info.mem.nr_banks].start = start; early_info.mem.bank[early_info.mem.nr_banks].size = size; early_info.mem.nr_banks++;