All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: arm: ignore zero sized memory banks
@ 2014-06-30 15:38 Ian Campbell
  2014-06-30 19:12 ` Stefano Stabellini
  2014-07-01 13:13 ` Julien Grall
  0 siblings, 2 replies; 3+ messages in thread
From: Ian Campbell @ 2014-06-30 15:38 UTC (permalink / raw)
  To: xen-devel; +Cc: julien.grall, tim, Ian Campbell, stefano.stabellini

At least one platform (xgene) has a memory node which contains 4
banks, 3 of which are all zeroes.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/common/device_tree.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
index f0b17a3..556061a 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++;
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-01 13:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-30 15:38 [PATCH] xen: arm: ignore zero sized memory banks Ian Campbell
2014-06-30 19:12 ` Stefano Stabellini
2014-07-01 13:13 ` Julien Grall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.